Members
-
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 78
Properties:
Name Type Description blendModes
Object Properties
Name Type Description NORMAL
Number ADD
Number MULTIPLY
Number SCREEN
Number OVERLAY
Number DARKEN
Number LIGHTEN
Number COLOR_DODGE
Number COLOR_BURN
Number HARD_LIGHT
Number SOFT_LIGHT
Number DIFFERENCE
Number EXCLUSION
Number HUE
Number SATURATION
Number COLOR
Number LUMINOSITY
Number -
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.
Methods
-
append(matrix) → {Matrix}
-
Appends the given Matrix to this Matrix.
Parameters:
Name Type Description matrix
Matrix Returns:
Matrix -This matrix. Good for chaining method calls.
- Source - geom/Matrix.js, line 241
-
apply(pos, newPos) → {Point}
-
Get a new position with the current transformation applied. Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering)
Parameters:
Name Type Argument Description pos
Point The origin
newPos
Point <optional>
The point that the new position is assigned to (allowed to be same as input)
Returns:
Point -The new point, transformed through this matrix
- Source - geom/Matrix.js, line 134
-
applyInverse(pos, newPos) → {Point}
-
Get a new position with the inverse of the current transformation applied. Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input)
Parameters:
Name Type Argument Description pos
Point The origin
newPos
Point <optional>
The point that the new position is assigned to (allowed to be same as input)
Returns:
Point -The new point, inverse-transformed through this matrix
- Source - geom/Matrix.js, line 156
-
clone() → {RoundedRectangle}
-
Creates a clone of this Rounded Rectangle
Returns:
a copy of the rounded rectangle
- Source - geom/RoundedRectangle.js, line 60
-
contains(x, y) → {Boolean}
-
Checks whether the x and y coordinates given are contained within this Rounded Rectangle
Parameters:
Name Type Description x
Number The X coordinate of the point to test
y
Number The Y coordinate of the point to test
Returns:
Boolean -Whether the x/y coordinates are within this Rounded Rectangle
- Source - geom/RoundedRectangle.js, line 71
-
fromArray(array)
-
Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows:
a = array[0] b = array[1] c = array[3] d = array[4] tx = array[2] ty = array[5]
Parameters:
Name Type Description array
Array The array that the matrix will be populated from.
- Source - geom/Matrix.js, line 67
-
identity() → {Matrix}
-
Resets this Matix to an identity (default) matrix.
Returns:
Matrix -This matrix. Good for chaining method calls.
- Source - geom/Matrix.js, line 266
-
rotate(angle) → {Matrix}
-
Applies a rotation transformation to the matrix.
Parameters:
Name Type Description angle
Number The angle in radians.
Returns:
Matrix -This matrix. Good for chaining method calls.
- Source - geom/Matrix.js, line 216
-
scale(x, y) → {Matrix}
-
Applies a scale transformation to the matrix.
Parameters:
Name Type Description x
Number The amount to scale horizontally
y
Number The amount to scale vertically
Returns:
Matrix -This matrix. Good for chaining method calls.
- Source - geom/Matrix.js, line 195
-
<internal> sort(group)
-
This method will sort a Groups _hash array based on the sortDirection property.
Each function should return -1 if
a > b
, 1 ifa < b
or 0 ifa === b
.Parameters:
Name Type Description group
Phaser.Group The Group to sort.
- Internal:
- This member is internal (protected) and may be modified or removed in the future.
- Source - physics/arcade/World.js, line 427
-
toArray(transpose) → {Array}
-
Creates an array from the current Matrix object.
Parameters:
Name Type Description transpose
Boolean Whether we need to transpose the matrix or not
Returns:
Array -the newly created array which contains the matrix
- Source - geom/Matrix.js, line 90
-
translate(x, y) → {Matrix}
-
Translates the matrix on the x and y.
Parameters:
Name Type Description x
Number y
Number Returns:
Matrix -This matrix. Good for chaining method calls.
- Source - geom/Matrix.js, line 179
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 2055