Keyframe

public class Keyframe

One Blockbench keyframe. An axis is either the number the artist typed or a MoLang expression compiled once here and shared by every entity of the model; an expression depends on the entity playing it, so its channel is sampled per tick instead of baked.

Constructors

Link copied to clipboard
public void Keyframe(Object object, String modelName, String animationName)
public void Keyframe(TransformationType transformationType, int timeInTicks, InterpolationType interpolationType, float dataX, float dataY, float dataZ)

Properties

Link copied to clipboard
public final double exactTimeInTicks
Link copied to clipboard
Link copied to clipboard
public final int timeInTicks
Link copied to clipboard

Functions

Link copied to clipboard
public boolean assignsVariables()
Whether an expression axis assigns a variable, which later evaluations can read.
Link copied to clipboard
public float getData(int axis)
The constant on an axis (0 = x, 1 = y, 2 = z); 0 on an expression axis.
Link copied to clipboard
public float getDataX()
Link copied to clipboard
public float getDataY()
Link copied to clipboard
public float getDataZ()
Link copied to clipboard
public double getExactTimeInTicks()
Link copied to clipboard
Link copied to clipboard
public String getSource(int axis)
The authored MoLang on an axis, or null where the artist typed a number.
Link copied to clipboard
public int getTimeInTicks()
Link copied to clipboard
public boolean isDynamic()
Whether any axis is an expression, which keeps the whole channel from being baked at load.
Link copied to clipboard
public double value(int axis, MolangContext context)
The value on an axis: the constant, or the expression evaluated now.