collinhover / impactplusplus

Impact++ is a collection of additions to ImpactJS with full featured physics, dynamic lighting, UI, abilities, and more.
http://collinhover.github.com/impactplusplus
MIT License
276 stars 59 forks source link

Work with TWEENS tutoral #174

Closed z4kk closed 9 years ago

z4kk commented 10 years ago

Hi? Where I can find tutorial or examples with TWEENS? Is Impact++ Tween chainable?

collinhover commented 9 years ago

@z4kk wow for some reason I was never notified of this issue, sorry! There are no examples of tweens in Impact++, but it is basically the TWEEN.JS library wrapped: https://github.com/sole/tween.js/

There are some built in tweening functions that you can use: Entity.tween - https://github.com/collinhover/impactplusplus/blob/master/lib/plusplus/core/entity.js#L3396 Entity.moveTo - https://github.com/collinhover/impactplusplus/blob/master/lib/plusplus/core/entity.js#L3505 Entity.fadeTo - https://github.com/collinhover/impactplusplus/blob/master/lib/plusplus/core/entity.js#L3304 Entity.fadeToDeath - https://github.com/collinhover/impactplusplus/blob/master/lib/plusplus/core/entity.js#L3364 Entity.tweenEnd - https://github.com/collinhover/impactplusplus/blob/master/lib/plusplus/core/entity.js#L3447

At the moment the whole tweening system is not chainable and is very primitive.