Class: global
Constructor
Public Properties
- Source code: Phaser.js (Line 499)
- Source code: Phaser.js (Line 532)
<constant> ANGLE_DOWN : integer
The Angle (in degrees) a Game Object needs to be set to in order to face down.
<constant> ANGLE_LEFT : integer
The Angle (in degrees) a Game Object needs to be set to in order to face left.
<constant> ANGLE_NORTH_EAST : integer
The Angle (in degrees) a Game Object needs to be set to in order to face north east.
<constant> ANGLE_NORTH_WEST : integer
The Angle (in degrees) a Game Object needs to be set to in order to face north west.
<constant> ANGLE_RIGHT : integer
The Angle (in degrees) a Game Object needs to be set to in order to face right.
<constant> ANGLE_SOUTH_EAST : integer
The Angle (in degrees) a Game Object needs to be set to in order to face south east.
<constant> ANGLE_SOUTH_WEST : integer
The Angle (in degrees) a Game Object needs to be set to in order to face south west.
<constant> ANGLE_UP : integer
The Angle (in degrees) a Game Object needs to be set to in order to face up.
<constant> AUTO : integer
AUTO renderer - picks between WebGL or Canvas based on device.
<constant> BITMAPDATA : integer
Game Object type.
<constant> BITMAPTEXT : integer
Game Object type.
<constant> blendModes
Various blend modes supported by Pixi.
IMPORTANT: The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes.
Properties:
Name | Type | Description |
---|---|---|
blendModes.NORMAL | Number | |
blendModes.ADD | Number | |
blendModes.MULTIPLY | Number | |
blendModes.SCREEN | Number | |
blendModes.OVERLAY | Number | |
blendModes.DARKEN | Number | |
blendModes.LIGHTEN | Number | |
blendModes.COLOR_DODGE | Number | |
blendModes.COLOR_BURN | Number | |
blendModes.HARD_LIGHT | Number | |
blendModes.SOFT_LIGHT | Number | |
blendModes.DIFFERENCE | Number | |
blendModes.EXCLUSION | Number | |
blendModes.HUE | Number | |
blendModes.SATURATION | Number | |
blendModes.COLOR | Number | |
blendModes.LUMINOSITY | Number |
<constant> BOTTOM_CENTER : integer
A constant representing a bottom-center alignment or position.
<constant> BOTTOM_LEFT : integer
A constant representing a bottom-left alignment or position.
<constant> BOTTOM_RIGHT : integer
A constant representing a bottom-right alignment or position.
<constant> BUTTON : integer
Game Object type.
<constant> CANVAS : integer
Canvas Renderer.
<constant> CANVAS_FILTER : integer
Game Object type.
<constant> CENTER : integer
A constant representing a center alignment or position.
<constant> CIRCLE : integer
Game Object type.
<constant> CREATURE : integer
Game Object type.
<constant> DOWN : integer
Direction constant.
<constant> ELLIPSE : integer
Game Object type.
<constant> EMITTER : integer
Game Object type.
<constant> GAMES :array
An array of Phaser game instances.
<constant> GRAPHICS : integer
Game Object type.
<constant> GROUP : integer
Game Object type.
<constant> HEADLESS : integer
Headless renderer (not visual output)
<constant> HORIZONTAL : integer
A horizontal orientation
<constant> IMAGE : integer
Game Object type.
<constant> LANDSCAPE : integer
A landscape orientation
<constant> LEFT : integer
Direction constant.
<constant> LEFT_BOTTOM : integer
A constant representing a left-bottom alignment or position.
<constant> LEFT_CENTER : integer
A constant representing a left-center alignment or position.
<constant> LEFT_TOP : integer
A constant representing a left-top alignment or position.
<constant> LINE : integer
Game Object type.
<constant> MATRIX : integer
Game Object type.
<constant> NONE : integer
Direction constant.
<constant> PENDING_ATLAS : integer
Game Object type.
<constant> POINT : integer
Game Object type.
<constant> POINTER : integer
Game Object type.
<constant> POLYGON : integer
Game Object type.
<constant> PORTRAIT : integer
A portrait orientation
<constant> RECTANGLE : integer
Game Object type.
<constant> RENDERTEXTURE : integer
Game Object type.
<constant> RETROFONT : integer
Game Object type.
<constant> RIGHT : integer
Direction constant.
<constant> RIGHT_BOTTOM : integer
A constant representing a right-bottom alignment or position.
<constant> RIGHT_CENTER : integer
A constant representing a right-center alignment or position.
<constant> RIGHT_TOP : integer
A constant representing a right-top alignment or position.
<constant> ROPE : integer
Game Object type.
<constant> ROUNDEDRECTANGLE : integer
Game Object type.
<constant> scaleModes
The scale modes that are supported by Pixi.
The DEFAULT scale mode affects the default scaling mode of future operations.
It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.
Properties:
Name | Type | Default | Description |
---|---|---|---|
Phaser.scaleModes | Object | ||
scaleModes.DEFAULT | Number | LINEAR | |
scaleModes.LINEAR | Number | Smooth scaling | |
scaleModes.NEAREST | Number | Pixelating scaling |
<constant> SPRITE : integer
Game Object type.
<constant> SPRITEBATCH : integer
Game Object type.
<constant> TEXT : integer
Game Object type.
<constant> TILEMAP : integer
Game Object type.
<constant> TILEMAPLAYER : integer
Game Object type.
<constant> TILESPRITE : integer
Game Object type.
<constant> TOP_CENTER : integer
A constant representing a top-center alignment or position.
<constant> TOP_LEFT : integer
A constant representing a top-left alignment or position.
<constant> TOP_RIGHT : integer
A constant representing a top-right alignment or position.
<constant> UP : integer
Direction constant.
<constant> VERSION : string
The Phaser version number.
<constant> VERTICAL : integer
A vertical orientation
<constant> VIDEO : integer
Game Object type.
<constant> WEBGL : integer
WebGL Renderer.
<constant> WEBGL_FILTER : integer
Game Object type.
Public Methods
- Source code: utils/Debug.js (Line 844)
- Source code: plugins/path/EventTarget.js (Line 54)
- Source code: plugins/path/EventTarget.js (Line 41)
- Source code: plugins/path/EventTarget.js (Line 34)
- Source code: plugins/path/EventTarget.js (Line 143)
- Source code: plugins/path/EventTarget.js (Line 107)
- Source code: plugins/path/EventTarget.js (Line 124)
- Source code: plugins/path/Path.js (Line 536)
- Source code: plugins/path/EventTarget.js (Line 173)
- Source code: plugins/path/EventTarget.js (Line 277)
- Source code: plugins/path/EventTarget.js (Line 268)
displayList(displayObject)
Call this function from the Dev Tools console.
It will scan the display list and output all of the Objects it finds, and their renderOrderIDs.
Note Requires a browser that supports console.group and console.groupEnd (such as Chrome)
Parameters
Name | Type | Argument | Description |
---|---|---|---|
displayObject | Object | <optional> | The displayObject level display object to start from. Defaults to the World. |
emit(eventName) → {Boolean}
Emit an event to all registered event listeners.
Parameters
Name | Type | Description |
---|---|---|
eventName | String | The name of the event. |
Returns
Indication if we've emitted an event.
listeners(eventName) → {Array}
Return a list of assigned event listeners.
Parameters
Name | Type | Description |
---|---|---|
eventName | String | The events that should be listed. |
Returns
An array of listener functions
mixin(object)
Mixes in the properties of the EventTarget prototype onto another object
Parameters
Name | Type | Description |
---|---|---|
object | Object | The obj to mix into |
off(eventName, callback)
Remove event listeners.
Parameters
Name | Type | Description |
---|---|---|
eventName | String | The event we want to remove. |
callback | function | The listener that we need to find. |
on(eventName, callback)
Register a new EventListener for the given event.
Parameters
Name | Type | Description |
---|---|---|
eventName | String | Name of the event. |
callback | Functon | fn Callback function. |
once(eventName, callback)
Add an EventListener that's only called once.
Parameters
Name | Type | Description |
---|---|---|
eventName | String | Name of the event. |
callback | function | Callback function. |
Phaser.Path#numPoints return {number} The total number of PathPoints in this Path.()
The total number of PathPoints in this Path.
removeAllListeners(eventName)
Remove all listeners or only the listeners for the specified event.
Parameters
Name | Type | Description |
---|---|---|
eventName | String | The event you want to remove all listeners for. |
stopImmediatePropagation()
Stops the propagation of events to sibling listeners (no longer calls any listeners).
stopPropagation()
Stops the propagation of events up the scene graph (prevents bubbling).
Type Definitions
- Source code: core/Group.js (Line 2958)
DisplayObject
A display object is any object that can be rendered in the Phaser/pixi.js scene graph.
This includes Phaser.Group (groups are display objects!),
Phaser.Sprite, Phaser.Button, Phaser.Text
as well as PIXI.DisplayObject and all derived types.
© 2016 Richard Davey, Photon Storm Ltd.
Licensed under the MIT License.
http://phaser.io/docs/2.6.2/global.html