Class StripedPattern

java.lang.Object
com.github.darksoulq.abyssallib.common.color.pattern.StripedPattern
All Implemented Interfaces:
ColorProvider

public class StripedPattern extends Object implements ColorProvider
A procedural color provider that generates stripes alternating along a specific direction vector.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StripedPattern(org.bukkit.Color c1, org.bukkit.Color c2, double width, org.bukkit.util.Vector direction)
    Constructs a new StripedPattern.
  • Method Summary

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

    Methods inherited from class Object

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

    Methods 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 first Color.
      c2 - The second Color.
      width - The width of the stripes.
      direction - The Vector direction 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:
      get in interface ColorProvider
      Parameters:
      pos - The spatial Vector position.
      progress - The interpolation progress (unused).
      Returns:
      The color corresponding to the current stripe segment.