KeyframeTimeline

Stores sampled animation vectors by zero-based index. A Constant timeline stores pre-evaluated values. A Runtime timeline evaluates its samples with the supplied runtime context.


var builder = KeyframeTimeline.constantBuilder(1);
builder.append(KeyframeVector.ZERO);
var timeline = builder.build();

Since

3.7.0

Inheritors

Types

Link copied to clipboard
interface Builder
Collects samples in index order for a timeline of a fixed size.
Link copied to clipboard
A timeline of pre-evaluated samples stored as consecutive X, Y, and Z components.
Link copied to clipboard
A timeline that retains compiled vectors for evaluation at runtime.

Companion functions

Link copied to clipboard
@NotNull
open fun constantBuilder(size: Int): @NotNull KeyframeTimeline.Builder
Creates a fixed-capacity builder for constant samples.
Link copied to clipboard
@NotNull
open fun runtimeBuilder(size: Int): @NotNull KeyframeTimeline.Builder
Creates a fixed-capacity builder that retains each vector for runtime evaluation.

Functions

Link copied to clipboard
@NotNull
abstract fun apply(index: Int, @NotNull context: @NotNull KeyframeRuntimeContext, @NotNull dest: @NotNull Vector3f, @NotNull operator: @NotNull KeyframeOperator): @NotNull Vector3f
Applies the selected sample to the destination using the supplied operation.
Link copied to clipboard
abstract fun isZero(index: Int): Boolean
Checks whether the stored sample is zero.