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

public class RadialGradient extends AbstractGradient
A gradient that radiates outward from the origin (0,0) on the XZ plane.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RadialGradient(double radius, org.bukkit.Color... colors)
    Constructs a RadialGradient.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.Color
    get(org.bukkit.util.Vector position, double progress)
    Calculates color based on the distance from the origin relative to the radius.

    Methods inherited from class com.github.darksoulq.abyssallib.common.color.gradient.AbstractGradient

    getAt, getColors, getPositions

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.github.darksoulq.abyssallib.common.color.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 varargs Color stops.
  • 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:
      get in interface ColorProvider
      Overrides:
      get in class AbstractGradient
      Parameters:
      position - The spatial Vector position.
      progress - The global progress (unused).
      Returns:
      The radial Color.