- Added scale, rotate and move anchor gizmos
- Hold down shift key to maintain aspect ratio while re-sizing an object
- Hold down ctrl key to increase object’s size by 10% while re-sizing an object or to change an angle by 15 degrees while rotating an object
- Now you can drag an image or a file right into the folder
- Added viewport width/height – now you can see bounds right on the map editor
A bit older updates:
Source editor
Source editor comes with:
- Basic autocomplete – for common javascript keywords and Phaser static members (e.g. constants)
- jshint – so errors and typos can be cought earlier
- Basic game template
Physics
Physics is enabled by clicking on object and selecting “physics” tab from right panel. See red mark in image. You can see overview of physics objects and their bodies by selecting physics icon from left toolbar.
User data
Now you can add key/value pairs to the Asset or Object. Sprites will inherit user data from asset – it is useful if you want to create multiple objects from a single sprite in other words – use the asset as a template for multiple sprites. You can access the user data from game in the following way:
// create predefined sprite var mySprite = mt.create("mySprite"); // get editor data from sprite var data = mySprite.getData(); // get userData var myData = data.userData;
Just remember that the editor data and user data are shared between sprites. e.g.
// create sprite var mySprite1 = mt.create("mySprite"); // create same sprite again var mySprite2 = mt.create("mySprite"); mySprite1.getData() == mySprite2.getData() // true