Class WaveGradient
java.lang.Object
com.github.darksoulq.abyssallib.common.color.gradient.WaveGradient
- All Implemented Interfaces:
ColorProvider
A color provider that applies a sinusoidal wave modulation to a base color provider.
-
Constructor Summary
ConstructorsConstructorDescriptionWaveGradient(ColorProvider base, org.bukkit.util.Vector direction, double wavelength, double speed) Constructs a WaveGradient. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Colorget(org.bukkit.util.Vector pos, double progress) Calculates color based on a sine wave oscillating between 0.0 and 1.0.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ColorProvider
filter, get
-
Constructor Details
-
WaveGradient
public WaveGradient(ColorProvider base, org.bukkit.util.Vector direction, double wavelength, double speed) Constructs a WaveGradient.- Parameters:
base- TheColorProviderto modulate.direction- TheVectorof propagation.wavelength- The spatial frequency.speed- The temporal frequency.
-
-
Method Details
-
get
public org.bukkit.Color get(org.bukkit.util.Vector pos, double progress) Calculates color based on a sine wave oscillating between 0.0 and 1.0.- Specified by:
getin interfaceColorProvider- Parameters:
pos- The spatialVectorposition.progress- The temporal progress.- Returns:
- The wave-modulated
Color.
-