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 Summary

    Constructors
    Constructor
    Description
    SweepGradient(org.bukkit.Color... colors)
    Constructs a SweepGradient.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class com.github.darksoulq.abyssallib.common.color.gradient.AbstractGradient

    getAt, getColors, getPositions

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.github.darksoulq.abyssallib.common.color.ColorProvider

    filter, get
  • 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.