Skip to content

Commit 64a44aa

Browse files
committed
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.
1 parent 32cf1f1 commit 64a44aa

3 files changed

Lines changed: 74 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
365365
* BitmapData.smoothProperty is a new property that holds the string based prefix needed to set image scaling on the BitmapData context.
366366
* 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
367367
* 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.
368+
* 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`.
368369

369370
### Updates
370371

src/Phaser.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,69 @@ var Phaser = Phaser || {
381381
*/
382382
ANGLE_SOUTH_WEST: 135,
383383

384+
/**
385+
* A constant representing a top-left alignment or position.
386+
* @constant
387+
* @type {integer}
388+
*/
389+
TOP_LEFT: 50,
390+
391+
/**
392+
* A constant representing a top-center alignment or position.
393+
* @constant
394+
* @type {integer}
395+
*/
396+
TOP_CENTER: 51,
397+
398+
/**
399+
* A constant representing a top-right alignment or position.
400+
* @constant
401+
* @type {integer}
402+
*/
403+
TOP_RIGHT: 52,
404+
405+
/**
406+
* A constant representing a middle-left alignment or position.
407+
* @constant
408+
* @type {integer}
409+
*/
410+
MIDDLE_LEFT: 53,
411+
412+
/**
413+
* A constant representing a middle-center alignment or position.
414+
* @constant
415+
* @type {integer}
416+
*/
417+
MIDDLE_CENTER: 54,
418+
419+
/**
420+
* A constant representing a middle-right alignment or position.
421+
* @constant
422+
* @type {integer}
423+
*/
424+
MIDDLE_RIGHT: 55,
425+
426+
/**
427+
* A constant representing a bottom-left alignment or position.
428+
* @constant
429+
* @type {integer}
430+
*/
431+
BOTTOM_LEFT: 56,
432+
433+
/**
434+
* A constant representing a bottom-center alignment or position.
435+
* @constant
436+
* @type {integer}
437+
*/
438+
BOTTOM_CENTER: 57,
439+
440+
/**
441+
* A constant representing a bottom-right alignment or position.
442+
* @constant
443+
* @type {integer}
444+
*/
445+
BOTTOM_RIGHT: 58,
446+
384447
/**
385448
* Various blend modes supported by Pixi.
386449
*

typescript/phaser.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ declare module "phaser" {
6767
static ANGLE_SOUTH_EAST: number;
6868
static ANGLE_SOUTH_WEST: number;
6969

70+
static TOP_LEFT: number;
71+
static TOP_CENTER: number;
72+
static TOP_RIGHT: number;
73+
static MIDDLE_LEFT: number;
74+
static MIDDLE_CENTER: number;
75+
static MIDDLE_RIGHT: number;
76+
static BOTTOM_LEFT: number;
77+
static BOTTOM_CENTER: number;
78+
static BOTTOM_RIGHT: number;
79+
7080
}
7181

7282
export module Phaser {

0 commit comments

Comments
 (0)