Added the following new constants: Phaser.TOP_LEFT, Phaser.TOP_CENTER, Phaser.TOP_RIGHT, Phaser.MIDDLE_LEFT, Phaser.MIDDLE_CENTER, Phaser.MIDDLE_RIGHT, Phaser.BOTTOM_LEFT, Phaser.BOTTOM_CENTER and Phaser.BOTTOM_RIGHT.

This commit is contained in:
Richard Davey 2016-06-15 23:37:48 +01:00
parent 32cf1f1a9c
commit 64a44aab17
3 changed files with 74 additions and 0 deletions

View file

@ -365,6 +365,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
* BitmapData.smoothProperty is a new property that holds the string based prefix needed to set image scaling on the BitmapData context.
* BitmapData.copyTransform allows you to draw a Game Object to the BitmapData, using its `worldTransform` property to control the location, scaling and rotation of the object. You can optionally provide
* BitmapData.drawGroup now uses the new `copyTransform` method, to provide for far more accurate results. Previously nested Game Objects wouldn't render correctly, nor would Sprites added via `addChild` to another Sprite. BitmapText objects also rendered without rotation taken into account, and the Sprites smoothing property was ignored. All of these things are now covered by the new drawGroup method, which also handles full deep iteration down the display list.
* Added the following new constants: `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.MIDDLE_LEFT`, `Phaser.MIDDLE_CENTER`, `Phaser.MIDDLE_RIGHT`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.
### Updates

View file

@ -381,6 +381,69 @@ var Phaser = Phaser || {
*/
ANGLE_SOUTH_WEST: 135,
/**
* A constant representing a top-left alignment or position.
* @constant
* @type {integer}
*/
TOP_LEFT: 50,
/**
* A constant representing a top-center alignment or position.
* @constant
* @type {integer}
*/
TOP_CENTER: 51,
/**
* A constant representing a top-right alignment or position.
* @constant
* @type {integer}
*/
TOP_RIGHT: 52,
/**
* A constant representing a middle-left alignment or position.
* @constant
* @type {integer}
*/
MIDDLE_LEFT: 53,
/**
* A constant representing a middle-center alignment or position.
* @constant
* @type {integer}
*/
MIDDLE_CENTER: 54,
/**
* A constant representing a middle-right alignment or position.
* @constant
* @type {integer}
*/
MIDDLE_RIGHT: 55,
/**
* A constant representing a bottom-left alignment or position.
* @constant
* @type {integer}
*/
BOTTOM_LEFT: 56,
/**
* A constant representing a bottom-center alignment or position.
* @constant
* @type {integer}
*/
BOTTOM_CENTER: 57,
/**
* A constant representing a bottom-right alignment or position.
* @constant
* @type {integer}
*/
BOTTOM_RIGHT: 58,
/**
* Various blend modes supported by Pixi.
*

View file

@ -67,6 +67,16 @@ declare module "phaser" {
static ANGLE_SOUTH_EAST: number;
static ANGLE_SOUTH_WEST: number;
static TOP_LEFT: number;
static TOP_CENTER: number;
static TOP_RIGHT: number;
static MIDDLE_LEFT: number;
static MIDDLE_CENTER: number;
static MIDDLE_RIGHT: number;
static BOTTOM_LEFT: number;
static BOTTOM_CENTER: number;
static BOTTOM_RIGHT: number;
}
export module Phaser {