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
A gradient that sweeps around the origin like a radar or clock hand on the XZ plane.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Colorget(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 AbstractGradient
getAt, getColors, getPositionsMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ColorProvider
filter, get
-
Constructor Details
-
SweepGradient
public SweepGradient(org.bukkit.Color... colors) Constructs a SweepGradient.- Parameters:
colors- The varargsColorstops.
-
-
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:
getin interfaceColorProvider- Overrides:
getin classAbstractGradient- Parameters:
position- The spatialVectorposition.progress- The global progress (unused).- Returns:
- The angular
Color.
-