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 Type
    Method
    Description
    compile(@NotNull String expression)
    Compiles a Molang expression string into a high-performance evaluation function.
  • Method Details

    • compile

      @NotNull @NotNull Float2FloatFunction compile(@NotNull @NotNull String expression)
      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 Float2FloatFunction that evaluates the expression at runtime