Skip to main content

News

Topic: [Script] Tweens (Read 13506 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: [Script] Tweens
Reply #15
Yes, my isFinished() method is implemented to return true if elapsed >= duration.  When I was using yours though, it didn't have a method like that so I had to check against the actual value, which revealed the aforementioned bug.  You do have that onComplete option, but that's very unwieldy to use in a lot of situations, hence my redesign.

And yes, the easing functions are what's doing most of the work, haha.  I actually found more of those in the jQuery Easing Plugin project and incorporated them into my version: Bounce, Elastic and Back (that last one is neat--it purposely overshoots, then backs up).
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: [Script] Tweens
Reply #16

I also think of timelines, but will not do anything in this direction until I really need it. That would also require some refactoring in the tween.js I think.


Just thought you might like to know Metallix, the latest versions of Scenario have a tween command built in. So if you needed to do timelines for animation, you can just use that. I'm already milking it for all it's worth in Spectacles. :)
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: [Script] Tweens
Reply #17
Very cool! A real project is actually the best way to test the tweens :) Milk it! ^^