init function).
It serves as a bridge between your script and the Rive runtime, giving you access to:
- Update scheduling — Request that your node be updated on the next frame.
- Data (ViewModels) — Access the ViewModel data context bound to the node or the root artboard.
- Assets — Retrieve named assets (images, blobs, and audio) that have been added to the Rive file.
Methods
markNeedsUpdate
viewModel
rootViewModel
dataContext
image
drawImage.
See also ImageSampler.
Check out Scripting demos to see a working example.
blob
audio
Audio API.