Skip to main content
Node scripts can be used to render shapes, images, text, artboards, and more.

Creating a Node Script

  1. Create a new script and select Node as the type.
  2. Add it to the scene.

Anatomy of a Node Script

Drawing

Node scripts allow you to draw shapes and render them in your scene.
See the API Reference for a complete list of drawing utilities.

Common Patterns

Instantiating Components

To be able to instantiate components at runtime, you will need to have a basic understanding of Data Binding, Components, and Script Inputs. See the following example showing how to set up your components, view models, and scripts:

Fixed-Step Advance

Frame rates can vary between devices and scenes. If your script moves or animates objects based directly on the frame time, faster devices will move them farther each second, while slower ones will appear to lag behind. To keep movement and timing consistent, you can advance your simulation in fixed time steps instead of relying on the variable frame rate. This technique is called a fixed-step update or fixed timestep.