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
A gradient that radiates outward from the origin (0,0) on the XZ plane.
-
Constructor Summary
ConstructorsConstructorDescriptionRadialGradient(double radius, org.bukkit.Color... colors) Constructs a RadialGradient. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Colorget(org.bukkit.util.Vector position, double progress) Calculates color based on the distance from the origin relative to the radius.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
-
RadialGradient
public RadialGradient(double radius, org.bukkit.Color... colors) Constructs a RadialGradient.- Parameters:
radius- The radius of the gradient.colors- The varargsColorstops.
-
-
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:
getin interfaceColorProvider- Overrides:
getin classAbstractGradient- Parameters:
position- The spatialVectorposition.progress- The global progress (unused).- Returns:
- The radial
Color.
-