# functions

longname: Phaser.GameObjects.Components.Transform-getParentRotation
since: 3.18.0
name: getParentRotation
memberof: Phaser.GameObjects.Components.Transform
scope: instance
returnstype: number
returnsdescription: The sum total rotation, in radians, of all parent containers of this Game Object.
metafilename: Transform.js
metapath: gameobjects/components
description:
Gets the sum total rotation of all of this Game Objects parent Containers.

The returned value is in radians and will be zero if this Game Object has no parent container.


longname: Phaser.GameObjects.Components.TransformMatrix-multiply
since: 3.0.0
name: multiply
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
returnstype: Phaser.GameObjects.Components.TransformMatrix|Phaser.GameObjects.Components.TransformMatrix
returnsdescription: Either this TransformMatrix, or the `out` Matrix, if given in the arguments.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Multiply this Matrix by the given Matrix.

If an `out` Matrix is given then the results will be stored in it.
If it is not given, this matrix will be updated in place instead.
Use an `out` Matrix if you do not wish to mutate this matrix.

signature:
rhs:Phaser.GameObjects.Components.TransformMatrix,out?:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Components.TransformMatrix-multiplyWithOffset
since: 3.11.0
name: multiplyWithOffset
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: src:Phaser.GameObjects.Components.TransformMatrix,offsetX:number,offsetY:number
returnstype: Phaser.GameObjects.Components.TransformMatrix
returnsdescription: This TransformMatrix.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Multiply this Matrix by the matrix given, including the offset.

The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.
The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.


longname: Phaser.GameObjects.Components.TransformMatrix-copyFromArray
since: 3.11.0
name: copyFromArray
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: src:array
returnstype: Phaser.GameObjects.Components.TransformMatrix
returnsdescription: This TransformMatrix.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Set the values of this Matrix to copy those of the array given.
Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.


longname: Phaser.GameObjects.Components.TransformMatrix-copyToContext
since: 3.12.0
name: copyToContext
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: ctx:CanvasRenderingContext2D
returnstype: CanvasRenderingContext2D
returnsdescription: The Canvas Rendering Context.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Copy the values from this Matrix to the given Canvas Rendering Context.
This will use the Context.transform method.


longname: Phaser.GameObjects.Components.TransformMatrix-setToContext
since: 3.12.0
name: setToContext
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: ctx:CanvasRenderingContext2D
returnstype: CanvasRenderingContext2D
returnsdescription: The Canvas Rendering Context.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Copy the values from this Matrix to the given Canvas Rendering Context.
This will use the Context.setTransform method.


longname: Phaser.GameObjects.Components.TransformMatrix-copyToArray
since: 3.12.0
name: copyToArray
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: out?:array
returnstype: array
returnsdescription: An array where elements 0 to 5 contain the values from this matrix.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Copy the values in this Matrix to the array given.

Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.


longname: Phaser.GameObjects.Components.TransformMatrix-decomposeMatrix
since: 3.0.0
name: decomposeMatrix
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
returnstype: object
returnsdescription: The decomposed Matrix.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Decompose this Matrix into its translation, scale and rotation values using QR decomposition.

The result must be applied in the following order to reproduce the current matrix:

translate -> rotate -> scale


longname: Phaser.GameObjects.Components.TransformMatrix-applyInverse
since: 3.12.0
name: applyInverse
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: x:number,y:number,output?:Phaser.Math.Vector2
returnstype: Phaser.Math.Vector2
returnsdescription: The coordinates, inverse-transformed through this matrix.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of
the current matrix with its transformation applied.

Can be used to translate points from world to local space.


longname: Phaser.GameObjects.Components.TransformMatrix-getX
since: 3.12.0
name: getX
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: x:number,y:number
returnstype: number
returnsdescription: The calculated x value.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Returns the X component of this matrix multiplied by the given values.
This is the same as `x * a + y * c + e`.


longname: Phaser.GameObjects.Components.TransformMatrix-getY
since: 3.12.0
name: getY
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: x:number,y:number
returnstype: number
returnsdescription: The calculated y value.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Returns the Y component of this matrix multiplied by the given values.
This is the same as `x * b + y * d + f`.


longname: Phaser.GameObjects.Components.TransformMatrix-getXRound
since: 3.50.0
name: getXRound
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: x:number,y:number,round?:boolean
returnstype: number
returnsdescription: The calculated x value.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Returns the X component of this matrix multiplied by the given values.

This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.


longname: Phaser.GameObjects.Components.TransformMatrix-getYRound
since: 3.50.0
name: getYRound
memberof: Phaser.GameObjects.Components.TransformMatrix
scope: instance
signature: x:number,y:number,round?:boolean
returnstype: number
returnsdescription: The calculated y value.
metafilename: TransformMatrix.js
metapath: gameobjects/components
description:
Returns the Y component of this matrix multiplied by the given values.

This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.


longname: Phaser.GameObjects.Components.Visible-setVisible
since: 3.0.0
name: setVisible
memberof: Phaser.GameObjects.Components.Visible
scope: instance
signature: value:boolean
returnstype: Phaser.GameObjects.Components.Visible
returnsdescription: This Game Object instance.
metafilename: Visible.js
metapath: gameobjects/components
description:
Sets the visibility of this Game Object.

An invisible Game Object will skip rendering, but will still process update logic.


longname: Phaser.GameObjects.Container-getBounds
since: 3.4.0
name: getBounds
memberof: Phaser.GameObjects.Container
scope: instance
signature: output?:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The values stored in the output object.
metafilename: Container.js
metapath: gameobjects/container
description:
Gets the bounds of this Container. It works by iterating all children of the Container,
getting their respective bounds, and then working out a min-max rectangle from that.
It does not factor in if the children render or not, all are included.

Some children are unable to return their bounds, such as Graphics objects, in which case
they are skipped.

Depending on the quantity of children in this Container it could be a really expensive call,
so cache it and only poll it as needed.

The values are stored and returned in a Rectangle object.


longname: Phaser.GameObjects.Container-pointToContainer
since: 3.4.0
name: pointToContainer
memberof: Phaser.GameObjects.Container
scope: instance
returnstype: object|Phaser.Geom.Point|Phaser.Math.Vector2
returnsdescription: The transformed point.
metafilename: Container.js
metapath: gameobjects/container
description:
Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,
and transforms it into the space of this Container, then returns it in the output object.

signature:
source:object|Phaser.Geom.Point|Phaser.Math.Vector2,output?:object|Phaser.Geom.Point|Phaser.Math.Vector2


longname: Phaser.GameObjects.Container-getBoundsTransformMatrix
since: 3.4.0
name: getBoundsTransformMatrix
memberof: Phaser.GameObjects.Container
scope: instance
returnstype: Phaser.GameObjects.Components.TransformMatrix
returnsdescription: The world transform matrix.
metafilename: Container.js
metapath: gameobjects/container
description:
Returns the world transform matrix as used for Bounds checks.

The returned matrix is temporal and shouldn't be stored.


longname: Phaser.GameObjects.Container-add
since: 3.4.0
name: add
memberof: Phaser.GameObjects.Container
scope: instance
signature: child:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Adds the given Game Object, or array of Game Objects, to this Container.

Each Game Object must be unique within the Container.


longname: Phaser.GameObjects.Container-addAt
since: 3.4.0
name: addAt
memberof: Phaser.GameObjects.Container
scope: instance
signature: child:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>,index?:number
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Adds the given Game Object, or array of Game Objects, to this Container at the specified position.

Existing Game Objects in the Container are shifted up.

Each Game Object must be unique within the Container.


longname: Phaser.GameObjects.Container-sort
since: 3.4.0
name: sort
memberof: Phaser.GameObjects.Container
scope: instance
signature: property:string,handler?:function
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Sort the contents of this Container so the items are in order based on the given property.
For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.


longname: Phaser.GameObjects.Container-getByName
since: 3.4.0
name: getByName
memberof: Phaser.GameObjects.Container
scope: instance
signature: name:string
returnstype: Phaser.GameObjects.GameObject
returnsdescription: The first child with a matching name, or `null` if none were found.
metafilename: Container.js
metapath: gameobjects/container
description:
Searches for the first instance of a child with its `name` property matching the given argument.
Should more than one child have the same name only the first is returned.


longname: Phaser.GameObjects.Container-getFirst
since: 3.4.0
name: getFirst
memberof: Phaser.GameObjects.Container
scope: instance
signature: property:string,value:*,startIndex?:number,endIndex?:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: The first matching Game Object, or `null` if none was found.
metafilename: Container.js
metapath: gameobjects/container
description:
Gets the first Game Object in this Container.

You can also specify a property and value to search for, in which case it will return the first
Game Object in this Container with a matching property and / or value.

For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.

You can limit the search to the `startIndex` - `endIndex` range.


longname: Phaser.GameObjects.Container-getAll
since: 3.4.0
name: getAll
memberof: Phaser.GameObjects.Container
scope: instance
signature: property?:string,value?:any,startIndex?:number,endIndex?:number
returnstype: Array.<Phaser.GameObjects.GameObject>
returnsdescription: An array of matching Game Objects from this Container.
metafilename: Container.js
metapath: gameobjects/container
description:
Returns all Game Objects in this Container.

You can optionally specify a matching criteria using the `property` and `value` arguments.

For example: `getAll('body')` would return only Game Objects that have a body property.

You can also specify a value to compare the property to:

`getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.

Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,
and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only
the first 50 Game Objects.


longname: Phaser.GameObjects.Container-count
since: 3.4.0
name: count
memberof: Phaser.GameObjects.Container
scope: instance
signature: property:string,value:any,startIndex?:number,endIndex?:number
returnstype: number
returnsdescription: The total number of Game Objects in this Container with a property matching the given value.
metafilename: Container.js
metapath: gameobjects/container
description:
Returns the total number of Game Objects in this Container that have a property
matching the given value.

For example: `count('visible', true)` would count all the elements that have their visible property set.

You can optionally limit the operation to the `startIndex` - `endIndex` range.


longname: Phaser.GameObjects.Container-swap
since: 3.4.0
name: swap
memberof: Phaser.GameObjects.Container
scope: instance
signature: child1:Phaser.GameObjects.GameObject,child2:Phaser.GameObjects.GameObject
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Swaps the position of two Game Objects in this Container.
Both Game Objects must belong to this Container.


longname: Phaser.GameObjects.Container-moveTo
since: 3.4.0
name: moveTo
memberof: Phaser.GameObjects.Container
scope: instance
signature: child:Phaser.GameObjects.GameObject,index:number
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Moves a Game Object to a new position within this Container.

The Game Object must already be a child of this Container.

The Game Object is removed from its old position and inserted into the new one.
Therefore the Container size does not change. Other children will change position accordingly.


longname: Phaser.GameObjects.Container-moveAbove
since: 3.55.0
name: moveAbove
memberof: Phaser.GameObjects.Container
scope: instance
signature: child1:Phaser.GameObjects.GameObject,child2:Phaser.GameObjects.GameObject
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Moves a Game Object above another one within this Container.

These 2 Game Objects must already be children of this Container.


longname: Phaser.GameObjects.Container-moveBelow
since: 3.55.0
name: moveBelow
memberof: Phaser.GameObjects.Container
scope: instance
signature: child1:Phaser.GameObjects.GameObject,child2:Phaser.GameObjects.GameObject
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Moves a Game Object below another one within this Container.

These 2 Game Objects must already be children of this Container.


longname: Phaser.GameObjects.Container-remove
since: 3.4.0
name: remove
memberof: Phaser.GameObjects.Container
scope: instance
signature: child:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>,destroyChild?:boolean
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Removes the given Game Object, or array of Game Objects, from this Container.

The Game Objects must already be children of this Container.

You can also optionally call `destroy` on each Game Object that is removed from the Container.


longname: Phaser.GameObjects.Container-removeAt
since: 3.4.0
name: removeAt
memberof: Phaser.GameObjects.Container
scope: instance
signature: index:number,destroyChild?:boolean
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Removes the Game Object at the given position in this Container.

You can also optionally call `destroy` on the Game Object, if one is found.


longname: Phaser.GameObjects.Container-removeBetween
since: 3.4.0
name: removeBetween
memberof: Phaser.GameObjects.Container
scope: instance
signature: startIndex?:number,endIndex?:number,destroyChild?:boolean
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Removes the Game Objects between the given positions in this Container.

You can also optionally call `destroy` on each Game Object that is removed from the Container.


longname: Phaser.GameObjects.Container-removeAll
since: 3.4.0
name: removeAll
memberof: Phaser.GameObjects.Container
scope: instance
signature: destroyChild?:boolean
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Removes all Game Objects from this Container.

You can also optionally call `destroy` on each Game Object that is removed from the Container.


longname: Phaser.GameObjects.Container-bringToTop
since: 3.4.0
name: bringToTop
memberof: Phaser.GameObjects.Container
scope: instance
signature: child:Phaser.GameObjects.GameObject
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Brings the given Game Object to the top of this Container.
This will cause it to render on-top of any other objects in the Container.


longname: Phaser.GameObjects.Container-sendToBack
since: 3.4.0
name: sendToBack
memberof: Phaser.GameObjects.Container
scope: instance
signature: child:Phaser.GameObjects.GameObject
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Sends the given Game Object to the bottom of this Container.
This will cause it to render below any other objects in the Container.


longname: Phaser.GameObjects.Container-replace
since: 3.4.0
name: replace
memberof: Phaser.GameObjects.Container
scope: instance
signature: oldChild:Phaser.GameObjects.GameObject,newChild:Phaser.GameObjects.GameObject,destroyChild?:boolean
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Replaces a Game Object in this Container with the new Game Object.
The new Game Object cannot already be a child of this Container.


longname: Phaser.GameObjects.Container-exists
since: 3.4.0
name: exists
memberof: Phaser.GameObjects.Container
scope: instance
signature: child:Phaser.GameObjects.GameObject
returnstype: boolean
returnsdescription: True if the Game Object is an immediate child of this Container, otherwise false.
metafilename: Container.js
metapath: gameobjects/container
description:
Returns `true` if the given Game Object is a direct child of this Container.

This check does not scan nested Containers.


longname: Phaser.GameObjects.Container-setAll
since: 3.4.0
name: setAll
memberof: Phaser.GameObjects.Container
scope: instance
signature: property:string,value:any,startIndex?:number,endIndex?:number
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Sets the property to the given value on all Game Objects in this Container.

Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,
and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only
the first 50 Game Objects.


longname: Phaser.GameObjects.Container-each
since: 3.4.0
name: each
memberof: Phaser.GameObjects.Container
scope: instance
signature: callback:function,context?:object,args?:*
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Passes all Game Objects in this Container to the given callback.

A copy of the Container is made before passing each entry to your callback.
This protects against the callback itself modifying the Container.

If you know for sure that the callback will not change the size of this Container
then you can use the more performant `Container.iterate` method instead.


longname: Phaser.GameObjects.Container-iterate
since: 3.4.0
name: iterate
memberof: Phaser.GameObjects.Container
scope: instance
signature: callback:function,context?:object,args?:*
returnstype: Phaser.GameObjects.Container
returnsdescription: This Container instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Passes all Game Objects in this Container to the given callback.

Only use this method when you absolutely know that the Container will not be modified during
the iteration, i.e. by removing or adding to its contents.


longname: Phaser.GameObjects.Container-setScrollFactor
since: 3.4.0
name: setScrollFactor
memberof: Phaser.GameObjects.Container
scope: instance
signature: x:number,y?:number,updateChildren?:boolean
returnstype: Phaser.GameObjects.Container
returnsdescription: This Game Object instance.
metafilename: Container.js
metapath: gameobjects/container
description:
Sets the scroll factor of this Container and optionally all of its children.

The scroll factor controls the influence of the movement of a Camera upon this Game Object.

When a camera scrolls it will change the location at which this Game Object is rendered on-screen.
It does not change the Game Objects actual position values.

A value of 1 means it will move exactly in sync with a camera.
A value of 0 means it will not move at all, even if the camera moves.
Other values control the degree to which the camera movement is mapped to this Game Object.

Please be aware that scroll factor values other than 1 are not taken in to consideration when
calculating physics collisions. Bodies always collide based on their world position, but changing
the scroll factor is a visual adjustment to where the textures are rendered, which can offset
them from physics bodies if not accounted for in your code.


longname: Phaser.GameObjects.Container-renderCanvas
since: 3.4.0
name: renderCanvas
memberof: Phaser.GameObjects.Container
scope: instance
metafilename: ContainerCanvasRenderer.js
metapath: gameobjects/container
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,container:Phaser.GameObjects.Container,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectCreator-container
since: 3.4.0
name: container
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.Container
returnsdescription: The Game Object that was created.
metafilename: ContainerCreator.js
metapath: gameobjects/container
description:
Creates a new Container Game Object and returns it.

Note: This method will only be available if the Container Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-container
since: 3.4.0
name: container
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x?:number,y?:number,children?:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>
returnstype: Phaser.GameObjects.Container
returnsdescription: The Game Object that was created.
metafilename: ContainerFactory.js
metapath: gameobjects/container
description:
Creates a new Container Game Object and adds it to the Scene.

Note: This method will only be available if the Container Game Object has been built into Phaser.


longname: Phaser.GameObjects.Container-renderWebGL
since: 3.4.0
name: renderWebGL
memberof: Phaser.GameObjects.Container
scope: instance
metafilename: ContainerWebGLRenderer.js
metapath: gameobjects/container
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,container:Phaser.GameObjects.Container,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.DisplayList-getChildren
since: 3.12.0
name: getChildren
memberof: Phaser.GameObjects.DisplayList
scope: instance
returnstype: Array.<Phaser.GameObjects.GameObject>
returnsdescription: The group members.
metafilename: DisplayList.js
metapath: gameobjects
description:
Returns an array which contains all objects currently on the Display List.
This is a reference to the main list array, not a copy of it, so be careful not to modify it.


longname: Phaser.GameObjects.DisplayList-shutdown
since: 3.0.0
name: shutdown
memberof: Phaser.GameObjects.DisplayList
scope: instance
metafilename: DisplayList.js
metapath: gameobjects
access: private
description:
The Scene that owns this plugin is shutting down.

We need to kill and reset all internal properties as well as stop listening to Scene events.


longname: Phaser.GameObjects.DOMElement-setSkew
since: 3.17.0
name: setSkew
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: x?:number,y?:number
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Sets the horizontal and vertical skew values of this DOM Element.

For more information see: [https://developer.mozilla.org/en-US/docs/Web/CSS/transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform)


longname: Phaser.GameObjects.DOMElement-setPerspective
since: 3.17.0
name: setPerspective
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Sets the perspective CSS property of the _parent DOM Container_. This determines the distance between the z=0
plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with
z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. The strength of the effect is determined
by the value of this property.

For more information see: [https://developer.mozilla.org/en-US/docs/Web/CSS/perspective](https://developer.mozilla.org/en-US/docs/Web/CSS/perspective)

**Changing this value changes it globally for all DOM Elements, as they all share the same parent container.**


longname: Phaser.GameObjects.DOMElement-addListener
since: 3.17.0
name: addListener
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: events:string
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
overrides: Phaser.GameObjects.GameObject#addListener
description:
Adds one or more native DOM event listeners onto the underlying Element of this Game Object.
The event is then dispatched via this Game Objects standard event emitter.

For example:

```javascript
var div = this.add.dom(x, y, element);

div.addListener('click');

div.on('click', handler);
```


longname: Phaser.GameObjects.DOMElement-createElement
since: 3.17.0
name: createElement
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: tagName:string,style?:string|any,innerText?:string
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Creates a native DOM Element, adds it to the parent DOM Container and then binds it to this Game Object,
so you can control it. The `tagName` should be a string and is passed to `document.createElement`:

```javascript
this.add.dom().createElement('div');
```

For more details on acceptable tag names see: [https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement)

You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`
value as well. Here is an example of a DOMString:

```javascript
this.add.dom().createElement('div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');
```

And using a style object:

```javascript
var style = {
  'background-color': 'lime';
  'width': '200px';
  'height': '100px';
  'font': '48px Arial';
};

this.add.dom().createElement('div', style, 'Phaser');
```

If this Game Object already has an Element, it is removed from the DOM entirely first.
Any event listeners you may have previously created will need to be re-created after this call.


longname: Phaser.GameObjects.DOMElement-setElement
since: 3.17.0
name: setElement
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: element:string|Element,style?:string|any,innerText?:string
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Binds a new DOM Element to this Game Object. If this Game Object already has an Element it is removed from the DOM
entirely first. Any event listeners you may have previously created will need to be re-created on the new element.

The `element` argument you pass to this method can be either a string tagName:

```javascript
<h1 id="heading">Phaser</h1>

this.add.dom().setElement('heading');
```

Or a reference to an Element instance:

```javascript
<h1 id="heading">Phaser</h1>

var h1 = document.getElementById('heading');

this.add.dom().setElement(h1);
```

You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`
value as well. Here is an example of a DOMString:

```javascript
this.add.dom().setElement(h1, 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');
```

And using a style object:

```javascript
var style = {
  'background-color': 'lime';
  'width': '200px';
  'height': '100px';
  'font': '48px Arial';
};

this.add.dom().setElement(h1, style, 'Phaser');
```


longname: Phaser.GameObjects.DOMElement-createFromCache
since: 3.17.0
name: createFromCache
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: The:string,tagName?:string
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Takes a block of html from the HTML Cache, that has previously been preloaded into the game, and then
creates a DOM Element from it. The loaded HTML is set as the `innerHTML` property of the created
element.

Assume the following html is stored in a file called `loginform.html`:

```html
<input type="text" name="nameField" placeholder="Enter your name" style="font-size: 32px">
<input type="button" name="playButton" value="Let's Play" style="font-size: 32px">
```

Which is loaded into your game using the cache key 'login':

```javascript
this.load.html('login', 'assets/loginform.html');
```

You can create a DOM Element from it using the cache key:

```javascript
this.add.dom().createFromCache('login');
```

The optional `elementType` argument controls the container that is created, into which the loaded html is inserted.
The default is a plain `div` object, but any valid tagName can be given.

If this Game Object already has an Element, it is removed from the DOM entirely first.
Any event listeners you may have previously created will need to be re-created after this call.


longname: Phaser.GameObjects.DOMElement-createFromHTML
since: 3.17.0
name: createFromHTML
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: html:string,tagName?:string
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Takes a string of html and then creates a DOM Element from it. The HTML is set as the `innerHTML`
property of the created element.

```javascript
let form = `
<input type="text" name="nameField" placeholder="Enter your name" style="font-size: 32px">
<input type="button" name="playButton" value="Let's Play" style="font-size: 32px">
`;
```

You can create a DOM Element from it using the string:

```javascript
this.add.dom().createFromHTML(form);
```

The optional `elementType` argument controls the type of container that is created, into which the html is inserted.
The default is a plain `div` object, but any valid tagName can be given.

If this Game Object already has an Element, it is removed from the DOM entirely first.
Any event listeners you may have previously created will need to be re-created after this call.


longname: Phaser.GameObjects.DOMElement-removeElement
since: 3.17.0
name: removeElement
memberof: Phaser.GameObjects.DOMElement
scope: instance
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Removes the current DOM Element bound to this Game Object from the DOM entirely and resets the
`node` property of this Game Object to be `null`.


longname: Phaser.GameObjects.DOMElement-updateSize
since: 3.17.0
name: updateSize
memberof: Phaser.GameObjects.DOMElement
scope: instance
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Internal method that calls `getBoundingClientRect` on the `node` and then sets the bounds width
and height into the `displayWidth` and `displayHeight` properties, and the `clientWidth` and `clientHeight`
values into the `width` and `height` properties respectively.

This is called automatically whenever a new element is created or set.


longname: Phaser.GameObjects.DOMElement-getChildByProperty
since: 3.17.0
name: getChildByProperty
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: property:string,value:string
returnstype: Element
returnsdescription: The first matching child DOM Element, or `null` if not found.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through
them, looking for the first one that has a property matching the given key and value. It then returns this child
if found, or `null` if not.


longname: Phaser.GameObjects.DOMElement-getChildByID
since: 3.17.0
name: getChildByID
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: id:string
returnstype: Element
returnsdescription: The first matching child DOM Element, or `null` if not found.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through
them, looking for the first one that has a matching id. It then returns this child if found, or `null` if not.

Be aware that class and id names are case-sensitive.


longname: Phaser.GameObjects.DOMElement-getChildByName
since: 3.17.0
name: getChildByName
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: name:string
returnstype: Element
returnsdescription: The first matching child DOM Element, or `null` if not found.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through
them, looking for the first one that has a matching name. It then returns this child if found, or `null` if not.

Be aware that class and id names are case-sensitive.


longname: Phaser.GameObjects.DOMElement-setText
since: 3.17.0
name: setText
memberof: Phaser.GameObjects.DOMElement
scope: instance
signature: text:string
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: This DOM Element instance.
metafilename: DOMElement.js
metapath: gameobjects/domelement
description:
Sets the `innerText` property of the DOM Element node and updates the internal sizes.

Note that only certain types of Elements can have `innerText` set on them.


longname: Phaser.GameObjects.DOMElement-willRender
since: 3.17.0
name: willRender
memberof: Phaser.GameObjects.DOMElement
scope: instance
returnstype: boolean
returnsdescription: `true` if the Game Object should be rendered, otherwise `false`.
metafilename: DOMElement.js
metapath: gameobjects/domelement
overrides: Phaser.GameObjects.GameObject#willRender
description:
Compares the renderMask with the renderFlags to see if this Game Object will render or not.

DOMElements always return `true` as they need to still set values during the render pass, even if not visible.


longname: Phaser.GameObjects.DOMElement-renderWebGL
since: 3.17.0
name: renderWebGL
memberof: Phaser.GameObjects.DOMElement
scope: instance
metafilename: DOMElementCSSRenderer.js
metapath: gameobjects/domelement
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.DOMElement,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-dom
since: 3.17.0
name: dom
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x:number,y:number,element?:HTMLElement|string,style?:string|any,innerText?:string
returnstype: Phaser.GameObjects.DOMElement
returnsdescription: The Game Object that was created.
metafilename: DOMElementFactory.js
metapath: gameobjects/domelement
description:
DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.

In order for DOM Elements to display you have to enable them by adding the following to your game
configuration object:

```javascript
dom {
  createContainer: true
}
```

When this is added, Phaser will automatically create a DOM Container div that is positioned over the top
of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of
settings within the Scale Manager, the dom container is resized accordingly.

You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing
Element that you wish to be placed under the control of Phaser. For example:

```javascript
this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');
```

The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in
the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case,
it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font.

You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control
alignment and positioning of the elements next to regular game content.

Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the
cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other
methods available in this class to help construct your elements.

Once the element has been created you can then control it like you would any other Game Object. You can set its
position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped
at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that
they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have
a DOM Element, then a Sprite, then another DOM Element behind it.

They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event
listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas
entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you
change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly.

Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in.

DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert
a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table.
Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and
UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top
of your game, and should treat it accordingly.

Note: This method will only be available if the DOM Element Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-extern
since: 3.16.0
name: extern
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Extern
returnsdescription: The Game Object that was created.
metafilename: ExternFactory.js
metapath: gameobjects/extern
description:
Creates a new Extern Game Object and adds it to the Scene.

Note: This method will only be available if the Extern Game Object has been built into Phaser.


longname: Phaser.GameObjects.Extern-renderWebGL
since: 3.16.0
name: renderWebGL
memberof: Phaser.GameObjects.Extern
scope: instance
metafilename: ExternWebGLRenderer.js
metapath: gameobjects/extern
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Extern,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObject-setActive
since: 3.0.0
name: setActive
memberof: Phaser.GameObjects.GameObject
scope: instance
signature: value:boolean
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This GameObject.
metafilename: GameObject.js
metapath: gameobjects
description:
Sets the `active` property of this Game Object and returns this Game Object for further chaining.
A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.


longname: Phaser.GameObjects.GameObject-setName
since: 3.0.0
name: setName
memberof: Phaser.GameObjects.GameObject
scope: instance
signature: value:string
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This GameObject.
metafilename: GameObject.js
metapath: gameobjects
description:
Sets the `name` property of this Game Object and returns this Game Object for further chaining.
The `name` property is not populated by Phaser and is presented for your own use.


longname: Phaser.GameObjects.GameObject-setState
since: 3.16.0
name: setState
memberof: Phaser.GameObjects.GameObject
scope: instance
signature: value:number|string
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This GameObject.
metafilename: GameObject.js
metapath: gameobjects
description:
Sets the current state of this Game Object.

Phaser itself will never modify the State of a Game Object, although plugins may do so.

For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.
The state value should typically be an integer (ideally mapped to a constant
in your game code), but could also be a string. It is recommended to keep it light and simple.
If you need to store complex data about your Game Object, look at using the Data Component instead.


longname: Phaser.GameObjects.GameObject-setData
since: 3.0.0
name: setData
memberof: Phaser.GameObjects.GameObject
scope: instance
signature: key:string|object,data?:*
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This GameObject.
metafilename: GameObject.js
metapath: gameobjects
description:
Allows you to store a key value pair within this Game Objects Data Manager.

If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled
before setting the value.

If the key doesn't already exist in the Data Manager then it is created.

```javascript
sprite.setData('name', 'Red Gem Stone');
```

You can also pass in an object of key value pairs as the first argument:

```javascript
sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });
```

To get a value back again you can call `getData`:

```javascript
sprite.getData('gold');
```

Or you can access the value directly via the `values` property, where it works like any other variable:

```javascript
sprite.data.values.gold += 50;
```

When the value is first set, a `setdata` event is emitted from this Game Object.

If the key already exists, a `changedata` event is emitted instead, along an event named after the key.
For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.
These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.

Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.
This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.


longname: Phaser.GameObjects.GameObject-incData
since: 3.23.0
name: incData
memberof: Phaser.GameObjects.GameObject
scope: instance
signature: key:string|object,data?:*
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This GameObject.
metafilename: GameObject.js
metapath: gameobjects
description:
Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.

If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled
before setting the value.

If the key doesn't already exist in the Data Manager then it is created.

When the value is first set, a `setdata` event is emitted from this Game Object.


longname: Phaser.GameObjects.GameObject-toggleData
since: 3.23.0
name: toggleData
memberof: Phaser.GameObjects.GameObject
scope: instance
signature: key:string|object
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This GameObject.
metafilename: GameObject.js
metapath: gameobjects
description:
Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.

If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled
before setting the value.

If the key doesn't already exist in the Data Manager then it is created.

When the value is first set, a `setdata` event is emitted from this Game Object.


longname: Phaser.GameObjects.GameObject-getData
since: 3.0.0
name: getData
memberof: Phaser.GameObjects.GameObject
scope: instance
signature: key:string|Array.<string>
returnstype: *
metafilename: GameObject.js
metapath: gameobjects
description:
Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.

You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:

```javascript
sprite.getData('gold');
```

Or access the value directly:

```javascript
sprite.data.values.gold;
```

You can also pass in an array of keys, in which case an array of values will be returned:

```javascript
sprite.getData([ 'gold', 'armor', 'health' ]);
```

This approach is useful for destructuring arrays in ES6.

returnsdescription:
The value belonging to the given key, or an array of values, the order of which will match the input array.


longname: Phaser.GameObjects.GameObject-setInteractive
since: 3.0.0
name: setInteractive
memberof: Phaser.GameObjects.GameObject
scope: instance
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This GameObject.
metafilename: GameObject.js
metapath: gameobjects
description:
Pass this Game Object to the Input Manager to enable it for Input.

Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area
for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced
input detection.

If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If
this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific
shape for it to use.

You can also provide an Input Configuration Object as the only argument to this method.

signature:
hitArea?:Phaser.Types.Input.InputConfiguration|any,callback?:Phaser.Types.Input.HitAreaCallback,dropZone?:boolean


longname: Phaser.GameObjects.GameObject-disableInteractive
since: 3.7.0
name: disableInteractive
memberof: Phaser.GameObjects.GameObject
scope: instance
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This GameObject.
metafilename: GameObject.js
metapath: gameobjects
description:
If this Game Object has previously been enabled for input, this will disable it.

An object that is disabled for input stops processing or being considered for
input events, but can be turned back on again at any time by simply calling
`setInteractive()` with no arguments provided.

If want to completely remove interaction from this Game Object then use `removeInteractive` instead.


longname: Phaser.GameObjects.GameObject-removeInteractive
since: 3.7.0
name: removeInteractive
memberof: Phaser.GameObjects.GameObject
scope: instance
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This GameObject.
metafilename: GameObject.js
metapath: gameobjects
description:
If this Game Object has previously been enabled for input, this will queue it
for removal, causing it to no longer be interactive. The removal happens on
the next game step, it is not immediate.

The Interactive Object that was assigned to this Game Object will be destroyed,
removed from the Input Manager and cleared from this Game Object.

If you wish to re-enable this Game Object at a later date you will need to
re-create its InteractiveObject by calling `setInteractive` again.

If you wish to only temporarily stop an object from receiving input then use
`disableInteractive` instead, as that toggles the interactive state, where-as
this erases it completely.

If you wish to resize a hit area, don't remove and then set it as being
interactive. Instead, access the hitarea object directly and resize the shape
being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the
shape is a Rectangle, which it is by default.)


longname: Phaser.GameObjects.GameObject-addedToScene
since: 3.50.0
name: addedToScene
memberof: Phaser.GameObjects.GameObject
scope: instance
metafilename: GameObject.js
metapath: gameobjects
description:
This callback is invoked when this Game Object is added to a Scene.

Can be overriden by custom Game Objects, but be aware of some Game Objects that
will use this, such as Sprites, to add themselves into the Update List.

You can also listen for the `ADDED_TO_SCENE` event from this Game Object.


longname: Phaser.GameObjects.GameObject-removedFromScene
since: 3.50.0
name: removedFromScene
memberof: Phaser.GameObjects.GameObject
scope: instance
metafilename: GameObject.js
metapath: gameobjects
description:
This callback is invoked when this Game Object is removed from a Scene.

Can be overriden by custom Game Objects, but be aware of some Game Objects that
will use this, such as Sprites, to removed themselves from the Update List.

You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.


longname: Phaser.GameObjects.GameObject-willRender
since: 3.0.0
name: willRender
memberof: Phaser.GameObjects.GameObject
scope: instance
signature: camera:Phaser.Cameras.Scene2D.Camera
returnstype: boolean
returnsdescription: True if the Game Object should be rendered, otherwise false.
metafilename: GameObject.js
metapath: gameobjects
description:
Compares the renderMask with the renderFlags to see if this Game Object will render or not.
Also checks the Game Object against the given Cameras exclusion list.


longname: Phaser.GameObjects.GameObject-getIndexList
since: 3.4.0
name: getIndexList
memberof: Phaser.GameObjects.GameObject
scope: instance
returnstype: Array.<number>
returnsdescription: An array of display list position indexes.
metafilename: GameObject.js
metapath: gameobjects
description:
Returns an array containing the display list index of either this Game Object, or if it has one,
its parent Container. It then iterates up through all of the parent containers until it hits the
root of the display list (which is index 0 in the returned array).

Used internally by the InputPlugin but also useful if you wish to find out the display depth of
this Game Object and all of its ancestors.


longname: Phaser.GameObjects.GameObject-addToDisplayList
since: 3.53.0
name: addToDisplayList
memberof: Phaser.GameObjects.GameObject
scope: instance
fires: Phaser.Scenes.Events.ADDED_TO_SCENE,Phaser.GameObjects.Events.ADDED_TO_SCENE
signature: displayList?:Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: GameObject.js
metapath: gameobjects
description:
Adds this Game Object to the given Display List.

If no Display List is specified, it will default to the Display List owned by the Scene to which
this Game Object belongs.

A Game Object can only exist on one Display List at any given time, but may move freely between them.

If this Game Object is already on another Display List when this method is called, it will first
be removed from it, before being added to the new list.

You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.

If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly
disable it from rendering, consider using the `setVisible` method, instead.


longname: Phaser.GameObjects.GameObject-addToUpdateList
since: 3.53.0
name: addToUpdateList
memberof: Phaser.GameObjects.GameObject
scope: instance
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: GameObject.js
metapath: gameobjects
description:
Adds this Game Object to the Update List belonging to the Scene.

When a Game Object is added to the Update List it will have its `preUpdate` method called
every game frame. This method is passed two parameters: `delta` and `time`.

If you wish to run your own logic within `preUpdate` then you should always call
`preUpdate.super(delta, time)` within it, or it may fail to process required operations,
such as Sprite animations.


longname: Phaser.GameObjects.GameObject-removeFromDisplayList
since: 3.53.0
name: removeFromDisplayList
memberof: Phaser.GameObjects.GameObject
scope: instance
fires: Phaser.Scenes.Events.REMOVED_FROM_SCENE,Phaser.GameObjects.Events.REMOVED_FROM_SCENE
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: GameObject.js
metapath: gameobjects
description:
Removes this Game Object from the Display List it is currently on.

A Game Object can only exist on one Display List at any given time, but may move freely removed
and added back at a later stage.

You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.

If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly
disable it from rendering, consider using the `setVisible` method, instead.


longname: Phaser.GameObjects.GameObject-removeFromUpdateList
since: 3.53.0
name: removeFromUpdateList
memberof: Phaser.GameObjects.GameObject
scope: instance
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: GameObject.js
metapath: gameobjects
description:
Removes this Game Object from the Scene's Update List.

When a Game Object is on the Update List, it will have its `preUpdate` method called
every game frame. Calling this method will remove it from the list, preventing this.

Removing a Game Object from the Update List will stop most internal functions working.
For example, removing a Sprite from the Update List will prevent it from being able to
run animations.


longname: Phaser.GameObjects.GameObject-destroy
since: 3.0.0
name: destroy
memberof: Phaser.GameObjects.GameObject
scope: instance
fires: Phaser.GameObjects.Events.DESTROY
signature: fromScene?:boolean
metafilename: GameObject.js
metapath: gameobjects
overrides: Phaser.Events.EventEmitter#destroy
description:
Destroys this Game Object removing it from the Display List and Update List and
severing all ties to parent resources.

Also removes itself from the Input Manager and Physics Manager if previously enabled.

Use this to remove a Game Object from your game if you don't ever plan to use it again.
As long as no reference to it exists within your own code it should become free for
garbage collection by the browser.

If you just want to temporarily disable an object then look at using the
Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.


longname: Phaser.GameObjects.GameObjectCreator.register
since: 3.0.0
name: register
memberof: Phaser.GameObjects.GameObjectCreator
scope: static
signature: factoryType:string,factoryFunction:function
metafilename: GameObjectCreator.js
metapath: gameobjects
description:
Static method called directly by the Game Object creator functions.
With this method you can register a custom GameObject factory in the GameObjectCreator,
providing a name (`factoryType`) and the constructor (`factoryFunction`) in order
to be called when you invoke Phaser.Scene.make[ factoryType ] method.


longname: Phaser.GameObjects.GameObjectCreator.remove
since: 3.0.0
name: remove
memberof: Phaser.GameObjects.GameObjectCreator
scope: static
signature: factoryType:string
metafilename: GameObjectCreator.js
metapath: gameobjects
description:
Static method called directly by the Game Object Creator functions.

With this method you can remove a custom Game Object Creator that has been previously
registered in the Game Object Creator. Pass in its `factoryType` in order to remove it.


longname: Phaser.GameObjects.GameObjectFactory-existing
since: 3.0.0
name: existing
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: child:Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer
returnstype: Phaser.GameObjects.GameObject
returnsdescription: The Game Object that was added.
metafilename: GameObjectFactory.js
metapath: gameobjects
description:
Adds an existing Game Object to this Scene.

If the Game Object renders, it will be added to the Display List.
If it has a `preUpdate` method, it will be added to the Update List.


longname: Phaser.GameObjects.GameObjectFactory.register
since: 3.0.0
name: register
memberof: Phaser.GameObjects.GameObjectFactory
scope: static
signature: factoryType:string,factoryFunction:function
metafilename: GameObjectFactory.js
metapath: gameobjects
description:
Static method called directly by the Game Object factory functions.
With this method you can register a custom GameObject factory in the GameObjectFactory,
providing a name (`factoryType`) and the constructor (`factoryFunction`) in order
to be called when you call to Phaser.Scene.add[ factoryType ] method.


longname: Phaser.GameObjects.GameObjectFactory.remove
since: 3.0.0
name: remove
memberof: Phaser.GameObjects.GameObjectFactory
scope: static
signature: factoryType:string
metafilename: GameObjectFactory.js
metapath: gameobjects
description:
Static method called directly by the Game Object factory functions.
With this method you can remove a custom GameObject factory registered in the GameObjectFactory,
providing a its `factoryType`.


longname: Phaser.GameObjects.GetCalcMatrix
since: 3.50.0
name: GetCalcMatrix
memberof: Phaser.GameObjects
scope: static
returnstype: Phaser.Types.GameObjects.GetCalcMatrixResults
returnsdescription: The results object containing the updated transform matrices.
metafilename: GetCalcMatrix.js
metapath: gameobjects
description:
Calculates the Transform Matrix of the given Game Object and Camera, factoring in
the parent matrix if provided.

Note that the object this results contains _references_ to the Transform Matrices,
not new instances of them. Therefore, you should use their values immediately, or
copy them to your own matrix, as they will be replaced as soon as another Game
Object is rendered.

signature:
src:Phaser.GameObjects.GameObject,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix?:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Graphics-fillGradientStyle
since: 3.12.0
name: fillGradientStyle
memberof: Phaser.GameObjects.Graphics
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Sets a gradient fill style. This is a WebGL only feature.

The gradient color values represent the 4 corners of an untransformed rectangle.
The gradient is used to color all filled shapes and paths drawn after calling this method.
If you wish to turn a gradient off, call `fillStyle` and provide a new single fill color.

When filling a triangle only the first 3 color values provided are used for the 3 points of a triangle.

This feature is best used only on rectangles and triangles. All other shapes will give strange results.

Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used
will be filled with a gradient on its own. There is no ability to gradient fill a shape or path as a single
entity at this time.

signature:
topLeft:number,topRight:number,bottomLeft:number,bottomRight:number,alphaTopLeft?:number,alphaTopRight?:number,alphaBottomLeft?:number,alphaBottomRight?:number


longname: Phaser.GameObjects.Graphics-lineGradientStyle
since: 3.12.0
name: lineGradientStyle
memberof: Phaser.GameObjects.Graphics
scope: instance
signature: lineWidth:number,topLeft:number,topRight:number,bottomLeft:number,bottomRight:number,alpha?:number
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Sets a gradient line style. This is a WebGL only feature.

The gradient color values represent the 4 corners of an untransformed rectangle.
The gradient is used to color all stroked shapes and paths drawn after calling this method.
If you wish to turn a gradient off, call `lineStyle` and provide a new single line color.

This feature is best used only on single lines. All other shapes will give strange results.

Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used
will be filled with a gradient on its own. There is no ability to gradient stroke a shape or path as a single
entity at this time.


longname: Phaser.GameObjects.Graphics-fill
since: 3.16.0
name: fill
memberof: Phaser.GameObjects.Graphics
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Fill the current path.

This is an alias for `Graphics.fillPath` and does the same thing.
It was added to match the CanvasRenderingContext 2D API.


longname: Phaser.GameObjects.Graphics-stroke
since: 3.16.0
name: stroke
memberof: Phaser.GameObjects.Graphics
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Stroke the current path.

This is an alias for `Graphics.strokePath` and does the same thing.
It was added to match the CanvasRenderingContext 2D API.


longname: Phaser.GameObjects.Graphics-fillRoundedRect
since: 3.11.0
name: fillRoundedRect
memberof: Phaser.GameObjects.Graphics
description: Fill a rounded rectangle with the given position, size and radius.
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
signature:
x:number,y:number,width:number,height:number,radius?:Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number


longname: Phaser.GameObjects.Graphics-fillPoint
since: 3.0.0
name: fillPoint
memberof: Phaser.GameObjects.Graphics
scope: instance
signature: x:number,y:number,size?:number
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Fill a point at the given position.

Draws a square at the given position, 1 pixel in size by default.


longname: Phaser.GameObjects.Graphics-lineTo
since: 3.0.0
name: lineTo
memberof: Phaser.GameObjects.Graphics
scope: instance
signature: x:number,y:number
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Draw a line from the current drawing position to the given position.

Moves the current drawing position to the given position.


longname: Phaser.GameObjects.Graphics-strokePoints
since: 3.0.0
name: strokePoints
memberof: Phaser.GameObjects.Graphics
scope: instance
signature: points:array|Array.<Phaser.Geom.Point>,closeShape?:boolean,closePath?:boolean,endIndex?:number
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Stroke the shape represented by the given array of points.

Pass `closeShape` to automatically close the shape by joining the last to the first point.

Pass `closePath` to automatically close the path before it is stroked.


longname: Phaser.GameObjects.Graphics-fillPoints
since: 3.0.0
name: fillPoints
memberof: Phaser.GameObjects.Graphics
scope: instance
signature: points:array|Array.<Phaser.Geom.Point>,closeShape?:boolean,closePath?:boolean,endIndex?:number
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Fill the shape represented by the given array of points.

Pass `closeShape` to automatically close the shape by joining the last to the first point.

Pass `closePath` to automatically close the path before it is filled.


longname: Phaser.GameObjects.Graphics-arc
since: 3.0.0
name: arc
memberof: Phaser.GameObjects.Graphics
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Draw an arc.

This method can be used to create circles, or parts of circles.

Make sure you call `beginPath` before starting the arc unless you wish for the arc to automatically
close when filled or stroked.

Use the optional `overshoot` argument increase the number of iterations that take place when
the arc is rendered in WebGL. This is useful if you're drawing an arc with an especially thick line,
as it will allow the arc to fully join-up. Try small values at first, i.e. 0.01.

Call [Phaser.GameObjects.Graphics#fillPath](Phaser.GameObjects.Graphics#fillPath) or [Phaser.GameObjects.Graphics#strokePath](Phaser.GameObjects.Graphics#strokePath) after calling
this method to draw the arc.

signature:
x:number,y:number,radius:number,startAngle:number,endAngle:number,anticlockwise?:boolean,overshoot?:number


longname: Phaser.GameObjects.Graphics-slice
since: 3.4.0
name: slice
memberof: Phaser.GameObjects.Graphics
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Creates a pie-chart slice shape centered at `x`, `y` with the given radius.
You must define the start and end angle of the slice.

Setting the `anticlockwise` argument to `true` creates a shape similar to Pacman.
Setting it to `false` creates a shape like a slice of pie.

This method will begin a new path and close the path at the end of it.
To display the actual slice you need to call either `strokePath` or `fillPath` after it.

signature:
x:number,y:number,radius:number,startAngle:number,endAngle:number,anticlockwise?:boolean,overshoot?:number


longname: Phaser.GameObjects.Graphics-save
since: 3.0.0
name: save
memberof: Phaser.GameObjects.Graphics
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Saves the state of the Graphics by pushing the current state onto a stack.

The most recently saved state can then be restored with [Phaser.GameObjects.Graphics#restore](Phaser.GameObjects.Graphics#restore).


longname: Phaser.GameObjects.Graphics-restore
since: 3.0.0
name: restore
memberof: Phaser.GameObjects.Graphics
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Restores the most recently saved state of the Graphics by popping from the state stack.

Use [Phaser.GameObjects.Graphics#save](Phaser.GameObjects.Graphics#save) to save the current state, and call this afterwards to restore that state.

If there is no saved state, this command does nothing.


longname: Phaser.GameObjects.Graphics-translateCanvas
since: 3.0.0
name: translateCanvas
memberof: Phaser.GameObjects.Graphics
scope: instance
signature: x:number,y:number
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Inserts a translation command into this Graphics objects command buffer.

All objects drawn _after_ calling this method will be translated
by the given amount.

This does not change the position of the Graphics object itself,
only of the objects drawn by it after calling this method.


longname: Phaser.GameObjects.Graphics-scaleCanvas
since: 3.0.0
name: scaleCanvas
memberof: Phaser.GameObjects.Graphics
scope: instance
signature: x:number,y:number
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Inserts a scale command into this Graphics objects command buffer.

All objects drawn _after_ calling this method will be scaled
by the given amount.

This does not change the scale of the Graphics object itself,
only of the objects drawn by it after calling this method.


longname: Phaser.GameObjects.Graphics-rotateCanvas
since: 3.0.0
name: rotateCanvas
memberof: Phaser.GameObjects.Graphics
scope: instance
signature: radians:number
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Inserts a rotation command into this Graphics objects command buffer.

All objects drawn _after_ calling this method will be rotated
by the given amount.

This does not change the rotation of the Graphics object itself,
only of the objects drawn by it after calling this method.


longname: Phaser.GameObjects.Graphics-generateTexture
since: 3.0.0
name: generateTexture
memberof: Phaser.GameObjects.Graphics
scope: instance
signature: key:string|HTMLCanvasElement,width?:number,height?:number
returnstype: Phaser.GameObjects.Graphics
returnsdescription: This Game Object.
metafilename: Graphics.js
metapath: gameobjects/graphics
description:
Generate a texture from this Graphics object.

If `key` is a string it'll generate a new texture using it and add it into the
Texture Manager (assuming no key conflict happens).

If `key` is a Canvas it will draw the texture to that canvas context. Note that it will NOT
automatically upload it to the GPU in WebGL mode.

Please understand that the texture is created via the Canvas API of the browser, therefore some
Graphics features, such as `fillGradientStyle`, will not appear on the resulting texture,
as they're unsupported by the Canvas API.


longname: Phaser.GameObjects.Graphics-renderCanvas
since: 3.0.0
name: renderCanvas
memberof: Phaser.GameObjects.Graphics
scope: instance
metafilename: GraphicsCanvasRenderer.js
metapath: gameobjects/graphics
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Graphics,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix,renderTargetCtx?:CanvasRenderingContext2D,allowClip:boolean


longname: Phaser.GameObjects.GameObjectCreator-graphics
since: 3.0.0
name: graphics
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.Graphics
returnsdescription: The Game Object that was created.
metafilename: GraphicsCreator.js
metapath: gameobjects/graphics
description:
Creates a new Graphics Game Object and returns it.

Note: This method will only be available if the Graphics Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-graphics
since: 3.0.0
name: graphics
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: config?:Phaser.Types.GameObjects.Graphics.Options
returnstype: Phaser.GameObjects.Graphics
returnsdescription: The Game Object that was created.
metafilename: GraphicsFactory.js
metapath: gameobjects/graphics
description:
Creates a new Graphics Game Object and adds it to the Scene.

Note: This method will only be available if the Graphics Game Object has been built into Phaser.


longname: Phaser.GameObjects.Graphics-renderWebGL
since: 3.0.0
name: renderWebGL
memberof: Phaser.GameObjects.Graphics
scope: instance
metafilename: GraphicsWebGLRenderer.js
metapath: gameobjects/graphics
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Graphics,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Group-create
since: 3.0.0
name: create
memberof: Phaser.GameObjects.Group
scope: instance
signature: x?:number,y?:number,key?:string,frame?:string|number,visible?:boolean,active?:boolean
returnstype: any
returnsdescription: The new Game Object (usually a Sprite, etc.).
metafilename: Group.js
metapath: gameobjects/group
description:
Creates a new Game Object and adds it to this group, unless the group [is](Phaser.GameObjects.Group#isFull).

Calls [Phaser.GameObjects.Group#createCallback](Phaser.GameObjects.Group#createCallback).


longname: Phaser.GameObjects.Group-createMultiple
since: 3.0.0
name: createMultiple
memberof: Phaser.GameObjects.Group
scope: instance
returnstype: Array.<any>
returnsdescription: The newly created Game Objects.
metafilename: Group.js
metapath: gameobjects/group
description:
Creates several Game Objects and adds them to this group.

If the group becomes [Phaser.GameObjects.Group#isFull](Phaser.GameObjects.Group#isFull), no further Game Objects are created.

Calls [Phaser.GameObjects.Group#createMultipleCallback](Phaser.GameObjects.Group#createMultipleCallback) and [Phaser.GameObjects.Group#createCallback](Phaser.GameObjects.Group#createCallback).

signature:
config:Phaser.Types.GameObjects.Group.GroupCreateConfig|Array.<Phaser.Types.GameObjects.Group.GroupCreateConfig>


longname: Phaser.GameObjects.Group-preUpdate
since: 3.0.0
name: preUpdate
memberof: Phaser.GameObjects.Group
scope: instance
signature: time:number,delta:number
metafilename: Group.js
metapath: gameobjects/group
description:
Updates any group members, if [Phaser.GameObjects.Group#runChildUpdate](Phaser.GameObjects.Group#runChildUpdate) is enabled.


longname: Phaser.GameObjects.Group-add
since: 3.0.0
name: add
memberof: Phaser.GameObjects.Group
scope: instance
signature: child:Phaser.GameObjects.GameObject,addToScene?:boolean
returnstype: Phaser.GameObjects.Group
returnsdescription: This Group object.
metafilename: Group.js
metapath: gameobjects/group
description:
Adds a Game Object to this group.

Calls [Phaser.GameObjects.Group#createCallback](Phaser.GameObjects.Group#createCallback).


longname: Phaser.GameObjects.Group-addMultiple
since: 3.0.0
name: addMultiple
memberof: Phaser.GameObjects.Group
scope: instance
signature: children:Array.<Phaser.GameObjects.GameObject>,addToScene?:boolean
returnstype: Phaser.GameObjects.Group
returnsdescription: This group.
metafilename: Group.js
metapath: gameobjects/group
description:
Adds several Game Objects to this group.

Calls [Phaser.GameObjects.Group#createCallback](Phaser.GameObjects.Group#createCallback).


longname: Phaser.GameObjects.Group-remove
since: 3.0.0
name: remove
memberof: Phaser.GameObjects.Group
scope: instance
signature: child:Phaser.GameObjects.GameObject,removeFromScene?:boolean,destroyChild?:boolean
returnstype: Phaser.GameObjects.Group
returnsdescription: This Group object.
metafilename: Group.js
metapath: gameobjects/group
description:
Removes a member of this Group and optionally removes it from the Scene and / or destroys it.

Calls [Phaser.GameObjects.Group#removeCallback](Phaser.GameObjects.Group#removeCallback).


longname: Phaser.GameObjects.Group-clear
since: 3.0.0
name: clear
memberof: Phaser.GameObjects.Group
scope: instance
signature: removeFromScene?:boolean,destroyChild?:boolean
returnstype: Phaser.GameObjects.Group
returnsdescription: This group.
metafilename: Group.js
metapath: gameobjects/group
description:
Removes all members of this Group and optionally removes them from the Scene and / or destroys them.

Does not call [Phaser.GameObjects.Group#removeCallback](Phaser.GameObjects.Group#removeCallback).


longname: Phaser.GameObjects.Group-getMatching
since: 3.50.0
name: getMatching
memberof: Phaser.GameObjects.Group
scope: instance
signature: property?:string,value?:*,startIndex?:number,endIndex?:number
returnstype: Array.<any>
returnsdescription: An array of matching Group members. The array will be empty if nothing matched.
metafilename: Group.js
metapath: gameobjects/group
description:
Returns all children in this Group that match the given criteria based on the `property` and `value` arguments.

For example: `getMatching('visible', true)` would return only children that have their `visible` property set.

Optionally, you can specify a start and end index. For example if the Group has 100 elements,
and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only
the first 50.


longname: Phaser.GameObjects.Group-getFirst
since: 3.0.0
name: getFirst
memberof: Phaser.GameObjects.Group
scope: instance
returnstype: any
returnsdescription: The first matching group member, or a newly created member, or null.
metafilename: Group.js
metapath: gameobjects/group
description:
Scans the Group, from top to bottom, for the first member that has an [Phaser.GameObjects.GameObject#active](Phaser.GameObjects.GameObject#active) state matching the argument,
assigns `x` and `y`, and returns the member.

If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
Unless a new member is created, `key`, `frame`, and `visible` are ignored.

signature:
state?:boolean,createIfNull?:boolean,x?:number,y?:number,key?:string,frame?:string|number,visible?:boolean


longname: Phaser.GameObjects.Group-getFirstNth
since: 3.6.0
name: getFirstNth
memberof: Phaser.GameObjects.Group
scope: instance
returnstype: any
returnsdescription: The first matching group member, or a newly created member, or null.
metafilename: Group.js
metapath: gameobjects/group
description:
Scans the Group, from top to bottom, for the nth member that has an [Phaser.GameObjects.GameObject#active](Phaser.GameObjects.GameObject#active) state matching the argument,
assigns `x` and `y`, and returns the member.

If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
Unless a new member is created, `key`, `frame`, and `visible` are ignored.

signature:
nth:number,state?:boolean,createIfNull?:boolean,x?:number,y?:number,key?:string,frame?:string|number,visible?:boolean


longname: Phaser.GameObjects.Group-getLast
since: 3.6.0
name: getLast
memberof: Phaser.GameObjects.Group
scope: instance
returnstype: any
returnsdescription: The first matching group member, or a newly created member, or null.
metafilename: Group.js
metapath: gameobjects/group
description:
Scans the Group for the last member that has an [Phaser.GameObjects.GameObject#active](Phaser.GameObjects.GameObject#active) state matching the argument,
assigns `x` and `y`, and returns the member.

If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
Unless a new member is created, `key`, `frame`, and `visible` are ignored.

signature:
state?:boolean,createIfNull?:boolean,x?:number,y?:number,key?:string,frame?:string|number,visible?:boolean


longname: Phaser.GameObjects.Group-getLastNth
since: 3.6.0
name: getLastNth
memberof: Phaser.GameObjects.Group
scope: instance
returnstype: any
returnsdescription: The first matching group member, or a newly created member, or null.
metafilename: Group.js
metapath: gameobjects/group
description:
Scans the Group for the last nth member that has an [Phaser.GameObjects.GameObject#active](Phaser.GameObjects.GameObject#active) state matching the argument,
assigns `x` and `y`, and returns the member.

If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
Unless a new member is created, `key`, `frame`, and `visible` are ignored.

signature:
nth:number,state?:boolean,createIfNull?:boolean,x?:number,y?:number,key?:string,frame?:string|number,visible?:boolean


longname: Phaser.GameObjects.Group-getHandler
since: 3.6.0
name: getHandler
memberof: Phaser.GameObjects.Group
scope: instance
returnstype: any
returnsdescription: The first matching group member, or a newly created member, or null.
metafilename: Group.js
metapath: gameobjects/group
access: private
description:
Scans the group for the last member that has an [Phaser.GameObjects.GameObject#active](Phaser.GameObjects.GameObject#active) state matching the argument,
assigns `x` and `y`, and returns the member.

If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
Unless a new member is created, `key`, `frame`, and `visible` are ignored.

signature:
forwards:boolean,nth:number,state?:boolean,createIfNull?:boolean,x?:number,y?:number,key?:string,frame?:string|number,visible?:boolean


longname: Phaser.GameObjects.Group-get
since: 3.0.0
name: get
memberof: Phaser.GameObjects.Group
scope: instance
signature: x?:number,y?:number,key?:string,frame?:string|number,visible?:boolean
returnstype: any
returnsdescription: The first inactive group member, or a newly created member, or null.
metafilename: Group.js
metapath: gameobjects/group
description:
Scans the group for the first member that has an [Phaser.GameObjects.GameObject#active](Phaser.GameObjects.GameObject#active) state set to `false`,
assigns `x` and `y`, and returns the member.

If no inactive member is found and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
The new Game Object will have its active state set to `true`.
Unless a new member is created, `key`, `frame`, and `visible` are ignored.


longname: Phaser.GameObjects.Group-getFirstAlive
since: 3.0.0
name: getFirstAlive
memberof: Phaser.GameObjects.Group
scope: instance
signature: createIfNull?:boolean,x?:number,y?:number,key?:string,frame?:string|number,visible?:boolean
returnstype: any
returnsdescription: The first active group member, or a newly created member, or null.
metafilename: Group.js
metapath: gameobjects/group
description:
Scans the group for the first member that has an [Phaser.GameObjects.GameObject#active](Phaser.GameObjects.GameObject#active) state set to `true`,
assigns `x` and `y`, and returns the member.

If no active member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.
Unless a new member is created, `key`, `frame`, and `visible` are ignored.


longname: Phaser.GameObjects.Group-getFirstDead
since: 3.0.0
name: getFirstDead
memberof: Phaser.GameObjects.Group
scope: instance
signature: createIfNull?:boolean,x?:number,y?:number,key?:string,frame?:string|number,visible?:boolean
returnstype: any
returnsdescription: The first inactive group member, or a newly created member, or null.
metafilename: Group.js
metapath: gameobjects/group
description:
Scans the group for the first member that has an [Phaser.GameObjects.GameObject#active](Phaser.GameObjects.GameObject#active) state set to `false`,
assigns `x` and `y`, and returns the member.

If no inactive member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.
The new Game Object will have an active state set to `true`.
Unless a new member is created, `key`, `frame`, and `visible` are ignored.


longname: Phaser.GameObjects.Group-getTotalFree
since: 3.0.0
name: getTotalFree
memberof: Phaser.GameObjects.Group
scope: instance
returnstype: number
returnsdescription: maxSize minus the number of active group numbers; or a large number (if maxSize is -1).
metafilename: Group.js
metapath: gameobjects/group
description:
The difference of [Phaser.GameObjects.Group#maxSize](Phaser.GameObjects.Group#maxSize) and the number of active group members.

This represents the number of group members that could be created or reactivated before reaching the size limit.


longname: Phaser.GameObjects.Group-setName
since: 3.24.0
name: setName
memberof: Phaser.GameObjects.Group
scope: instance
signature: value:string
returnstype: Phaser.GameObjects.Group
returnsdescription: This Group object.
metafilename: Group.js
metapath: gameobjects/group
description:
Sets the `name` property of this Group.
The `name` property is not populated by Phaser and is presented for your own use.


longname: Phaser.GameObjects.Group-shiftPosition
since: 3.21.0
name: shiftPosition
memberof: Phaser.GameObjects.Group
scope: instance
signature: x:number,y:number,direction?:number
returnstype: Phaser.GameObjects.Group
returnsdescription: This Group object.
metafilename: Group.js
metapath: gameobjects/group
description:
Iterate through the group members changing the position of each element to be that of the element that came before
it in the array (or after it if direction = 1)

The first group member position is set to x/y.


longname: Phaser.GameObjects.Group-setHitArea
since: 3.21.0
name: setHitArea
memberof: Phaser.GameObjects.Group
scope: instance
signature: hitArea:*,hitAreaCallback:Phaser.Types.Input.HitAreaCallback
returnstype: Phaser.GameObjects.Group
returnsdescription: This Group object.
metafilename: Group.js
metapath: gameobjects/group
description:
Passes all group members to the Input Manager to enable them for input with identical areas and callbacks.


longname: Phaser.GameObjects.Group-destroy
since: 3.0.0
name: destroy
memberof: Phaser.GameObjects.Group
scope: instance
signature: destroyChildren?:boolean,removeFromScene?:boolean
metafilename: Group.js
metapath: gameobjects/group
overrides: Phaser.Events.EventEmitter#destroy
description:
Empties this Group of all children and removes it from the Scene.

Does not call [Phaser.GameObjects.Group#removeCallback](Phaser.GameObjects.Group#removeCallback).

Children of this Group will _not_ be removed from the Scene by calling this method
unless you specify the `removeFromScene` parameter.

Children of this Group will also _not_ be destroyed by calling this method
unless you specify the `destroyChildren` parameter.


longname: Phaser.GameObjects.GameObjectCreator-group
since: 3.0.0
name: group
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig
returnstype: Phaser.GameObjects.Group
returnsdescription: The Game Object that was created.
metafilename: GroupCreator.js
metapath: gameobjects/group
description:
Creates a new Group Game Object and returns it.

Note: This method will only be available if the Group Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-group
since: 3.0.0
name: group
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Group
returnsdescription: The Game Object that was created.
metafilename: GroupFactory.js
metapath: gameobjects/group
description:
Creates a new Group Game Object and adds it to the Scene.

Note: This method will only be available if the Group Game Object has been built into Phaser.

signature:
children?:Array.<Phaser.GameObjects.GameObject>|Phaser.Types.GameObjects.Group.GroupConfig|Array.<Phaser.Types.GameObjects.Group.GroupConfig>,config?:Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig


longname: Phaser.GameObjects.Image-renderCanvas
since: 3.0.0
name: renderCanvas
memberof: Phaser.GameObjects.Image
scope: instance
metafilename: ImageCanvasRenderer.js
metapath: gameobjects/image
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Image,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectCreator-image
since: 3.0.0
name: image
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.Image
returnsdescription: The Game Object that was created.
metafilename: ImageCreator.js
metapath: gameobjects/image
description:
Creates a new Image Game Object and returns it.

Note: This method will only be available if the Image Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-image
since: 3.0.0
name: image
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x:number,y:number,texture:string|Phaser.Textures.Texture,frame?:string|number
returnstype: Phaser.GameObjects.Image
returnsdescription: The Game Object that was created.
metafilename: ImageFactory.js
metapath: gameobjects/image
description:
Creates a new Image Game Object and adds it to the Scene.

Note: This method will only be available if the Image Game Object has been built into Phaser.


longname: Phaser.GameObjects.Image-renderWebGL
since: 3.0.0
name: renderWebGL
memberof: Phaser.GameObjects.Image
scope: instance
metafilename: ImageWebGLRenderer.js
metapath: gameobjects/image
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Image,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Layer-setInteractive
since: 3.51.0
name: setInteractive
memberof: Phaser.GameObjects.Layer
scope: instance
returnstype: Phaser.GameObjects.Layer
returnsdescription: This GameObject.
metafilename: Layer.js
metapath: gameobjects/layer
description:
A Layer cannot be enabled for input.

This method does nothing and is kept to ensure
the Layer has the same shape as a Game Object.


longname: Phaser.GameObjects.Layer-getChildren
since: 3.50.0
name: getChildren
memberof: Phaser.GameObjects.Layer
scope: instance
returnstype: Array.<Phaser.GameObjects.GameObject>
returnsdescription: The group members.
metafilename: Layer.js
metapath: gameobjects/layer
description:
Returns an array which contains all Game Objects within this Layer.

This is a reference to the main list array, not a copy of it, so be careful not to modify it.


longname: Phaser.GameObjects.Layer-destroy
since: 3.50.0
name: destroy
memberof: Phaser.GameObjects.Layer
scope: instance
fires: Phaser.GameObjects.Events.DESTROY
metafilename: Layer.js
metapath: gameobjects/layer
description:
Destroys this Layer removing it from the Display List and Update List and
severing all ties to parent resources.

Also destroys all children of this Layer. If you do not wish for the
children to be destroyed, you should move them from this Layer first.

Use this to remove this Layer from your game if you don't ever plan to use it again.
As long as no reference to it exists within your own code it should become free for
garbage collection by the browser.

If you just want to temporarily disable an object then look at using the
Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.


longname: Phaser.GameObjects.Layer-renderCanvas
since: 3.50.0
name: renderCanvas
memberof: Phaser.GameObjects.Layer
scope: instance
metafilename: LayerCanvasRenderer.js
metapath: gameobjects/layer
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,layer:Phaser.GameObjects.Layer,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectCreator-layer
since: 3.50.0
name: layer
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.Layer
returnsdescription: The Game Object that was created.
metafilename: LayerCreator.js
metapath: gameobjects/layer
description:
Creates a new Layer Game Object and returns it.

Note: This method will only be available if the Layer Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-layer
since: 3.50.0
name: layer
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: children?:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>
returnstype: Phaser.GameObjects.Layer
returnsdescription: The Game Object that was created.
metafilename: LayerFactory.js
metapath: gameobjects/layer
description:
Creates a new Layer Game Object and adds it to the Scene.

Note: This method will only be available if the Layer Game Object has been built into Phaser.


longname: Phaser.GameObjects.Layer-renderWebGL
since: 3.50.0
name: renderWebGL
memberof: Phaser.GameObjects.Layer
scope: instance
metafilename: LayerWebGLRenderer.js
metapath: gameobjects/layer
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,layer:Phaser.GameObjects.Layer,camera:Phaser.Cameras.Scene2D.Camera


longname: Phaser.GameObjects.LightsManager-addPointLight
since: 3.50.0
name: addPointLight
memberof: Phaser.GameObjects.LightsManager
scope: instance
signature: x:number,y:number,color?:number,radius?:number,intensity?:number,attenuation?:number
returnstype: Phaser.GameObjects.PointLight
returnsdescription: The Game Object that was created.
metafilename: LightsManager.js
metapath: gameobjects/lights
description:
Creates a new Point Light Game Object and adds it to the Scene.

Note: This method will only be available if the Point Light Game Object has been built into Phaser.

The Point Light Game Object provides a way to add a point light effect into your game,
without the expensive shader processing requirements of the traditional Light Game Object.

The difference is that the Point Light renders using a custom shader, designed to give the
impression of a point light source, of variable radius, intensity and color, in your game.
However, unlike the Light Game Object, it does not impact any other Game Objects, or use their
normal maps for calcuations. This makes them extremely fast to render compared to Lights
and perfect for special effects, such as flickering torches or muzzle flashes.

For maximum performance you should batch Point Light Game Objects together. This means
ensuring they follow each other consecutively on the display list. Ideally, use a Layer
Game Object and then add just Point Lights to it, so that it can batch together the rendering
of the lights. You don't _have_ to do this, and if you've only a handful of Point Lights in
your game then it's perfectly safe to mix them into the dislay list as normal. However, if
you're using a large number of them, please consider how they are mixed into the display list.

The renderer will automatically cull Point Lights. Those with a radius that does not intersect
with the Camera will be skipped in the rendering list. This happens automatically and the
culled state is refreshed every frame, for every camera.

The origin of a Point Light is always 0.5 and it cannot be changed.

Point Lights are a WebGL only feature and do not have a Canvas counterpart.


longname: Phaser.GameObjects.LightsManager-getLights
since: 3.50.0
name: getLights
memberof: Phaser.GameObjects.LightsManager
scope: instance
signature: camera:Phaser.Cameras.Scene2D.Camera
returnstype: Array.<Phaser.GameObjects.Light>
returnsdescription: The culled Lights.
metafilename: LightsManager.js
metapath: gameobjects/lights
description:
Get all lights that can be seen by the given Camera.

It will automatically cull lights that are outside the world view of the Camera.

If more lights are returned than supported by the pipeline, the lights are then culled
based on the distance from the center of the camera. Only those closest are rendered.


longname: Phaser.GameObjects.LightsManager-shutdown
since: 3.0.0
name: shutdown
memberof: Phaser.GameObjects.LightsManager
scope: instance
metafilename: LightsManager.js
metapath: gameobjects/lights
description:
Shut down the Lights Manager.

Recycles all active Lights into the Light pool, resets ambient light color and clears the lists of Lights and
culled Lights.


longname: Phaser.GameObjects.LightsManager-destroy
since: 3.0.0
name: destroy
memberof: Phaser.GameObjects.LightsManager
scope: instance
metafilename: LightsManager.js
metapath: gameobjects/lights
description:
Destroy the Lights Manager.

Cleans up all references by calling [Phaser.GameObjects.LightsManager#shutdown](Phaser.GameObjects.LightsManager#shutdown).


longname: Phaser.GameObjects.Mesh-panZ
since: 3.50.0
name: panZ
memberof: Phaser.GameObjects.Mesh
scope: instance
signature: v:number
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Translates the view position of this Mesh on the z axis by the given amount.

As the default `panZ` value is 0, vertices with `z=0` (the default) need special care or else they will not display as they are behind the camera.
Consider using `mesh.panZ(mesh.height / (2 * Math.tan(Math.PI / 16)))`, which will interpret vertex geometry 1:1 with pixel geometry (or see `setOrtho`).


longname: Phaser.GameObjects.Mesh-setPerspective
since: 3.50.0
name: setPerspective
memberof: Phaser.GameObjects.Mesh
scope: instance
signature: width:number,height:number,fov?:number,near?:number,far?:number
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Builds a new perspective projection matrix from the given values.

These are also the initial projection matrix & parameters for `Mesh` (and see `panZ` for more discussion).

See also `setOrtho`.


longname: Phaser.GameObjects.Mesh-setOrtho
since: 3.50.0
name: setOrtho
memberof: Phaser.GameObjects.Mesh
scope: instance
signature: scaleX?:number,scaleY?:number,near?:number,far?:number
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Builds a new orthographic projection matrix from the given values.

If using this mode you will often need to set `Mesh.hideCCW` to `false` as well.

By default, calling this method with no parameters will set the scaleX value to
match the renderer's aspect ratio. If you would like to render vertex positions 1:1
to pixel positions, consider calling as `mesh.setOrtho(mesh.width, mesh.height)`.

See also `setPerspective`.


longname: Phaser.GameObjects.Mesh-clear
since: 3.50.0
name: clear
memberof: Phaser.GameObjects.Mesh
scope: instance
returnstype: Phaser.GameObjects.Mesh
returnsdescription: This Mesh Game Object.
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Iterates and destroys all current Faces in this Mesh, then resets the
`faces` and `vertices` arrays.


longname: Phaser.GameObjects.Mesh-addVerticesFromObj
since: 3.50.0
name: addVerticesFromObj
memberof: Phaser.GameObjects.Mesh
scope: instance
returnstype: Phaser.GameObjects.Mesh
returnsdescription: This Mesh Game Object.
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
This method will add the data from a triangulated Wavefront OBJ model file to this Mesh.

The data should have been loaded via the OBJFile:

```javascript
this.load.obj(key, url);
```

Then use the same `key` as the first parameter to this method.

Multiple Mesh Game Objects can use the same model data without impacting on each other.

Make sure your 3D package has triangulated the model data prior to exporting it.

You can add multiple models to a single Mesh, although they will act as one when
moved or rotated. You can scale the model data, should it be too small, or too large, to see.
You can also offset the vertices of the model via the `x`, `y` and `z` parameters.

signature:
key:string,scale?:number,x?:number,y?:number,z?:number,rotateX?:number,rotateY?:number,rotateZ?:number,zIsUp?:boolean


longname: Phaser.GameObjects.Mesh-depthSort
since: 3.50.0
name: depthSort
memberof: Phaser.GameObjects.Mesh
scope: instance
returnstype: Phaser.GameObjects.Mesh
returnsdescription: This Mesh Game Object.
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Runs a depth sort across all Faces in this Mesh, comparing their averaged depth.

This is called automatically if you use any of the `rotate` methods, but you can
also invoke it to sort the Faces should you manually position them.


longname: Phaser.GameObjects.Mesh-addVertex
since: 3.50.0
name: addVertex
memberof: Phaser.GameObjects.Mesh
scope: instance
signature: x:number,y:number,z:number,u:number,v:number,color?:number,alpha?:number
returnstype: Phaser.GameObjects.Mesh
returnsdescription: This Mesh Game Object.
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Adds a new Vertex into the vertices array of this Mesh.

Just adding a vertex isn't enough to render it. You need to also
make it part of a Face, with 3 Vertex instances per Face.


longname: Phaser.GameObjects.Mesh-addFace
since: 3.50.0
name: addFace
memberof: Phaser.GameObjects.Mesh
scope: instance
signature: vertex1:Phaser.Geom.Mesh.Vertex,vertex2:Phaser.Geom.Mesh.Vertex,vertex3:Phaser.Geom.Mesh.Vertex
returnstype: Phaser.GameObjects.Mesh
returnsdescription: This Mesh Game Object.
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Adds a new Face into the faces array of this Mesh.

A Face consists of references to 3 Vertex instances, which must be provided.


longname: Phaser.GameObjects.Mesh-addVertices
since: 3.50.0
name: addVertices
memberof: Phaser.GameObjects.Mesh
scope: instance
returnstype: Phaser.GameObjects.Mesh
returnsdescription: This Mesh Game Object.
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Adds new vertices to this Mesh by parsing the given data.

This method will take vertex data in one of two formats, based on the `containsZ` parameter.

If your vertex data are `x`, `y` pairs, then `containsZ` should be `false` (this is the default, and will result in `z=0` for each vertex).

If your vertex data is groups of `x`, `y` and `z` values, then the `containsZ` parameter must be true.

The `uvs` parameter is a numeric array consisting of `u` and `v` pairs.

The `normals` parameter is a numeric array consisting of `x`, `y` vertex normal values and, if `containsZ` is true, `z` values as well.

The `indicies` parameter is an optional array that, if given, is an indexed list of vertices to be added.

The `colors` parameter is an optional array, or single value, that if given sets the color of each vertex created.

The `alphas` parameter is an optional array, or single value, that if given sets the alpha of each vertex created.

When providing indexed data it is assumed that _all_ of the arrays are indexed, not just the vertices.

The following example will create a 256 x 256 sized quad using an index array:

```javascript
let mesh = new Mesh(this);  // Assuming `this` is a scene!
const vertices = [
  -128, 128,
  128, 128,
  -128, -128,
  128, -128
];

const uvs = [
  0, 1,
  1, 1,
  0, 0,
  1, 0
];

const indices = [ 0, 2, 1, 2, 3, 1 ];

mesh.addVertices(vertices, uvs, indicies);
// Note: Otherwise the added points will be "behind" the camera! This value will project vertex `x` & `y` values 1:1 to pixel values.
mesh.hideCCW = false;
mesh.setOrtho(mesh.width, mesh.height);
```

If the data is not indexed, it's assumed that the arrays all contain sequential data.

signature:
vertices:Array.<number>,uvs:Array.<number>,indicies?:Array.<number>,containsZ?:boolean,normals?:Array.<number>,colors?:number|Array.<number>,alphas?:number|Array.<number>


longname: Phaser.GameObjects.Mesh-getFaceAt
since: 3.50.0
name: getFaceAt
memberof: Phaser.GameObjects.Mesh
scope: instance
signature: x:number,y:number,camera?:Phaser.Cameras.Scene2D.Camera
returnstype: Array.<Phaser.Geom.Mesh.Face>
returnsdescription: An array of Face objects that intersect with the given point, ordered by depth.
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Return an array of Face objects from this Mesh that intersect with the given coordinates.

The given position is translated through the matrix of this Mesh and the given Camera,
before being compared against the vertices.

If more than one Face intersects, they will all be returned in the array, but the array will
be depth sorted first, so the first element will always be that closest to the camera.


longname: Phaser.GameObjects.Mesh-setDebug
since: 3.50.0
name: setDebug
memberof: Phaser.GameObjects.Mesh
scope: instance
signature: graphic?:Phaser.GameObjects.Graphics,callback?:function
returnstype: Phaser.GameObjects.Mesh
returnsdescription: This Game Object instance.
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
This method enables rendering of the Mesh vertices to the given Graphics instance.

If you enable this feature, you **must** call `Graphics.clear()` in your Scene `update`,
otherwise the Graphics instance you provide to debug will fill-up with draw calls,
eventually crashing the browser. This is not done automatically to allow you to debug
draw multiple Mesh objects to a single Graphics instance.

The Mesh class has a built-in debug rendering callback `Mesh.renderDebug`, however
you can also provide your own callback to be used instead. Do this by setting the `callback` parameter.

The callback is invoked _once per render_ and sent the following parameters:

`callback(src, faces)`

`src` is the Mesh instance being debugged.
`faces` is an array of the Faces that were rendered.

You can get the final drawn vertex position from a Face object like this:

```javascript
let face = faces[i];

let x0 = face.vertex1.tx;
let y0 = face.vertex1.ty;
let x1 = face.vertex2.tx;
let y1 = face.vertex2.ty;
let x2 = face.vertex3.tx;
let y2 = face.vertex3.ty;

graphic.strokeTriangle(x0, y0, x1, y1, x2, y2);
```

If using your own callback you do not have to provide a Graphics instance to this method.

To disable debug rendering, to either your own callback or the built-in one, call this method
with no arguments.


longname: Phaser.GameObjects.Mesh-isDirty
since: 3.50.0
name: isDirty
memberof: Phaser.GameObjects.Mesh
scope: instance
returnstype: boolean
returnsdescription: Returns `true` if the data of this mesh is dirty, otherwise `false`.
metafilename: Mesh.js
metapath: gameobjects/mesh
description:
Checks if the transformation data in this mesh is dirty.

This is used internally by the `preUpdate` step to determine if the vertices should
be recalculated or not.


longname: Phaser.GameObjects.Mesh-preUpdate
since: 3.50.0
name: preUpdate
memberof: Phaser.GameObjects.Mesh
scope: instance
signature: time:number,delta:number
metafilename: Mesh.js
metapath: gameobjects/mesh
access: protected
description:
The Mesh update loop. The following takes place in this method:

First, the `totalRendered` and `totalFrame` properties are set.

If the view matrix of this Mesh isn't dirty, and the model position, rotate or scale properties are
all clean, then the method returns at this point.

Otherwise, if the viewPosition is dirty (i.e. from calling a method like `panZ`), then it will
refresh the viewMatrix.

After this, a new transformMatrix is built and it then iterates through all Faces in this
Mesh, calling `transformCoordinatesLocal` on all of them. Internally, this updates every
vertex, calculating its new transformed position, based on the new transform matrix.

Finally, the faces are depth sorted.


longname: Phaser.GameObjects.Mesh-renderCanvas
since: 3.0.0
name: renderCanvas
memberof: Phaser.GameObjects.Mesh
description: This is a stub function for Mesh.Render. There is no Canvas renderer for Mesh objects.
scope: instance
metafilename: MeshCanvasRenderer.js
metapath: gameobjects/mesh
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Mesh,camera:Phaser.Cameras.Scene2D.Camera


longname: Phaser.GameObjects.GameObjectCreator-mesh
since: 3.0.0
name: mesh
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.Mesh
returnsdescription: The Game Object that was created.
metafilename: MeshCreator.js
metapath: gameobjects/mesh
description:
Creates a new Mesh Game Object and returns it.

Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-mesh
since: 3.0.0
name: mesh
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Mesh
returnsdescription: The Game Object that was created.
metafilename: MeshFactory.js
metapath: gameobjects/mesh
description:
Creates a new Mesh Game Object and adds it to the Scene.

Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser.

signature:
x?:number,y?:number,texture?:string|Phaser.Textures.Texture,frame?:string|number,vertices?:Array.<number>,uvs?:Array.<number>,indicies?:Array.<number>,containsZ?:boolean,normals?:Array.<number>,colors?:number|Array.<number>,alphas?:number|Array.<number>


longname: Phaser.GameObjects.Mesh-renderWebGL
since: 3.0.0
name: renderWebGL
memberof: Phaser.GameObjects.Mesh
scope: instance
metafilename: MeshWebGLRenderer.js
metapath: gameobjects/mesh
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Mesh,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Particles.EmitterOp-loadConfig
since: 3.0.0
name: loadConfig
memberof: Phaser.GameObjects.Particles.EmitterOp
scope: instance
signature: config?:Phaser.Types.GameObjects.Particles.ParticleEmitterConfig,newKey?:string
metafilename: EmitterOp.js
metapath: gameobjects/particles
description:
Load the property from a Particle Emitter configuration object.

Optionally accepts a new property key to use, replacing the current one.


longname: Phaser.GameObjects.Particles.EmitterOp-setMethods
since: 3.0.0
name: setMethods
memberof: Phaser.GameObjects.Particles.EmitterOp
scope: instance
returnstype: Phaser.GameObjects.Particles.EmitterOp
returnsdescription: This Emitter Op object.
metafilename: EmitterOp.js
metapath: gameobjects/particles
description:
Update the [Phaser.GameObjects.Particles.EmitterOp#onEmit](Phaser.GameObjects.Particles.EmitterOp#onEmit) and
[Phaser.GameObjects.Particles.EmitterOp#onUpdate](Phaser.GameObjects.Particles.EmitterOp#onUpdate) callbacks based on the type of the current
[Phaser.GameObjects.Particles.EmitterOp#propertyValue](Phaser.GameObjects.Particles.EmitterOp#propertyValue).


longname: Phaser.GameObjects.Particles.EmitterOp-randomRangedValueEmit
since: 3.0.0
name: randomRangedValueEmit
memberof: Phaser.GameObjects.Particles.EmitterOp
scope: instance
signature: particle:Phaser.GameObjects.Particles.Particle,key:string
returnstype: number
returnsdescription: The new value of the property.
metafilename: EmitterOp.js
metapath: gameobjects/particles
description:
An `onEmit` callback that returns a value between the [Phaser.GameObjects.Particles.EmitterOp#start](Phaser.GameObjects.Particles.EmitterOp#start) and
[Phaser.GameObjects.Particles.EmitterOp#end](Phaser.GameObjects.Particles.EmitterOp#end) range.


longname: Phaser.GameObjects.Particles.EmitterOp-steppedEmit
since: 3.0.0
name: steppedEmit
memberof: Phaser.GameObjects.Particles.EmitterOp
scope: instance
returnstype: number
returnsdescription: The new value of the property.
metafilename: EmitterOp.js
metapath: gameobjects/particles
description:
An `onEmit` callback that returns a stepped value between the
[Phaser.GameObjects.Particles.EmitterOp#start](Phaser.GameObjects.Particles.EmitterOp#start) and [Phaser.GameObjects.Particles.EmitterOp#end](Phaser.GameObjects.Particles.EmitterOp#end)
range.


longname: Phaser.GameObjects.Particles.EmitterOp-easedValueEmit
since: 3.0.0
name: easedValueEmit
memberof: Phaser.GameObjects.Particles.EmitterOp
scope: instance
signature: particle:Phaser.GameObjects.Particles.Particle,key:string
returnstype: number
returnsdescription: {@link Phaser.GameObjects.Particles.EmitterOp#start}, as the new value of the property.
metafilename: EmitterOp.js
metapath: gameobjects/particles
description:
An `onEmit` callback for an eased property.

It prepares the particle for easing by [Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate](Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate).


longname: Phaser.GameObjects.Particles.EmitterOp-easeValueUpdate
since: 3.0.0
name: easeValueUpdate
memberof: Phaser.GameObjects.Particles.EmitterOp
scope: instance
signature: particle:Phaser.GameObjects.Particles.Particle,key:string,t:number
returnstype: number
returnsdescription: The new value of the property.
metafilename: EmitterOp.js
metapath: gameobjects/particles
description:
An `onUpdate` callback that returns an eased value between the
[Phaser.GameObjects.Particles.EmitterOp#start](Phaser.GameObjects.Particles.EmitterOp#start) and [Phaser.GameObjects.Particles.EmitterOp#end](Phaser.GameObjects.Particles.EmitterOp#end)
range.


longname: Phaser.GameObjects.Particles.Particle-checkBounds
since: 3.0.0
name: checkBounds
memberof: Phaser.GameObjects.Particles.Particle
scope: instance
signature: emitter:Phaser.GameObjects.Particles.ParticleEmitter
metafilename: Particle.js
metapath: gameobjects/particles
description:
Checks if this Particle is still within the bounds defined by the given Emitter.

If not, and depending on the Emitter collision flags, the Particle may either stop or rebound.


longname: Phaser.GameObjects.Particles.Particle-update
since: 3.0.0
name: update
memberof: Phaser.GameObjects.Particles.Particle
scope: instance
signature: delta:number,step:number,processors:array
returnstype: boolean
metafilename: Particle.js
metapath: gameobjects/particles
description:
The main update method for this Particle.

Updates its life values, computes the velocity and repositions the Particle.

returnsdescription:
Returns `true` if this Particle has now expired and should be removed, otherwise `false` if still active.


longname: Phaser.GameObjects.Particles.ParticleEmitter-getFrame
since: 3.0.0
name: getFrame
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
returnstype: Phaser.Textures.Frame
returnsdescription: The texture frame.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Chooses a texture frame from [Phaser.GameObjects.Particles.ParticleEmitter#frames](Phaser.GameObjects.Particles.ParticleEmitter#frames).


longname: Phaser.GameObjects.Particles.ParticleEmitter-setFrame
since: 3.0.0
name: setFrame
memberof: Phaser.GameObjects.Particles.ParticleEmitter
description: Sets a pattern for assigning texture frames to emitted particles.
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
signature:
frames:array|string|number|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig,pickRandom?:boolean,quantity?:number


longname: Phaser.GameObjects.Particles.ParticleEmitter-setRadial
since: 3.0.0
name: setRadial
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
signature: value?:boolean
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Turns [Phaser.GameObjects.Particles.ParticleEmitter#radial](Phaser.GameObjects.Particles.ParticleEmitter#radial) particle movement on or off.


longname: Phaser.GameObjects.Particles.ParticleEmitter-setPosition
since: 3.0.0
name: setPosition
memberof: Phaser.GameObjects.Particles.ParticleEmitter
description: Sets the position of the emitter's particle origin. New particles will be emitted here.
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
signature:
x:Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType,y:Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType


longname: Phaser.GameObjects.Particles.ParticleEmitter-setBounds
since: 3.0.0
name: setBounds
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Sets or modifies a rectangular boundary constraining the particles.

To remove the boundary, set [Phaser.GameObjects.Particles.ParticleEmitter#bounds](Phaser.GameObjects.Particles.ParticleEmitter#bounds) to null.

signature:
x:number|Phaser.Types.GameObjects.Particles.ParticleEmitterBounds|Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt,y:number,width:number,height:number


longname: Phaser.GameObjects.Particles.ParticleEmitter-setScaleX
since: 3.0.0
name: setScaleX
memberof: Phaser.GameObjects.Particles.ParticleEmitter
description: Sets the horizontal scale of emitted particles.
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
signature:
value:Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType


longname: Phaser.GameObjects.Particles.ParticleEmitter-setEmitterAngle
since: 3.0.0
name: setEmitterAngle
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
signature: value:Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Sets the angle of a [Phaser.GameObjects.Particles.ParticleEmitter#radial](Phaser.GameObjects.Particles.ParticleEmitter#radial) particle stream.


longname: Phaser.GameObjects.Particles.ParticleEmitter-setFrequency
since: 3.0.0
name: setFrequency
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
signature: frequency:number,quantity?:Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Sets the emitter's [Phaser.GameObjects.Particles.ParticleEmitter#frequency](Phaser.GameObjects.Particles.ParticleEmitter#frequency)
and [Phaser.GameObjects.Particles.ParticleEmitter#quantity](Phaser.GameObjects.Particles.ParticleEmitter#quantity).


longname: Phaser.GameObjects.Particles.ParticleEmitter-setEmitZone
since: 3.0.0
name: setEmitZone
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Sets or removes the [Phaser.GameObjects.Particles.ParticleEmitter#emitZone](Phaser.GameObjects.Particles.ParticleEmitter#emitZone).

An [EdgeZone](Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig) places particles on its edges. Its [source](Phaser.Types.GameObjects.Particles.EdgeZoneSource) can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable [getPoints](Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback) method.

A [RandomZone](Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig) places randomly within its interior. Its [source](RandomZoneSource) can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable [getRandomPoint](Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback) method.

signature:
zoneConfig?:Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig


longname: Phaser.GameObjects.Particles.ParticleEmitter-setDeathZone
since: 3.0.0
name: setDeathZone
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
signature: zoneConfig?:Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Sets or removes the [Phaser.GameObjects.Particles.ParticleEmitter#deathZone](Phaser.GameObjects.Particles.ParticleEmitter#deathZone).


longname: Phaser.GameObjects.Particles.ParticleEmitter-atLimit
since: 3.0.0
name: atLimit
memberof: Phaser.GameObjects.Particles.ParticleEmitter
description: Whether this emitter is at its limit (if set).
scope: instance
returnstype: boolean
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
returnsdescription:
Returns `true` if this Emitter is at its limit, or `false` if no limit, or below the `maxParticles` level.


longname: Phaser.GameObjects.Particles.ParticleEmitter-start
since: 3.0.0
name: start
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Turns [Phaser.GameObjects.Particles.ParticleEmitter#on](Phaser.GameObjects.Particles.ParticleEmitter#on) the emitter and resets the flow counter.

If this emitter is in flow mode (frequency >= 0; the default), the particle flow will start (or restart).

If this emitter is in explode mode (frequency = -1), nothing will happen.
Use [Phaser.GameObjects.Particles.ParticleEmitter#explode](Phaser.GameObjects.Particles.ParticleEmitter#explode) or [Phaser.GameObjects.Particles.ParticleEmitter#flow](Phaser.GameObjects.Particles.ParticleEmitter#flow) instead.


longname: Phaser.GameObjects.Particles.ParticleEmitter-depthSort
since: 3.0.0
name: depthSort
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Sorts active particles with [Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback](Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback).


longname: Phaser.GameObjects.Particles.ParticleEmitter-flow
since: 3.0.0
name: flow
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
signature: frequency:number,count?:Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: This Particle Emitter.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow.

To resume a flow at the current frequency and quantity, use [Phaser.GameObjects.Particles.ParticleEmitter#start](Phaser.GameObjects.Particles.ParticleEmitter#start) instead.


longname: Phaser.GameObjects.Particles.ParticleEmitter-explode
since: 3.0.0
name: explode
memberof: Phaser.GameObjects.Particles.ParticleEmitter
scope: instance
signature: count:number,x:number,y:number
returnstype: Phaser.GameObjects.Particles.Particle
returnsdescription: The most recently emitted Particle.
metafilename: ParticleEmitter.js
metapath: gameobjects/particles
description:
Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once.


longname: Phaser.GameObjects.Particles.ParticleEmitterManager-setTexture
since: 3.0.0
name: setTexture
memberof: Phaser.GameObjects.Particles.ParticleEmitterManager
scope: instance
signature: key:string,frame?:string|number
returnstype: Phaser.GameObjects.Particles.ParticleEmitterManager
returnsdescription: This Emitter Manager.
metafilename: ParticleEmitterManager.js
metapath: gameobjects/particles
description:
Sets the texture and frame this Emitter Manager will use to render with.

Textures are referenced by their string-based keys, as stored in the Texture Manager.


longname: Phaser.GameObjects.Particles.ParticleEmitterManager-setFrame
since: 3.0.0
name: setFrame
memberof: Phaser.GameObjects.Particles.ParticleEmitterManager
scope: instance
signature: frame?:string|number
returnstype: Phaser.GameObjects.Particles.ParticleEmitterManager
returnsdescription: This Emitter Manager.
metafilename: ParticleEmitterManager.js
metapath: gameobjects/particles
description:
Sets the frame this Emitter Manager will use to render with.

The Frame has to belong to the current Texture being used.

It can be either a string or an index.


longname: Phaser.GameObjects.Particles.ParticleEmitterManager-setEmitterFrames
since: 3.0.0
name: setEmitterFrames
memberof: Phaser.GameObjects.Particles.ParticleEmitterManager
description: Assigns texture frames to an emitter.
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitterManager
returnsdescription: This Emitter Manager.
metafilename: ParticleEmitterManager.js
metapath: gameobjects/particles
signature:
frames:Phaser.Textures.Frame|Array.<Phaser.Textures.Frame>,emitter:Phaser.GameObjects.Particles.ParticleEmitter


longname: Phaser.GameObjects.Particles.ParticleEmitterManager-createEmitter
since: 3.0.0
name: createEmitter
memberof: Phaser.GameObjects.Particles.ParticleEmitterManager
scope: instance
signature: config:Phaser.Types.GameObjects.Particles.ParticleEmitterConfig
returnstype: Phaser.GameObjects.Particles.ParticleEmitter
returnsdescription: The Particle Emitter that was created.
metafilename: ParticleEmitterManager.js
metapath: gameobjects/particles
description:
Creates a new Particle Emitter object, adds it to this Emitter Manager and returns a reference to it.


longname: Phaser.GameObjects.Particles.ParticleEmitterManager-pause
since: 3.0.0
name: pause
memberof: Phaser.GameObjects.Particles.ParticleEmitterManager
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitterManager
returnsdescription: This Emitter Manager.
metafilename: ParticleEmitterManager.js
metapath: gameobjects/particles
description:
Pauses this Emitter Manager.

This has the effect of pausing all emitters, and all particles of those emitters, currently under its control.

The particles will still render, but they will not have any of their logic updated.


longname: Phaser.GameObjects.Particles.ParticleEmitterManager-setAlpha
since: 3.10.0
name: setAlpha
memberof: Phaser.GameObjects.Particles.ParticleEmitterManager
scope: instance
metafilename: ParticleEmitterManager.js
metapath: gameobjects/particles
access: private
description:
A NOOP method so you can pass an EmitterManager to a Container.
Calling this method will do nothing. It is intentionally empty.


longname: Phaser.GameObjects.Particles.EmitterManager-renderCanvas
since: 3.0.0
name: renderCanvas
memberof: Phaser.GameObjects.Particles.EmitterManager
scope: instance
metafilename: ParticleManagerCanvasRenderer.js
metapath: gameobjects/particles
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,emitterManager:Phaser.GameObjects.Particles.ParticleEmitterManager,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectCreator-particles
since: 3.0.0
name: particles
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.Particles.ParticleEmitterManager
returnsdescription: The Game Object that was created.
metafilename: ParticleManagerCreator.js
metapath: gameobjects/particles
description:
Creates a new Particle Emitter Manager Game Object and returns it.

Note: This method will only be available if the Particles Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-particles
since: 3.0.0
name: particles
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Particles.ParticleEmitterManager
returnsdescription: The Game Object that was created.
metafilename: ParticleManagerFactory.js
metapath: gameobjects/particles
description:
Creates a new Particle Emitter Manager Game Object and adds it to the Scene.

Note: This method will only be available if the Particles Game Object has been built into Phaser.

signature:
texture:string|Phaser.Textures.Texture,frame?:string|number|object,emitters?:Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Array.<Phaser.Types.GameObjects.Particles.ParticleEmitterConfig>


longname: Phaser.GameObjects.Particles.EmitterManager-renderWebGL
since: 3.0.0
name: renderWebGL
memberof: Phaser.GameObjects.Particles.EmitterManager
scope: instance
metafilename: ParticleManagerWebGLRenderer.js
metapath: gameobjects/particles
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,emitterManager:Phaser.GameObjects.Particles.ParticleEmitterManager,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Particles.Zones.EdgeZone-updateSource
since: 3.0.0
name: updateSource
memberof: Phaser.GameObjects.Particles.Zones.EdgeZone
scope: instance
returnstype: Phaser.GameObjects.Particles.Zones.EdgeZone
returnsdescription: This Edge Zone.
metafilename: EdgeZone.js
metapath: gameobjects/particles/zones
description:
Update the [Phaser.GameObjects.Particles.Zones.EdgeZone#points](Phaser.GameObjects.Particles.Zones.EdgeZone#points) from the EdgeZone's
[Phaser.GameObjects.Particles.Zones.EdgeZone#source](Phaser.GameObjects.Particles.Zones.EdgeZone#source).

Also updates internal properties.


longname: Phaser.GameObjects.GameObjectFactory-follower
since: 3.0.0
name: follower
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.PathFollower
returnsdescription: The Game Object that was created.
metafilename: PathFollowerFactory.js
metapath: gameobjects/pathfollower
description:
Creates a new PathFollower Game Object and adds it to the Scene.

Note: This method will only be available if the PathFollower Game Object has been built into Phaser.

signature:
path:Phaser.Curves.Path,x:number,y:number,texture:string|Phaser.Textures.Texture,frame?:string|number


longname: Phaser.GameObjects.GameObjectCreator-pointlight
since: 3.50.0
name: pointlight
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.PointLight
returnsdescription: The Game Object that was created.
metafilename: PointLightCreator.js
metapath: gameobjects/pointlight
description:
Creates a new Point Light Game Object and returns it.

Note: This method will only be available if the Point Light Game Object has been built into Phaser.


longname: Phaser.GameObjects.PointLight-renderWebGL
since: 3.50.0
name: renderWebGL
memberof: Phaser.GameObjects.PointLight
scope: instance
metafilename: PointLightWebGLRenderer.js
metapath: gameobjects/pointlight
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.PointLight,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.RenderTexture-resize
since: 3.10.0
name: resize
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: width:number,height?:number
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Resizes the Render Texture to the new dimensions given.

If Render Texture was created from specific frame, only the size of the frame will be changed. The size of the source
texture will not change.

If Render Texture was not created from specific frame, the following will happen:

In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture.
In Canvas it will resize the underlying canvas element.

Both approaches will erase everything currently drawn to the Render Texture.

If the dimensions given are the same as those already being used, calling this method will do nothing.


longname: Phaser.GameObjects.RenderTexture-saveTexture
since: 3.12.0
name: saveTexture
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: key:string
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was saved.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Stores a copy of this Render Texture in the Texture Manager using the given key.

After doing this, any texture based Game Object, such as a Sprite, can use the contents of this
Render Texture by using the texture key:

```javascript
var rt = this.add.renderTexture(0, 0, 128, 128);

// Draw something to the Render Texture

rt.saveTexture('doodle');

this.add.image(400, 300, 'doodle');
```

Updating the contents of this Render Texture will automatically update _any_ Game Object
that is using it as a texture. Calling `saveTexture` again will not save another copy
of the same texture, it will just rename the key of the existing copy.

By default it will create a single base texture. You can add frames to the texture
by using the `Texture.add` method. After doing this, you can then allow Game Objects
to use a specific frame from a Render Texture.

If you destroy this Render Texture, any Game Object using it via the Texture Manager will
stop rendering. Ensure you remove the texture from the Texture Manager and any Game Objects
using it first, before destroying this Render Texture.


longname: Phaser.GameObjects.RenderTexture-erase
since: 3.16.0
name: erase
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: entries:any,x?:number,y?:number
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Draws the given object, or an array of objects, to this Render Texture using a blend mode of ERASE.
This has the effect of erasing any filled pixels in the objects from this Render Texture.

It can accept any of the following:

* Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.
* Tilemap Layers.
* A Group. The contents of which will be iterated and drawn in turn.
* A Container. The contents of which will be iterated fully, and drawn in turn.
* A Scene's Display List. Pass in `Scene.children` to draw the whole list.
* Another Render Texture.
* A Texture Frame instance.
* A string. This is used to look-up a texture from the Texture Manager.

Note: You cannot erase a Render Texture from itself.

If passing in a Group or Container it will only draw children that return `true`
when their `willRender()` method is called. I.e. a Container with 10 children,
5 of which have `visible=false` will only draw the 5 visible ones.

If passing in an array of Game Objects it will draw them all, regardless if
they pass a `willRender` check or not.

You can pass in a string in which case it will look for a texture in the Texture
Manager matching that string, and draw the base frame.

You can pass in the `x` and `y` coordinates to draw the objects at. The use of
the coordinates differ based on what objects are being drawn. If the object is
a Group, Container or Display List, the coordinates are _added_ to the positions
of the children. For all other types of object, the coordinates are exact.

Calling this method causes the WebGL batch to flush, so it can write the texture
data to the framebuffer being used internally. The batch is flushed at the end,
after the entries have been iterated. So if you've a bunch of objects to draw,
try and pass them in an array in one single call, rather than making lots of
separate calls.


longname: Phaser.GameObjects.RenderTexture-draw
since: 3.2.0
name: draw
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: entries:any,x?:number,y?:number,alpha?:number,tint?:number
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Draws the given object, or an array of objects, to this Render Texture.

It can accept any of the following:

* Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.
* Tilemap Layers.
* A Group. The contents of which will be iterated and drawn in turn.
* A Container. The contents of which will be iterated fully, and drawn in turn.
* A Scene's Display List. Pass in `Scene.children` to draw the whole list.
* Another Render Texture.
* A Texture Frame instance.
* A string. This is used to look-up a texture from the Texture Manager.

Note: You cannot draw a Render Texture to itself.

If passing in a Group or Container it will only draw children that return `true`
when their `willRender()` method is called. I.e. a Container with 10 children,
5 of which have `visible=false` will only draw the 5 visible ones.

If passing in an array of Game Objects it will draw them all, regardless if
they pass a `willRender` check or not.

You can pass in a string in which case it will look for a texture in the Texture
Manager matching that string, and draw the base frame. If you need to specify
exactly which frame to draw then use the method `drawFrame` instead.

You can pass in the `x` and `y` coordinates to draw the objects at. The use of
the coordinates differ based on what objects are being drawn. If the object is
a Group, Container or Display List, the coordinates are _added_ to the positions
of the children. For all other types of object, the coordinates are exact.

The `alpha` and `tint` values are only used by Texture Frames.
Game Objects use their own alpha and tint values when being drawn.

Calling this method causes the WebGL batch to flush, so it can write the texture
data to the framebuffer being used internally. The batch is flushed at the end,
after the entries have been iterated. So if you've a bunch of objects to draw,
try and pass them in an array in one single call, rather than making lots of
separate calls.


longname: Phaser.GameObjects.RenderTexture-drawFrame
since: 3.12.0
name: drawFrame
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: key:string,frame?:string|number,x?:number,y?:number,alpha?:number,tint?:number
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Draws the Texture Frame to the Render Texture at the given position.

Textures are referenced by their string-based keys, as stored in the Texture Manager.

```javascript
var rt = this.add.renderTexture(0, 0, 800, 600);
rt.drawFrame(key, frame);
```

You can optionally provide a position, alpha and tint value to apply to the frame
before it is drawn.

Calling this method will cause a batch flush, so if you've got a stack of things to draw
in a tight loop, try using the `draw` method instead.

If you need to draw a Sprite to this Render Texture, use the `draw` method instead.


longname: Phaser.GameObjects.RenderTexture-beginDraw
since: 3.50.0
name: beginDraw
memberof: Phaser.GameObjects.RenderTexture
scope: instance
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Use this method if you need to batch draw a large number of Game Objects to
this Render Texture in a single go, or on a frequent basis.

This method starts the beginning of a batched draw.

It is faster than calling `draw`, but you must be very careful to manage the
flow of code and remember to call `endDraw()`. If you don't need to draw large
numbers of objects it's much safer and easier to use the `draw` method instead.

The flow should be:

```javascript
// Call once:
RenderTexture.beginDraw();

// repeat n times:
RenderTexture.batchDraw();
// or
RenderTexture.batchDrawFrame();

// Call once:
RenderTexture.endDraw();
```

Do not call any methods other than `batchDraw`, `batchDrawFrame`, or `endDraw` once you
have started a batch. Also, be very careful not to destroy this Render Texture while the
batch is still open, or call `beginDraw` again.


longname: Phaser.GameObjects.RenderTexture-batchDraw
since: 3.50.0
name: batchDraw
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: entries:any,x?:number,y?:number,alpha?:number,tint?:number
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Use this method if you have already called `beginDraw` and need to batch
draw a large number of objects to this Render Texture.

This method batches the drawing of the given objects to this Render Texture,
without causing a bind or batch flush.

It is faster than calling `draw`, but you must be very careful to manage the
flow of code and remember to call `endDraw()`. If you don't need to draw large
numbers of objects it's much safer and easier to use the `draw` method instead.

The flow should be:

```javascript
// Call once:
RenderTexture.beginDraw();

// repeat n times:
RenderTexture.batchDraw();
// or
RenderTexture.batchDrawFrame();

// Call once:
RenderTexture.endDraw();
```

Do not call any methods other than `batchDraw`, `batchDrawFrame`, or `endDraw` once you
have started a batch. Also, be very careful not to destroy this Render Texture while the
batch is still open, or call `beginDraw` again.

Draws the given object, or an array of objects, to this Render Texture.

It can accept any of the following:

* Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.
* Tilemap Layers.
* A Group. The contents of which will be iterated and drawn in turn.
* A Container. The contents of which will be iterated fully, and drawn in turn.
* A Scene's Display List. Pass in `Scene.children` to draw the whole list.
* Another Render Texture.
* A Texture Frame instance.
* A string. This is used to look-up a texture from the Texture Manager.

Note: You cannot draw a Render Texture to itself.

If passing in a Group or Container it will only draw children that return `true`
when their `willRender()` method is called. I.e. a Container with 10 children,
5 of which have `visible=false` will only draw the 5 visible ones.

If passing in an array of Game Objects it will draw them all, regardless if
they pass a `willRender` check or not.

You can pass in a string in which case it will look for a texture in the Texture
Manager matching that string, and draw the base frame. If you need to specify
exactly which frame to draw then use the method `drawFrame` instead.

You can pass in the `x` and `y` coordinates to draw the objects at. The use of
the coordinates differ based on what objects are being drawn. If the object is
a Group, Container or Display List, the coordinates are _added_ to the positions
of the children. For all other types of object, the coordinates are exact.

The `alpha` and `tint` values are only used by Texture Frames.
Game Objects use their own alpha and tint values when being drawn.


longname: Phaser.GameObjects.RenderTexture-batchDrawFrame
since: 3.50.0
name: batchDrawFrame
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: key:string,frame?:string|number,x?:number,y?:number,alpha?:number,tint?:number
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Use this method if you have already called `beginDraw` and need to batch
draw a large number of texture frames to this Render Texture.

This method batches the drawing of the given frames to this Render Texture,
without causing a bind or batch flush.

It is faster than calling `drawFrame`, but you must be very careful to manage the
flow of code and remember to call `endDraw()`. If you don't need to draw large
numbers of frames it's much safer and easier to use the `drawFrame` method instead.

The flow should be:

```javascript
// Call once:
RenderTexture.beginDraw();

// repeat n times:
RenderTexture.batchDraw();
// or
RenderTexture.batchDrawFrame();

// Call once:
RenderTexture.endDraw();
```

Do not call any methods other than `batchDraw`, `batchDrawFrame`, or `endDraw` once you
have started a batch. Also, be very careful not to destroy this Render Texture while the
batch is still open, or call `beginDraw` again.

Draws the Texture Frame to the Render Texture at the given position.

Textures are referenced by their string-based keys, as stored in the Texture Manager.

```javascript
var rt = this.add.renderTexture(0, 0, 800, 600);
rt.drawFrame(key, frame);
```

You can optionally provide a position, alpha and tint value to apply to the frame
before it is drawn.

Calling this method will cause a batch flush, so if you've got a stack of things to draw
in a tight loop, try using the `draw` method instead.

If you need to draw a Sprite to this Render Texture, use the `draw` method instead.


longname: Phaser.GameObjects.RenderTexture-endDraw
since: 3.50.0
name: endDraw
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: erase?:boolean
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Use this method to finish batch drawing to this Render Texture.

Never call this method without first calling `beginDraw`.

It is faster than calling `draw`, but you must be very careful to manage the
flow of code and remember to call `endDraw()`. If you don't need to draw large
numbers of objects it's much safer and easier to use the `draw` method instead.

The flow should be:

```javascript
// Call once:
RenderTexture.beginDraw();

// repeat n times:
RenderTexture.batchDraw();
// or
RenderTexture.batchDrawFrame();

// Call once:
RenderTexture.endDraw();
```

Do not call any methods other than `batchDraw`, `batchDrawFrame`, or `endDraw` once you
have started a batch. Also, be very careful not to destroy this Render Texture while the
batch is still open, or call `beginDraw` again.


longname: Phaser.GameObjects.RenderTexture-batchGameObjectWebGL
since: 3.12.0
name: batchGameObjectWebGL
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,x?:number,y?:number
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
access: private
description:
Internal method that handles drawing a single Phaser Game Object to this Render Texture using WebGL.


longname: Phaser.GameObjects.RenderTexture-batchGameObjectCanvas
since: 3.12.0
name: batchGameObjectCanvas
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,x?:number,y?:number
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
access: private
description:
Internal method that handles drawing a single Phaser Game Object to this Render Texture using Canvas.


longname: Phaser.GameObjects.RenderTexture-snapshotArea
since: 3.19.0
name: snapshotArea
memberof: Phaser.GameObjects.RenderTexture
scope: instance
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Takes a snapshot of the given area of this Render Texture.

The snapshot is taken immediately.

To capture the whole Render Texture see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.

Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.
It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,
which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,
which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.

signature:
x:number,y:number,width:number,height:number,callback:Phaser.Types.Renderer.Snapshot.SnapshotCallback,type?:string,encoderOptions?:number


longname: Phaser.GameObjects.RenderTexture-snapshot
since: 3.19.0
name: snapshot
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: callback:Phaser.Types.Renderer.Snapshot.SnapshotCallback,type?:string,encoderOptions?:number
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Takes a snapshot of the whole of this Render Texture.

The snapshot is taken immediately.

To capture just a portion of the Render Texture see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.

Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.
It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,
which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,
which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.


longname: Phaser.GameObjects.RenderTexture-snapshotPixel
since: 3.19.0
name: snapshotPixel
memberof: Phaser.GameObjects.RenderTexture
scope: instance
signature: x:number,y:number,callback:Phaser.Types.Renderer.Snapshot.SnapshotCallback
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: This Render Texture instance.
metafilename: RenderTexture.js
metapath: gameobjects/rendertexture
description:
Takes a snapshot of the given pixel from this Render Texture.

The snapshot is taken immediately.

To capture the whole Render Texture see the `snapshot` method. To capture a specific portion, see `snapshotArea`.

Unlike the other two snapshot methods, this one will send your callback a `Color` object containing the color data for
the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,
using less memory, than the other snapshot methods.


longname: Phaser.GameObjects.RenderTexture-renderCanvas
since: 3.2.0
name: renderCanvas
memberof: Phaser.GameObjects.RenderTexture
scope: instance
metafilename: RenderTextureCanvasRenderer.js
metapath: gameobjects/rendertexture
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.RenderTexture,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectCreator-renderTexture
since: 3.2.0
name: renderTexture
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:Phaser.Types.GameObjects.RenderTexture.RenderTextureConfig,addToScene?:boolean
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: The Game Object that was created.
metafilename: RenderTextureCreator.js
metapath: gameobjects/rendertexture
description:
Creates a new Render Texture Game Object and returns it.

Note: This method will only be available if the Render Texture Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-renderTexture
since: 3.2.0
name: renderTexture
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x:number,y:number,width?:number,height?:number
returnstype: Phaser.GameObjects.RenderTexture
returnsdescription: The Game Object that was created.
metafilename: RenderTextureFactory.js
metapath: gameobjects/rendertexture
description:
Creates a new Render Texture Game Object and adds it to the Scene.

Note: This method will only be available if the Render Texture Game Object has been built into Phaser.

A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and
draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic
textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads.


longname: Phaser.GameObjects.RenderTexture-renderWebGL
since: 3.2.0
name: renderWebGL
memberof: Phaser.GameObjects.RenderTexture
scope: instance
metafilename: RenderTextureWebGLRenderer.js
metapath: gameobjects/rendertexture
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.RenderTexture,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Rope-setDirty
since: 3.23.0
name: setDirty
memberof: Phaser.GameObjects.Rope
scope: instance
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
Flags this Rope as being dirty. A dirty rope will recalculate all of its vertices data
the _next_ time it renders. You should set this rope as dirty if you update the points
array directly.


longname: Phaser.GameObjects.Rope-setHorizontal
since: 3.23.0
name: setHorizontal
memberof: Phaser.GameObjects.Rope
scope: instance
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
Sets the alignment of the points in this Rope to be horizontal, in a strip format.

Calling this method will reset this Rope. The current points, vertices, colors and alpha
values will be reset to thoes values given as parameters.

signature:
points?:number|Array.<Phaser.Types.Math.Vector2Like>,colors?:number|Array.<number>,alphas?:number|Array.<number>


longname: Phaser.GameObjects.Rope-setVertical
since: 3.23.0
name: setVertical
memberof: Phaser.GameObjects.Rope
scope: instance
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
Sets the alignment of the points in this Rope to be vertical, in a column format.

Calling this method will reset this Rope. The current points, vertices, colors and alpha
values will be reset to thoes values given as parameters.

signature:
points?:number|Array.<Phaser.Types.Math.Vector2Like>,colors?:number|Array.<number>,alphas?:number|Array.<number>


longname: Phaser.GameObjects.Rope-setTintFill
since: 3.23.0
name: setTintFill
memberof: Phaser.GameObjects.Rope
scope: instance
signature: value?:boolean
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
Sets the tint fill mode.

Mode 0 (`false`) is an additive tint, the default, which blends the vertices colors with the texture.
This mode respects the texture alpha.

Mode 1 (`true`) is a fill tint. Unlike an additive tint, a fill-tint literally replaces the pixel colors
from the texture with those in the tint. You can use this for effects such as making a player flash 'white'
if hit by something. This mode respects the texture alpha.

See the `setColors` method for details of how to color each of the vertices.


longname: Phaser.GameObjects.Rope-setAlphas
since: 3.23.0
name: setAlphas
memberof: Phaser.GameObjects.Rope
scope: instance
signature: alphas?:number|Array.<number>,bottomAlpha?:number
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
Set the alpha values used by the Rope during rendering.

You can provide the values in a number of ways:

1) One single numeric value: `setAlphas(0.5)` - This will set a single alpha for the whole Rope.
2) Two numeric value: `setAlphas(1, 0.5)` - This will set a 'top' and 'bottom' alpha value across the whole Rope.
3) An array of values: `setAlphas([ 1, 0.5, 0.2 ])`

If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it
will use each alpha value per rope segment.

If the provided array has a different number of values than `points` then it will use the values in order, from
the first Rope segment and on, until it runs out of values. This allows you to control the alpha values at all
vertices in the Rope.

Note this method is called `setAlphas` (plural) and not `setAlpha`.


longname: Phaser.GameObjects.Rope-setColors
since: 3.23.0
name: setColors
memberof: Phaser.GameObjects.Rope
scope: instance
signature: colors?:number|Array.<number>
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
Set the color values used by the Rope during rendering.

Colors are used to control the level of tint applied across the Rope texture.

You can provide the values in a number of ways:

* One single numeric value: `setColors(0xff0000)` - This will set a single color tint for the whole Rope.
* An array of values: `setColors([ 0xff0000, 0x00ff00, 0x0000ff ])`

If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it
will use each color per rope segment.

If the provided array has a different number of values than `points` then it will use the values in order, from
the first Rope segment and on, until it runs out of values. This allows you to control the color values at all
vertices in the Rope.


longname: Phaser.GameObjects.Rope-setPoints
since: 3.23.0
name: setPoints
memberof: Phaser.GameObjects.Rope
scope: instance
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
Sets the points used by this Rope.

The points should be provided as an array of Vector2, or vector2-like objects (i.e. those with public x/y properties).

Each point corresponds to one segment of the Rope. The more points in the array, the more segments the rope has.

Point coordinates are given in local-space, not world-space, and are directly related to the size of the texture
this Rope object is using.

For example, a Rope using a 512 px wide texture, split into 4 segments (128px each) would use the following points:

```javascript
rope.setPoints([
  { x: 0, y: 0 },
  { x: 128, y: 0 },
  { x: 256, y: 0 },
  { x: 384, y: 0 }
]);
```

Or, you can provide an integer to do the same thing:

```javascript
rope.setPoints(4);
```

Which will divide the Rope into 4 equally sized segments based on the frame width.

Note that calling this method with a different number of points than the Rope has currently will
_reset_ the color and alpha values, unless you provide them as arguments to this method.

signature:
points?:number|Array.<Phaser.Types.Math.Vector2Like>,colors?:number|Array.<number>,alphas?:number|Array.<number>


longname: Phaser.GameObjects.Rope-resizeArrays
since: 3.23.0
name: resizeArrays
memberof: Phaser.GameObjects.Rope
scope: instance
signature: newSize:number
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
Resizes all of the internal arrays: `vertices`, `uv`, `colors` and `alphas` to the new
given Rope segment total.


longname: Phaser.GameObjects.Rope-updateVertices
since: 3.23.0
name: updateVertices
memberof: Phaser.GameObjects.Rope
scope: instance
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
Updates the vertices based on the Rope points.

This method is called automatically during rendering if `Rope.dirty` is `true`, which is set
by the `setPoints` and `setDirty` methods. You should flag the Rope as being dirty if you modify
the Rope points directly.


longname: Phaser.GameObjects.Rope-setDebug
since: 3.23.0
name: setDebug
memberof: Phaser.GameObjects.Rope
scope: instance
signature: graphic?:Phaser.GameObjects.Graphics,callback?:function
returnstype: Phaser.GameObjects.Rope
returnsdescription: This Game Object instance.
metafilename: Rope.js
metapath: gameobjects/rope
description:
This method enables rendering of the Rope vertices to the given Graphics instance.

If you enable this feature, you **must** call `Graphics.clear()` in your Scene `update`,
otherwise the Graphics instance you provide to debug will fill-up with draw calls,
eventually crashing the browser. This is not done automatically to allow you to debug
draw multiple Rope objects to a single Graphics instance.

The Rope class has a built-in debug rendering callback `Rope.renderDebugVerts`, however
you can also provide your own callback to be used instead. Do this by setting the `callback` parameter.

The callback is invoked _once per render_ and sent the following parameters:

`callback(src, meshLength, verts)`

`src` is the Rope instance being debugged.
`meshLength` is the number of mesh vertices in total.
`verts` is an array of the translated vertex coordinates.

If using your own callback you do not have to provide a Graphics instance to this method.

To disable debug rendering, to either your own callback or the built-in one, call this method
with no arguments.


longname: Phaser.GameObjects.Rope-renderCanvas
since: 3.23.0
name: renderCanvas
memberof: Phaser.GameObjects.Rope
description: This is a stub function for Rope.Render. There is no Canvas renderer for Rope objects.
scope: instance
metafilename: RopeCanvasRenderer.js
metapath: gameobjects/rope
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Rope,camera:Phaser.Cameras.Scene2D.Camera


longname: Phaser.GameObjects.GameObjectCreator-rope
since: 3.23.0
name: rope
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.Rope
returnsdescription: The Game Object that was created.
metafilename: RopeCreator.js
metapath: gameobjects/rope
description:
Creates a new Rope Game Object and returns it.

Note: This method will only be available if the Rope Game Object and WebGL support have been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-rope
since: 3.23.0
name: rope
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Rope
returnsdescription: The Game Object that was created.
metafilename: RopeFactory.js
metapath: gameobjects/rope
description:
Creates a new Rope Game Object and adds it to the Scene.

Note: This method will only be available if the Rope Game Object and WebGL support have been built into Phaser.

signature:
x:number,y:number,texture:string|Phaser.Textures.Texture,frame?:string|number,points?:Array.<Phaser.Types.Math.Vector2Like>,horizontal?:boolean,colors?:Array.<number>,alphas?:Array.<number>


longname: Phaser.GameObjects.Rope-renderWebGL
since: 3.23.0
name: renderWebGL
memberof: Phaser.GameObjects.Rope
scope: instance
metafilename: RopeWebGLRenderer.js
metapath: gameobjects/rope
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Rope,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Shader-setRenderToTexture
since: 3.19.0
name: setRenderToTexture
memberof: Phaser.GameObjects.Shader
scope: instance
signature: key?:string,flipY?:boolean
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
Changes this Shader so instead of rendering to the display list it renders to a
WebGL Framebuffer and WebGL Texture instead. This allows you to use the output
of this shader as an input for another shader, by mapping a sampler2D uniform
to it.

After calling this method the `Shader.framebuffer` and `Shader.glTexture` properties
are populated.

Additionally, you can provide a key to this method. Doing so will create a Phaser Texture
from this Shader and save it into the Texture Manager, allowing you to then use it for
any texture-based Game Object, such as a Sprite or Image:

```javascript
var shader = this.add.shader('myShader', x, y, width, height);

shader.setRenderToTexture('doodle');

this.add.image(400, 300, 'doodle');
```

Note that it stores an active reference to this Shader. That means as this shader updates,
so does the texture and any object using it to render with. Also, if you destroy this
shader, be sure to clear any objects that may have been using it as a texture too.

You can access the Phaser Texture that is created via the `Shader.texture` property.

By default it will create a single base texture. You can add frames to the texture
by using the `Texture.add` method. After doing this, you can then allow Game Objects
to use a specific frame from a Render Texture.


longname: Phaser.GameObjects.Shader-setShader
since: 3.17.0
name: setShader
memberof: Phaser.GameObjects.Shader
scope: instance
signature: key:string|Phaser.Display.BaseShader,textures?:Array.<string>,textureData?:any
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
Sets the fragment and, optionally, the vertex shader source code that this Shader will use.
This will immediately delete the active shader program, if set, and then create a new one
with the given source. Finally, the shader uniforms are initialized.


longname: Phaser.GameObjects.Shader-setPointer
since: 3.17.0
name: setPointer
memberof: Phaser.GameObjects.Shader
scope: instance
signature: pointer?:Phaser.Input.Pointer
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
Binds a Phaser Pointer object to this Shader.

The screen position of the pointer will be set in to the shaders `mouse` uniform
automatically every frame. Call this method with no arguments to unbind the pointer.


longname: Phaser.GameObjects.Shader-projOrtho
since: 3.17.0
name: projOrtho
memberof: Phaser.GameObjects.Shader
scope: instance
signature: left:number,right:number,bottom:number,top:number
metafilename: Shader.js
metapath: gameobjects/shader
description:
Sets this shader to use an orthographic projection matrix.
This matrix is stored locally in the `projectionMatrix` property,
as well as being bound to the `uProjectionMatrix` uniform.


longname: Phaser.GameObjects.Shader-setSampler2DBuffer
since: 3.19.0
name: setSampler2DBuffer
memberof: Phaser.GameObjects.Shader
scope: instance
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
Sets a sampler2D uniform on this shader where the source texture is a WebGLTexture.

This allows you to feed the output from one Shader into another:

```javascript
let shader1 = this.add.shader(baseShader1, 0, 0, 512, 512).setRenderToTexture();
let shader2 = this.add.shader(baseShader2, 0, 0, 512, 512).setRenderToTexture('output');

shader1.setSampler2DBuffer('iChannel0', shader2.glTexture, 512, 512);
shader2.setSampler2DBuffer('iChannel0', shader1.glTexture, 512, 512);
```

In the above code, the result of baseShader1 is fed into Shader2 as the `iChannel0` sampler2D uniform.
The result of baseShader2 is then fed back into shader1 again, creating a feedback loop.

If you wish to use an image from the Texture Manager as a sampler2D input for this shader,
see the `Shader.setSampler2D` method.

signature:
uniformKey:string,texture:WebGLTexture,width:number,height:number,textureIndex?:number,textureData?:any


longname: Phaser.GameObjects.Shader-setSampler2D
since: 3.17.0
name: setSampler2D
memberof: Phaser.GameObjects.Shader
scope: instance
signature: uniformKey:string,textureKey:string,textureIndex?:number,textureData?:any
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
Sets a sampler2D uniform on this shader.

The textureKey given is the key from the Texture Manager cache. You cannot use a single frame
from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.

If you wish to use another Shader as a sampler2D input for this shader, see the `Shader.setSampler2DBuffer` method.


longname: Phaser.GameObjects.Shader-setUniform
since: 3.17.0
name: setUniform
memberof: Phaser.GameObjects.Shader
scope: instance
signature: key:string,value:any
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
Sets a property of a uniform already present on this shader.

To modify the value of a uniform such as a 1f or 1i use the `value` property directly:

```javascript
shader.setUniform('size.value', 16);
```

You can use dot notation to access deeper values, for example:

```javascript
shader.setUniform('resolution.value.x', 512);
```

The change to the uniform will take effect the next time the shader is rendered.


longname: Phaser.GameObjects.Shader-getUniform
since: 3.17.0
name: getUniform
memberof: Phaser.GameObjects.Shader
description: Returns the uniform object for the given key, or `null` if the uniform couldn't be found.
scope: instance
signature: key:string
returnstype: any
metafilename: Shader.js
metapath: gameobjects/shader
returnsdescription:
A reference to the uniform object. This is not a copy, so modifying it will update the original object also.


longname: Phaser.GameObjects.Shader-setChannel0
since: 3.17.0
name: setChannel0
memberof: Phaser.GameObjects.Shader
scope: instance
signature: textureKey:string,textureData?:any
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
A short-cut method that will directly set the texture being used by the `iChannel0` sampler2D uniform.

The textureKey given is the key from the Texture Manager cache. You cannot use a single frame
from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.


longname: Phaser.GameObjects.Shader-setChannel1
since: 3.17.0
name: setChannel1
memberof: Phaser.GameObjects.Shader
scope: instance
signature: textureKey:string,textureData?:any
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
A short-cut method that will directly set the texture being used by the `iChannel1` sampler2D uniform.

The textureKey given is the key from the Texture Manager cache. You cannot use a single frame
from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.


longname: Phaser.GameObjects.Shader-setChannel2
since: 3.17.0
name: setChannel2
memberof: Phaser.GameObjects.Shader
scope: instance
signature: textureKey:string,textureData?:any
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
A short-cut method that will directly set the texture being used by the `iChannel2` sampler2D uniform.

The textureKey given is the key from the Texture Manager cache. You cannot use a single frame
from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.


longname: Phaser.GameObjects.Shader-setChannel3
since: 3.17.0
name: setChannel3
memberof: Phaser.GameObjects.Shader
scope: instance
signature: textureKey:string,textureData?:any
returnstype: Phaser.GameObjects.Shader
returnsdescription: This Shader instance.
metafilename: Shader.js
metapath: gameobjects/shader
description:
A short-cut method that will directly set the texture being used by the `iChannel3` sampler2D uniform.

The textureKey given is the key from the Texture Manager cache. You cannot use a single frame
from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.


longname: Phaser.GameObjects.Shader-initSampler2D
since: 3.17.0
name: initSampler2D
memberof: Phaser.GameObjects.Shader
scope: instance
signature: uniform:any
metafilename: Shader.js
metapath: gameobjects/shader
access: private
description:
Internal method that takes a sampler2D uniform and prepares it for use by setting the
gl texture parameters.


longname: Phaser.GameObjects.Shader-load
since: 3.17.0
name: load
memberof: Phaser.GameObjects.Shader
scope: instance
signature: matrix2D?:Phaser.GameObjects.Components.TransformMatrix
metafilename: Shader.js
metapath: gameobjects/shader
description:
Called automatically during render.

This method performs matrix ITRS and then stores the resulting value in the `uViewMatrix` uniform.
It then sets up the vertex buffer and shader, updates and syncs the uniforms ready
for flush to be called.


longname: Phaser.GameObjects.Shader-flush
since: 3.17.0
name: flush
memberof: Phaser.GameObjects.Shader
scope: instance
metafilename: Shader.js
metapath: gameobjects/shader
description:
Called automatically during render.

Sets the active shader, loads the vertex buffer and then draws.


longname: Phaser.GameObjects.Shader-setAlpha
since: 3.17.0
name: setAlpha
memberof: Phaser.GameObjects.Shader
scope: instance
metafilename: Shader.js
metapath: gameobjects/shader
access: private
description:
A NOOP method so you can pass a Shader to a Container.
Calling this method will do nothing. It is intentionally empty.


longname: Phaser.GameObjects.Shader-renderCanvas
since: 3.17.0
name: renderCanvas
memberof: Phaser.GameObjects.Shader
description: This is a stub function for Shader.Render. There is no Canvas renderer for Shader objects.
scope: instance
metafilename: ShaderCanvasRenderer.js
metapath: gameobjects/shader
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Shader,camera:Phaser.Cameras.Scene2D.Camera


longname: Phaser.GameObjects.GameObjectCreator-shader
since: 3.17.0
name: shader
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.Shader
returnsdescription: The Game Object that was created.
metafilename: ShaderCreator.js
metapath: gameobjects/shader
description:
Creates a new Shader Game Object and returns it.

Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-shader
since: 3.17.0
name: shader
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Shader
returnsdescription: The Game Object that was created.
metafilename: ShaderFactory.js
metapath: gameobjects/shader
description:
Creates a new Shader Game Object and adds it to the Scene.

Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.

signature:
key:string|Phaser.Display.BaseShader,x?:number,y?:number,width?:number,height?:number,textures?:Array.<string>,textureData?:object


longname: Phaser.GameObjects.Shader-renderWebGL
since: 3.17.0
name: renderWebGL
memberof: Phaser.GameObjects.Shader
scope: instance
metafilename: ShaderWebGLRenderer.js
metapath: gameobjects/shader
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Shader,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Arc-setIterations
since: 3.13.0
name: setIterations
memberof: Phaser.GameObjects.Arc
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.Arc
returnsdescription: This Game Object instance.
metafilename: Arc.js
metapath: gameobjects/shape/arc
description:
Sets the number of iterations used when drawing the arc.
Increase this value for smoother arcs, at the cost of more polygons being rendered.
Modify this value by small amounts, such as 0.01.
This call can be chained.


longname: Phaser.GameObjects.Arc-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.Arc
scope: instance
metafilename: ArcCanvasRenderer.js
metapath: gameobjects/shape/arc
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Arc,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-arc
since: 3.13.0
name: arc
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Arc
returnsdescription: The Game Object that was created.
metafilename: ArcFactory.js
metapath: gameobjects/shape/arc
description:
Creates a new Arc Shape Game Object and adds it to the Scene.

Note: This method will only be available if the Arc Game Object has been built into Phaser.

The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

When it renders it displays an arc shape. You can control the start and end angles of the arc,
as well as if the angles are winding clockwise or anti-clockwise. With the default settings
it renders as a complete circle. By changing the angles you can create other arc shapes,
such as half-circles.

signature:
x?:number,y?:number,radius?:number,startAngle?:number,endAngle?:number,anticlockwise?:boolean,fillColor?:number,fillAlpha?:number


longname: Phaser.GameObjects.GameObjectFactory-circle
since: 3.13.0
name: circle
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x?:number,y?:number,radius?:number,fillColor?:number,fillAlpha?:number
returnstype: Phaser.GameObjects.Arc
returnsdescription: The Game Object that was created.
metafilename: ArcFactory.js
metapath: gameobjects/shape/arc
description:
Creates a new Circle Shape Game Object and adds it to the Scene.

A Circle is an Arc with no defined start and end angle, making it render as a complete circle.

Note: This method will only be available if the Arc Game Object has been built into Phaser.


longname: Phaser.GameObjects.Arc-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.Arc
scope: instance
metafilename: ArcWebGLRenderer.js
metapath: gameobjects/shape/arc
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Arc,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Curve-setSmoothness
since: 3.13.0
name: setSmoothness
memberof: Phaser.GameObjects.Curve
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.Curve
returnsdescription: This Game Object instance.
metafilename: Curve.js
metapath: gameobjects/shape/curve
description:
Sets the smoothness of the curve. The number of points used when rendering it.
Increase this value for smoother curves, at the cost of more polygons being rendered.
This call can be chained.


longname: Phaser.GameObjects.Curve-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.Curve
scope: instance
metafilename: CurveCanvasRenderer.js
metapath: gameobjects/shape/curve
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Curve,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-curve
since: 3.13.0
name: curve
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x?:number,y?:number,curve?:Phaser.Curves.Curve,fillColor?:number,fillAlpha?:number
returnstype: Phaser.GameObjects.Curve
returnsdescription: The Game Object that was created.
metafilename: CurveFactory.js
metapath: gameobjects/shape/curve
description:
Creates a new Curve Shape Game Object and adds it to the Scene.

Note: This method will only be available if the Curve Game Object has been built into Phaser.

The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to
the Curve Shape in the constructor.

The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method.
This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations
that take place during construction. Increase and decrease the default value for smoother, or more
jagged, shapes.


longname: Phaser.GameObjects.Curve-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.Curve
scope: instance
metafilename: CurveWebGLRenderer.js
metapath: gameobjects/shape/curve
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Curve,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Ellipse-setSize
since: 3.13.0
name: setSize
memberof: Phaser.GameObjects.Ellipse
scope: instance
signature: width:number,height:number
returnstype: Phaser.GameObjects.Ellipse
returnsdescription: This Game Object instance.
metafilename: Ellipse.js
metapath: gameobjects/shape/ellipse
overrides: Phaser.GameObjects.Shape#setSize
description:
Sets the size of the ellipse by changing the underlying geometry data, rather than scaling the object.
This call can be chained.


longname: Phaser.GameObjects.Ellipse-setSmoothness
since: 3.13.0
name: setSmoothness
memberof: Phaser.GameObjects.Ellipse
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.Ellipse
returnsdescription: This Game Object instance.
metafilename: Ellipse.js
metapath: gameobjects/shape/ellipse
description:
Sets the smoothness of the ellipse. The number of points used when rendering it.
Increase this value for a smoother ellipse, at the cost of more polygons being rendered.
This call can be chained.


longname: Phaser.GameObjects.Ellipse-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.Ellipse
scope: instance
metafilename: EllipseCanvasRenderer.js
metapath: gameobjects/shape/ellipse
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Ellipse,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-ellipse
since: 3.13.0
name: ellipse
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x?:number,y?:number,width?:number,height?:number,fillColor?:number,fillAlpha?:number
returnstype: Phaser.GameObjects.Ellipse
returnsdescription: The Game Object that was created.
metafilename: EllipseFactory.js
metapath: gameobjects/shape/ellipse
description:
Creates a new Ellipse Shape Game Object and adds it to the Scene.

Note: This method will only be available if the Ellipse Game Object has been built into Phaser.

The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

When it renders it displays an ellipse shape. You can control the width and height of the ellipse.
If the width and height match it will render as a circle. If the width is less than the height,
it will look more like an egg shape.

The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method.
This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations
that take place during construction. Increase and decrease the default value for smoother, or more
jagged, shapes.


longname: Phaser.GameObjects.Ellipse-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.Ellipse
scope: instance
metafilename: EllipseWebGLRenderer.js
metapath: gameobjects/shape/ellipse
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Ellipse,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Shape-FillPathWebGL
since: 3.13.0
name: FillPathWebGL
memberof: Phaser.GameObjects.Shape
description: Renders a filled path for the given Shape.
scope: instance
metafilename: FillPathWebGL.js
metapath: gameobjects/shape
access: private
signature:
pipeline:Phaser.Renderer.WebGL.WebGLPipeline,calcMatrix:Phaser.GameObjects.Components.TransformMatrix,src:Phaser.GameObjects.Shape,alpha:number,dx:number,dy:number


longname: Phaser.GameObjects.Grid-setFillStyle
since: 3.13.0
name: setFillStyle
memberof: Phaser.GameObjects.Grid
scope: instance
signature: fillColor?:number,fillAlpha?:number
returnstype: Phaser.GameObjects.Grid
returnsdescription: This Game Object instance.
metafilename: Grid.js
metapath: gameobjects/shape/grid
overrides: Phaser.GameObjects.Shape#setFillStyle
description:
Sets the fill color and alpha level the grid cells will use when rendering.

If this method is called with no values then the grid cells will not be rendered,
however the grid lines and alternating cells may still be.

Also see the `setOutlineStyle` and `setAltFillStyle` methods.

This call can be chained.


longname: Phaser.GameObjects.Grid-setAltFillStyle
since: 3.13.0
name: setAltFillStyle
memberof: Phaser.GameObjects.Grid
scope: instance
signature: fillColor?:number,fillAlpha?:number
returnstype: Phaser.GameObjects.Grid
returnsdescription: This Game Object instance.
metafilename: Grid.js
metapath: gameobjects/shape/grid
description:
Sets the fill color and alpha level that the alternating grid cells will use.

If this method is called with no values then alternating grid cells will not be rendered in a different color.

Also see the `setOutlineStyle` and `setFillStyle` methods.

This call can be chained.


longname: Phaser.GameObjects.Grid-setOutlineStyle
since: 3.13.0
name: setOutlineStyle
memberof: Phaser.GameObjects.Grid
scope: instance
signature: fillColor?:number,fillAlpha?:number
returnstype: Phaser.GameObjects.Grid
returnsdescription: This Game Object instance.
metafilename: Grid.js
metapath: gameobjects/shape/grid
description:
Sets the fill color and alpha level that the lines between each grid cell will use.

If this method is called with no values then the grid lines will not be rendered at all, however
the cells themselves may still be if they have colors set.

Also see the `setFillStyle` and `setAltFillStyle` methods.

This call can be chained.


longname: Phaser.GameObjects.Grid-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.Grid
scope: instance
metafilename: GridCanvasRenderer.js
metapath: gameobjects/shape/grid
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Grid,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-grid
since: 3.13.0
name: grid
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Grid
returnsdescription: The Game Object that was created.
metafilename: GridFactory.js
metapath: gameobjects/shape/grid
description:
Creates a new Grid Shape Game Object and adds it to the Scene.

Note: This method will only be available if the Grid Game Object has been built into Phaser.

The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports only fill colors and cannot be stroked.

A Grid Shape allows you to display a grid in your game, where you can control the size of the
grid as well as the width and height of the grid cells. You can set a fill color for each grid
cell as well as an alternate fill color. When the alternate fill color is set then the grid
cells will alternate the fill colors as they render, creating a chess-board effect. You can
also optionally have an outline fill color. If set, this draws lines between the grid cells
in the given color. If you specify an outline color with an alpha of zero, then it will draw
the cells spaced out, but without the lines between them.

signature:
x?:number,y?:number,width?:number,height?:number,cellWidth?:number,cellHeight?:number,fillColor?:number,fillAlpha?:number,outlineFillColor?:number,outlineFillAlpha?:number


longname: Phaser.GameObjects.Grid-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.Grid
scope: instance
metafilename: GridWebGLRenderer.js
metapath: gameobjects/shape/grid
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Grid,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.IsoBox-setProjection
since: 3.13.0
name: setProjection
memberof: Phaser.GameObjects.IsoBox
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.IsoBox
returnsdescription: This Game Object instance.
metafilename: IsoBox.js
metapath: gameobjects/shape/isobox
description:
Sets the projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.
This call can be chained.


longname: Phaser.GameObjects.IsoBox-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.IsoBox
scope: instance
metafilename: IsoBoxCanvasRenderer.js
metapath: gameobjects/shape/isobox
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.IsoBox,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-isobox
since: 3.13.0
name: isobox
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x?:number,y?:number,size?:number,height?:number,fillTop?:number,fillLeft?:number,fillRight?:number
returnstype: Phaser.GameObjects.IsoBox
returnsdescription: The Game Object that was created.
metafilename: IsoBoxFactory.js
metapath: gameobjects/shape/isobox
description:
Creates a new IsoBox Shape Game Object and adds it to the Scene.

Note: This method will only be available if the IsoBox Game Object has been built into Phaser.

The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports only fill colors and cannot be stroked.

An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set
the color of the top, left and right faces of the rectangle respectively. You can also choose
which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.

You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting
the `projection` property.


longname: Phaser.GameObjects.IsoBox-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.IsoBox
scope: instance
metafilename: IsoBoxWebGLRenderer.js
metapath: gameobjects/shape/isobox
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.IsoBox,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.IsoTriangle-setProjection
since: 3.13.0
name: setProjection
memberof: Phaser.GameObjects.IsoTriangle
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.IsoTriangle
returnsdescription: This Game Object instance.
metafilename: IsoTriangle.js
metapath: gameobjects/shape/isotriangle
description:
Sets the projection level of the iso triangle. Change this to change the 'angle' at which you are looking at the pyramid.
This call can be chained.


longname: Phaser.GameObjects.IsoTriangle-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.IsoTriangle
scope: instance
metafilename: IsoTriangleCanvasRenderer.js
metapath: gameobjects/shape/isotriangle
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.IsoTriangle,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-isotriangle
since: 3.13.0
name: isotriangle
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.IsoTriangle
returnsdescription: The Game Object that was created.
metafilename: IsoTriangleFactory.js
metapath: gameobjects/shape/isotriangle
description:
Creates a new IsoTriangle Shape Game Object and adds it to the Scene.

Note: This method will only be available if the IsoTriangle Game Object has been built into Phaser.

The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports only fill colors and cannot be stroked.

An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different
fill color. You can set the color of the top, left and right faces of the triangle respectively
You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.

You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting
the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside
down or not.

signature:
x?:number,y?:number,size?:number,height?:number,reversed?:boolean,fillTop?:number,fillLeft?:number,fillRight?:number


longname: Phaser.GameObjects.IsoTriangle-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.IsoTriangle
scope: instance
metafilename: IsoTriangleWebGLRenderer.js
metapath: gameobjects/shape/isotriangle
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.IsoTriangle,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Line-setLineWidth
since: 3.13.0
name: setLineWidth
memberof: Phaser.GameObjects.Line
scope: instance
signature: startWidth:number,endWidth?:number
returnstype: Phaser.GameObjects.Line
returnsdescription: This Game Object instance.
metafilename: Line.js
metapath: gameobjects/shape/line
description:
Sets the width of the line.

When using the WebGL renderer you can have different start and end widths.
When using the Canvas renderer only the `startWidth` value is used. The `endWidth` is ignored.

This call can be chained.


longname: Phaser.GameObjects.Line-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.Line
scope: instance
metafilename: LineCanvasRenderer.js
metapath: gameobjects/shape/line
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Line,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-line
since: 3.13.0
name: line
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Line
returnsdescription: The Game Object that was created.
metafilename: LineFactory.js
metapath: gameobjects/shape/line
description:
Creates a new Line Shape Game Object and adds it to the Scene.

Note: This method will only be available if the Line Game Object has been built into Phaser.

The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports only stroke colors and cannot be filled.

A Line Shape allows you to draw a line between two points in your game. You can control the
stroke color and thickness of the line. In WebGL only you can also specify a different
thickness for the start and end of the line, allowing you to render lines that taper-off.

If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.

signature:
x?:number,y?:number,x1?:number,y1?:number,x2?:number,y2?:number,strokeColor?:number,strokeAlpha?:number


longname: Phaser.GameObjects.Line-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.Line
scope: instance
metafilename: LineWebGLRenderer.js
metapath: gameobjects/shape/line
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Line,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Polygon-smooth
since: 3.13.0
name: smooth
memberof: Phaser.GameObjects.Polygon
scope: instance
signature: iterations?:number
returnstype: Phaser.GameObjects.Polygon
returnsdescription: This Game Object instance.
metafilename: Polygon.js
metapath: gameobjects/shape/polygon
description:
Smooths the polygon over the number of iterations specified.
The base polygon data will be updated and replaced with the smoothed values.
This call can be chained.


longname: Phaser.GameObjects.Polygon-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.Polygon
scope: instance
metafilename: PolygonCanvasRenderer.js
metapath: gameobjects/shape/polygon
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Polygon,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-polygon
since: 3.13.0
name: polygon
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x?:number,y?:number,points?:any,fillColor?:number,fillAlpha?:number
returnstype: Phaser.GameObjects.Polygon
returnsdescription: The Game Object that was created.
metafilename: PolygonFactory.js
metapath: gameobjects/shape/polygon
description:
Creates a new Polygon Shape Game Object and adds it to the Scene.

Note: This method will only be available if the Polygon Game Object has been built into Phaser.

The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

The Polygon Shape is created by providing a list of points, which are then used to create an
internal Polygon geometry object. The points can be set from a variety of formats:

- An array of Point or Vector2 objects: `[new Phaser.Math.Vector2(x1, y1), ...]`
- An array of objects with public x/y properties: `[obj1, obj2, ...]`
- An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
- An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`

By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending
on the coordinates of the points provided, the final shape may be rendered offset from its origin.


longname: Phaser.GameObjects.Polygon-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.Polygon
scope: instance
metafilename: PolygonWebGLRenderer.js
metapath: gameobjects/shape/polygon
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Polygon,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Rectangle-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.Rectangle
scope: instance
metafilename: RectangleCanvasRenderer.js
metapath: gameobjects/shape/rectangle
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Rectangle,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-rectangle
since: 3.13.0
name: rectangle
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x?:number,y?:number,width?:number,height?:number,fillColor?:number,fillAlpha?:number
returnstype: Phaser.GameObjects.Rectangle
returnsdescription: The Game Object that was created.
metafilename: RectangleFactory.js
metapath: gameobjects/shape/rectangle
description:
Creates a new Rectangle Shape Game Object and adds it to the Scene.

Note: This method will only be available if the Rectangle Game Object has been built into Phaser.

The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

You can change the size of the rectangle by changing the `width` and `height` properties.


longname: Phaser.GameObjects.Rectangle-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.Rectangle
scope: instance
metafilename: RectangleWebGLRenderer.js
metapath: gameobjects/shape/rectangle
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Rectangle,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Shape-setFillStyle
since: 3.13.0
name: setFillStyle
memberof: Phaser.GameObjects.Shape
scope: instance
signature: color?:number,alpha?:number
returnstype: Phaser.GameObjects.Shape
returnsdescription: This Game Object instance.
metafilename: Shape.js
metapath: gameobjects/shape
description:
Sets the fill color and alpha for this Shape.

If you wish for the Shape to not be filled then call this method with no arguments, or just set `isFilled` to `false`.

Note that some Shapes do not support fill colors, such as the Line shape.

This call can be chained.


longname: Phaser.GameObjects.Shape-setStrokeStyle
since: 3.13.0
name: setStrokeStyle
memberof: Phaser.GameObjects.Shape
scope: instance
signature: lineWidth?:number,color?:number,alpha?:number
returnstype: Phaser.GameObjects.Shape
returnsdescription: This Game Object instance.
metafilename: Shape.js
metapath: gameobjects/shape
description:
Sets the stroke color and alpha for this Shape.

If you wish for the Shape to not be stroked then call this method with no arguments, or just set `isStroked` to `false`.

Note that some Shapes do not support being stroked, such as the Iso Box shape.

This call can be chained.


longname: Phaser.GameObjects.Shape-setClosePath
since: 3.13.0
name: setClosePath
memberof: Phaser.GameObjects.Shape
scope: instance
signature: value:boolean
returnstype: Phaser.GameObjects.Shape
returnsdescription: This Game Object instance.
metafilename: Shape.js
metapath: gameobjects/shape
description:
Sets if this Shape path is closed during rendering when stroked.
Note that some Shapes are always closed when stroked (such as Ellipse shapes)

This call can be chained.


longname: Phaser.GameObjects.Star-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.Star
scope: instance
metafilename: StarCanvasRenderer.js
metapath: gameobjects/shape/star
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Star,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-star
since: 3.13.0
name: star
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Star
returnsdescription: The Game Object that was created.
metafilename: StarFactory.js
metapath: gameobjects/shape/star
description:
Creates a new Star Shape Game Object and adds it to the Scene.

Note: This method will only be available if the Star Game Object has been built into Phaser.

The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

As the name implies, the Star shape will display a star in your game. You can control several
aspects of it including the number of points that constitute the star. The default is 5. If
you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky
star shape.

You can also control the inner and outer radius, which is how 'long' each point of the star is.
Modify these values to create more interesting shapes.

signature:
x?:number,y?:number,points?:number,innerRadius?:number,outerRadius?:number,fillColor?:number,fillAlpha?:number


longname: Phaser.GameObjects.Star-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.Star
scope: instance
metafilename: StarWebGLRenderer.js
metapath: gameobjects/shape/star
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Star,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Shape-StrokePathWebGL
since: 3.13.0
name: StrokePathWebGL
memberof: Phaser.GameObjects.Shape
description: Renders a stroke outline around the given Shape.
scope: instance
metafilename: StrokePathWebGL.js
metapath: gameobjects/shape
access: private
signature:
pipeline:Phaser.Renderer.WebGL.WebGLPipeline,src:Phaser.GameObjects.Shape,alpha:number,dx:number,dy:number


longname: Phaser.GameObjects.Triangle-renderCanvas
since: 3.13.0
name: renderCanvas
memberof: Phaser.GameObjects.Triangle
scope: instance
metafilename: TriangleCanvasRenderer.js
metapath: gameobjects/shape/triangle
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Triangle,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectFactory-triangle
since: 3.13.0
name: triangle
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.Triangle
returnsdescription: The Game Object that was created.
metafilename: TriangleFactory.js
metapath: gameobjects/shape/triangle
description:
Creates a new Triangle Shape Game Object and adds it to the Scene.

Note: This method will only be available if the Triangle Game Object has been built into Phaser.

The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can
treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling
it for input or physics. It provides a quick and easy way for you to render this shape in your
game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the
position of each point of these lines. The triangle is always closed and cannot have an open
face. If you require that, consider using a Polygon instead.

signature:
x?:number,y?:number,x1?:number,y1?:number,x2?:number,y2?:number,x3?:number,y3?:number,fillColor?:number,fillAlpha?:number


longname: Phaser.GameObjects.Triangle-renderWebGL
since: 3.13.0
name: renderWebGL
memberof: Phaser.GameObjects.Triangle
scope: instance
metafilename: TriangleWebGLRenderer.js
metapath: gameobjects/shape/triangle
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Triangle,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Sprite-playAfterDelay
since: 3.50.0
name: playAfterDelay
memberof: Phaser.GameObjects.Sprite
scope: instance
fires: Phaser.Animations.Events.ANIMATION_START
signature: key:string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig,delay:number
returnstype: Phaser.GameObjects.Sprite
returnsdescription: This Game Object.
metafilename: Sprite.js
metapath: gameobjects/sprite
description:
Waits for the specified delay, in milliseconds, then starts playback of the given animation.

If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here.

If an animation is already running and a new animation is given to this method, it will wait for
the given delay before starting the new animation.

If no animation is currently running, the given one begins after the delay.

When playing an animation on a Sprite it will first check to see if it can find a matching key
locally within the Sprite. If it can, it will play the local animation. If not, it will then
search the global Animation Manager and look for it there.

Prior to Phaser 3.50 this method was called 'delayedPlay'.


longname: Phaser.GameObjects.Sprite-playAfterRepeat
since: 3.50.0
name: playAfterRepeat
memberof: Phaser.GameObjects.Sprite
scope: instance
fires: Phaser.Animations.Events.ANIMATION_START
returnstype: Phaser.GameObjects.Sprite
returnsdescription: This Game Object.
metafilename: Sprite.js
metapath: gameobjects/sprite
description:
Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback
of the given animation.

You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an
idle animation to a walking animation, by making them blend smoothly into each other.

If no animation is currently running, the given one will start immediately.

When playing an animation on a Sprite it will first check to see if it can find a matching key
locally within the Sprite. If it can, it will play the local animation. If not, it will then
search the global Animation Manager and look for it there.

signature:
key:string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig,repeatCount?:number


longname: Phaser.GameObjects.Sprite-chain
since: 3.50.0
name: chain
memberof: Phaser.GameObjects.Sprite
scope: instance
returnstype: Phaser.GameObjects.Sprite
returnsdescription: This Game Object.
metafilename: Sprite.js
metapath: gameobjects/sprite
description:
Sets an animation, or an array of animations, to be played immediately after the current one completes or stops.

The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc,
or have the `stop` method called directly on it.

An animation set to repeat forever will never enter a completed state.

You can chain a new animation at any point, including before the current one starts playing, during it,
or when it ends (via its `animationcomplete` event).

Chained animations are specific to a Game Object, meaning different Game Objects can have different chained
animations without impacting the animation they're playing.

Call this method with no arguments to reset all currently chained animations.

When playing an animation on a Sprite it will first check to see if it can find a matching key
locally within the Sprite. If it can, it will play the local animation. If not, it will then
search the global Animation Manager and look for it there.

signature:
key:string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|Array.<string>|Array.<Phaser.Animations.Animation>|Array.<Phaser.Types.Animations.PlayAnimationConfig>


longname: Phaser.GameObjects.Sprite-stop
since: 3.50.0
name: stop
memberof: Phaser.GameObjects.Sprite
scope: instance
fires: Phaser.Animations.Events.ANIMATION_STOP
returnstype: Phaser.GameObjects.Sprite
returnsdescription: This Game Object.
metafilename: Sprite.js
metapath: gameobjects/sprite
description:
Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` events.

If no animation is playing, no event will be dispatched.

If there is another animation queued (via the `chain` method) then it will start playing immediately.


longname: Phaser.GameObjects.Sprite-stopAfterRepeat
since: 3.50.0
name: stopAfterRepeat
memberof: Phaser.GameObjects.Sprite
scope: instance
fires: Phaser.Animations.Events.ANIMATION_STOP
signature: repeatCount?:number
returnstype: Phaser.GameObjects.Sprite
returnsdescription: This Game Object.
metafilename: Sprite.js
metapath: gameobjects/sprite
description:
Stops the current animation from playing after the given number of repeats.

It then dispatches the `ANIMATION_STOP` event.

If no animation is running, no events will be dispatched.

If there is another animation in the queue (set via the `chain` method) then it will start playing,
when the current one stops.


longname: Phaser.GameObjects.Sprite-renderCanvas
since: 3.0.0
name: renderCanvas
memberof: Phaser.GameObjects.Sprite
scope: instance
metafilename: SpriteCanvasRenderer.js
metapath: gameobjects/sprite
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Sprite,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectCreator-sprite
since: 3.0.0
name: sprite
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:Phaser.Types.GameObjects.Sprite.SpriteConfig,addToScene?:boolean
returnstype: Phaser.GameObjects.Sprite
returnsdescription: The Game Object that was created.
metafilename: SpriteCreator.js
metapath: gameobjects/sprite
description:
Creates a new Sprite Game Object and returns it.

Note: This method will only be available if the Sprite Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-sprite
since: 3.0.0
name: sprite
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x:number,y:number,texture:string|Phaser.Textures.Texture,frame?:string|number
returnstype: Phaser.GameObjects.Sprite
returnsdescription: The Game Object that was created.
metafilename: SpriteFactory.js
metapath: gameobjects/sprite
description:
Creates a new Sprite Game Object and adds it to the Scene.

Note: This method will only be available if the Sprite Game Object has been built into Phaser.


longname: Phaser.GameObjects.Sprite-renderWebGL
since: 3.0.0
name: renderWebGL
memberof: Phaser.GameObjects.Sprite
scope: instance
metafilename: SpriteWebGLRenderer.js
metapath: gameobjects/sprite
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Sprite,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Text-advancedWordWrap
since: 3.0.0
name: advancedWordWrap
memberof: Phaser.GameObjects.Text
scope: instance
signature: text:string,context:CanvasRenderingContext2D,wordWrapWidth:number
returnstype: string
returnsdescription: The wrapped text.
metafilename: Text.js
metapath: gameobjects/text
description:
Advanced wrapping algorithm that will wrap words as the line grows longer than its horizontal
bounds. Consecutive spaces will be collapsed and replaced with a single space. Lines will be
trimmed of white space before processing. Throws an error if wordWrapWidth is less than a
single character.


longname: Phaser.GameObjects.Text-basicWordWrap
since: 3.0.0
name: basicWordWrap
memberof: Phaser.GameObjects.Text
scope: instance
signature: text:string,context:CanvasRenderingContext2D,wordWrapWidth:number
returnstype: string
returnsdescription: The wrapped text.
metafilename: Text.js
metapath: gameobjects/text
description:
Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal
bounds. Spaces are not collapsed and whitespace is not trimmed.


longname: Phaser.GameObjects.Text-getWrappedText
since: 3.0.0
name: getWrappedText
memberof: Phaser.GameObjects.Text
scope: instance
signature: text:string
returnstype: Array.<string>
returnsdescription: An array of strings with the pieces of wrapped text.
metafilename: Text.js
metapath: gameobjects/text
description:
Runs the given text through this Text objects word wrapping and returns the results as an
array, where each element of the array corresponds to a wrapped line of text.


longname: Phaser.GameObjects.Text-setFont
since: 3.0.0
name: setFont
memberof: Phaser.GameObjects.Text
scope: instance
signature: font:string
returnstype: Phaser.GameObjects.Text
returnsdescription: This Text object.
metafilename: Text.js
metapath: gameobjects/text
description:
Set the font.

If a string is given, the font family is set.

If an object is given, the `fontFamily`, `fontSize` and `fontStyle`
properties of that object are set.

**Important:** The font name must be quoted if it contains certain combinations of digits or
special characters:

```javascript
Text.setFont('"Press Start 2P"');
```

Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all
quoted properly, too:

```javascript
Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif');
```


longname: Phaser.GameObjects.Text-setFontFamily
since: 3.0.0
name: setFontFamily
memberof: Phaser.GameObjects.Text
scope: instance
signature: family:string
returnstype: Phaser.GameObjects.Text
returnsdescription: This Text object.
metafilename: Text.js
metapath: gameobjects/text
description:
Set the font family.

**Important:** The font name must be quoted if it contains certain combinations of digits or
special characters:

```javascript
Text.setFont('"Press Start 2P"');
```

Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all
quoted properly, too:

```javascript
Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif');
```


longname: Phaser.GameObjects.Text-setFixedSize
since: 3.0.0
name: setFixedSize
memberof: Phaser.GameObjects.Text
scope: instance
signature: width:number,height:number
returnstype: Phaser.GameObjects.Text
returnsdescription: This Text object.
metafilename: Text.js
metapath: gameobjects/text
description:
Set a fixed width and height for the text.

Pass in `0` for either of these parameters to disable fixed width or height respectively.


longname: Phaser.GameObjects.Text-setFill
since: 3.0.0
name: setFill
memberof: Phaser.GameObjects.Text
scope: instance
signature: color:string|any
returnstype: Phaser.GameObjects.Text
returnsdescription: This Text object.
metafilename: Text.js
metapath: gameobjects/text
description:
Set the fill style to be used by the Text object.

This can be any valid CanvasRenderingContext2D fillStyle value, such as
a color (in hex, rgb, rgba, hsl or named values), a gradient or a pattern.

See the [MDN fillStyle docs](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle) for more details.


longname: Phaser.GameObjects.Text-setAlign
since: 3.0.0
name: setAlign
memberof: Phaser.GameObjects.Text
scope: instance
signature: align?:string
returnstype: Phaser.GameObjects.Text
returnsdescription: This Text object.
metafilename: Text.js
metapath: gameobjects/text
description:
Set the alignment of the text in this Text object.

The argument can be one of: `left`, `right`, `center` or `justify`.

Alignment only works if the Text object has more than one line of text.


longname: Phaser.GameObjects.Text-setResolution
since: 3.12.0
name: setResolution
memberof: Phaser.GameObjects.Text
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.Text
returnsdescription: This Text object.
metafilename: Text.js
metapath: gameobjects/text
description:
Set the resolution used by this Text object.

By default it will be set to match the resolution set in the Game Config,
but you can override it via this method, or by specifying it in the Text style configuration object.

It allows for much clearer text on High DPI devices, at the cost of memory because it uses larger
internal Canvas textures for the Text.

Therefore, please use with caution, as the more high res Text you have, the more memory it uses.


longname: Phaser.GameObjects.Text-setLineSpacing
since: 3.13.0
name: setLineSpacing
memberof: Phaser.GameObjects.Text
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.Text
returnsdescription: This Text object.
metafilename: Text.js
metapath: gameobjects/text
description:
Sets the line spacing value.

This value is _added_ to the height of the font when calculating the overall line height.
This only has an effect if this Text object consists of multiple lines of text.


longname: Phaser.GameObjects.Text-setPadding
since: 3.0.0
name: setPadding
memberof: Phaser.GameObjects.Text
scope: instance
signature: left:number|Phaser.Types.GameObjects.Text.TextPadding,top?:number,right?:number,bottom?:number
returnstype: Phaser.GameObjects.Text
returnsdescription: This Text object.
metafilename: Text.js
metapath: gameobjects/text
description:
Set the text padding.

'left' can be an object.

If only 'left' and 'top' are given they are treated as 'x' and 'y'.


longname: Phaser.GameObjects.Text-renderCanvas
since: 3.0.0
name: renderCanvas
memberof: Phaser.GameObjects.Text
scope: instance
metafilename: TextCanvasRenderer.js
metapath: gameobjects/text
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Text,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectCreator-text
since: 3.0.0
name: text
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:Phaser.Types.GameObjects.Text.TextConfig,addToScene?:boolean
returnstype: Phaser.GameObjects.Text
returnsdescription: The Game Object that was created.
metafilename: TextCreator.js
metapath: gameobjects/text
description:
Creates a new Text Game Object and returns it.

Note: This method will only be available if the Text Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-text
since: 3.0.0
name: text
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x:number,y:number,text:string|Array.<string>,style?:Phaser.Types.GameObjects.Text.TextStyle
returnstype: Phaser.GameObjects.Text
returnsdescription: The Game Object that was created.
metafilename: TextFactory.js
metapath: gameobjects/text
description:
Creates a new Text Game Object and adds it to the Scene.

A Text Game Object.

Text objects work by creating their own internal hidden Canvas and then renders text to it using
the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered
to your game during the render pass.

Because it uses the Canvas API you can take advantage of all the features this offers, such as
applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts
loaded externally, such as Google or TypeKit Web fonts.

You can only display fonts that are currently loaded and available to the browser: therefore fonts must
be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader,
or have the fonts ready available in the CSS on the page in which your Phaser game resides.

See [this](http://www.jordanm.co.uk/tinytype) for the available default fonts
across mobile browsers.

A note on performance: Every time the contents of a Text object changes, i.e. changing the text being
displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the
new texture to the GPU. This can be an expensive operation if used often, or with large quantities of
Text objects in your game. If you run into performance issues you would be better off using Bitmap Text
instead, as it benefits from batching and avoids expensive Canvas API calls.

Note: This method will only be available if the Text Game Object has been built into Phaser.


longname: Phaser.GameObjects.TextStyle-setFont
since: 3.0.0
name: setFont
memberof: Phaser.GameObjects.TextStyle
scope: instance
signature: font:string|object,updateText?:boolean
returnstype: Phaser.GameObjects.Text
returnsdescription: The parent Text object.
metafilename: TextStyle.js
metapath: gameobjects/text
description:
Set the font.

If a string is given, the font family is set.

If an object is given, the `fontFamily`, `fontSize` and `fontStyle`
properties of that object are set.


longname: Phaser.GameObjects.TextStyle-setResolution
since: 3.12.0
name: setResolution
memberof: Phaser.GameObjects.TextStyle
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.Text
returnsdescription: The parent Text object.
metafilename: TextStyle.js
metapath: gameobjects/text
description:
Set the resolution used by the Text object.

By default it will be set to match the resolution set in the Game Config,
but you can override it via this method. It allows for much clearer text on High DPI devices,
at the cost of memory because it uses larger internal Canvas textures for the Text.

Please use with caution, as the more high res Text you have, the more memory it uses up.


longname: Phaser.GameObjects.TextStyle-setShadow
since: 3.0.0
name: setShadow
memberof: Phaser.GameObjects.TextStyle
scope: instance
signature: x?:number,y?:number,color?:string,blur?:number,shadowStroke?:boolean,shadowFill?:boolean
returnstype: Phaser.GameObjects.Text
returnsdescription: The parent Text object.
metafilename: TextStyle.js
metapath: gameobjects/text
description:
Set the shadow settings.

Calling this method always re-measures the parent Text object,
so only call it when you actually change the shadow settings.


longname: Phaser.GameObjects.Text-renderWebGL
since: 3.0.0
name: renderWebGL
memberof: Phaser.GameObjects.Text
scope: instance
metafilename: TextWebGLRenderer.js
metapath: gameobjects/text
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Text,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.TileSprite-setFrame
since: 3.0.0
name: setFrame
memberof: Phaser.GameObjects.TileSprite
scope: instance
signature: frame:string|number
returnstype: Phaser.GameObjects.TileSprite
returnsdescription: This Game Object instance.
metafilename: TileSprite.js
metapath: gameobjects/tilesprite
description:
Sets the frame this Game Object will use to render with.

The Frame has to belong to the current Texture being used.

It can be either a string or an index.


longname: Phaser.GameObjects.TileSprite-setTilePosition
since: 3.3.0
name: setTilePosition
memberof: Phaser.GameObjects.TileSprite
scope: instance
signature: x?:number,y?:number
returnstype: Phaser.GameObjects.TileSprite
returnsdescription: This Tile Sprite instance.
metafilename: TileSprite.js
metapath: gameobjects/tilesprite
description:
Sets [Phaser.GameObjects.TileSprite#tilePositionX](Phaser.GameObjects.TileSprite#tilePositionX) and [Phaser.GameObjects.TileSprite#tilePositionY](Phaser.GameObjects.TileSprite#tilePositionY).


longname: Phaser.GameObjects.TileSprite-setTileScale
since: 3.12.0
name: setTileScale
memberof: Phaser.GameObjects.TileSprite
scope: instance
signature: x?:number,y?:number
returnstype: Phaser.GameObjects.TileSprite
returnsdescription: This Tile Sprite instance.
metafilename: TileSprite.js
metapath: gameobjects/tilesprite
description:
Sets [Phaser.GameObjects.TileSprite#tileScaleX](Phaser.GameObjects.TileSprite#tileScaleX) and [Phaser.GameObjects.TileSprite#tileScaleY](Phaser.GameObjects.TileSprite#tileScaleY).


longname: Phaser.GameObjects.TileSprite-renderCanvas
since: 3.0.0
name: renderCanvas
memberof: Phaser.GameObjects.TileSprite
scope: instance
metafilename: TileSpriteCanvasRenderer.js
metapath: gameobjects/tilesprite
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.TileSprite,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectCreator-tileSprite
since: 3.0.0
name: tileSprite
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:Phaser.Types.GameObjects.TileSprite.TileSpriteConfig,addToScene?:boolean
returnstype: Phaser.GameObjects.TileSprite
returnsdescription: The Game Object that was created.
metafilename: TileSpriteCreator.js
metapath: gameobjects/tilesprite
description:
Creates a new TileSprite Game Object and returns it.

Note: This method will only be available if the TileSprite Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-tileSprite
since: 3.0.0
name: tileSprite
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.GameObjects.TileSprite
returnsdescription: The Game Object that was created.
metafilename: TileSpriteFactory.js
metapath: gameobjects/tilesprite
description:
Creates a new TileSprite Game Object and adds it to the Scene.

Note: This method will only be available if the TileSprite Game Object has been built into Phaser.

signature:
x:number,y:number,width:number,height:number,texture:string|Phaser.Textures.Texture,frame?:string|number


longname: Phaser.GameObjects.TileSprite-renderWebGL
since: 3.0.0
name: renderWebGL
memberof: Phaser.GameObjects.TileSprite
scope: instance
metafilename: TileSpriteWebGLRenderer.js
metapath: gameobjects/tilesprite
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.TileSprite,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.UpdateList-destroy
since: 3.0.0
name: destroy
memberof: Phaser.GameObjects.UpdateList
scope: instance
metafilename: UpdateList.js
metapath: gameobjects
description:
The Scene that owns this plugin is being destroyed.

We need to shutdown and then kill off all external references.


longname: Phaser.GameObjects.Video-play
since: 3.20.0
name: play
memberof: Phaser.GameObjects.Video
scope: instance
signature: loop?:boolean,markerIn?:number,markerOut?:number
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Starts this video playing.

If the video is already playing, or has been queued to play with `changeSource` then this method just returns.

Videos can only autoplay if the browser has been unlocked. This happens if you have interacted with the browser, i.e.
by clicking on it or pressing a key, or due to server settings. The policies that control autoplaying are vast and
vary between browser. You can read more here: [https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide](https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide)

If your video doesn't contain any audio, then set the `noAudio` parameter to `true` when the video is loaded,
and it will often allow the video to play immediately:

```javascript
preload () {
  this.load.video('pixar', 'nemo.mp4', 'loadeddata', false, true);
}
```

The 5th parameter in the load call tells Phaser that the video doesn't contain any audio tracks. Video without
audio can autoplay without requiring a user interaction. Video with audio cannot do this unless it satisfies
the browsers MEI settings. See the MDN Autoplay Guide for details.

If you need audio in your videos, then you'll have to consider the fact that the video cannot start playing until the
user has interacted with the browser, into your game flow.


longname: Phaser.GameObjects.Video-changeSource
since: 3.20.0
name: changeSource
memberof: Phaser.GameObjects.Video
scope: instance
signature: key:string,autoplay?:boolean,loop?:boolean,markerIn?:number,markerOut?:number
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
This method allows you to change the source of the current video element. It works by first stopping the
current video, if playing. Then deleting the video texture, if one has been created. Finally, it makes a
new video texture and starts playback of the new source through the existing video element.

The reason you may wish to do this is because videos that require interaction to unlock, remain in an unlocked
state, even if you change the source of the video. By changing the source to a new video you avoid having to
go through the unlock process again.


longname: Phaser.GameObjects.Video-addMarker
since: 3.20.0
name: addMarker
memberof: Phaser.GameObjects.Video
scope: instance
signature: key:string,markerIn:number,markerOut:number
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Adds a sequence marker to this video.

Markers allow you to split a video up into sequences, delineated by a start and end time, given in seconds.

You can then play back specific markers via the `playMarker` method.

Note that marker timing is _not_ frame-perfect. You should construct your videos in such a way that you allow for
plenty of extra padding before and after each sequence to allow for discrepancies in browser seek and currentTime accuracy.

See [https://github.com/w3c/media-and-entertainment/issues/4](https://github.com/w3c/media-and-entertainment/issues/4) for more details about this issue.


longname: Phaser.GameObjects.Video-playMarker
since: 3.20.0
name: playMarker
memberof: Phaser.GameObjects.Video
scope: instance
signature: key:string,loop?:boolean
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Plays a pre-defined sequence in this video.

Markers allow you to split a video up into sequences, delineated by a start and end time, given in seconds and
specified via the `addMarker` method.

Note that marker timing is _not_ frame-perfect. You should construct your videos in such a way that you allow for
plenty of extra padding before and after each sequence to allow for discrepancies in browser seek and currentTime accuracy.

See [https://github.com/w3c/media-and-entertainment/issues/4](https://github.com/w3c/media-and-entertainment/issues/4) for more details about this issue.


longname: Phaser.GameObjects.Video-removeMarker
since: 3.20.0
name: removeMarker
memberof: Phaser.GameObjects.Video
scope: instance
signature: key:string
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Removes a previously set marker from this video.

If the marker is currently playing it will _not_ stop playback.


longname: Phaser.GameObjects.Video-snapshot
since: 3.20.0
name: snapshot
memberof: Phaser.GameObjects.Video
scope: instance
signature: width?:number,height?:number
returnstype: Phaser.Textures.CanvasTexture
metafilename: Video.js
metapath: gameobjects/video
description:
Takes a snapshot of the current frame of the video and renders it to a CanvasTexture object,
which is then returned. You can optionally resize the grab by passing a width and height.

This method returns a reference to the `Video.snapshotTexture` object. Calling this method
multiple times will overwrite the previous snapshot with the most recent one.


longname: Phaser.GameObjects.Video-snapshotArea
since: 3.20.0
name: snapshotArea
memberof: Phaser.GameObjects.Video
scope: instance
signature: x?:number,y?:number,srcWidth?:number,srcHeight?:number,destWidth?:number,destHeight?:number
returnstype: Phaser.Textures.CanvasTexture
metafilename: Video.js
metapath: gameobjects/video
description:
Takes a snapshot of the specified area of the current frame of the video and renders it to a CanvasTexture object,
which is then returned. You can optionally resize the grab by passing a different `destWidth` and `destHeight`.

This method returns a reference to the `Video.snapshotTexture` object. Calling this method
multiple times will overwrite the previous snapshot with the most recent one.


longname: Phaser.GameObjects.Video-saveSnapshotTexture
since: 3.20.0
name: saveSnapshotTexture
memberof: Phaser.GameObjects.Video
scope: instance
signature: key:string
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: The Texture that was saved.
metafilename: Video.js
metapath: gameobjects/video
description:
Stores a copy of this Videos `snapshotTexture` in the Texture Manager using the given key.

This texture is created when the `snapshot` or `snapshotArea` methods are called.

After doing this, any texture based Game Object, such as a Sprite, can use the contents of the
snapshot by using the texture key:

```javascript
var vid = this.add.video(0, 0, 'intro');

vid.snapshot();

vid.saveSnapshotTexture('doodle');

this.add.image(400, 300, 'doodle');
```

Updating the contents of the `snapshotTexture`, for example by calling `snapshot` again,
will automatically update _any_ Game Object that is using it as a texture.
Calling `saveSnapshotTexture` again will not save another copy of the same texture,
it will just rename the existing one.

By default it will create a single base texture. You can add frames to the texture
by using the `Texture.add` method. After doing this, you can then allow Game Objects
to use a specific frame.


longname: Phaser.GameObjects.Video-loadURL
since: 3.20.0
name: loadURL
memberof: Phaser.GameObjects.Video
scope: instance
signature: url:string,loadEvent?:string,noAudio?:boolean
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Loads a Video from the given URL, ready for playback with the `Video.play` method.

You can control at what point the browser determines the video as being ready for playback via
the `loadEvent` parameter. See [https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement)
for more details.


longname: Phaser.GameObjects.Video-loadMediaStream
since: 3.50.0
name: loadMediaStream
memberof: Phaser.GameObjects.Video
scope: instance
signature: stream:string,loadEvent?:string,noAudio?:boolean
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Loads a Video from the given MediaStream object, ready for playback with the `Video.play` method.

You can control at what point the browser determines the video as being ready for playback via
the `loadEvent` parameter. See [https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement)
for more details.


longname: Phaser.GameObjects.Video-playHandler
since: 3.20.0
name: playHandler
memberof: Phaser.GameObjects.Video
scope: instance
fires: Phaser.GameObjects.Events.VIDEO_PLAY
metafilename: Video.js
metapath: gameobjects/video
description:
Called when the video emits a `playing` event during load.

This is only listened for if the browser doesn't support Promises.


longname: Phaser.GameObjects.Video-unlockHandler
since: 3.20.0
name: unlockHandler
memberof: Phaser.GameObjects.Video
scope: instance
fires: Phaser.GameObjects.Events.VIDEO_UNLOCKED,Phaser.GameObjects.Events.VIDEO_PLAY
signature: error:any
metafilename: Video.js
metapath: gameobjects/video
access: private
description:
This internal method is called if the video couldn't be played because it was interaction locked
by the browser, but an input event has since been received.


longname: Phaser.GameObjects.Video-completeHandler
since: 3.20.0
name: completeHandler
memberof: Phaser.GameObjects.Video
scope: instance
fires: Phaser.GameObjects.Events.VIDEO_COMPLETE
metafilename: Video.js
metapath: gameobjects/video
description:
Called when the video completes playback, i.e. reaches an `ended` state.

This will never happen if the video is coming from a live stream, where the duration is `Infinity`.


longname: Phaser.GameObjects.Video-timeUpdateHandler
since: 3.20.0
name: timeUpdateHandler
memberof: Phaser.GameObjects.Video
scope: instance
fires: Phaser.GameObjects.Events.VIDEO_LOOP
metafilename: Video.js
metapath: gameobjects/video
description:
Called when the video emits a `timeUpdate` event during playback.

This event is too slow and irregular to be used for actual video timing or texture updating,
but we can use it to determine if a video has looped.


longname: Phaser.GameObjects.Video-updateTexture
since: 3.20.0
name: updateTexture
memberof: Phaser.GameObjects.Video
scope: instance
metafilename: Video.js
metapath: gameobjects/video
description:
Internal method that is called when enough video data has been received in order to create a texture
from it. The texture is assigned to the `Video.videoTexture` property and given a base frame that
encompases the whole video size.


longname: Phaser.GameObjects.Video-getVideoKey
since: 3.20.0
name: getVideoKey
memberof: Phaser.GameObjects.Video
scope: instance
returnstype: string
returnsdescription: The key of the video being played from the Video Cache, if any.
metafilename: Video.js
metapath: gameobjects/video
description:
Returns the key of the currently played video, as stored in the Video Cache.
If the video did not come from the cache this will return an empty string.


longname: Phaser.GameObjects.Video-seekTo
since: 3.20.0
name: seekTo
memberof: Phaser.GameObjects.Video
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Seeks to a given point in the video. The value is given as a float between 0 and 1,
where 0 represents the start of the video and 1 represents the end.

Seeking only works if the video has a duration, so will not work for live streams.

When seeking begins, this video will emit a `seeking` event. When the video completes
seeking (i.e. reaches its designated timestamp) it will emit a `seeked` event.

If you wish to seek based on time instead, use the `Video.setCurrentTime` method.


longname: Phaser.GameObjects.Video-getCurrentTime
since: 3.20.0
name: getCurrentTime
memberof: Phaser.GameObjects.Video
scope: instance
returnstype: number
returnsdescription: A double-precision floating-point value indicating the current playback time in seconds.
metafilename: Video.js
metapath: gameobjects/video
description:
A double-precision floating-point value indicating the current playback time in seconds.
If the media has not started to play and has not been seeked, this value is the media's initial playback time.


longname: Phaser.GameObjects.Video-setCurrentTime
since: 3.20.0
name: setCurrentTime
memberof: Phaser.GameObjects.Video
scope: instance
signature: value:string|number
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Seeks to a given playback time in the video. The value is given in _seconds_ or as a string.

Seeking only works if the video has a duration, so will not work for live streams.

When seeking begins, this video will emit a `seeking` event. When the video completes
seeking (i.e. reaches its designated timestamp) it will emit a `seeked` event.

You can provide a string prefixed with either a `+` or a `-`, such as `+2.5` or `-2.5`.
In this case it will seek to +/- the value given, relative to the _current time_.

If you wish to seek based on a duration percentage instead, use the `Video.seekTo` method.


longname: Phaser.GameObjects.Video-getProgress
since: 3.20.0
name: getProgress
memberof: Phaser.GameObjects.Video
scope: instance
returnstype: number
returnsdescription: The current progress of playback. If the video has no duration, will always return zero.
metafilename: Video.js
metapath: gameobjects/video
description:
Returns the current progress of the video. Progress is defined as a value between 0 (the start)
and 1 (the end).

Progress can only be returned if the video has a duration, otherwise it will always return zero.


longname: Phaser.GameObjects.Video-getDuration
since: 3.20.0
name: getDuration
memberof: Phaser.GameObjects.Video
scope: instance
returnstype: number
returnsdescription: A double-precision floating-point value indicating the duration of the media in seconds.
metafilename: Video.js
metapath: gameobjects/video
description:
A double-precision floating-point value which indicates the duration (total length) of the media in seconds,
on the media's timeline. If no media is present on the element, or the media is not valid, the returned value is NaN.

If the media has no known end (such as for live streams of unknown duration, web radio, media incoming from WebRTC,
and so forth), this value is +Infinity.


longname: Phaser.GameObjects.Video-setPaused
since: 3.20.0
name: setPaused
memberof: Phaser.GameObjects.Video
scope: instance
signature: value?:boolean
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Sets the paused state of the currently loaded video.

If the video is playing, calling this method with `true` will pause playback.
If the video is paused, calling this method with `false` will resume playback.

If no video is loaded, this method does nothing.


longname: Phaser.GameObjects.Video-setVolume
since: 3.20.0
name: setVolume
memberof: Phaser.GameObjects.Video
scope: instance
signature: value?:number
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Sets the volume of the currently playing video.

The value given is a double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).


longname: Phaser.GameObjects.Video-setPlaybackRate
since: 3.20.0
name: setPlaybackRate
memberof: Phaser.GameObjects.Video
scope: instance
signature: rate?:number
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Sets the playback rate of the current video.

The value given is a double that indicates the rate at which the media is being played back.


longname: Phaser.GameObjects.Video-getLoop
since: 3.20.0
name: getLoop
memberof: Phaser.GameObjects.Video
scope: instance
returnstype: boolean
returnsdescription: A boolean which indicates whether the media element will start over when it reaches the end.
metafilename: Video.js
metapath: gameobjects/video
description:
Returns a boolean which indicates whether the media element should start over when it reaches the end.


longname: Phaser.GameObjects.Video-setLoop
since: 3.20.0
name: setLoop
memberof: Phaser.GameObjects.Video
scope: instance
signature: value?:boolean
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Sets the loop state of the current video.

The value given is a boolean which indicates whether the media element will start over when it reaches the end.

Not all videos can loop, for example live streams.

Please note that not all browsers support _seamless_ video looping for all encoding formats.


longname: Phaser.GameObjects.Video-saveTexture
since: 3.20.0
name: saveTexture
memberof: Phaser.GameObjects.Video
scope: instance
signature: key:string,flipY?:boolean
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was saved.
metafilename: Video.js
metapath: gameobjects/video
description:
Stores this Video in the Texture Manager using the given key as a dynamic texture,
which any texture-based Game Object, such as a Sprite, can use as its texture:

```javascript
var vid = this.add.video(0, 0, 'intro');

vid.play();

vid.saveTexture('doodle');

this.add.image(400, 300, 'doodle');
```

The saved texture is automatically updated as the video plays. If you pause this video,
or change its source, then the saved texture updates instantly.

Calling `saveTexture` again will not save another copy of the same texture, it will just rename the existing one.

By default it will create a single base texture. You can add frames to the texture
by using the `Texture.add` method. After doing this, you can then allow Game Objects
to use a specific frame.

If you intend to save the texture so you can use it as the input for a Shader, you may need to set the
`flipY` parameter to `true` if you find the video renders upside down in your shader.


longname: Phaser.GameObjects.Video-stop
since: 3.20.0
name: stop
memberof: Phaser.GameObjects.Video
scope: instance
fires: Phaser.GameObjects.Events.VIDEO_STOP
returnstype: Phaser.GameObjects.Video
returnsdescription: This Video Game Object for method chaining.
metafilename: Video.js
metapath: gameobjects/video
description:
Stops the video playing and clears all internal event listeners.

If you only wish to pause playback of the video, and resume it a later time, use the `Video.pause` method instead.

If the video hasn't finished downloading, calling this method will not abort the download. To do that you need to
call `destroy` instead.


longname: Phaser.GameObjects.Video-removeVideoElement
since: 3.20.0
name: removeVideoElement
memberof: Phaser.GameObjects.Video
scope: instance
metafilename: Video.js
metapath: gameobjects/video
description:
Removes the Video element from the DOM by calling parentNode.removeChild on itself.

Also removes the autoplay and src attributes and nulls the Video reference.

You should not call this method if you were playing a video from the Video Cache that
you wish to play again in your game, or if another Video object is also using the same
video.

If you loaded an external video via `Video.loadURL` then you should call this function
to clear up once you are done with the instance.


longname: Phaser.GameObjects.Video-preDestroy
since: 3.21.0
name: preDestroy
memberof: Phaser.GameObjects.Video
scope: instance
metafilename: Video.js
metapath: gameobjects/video
access: private
description:
Handles the pre-destroy step for the Video object.

This calls `Video.stop` and optionally `Video.removeVideoElement`.

If any Sprites are using this Video as their texture it is up to you to manage those.


longname: Phaser.GameObjects.Video-renderCanvas
since: 3.20.0
name: renderCanvas
memberof: Phaser.GameObjects.Video
scope: instance
metafilename: VideoCanvasRenderer.js
metapath: gameobjects/video
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.GameObjects.Video,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.GameObjectCreator-video
since: 3.20.0
name: video
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object,addToScene?:boolean
returnstype: Phaser.GameObjects.Video
returnsdescription: The Game Object that was created.
metafilename: VideoCreator.js
metapath: gameobjects/video
description:
Creates a new Video Game Object and returns it.

Note: This method will only be available if the Video Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-video
since: 3.20.0
name: video
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x:number,y:number,key?:string
returnstype: Phaser.GameObjects.Video
returnsdescription: The Game Object that was created.
metafilename: VideoFactory.js
metapath: gameobjects/video
description:
Creates a new Video Game Object and adds it to the Scene.

Note: This method will only be available if the Video Game Object has been built into Phaser.


longname: Phaser.GameObjects.Video-renderWebGL
since: 3.20.0
name: renderWebGL
memberof: Phaser.GameObjects.Video
scope: instance
metafilename: VideoWebGLRenderer.js
metapath: gameobjects/video
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.GameObjects.Video,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.GameObjects.Zone-setCircleDropZone
since: 3.0.0
name: setCircleDropZone
memberof: Phaser.GameObjects.Zone
scope: instance
signature: radius:number
returnstype: Phaser.GameObjects.Zone
returnsdescription: This Game Object.
metafilename: Zone.js
metapath: gameobjects/zone
description:
Sets this Zone to be a Circular Drop Zone.
The circle is centered on this Zones `x` and `y` coordinates.


longname: Phaser.GameObjects.Zone-setRectangleDropZone
since: 3.0.0
name: setRectangleDropZone
memberof: Phaser.GameObjects.Zone
scope: instance
signature: width:number,height:number
returnstype: Phaser.GameObjects.Zone
returnsdescription: This Game Object.
metafilename: Zone.js
metapath: gameobjects/zone
description:
Sets this Zone to be a Rectangle Drop Zone.
The rectangle is centered on this Zones `x` and `y` coordinates.


longname: Phaser.GameObjects.Zone-setAlpha
since: 3.11.0
name: setAlpha
memberof: Phaser.GameObjects.Zone
scope: instance
metafilename: Zone.js
metapath: gameobjects/zone
access: private
description:
A NOOP method so you can pass a Zone to a Container.
Calling this method will do nothing. It is intentionally empty.


longname: Phaser.GameObjects.Zone-setBlendMode
since: 3.16.2
name: setBlendMode
memberof: Phaser.GameObjects.Zone
scope: instance
metafilename: Zone.js
metapath: gameobjects/zone
access: private
description:
A NOOP method so you can pass a Zone to a Container in Canvas.
Calling this method will do nothing. It is intentionally empty.


longname: Phaser.GameObjects.GameObjectCreator-zone
since: 3.0.0
name: zone
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:object
returnstype: Phaser.GameObjects.Zone
returnsdescription: The Game Object that was created.
metafilename: ZoneCreator.js
metapath: gameobjects/zone
description:
Creates a new Zone Game Object and returns it.

Note: This method will only be available if the Zone Game Object has been built into Phaser.


longname: Phaser.GameObjects.GameObjectFactory-zone
since: 3.0.0
name: zone
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: x:number,y:number,width:number,height:number
returnstype: Phaser.GameObjects.Zone
returnsdescription: The Game Object that was created.
metafilename: ZoneFactory.js
metapath: gameobjects/zone
description:
Creates a new Zone Game Object and adds it to the Scene.

Note: This method will only be available if the Zone Game Object has been built into Phaser.


longname: Phaser.Geom.Circle-getPoint
since: 3.0.0
name: getPoint
memberof: Phaser.Geom.Circle
scope: instance
signature: position:number,out?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point|object
returnsdescription: A Point, or point-like object, containing the coordinates of the point around the circle.
metafilename: Circle.js
metapath: geom/circle
description:
Returns a Point object containing the coordinates of a point on the circumference of the Circle
based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point
at 180 degrees around the circle.


longname: Phaser.Geom.Circle-getPoints
since: 3.0.0
name: getPoints
memberof: Phaser.Geom.Circle
scope: instance
signature: quantity:number,stepRate?:number,output?:array|Array.<Phaser.Geom.Point>
returnstype: array|Array.<Phaser.Geom.Point>
returnsdescription: An array of Point objects pertaining to the points around the circumference of the circle.
metafilename: Circle.js
metapath: geom/circle
description:
Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle,
based on the given quantity or stepRate values.


longname: Phaser.Geom.Circle.CircumferencePoint
since: 3.0.0
name: CircumferencePoint
memberof: Phaser.Geom.Circle
scope: static
signature: circle:Phaser.Geom.Circle,angle:number,out?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point|object
returnsdescription: A Point object where the `x` and `y` properties are the point on the circumference.
metafilename: CircumferencePoint.js
metapath: geom/circle
description:
Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.


longname: Phaser.Geom.Circle.CopyFrom
since: 3.0.0
name: CopyFrom
memberof: Phaser.Geom.Circle
scope: static
signature: source:Phaser.Geom.Circle,dest:Phaser.Geom.Circle
returnstype: Phaser.Geom.Circle
returnsdescription: The destination Circle.
metafilename: CopyFrom.js
metapath: geom/circle
description:
Copies the `x`, `y` and `radius` properties from the `source` Circle
into the given `dest` Circle, then returns the `dest` Circle.


longname: Phaser.Geom.Circle.Equals
since: 3.0.0
name: Equals
memberof: Phaser.Geom.Circle
scope: static
signature: circle:Phaser.Geom.Circle,toCompare:Phaser.Geom.Circle
returnstype: boolean
returnsdescription: `true` if the two Circles equal each other, otherwise `false`.
metafilename: Equals.js
metapath: geom/circle
description:
Compares the `x`, `y` and `radius` properties of the two given Circles.
Returns `true` if they all match, otherwise returns `false`.


longname: Phaser.Geom.Ellipse.CircumferencePoint
since: 3.0.0
name: CircumferencePoint
memberof: Phaser.Geom.Ellipse
scope: static
signature: ellipse:Phaser.Geom.Ellipse,angle:number,out?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point|object
returnsdescription: A Point object where the `x` and `y` properties are the point on the circumference.
metafilename: CircumferencePoint.js
metapath: geom/ellipse
description:
Returns a Point object containing the coordinates of a point on the circumference of the Ellipse based on the given angle.


longname: Phaser.Geom.Ellipse.CopyFrom
since: 3.0.0
name: CopyFrom
memberof: Phaser.Geom.Ellipse
scope: static
signature: source:Phaser.Geom.Ellipse,dest:Phaser.Geom.Ellipse
returnstype: Phaser.Geom.Ellipse
returnsdescription: The destination Ellipse.
metafilename: CopyFrom.js
metapath: geom/ellipse
description:
Copies the `x`, `y`, `width` and `height` properties from the `source` Ellipse
into the given `dest` Ellipse, then returns the `dest` Ellipse.


longname: Phaser.Geom.Ellipse-getPoint
since: 3.0.0
name: getPoint
memberof: Phaser.Geom.Ellipse
scope: instance
signature: position:number,out?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point|object
returnsdescription: A Point, or point-like object, containing the coordinates of the point around the ellipse.
metafilename: Ellipse.js
metapath: geom/ellipse
description:
Returns a Point object containing the coordinates of a point on the circumference of the Ellipse
based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point
at 180 degrees around the circle.


longname: Phaser.Geom.Ellipse-getPoints
since: 3.0.0
name: getPoints
memberof: Phaser.Geom.Ellipse
scope: instance
signature: quantity:number,stepRate?:number,output?:array|Array.<Phaser.Geom.Point>
returnstype: array|Array.<Phaser.Geom.Point>
returnsdescription: An array of Point objects pertaining to the points around the circumference of the ellipse.
metafilename: Ellipse.js
metapath: geom/ellipse
description:
Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse,
based on the given quantity or stepRate values.


longname: Phaser.Geom.Ellipse.Equals
since: 3.0.0
name: Equals
memberof: Phaser.Geom.Ellipse
scope: static
signature: ellipse:Phaser.Geom.Ellipse,toCompare:Phaser.Geom.Ellipse
returnstype: boolean
returnsdescription: `true` if the two Ellipse equal each other, otherwise `false`.
metafilename: Equals.js
metapath: geom/ellipse
description:
Compares the `x`, `y`, `width` and `height` properties of the two given Ellipses.
Returns `true` if they all match, otherwise returns `false`.


longname: Phaser.Geom.Intersects.GetCircleToRectangle
since: 3.0.0
name: GetCircleToRectangle
memberof: Phaser.Geom.Intersects
scope: static
signature: circle:Phaser.Geom.Circle,rect:Phaser.Geom.Rectangle,out?:array
returnstype: array
returnsdescription: An array with the points of intersection if objects intersect, otherwise an empty array.
metafilename: GetCircleToRectangle.js
metapath: geom/intersects
description:
Checks for intersection between a circle and a rectangle,
and returns the intersection points as a Point object array.


longname: Phaser.Geom.Intersects.GetLineToCircle
since: 3.0.0
name: GetLineToCircle
memberof: Phaser.Geom.Intersects
scope: static
signature: line:Phaser.Geom.Line,circle:Phaser.Geom.Circle,out?:array
returnstype: array
returnsdescription: An array with the points of intersection if objects intersect, otherwise an empty array.
metafilename: GetLineToCircle.js
metapath: geom/intersects
description:
Checks for intersection between the line segment and circle,
and returns the intersection points as a Point object array.


longname: Phaser.Geom.Intersects.GetLineToLine
since: 3.50.0
name: GetLineToLine
memberof: Phaser.Geom.Intersects
scope: static
signature: line1:Phaser.Geom.Line,line2:Phaser.Geom.Line,out?:Phaser.Math.Vector3
returnstype: Phaser.Math.Vector3
returnsdescription: A Vector3 containing the intersection results, or `null`.
metafilename: GetLineToLine.js
metapath: geom/intersects
description:
Checks for intersection between the two line segments and returns the intersection point as a Vector3,
or `null` if the lines are parallel, or do not intersect.

The `z` property of the Vector3 contains the intersection distance, which can be used to find
the closest intersecting point from a group of line segments.


longname: Phaser.Geom.Intersects.GetLineToPoints
since: 3.50.0
name: GetLineToPoints
memberof: Phaser.Geom.Intersects
scope: static
returnstype: Phaser.Math.Vector3
returnsdescription: A Vector3 containing the intersection results, or `null`.
metafilename: GetLineToPoints.js
metapath: geom/intersects
description:
Checks for the closest point of intersection between a line segment and an array of points, where each pair
of points are converted to line segments for the intersection tests.

If no intersection is found, this function returns `null`.

If intersection was found, a Vector3 is returned with the following properties:

The `x` and `y` components contain the point of the intersection.
The `z` component contains the closest distance.

signature:
line:Phaser.Geom.Line,points:Array.<Phaser.Math.Vector2>|Array.<Phaser.Geom.Point>,out?:Phaser.Math.Vector3


longname: Phaser.Geom.Intersects.GetLineToPolygon
since: 3.50.0
name: GetLineToPolygon
memberof: Phaser.Geom.Intersects
scope: static
returnstype: Phaser.Math.Vector4
returnsdescription: A Vector4 containing the intersection results, or `null`.
metafilename: GetLineToPolygon.js
metapath: geom/intersects
description:
Checks for the closest point of intersection between a line segment and an array of polygons.

If no intersection is found, this function returns `null`.

If intersection was found, a Vector4 is returned with the following properties:

The `x` and `y` components contain the point of the intersection.
The `z` component contains the closest distance.
The `w` component contains the index of the polygon, in the given array, that triggered the intersection.

signature:
line:Phaser.Geom.Line,polygons:Phaser.Geom.Polygon|Array.<Phaser.Geom.Polygon>,out?:Phaser.Math.Vector4


longname: Phaser.Geom.Intersects.GetLineToRectangle
since: 3.0.0
name: GetLineToRectangle
memberof: Phaser.Geom.Intersects
scope: static
signature: line:Phaser.Geom.Line,rect:Phaser.Geom.Rectangle|object,out?:array
returnstype: array
returnsdescription: An array with the points of intersection if objects intersect, otherwise an empty array.
metafilename: GetLineToRectangle.js
metapath: geom/intersects
description:
Checks for intersection between the Line and a Rectangle shape,
and returns the intersection points as a Point object array.


longname: Phaser.Geom.Intersects.GetRaysFromPointToPolygon
since: 3.50.0
name: GetRaysFromPointToPolygon
memberof: Phaser.Geom.Intersects
scope: static
signature: x:number,y:number,polygons:Phaser.Geom.Polygon|Array.<Phaser.Geom.Polygon>
returnstype: Array.<Phaser.Math.Vector4>
returnsdescription: An array containing all intersections in Vector4s.
metafilename: GetRaysFromPointToPolygon.js
metapath: geom/intersects
description:
Projects rays out from the given point to each line segment of the polygons.

If the rays intersect with the polygons, the points of intersection are returned in an array.

If no intersections are found, the returned array will be empty.

Each Vector4 intersection result has the following properties:

The `x` and `y` components contain the point of the intersection.
The `z` component contains the angle of intersection.
The `w` component contains the index of the polygon, in the given array, that triggered the intersection.


longname: Phaser.Geom.Intersects.GetRectangleIntersection
since: 3.0.0
name: GetRectangleIntersection
memberof: Phaser.Geom.Intersects
scope: static
signature: rectA:Phaser.Geom.Rectangle,rectB:Phaser.Geom.Rectangle,output?:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: A rectangle object with intersection data.
metafilename: GetRectangleIntersection.js
metapath: geom/intersects
description:
Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object.

If optional `output` parameter is omitted, new Rectangle object is created and returned. If there is intersection, it will contain intersection area. If there is no intersection, it wil be empty Rectangle (all values set to zero).

If Rectangle object is passed as `output` and there is intersection, then intersection area data will be loaded into it and it will be returned. If there is no intersection, it will be returned without any change.


longname: Phaser.Geom.Intersects.GetRectangleToRectangle
since: 3.0.0
name: GetRectangleToRectangle
memberof: Phaser.Geom.Intersects
scope: static
signature: rectA:Phaser.Geom.Rectangle,rectB:Phaser.Geom.Rectangle,out?:array
returnstype: array
returnsdescription: An array with the points of intersection if objects intersect, otherwise an empty array.
metafilename: GetRectangleToRectangle.js
metapath: geom/intersects
description:
Checks if two Rectangles intersect and returns the intersection points as a Point object array.

A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle's bounds. As such, the two Rectangles are considered "solid". A Rectangle with no width or no height will never intersect another Rectangle.


longname: Phaser.Geom.Intersects.GetRectangleToTriangle
since: 3.0.0
name: GetRectangleToTriangle
memberof: Phaser.Geom.Intersects
scope: static
signature: rect:Phaser.Geom.Rectangle,triangle:Phaser.Geom.Triangle,out?:array
returnstype: array
returnsdescription: An array with the points of intersection if objects intersect, otherwise an empty array.
metafilename: GetRectangleToTriangle.js
metapath: geom/intersects
description:
Checks for intersection between Rectangle shape and Triangle shape,
and returns the intersection points as a Point object array.


longname: Phaser.Geom.Intersects.GetTriangleToCircle
since: 3.0.0
name: GetTriangleToCircle
memberof: Phaser.Geom.Intersects
scope: static
signature: triangle:Phaser.Geom.Triangle,circle:Phaser.Geom.Circle,out?:array
returnstype: array
returnsdescription: An array with the points of intersection if objects intersect, otherwise an empty array.
metafilename: GetTriangleToCircle.js
metapath: geom/intersects
description:
Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array.

A Circle intersects a Triangle if its center is located within it or if any of the Triangle's sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.


longname: Phaser.Geom.Intersects.GetTriangleToLine
since: 3.0.0
name: GetTriangleToLine
memberof: Phaser.Geom.Intersects
scope: static
signature: triangle:Phaser.Geom.Triangle,line:Phaser.Geom.Line,out?:array
returnstype: array
returnsdescription: An array with the points of intersection if objects intersect, otherwise an empty array.
metafilename: GetTriangleToLine.js
metapath: geom/intersects
description:
Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array.

The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle's sides. Thus, the Triangle is considered "solid".


longname: Phaser.Geom.Intersects.GetTriangleToTriangle
since: 3.0.0
name: GetTriangleToTriangle
memberof: Phaser.Geom.Intersects
scope: static
signature: triangleA:Phaser.Geom.Triangle,triangleB:Phaser.Geom.Triangle,out?:array
returnstype: array
returnsdescription: An array with the points of intersection if objects intersect, otherwise an empty array.
metafilename: GetTriangleToTriangle.js
metapath: geom/intersects
description:
Checks if two Triangles intersect, and returns the intersection points as a Point object array.

A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".


longname: Phaser.Geom.Intersects.LineToCircle
since: 3.0.0
name: LineToCircle
memberof: Phaser.Geom.Intersects
scope: static
signature: line:Phaser.Geom.Line,circle:Phaser.Geom.Circle,nearest?:Phaser.Geom.Point|any
returnstype: boolean
returnsdescription: `true` if the two objects intersect, otherwise `false`.
metafilename: LineToCircle.js
metapath: geom/intersects
description:
Checks for intersection between the line segment and circle.

Based on code by [Matt DesLauriers](https://github.com/mattdesl/line-circle-collision/blob/master/LICENSE.md).


longname: Phaser.Geom.Intersects.LineToLine
since: 3.0.0
name: LineToLine
memberof: Phaser.Geom.Intersects
scope: static
signature: line1:Phaser.Geom.Line,line2:Phaser.Geom.Line,out?:Phaser.Geom.Point
returnstype: boolean
metafilename: LineToLine.js
metapath: geom/intersects
description:
Checks if two Lines intersect. If the Lines are identical, they will be treated as parallel and thus non-intersecting.

returnsdescription:
`true` if the two Lines intersect, and the `out` object will be populated, if given. Otherwise, `false`.


longname: Phaser.Geom.Intersects.LineToRectangle
since: 3.0.0
name: LineToRectangle
memberof: Phaser.Geom.Intersects
scope: static
signature: line:Phaser.Geom.Line,rect:Phaser.Geom.Rectangle|object
returnstype: boolean
returnsdescription: `true` if the Line and the Rectangle intersect, `false` otherwise.
metafilename: LineToRectangle.js
metapath: geom/intersects
description:
Checks for intersection between the Line and a Rectangle shape, or a rectangle-like
object, with public `x`, `y`, `right` and `bottom` 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'.


longname: Phaser.Geom.Intersects.PointToLine
since: 3.0.0
name: PointToLine
memberof: Phaser.Geom.Intersects
scope: static
signature: point:Phaser.Geom.Point|any,line:Phaser.Geom.Line,lineThickness?:number
returnstype: boolean
returnsdescription: `true` if the Point falls on the Line, otherwise `false`.
metafilename: PointToLine.js
metapath: geom/intersects
description:
Checks if the a Point falls between the two end-points of a Line, based on the given line thickness.

Assumes that the line end points are circular, not square.


longname: Phaser.Geom.Intersects.RectangleToRectangle
since: 3.0.0
name: RectangleToRectangle
memberof: Phaser.Geom.Intersects
scope: static
signature: rectA:Phaser.Geom.Rectangle,rectB:Phaser.Geom.Rectangle
returnstype: boolean
returnsdescription: `true` if the two Rectangles intersect, otherwise `false`.
metafilename: RectangleToRectangle.js
metapath: geom/intersects
description:
Checks if two Rectangles intersect.

A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle's bounds.
As such, the two Rectangles are considered "solid".
A Rectangle with no width or no height will never intersect another Rectangle.


longname: Phaser.Geom.Intersects.TriangleToCircle
since: 3.0.0
name: TriangleToCircle
memberof: Phaser.Geom.Intersects
scope: static
signature: triangle:Phaser.Geom.Triangle,circle:Phaser.Geom.Circle
returnstype: boolean
returnsdescription: `true` if the Triangle and the `Circle` intersect, otherwise `false`.
metafilename: TriangleToCircle.js
metapath: geom/intersects
description:
Checks if a Triangle and a Circle intersect.

A Circle intersects a Triangle if its center is located within it or if any of the Triangle's sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.


longname: Phaser.Geom.Intersects.TriangleToLine
since: 3.0.0
name: TriangleToLine
memberof: Phaser.Geom.Intersects
scope: static
signature: triangle:Phaser.Geom.Triangle,line:Phaser.Geom.Line
returnstype: boolean
returnsdescription: `true` if the Triangle and the Line intersect, otherwise `false`.
metafilename: TriangleToLine.js
metapath: geom/intersects
description:
Checks if a Triangle and a Line intersect.

The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle's sides. Thus, the Triangle is considered "solid".


longname: Phaser.Geom.Intersects.TriangleToTriangle
since: 3.0.0
name: TriangleToTriangle
memberof: Phaser.Geom.Intersects
scope: static
signature: triangleA:Phaser.Geom.Triangle,triangleB:Phaser.Geom.Triangle
returnstype: boolean
returnsdescription: `true` if the Triangles intersect, otherwise `false`.
metafilename: TriangleToTriangle.js
metapath: geom/intersects
description:
Checks if two Triangles intersect.

A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".


longname: Phaser.Geom.Line.BresenhamPoints
since: 3.0.0
name: BresenhamPoints
memberof: Phaser.Geom.Line
scope: static
signature: line:Phaser.Geom.Line,stepRate?:number,results?:Array.<Phaser.Types.Math.Vector2Like>
returnstype: Array.<Phaser.Types.Math.Vector2Like>
returnsdescription: The array of coordinates on the line.
metafilename: BresenhamPoints.js
metapath: geom/line
description:
Using Bresenham's line algorithm this will return an array of all coordinates on this line.

The `start` and `end` points are rounded before this runs as the algorithm works on integers.


longname: Phaser.Geom.Line.Extend
since: 3.16.0
name: Extend
memberof: Phaser.Geom.Line
scope: static
signature: line:Phaser.Geom.Line,left:number,right?:number
returnstype: Phaser.Geom.Line
returnsdescription: The modified Line instance.
metafilename: Extend.js
metapath: geom/line
description:
Extends the start and end points of a Line by the given amounts.

The amounts can be positive or negative. Positive points will increase the length of the line,
while negative ones will decrease it.

If no `right` value is provided it will extend the length of the line equally in both directions.

Pass a value of zero to leave the start or end point unchanged.


longname: Phaser.Geom.Line.GetEasedPoints
since: 3.23.0
name: GetEasedPoints
memberof: Phaser.Geom.Line
scope: static
returnstype: Array.<Phaser.Geom.Point>
returnsdescription: An array of Geom.Points containing the coordinates of the points on the line.
metafilename: GetEasedPoints.js
metapath: geom/line
description:
Returns an array of `quantity` Points where each point is taken from the given Line,
spaced out according to the ease function specified.

```javascript
const line = new Phaser.Geom.Line(100, 300, 700, 300);
const points = Phaser.Geom.Line.GetEasedPoints(line, 'sine.out', 32)
```

In the above example, the `points` array will contain 32 points spread-out across
the length of `line`, where the position of each point is determined by the `Sine.out`
ease function.

You can optionally provide a collinear threshold. In this case, the resulting points
are checked against each other, and if they are `< collinearThreshold` distance apart,
they are dropped from the results. This can help avoid lots of clustered points at
far ends of the line with tightly-packed eases such as Quartic. Leave the value set
to zero to skip this check.

Note that if you provide a collinear threshold, the resulting array may not always
contain `quantity` points.

signature:
line:Phaser.Geom.Line,ease:string|function,quantity:number,collinearThreshold?:number,easeParams?:Array.<number>


longname: Phaser.Geom.Line.GetNormal
since: 3.0.0
name: GetNormal
memberof: Phaser.Geom.Line
scope: static
signature: line:Phaser.Geom.Line,out?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point|object
returnsdescription: The normal of the Line.
metafilename: GetNormal.js
metapath: geom/line
description:
Calculate the normal of the given line.

The normal of a line is a vector that points perpendicular from it.


longname: Phaser.Geom.Line.GetPoints
since: 3.0.0
name: GetPoints
memberof: Phaser.Geom.Line
scope: static
signature: line:Phaser.Geom.Line,quantity:number,stepRate?:number,out?:array|Array.<Phaser.Geom.Point>
returnstype: array|Array.<Phaser.Geom.Point>
returnsdescription: An array of Points, or point-like objects, containing the coordinates of the points on the line.
metafilename: GetPoints.js
metapath: geom/line
description:
Get a number of points along a line's length.

Provide a `quantity` to get an exact number of points along the line.

Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when
providing a `stepRate`.


longname: Phaser.Geom.Line.NormalY
since: 3.0.0
name: NormalY
memberof: Phaser.Geom.Line
scope: static
signature: line:Phaser.Geom.Line
returnstype: number
returnsdescription: The Y value of the normal of the Line.
metafilename: NormalY.js
metapath: geom/line
description:
The Y value of the normal of the given line.
The normal of a line is a vector that points perpendicular from it.


longname: Phaser.Geom.Line.ReflectAngle
since: 3.0.0
name: ReflectAngle
memberof: Phaser.Geom.Line
scope: static
signature: lineA:Phaser.Geom.Line,lineB:Phaser.Geom.Line
returnstype: number
returnsdescription: The reflected angle between each line.
metafilename: ReflectAngle.js
metapath: geom/line
description:
Calculate the reflected angle between two lines.

This is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2.


longname: Phaser.Geom.Mesh.Face-contains
since: 3.50.0
name: contains
memberof: Phaser.Geom.Mesh.Face
scope: instance
signature: x:number,y:number,calcMatrix?:Phaser.GameObjects.Components.TransformMatrix
returnstype: boolean
returnsdescription: `true` if the coordinates lay within this Face, otherwise `false`.
metafilename: Face.js
metapath: geom/mesh
description:
Checks if the given coordinates are within this Face.

You can optionally provide a transform matrix. If given, the Face vertices
will be transformed first, before being checked against the coordinates.


longname: Phaser.Geom.Mesh.Face-isCounterClockwise
since: 3.50.0
name: isCounterClockwise
memberof: Phaser.Geom.Mesh.Face
scope: instance
signature: z:number
returnstype: boolean
returnsdescription: `true` if the vertices in this Face run counter-clockwise, otherwise `false`.
metafilename: Face.js
metapath: geom/mesh
description:
Checks if the vertices in this Face are orientated counter-clockwise, or not.

It checks the transformed position of the vertices, not the local one.


longname: Phaser.Geom.Mesh.Face-transformCoordinatesLocal
since: 3.50.0
name: transformCoordinatesLocal
memberof: Phaser.Geom.Mesh.Face
scope: instance
signature: transformMatrix:Phaser.Math.Matrix4,width:number,height:number,cameraZ:number
returnstype: Phaser.Geom.Mesh.Face
returnsdescription: This Face instance.
metafilename: Face.js
metapath: geom/mesh
description:
Transforms all Face vertices by the given matrix, storing the results in their `vx`, `vy` and `vz` properties.


longname: Phaser.Geom.Mesh.Face-updateBounds
since: 3.50.0
name: updateBounds
memberof: Phaser.Geom.Mesh.Face
scope: instance
returnstype: Phaser.Geom.Mesh.Face
returnsdescription: This Face instance.
metafilename: Face.js
metapath: geom/mesh
description:
Updates the bounds of this Face, based on the translated values of the vertices.

Call this method prior to accessing the `Face.bounds` property.


longname: Phaser.Geom.Mesh.Face-isInView
since: 3.50.0
name: isInView
memberof: Phaser.Geom.Mesh.Face
scope: instance
returnstype: boolean
returnsdescription: `true` if this Face can be seen by the Camera.
metafilename: Face.js
metapath: geom/mesh
description:
Checks if this Face is within the view of the given Camera.

This method is called in the `MeshWebGLRenderer` function. It performs the following tasks:

First, the `Vertex.update` method is called on each of the vertices. This populates them
with the new translated values, updating their `tx`, `ty` and `ta` properties.

Then it tests to see if this face is visible due to the alpha values, if not, it returns.

After this, if `hideCCW` is set, it calls `isCounterClockwise` and returns if not.

Finally, it will update the `Face.bounds` based on the newly translated vertex values
and return the results of an intersection test between the bounds and the camera world view
rectangle.

signature:
camera:Phaser.Cameras.Scene2D.Camera,hideCCW:boolean,z:number,alpha:number,a:number,b:number,c:number,d:number,e:number,f:number,roundPixels:boolean


longname: Phaser.Geom.Mesh.Face-translate
since: 3.50.0
name: translate
memberof: Phaser.Geom.Mesh.Face
scope: instance
signature: x:number,y?:number
returnstype: Phaser.Geom.Mesh.Face
returnsdescription: This Face instance.
metafilename: Face.js
metapath: geom/mesh
description:
Translates the vertices of this Face by the given amounts.

The actual vertex positions are adjusted, not their transformed position.

Therefore, this updates the vertex data directly.


longname: Phaser.Geom.Mesh.GenerateGridVerts
since: 3.50.0
name: GenerateGridVerts
memberof: Phaser.Geom.Mesh
scope: static
signature: config:Phaser.Types.Geom.Mesh.GenerateGridConfig
returnstype: Phaser.Types.Geom.Mesh.GenerateGridVertsResult
returnsdescription: A Grid Result object, containing the generated vertices and indicies.
metafilename: GenerateGridVerts.js
metapath: geom/mesh
description:
Creates a grid of vertices based on the given configuration object and optionally adds it to a Mesh.

The size of the grid is given in pixels. An example configuration may be:

`{ width: 256, height: 256, widthSegments: 2, heightSegments: 2, tile: true }`

This will create a grid 256 x 256 pixels in size, split into 2 x 2 segments, with
the texture tiling across the cells.

You can split the grid into segments both vertically and horizontally. This will
generate two faces per grid segment as a result.

The `tile` parameter allows you to control if the tile will repeat across the grid
segments, or be displayed in full.

If adding this grid to a Mesh you can offset the grid via the `x` and `y` properties.

UV coordinates are generated based on the given texture and frame in the config. For
example, no frame is given, the UVs will be in the range 0 to 1. If a frame is given,
such as from a texture atlas, the UVs will be generated within the range of that frame.


longname: Phaser.Geom.Mesh.GenerateObjVerts
since: 3.50.0
name: GenerateObjVerts
memberof: Phaser.Geom.Mesh
scope: static
returnstype: Phaser.Types.Geom.Mesh.GenerateVertsResult
returnsdescription: The parsed Face and Vertex objects.
metafilename: GenerateObjVerts.js
metapath: geom/mesh
description:
This method will return an object containing Face and Vertex instances, generated
from the parsed triangulated OBJ Model data given to this function.

The obj data should have been parsed in advance via the ParseObj function:

```javascript
var data = Phaser.Geom.Mesh.ParseObj(rawData, flipUV);

var results = GenerateObjVerts(data);
```

Alternatively, you can parse obj files loaded via the OBJFile loader:

```javascript
preload ()
{
  this.load.obj('alien', 'assets/3d/alien.obj);
}

var results = GenerateObjVerts(this.cache.obj.get('alien));
```

Make sure your 3D package has triangulated the model data prior to exporting it.

You can use the data returned by this function to populate the vertices of a Mesh Game Object.

You may add multiple models to a single Mesh, although they will act as one when
moved or rotated. You can scale the model data, should it be too small (or large) to visualize.
You can also offset the model via the `x`, `y` and `z` parameters.

signature:
data:Phaser.Types.Geom.Mesh.OBJData,mesh?:Phaser.GameObjects.Mesh,scale?:number,x?:number,y?:number,z?:number,rotateX?:number,rotateY?:number,rotateZ?:number,zIsUp?:boolean


longname: Phaser.Geom.Mesh.GenerateVerts
since: 3.50.0
name: GenerateVerts
memberof: Phaser.Geom.Mesh
scope: static
returnstype: Phaser.Types.Geom.Mesh.GenerateVertsResult
returnsdescription: The parsed Face and Vertex objects.
metafilename: GenerateVerts.js
metapath: geom/mesh
description:
Generates a set of Face and Vertex objects by parsing the given data.

This method will take vertex data in one of two formats, based on the `containsZ` parameter.

If your vertex data are `x`, `y` pairs, then `containsZ` should be `false` (this is the default)

If your vertex data is groups of `x`, `y` and `z` values, then the `containsZ` parameter must be true.

The `uvs` parameter is a numeric array consisting of `u` and `v` pairs.

The `normals` parameter is a numeric array consisting of `x`, `y` vertex normal values and, if `containsZ` is true, `z` values as well.

The `indicies` parameter is an optional array that, if given, is an indexed list of vertices to be added.

The `colors` parameter is an optional array, or single value, that if given sets the color of each vertex created.

The `alphas` parameter is an optional array, or single value, that if given sets the alpha of each vertex created.

When providing indexed data it is assumed that _all_ of the arrays are indexed, not just the vertices.

The following example will create a 256 x 256 sized quad using an index array:

```javascript
const vertices = [
  -128, 128,
  128, 128,
  -128, -128,
  128, -128
];

const uvs = [
  0, 1,
  1, 1,
  0, 0,
  1, 0
];

const indices = [ 0, 2, 1, 2, 3, 1 ];

GenerateVerts(vertices, uvs, indicies);
```

If the data is not indexed, it's assumed that the arrays all contain sequential data.

signature:
vertices:Array.<number>,uvs:Array.<number>,indicies?:Array.<number>,containsZ?:boolean,normals?:Array.<number>,colors?:number|Array.<number>,alphas?:number|Array.<number>


longname: Phaser.Geom.Mesh.ParseObj
since: 3.50.0
name: ParseObj
memberof: Phaser.Geom.Mesh
scope: static
signature: data:string,flipUV?:boolean
returnstype: Phaser.Types.Geom.Mesh.OBJData
returnsdescription: The parsed model and material data.
metafilename: ParseObj.js
metapath: geom/mesh
description:
Parses a Wavefront OBJ File, extracting the models from it and returning them in an array.

The model data *must* be triangulated for a Mesh Game Object to be able to render it.


longname: Phaser.Geom.Mesh.ParseObjMaterial
since: 3.50.0
name: ParseObjMaterial
memberof: Phaser.Geom.Mesh
scope: static
signature: mtl:string
returnstype: object
returnsdescription: The parsed material colors, where each property of the object matches the material name.
metafilename: ParseObjMaterial.js
metapath: geom/mesh
description:
Takes a Wavefront Material file and extracts the diffuse reflectivity of the named
materials, converts them to integer color values and returns them.

This is used internally by the `addOBJ` and `addModel` methods, but is exposed for
public consumption as well.

Note this only works with diffuse values, specified in the `Kd r g b` format, where
`g` and `b` are optional, but `r` is required. It does not support spectral rfl files,
or any other material statement (such as `Ka` or `Ks`)


longname: Phaser.Geom.Mesh.RotateFace
since: 3.50.0
name: RotateFace
memberof: Phaser.Geom.Mesh
scope: static
signature: face:Phaser.Geom.Mesh.Face,angle:number,cx?:number,cy?:number
metafilename: RotateFace.js
metapath: geom/mesh
description:
Rotates the vertices of a Face to the given angle.

The actual vertex positions are adjusted, not their transformed positions.

Therefore, this updates the vertex data directly.


longname: Phaser.Geom.Point.GetCentroid
since: 3.0.0
name: GetCentroid
memberof: Phaser.Geom.Point
scope: static
signature: points:Array.<Phaser.Types.Math.Vector2Like>,out?:Phaser.Geom.Point
returnstype: Phaser.Geom.Point
returnsdescription: A Point object representing the geometric center of the given points.
metafilename: GetCentroid.js
metapath: geom/point
description:
Get the centroid or geometric center of a plane figure (the arithmetic mean position of all the points in the figure).
Informally, it is the point at which a cutout of the shape could be perfectly balanced on the tip of a pin.


longname: Phaser.Geom.Point.GetMagnitude
since: 3.0.0
name: GetMagnitude
memberof: Phaser.Geom.Point
scope: static
signature: point:Phaser.Geom.Point
returnstype: number
returnsdescription: The resulting magnitude
metafilename: GetMagnitude.js
metapath: geom/point
description:
Calculate the magnitude of the point, which equivalent to the length of the line from the origin to this point.


longname: Phaser.Geom.Point.GetMagnitudeSq
since: 3.0.0
name: GetMagnitudeSq
memberof: Phaser.Geom.Point
scope: static
signature: point:Phaser.Geom.Point
returnstype: number
returnsdescription: Returns square of the magnitude of given point.
metafilename: GetMagnitudeSq.js
metapath: geom/point
description:
Calculates the square of magnitude of given point.(Can be used for fast magnitude calculation of point)


longname: Phaser.Geom.Point.Interpolate
since: 3.0.0
name: Interpolate
memberof: Phaser.Geom.Point
description: Returns the linear interpolation point between the two given points, based on `t`.
scope: static
signature: pointA:Phaser.Geom.Point,pointB:Phaser.Geom.Point,t?:number,out?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point|object
metafilename: Interpolate.js
metapath: geom/point
returnsdescription:
Either the object from the `out` argument with the properties `x` and `y` set to the result of the interpolation or a newly created `Point` object.


longname: Phaser.Geom.Point.Project
since: 3.0.0
name: Project
memberof: Phaser.Geom.Point
scope: static
signature: pointA:Phaser.Geom.Point,pointB:Phaser.Geom.Point,out?:Phaser.Geom.Point
returnstype: Phaser.Geom.Point
returnsdescription: A Point object holding the coordinates of the vector projection of `pointA` onto `pointB`.
metafilename: Project.js
metapath: geom/point
description:
Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the
orthogonal projection of `pointA` onto a straight line parallel to `pointB`.


longname: Phaser.Geom.Point.ProjectUnit
since: 3.0.0
name: ProjectUnit
memberof: Phaser.Geom.Point
scope: static
signature: pointA:Phaser.Geom.Point,pointB:Phaser.Geom.Point,out?:Phaser.Geom.Point
returnstype: Phaser.Geom.Point
returnsdescription: A unit Point object holding the coordinates of the vector projection of `pointA` onto `pointB`.
metafilename: ProjectUnit.js
metapath: geom/point
description:
Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the
orthogonal projection of `pointA` onto a straight line paralle to `pointB`.


longname: Phaser.Geom.Polygon.Earcut
since: 3.50.0
name: Earcut
memberof: Phaser.Geom.Polygon
scope: static
signature: data:Array.<number>,holeIndices?:Array.<number>,dimensions?:number
returnstype: Array.<number>
returnsdescription: An array of triangulated data.
metafilename: Earcut.js
metapath: geom/polygon
description:
This module implements a modified ear slicing algorithm, optimized by z-order curve hashing and extended to
handle holes, twisted polygons, degeneracies and self-intersections in a way that doesn't guarantee correctness
of triangulation, but attempts to always produce acceptable results for practical data.

Example:

```javascript
const triangles = Phaser.Geom.Polygon.Earcut([10,0, 0,50, 60,60, 70,10]); // returns [1,0,3, 3,2,1]
```

Each group of three vertex indices in the resulting array forms a triangle.

```javascript
// triangulating a polygon with a hole
earcut([0,0, 100,0, 100,100, 0,100,  20,20, 80,20, 80,80, 20,80], [4]);
// [3,0,4, 5,4,0, 3,4,7, 5,0,1, 2,3,7, 6,5,1, 2,7,6, 6,1,2]

// triangulating a polygon with 3d coords
earcut([10,0,1, 0,50,2, 60,60,3, 70,10,4], null, 3);
// [1,0,3, 3,2,1]
```

If you pass a single vertex as a hole, Earcut treats it as a Steiner point.

If your input is a multi-dimensional array (e.g. GeoJSON Polygon), you can convert it to the format
expected by Earcut with `Phaser.Geom.Polygon.Earcut.flatten`:

```javascript
var data = earcut.flatten(geojson.geometry.coordinates);
var triangles = earcut(data.vertices, data.holes, data.dimensions);
```

After getting a triangulation, you can verify its correctness with `Phaser.Geom.Polygon.Earcut.deviation`:

```javascript
var deviation = earcut.deviation(vertices, holes, dimensions, triangles);
```
Returns the relative difference between the total area of triangles and the area of the input polygon.
0 means the triangulation is fully correct.

For more information see [https://github.com/mapbox/earcut](https://github.com/mapbox/earcut)


longname: Phaser.Geom.Polygon.GetAABB
since: 3.0.0
name: GetAABB
memberof: Phaser.Geom.Polygon
description: Calculates the bounding AABB rectangle of a polygon.
scope: static
signature: polygon:Phaser.Geom.Polygon,out?:Phaser.Geom.Rectangle|object
returnstype: Phaser.Geom.Rectangle|object
metafilename: GetAABB.js
metapath: geom/polygon
returnsdescription:
The resulting rectangle or object that is passed in with position and dimensions of the polygon's AABB.


longname: Phaser.Geom.Polygon.GetNumberArray
since: 3.0.0
name: GetNumberArray
memberof: Phaser.Geom.Polygon
scope: static
signature: polygon:Phaser.Geom.Polygon,output?:array|Array.<number>
returnstype: array|Array.<number>
returnsdescription: The modified `output` array, or a new array if none was given.
metafilename: GetNumberArray.js
metapath: geom/polygon
description:
Stores all of the points of a Polygon into a flat array of numbers following the sequence [ x,y, x,y, x,y ],
i.e. each point of the Polygon, in the order it's defined, corresponds to two elements of the resultant
array for the point's X and Y coordinate.


longname: Phaser.Geom.Polygon.GetPoints
since: 3.12.0
name: GetPoints
memberof: Phaser.Geom.Polygon
scope: static
signature: polygon:Phaser.Geom.Polygon,quantity:number,stepRate?:number,output?:array
returnstype: Array.<Phaser.Geom.Point>
returnsdescription: An array of Point objects pertaining to the points around the perimeter of the Polygon.
metafilename: GetPoints.js
metapath: geom/polygon
description:
Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon,
based on the given quantity or stepRate values.


longname: Phaser.Geom.Polygon-setTo
since: 3.0.0
name: setTo
memberof: Phaser.Geom.Polygon
scope: instance
signature: points?:string|Array.<number>|Array.<Phaser.Types.Math.Vector2Like>
returnstype: Phaser.Geom.Polygon
returnsdescription: This Polygon object.
metafilename: Polygon.js
metapath: geom/polygon
description:
Sets this Polygon to the given points.

The points can be set from a variety of formats:

- A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`
- An array of Point objects: `[new Phaser.Point(x1, y1), ...]`
- An array of objects with public x/y properties: `[obj1, obj2, ...]`
- An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
- An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`

`setTo` may also be called without any arguments to remove all points.


longname: Phaser.Geom.Polygon.Simplify
since: 3.50.0
name: Simplify
memberof: Phaser.Geom.Polygon
scope: static
signature: polygon:Phaser.Geom.Polygon,tolerance?:number,highestQuality?:boolean
returnstype: Phaser.Geom.Polygon
returnsdescription: The input polygon.
metafilename: Simplify.js
metapath: geom/polygon
description:
Takes a Polygon object and simplifies the points by running them through a combination of
Douglas-Peucker and Radial Distance algorithms. Simplification dramatically reduces the number of
points in a polygon while retaining its shape, giving a huge performance boost when processing
it and also reducing visual noise.


longname: Phaser.Geom.Rectangle.Ceil
since: 3.0.0
name: Ceil
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The adjusted Rectangle.
metafilename: Ceil.js
metapath: geom/rectangle
description:
Rounds a Rectangle's position up to the smallest integer greater than or equal to each current coordinate.


longname: Phaser.Geom.Rectangle.CeilAll
since: 3.0.0
name: CeilAll
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The modified Rectangle.
metafilename: CeilAll.js
metapath: geom/rectangle
description:
Rounds a Rectangle's position and size up to the smallest integer greater than or equal to each respective value.


longname: Phaser.Geom.Rectangle.ContainsPoint
since: 3.0.0
name: ContainsPoint
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle,point:Phaser.Geom.Point
returnstype: boolean
returnsdescription: A value of true if the Rectangle object contains the specified point, otherwise false.
metafilename: ContainsPoint.js
metapath: geom/rectangle
description:
Determines whether the specified point is contained within the rectangular region defined by this Rectangle object.


longname: Phaser.Geom.Rectangle.Decompose
since: 3.0.0
name: Decompose
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle,out?:array
returnstype: array
returnsdescription: Will return the array you specified or a new array containing the points of the Rectangle.
metafilename: Decompose.js
metapath: geom/rectangle
description:
Create an array of points for each corner of a Rectangle
If an array is specified, each point object will be added to the end of the array, otherwise a new array will be created.


longname: Phaser.Geom.Rectangle.FitInside
since: 3.0.0
name: FitInside
memberof: Phaser.Geom.Rectangle
scope: static
signature: target:Phaser.Geom.Rectangle,source:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The modified target rectangle instance.
metafilename: FitInside.js
metapath: geom/rectangle
description:
Adjusts the target rectangle, changing its width, height and position,
so that it fits inside the area of the source rectangle, while maintaining its original
aspect ratio.

Unlike the `FitOutside` function, there may be some space inside the source area not covered.


longname: Phaser.Geom.Rectangle.FitOutside
since: 3.0.0
name: FitOutside
memberof: Phaser.Geom.Rectangle
scope: static
signature: target:Phaser.Geom.Rectangle,source:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The modified target rectangle instance.
metafilename: FitOutside.js
metapath: geom/rectangle
description:
Adjusts the target rectangle, changing its width, height and position,
so that it fully covers the area of the source rectangle, while maintaining its original
aspect ratio.

Unlike the `FitInside` function, the target rectangle may extend further out than the source.


longname: Phaser.Geom.Rectangle.Floor
since: 3.0.0
name: Floor
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The rectangle that was passed to this function with its coordinates floored.
metafilename: Floor.js
metapath: geom/rectangle
description:
Rounds down (floors) the top left X and Y coordinates of the given Rectangle to the largest integer less than or equal to them


longname: Phaser.Geom.Rectangle.FloorAll
since: 3.0.0
name: FloorAll
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The adjusted Rectangle.
metafilename: FloorAll.js
metapath: geom/rectangle
description:
Rounds a Rectangle's position and size down to the largest integer less than or equal to each current coordinate or dimension.


longname: Phaser.Geom.Rectangle.FromPoints
since: 3.0.0
name: FromPoints
memberof: Phaser.Geom.Rectangle
scope: static
signature: points:array,out?:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The adjusted `out` Rectangle, or a new Rectangle if none was provided.
metafilename: FromPoints.js
metapath: geom/rectangle
description:
Constructs new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds.


longname: Phaser.Geom.Rectangle.GetPoint
since: 3.0.0
name: GetPoint
memberof: Phaser.Geom.Rectangle
scope: static
signature: rectangle:Phaser.Geom.Rectangle,position:number,out?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point
returnsdescription: The updated `output` object, or a new Point if no `output` object was given.
metafilename: GetPoint.js
metapath: geom/rectangle
description:
Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.

The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.

A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.


longname: Phaser.Geom.Rectangle.GetPoints
since: 3.0.0
name: GetPoints
memberof: Phaser.Geom.Rectangle
scope: static
signature: rectangle:Phaser.Geom.Rectangle,step:number,quantity:number,out?:array|Array.<Phaser.Geom.Point>
returnstype: array|Array.<Phaser.Geom.Point>
returnsdescription: An array of Points from the perimeter of the rectangle.
metafilename: GetPoints.js
metapath: geom/rectangle
description:
Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.


longname: Phaser.Geom.Rectangle.GetSize
since: 3.0.0
name: GetSize
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle,out?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point|object
returnsdescription: A Point object where `x` holds the width and `y` holds the height of the Rectangle.
metafilename: GetSize.js
metapath: geom/rectangle
description:
Returns the size of the Rectangle, expressed as a Point object.
With the value of the `width` as the `x` property and the `height` as the `y` property.


longname: Phaser.Geom.Rectangle.Inflate
since: 3.0.0
name: Inflate
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle,x:number,y:number
returnstype: Phaser.Geom.Rectangle
returnsdescription: The inflated Rectangle.
metafilename: Inflate.js
metapath: geom/rectangle
description:
Increases the size of a Rectangle by a specified amount.

The center of the Rectangle stays the same. The amounts are added to each side, so the actual increase in width or height is two times bigger than the respective argument.


longname: Phaser.Geom.Rectangle.Intersection
since: 3.11.0
name: Intersection
memberof: Phaser.Geom.Rectangle
scope: static
signature: rectA:Phaser.Geom.Rectangle,rectB:Phaser.Geom.Rectangle,out?:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The intersection result. If the width and height are zero, no intersection occurred.
metafilename: Intersection.js
metapath: geom/rectangle
description:
Takes two Rectangles and first checks to see if they intersect.
If they intersect it will return the area of intersection in the `out` Rectangle.
If they do not intersect, the `out` Rectangle will have a width and height of zero.


longname: Phaser.Geom.Rectangle.MarchingAnts
since: 3.0.0
name: MarchingAnts
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle,step?:number,quantity?:number,out?:array|Array.<Phaser.Geom.Point>
returnstype: array|Array.<Phaser.Geom.Point>
returnsdescription: An array containing the perimeter points from the Rectangle.
metafilename: MarchingAnts.js
metapath: geom/rectangle
description:
Returns an array of points from the perimeter of the Rectangle, where each point is spaced out based
on either the `step` value, or the `quantity`.


longname: Phaser.Geom.Rectangle.MergePoints
since: 3.0.0
name: MergePoints
memberof: Phaser.Geom.Rectangle
scope: static
signature: target:Phaser.Geom.Rectangle,points:Array.<Phaser.Geom.Point>
returnstype: Phaser.Geom.Rectangle
returnsdescription: The modified Rectangle.
metafilename: MergePoints.js
metapath: geom/rectangle
description:
Merges a Rectangle with a list of points by repositioning and/or resizing it such that all points are located on or within its bounds.


longname: Phaser.Geom.Rectangle.MergeRect
since: 3.0.0
name: MergeRect
memberof: Phaser.Geom.Rectangle
scope: static
signature: target:Phaser.Geom.Rectangle,source:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: Modified target rectangle that contains source rectangle.
metafilename: MergeRect.js
metapath: geom/rectangle
description:
Merges the source rectangle into the target rectangle and returns the target.
Neither rectangle should have a negative width or height.


longname: Phaser.Geom.Rectangle.MergeXY
since: 3.0.0
name: MergeXY
memberof: Phaser.Geom.Rectangle
scope: static
signature: target:Phaser.Geom.Rectangle,x:number,y:number
returnstype: Phaser.Geom.Rectangle
returnsdescription: The modified `target` Rectangle.
metafilename: MergeXY.js
metapath: geom/rectangle
description:
Merges a Rectangle with a point by repositioning and/or resizing it so that the point is on or within its bounds.


longname: Phaser.Geom.Rectangle.OffsetPoint
since: 3.0.0
name: OffsetPoint
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle,point:Phaser.Geom.Point|Phaser.Math.Vector2
returnstype: Phaser.Geom.Rectangle
returnsdescription: The adjusted Rectangle.
metafilename: OffsetPoint.js
metapath: geom/rectangle
description:
Nudges (translates) the top-left corner of a Rectangle by the coordinates of a point (translation vector).


longname: Phaser.Geom.Rectangle.Overlaps
since: 3.0.0
name: Overlaps
memberof: Phaser.Geom.Rectangle
scope: static
signature: rectA:Phaser.Geom.Rectangle,rectB:Phaser.Geom.Rectangle
returnstype: boolean
returnsdescription: `true` if the two Rectangles overlap, `false` otherwise.
metafilename: Overlaps.js
metapath: geom/rectangle
description:
Checks if two Rectangles overlap. If a Rectangle is within another Rectangle, the two will be considered overlapping. Thus, the Rectangles are treated as "solid".


longname: Phaser.Geom.Rectangle.RandomOutside
since: 3.10.0
name: RandomOutside
memberof: Phaser.Geom.Rectangle
scope: static
signature: outer:Phaser.Geom.Rectangle,inner:Phaser.Geom.Rectangle,out?:Phaser.Geom.Point
returnstype: Phaser.Geom.Point
returnsdescription: A Point object containing the random values in its `x` and `y` properties.
metafilename: RandomOutside.js
metapath: geom/rectangle
description:
Calculates a random point that lies within the `outer` Rectangle, but outside of the `inner` Rectangle.
The inner Rectangle must be fully contained within the outer rectangle.


longname: Phaser.Geom.Rectangle-getPoints
since: 3.0.0
name: getPoints
memberof: Phaser.Geom.Rectangle
scope: instance
signature: quantity:number,stepRate?:number,output?:array|Array.<Phaser.Geom.Point>
returnstype: array|Array.<Phaser.Geom.Point>
returnsdescription: The modified `output` array, or a new array if none was provided.
metafilename: Rectangle.js
metapath: geom/rectangle
description:
Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.


longname: Phaser.Geom.Rectangle-isEmpty
since: 3.0.0
name: isEmpty
memberof: Phaser.Geom.Rectangle
scope: instance
returnstype: boolean
metafilename: Rectangle.js
metapath: geom/rectangle
description:
Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.

returnsdescription:
`true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.


longname: Phaser.Geom.Rectangle.SameDimensions
since: 3.15.0
name: SameDimensions
memberof: Phaser.Geom.Rectangle
scope: static
signature: rect:Phaser.Geom.Rectangle,toCompare:Phaser.Geom.Rectangle
returnstype: boolean
metafilename: SameDimensions.js
metapath: geom/rectangle
description:
Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.

returnsdescription:
`true` if the objects have equivalent values for the `width` and `height` properties, otherwise `false`.


longname: Phaser.Geom.Rectangle.Scale
since: 3.0.0
name: Scale
memberof: Phaser.Geom.Rectangle
description: Scales the width and height of this Rectangle by the given amounts.
scope: static
signature: rect:Phaser.Geom.Rectangle,x:number,y:number
returnstype: Phaser.Geom.Rectangle
metafilename: Scale.js
metapath: geom/rectangle
returnsdescription:
The rectangle object with updated `width` and `height` properties as calculated from the scaling factor(s).


longname: Phaser.Geom.Rectangle.Union
since: 3.0.0
name: Union
memberof: Phaser.Geom.Rectangle
scope: static
signature: rectA:Phaser.Geom.Rectangle,rectB:Phaser.Geom.Rectangle,out?:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle
returnsdescription: The modified `out` Rectangle, or a new Rectangle if none was provided.
metafilename: Union.js
metapath: geom/rectangle
description:
Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.


longname: Phaser.Geom.Triangle.BuildEquilateral
since: 3.0.0
name: BuildEquilateral
memberof: Phaser.Geom.Triangle
scope: static
signature: x:number,y:number,length:number
returnstype: Phaser.Geom.Triangle
returnsdescription: The Triangle object of the given size.
metafilename: BuildEquilateral.js
metapath: geom/triangle
description:
Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent).
The x/y specifies the top-middle of the triangle (x1/y1) and length is the length of each side.


longname: Phaser.Geom.Triangle.BuildFromPolygon
since: 3.0.0
name: BuildFromPolygon
memberof: Phaser.Geom.Triangle
scope: static
signature: data:array,holes?:array,scaleX?:number,scaleY?:number,out?:array|Array.<Phaser.Geom.Triangle>
returnstype: array|Array.<Phaser.Geom.Triangle>
returnsdescription: An array of Triangle instances, where each triangle is based on the decomposed vertices data.
metafilename: BuildFromPolygon.js
metapath: geom/triangle
description:
Takes an array of vertex coordinates, and optionally an array of hole indices, then returns an array
of Triangle instances, where the given vertices have been decomposed into a series of triangles.


longname: Phaser.Geom.Triangle.Centroid
since: 3.0.0
name: Centroid
memberof: Phaser.Geom.Triangle
scope: static
signature: triangle:Phaser.Geom.Triangle,out?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point|object
returnsdescription: The `out` object with modified `x` and `y` properties, or a new Point if none was provided.
metafilename: Centroid.js
metapath: geom/triangle
description:
Calculates the position of a Triangle's centroid, which is also its center of mass (center of gravity).

The centroid is the point in a Triangle at which its three medians (the lines drawn from the vertices to the bisectors of the opposite sides) meet. It divides each one in a 2:1 ratio.


longname: Phaser.Geom.Triangle.CircumCenter
since: 3.0.0
name: CircumCenter
memberof: Phaser.Geom.Triangle
scope: static
signature: triangle:Phaser.Geom.Triangle,out?:Phaser.Math.Vector2
returnstype: Phaser.Math.Vector2
returnsdescription: A Vector2 object holding the coordinates of the circumcenter of the Triangle.
metafilename: CircumCenter.js
metapath: geom/triangle
description:
Computes the circumcentre of a triangle. The circumcentre is the centre of
the circumcircle, the smallest circle which encloses the triangle. It is also
the common intersection point of the perpendicular bisectors of the sides of
the triangle, and is the only point which has equal distance to all three
vertices of the triangle.


longname: Phaser.Geom.Triangle.CircumCircle
since: 3.0.0
name: CircumCircle
memberof: Phaser.Geom.Triangle
scope: static
signature: triangle:Phaser.Geom.Triangle,out?:Phaser.Geom.Circle
returnstype: Phaser.Geom.Circle
returnsdescription: The updated `out` Circle, or a new Circle if none was provided.
metafilename: CircumCircle.js
metapath: geom/triangle
description:
Finds the circumscribed circle (circumcircle) of a Triangle object. The circumcircle is the circle which touches all of the triangle's vertices.


longname: Phaser.Geom.Triangle.ContainsArray
since: 3.0.0
name: ContainsArray
memberof: Phaser.Geom.Triangle
scope: static
signature: triangle:Phaser.Geom.Triangle,points:Array.<Phaser.Geom.Point>,returnFirst?:boolean,out?:array
returnstype: Array.<Phaser.Geom.Point>
metafilename: ContainsArray.js
metapath: geom/triangle
description:
Filters an array of point-like objects to only those contained within a triangle.
If `returnFirst` is true, will return an array containing only the first point in the provided array that is within the triangle (or an empty array if there are no such points).

returnsdescription:
An array containing all the points from `points` that are within the triangle, if an array was provided as `out`, points will be appended to that array and it will also be returned here.


longname: Phaser.Geom.Triangle.Decompose
since: 3.0.0
name: Decompose
memberof: Phaser.Geom.Triangle
description: Decomposes a Triangle into an array of its points.
scope: static
signature: triangle:Phaser.Geom.Triangle,out?:array
returnstype: array
metafilename: Decompose.js
metapath: geom/triangle
returnsdescription:
The provided `out` array, or a new array if none was provided, with three objects with `x` and `y` properties representing each point of the Triangle appended to it.


longname: Phaser.Geom.Triangle.InCenter
since: 3.0.0
name: InCenter
memberof: Phaser.Geom.Triangle
scope: static
signature: triangle:Phaser.Geom.Triangle,out?:Phaser.Geom.Point
returnstype: Phaser.Geom.Point
returnsdescription: Point (x, y) of the center pixel of the triangle.
metafilename: InCenter.js
metapath: geom/triangle
description:
Calculates the position of the incenter of a Triangle object. This is the point where its three angle bisectors meet and it's also the center of the incircle, which is the circle inscribed in the triangle.


longname: Phaser.Geom.Triangle.Offset
since: 3.0.0
name: Offset
memberof: Phaser.Geom.Triangle
scope: static
signature: triangle:Phaser.Geom.Triangle,x:number,y:number
returnstype: Phaser.Geom.Triangle
returnsdescription: The modified Triangle.
metafilename: Offset.js
metapath: geom/triangle
description:
Moves each point (vertex) of a Triangle by a given offset, thus moving the entire Triangle by that offset.


longname: Phaser.Geom.Triangle.Perimeter
since: 3.0.0
name: Perimeter
memberof: Phaser.Geom.Triangle
scope: static
signature: triangle:Phaser.Geom.Triangle
returnstype: number
returnsdescription: The length of the Triangle.
metafilename: Perimeter.js
metapath: geom/triangle
description:
Gets the length of the perimeter of the given triangle.
Calculated by adding together the length of each of the three sides.


longname: Phaser.Geom.Triangle.RotateAroundPoint
since: 3.0.0
name: RotateAroundPoint
memberof: Phaser.Geom.Triangle
scope: static
signature: triangle:Phaser.Geom.Triangle,point:Phaser.Geom.Point,angle:number
returnstype: Phaser.Geom.Triangle
returnsdescription: The rotated Triangle.
metafilename: RotateAroundPoint.js
metapath: geom/triangle
description:
Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties.


longname: Phaser.Geom.Triangle-getPoint
since: 3.0.0
name: getPoint
memberof: Phaser.Geom.Triangle
description: Returns a specific point on the triangle.
scope: instance
signature: position:number,output?:Phaser.Geom.Point|object
returnstype: Phaser.Geom.Point|object
metafilename: Triangle.js
metapath: geom/triangle
returnsdescription:
Calculated `Point` that represents the requested position. It is the same as `output` when this parameter has been given.


longname: Phaser.Geom.Triangle-getPoints
since: 3.0.0
name: getPoints
memberof: Phaser.Geom.Triangle
scope: instance
signature: quantity:number,stepRate?:number,output?:array|Array.<Phaser.Geom.Point>
returnstype: array|Array.<Phaser.Geom.Point>
returnsdescription: Returns a list of calculated `Point` instances or the filled array passed as parameter `output`.
metafilename: Triangle.js
metapath: geom/triangle
description:
Calculates a list of evenly distributed points on the triangle. It is either possible to pass an amount of points to be generated (`quantity`) or the distance between two points (`stepRate`).


longname: Phaser.Input.CreateInteractiveObject
since: 3.0.0
name: CreateInteractiveObject
memberof: Phaser.Input
scope: static
returnstype: Phaser.Types.Input.InteractiveObject
returnsdescription: The new Interactive Object.
metafilename: CreateInteractiveObject.js
metapath: input
description:
Creates a new Interactive Object.

This is called automatically by the Input Manager when you enable a Game Object for input.

The resulting Interactive Object is mapped to the Game Object's `input` property.

signature:
gameObject:Phaser.GameObjects.GameObject,hitArea:any,hitAreaCallback:Phaser.Types.Input.HitAreaCallback


longname: Phaser.Input.CreatePixelPerfectHandler
since: 3.10.0
name: CreatePixelPerfectHandler
memberof: Phaser.Input
scope: static
signature: textureManager:Phaser.Textures.TextureManager,alphaTolerance:number
returnstype: function
returnsdescription: The new Pixel Perfect Handler function.
metafilename: CreatePixelPerfectHandler.js
metapath: input
description:
Creates a new Pixel Perfect Handler function.

Access via `InputPlugin.makePixelPerfect` rather than calling it directly.


longname: Phaser.Input.Gamepad.Button-update
since: 3.0.0
name: update
memberof: Phaser.Input.Gamepad.Button
description: Internal update handler for this Button. Called automatically by the Gamepad as part of its update.
scope: instance
signature: value:number
metafilename: Button.js
metapath: input/gamepad
access: private
fires:
Phaser.Input.Gamepad.Events.BUTTON_DOWN,Phaser.Input.Gamepad.Events.BUTTON_UP,Phaser.Input.Gamepad.Events.GAMEPAD_BUTTON_DOWN,Phaser.Input.Gamepad.Events.GAMEPAD_BUTTON_UP


longname: Phaser.Input.Gamepad.Gamepad-getAxisValue
since: 3.10.0
name: getAxisValue
memberof: Phaser.Input.Gamepad.Gamepad
scope: instance
signature: index:number
returnstype: number
returnsdescription: The value of the axis, between 0 and 1.
metafilename: Gamepad.js
metapath: input/gamepad
description:
Gets the value of an axis based on the given index.
The index must be valid within the range of axes supported by this Gamepad.
The return value will be a float between 0 and 1.


longname: Phaser.Input.Gamepad.Gamepad-setAxisThreshold
since: 3.10.0
name: setAxisThreshold
memberof: Phaser.Input.Gamepad.Gamepad
scope: instance
signature: value:number
metafilename: Gamepad.js
metapath: input/gamepad
description:
Sets the threshold value of all axis on this Gamepad.
The value is a float between 0 and 1 and is the amount below which the axis is considered as not having been moved.


longname: Phaser.Input.Gamepad.Gamepad-getButtonValue
since: 3.10.0
name: getButtonValue
memberof: Phaser.Input.Gamepad.Gamepad
scope: instance
signature: index:number
returnstype: number
returnsdescription: The value of the button, between 0 and 1.
metafilename: Gamepad.js
metapath: input/gamepad
description:
Gets the value of a button based on the given index.
The index must be valid within the range of buttons supported by this Gamepad.

The return value will be either 0 or 1 for an analogue button, or a float between 0 and 1
for a pressure-sensitive digital button, such as the shoulder buttons on a Dual Shock.


longname: Phaser.Input.Gamepad.Gamepad-isButtonDown
since: 3.10.0
name: isButtonDown
memberof: Phaser.Input.Gamepad.Gamepad
scope: instance
signature: index:number
returnstype: boolean
returnsdescription: `true` if the button is considered as being pressed down, otherwise `false`.
metafilename: Gamepad.js
metapath: input/gamepad
description:
Returns if the button is pressed down or not.
The index must be valid within the range of buttons supported by this Gamepad.


longname: Phaser.Input.Gamepad.Gamepad-update
since: 3.0.0
name: update
memberof: Phaser.Input.Gamepad.Gamepad
scope: instance
metafilename: Gamepad.js
metapath: input/gamepad
access: private
description:
Internal update handler for this Gamepad.
Called automatically by the Gamepad Manager as part of its update.


longname: Phaser.Input.Gamepad.GamepadPlugin-startListeners
since: 3.10.0
name: startListeners
memberof: Phaser.Input.Gamepad.GamepadPlugin
scope: instance
metafilename: GamepadPlugin.js
metapath: input/gamepad
access: private
description:
Starts the Gamepad Event listeners running.
This is called automatically and does not need to be manually invoked.


longname: Phaser.Input.Gamepad.GamepadPlugin-stopListeners
since: 3.10.0
name: stopListeners
memberof: Phaser.Input.Gamepad.GamepadPlugin
scope: instance
metafilename: GamepadPlugin.js
metapath: input/gamepad
access: private
description:
Stops the Gamepad Event listeners.
This is called automatically and does not need to be manually invoked.


longname: Phaser.Input.Gamepad.GamepadPlugin-refreshPads
since: 3.10.0
name: refreshPads
memberof: Phaser.Input.Gamepad.GamepadPlugin
scope: instance
metafilename: GamepadPlugin.js
metapath: input/gamepad
access: private
description:
Refreshes the list of connected Gamepads.

This is called automatically when a gamepad is connected or disconnected,
and during the update loop.


longname: Phaser.Input.Gamepad.GamepadPlugin-update
since: 3.10.0
name: update
memberof: Phaser.Input.Gamepad.GamepadPlugin
scope: instance
fires: Phaser.Input.Gamepad.Events.CONNECTED,Phaser.Input.Gamepad.Events.DISCONNECTED
metafilename: GamepadPlugin.js
metapath: input/gamepad
access: private
description:
The internal update loop. Refreshes all connected gamepads and processes their events.

Called automatically by the Input Manager, invoked from the Game step.


longname: Phaser.Input.InputManager-boot
since: 3.0.0
name: boot
memberof: Phaser.Input.InputManager
scope: instance
fires: Phaser.Input.Events.MANAGER_BOOT
metafilename: InputManager.js
metapath: input
access: protected
description:
The Boot handler is called by Phaser.Game when it first starts up.
The renderer is available by now.


longname: Phaser.Input.InputManager-setDefaultCursor
since: 3.10.0
name: setDefaultCursor
memberof: Phaser.Input.InputManager
scope: instance
signature: cursor:string
metafilename: InputManager.js
metapath: input
description:
Tells the Input system to set a custom cursor.

This cursor will be the default cursor used when interacting with the game canvas.

If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.

Any valid CSS cursor value is allowed, including paths to image files, i.e.:

```javascript
this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer');
```

Please read about the differences between browsers when it comes to the file formats and sizes they support:

[https://developer.mozilla.org/en-US/docs/Web/CSS/cursor](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor)
[https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property)

It's up to you to pick a suitable cursor format that works across the range of browsers you need to support.


longname: Phaser.Input.InputManager-setCursor
since: 3.10.0
name: setCursor
memberof: Phaser.Input.InputManager
scope: instance
signature: interactiveObject:Phaser.Types.Input.InteractiveObject
metafilename: InputManager.js
metapath: input
access: private
description:
Called by the InputPlugin when processing over and out events.

Tells the Input Manager to set a custom cursor during its postUpdate step.

[https://developer.mozilla.org/en-US/docs/Web/CSS/cursor](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor)


longname: Phaser.Input.InputManager-resetCursor
since: 3.10.0
name: resetCursor
memberof: Phaser.Input.InputManager
scope: instance
signature: interactiveObject:Phaser.Types.Input.InteractiveObject
metafilename: InputManager.js
metapath: input
access: private
description:
Called by the InputPlugin when processing over and out events.

Tells the Input Manager to clear the hand cursor, if set, during its postUpdate step.


longname: Phaser.Input.InputManager-addPointer
since: 3.10.0
name: addPointer
memberof: Phaser.Input.InputManager
scope: instance
signature: quantity?:number
returnstype: Array.<Phaser.Input.Pointer>
returnsdescription: An array containing all of the new Pointer objects that were created.
metafilename: InputManager.js
metapath: input
description:
Adds new Pointer objects to the Input Manager.

By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`.

You can create more either by calling this method, or by setting the `input.activePointers` property
in the Game Config, up to a maximum of 10 pointers.

The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added
via this method.


longname: Phaser.Input.InputManager-updateInputPlugins
since: 3.16.0
name: updateInputPlugins
memberof: Phaser.Input.InputManager
scope: instance
signature: type:number,pointers:Array.<Phaser.Input.Pointer>
metafilename: InputManager.js
metapath: input
description:
Internal method that gets a list of all the active Input Plugins in the game
and updates each of them in turn, in reverse order (top to bottom), to allow
for DOM top-level event handling simulation.


longname: Phaser.Input.InputManager-inputCandidate
since: 3.10.0
name: inputCandidate
memberof: Phaser.Input.InputManager
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,camera:Phaser.Cameras.Scene2D.Camera
returnstype: boolean
returnsdescription: `true` if the Game Object should be considered for input, otherwise `false`.
metafilename: InputManager.js
metapath: input
access: private
description:
Checks if the given Game Object should be considered as a candidate for input or not.

Checks if the Game Object has an input component that is enabled, that it will render,
and finally, if it has a parent, that the parent parent, or any ancestor, is visible or not.


longname: Phaser.Input.InputManager-hitTest
since: 3.0.0
name: hitTest
memberof: Phaser.Input.InputManager
scope: instance
signature: pointer:Phaser.Input.Pointer,gameObjects:array,camera:Phaser.Cameras.Scene2D.Camera,output?:array
returnstype: array
returnsdescription: An array of the Game Objects that were hit during this hit test.
metafilename: InputManager.js
metapath: input
description:
Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects.

The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space
and used to determine if they fall within the remaining Game Objects hit areas or not.

If nothing is matched an empty array is returned.

This method is called automatically by InputPlugin.hitTestPointer and doesn't usually need to be invoked directly.


longname: Phaser.Input.InputManager-pointWithinHitArea
since: 3.0.0
name: pointWithinHitArea
memberof: Phaser.Input.InputManager
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,x:number,y:number
returnstype: boolean
returnsdescription: `true` if the coordinates were inside the Game Objects hit area, otherwise `false`.
metafilename: InputManager.js
metapath: input
description:
Checks if the given x and y coordinate are within the hit area of the Game Object.

This method assumes that the coordinate values have already been translated into the space of the Game Object.

If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties.


longname: Phaser.Input.InputManager-pointWithinInteractiveObject
since: 3.0.0
name: pointWithinInteractiveObject
memberof: Phaser.Input.InputManager
scope: instance
signature: object:Phaser.Types.Input.InteractiveObject,x:number,y:number
returnstype: boolean
returnsdescription: `true` if the coordinates were inside the Game Objects hit area, otherwise `false`.
metafilename: InputManager.js
metapath: input
description:
Checks if the given x and y coordinate are within the hit area of the Interactive Object.

This method assumes that the coordinate values have already been translated into the space of the Interactive Object.

If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties.


longname: Phaser.Input.InputManager-transformPointer
since: 3.10.0
name: transformPointer
memberof: Phaser.Input.InputManager
scope: instance
signature: pointer:Phaser.Input.Pointer,pageX:number,pageY:number,wasMove:boolean
metafilename: InputManager.js
metapath: input
description:
Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager.


longname: Phaser.Input.InputPlugin-preUpdate
since: 3.0.0
name: preUpdate
memberof: Phaser.Input.InputPlugin
scope: instance
fires: Phaser.Input.Events.PRE_UPDATE
metafilename: InputPlugin.js
metapath: input
access: private
description:
The pre-update handler is responsible for checking the pending removal and insertion lists and
deleting old Game Objects.


longname: Phaser.Input.InputPlugin-updatePoll
since: 3.18.0
name: updatePoll
memberof: Phaser.Input.InputPlugin
scope: instance
signature: time:number,delta:number
returnstype: boolean
returnsdescription: `true` if the plugin and the Scene it belongs to is active.
metafilename: InputPlugin.js
metapath: input
description:
This is called automatically by the Input Manager.
It emits events for plugins to listen to and also handles polling updates, if enabled.


longname: Phaser.Input.InputPlugin-update
since: 3.0.0
name: update
memberof: Phaser.Input.InputPlugin
scope: instance
fires: Phaser.Input.Events.UPDATE
signature: type:number,pointers:Array.<Phaser.Input.Pointer>
returnstype: boolean
returnsdescription: `true` if this Scene has captured the input events from all other Scenes, otherwise `false`.
metafilename: InputPlugin.js
metapath: input
access: private
description:
This method is called when a DOM Event is received by the Input Manager. It handles dispatching the events
to relevant input enabled Game Objects in this scene.


longname: Phaser.Input.InputPlugin-clear
since: 3.0.0
name: clear
memberof: Phaser.Input.InputPlugin
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,skipQueue?:boolean
returnstype: Phaser.GameObjects.GameObject
returnsdescription: The Game Object that had its Interactive Object removed.
metafilename: InputPlugin.js
metapath: input
description:
Clears a Game Object so it no longer has an Interactive Object associated with it.
The Game Object is then queued for removal from the Input Plugin on the next update.


longname: Phaser.Input.InputPlugin-disable
since: 3.0.0
name: disable
memberof: Phaser.Input.InputPlugin
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject
metafilename: InputPlugin.js
metapath: input
description:
Disables Input on a single Game Object.

An input disabled Game Object still retains its Interactive Object component and can be re-enabled
at any time, by passing it to `InputPlugin.enable`.


longname: Phaser.Input.InputPlugin-enable
since: 3.0.0
name: enable
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This Input Plugin.
metafilename: InputPlugin.js
metapath: input
description:
Enable a Game Object for interaction.

If the Game Object already has an Interactive Object component, it is enabled and returned.

Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property.

Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area
for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced
input detection.

If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If
this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific
shape for it to use.

You can also provide an Input Configuration Object as the only argument to this method.

signature:
gameObject:Phaser.GameObjects.GameObject,hitArea?:Phaser.Types.Input.InputConfiguration|any,hitAreaCallback?:Phaser.Types.Input.HitAreaCallback,dropZone?:boolean


longname: Phaser.Input.InputPlugin-hitTestPointer
since: 3.0.0
name: hitTestPointer
memberof: Phaser.Input.InputPlugin
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: Array.<Phaser.GameObjects.GameObject>
returnsdescription: An array of all the interactive Game Objects the Pointer was above.
metafilename: InputPlugin.js
metapath: input
description:
Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects
it is currently above.

The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple
cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list.


longname: Phaser.Input.InputPlugin-processDownEvents
since: 3.0.0
name: processDownEvents
memberof: Phaser.Input.InputPlugin
description: An internal method that handles the Pointer down event.
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The total number of objects interacted with.
metafilename: InputPlugin.js
metapath: input
access: private
fires:
Phaser.Input.Events.GAMEOBJECT_POINTER_DOWN,Phaser.Input.Events.GAMEOBJECT_DOWN,Phaser.Input.Events.POINTER_DOWN,Phaser.Input.Events.POINTER_DOWN_OUTSIDE


longname: Phaser.Input.InputPlugin-getDragState
since: 3.16.0
name: getDragState
memberof: Phaser.Input.InputPlugin
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The drag state of the given Pointer.
metafilename: InputPlugin.js
metapath: input
description:
Returns the drag state of the given Pointer for this Input Plugin.

The state will be one of the following:

0 = Not dragging anything
1 = Primary button down and objects below, so collect a draglist
2 = Pointer being checked if meets drag criteria
3 = Pointer meets criteria, notify the draglist
4 = Pointer actively dragging the draglist and has moved
5 = Pointer actively dragging but has been released, notify draglist


longname: Phaser.Input.InputPlugin-setDragState
since: 3.16.0
name: setDragState
memberof: Phaser.Input.InputPlugin
scope: instance
signature: pointer:Phaser.Input.Pointer,state:number
metafilename: InputPlugin.js
metapath: input
description:
Sets the drag state of the given Pointer for this Input Plugin.

The state must be one of the following values:

0 = Not dragging anything
1 = Primary button down and objects below, so collect a draglist
2 = Pointer being checked if meets drag criteria
3 = Pointer meets criteria, notify the draglist
4 = Pointer actively dragging the draglist and has moved
5 = Pointer actively dragging but has been released, notify draglist


longname: Phaser.Input.InputPlugin-processDragThresholdEvent
since: 3.18.0
name: processDragThresholdEvent
memberof: Phaser.Input.InputPlugin
scope: instance
signature: pointer:Phaser.Input.Pointer,time:number
metafilename: InputPlugin.js
metapath: input
access: private
description:
Checks to see if a Pointer is ready to drag the objects below it, based on either a distance
or time threshold.


longname: Phaser.Input.InputPlugin-processDragStartList
since: 3.18.0
name: processDragStartList
memberof: Phaser.Input.InputPlugin
scope: instance
fires: Phaser.Input.Events.DRAG_START,Phaser.Input.Events.GAMEOBJECT_DRAG_START
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The number of items that DRAG_START was called on.
metafilename: InputPlugin.js
metapath: input
access: private
description:
Processes the drag list for the given pointer and dispatches the start events for each object on it.


longname: Phaser.Input.InputPlugin-processDragDownEvent
since: 3.18.0
name: processDragDownEvent
memberof: Phaser.Input.InputPlugin
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The number of items that were collected on the drag list.
metafilename: InputPlugin.js
metapath: input
access: private
description:
Processes a 'drag down' event for the given pointer. Checks the pointer state, builds-up the drag list
and prepares them all for interaction.


longname: Phaser.Input.InputPlugin-processDragMoveEvent
since: 3.18.0
name: processDragMoveEvent
memberof: Phaser.Input.InputPlugin
description: Processes a 'drag move' event for the given pointer.
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The number of items that were updated by this drag event.
metafilename: InputPlugin.js
metapath: input
access: private
fires:
Phaser.Input.Events.DRAG_ENTER,Phaser.Input.Events.DRAG,Phaser.Input.Events.DRAG_LEAVE,Phaser.Input.Events.DRAG_OVER,Phaser.Input.Events.GAMEOBJECT_DRAG_ENTER,Phaser.Input.Events.GAMEOBJECT_DRAG,Phaser.Input.Events.GAMEOBJECT_DRAG_LEAVE,Phaser.Input.Events.GAMEOBJECT_DRAG_OVER


longname: Phaser.Input.InputPlugin-processDragUpEvent
since: 3.18.0
name: processDragUpEvent
memberof: Phaser.Input.InputPlugin
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The number of items that were updated by this drag event.
metafilename: InputPlugin.js
metapath: input
access: private
description:
Processes a 'drag down' event for the given pointer. Checks the pointer state, builds-up the drag list
and prepares them all for interaction.

fires:
Phaser.Input.Events.DRAG_END,Phaser.Input.Events.DROP,Phaser.Input.Events.GAMEOBJECT_DRAG_END,Phaser.Input.Events.GAMEOBJECT_DROP


longname: Phaser.Input.InputPlugin-processMoveEvents
since: 3.0.0
name: processMoveEvents
memberof: Phaser.Input.InputPlugin
description: An internal method that handles the Pointer movement event.
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The total number of objects interacted with.
metafilename: InputPlugin.js
metapath: input
access: private
fires:
Phaser.Input.Events.GAMEOBJECT_POINTER_MOVE,Phaser.Input.Events.GAMEOBJECT_MOVE,Phaser.Input.Events.POINTER_MOVE


longname: Phaser.Input.InputPlugin-processWheelEvent
since: 3.18.0
name: processWheelEvent
memberof: Phaser.Input.InputPlugin
description: An internal method that handles a mouse wheel event.
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The total number of objects interacted with.
metafilename: InputPlugin.js
metapath: input
access: private
fires:
Phaser.Input.Events.GAMEOBJECT_POINTER_WHEEL,Phaser.Input.Events.GAMEOBJECT_WHEEL,Phaser.Input.Events.POINTER_WHEEL


longname: Phaser.Input.InputPlugin-processOverEvents
since: 3.18.0
name: processOverEvents
memberof: Phaser.Input.InputPlugin
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The total number of objects interacted with.
metafilename: InputPlugin.js
metapath: input
access: private
description:
An internal method that handles the Pointer over events.
This is called when a touch input hits the canvas, having previously been off of it.

fires:
Phaser.Input.Events.GAMEOBJECT_POINTER_OVER,Phaser.Input.Events.GAMEOBJECT_OVER,Phaser.Input.Events.POINTER_OVER


longname: Phaser.Input.InputPlugin-processOutEvents
since: 3.18.0
name: processOutEvents
memberof: Phaser.Input.InputPlugin
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The total number of objects interacted with.
metafilename: InputPlugin.js
metapath: input
access: private
description:
An internal method that handles the Pointer out events.
This is called when a touch input leaves the canvas, as it can never be 'over' in this case.

fires:
Phaser.Input.Events.GAMEOBJECT_POINTER_OUT,Phaser.Input.Events.GAMEOBJECT_OUT,Phaser.Input.Events.POINTER_OUT


longname: Phaser.Input.InputPlugin-processOverOutEvents
since: 3.0.0
name: processOverOutEvents
memberof: Phaser.Input.InputPlugin
description: An internal method that handles the Pointer over and out events.
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The total number of objects interacted with.
metafilename: InputPlugin.js
metapath: input
access: private
fires:
Phaser.Input.Events.GAMEOBJECT_POINTER_OVER,Phaser.Input.Events.GAMEOBJECT_OVER,Phaser.Input.Events.POINTER_OVER,Phaser.Input.Events.GAMEOBJECT_POINTER_OUT,Phaser.Input.Events.GAMEOBJECT_OUT,Phaser.Input.Events.POINTER_OUT


longname: Phaser.Input.InputPlugin-processUpEvents
since: 3.0.0
name: processUpEvents
memberof: Phaser.Input.InputPlugin
description: An internal method that handles the Pointer up events.
scope: instance
signature: pointer:Phaser.Input.Pointer
returnstype: number
returnsdescription: The total number of objects interacted with.
metafilename: InputPlugin.js
metapath: input
access: private
fires:
Phaser.Input.Events.GAMEOBJECT_POINTER_UP,Phaser.Input.Events.GAMEOBJECT_UP,Phaser.Input.Events.POINTER_UP,Phaser.Input.Events.POINTER_UP_OUTSIDE


longname: Phaser.Input.InputPlugin-setDraggable
since: 3.0.0
name: setDraggable
memberof: Phaser.Input.InputPlugin
scope: instance
signature: gameObjects:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>,value?:boolean
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the draggable state of the given array of Game Objects.

They can either be set to be draggable, or can have their draggable state removed by passing `false`.

A Game Object will not fire drag events unless it has been specifically enabled for drag.


longname: Phaser.Input.InputPlugin-makePixelPerfect
since: 3.10.0
name: makePixelPerfect
memberof: Phaser.Input.InputPlugin
scope: instance
signature: alphaTolerance?:number
returnstype: function
returnsdescription: A Pixel Perfect Handler for use as a hitArea shape callback.
metafilename: InputPlugin.js
metapath: input
description:
Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle
pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them.

The following will create a sprite that is clickable on any pixel that has an alpha value >= 1.

```javascript
this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect());
```

The following will create a sprite that is clickable on any pixel that has an alpha value >= 150.

```javascript
this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150));
```

Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up,
dragstart, drag, etc.

As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from
the given coordinates and checking its color values. This is an expensive process, so should only be enabled on
Game Objects that really need it.

You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText,
Render Textures, Text, Tilemaps, Containers or Particles.


longname: Phaser.Input.InputPlugin-setHitArea
since: 3.0.0
name: setHitArea
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the hit area for the given array of Game Objects.

A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle`
or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback.

If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible
to calculate.

The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if
those values fall within the area of the shape or not. All of the Phaser geometry objects provide this,
such as `Phaser.Geom.Rectangle.Contains`.

signature:
gameObjects:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>,hitArea?:Phaser.Types.Input.InputConfiguration|any,hitAreaCallback?:Phaser.Types.Input.HitAreaCallback


longname: Phaser.Input.InputPlugin-setHitAreaCircle
since: 3.0.0
name: setHitAreaCircle
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using
the given coordinates and radius to control its position and size.

signature:
gameObjects:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>,x:number,y:number,radius:number,callback?:Phaser.Types.Input.HitAreaCallback


longname: Phaser.Input.InputPlugin-setHitAreaEllipse
since: 3.0.0
name: setHitAreaEllipse
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using
the given coordinates and dimensions to control its position and size.

signature:
gameObjects:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>,x:number,y:number,width:number,height:number,callback?:Phaser.Types.Input.HitAreaCallback


longname: Phaser.Input.InputPlugin-setHitAreaFromTexture
since: 3.0.0
name: setHitAreaFromTexture
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using
the Game Objects texture frame to define the position and size of the hit area.

signature:
gameObjects:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>,callback?:Phaser.Types.Input.HitAreaCallback


longname: Phaser.Input.InputPlugin-setHitAreaRectangle
since: 3.0.0
name: setHitAreaRectangle
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using
the given coordinates and dimensions to control its position and size.

signature:
gameObjects:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>,x:number,y:number,width:number,height:number,callback?:Phaser.Types.Input.HitAreaCallback


longname: Phaser.Input.InputPlugin-setHitAreaTriangle
since: 3.0.0
name: setHitAreaTriangle
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using
the given coordinates to control the position of its points.

signature:
gameObjects:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>,x1:number,y1:number,x2:number,y2:number,x3:number,y3:number,callback?:Phaser.Types.Input.HitAreaCallback


longname: Phaser.Input.InputPlugin-enableDebug
since: 3.19.0
name: enableDebug
memberof: Phaser.Input.InputPlugin
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,color?:number
returnstype: Phaser.Input.InputPlugin
returnsdescription: This Input Plugin.
metafilename: InputPlugin.js
metapath: input
description:
Creates an Input Debug Shape for the given Game Object.

The Game Object must have _already_ been enabled for input prior to calling this method.

This is intended to assist you during development and debugging.

Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input,
including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle.

Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work.

The Debug Shape is created and added to the display list and is then kept in sync with the Game Object
it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via
the Game Object property: `GameObject.input.hitAreaDebug`.

Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape,
before creating a new one. If you wish to remove the Debug Shape entirely, you should call the
method `InputPlugin.removeDebug`.

Note that the debug shape will only show the outline of the input area. If the input test is using a
pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that
doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not
work.


longname: Phaser.Input.InputPlugin-removeDebug
since: 3.19.0
name: removeDebug
memberof: Phaser.Input.InputPlugin
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject
returnstype: Phaser.Input.InputPlugin
returnsdescription: This Input Plugin.
metafilename: InputPlugin.js
metapath: input
description:
Removes an Input Debug Shape from the given Game Object.

The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`.


longname: Phaser.Input.InputPlugin-setPollAlways
since: 3.0.0
name: setPollAlways
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the Pointers to always poll.

When a pointer is polled it runs a hit test to see which Game Objects are currently below it,
or being interacted with it, regardless if the Pointer has actually moved or not.

You should enable this if you want objects in your game to fire over / out events, and the objects
are constantly moving, but the pointer may not have. Polling every frame has additional computation
costs, especially if there are a large number of interactive objects in your game.


longname: Phaser.Input.InputPlugin-setPollOnMove
since: 3.0.0
name: setPollOnMove
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the Pointers to only poll when they are moved or updated.

When a pointer is polled it runs a hit test to see which Game Objects are currently below it,
or being interacted with it.


longname: Phaser.Input.InputPlugin-setPollRate
since: 3.0.0
name: setPollRate
memberof: Phaser.Input.InputPlugin
scope: instance
signature: value:number
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
Sets the poll rate value. This is the amount of time that should have elapsed before a pointer
will be polled again. See the `setPollAlways` and `setPollOnMove` methods.


longname: Phaser.Input.InputPlugin-setGlobalTopOnly
since: 3.0.0
name: setGlobalTopOnly
memberof: Phaser.Input.InputPlugin
scope: instance
signature: value:boolean
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from
the top-most Scene in the Scene List. By default, if a Scene receives an input event it will then stop the event
from flowing down to any Scenes below it in the Scene list. To disable this behavior call this method with `false`.


longname: Phaser.Input.InputPlugin-setTopOnly
since: 3.0.0
name: setTopOnly
memberof: Phaser.Input.InputPlugin
scope: instance
signature: value:boolean
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from
the top-most Game Objects in the Display List.

If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one.


longname: Phaser.Input.InputPlugin-sortGameObjects
since: 3.0.0
name: sortGameObjects
memberof: Phaser.Input.InputPlugin
scope: instance
signature: gameObjects:Array.<Phaser.GameObjects.GameObject>,pointer:Phaser.Input.Pointer
returnstype: Array.<Phaser.GameObjects.GameObject>
returnsdescription: The sorted array of Game Objects.
metafilename: InputPlugin.js
metapath: input
description:
Given an array of Game Objects and a Pointer, sort the array and return it,
so that the objects are in render order with the lowest at the bottom.


longname: Phaser.Input.InputPlugin-sortDropZones
since: 3.52.0
name: sortDropZones
memberof: Phaser.Input.InputPlugin
scope: instance
signature: gameObjects:Array.<Phaser.GameObjects.GameObject>
returnstype: Array.<Phaser.GameObjects.GameObject>
returnsdescription: The sorted array of Game Objects.
metafilename: InputPlugin.js
metapath: input
description:
Given an array of Drop Zone Game Objects, sort the array and return it,
so that the objects are in depth index order with the lowest at the bottom.


longname: Phaser.Input.InputPlugin-sortDropZoneHandler
since: 3.52.0
name: sortDropZoneHandler
memberof: Phaser.Input.InputPlugin
scope: instance
signature: childA:Phaser.GameObjects.GameObject,childB:Phaser.GameObjects.GameObject
returnstype: number
returnsdescription: Returns either a negative or positive integer, or zero if they match.
metafilename: InputPlugin.js
metapath: input
access: private
description:
Return the child lowest down the display list (with the smallest index)
Will iterate through all parent containers, if present.

Prior to version 3.52.0 this method was called `sortHandlerGO`.


longname: Phaser.Input.InputPlugin-stopPropagation
since: 3.0.0
name: stopPropagation
memberof: Phaser.Input.InputPlugin
scope: instance
returnstype: Phaser.Input.InputPlugin
returnsdescription: This InputPlugin object.
metafilename: InputPlugin.js
metapath: input
description:
This method should be called from within an input event handler, such as `pointerdown`.

When called, it stops the Input Manager from allowing _this specific event_ to be processed by any other Scene
not yet handled in the scene list.


longname: Phaser.Input.InputPluginCache.register
since: 3.10.0
name: register
memberof: Phaser.Input.InputPluginCache
scope: static
signature: key:string,plugin:function,mapping:string,settingsKey:string,configKey:string
metafilename: InputPluginCache.js
metapath: input
description:
Static method called directly by the Core internal Plugins.
Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)
Plugin is the object to instantiate to create the plugin
Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)


longname: Phaser.Input.Keyboard.AdvanceKeyCombo
since: 3.0.0
name: AdvanceKeyCombo
memberof: Phaser.Input.Keyboard
scope: static
signature: event:KeyboardEvent,combo:Phaser.Input.Keyboard.KeyCombo
returnstype: boolean
returnsdescription: `true` if it reached the end of the combo, `false` if not.
metafilename: AdvanceKeyCombo.js
metapath: input/keyboard/combo
access: private
description:
Used internally by the KeyCombo class.
Return `true` if it reached the end of the combo, `false` if not.


longname: Phaser.Input.Keyboard.KeyboardManager-startListeners
since: 3.16.0
name: startListeners
memberof: Phaser.Input.Keyboard.KeyboardManager
scope: instance
metafilename: KeyboardManager.js
metapath: input/keyboard
description:
Starts the Keyboard Event listeners running.
This is called automatically and does not need to be manually invoked.


longname: Phaser.Input.Keyboard.KeyboardManager-stopListeners
since: 3.16.0
name: stopListeners
memberof: Phaser.Input.Keyboard.KeyboardManager
scope: instance
metafilename: KeyboardManager.js
metapath: input/keyboard
description:
Stops the Key Event listeners.
This is called automatically and does not need to be manually invoked.


longname: Phaser.Input.Keyboard.KeyboardManager-addCapture
since: 3.16.0
name: addCapture
memberof: Phaser.Input.Keyboard.KeyboardManager
scope: instance
signature: keycode:string|number|Array.<number>|Array.<any>
metafilename: KeyboardManager.js
metapath: input/keyboard
description:
By default when a key is pressed Phaser will not stop the event from propagating up to the browser.
There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.

This `addCapture` method enables consuming keyboard event for specific keys so it doesn't bubble up to the the browser
and cause the default browser behavior.

Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent
the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.

You can pass in a single key code value, or an array of key codes, or a string:

```javascript
this.input.keyboard.addCapture(62);
```

An array of key codes:

```javascript
this.input.keyboard.addCapture([ 62, 63, 64 ]);
```

Or a string:

```javascript
this.input.keyboard.addCapture('W,S,A,D');
```

To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.

You can also provide an array mixing both strings and key code integers.

If there are active captures after calling this method, the `preventDefault` property is set to `true`.


longname: Phaser.Input.Keyboard.KeyboardManager-removeCapture
since: 3.16.0
name: removeCapture
memberof: Phaser.Input.Keyboard.KeyboardManager
scope: instance
signature: keycode:string|number|Array.<number>|Array.<any>
metafilename: KeyboardManager.js
metapath: input/keyboard
description:
Removes an existing key capture.

Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove
the capture of a key, then it will remove it for any Scene in your game, not just the calling one.

You can pass in a single key code value, or an array of key codes, or a string:

```javascript
this.input.keyboard.removeCapture(62);
```

An array of key codes:

```javascript
this.input.keyboard.removeCapture([ 62, 63, 64 ]);
```

Or a string:

```javascript
this.input.keyboard.removeCapture('W,S,A,D');
```

To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.

You can also provide an array mixing both strings and key code integers.

If there are no captures left after calling this method, the `preventDefault` property is set to `false`.


longname: Phaser.Input.Keyboard.KeyboardPlugin-addCapture
since: 3.16.0
name: addCapture
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
signature: keycode:string|number|Array.<number>|Array.<any>
returnstype: Phaser.Input.Keyboard.KeyboardPlugin
returnsdescription: This KeyboardPlugin object.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
By default when a key is pressed Phaser will not stop the event from propagating up to the browser.
There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.

This `addCapture` method enables consuming keyboard events for specific keys, so they don't bubble up the browser
and cause the default behaviors.

Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent
the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.

You can pass a single key code value:

```javascript
this.input.keyboard.addCapture(62);
```

An array of key codes:

```javascript
this.input.keyboard.addCapture([ 62, 63, 64 ]);
```

Or, a comma-delimited string:

```javascript
this.input.keyboard.addCapture('W,S,A,D');
```

To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.

You can also provide an array mixing both strings and key code integers.


longname: Phaser.Input.Keyboard.KeyboardPlugin-removeCapture
since: 3.16.0
name: removeCapture
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
signature: keycode:string|number|Array.<number>|Array.<any>
returnstype: Phaser.Input.Keyboard.KeyboardPlugin
returnsdescription: This KeyboardPlugin object.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Removes an existing key capture.

Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove
the capture of a key, then it will remove it for any Scene in your game, not just the calling one.

You can pass a single key code value:

```javascript
this.input.keyboard.removeCapture(62);
```

An array of key codes:

```javascript
this.input.keyboard.removeCapture([ 62, 63, 64 ]);
```

Or, a comma-delimited string:

```javascript
this.input.keyboard.removeCapture('W,S,A,D');
```

To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.

You can also provide an array mixing both strings and key code integers.


longname: Phaser.Input.Keyboard.KeyboardPlugin-enableGlobalCapture
since: 3.16.0
name: enableGlobalCapture
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
returnstype: Phaser.Input.Keyboard.KeyboardPlugin
returnsdescription: This KeyboardPlugin object.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Allows Phaser to prevent any key captures you may have defined from bubbling up the browser.
You can use this to re-enable event capturing if you had paused it via `disableGlobalCapture`.


longname: Phaser.Input.Keyboard.KeyboardPlugin-disableGlobalCapture
since: 3.16.0
name: disableGlobalCapture
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
returnstype: Phaser.Input.Keyboard.KeyboardPlugin
returnsdescription: This KeyboardPlugin object.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Disables Phaser from preventing any key captures you may have defined, without actually removing them.
You can use this to temporarily disable event capturing if, for example, you swap to a DOM element.


longname: Phaser.Input.Keyboard.KeyboardPlugin-clearCaptures
since: 3.16.0
name: clearCaptures
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
returnstype: Phaser.Input.Keyboard.KeyboardPlugin
returnsdescription: This KeyboardPlugin object.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Removes all keyboard captures.

Note that this is a global change. It will clear all event captures across your game, not just for this specific Scene.


longname: Phaser.Input.Keyboard.KeyboardPlugin-createCursorKeys
since: 3.10.0
name: createCursorKeys
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
returnstype: Phaser.Types.Input.Keyboard.CursorKeys
returnsdescription: An object containing the properties: `up`, `down`, `left`, `right`, `space` and `shift`.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right, and also Space Bar and shift.


longname: Phaser.Input.Keyboard.KeyboardPlugin-addKeys
since: 3.10.0
name: addKeys
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
signature: keys:object|string,enableCapture?:boolean,emitOnRepeat?:boolean
returnstype: object
returnsdescription: An object containing Key objects mapped to the input properties.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
A practical way to create an object containing user selected hotkeys.

For example:

```javascript
this.input.keyboard.addKeys({ 'up': Phaser.Input.Keyboard.KeyCodes.W, 'down': Phaser.Input.Keyboard.KeyCodes.S });
```

would return an object containing the properties (`up` and `down`) mapped to W and S [Phaser.Input.Keyboard.Key](Phaser.Input.Keyboard.Key) objects.

You can also pass in a comma-separated string:

```javascript
this.input.keyboard.addKeys('W,S,A,D');
```

Which will return an object with the properties W, S, A and D mapped to the relevant Key objects.

To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.


longname: Phaser.Input.Keyboard.KeyboardPlugin-addKey
since: 3.10.0
name: addKey
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
signature: key:Phaser.Input.Keyboard.Key|string|number,enableCapture?:boolean,emitOnRepeat?:boolean
returnstype: Phaser.Input.Keyboard.Key
returnsdescription: The newly created Key object, or a reference to it if it already existed in the keys array.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Adds a Key object to this Keyboard Plugin.

The given argument can be either an existing Key object, a string, such as `A` or `SPACE`, or a key code value.

If a Key object is given, and one already exists matching the same key code, the existing one is replaced with the new one.


longname: Phaser.Input.Keyboard.KeyboardPlugin-removeKey
since: 3.10.0
name: removeKey
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
signature: key:Phaser.Input.Keyboard.Key|string|number,destroy?:boolean
returnstype: Phaser.Input.Keyboard.KeyboardPlugin
returnsdescription: This KeyboardPlugin object.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Removes a Key object from this Keyboard Plugin.

The given argument can be either a Key object, a string, such as `A` or `SPACE`, or a key code value.


longname: Phaser.Input.Keyboard.KeyboardPlugin-createCombo
since: 3.10.0
name: createCombo
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
signature: keys:string|Array.<number>|Array.<object>,config?:Phaser.Types.Input.Keyboard.KeyComboConfig
returnstype: Phaser.Input.Keyboard.KeyCombo
returnsdescription: The new KeyCombo object.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Creates a new KeyCombo.

A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them
it will emit a `keycombomatch` event from this Keyboard Plugin.

The keys to be listened for can be defined as:

A string (i.e. 'ATARI')
An array of either integers (key codes) or strings, or a mixture of both
An array of objects (such as Key objects) with a public 'keyCode' property

For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)
you could pass the following array of key codes:

```javascript
this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });

this.input.keyboard.on('keycombomatch', function (event) {
    console.log('Konami Code entered!');
});
```

Or, to listen for the user entering the word PHASER:

```javascript
this.input.keyboard.createCombo('PHASER');
```


longname: Phaser.Input.Keyboard.KeyboardPlugin-checkDown
since: 3.11.0
name: checkDown
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
signature: key:Phaser.Input.Keyboard.Key,duration?:number
returnstype: boolean
returnsdescription: `true` if the Key is down within the duration specified, otherwise `false`.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Checks if the given Key object is currently being held down.

The difference between this method and checking the `Key.isDown` property directly is that you can provide
a duration to this method. For example, if you wanted a key press to fire a bullet, but you only wanted
it to be able to fire every 100ms, then you can call this method with a `duration` of 100 and it
will only return `true` every 100ms.

If the Keyboard Plugin has been disabled, this method will always return `false`.


longname: Phaser.Input.Keyboard.KeyboardPlugin-resetKeys
since: 3.15.0
name: resetKeys
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
returnstype: Phaser.Input.Keyboard.KeyboardPlugin
returnsdescription: This KeyboardPlugin object.
metafilename: KeyboardPlugin.js
metapath: input/keyboard
description:
Resets all Key objects created by _this_ Keyboard Plugin back to their default un-pressed states.
This can only reset keys created via the `addKey`, `addKeys` or `createCursorKeys` methods.
If you have created a Key object directly you'll need to reset it yourself.

This method is called automatically when the Keyboard Plugin shuts down, but can be
invoked directly at any time you require.


longname: Phaser.Input.Keyboard.KeyboardPlugin-shutdown
since: 3.10.0
name: shutdown
memberof: Phaser.Input.Keyboard.KeyboardPlugin
scope: instance
metafilename: KeyboardPlugin.js
metapath: input/keyboard
overrides: Phaser.Events.EventEmitter#shutdown
access: private
description:
Shuts this Keyboard Plugin down. This performs the following tasks:

1 - Removes all keys created by this Keyboard plugin.
2 - Stops and removes the keyboard event listeners.
3 - Clears out any pending requests in the queue, without processing them.


longname: Phaser.Input.Keyboard.DownDuration
since: 3.0.0
name: DownDuration
memberof: Phaser.Input.Keyboard
scope: static
signature: key:Phaser.Input.Keyboard.Key,duration?:number
returnstype: boolean
returnsdescription: `true` if the Key was pressed down within `duration` ms ago, otherwise `false`.
metafilename: DownDuration.js
metapath: input/keyboard/keys
description:
Returns `true` if the Key was pressed down within the `duration` value given, based on the current
game clock time. Or `false` if it either isn't down, or was pressed down longer ago than the given duration.


longname: Phaser.Input.Keyboard.JustDown
since: 3.0.0
name: JustDown
memberof: Phaser.Input.Keyboard
scope: static
signature: key:Phaser.Input.Keyboard.Key
returnstype: boolean
returnsdescription: `true` if the Key was just pressed, otherwise `false`.
metafilename: JustDown.js
metapath: input/keyboard/keys
description:
The justDown value allows you to test if this Key has just been pressed down or not.

When you check this value it will return `true` if the Key is down, otherwise `false`.

You can only call justDown once per key press. It will only return `true` once, until the Key is released and pressed down again.
This allows you to use it in situations where you want to check if this key is down without using an event, such as in a core game loop.


longname: Phaser.Input.Keyboard.JustUp
since: 3.0.0
name: JustUp
memberof: Phaser.Input.Keyboard
scope: static
signature: key:Phaser.Input.Keyboard.Key
returnstype: boolean
returnsdescription: `true` if the Key was just released, otherwise `false`.
metafilename: JustUp.js
metapath: input/keyboard/keys
description:
The justUp value allows you to test if this Key has just been released or not.

When you check this value it will return `true` if the Key is up, otherwise `false`.

You can only call JustUp once per key release. It will only return `true` once, until the Key is pressed down and released again.
This allows you to use it in situations where you want to check if this key is up without using an event, such as in a core game loop.


longname: Phaser.Input.Keyboard.Key-setEmitOnRepeat
since: 3.16.0
name: setEmitOnRepeat
memberof: Phaser.Input.Keyboard.Key
scope: instance
signature: value:boolean
returnstype: Phaser.Input.Keyboard.Key
returnsdescription: This Key instance.
metafilename: Key.js
metapath: input/keyboard/keys
description:
Controls if this Key will continuously emit a `down` event while being held down (true),
or emit the event just once, on first press, and then skip future events (false).


longname: Phaser.Input.Keyboard.Key-getDuration
since: 3.17.0
name: getDuration
memberof: Phaser.Input.Keyboard.Key
scope: instance
returnstype: number
returnsdescription: The duration, in ms, that the Key has been held down for if currently down.
metafilename: Key.js
metapath: input/keyboard/keys
description:
Returns the duration, in ms, that the Key has been held down for.

If the key is not currently down it will return zero.

The get the duration the Key was held down for in the previous up-down cycle,
use the `Key.duration` property value instead.


longname: Phaser.Input.Keyboard.UpDuration
since: 3.0.0
name: UpDuration
memberof: Phaser.Input.Keyboard
scope: static
signature: key:Phaser.Input.Keyboard.Key,duration?:number
returnstype: boolean
returnsdescription: `true` if the Key was released within `duration` ms ago, otherwise `false`.
metafilename: UpDuration.js
metapath: input/keyboard/keys
description:
Returns `true` if the Key was released within the `duration` value given, based on the current
game clock time. Or returns `false` if it either isn't up, or was released longer ago than the given duration.


longname: Phaser.Input.Mouse.MouseManager-disableContextMenu
since: 3.0.0
name: disableContextMenu
memberof: Phaser.Input.Mouse.MouseManager
scope: instance
returnstype: Phaser.Input.Mouse.MouseManager
returnsdescription: This Mouse Manager instance.
metafilename: MouseManager.js
metapath: input/mouse
description:
Attempts to disable the context menu from appearing if you right-click on the browser.

Works by listening for the `contextmenu` event and prevent defaulting it.

Use this if you need to enable right-button mouse support in your game, and the browser
menu keeps getting in the way.


longname: Phaser.Input.Mouse.MouseManager-requestPointerLock
since: 3.0.0
name: requestPointerLock
memberof: Phaser.Input.Mouse.MouseManager
scope: instance
metafilename: MouseManager.js
metapath: input/mouse
description:
If the browser supports it, you can request that the pointer be locked to the browser window.

This is classically known as 'FPS controls', where the pointer can't leave the browser until
the user presses an exit key.

If the browser successfully enters a locked state, a `POINTER_LOCK_CHANGE_EVENT` will be dispatched,
from the games Input Manager, with an `isPointerLocked` property.

It is important to note that pointer lock can only be enabled after an 'engagement gesture',
see: [https://w3c.github.io/pointerlock/#dfn-engagement-gesture.](https://w3c.github.io/pointerlock/#dfn-engagement-gesture.)

Note for Firefox: There is a bug in certain Firefox releases that cause native DOM events like
`mousemove` to fire continuously when in pointer lock mode. You can get around this by setting
`this.preventDefaultMove` to `false` in this class. You may also need to do the same for
`preventDefaultDown` and/or `preventDefaultUp`. Please test combinations of these if you encounter
the error.


longname: Phaser.Input.Mouse.MouseManager-releasePointerLock
since: 3.0.0
name: releasePointerLock
memberof: Phaser.Input.Mouse.MouseManager
scope: instance
metafilename: MouseManager.js
metapath: input/mouse
description:
If the browser supports pointer lock, this will request that the pointer lock is released. If
the browser successfully enters a locked state, a 'POINTER_LOCK_CHANGE_EVENT' will be
dispatched - from the game's input manager - with an `isPointerLocked` property.


longname: Phaser.Input.Mouse.MouseManager-startListeners
since: 3.0.0
name: startListeners
memberof: Phaser.Input.Mouse.MouseManager
scope: instance
metafilename: MouseManager.js
metapath: input/mouse
description:
Starts the Mouse Event listeners running.
This is called automatically and does not need to be manually invoked.


longname: Phaser.Input.Mouse.MouseManager-stopListeners
since: 3.0.0
name: stopListeners
memberof: Phaser.Input.Mouse.MouseManager
scope: instance
metafilename: MouseManager.js
metapath: input/mouse
description:
Stops the Mouse Event listeners.
This is called automatically and does not need to be manually invoked.


longname: Phaser.Input.Pointer-updateWorldPoint
since: 3.19.0
name: updateWorldPoint
memberof: Phaser.Input.Pointer
scope: instance
signature: camera:Phaser.Cameras.Scene2D.Camera
returnstype: Phaser.Input.Pointer
returnsdescription: This Pointer object.
metafilename: Pointer.js
metapath: input
description:
Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are
the result of a translation through the given Camera.

Note that the values will be automatically replaced the moment the Pointer is
updated by an input event, such as a mouse move, so should be used immediately.


longname: Phaser.Input.Pointer-positionToCamera
since: 3.0.0
name: positionToCamera
memberof: Phaser.Input.Pointer
scope: instance
signature: camera:Phaser.Cameras.Scene2D.Camera,output?:Phaser.Math.Vector2|object
returnstype: Phaser.Math.Vector2|object
returnsdescription: A Vector2 containing the translated coordinates of this Pointer, based on the given camera.
metafilename: Pointer.js
metapath: input
description:
Takes a Camera and returns a Vector2 containing the translated position of this Pointer
within that Camera. This can be used to convert this Pointers position into camera space.


longname: Phaser.Input.Pointer-updateMotion
since: 3.16.0
name: updateMotion
memberof: Phaser.Input.Pointer
scope: instance
metafilename: Pointer.js
metapath: input
access: private
description:
Calculates the motion of this Pointer, including its velocity and angle of movement.
This method is called automatically each frame by the Input Manager.


longname: Phaser.Input.Pointer-getDistance
since: 3.13.0
name: getDistance
memberof: Phaser.Input.Pointer
scope: instance
returnstype: number
returnsdescription: The distance the Pointer moved.
metafilename: Pointer.js
metapath: input
description:
If the Pointer has a button pressed down at the time this method is called, it will return the
distance between the Pointer's `downX` and `downY` values and the current position.

If no button is held down, it will return the last recorded distance, based on where
the Pointer was when the button was released.

If you wish to get the distance being travelled currently, based on the velocity of the Pointer,
then see the `Pointer.distance` property.


longname: Phaser.Input.Pointer-getDistanceX
since: 3.16.0
name: getDistanceX
memberof: Phaser.Input.Pointer
scope: instance
returnstype: number
returnsdescription: The horizontal distance the Pointer moved.
metafilename: Pointer.js
metapath: input
description:
If the Pointer has a button pressed down at the time this method is called, it will return the
horizontal distance between the Pointer's `downX` and `downY` values and the current position.

If no button is held down, it will return the last recorded horizontal distance, based on where
the Pointer was when the button was released.


longname: Phaser.Input.Pointer-getDistanceY
since: 3.16.0
name: getDistanceY
memberof: Phaser.Input.Pointer
scope: instance
returnstype: number
returnsdescription: The vertical distance the Pointer moved.
metafilename: Pointer.js
metapath: input
description:
If the Pointer has a button pressed down at the time this method is called, it will return the
vertical distance between the Pointer's `downX` and `downY` values and the current position.

If no button is held down, it will return the last recorded vertical distance, based on where
the Pointer was when the button was released.


longname: Phaser.Input.Pointer-getDuration
since: 3.16.0
name: getDuration
memberof: Phaser.Input.Pointer
scope: instance
returnstype: number
returnsdescription: The duration the Pointer was held down for in milliseconds.
metafilename: Pointer.js
metapath: input
description:
If the Pointer has a button pressed down at the time this method is called, it will return the
duration since the button was pressed down.

If no button is held down, it will return the last recorded duration, based on the time
the last button on the Pointer was released.


longname: Phaser.Input.Pointer-getAngle
since: 3.16.0
name: getAngle
memberof: Phaser.Input.Pointer
scope: instance
returnstype: number
returnsdescription: The angle between the Pointer's coordinates in radians.
metafilename: Pointer.js
metapath: input
description:
If the Pointer has a button pressed down at the time this method is called, it will return the
angle between the Pointer's `downX` and `downY` values and the current position.

If no button is held down, it will return the last recorded angle, based on where
the Pointer was when the button was released.

The angle is based on the old position facing to the current position.

If you wish to get the current angle, based on the velocity of the Pointer, then
see the `Pointer.angle` property.


longname: Phaser.Input.Pointer-getInterpolatedPosition
since: 3.11.0
name: getInterpolatedPosition
memberof: Phaser.Input.Pointer
scope: instance
signature: steps?:number,out?:array
returnstype: array
returnsdescription: An array of interpolated values.
metafilename: Pointer.js
metapath: input
description:
Takes the previous and current Pointer positions and then generates an array of interpolated values between
the two. The array will be populated up to the size of the `steps` argument.

```javaScript
var points = pointer.getInterpolatedPosition(4);

// points[0] = { x: 0, y: 0 }
// points[1] = { x: 2, y: 1 }
// points[2] = { x: 3, y: 2 }
// points[3] = { x: 6, y: 3 }
```

Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer
events can often fire faster than the main browser loop, and this will help you avoid janky movement
especially if you have an object following a Pointer.

Note that if you provide an output array it will only be populated up to the number of steps provided.
It will not clear any previous data that may have existed beyond the range of the steps count.

Internally it uses the Smooth Step interpolation calculation.


longname: Phaser.Input.Touch.TouchManager-disableContextMenu
since: 3.20.0
name: disableContextMenu
memberof: Phaser.Input.Touch.TouchManager
scope: instance
returnstype: Phaser.Input.Touch.TouchManager
returnsdescription: This Touch Manager instance.
metafilename: TouchManager.js
metapath: input/touch
description:
Attempts to disable the context menu from appearing if you touch-hold on the browser.

Works by listening for the `contextmenu` event and prevent defaulting it.

Use this if you need to disable the OS context menu on mobile.


longname: Phaser.Input.Touch.TouchManager-startListeners
since: 3.0.0
name: startListeners
memberof: Phaser.Input.Touch.TouchManager
scope: instance
metafilename: TouchManager.js
metapath: input/touch
description:
Starts the Touch Event listeners running as long as an input target is set.

This method is called automatically if Touch Input is enabled in the game config,
which it is by default. However, you can call it manually should you need to
delay input capturing until later in the game.


longname: Phaser.Input.Touch.TouchManager-stopListeners
since: 3.0.0
name: stopListeners
memberof: Phaser.Input.Touch.TouchManager
scope: instance
metafilename: TouchManager.js
metapath: input/touch
description:
Stops the Touch Event listeners.
This is called automatically and does not need to be manually invoked.


longname: Phaser.Loader.File-load
since: 3.0.0
name: load
memberof: Phaser.Loader.File
scope: instance
metafilename: File.js
metapath: loader
description:
Called by the Loader, starts the actual file downloading.
During the load the methods onLoad, onError and onProgress are called, based on the XHR events.
You shouldn't normally call this method directly, it's meant to be invoked by the Loader.


longname: Phaser.Loader.File-onProcess
since: 3.0.0
name: onProcess
memberof: Phaser.Loader.File
scope: instance
metafilename: File.js
metapath: loader
description:
Usually overridden by the FileTypes and is called by Loader.nextFile.
This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.


longname: Phaser.Loader.File-onProcessError
since: 3.7.0
name: onProcessError
memberof: Phaser.Loader.File
scope: instance
metafilename: File.js
metapath: loader
description:
Called when the File has completed processing but it generated an error.
Checks on the state of its multifile, if set.


longname: Phaser.Loader.File-hasCacheConflict
since: 3.7.0
name: hasCacheConflict
memberof: Phaser.Loader.File
scope: instance
returnstype: boolean
returnsdescription: `true` if adding this file will cause a conflict, otherwise `false`.
metafilename: File.js
metapath: loader
description:
Checks if a key matching the one used by this file exists in the target Cache or not.
This is called automatically by the LoaderPlugin to decide if the file can be safely
loaded or will conflict.


longname: Phaser.Loader.File-addToCache
since: 3.7.0
name: addToCache
memberof: Phaser.Loader.File
scope: instance
metafilename: File.js
metapath: loader
description:
Adds this file to its target cache upon successful loading and processing.
This method is often overridden by specific file types.


longname: Phaser.Loader.File-pendingDestroy
since: 3.7.0
name: pendingDestroy
memberof: Phaser.Loader.File
scope: instance
fires: Phaser.Loader.Events.FILE_COMPLETE,Phaser.Loader.Events.FILE_KEY_COMPLETE
metafilename: File.js
metapath: loader
description:
Called once the file has been added to its cache and is now ready for deletion from the Loader.
It will emit a `filecomplete` event from the LoaderPlugin.


longname: Phaser.Loader.File.createObjectURL
since: 3.7.0
name: createObjectURL
memberof: Phaser.Loader.File
scope: static
signature: image:HTMLImageElement,blob:Blob,defaultType:string
metafilename: File.js
metapath: loader
description:
Static method for creating object URL using URL API and setting it as image 'src' attribute.
If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.


longname: Phaser.Loader.File.revokeObjectURL
since: 3.7.0
name: revokeObjectURL
memberof: Phaser.Loader.File
scope: static
signature: image:HTMLImageElement
metafilename: File.js
metapath: loader
description:
Static method for releasing an existing object URL which was previously created
by calling [File#createObjectURL](File#createObjectURL) method.


longname: Phaser.Loader.FileTypes.AnimationJSONFile-onProcess
since: 3.7.0
name: onProcess
memberof: Phaser.Loader.FileTypes.AnimationJSONFile
scope: instance
metafilename: AnimationJSONFile.js
metapath: loader/filetypes
overrides: Phaser.Loader.File#onProcess
description:
Called automatically by Loader.nextFile.
This method controls what extra work this File does with its loaded data.


longname: Phaser.Loader.LoaderPlugin-animation
since: 3.0.0
name: animation
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: AnimationJSONFile.js
metapath: loader/filetypes
description:
Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.animation('baddieAnims', 'files/BaddieAnims.json');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.

The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the JSON Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the JSON Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.animation({
    key: 'baddieAnims',
    url: 'files/BaddieAnims.json'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.

Once the file has finished loading it will automatically be passed to the global Animation Managers `fromJSON` method.
This will parse all of the JSON data and create animation data from it. This process happens at the very end
of the Loader, once every other file in the load queue has finished. The reason for this is to allow you to load
both animation data and the images it relies upon in the same load call.

Once the animation data has been parsed you will be able to play animations using that data.
Please see the Animation Manager `fromJSON` method for more details about the format and playback.

You can also access the raw animation data from its Cache using its key:

```javascript
this.load.animation('baddieAnims', 'files/BaddieAnims.json');
// and later in your game ...
var data = this.cache.json.get('baddieAnims');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and
this is what you would use to retrieve the text from the JSON Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data"
and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,
rather than the whole file. For example, if your JSON data had a structure like this:

```json
{
    "level1": {
        "baddies": {
            "aliens": {},
            "boss": {}
        }
    },
    "level2": {},
    "level3": {}
}
```

And if you only wanted to create animations from the `boss` data, then you could pass `level1.baddies.boss`as the `dataKey`.

Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Array.<Phaser.Types.Loader.FileTypes.JSONFileConfig>,url?:string,dataKey?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-aseprite
since: 3.50.0
name: aseprite
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: AsepriteFile.js
metapath: loader/filetypes
description:
Aseprite is a powerful animated sprite editor and pixel art tool.

You can find more details at [https://www.aseprite.org/](https://www.aseprite.org/)

Adds a JSON based Aseprite Animation, or array of animations, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.aseprite('gladiator', 'images/Gladiator.png', 'images/Gladiator.json');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.

To export a compatible JSON file in Aseprite, please do the following:

1. Go to "File - Export Sprite Sheet"

2. On the **Layout** tab:
2a. Set the "Sheet type" to "Packed"
2b. Set the "Constraints" to "None"
2c. Check the "Merge Duplicates" checkbox

3. On the **Sprite** tab:
3a. Set "Layers" to "Visible layers"
3b. Set "Frames" to "All frames", unless you only wish to export a sub-set of tags

4. On the **Borders** tab:
4a. Check the "Trim Sprite" and "Trim Cells" options
4b. Ensure "Border Padding", "Spacing" and "Inner Padding" are all > 0 (1 is usually enough)

5. On the **Output** tab:
5a. Check "Output File", give your image a name and make sure you choose "png files" as the file type
5b. Check "JSON Data" and give your json file a name
5c. The JSON Data type can be either a Hash or Array, Phaser doesn't mind.
5d. Make sure "Tags" is checked in the Meta options
5e. In the "Item Filename" input box, make sure it says just "{frame}" and nothing more.

6. Click export

This was tested with Aseprite 1.2.25.

This will export a png and json file which you can load using the Aseprite Loader, i.e.:

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.aseprite({
    key: 'gladiator',
    textureURL: 'images/Gladiator.png',
    atlasURL: 'images/Gladiator.json'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.AsepriteFileConfig` for more details.

Instead of passing a URL for the JSON data you can also pass in a well formed JSON object instead.

Once loaded, you can call this method from within a Scene with the 'atlas' key:

```javascript
this.anims.createFromAseprite('paladin');
```

Any animations defined in the JSON will now be available to use in Phaser and you play them
via their Tag name. For example, if you have an animation called 'War Cry' on your Aseprite timeline,
you can play it in Phaser using that Tag name:

```javascript
this.add.sprite(400, 300).play('War Cry');
```

When calling this method you can optionally provide an array of tag names, and only those animations
will be created. For example:

```javascript
this.anims.createFromAseprite('paladin', [ 'step', 'War Cry', 'Magnum Break' ]);
```

This will only create the 3 animations defined. Note that the tag names are case-sensitive.

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Aseprite File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.AsepriteFileConfig|Array.<Phaser.Types.Loader.FileTypes.AsepriteFileConfig>,textureURL?:string|Array.<string>,atlasURL?:object|string,textureXhrSettings?:Phaser.Types.Loader.XHRSettingsObject,atlasXhrSettings?:Phaser.Types.Loader.XHRSettingsObject


