View Model Instance
A view model instance for data binding which has properties that can be set and observed.
The instance must be bound to a state machine for its values to take effect. This is done by passing it to Rive.
Parameters
The handle to the view model instance on the command server.
The Rive worker that owns the view model instance.
Functions
Appends an item to the end of a list property.
Fires a trigger on this view model instance.
Creates or retrieves from cache a boolean property, represented as a cold Flow.
Creates or retrieves from cache a color property, represented as a cold Flow. Colors are represented as AARRGGBB integers, and this flow will emit the integer value of the color.
Creates or retrieves from cache an enum property, represented as a cold Flow. Enums are represented as strings, and this flow will emit the string value of the enum.
Creates or retrieves from cache a number property, represented as a cold Flow.
Creates or retrieves from cache a string property, represented as a cold Flow.
Creates or retrieves from cache a trigger property, represented as a cold Flow. Triggers emit Unit as the value, which simply indicates that the trigger has been fired.
Inserts an item into a list property at the specified index.
Removes an item from a list property.
Removes an item from a list property at the specified index.
Assigns the given artboard to the bindable artboard property on this view model instance, or clears the property if artboard is null.
Sets a boolean property on this view model instance.
Assigns the given image to the image property on this view model instance.
Assigns the given view model instance to the nested view model property on this view model instance.
Swaps two items in a list property by their indices.