Version: stable
FUNCTION | |
---|---|
rive.play_anim() | |
rive.play_state_machine() | |
rive.cancel() | |
rive.get_go() | |
rive.pointer_move() | |
rive.pointer_up() | |
rive.pointer_down() |
rive.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
|
||||||||||||||||||
complete_function |
function |
function to call when the animation has completed
|
rive.play_state_machine(url,state_machine_id,options,callback_function)
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
|
|||||||||
callback_function |
function |
function to call when a playback event occurs
|
rive.cancel(url)
Cancels all running animations on a specified spine model component
PARAMETERS
url |
url |
The Rive model for which to cancel the animation |
rive.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 |
rive.pointer_move(url,x,y)
Forward mouse/touch movement to a component
PARAMETERS
url |
url |
The Rive model |
x |
number |
Horizontal position |
y |
number |
Vertical position |
rive.pointer_up(url,x,y)
Forward mouse/touch release event to a component
PARAMETERS
url |
url |
The Rive model |
x |
number |
Horizontal position |
y |
number |
Vertical position |
rive.pointer_down(url,x,y)
Forward mouse/touch press event to a component
PARAMETERS
url |
url |
The Rive model |
x |
number |
Horizontal position |
y |
number |
Vertical position |