Class Timeline

java.lang.Object
com.github.darksoulq.abyssallib.world.particle.timeline.Timeline
All Implemented Interfaces:
Transformer

public class Timeline extends Object implements Transformer
A composite Transformer that sequences multiple transformations over a temporal axis.

The Timeline manages a collection of Timeline.Keyframes, each containing a specific transformer and a time window. During the transformation process, it determines which transformers are active based on the current tick and applies them sequentially.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Fluent builder for the Timeline class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new builder instance for constructing a timeline.
    org.bukkit.util.Vector
    transform(org.bukkit.util.Vector input, long globalTick)
    Applies all active keyframe transformations to the input vector based on the global tick.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • transform

      public org.bukkit.util.Vector transform(org.bukkit.util.Vector input, long globalTick)
      Applies all active keyframe transformations to the input vector based on the global tick.

      If loop is enabled, the global tick is wrapped using a modulo operation against the totalDuration.

      Specified by:
      transform in interface Transformer
      Parameters:
      input - The original coordinate Vector.
      globalTick - The current absolute age of the particle effect in ticks.
      Returns:
      The resulting Vector after all valid keyframe transformations are applied.
    • builder

      public static Timeline.Builder builder()
      Creates a new builder instance for constructing a timeline.
      Returns:
      A new Timeline.Builder.