Class NoiseGradient

java.lang.Object
com.github.darksoulq.abyssallib.common.color.gradient.NoiseGradient
All Implemented Interfaces:
ColorProvider

public class NoiseGradient extends Object implements ColorProvider
A color provider that uses 3D Perlin noise to sample from a base ColorProvider.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NoiseGradient(ColorProvider base, double frequency)
    Constructs a NoiseGradient.
  • Method Summary

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

    Methods inherited from class Object

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

    Methods inherited from interface ColorProvider

    filter, get
  • Constructor Details

    • NoiseGradient

      public NoiseGradient(ColorProvider base, double frequency)
      Constructs a NoiseGradient.
      Parameters:
      base - The ColorProvider to 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:
      get in interface ColorProvider
      Parameters:
      pos - The spatial Vector position.
      progress - The global progress.
      Returns:
      The noise-influenced Color.