Class NoiseGradient
java.lang.Object
com.github.darksoulq.abyssallib.common.color.gradient.NoiseGradient
- All Implemented Interfaces:
ColorProvider
A color provider that uses 3D Perlin noise to sample from a base ColorProvider.
-
Constructor Summary
ConstructorsConstructorDescriptionNoiseGradient(ColorProvider base, double frequency) Constructs a NoiseGradient. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Colorget(org.bukkit.util.Vector pos, double progress) Generates a noise value for the position and uses it as the interpolation factor for the base provider.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ColorProvider
filter, get
-
Constructor Details
-
NoiseGradient
Constructs a NoiseGradient.- Parameters:
base- TheColorProviderto use for final color output.frequency- The scale of the noise.
-
-
Method Details
-
get
public org.bukkit.Color get(org.bukkit.util.Vector pos, double progress) Generates a noise value for the position and uses it as the interpolation factor for the base provider.- Specified by:
getin interfaceColorProvider- Parameters:
pos- The spatialVectorposition.progress- The global progress.- Returns:
- The noise-influenced
Color.
-