Nate :As you explore the AnimationState and other APIs it would be interesting to hear if you get stuck or otherwise where we might be able to improve the documentation to give you an easier time. As much as we try, we can only pretend to look at it with fresh eyes!
So far nothing much, but I had/have some confusing about times though. I needed to tryout things in code to grasp the different timing values of TrackEntry though as the TrackEntry API-descriptions alone weren't enough for me to understand them. Mainly because it took me a minute to understand there are basically two time ranges: a 'local' one per animation, and a 'master' one per track.
To me it wasn't clear which method was using which range. It would be nice if that could be clearer or described in the guide.
(that said, I didn't read the full guide yet, so forgive me if you did if after TrackEntry in the guide)
At first the difference between 'local' animation times and 'global' track times wasn't clear to me just by reading the API. I'm working my way through the guide and jumped into the TrackEntry API as the guide skipped that (would be nice if there could be something about the important TrackEntry though?!). But so far didn't read anything about the difference between animation-related times and track-related times.
Would be an improvement I think if there could be something about that in the guide so at least we know there are two different time 'systems'. Also in relation to delays and timeScale, for one it has an effect on the time and for the other it hasn't. I only knew by trying it out myself and creating my own notes. But for others I'd think it's nice if that would be cleared up in the guide and the difference described better in the API doc.
Also I found the description in the API with animationLast
confusing at first. Not only because it sounds like animationEnd, but mainly because as I believe the word 'apply' was used in the guide for animations to append them to the track. But in the description of animationLast
'apply' is related to the apply() method as I understand now.
The description now says:
The time in seconds this animation was last applied.
I think I would have better/earlier understand it and didn't have this confusion if the line was something like:
The time in seconds the apply()
method of the animation was last called'.
I also don't get, still, why there is a different getter for getting the 'last applied' time in comparisson to the 'animationTime'. I understand now one is the current pointer in time (updated by update()
) and the other one is the time when apply()
is lastly called. But I don't really understand yet why we would like to know when the apply
was last called. To me all these different kinds of times are both very handy and useful as well as confusing at first. Especially because of delay and timeScale affecting some and others not.
Than it's important to get a full grasp of how the system really works, so to me something like a graphic in the guide about this would have been helpful!
[edit] Another thing that keeps confusing me is when the API 'speaks' about 'removing animation from the timeline'. Like on the description of trackEnd
inside TrackEntry, it says:
The track time in seconds when this animation will be removed form the track
But that keeps confusing to me. Eventhough I understand the animation gets removed from the track when done, I would
understand this better without confusing when the focus would be on the ending of the track, rather than the action that follows by that (removing the track), so would be something like
The track time in seconds when this animation is done and so will therefore be removed form the track
Not (yet) sure if this fits all situations though.
Hope this helps!
Nate :Lastly, for a new project you may want to target 4.0, as the Spine Runtimes will be ready and it will come out of beta in a reasonable amount of time. The new graph is a huge improvement and greatly increases animation quality.
Yes, I would very much like to use everything v4 already. I run both v3 and v4-beta in parallel and try to use v4 in my notes. But for runtimes that's a little difficulat as I'm using pixi-spine and it isn't compatible with spine 4 yet. I put a request there though, so hopefully in a while it's available!
Nate :There are API docs for the v4-beta here
Nate :we've added timelines for separate keying of X/Y and RGB/A.
Cool!
And thanks for the info on the forum-links.
Testing:
TrackEntry animationTime
8)