Interface BetterModelEvaluator
public interface BetterModelEvaluator
Evaluator interface for parsing and compiling Molang expressions into executable functions.
This evaluator compiles string representations of Molang expressions used in model animations into optimized float-to-float functions for fast runtime execution.
Example usage:
BetterModelEvaluator evaluator = BetterModel.platform().evaluator();
Float2FloatFunction function = evaluator.compile("query.anim_time * 20");
float evaluated = function.apply(1.5f);
-
Method Summary
Modifier and TypeMethodDescription@NotNull Float2FloatFunctionCompiles a Molang expression string into a high-performance evaluation function.
-
Method Details
-
compile
Compiles a Molang expression string into a high-performance evaluation function.- Parameters:
expression- the Molang expression string to compile (e.g.,"query.anim_time * 20")- Returns:
- the compiled
Float2FloatFunctionthat evaluates the expression at runtime
-