Class SweepGradient

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

public class SweepGradient extends AbstractGradient
A gradient that sweeps around the origin like a radar or clock hand on the XZ plane.
  • Constructor Details

    • SweepGradient

      public SweepGradient(org.bukkit.Color... colors)
      Constructs a SweepGradient.
      Parameters:
      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 angular position of the vector around the Y axis.
      Specified by:
      get in interface ColorProvider
      Overrides:
      get in class AbstractGradient
      Parameters:
      position - The spatial Vector position.
      progress - The global progress (unused).
      Returns:
      The angular Color.