Jump to content

Phaser easing effects - List


Sam
 Share

Recommended Posts

Maybe I'm blind ;) but is there anywhere a list of available easing effect of Phaser?
such like:
 

game.add.tween(this.pauseMenuBTNcancel).to({y:game.height - 200},0, Phaser.Easing.Bounce.Out, true);

cheers ;)

Link to comment
Share on other sites

  • 4 weeks later...

Easing doesn't work like that. All easing does is change how a value is changed over time, it doesn't actually matter what value you apply it to. You could easily apply say a Quadratic.InOut to the angle value of a sprite and get it to smoothly start rotating, then slow down gradually to a stop.

var ball = game.add.sprite(game.world.centerX, game.world.centerY, 'ball');// This will make the ball turn upside down over 3 seconds, gradually speeding up and then slowing down againgame.add.tween(ball).to({angle: 180}, 3000, Phaser.Easing.Quadratic.InOut, true);
Link to comment
Share on other sites

  • 5 months later...

I was going threw the phaser examples and I saw 

game.add.tween(text).to( { alpha: 1 }, 2000, "Linear", true); 

When try to use it Phaser gives me an error for  "Linear"  string. Since small investigation I found this in the docs. It contains all the

easings, so the correct code was  

game.add.tween(text).to( { alpha: 1 }, 2000, Phaser.Easing.Linear.None, true); 

Hope this is helpfull

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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