The localAnimator table provides bindings used by client side animation scripts (e.g. on objects and active items) to set drawables/lights and perform rendering actions.
Immediately plays the specified sound, optionally with the specified loop count and volume.
Immediately spawns a particle with the specified name or configuration at the specified position.
Adds the specified drawable to the animator's list of drawables to be rendered. If a render layer is specified, this drawable will be drawn on that layer instead of the parent entity's render layer. Drawables set in this way are retained between script ticks and must be cleared manually using localAnimator.clearDrawables().
The drawable object must specify exactly one of the following keys to define its type:
pair<Vec2F, Vec2F>line] - Defines this drawable as a line between the specified two points.
List<Vec2F>poly] - Defines the drawable as a polygon composed of the specified points.
Stringimage] - Defines the drawable as an image with the specified asset path.
The following additional keys may be specified for any drawable type:
Vec2Fposition] - Relative position of the drawable.
Colorcolor] - Color for the drawable. Defaults to white.
boolfullbright] - Specifies whether the drawable is fullbright (ignores world lighting).
The following additional key may be specified for line drawables:
floatwidth] - Specifies the width of the line to be rendered.
The following transformation options may be specified for image drawables. Note that if a transformation is specified, it will be used instead of other specific transformation operations.
Clears the list of drawables to be rendered.
Adds the specified light source to the animator's list of light sources to be rendered. Light sources set in this way are retained between script ticks and must be cleared manually using localAnimator.clearLightSources(). The configuration object for the light source accepts the following keys:
Clears the list of light sources to be rendered.