Skip to content

jdnichollsc/Phaser-Rotate-Sprite-Extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rotate Sprite Extension for Phaser Framework

Rotate Sprite Extension

Demo

Do you want to see this extension in action? Visit http://codepen.io/jdnichollsc/full/PGWQVd/ yay!

Full Example

var game = new Phaser.Game(w, h, Phaser.AUTO, '', {
    //...
    preload: function(){
      this.game.load.image('ionPhaser', ionPhaserUrl);
      this.game.load.image('rotate', rotateUrl);
    },
    create: function(){
      this.sprite = new Phaser.Extension.RotateSprite(this.game, this.game.world.centerX, this.game.world.centerY, 'ionPhaser');
    }
    //...
});

Other Projects

Happy scrolling

Made with <3