Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
State transition plugin for Phaser.js
JavaScript HTML
branch: master

DEPRECATED FOR NOW As an alternative, the best fork out there it's this one

State Transition Plugin for Phaser

Plugin for phaser.js( v 2.0.*


Currently the switch between states is really static and a game should be able to transition between states. Therefore, this plugin does exactly that: draws the into a renderTexture which is rendered on a sprite, and finally it's tweening that sprite. source: src/phaser-state-transition.js build(minified): build/phaser-state-transition.min.js


Take a look inside demo folder. It's pretty straight forward. The easiest way is to add the plugin into your game, keep a reference to it, and call:

//add the plugin
var transitionPlugin = game.plugins.add(Phaser.Plugin.StateTransition);

//define new properties to be tweened, duration, even ease

    //how long the animation should take
    duration: 1000,

    //ease property
    ease: Phaser.Easing.Exponential.InOut, /* default ease */

    //what property should be tweened
    properties: {
        alpha: 0,
        scale: {
            x: 1.5,
            y: 1.5

//and later on"yourStateName");


If there's something you think it could be improved let me know, or create a pr.

Something went wrong with that request. Please try again.