mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
There are a bunch of new Phaser consts available to help with setting the angle of a Game Object. They are Phaser.ANGLE_UP
, ANGLE_DOWN
, ANGLE_LEFT
, ANGLE_RIGHT
, ANGLE_NORTH_EAST
, ANGLE_NORTH_WEST
, ANGLE_SOUTH_EAST
and ANGLE_SOUTH_WEST
.
This commit is contained in:
parent
96711f4db9
commit
0da7cf5ffd
3 changed files with 66 additions and 0 deletions
|
@ -344,6 +344,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
|
||||||
* The way the display list updates and Camera movements are handled has been completely revamped, which should result is significantly smoother motion when the Camera is following tweened or physics controlled sprites. The `Stage.postUpdate` function is now vastly reduced in complexity. It takes control over updating the display list (calling `updateTransform` on itself), rather than letting the Canvas or WebGL renderers do this. Because of this change, the `Camera.updateTarget` function uses the Sprites `worldPosition` property instead, which is now frame accurate (thanks @whig @Upperfoot @Whoisnt @hexus #2482)
|
* The way the display list updates and Camera movements are handled has been completely revamped, which should result is significantly smoother motion when the Camera is following tweened or physics controlled sprites. The `Stage.postUpdate` function is now vastly reduced in complexity. It takes control over updating the display list (calling `updateTransform` on itself), rather than letting the Canvas or WebGL renderers do this. Because of this change, the `Camera.updateTarget` function uses the Sprites `worldPosition` property instead, which is now frame accurate (thanks @whig @Upperfoot @Whoisnt @hexus #2482)
|
||||||
* Game Objects including Sprite, Image, Particle, TilemapLayer, Text, BitmapText and TileSprite have a new property called `data`. This is an empty Object that Phaser will never touch internally, but your own code, or Phaser Plugins, can store Game Object specific data within it. This allows you to associate data with a Game Object without having to pollute or change its class shape.
|
* Game Objects including Sprite, Image, Particle, TilemapLayer, Text, BitmapText and TileSprite have a new property called `data`. This is an empty Object that Phaser will never touch internally, but your own code, or Phaser Plugins, can store Game Object specific data within it. This allows you to associate data with a Game Object without having to pollute or change its class shape.
|
||||||
* TilemapLayers will now collide properly when they have a position that isn't set to 0x0. For example if you're stitching together several maps, one after the other, and manually adjust their `scrollX/Y` properties (thanks @Upperfoot #2522)
|
* TilemapLayers will now collide properly when they have a position that isn't set to 0x0. For example if you're stitching together several maps, one after the other, and manually adjust their `scrollX/Y` properties (thanks @Upperfoot #2522)
|
||||||
|
* There are a bunch of new Phaser consts available to help with setting the angle of a Game Object. They are `Phaser.ANGLE_UP`, `ANGLE_DOWN`, `ANGLE_LEFT`, `ANGLE_RIGHT`, `ANGLE_NORTH_EAST`, `ANGLE_NORTH_WEST`, `ANGLE_SOUTH_EAST` and `ANGLE_SOUTH_WEST`.
|
||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
|
|
|
@ -297,6 +297,62 @@ var Phaser = Phaser || {
|
||||||
*/
|
*/
|
||||||
PENDING_ATLAS: -1,
|
PENDING_ATLAS: -1,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Angle (in degrees) a Game Object needs to be set to in order to face up.
|
||||||
|
* @constant
|
||||||
|
* @type {integer}
|
||||||
|
*/
|
||||||
|
ANGLE_UP: 270,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Angle (in degrees) a Game Object needs to be set to in order to face down.
|
||||||
|
* @constant
|
||||||
|
* @type {integer}
|
||||||
|
*/
|
||||||
|
ANGLE_DOWN: 90,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Angle (in degrees) a Game Object needs to be set to in order to face left.
|
||||||
|
* @constant
|
||||||
|
* @type {integer}
|
||||||
|
*/
|
||||||
|
ANGLE_LEFT: 180,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Angle (in degrees) a Game Object needs to be set to in order to face right.
|
||||||
|
* @constant
|
||||||
|
* @type {integer}
|
||||||
|
*/
|
||||||
|
ANGLE_RIGHT: 0,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Angle (in degrees) a Game Object needs to be set to in order to face north east.
|
||||||
|
* @constant
|
||||||
|
* @type {integer}
|
||||||
|
*/
|
||||||
|
ANGLE_NORTH_EAST: 315,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Angle (in degrees) a Game Object needs to be set to in order to face north west.
|
||||||
|
* @constant
|
||||||
|
* @type {integer}
|
||||||
|
*/
|
||||||
|
ANGLE_NORTH_WEST: 225,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Angle (in degrees) a Game Object needs to be set to in order to face south east.
|
||||||
|
* @constant
|
||||||
|
* @type {integer}
|
||||||
|
*/
|
||||||
|
ANGLE_SOUTH_EAST: 45,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Angle (in degrees) a Game Object needs to be set to in order to face south west.
|
||||||
|
* @constant
|
||||||
|
* @type {integer}
|
||||||
|
*/
|
||||||
|
ANGLE_SOUTH_WEST: 135,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Various blend modes supported by Pixi.
|
* Various blend modes supported by Pixi.
|
||||||
*
|
*
|
||||||
|
|
9
typescript/phaser.d.ts
vendored
9
typescript/phaser.d.ts
vendored
|
@ -53,6 +53,15 @@ declare module "phaser" {
|
||||||
static UP: number;
|
static UP: number;
|
||||||
static DOWN: number;
|
static DOWN: number;
|
||||||
|
|
||||||
|
static ANGLE_UP: number;
|
||||||
|
static ANGLE_DOWN: number;
|
||||||
|
static ANGLE_LEFT: number;
|
||||||
|
static ANGLE_RIGHT: number;
|
||||||
|
static ANGLE_NORTH_EAST: number;
|
||||||
|
static ANGLE_NORTH_WEST: number;
|
||||||
|
static ANGLE_SOUTH_EAST: number;
|
||||||
|
static ANGLE_SOUTH_WEST: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export module Phaser {
|
export module Phaser {
|
||||||
|
|
Loading…
Reference in a new issue