KeyframeDatapoint

An uncompiled scalar animation value represented by a number or a Molang expression.


var datapoint = KeyframeDatapoint.of(2F);
var keyframe = datapoint.compile(new KeyframeCompileContext(0F));

Since

3.7.0

Inheritors

Types

Link copied to clipboard
A numeric datapoint that compiles to a constant scalar keyframe.
Link copied to clipboard
A Molang expression used as a keyframe component.

Companion properties

Link copied to clipboard
The shared numeric one datapoint.
Link copied to clipboard
The shared numeric zero datapoint.

Companion functions

Link copied to clipboard
@NotNull
open fun fromJson(@Nullable primitive: @Nullable JsonPrimitive, @NotNull stringFunction: @NotNull (String) -> String): @NotNull KeyframeDatapoint
Reads a numeric value or a Molang expression from a JSON primitive.
@NotNull
open fun fromJson(@Nullable primitive: @Nullable JsonPrimitive, @NotNull defDatapoint: @NotNull KeyframeDatapoint, @NotNull stringFunction: @NotNull (String) -> String): @NotNull KeyframeDatapoint
Reads a number or Molang expression, using the supplied default for null or blank input.
Link copied to clipboard
@NotNull
open fun of(value: Float): @NotNull KeyframeDatapoint
Creates a numeric datapoint.
@NotNull
open fun of(@NotNull expression: @NotNull String): @NotNull KeyframeDatapoint
Creates a Molang datapoint for later compilation.

Functions

Link copied to clipboard
@NotNull
abstract fun compile(@NotNull context: @NotNull KeyframeCompileContext): @NotNull Keyframe
Compiles this datapoint into an evaluable scalar keyframe.