-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discover last Frame of Animation #7
Comments
I'm not entirely sure, but I expect you'd be able to programmatically figure it out with this info: It's been a long time since I've done anything with this project, so there is a chance for misinformation in this post. Please let me know if it works. |
The currentAnimationSequence property is an array of Strings. These strings are the names of the animation running on the SGG_Spine. So array size gives me the number of animations running in sequence regardless of how many frames there are. |
Ah. I appear to have forgotten more than I thought I did! However, I do know that I set it up all frames as an array of dictionaries or objects or something that defined each frame of the sequence... So, I would suggest taking a look around, trying to find that array as that will have the total count of frames in the sequence. |
Also, there is no upper-limit protection implemented on jumpToNextFrame() if I try to loop by using the comparing currentFrame to a variable workaround it won't work too. Within this search I found there was a variable called totalFrames which is used on debug mode. I changed SpineImport code to export this variable to my code, but it didn't work the way I expected. Anyway, I will try to find this array of the frames. |
In all honesty, this project started as an idea for an implementation for a Spine runtime that quickly turned into a hodgepodge of clunky code. In the end, somehow it worked anyway! However, I don't currently have the time to devote any effort to it (and if I did, I'd probably start over from scratch). You're more than welcome to submit pull requests to fix issues and I'll just trust that you got it to work right! |
There's no way of doing a loop for every frame by using jumpToNextFrame
something like
node.jumpToFrame(0)
for i = 0 ; i < node.currentAnimationFrameCount; i++
{
node.jumpToNextFrame()
// do something
}
In my project I need to custom render an animation to UIImages
And this would have been one of its uses...
The text was updated successfully, but these errors were encountered: