Class StripedPattern
java.lang.Object
com.github.darksoulq.abyssallib.common.color.pattern.StripedPattern
- All Implemented Interfaces:
ColorProvider
A procedural color provider that generates stripes alternating along a specific direction vector.
-
Constructor Summary
ConstructorsConstructorDescriptionStripedPattern(org.bukkit.Color c1, org.bukkit.Color c2, double width, org.bukkit.util.Vector direction) Constructs a new StripedPattern. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Colorget(org.bukkit.util.Vector pos, double progress) Calculates the color based on the projection of the position onto the direction vector.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ColorProvider
filter, get
-
Constructor Details
-
StripedPattern
public StripedPattern(org.bukkit.Color c1, org.bukkit.Color c2, double width, org.bukkit.util.Vector direction) Constructs a new StripedPattern.- Parameters:
c1- The firstColor.c2- The secondColor.width- The width of the stripes.direction- TheVectordirection the stripes should follow.
-
-
Method Details
-
get
public org.bukkit.Color get(org.bukkit.util.Vector pos, double progress) Calculates the color based on the projection of the position onto the direction vector.- Specified by:
getin interfaceColorProvider- Parameters:
pos- The spatialVectorposition.progress- The interpolation progress (unused).- Returns:
- The color corresponding to the current stripe segment.
-