KeyframeRuntimeContext
interface KeyframeRuntimeContext
Provides values for runtime Molang queries during keyframe evaluation.
var context = evaluator.newContext();
context.set("health", 20F);
float health = evaluator.compile("query.health").eval(context);
Content copied to clipboard
Since
3.7.0
Inheritors
Types
Link copied to clipboard
The shared runtime context that ignores query registrations.
Link copied to clipboard
interface FloatFunction
Common type for Molang query functions accepting zero to three numeric arguments.
Link copied to clipboard
Computes a numeric query result from no arguments.
Link copied to clipboard
Computes a numeric query result from one numeric argument.
Link copied to clipboard
Computes a numeric query result from two numeric arguments.
Link copied to clipboard
Computes a numeric query result from three numeric arguments.
Functions
Link copied to clipboard
Binds a fixed numeric value to a Molang query in this context.
open fun set(@NotNull key: @NotNull String, @NotNull function: @NotNull KeyframeRuntimeContext.FloatFunction)
Binds a Molang query to a function that accepts zero to three numeric arguments.
Link copied to clipboard
open fun setFunction(@NotNull key: @NotNull String, @NotNull function: @NotNull KeyframeRuntimeContext.FloatFunction0)
Binds a Molang query that accepts no arguments.
open fun setFunction(@NotNull key: @NotNull String, @NotNull function: @NotNull KeyframeRuntimeContext.FloatFunction1)
Binds a Molang query that accepts one numeric argument.
open fun setFunction(@NotNull key: @NotNull String, @NotNull function: @NotNull KeyframeRuntimeContext.FloatFunction2)
Binds a Molang query that accepts two numeric arguments.
open fun setFunction(@NotNull key: @NotNull String, @NotNull function: @NotNull KeyframeRuntimeContext.FloatFunction3)
Binds a Molang query that accepts three numeric arguments.