Set expression
cavalry_set_expressionSet or clear a JavaScript expression on a layer attribute to dynamically control its value. Use an empty string to remove the expression.
Instructions
Set (or clear, with an empty string) a JavaScript expression on an attribute.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attrId | Yes | Attribute path, e.g. "position.x", "rotation", "material.materialColor". | |
| layerId | Yes | Cavalry layer id, e.g. "basicShape#1". Use cavalry_list_layers to find ids. | |
| expression | Yes |