Jump to content

[Utility] Phaser Craft .


webcaetano
 Share

Recommended Posts

Hello everyone. I've create this plugin for Phaser, to make phaser more chainable.
The first stable version was created in January (2016) ,But i didn't have time to spread since.

I have used this class in over 30+ of my private projects.
And i experienced a great boost and well organized code on developing.

https://github.com/webcaetano/craft 

Examples :


Phaser vanilla.

var sprite = game.add.sprite(0,0,'phaser-dude');
sprite.x = 100;
sprite.y = 100;
sprite.anchor.setTo(0.5,0.5);
sprite.tint = 0xFF0000;

same code in Craft :
 

var sprite = craft.$sprite('phaser-dude')
.$set({
  x:100,
  y:100
})
.$mid()
.$tint('#FF0000');

// phaser vanilla still works
sprite.x = 200;

The plugin are exported in UMD that means it work in global variable, ES6, webpack, browserify.
Craft are developed in ES6 and build using Gulp. Be welcome to contribute and be part of this.

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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