Documentation Index
Fetch the complete documentation index at: https://rive-accessibility.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Represents a view model used for data binding.
A ViewModel provides structured data that can be read and modified at
runtime, allowing Rive files to react to application state.
type ViewModelExample = {
character: Input<Artboard<Data.Character>>,
instance: Artboard<Data.Character>?,
}
function init(self: ViewModelExample, context: Context): boolean
local vm = Data.Character.new()
self.instance = self.character:instance(vm)
return true
end
return function(): Node<ViewModelExample>
return {
character = late(),
instance = nil,
init = init,
}
end