Members
-
<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.
- Source - Phaser.js, line 381
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> BUTTON :integer
-
Game Object type.
-
<constant> CANVAS :integer
-
Canvas Renderer.
-
<constant> CANVAS_FILTER :integer
-
Game Object type.
-
<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> IMAGE :integer
-
Game Object type.
-
<constant> LEFT :integer
-
Direction constant.
-
<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> RECTANGLE :integer
-
Game Object type.
-
<constant> RENDERTEXTURE :integer
-
Game Object type.
-
<constant> RETROFONT :integer
-
Game Object type.
-
<constant> RIGHT :integer
-
Direction constant.
-
<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.
-
<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> UP :integer
-
Direction constant.
-
<constant> VERSION :string
-
The Phaser version number.
-
<constant> VIDEO :integer
-
Game Object type.
-
<constant> WEBGL :integer
-
WebGL Renderer.
-
<constant> WEBGL_FILTER :integer
-
Game Object type.
Methods
-
intersectsRectangle(line, rect) → {boolean}
-
Checks for intersection between the Line and a Rectangle shape, or a rectangle-like object, with public
x
,y
,right
andbottom
properties, such as a Sprite or Body.An intersection is considered valid if:
The line starts within, or ends within, the Rectangle. The line segment intersects one of the 4 rectangle edges.
The for the purposes of this function rectangles are considered 'solid'.
Parameters:
Name Type Description line
Phaser.Line The line to check for intersection with.
rect
Phaser.Rectangle | object The rectangle, or rectangle-like object, to check for intersection with.
Returns:
boolean -True if the line intersects with the rectangle edges, or starts or ends within the rectangle.
- Source - geom/Line.js, line 630
Type Definitions
-
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.
- Source - core/Group.js, line 2372