Class RadialGradient

java.lang.Object
com.github.darksoulq.abyssallib.common.color.gradient.AbstractGradient
com.github.darksoulq.abyssallib.common.color.gradient.RadialGradient
All Implemented Interfaces:
ColorProvider

public class RadialGradient extends AbstractGradient
A gradient that radiates outward from the origin (0,0) on the XZ plane.
  • Constructor Details

    • RadialGradient

      public RadialGradient(double radius, org.bukkit.Color... colors)
      Constructs a RadialGradient.
      Parameters:
      radius - The radius of the gradient.
      colors - The varargs Color stops.
  • Method Details

    • get

      public org.bukkit.Color get(org.bukkit.util.Vector position, double progress)
      Calculates color based on the distance from the origin relative to the radius.
      Specified by:
      get in interface ColorProvider
      Overrides:
      get in class AbstractGradient
      Parameters:
      position - The spatial Vector position.
      progress - The global progress (unused).
      Returns:
      The radial Color.