Jump to content

Tweening the scale factor


Recommended Posts

Have a look at: http://jsfiddle.net/J3gdX/5/


That example tweens 'sprite.scale.x' and 'sprite.scale.y' if you hover over the button.


Since the tweening functionality in Phaser does not support to use property paths (like 'scale.x') you have to explicitly create a tween for the object 'sprite.scale' and then tell the tween to change the properties 'x' and 'y' in it. If you want to change properties in the sprite as well just use a second tween for that.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...