Class Timeline
java.lang.Object
com.github.darksoulq.abyssallib.world.particle.timeline.Timeline
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic Timeline.Builderbuilder()Creates a new builder instance for constructing a timeline.org.bukkit.util.Vectortransform(org.bukkit.util.Vector input, long globalTick) Applies all active keyframe transformations to the input vector based on the global tick.
-
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
loopis enabled, the global tick is wrapped using a modulo operation against thetotalDuration.- Specified by:
transformin interfaceTransformer- Parameters:
input- The original coordinateVector.globalTick- The current absolute age of the particle effect in ticks.- Returns:
- The resulting
Vectorafter all valid keyframe transformations are applied.
-
builder
Creates a new builder instance for constructing a timeline.- Returns:
- A new
Timeline.Builder.
-