ExpressionTrack

public final class ExpressionTrack extends Record

An animation channel with at least one MoLang keyframe. Its values depend on the entity playing it, so instead of baked frames each entity samples it per tick in its own context, with the clamping and interpolation the baked channels get at load. One track is shared by every entity of the model and never changes.

Parameters

keyframes

the channel's keyframes, normalized: sorted by time without duplicates

Constructors

Link copied to clipboard
public void ExpressionTrack(TransformationType channel, List<Keyframe> keyframes, int blockBenchVersion)

Functions

Link copied to clipboard
public boolean assignsVariables()
Whether a keyframe's expression assigns a variable, so sampling the channel changes the entity's state.
Link copied to clipboard
public float sample(int axis, int tick, MolangContext context)
The channel's value on an axis (0 = x, 1 = y, 2 = z) at a tick, in the pose mixer's units.

Inherited functions

Link copied to clipboard
public abstract boolean equals(Object p)
Link copied to clipboard
public abstract int hashCode()
Link copied to clipboard
public abstract String toString()