Closed danhumaan closed 6 years ago
yes, you can use the api object which has such a method.
// initialise
$(".container").spritespin({ ... })
// access the api object
$(".container").spritespin("api").playTo(FRAME_NUMBER)
some implemented api methods are here https://github.com/giniedp/spritespin/blob/master/src/api/common.ts#L78
however, there is no callback (yet) telling you when the playback has reached that frame. You have to track the occuring frame numbers using the onFrame
callback
Awesome, thanks mate - and totally fine to watch the onFrame
to know when it's reached the end point.
Gday,
Thanks for the plugin, it's doing a good job of creating the primary interaction i'm looking for, however i'm looking for a method to trigger the instance to spin all the way back to frame 1. Animate is set to false by default because I don't want it auto spinning.
If there is no 'spin to' method, is there a simple way I could start the auto
animate
process again?The scenario I am trying to replicate is this: