rive

Version: stable

FUNCTION
play_anim()
play_state_machine()
cancel()
get_go()

Functions

play_anim()

play_anim(url,anim_id,playback,options,complete_function)

Plays the specified animation on a Rive model

PARAMETERS

url url The Rive model for which to play an animation
anim_id hash Id of the animation to play
playback number Playback mode of the animation (from go.PLAYBACK_*)
options table Playback options
offset number The normalized initial value of the animation cursor when the animation starts playing
playback_rate constant The rate with which the animation will be played. Must be positive.
complete_function function function to call when the animation has completed
self object The context of the calling script
message_id hash The name of the completion message ("rive_animation_done")
message table A table that contains the response
animation_id hash the animation that was completed
playback constant the playback mode for the animation
sender url The invoker of the callback - the Rive model component

play_state_machine()

play_state_machine(url,state_machine_id,options)

Plays the specified animation on a Rive model

PARAMETERS

url url The Rive model for which to play an animation
state_machine_id hash Id of the state machine to play
options table Playback options
playback_rate constant The rate with which the animation will be played. Must be positive.

cancel()

cancel(url)

Cancels all running animations on a specified spine model component

PARAMETERS

url url The Rive model for which to cancel the animation

get_go()

get_go(url,bone_id)

Returns the id of the game object that corresponds to a specified skeleton bone.

PARAMETERS

url url The Rive model to query
bone_id hash Id of the corresponding bone