ModelKeyframe

@ApiStatus.Internal
class ModelKeyframe : Record, Timed

Represents a single keyframe in an animation timeline.

A keyframe defines the state of a bone (position, rotation, or scale) at a specific time, along with interpolation data (linear, catmull-rom, bezier) to smooth transitions.

Since

1.15.2

Parameters

channel

the channel this keyframe affects (position, rotation, scale)

dataPoints

the list of data points (values) for this keyframe

bezierLeftTime

the time offset for the left bezier handle

bezierLeftValue

the value offset for the left bezier handle

bezierRightTime

the time offset for the right bezier handle

bezierRightValue

the value offset for the right bezier handle

interpolation

the interpolation type (e.g., linear, catmullrom, bezier)

time

the time of the keyframe in seconds

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
@NotNull
open fun channel(): @NotNull KeyframeChannel
Returns the channel this keyframe affects.
Link copied to clipboard
abstract fun compareTo(p: T): Int
open fun compareTo(@NotNull o: @NotNull Timed): Int
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
open fun hasPoint(): Boolean
Checks if this keyframe contains any data points.
Link copied to clipboard
@NotNull
open fun interpolation(): @NotNull VectorInterpolator
Returns the interpolation type for this keyframe.
Link copied to clipboard
@NotNull
open fun point(): @NotNull ModelDatapoint
Returns the first data point in the list.
@NotNull
open fun point(@NotNull context: @NotNull ModelLoadContext, @NotNull function: @NotNull (Vector3f) -> Vector3f): @NotNull VectorPoint
Converts this keyframe into a processed VectorPoint.
Link copied to clipboard
abstract fun time(): Float
Gets time
Link copied to clipboard
abstract fun toString(): String