# functions

longname: Phaser.Renderer.WebGL.WebGLRenderer-setTextureSource
since: 3.50.0
name: setTextureSource
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: textureSource:Phaser.Textures.TextureSource
returnstype: number
returnsdescription: The texture unit that was assigned to the Texture Source.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Activates the Texture Source and assigns it the next available texture unit.
If none are available, it will flush the current pipeline first.


longname: Phaser.Renderer.WebGL.WebGLRenderer-setTextureZero
since: 3.50.0
name: setTextureZero
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: texture:WebGLTexture,flush?:boolean
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Binds a texture directly to texture unit zero then activates it.
If the texture is already at unit zero, it skips the bind.
Make sure to call `clearTextureZero` after using this method.


longname: Phaser.Renderer.WebGL.WebGLRenderer-setNormalMap
since: 3.50.0
name: setNormalMap
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: texture:WebGLTexture
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Binds a texture directly to texture unit one then activates it.
If the texture is already at unit one, it skips the bind.
Make sure to call `clearNormalMap` after using this method.


longname: Phaser.Renderer.WebGL.WebGLRenderer-clearNormalMap
since: 3.50.0
name: clearNormalMap
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Clears the texture that was directly bound to texture unit one and
increases the start active texture counter.


longname: Phaser.Renderer.WebGL.WebGLRenderer-resetTextures
since: 3.50.0
name: resetTextures
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: all?:boolean
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Flushes the current pipeline, then resets the first two textures
back to the default temporary textures, resets the start active
counter and sets texture unit 1 as being active.


longname: Phaser.Renderer.WebGL.WebGLRenderer-setTexture2D
since: 3.0.0
name: setTexture2D
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: texture:WebGLTexture
returnstype: number
returnsdescription: The texture unit that was assigned to the Texture Source.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Binds a texture at a texture unit. If a texture is already
bound to that unit it will force a flush on the current pipeline.


longname: Phaser.Renderer.WebGL.WebGLRenderer-pushFramebuffer
since: 3.50.0
name: pushFramebuffer
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: framebuffer:WebGLFramebuffer,updateScissor?:boolean,resetTextures?:boolean,setViewport?:boolean
returnstype: Phaser.Renderer.WebGL.WebGLRenderer
returnsdescription: This WebGLRenderer instance.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Pushes a new framebuffer onto the FBO stack and makes it the currently bound framebuffer.

If there was another framebuffer already bound it will force a pipeline flush.

Call `popFramebuffer` to remove it again.


longname: Phaser.Renderer.WebGL.WebGLRenderer-setFramebuffer
since: 3.0.0
name: setFramebuffer
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: framebuffer:WebGLFramebuffer,updateScissor?:boolean,resetTextures?:boolean,setViewport?:boolean
returnstype: Phaser.Renderer.WebGL.WebGLRenderer
returnsdescription: This WebGLRenderer instance.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Sets the given framebuffer as the active and currently bound framebuffer.

If there was another framebuffer already bound it will force a pipeline flush.

Typically, you should call `pushFramebuffer` instead of this method.


longname: Phaser.Renderer.WebGL.WebGLRenderer-setProgram
since: 3.0.0
name: setProgram
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: program:WebGLProgram
returnstype: boolean
returnsdescription: `true` if the given program was bound, otherwise `false`.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Binds a shader program.

If there was a different program already bound it will force a pipeline flush first.

If the same program given to this method is already set as the current program, no change
will take place and this method will return `false`.


longname: Phaser.Renderer.WebGL.WebGLRenderer-resetProgram
since: 3.50.0
name: resetProgram
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLRenderer
returnsdescription: This WebGLRenderer instance.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Rebinds whatever program `WebGLRenderer.currentProgram` is set as, without
changing anything, or flushing.


longname: Phaser.Renderer.WebGL.WebGLRenderer-createTexture2D
since: 3.0.0
name: createTexture2D
memberof: Phaser.Renderer.WebGL.WebGLRenderer
description: A wrapper for creating a WebGLTexture. If no pixel data is passed it will create an empty texture.
scope: instance
returnstype: WebGLTexture
returnsdescription: The WebGLTexture that was created.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
signature:
mipLevel:number,minFilter:number,magFilter:number,wrapT:number,wrapS:number,format:number,pixels:object,width:number,height:number,pma?:boolean,forceSize?:boolean,flipY?:boolean


longname: Phaser.Renderer.WebGL.WebGLRenderer-createProgram
since: 3.0.0
name: createProgram
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: vertexShader:string,fragmentShader:string
returnstype: WebGLProgram
returnsdescription: The linked WebGLProgram created from the given shader source.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Creates a WebGLProgram instance based on the given vertex and fragment shader source.

Then compiles, attaches and links the program before returning it.


longname: Phaser.Renderer.WebGL.WebGLRenderer-deleteTexture
since: 3.0.0
name: deleteTexture
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: texture:WebGLTexture,reset?:boolean
returnstype: Phaser.Renderer.WebGL.WebGLRenderer
returnsdescription: This WebGLRenderer instance.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Calls `GL.deleteTexture` on the given WebGLTexture and also optionally
resets the currently defined textures.


longname: Phaser.Renderer.WebGL.WebGLRenderer-preRenderCamera
since: 3.0.0
name: preRenderCamera
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: camera:Phaser.Cameras.Scene2D.Camera
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Controls the pre-render operations for the given camera.
Handles any clipping needed by the camera and renders the background color if a color is visible.


longname: Phaser.Renderer.WebGL.WebGLRenderer-postRenderCamera
since: 3.0.0
name: postRenderCamera
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: camera:Phaser.Cameras.Scene2D.Camera
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Controls the post-render operations for the given camera.

Renders the foreground camera effects like flash and fading, then resets the current scissor state.


longname: Phaser.Renderer.WebGL.WebGLRenderer-snapshot
since: 3.0.0
name: snapshot
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: callback:Phaser.Types.Renderer.Snapshot.SnapshotCallback,type?:string,encoderOptions?:number
returnstype: Phaser.Renderer.WebGL.WebGLRenderer
returnsdescription: This WebGL Renderer.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.

To capture a specific area see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.

Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then
calling this method will override it.

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.Renderer.WebGL.WebGLRenderer-snapshotArea
since: 3.16.0
name: snapshotArea
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLRenderer
returnsdescription: This WebGL Renderer.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Schedules a snapshot of the given area of the game viewport to be taken after the current frame is rendered.

To capture the whole game viewport see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.

Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then
calling this method will override it.

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.Renderer.WebGL.WebGLRenderer-snapshotFramebuffer
since: 3.19.0
name: snapshotFramebuffer
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLRenderer
returnsdescription: This WebGL Renderer.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Takes a snapshot of the given area of the given frame buffer.

Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.

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:
framebuffer:WebGLFramebuffer,bufferWidth:number,bufferHeight:number,callback:Phaser.Types.Renderer.Snapshot.SnapshotCallback,getPixel?:boolean,x?:number,y?:number,width?:number,height?:number,type?:string,encoderOptions?:number


longname: Phaser.Renderer.WebGL.WebGLRenderer-canvasToTexture
since: 3.0.0
name: canvasToTexture
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: srcCanvas:HTMLCanvasElement,dstTexture?:WebGLTexture,noRepeat?:boolean,flipY?:boolean
returnstype: WebGLTexture
returnsdescription: The newly created, or updated, WebGL Texture.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Creates a new WebGL Texture based on the given Canvas Element.

If the `dstTexture` parameter is given, the WebGL Texture is updated, rather than created fresh.


longname: Phaser.Renderer.WebGL.WebGLRenderer-getMaxTextureSize
since: 3.8.0
name: getMaxTextureSize
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
returnstype: number
returnsdescription: The maximum supported texture size.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Returns the largest texture size (either width or height) that can be created.
Note that VRAM may not allow a texture of any given size, it just expresses
hardware / driver support for a given size.


longname: Phaser.Renderer.WebGL.WebGLRenderer-destroy
since: 3.0.0
name: destroy
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
metafilename: WebGLRenderer.js
metapath: renderer/webgl
overrides: Phaser.Events.EventEmitter#destroy
description:
Destroy this WebGLRenderer, cleaning up all related resources such as pipelines, native textures, etc.


longname: Phaser.Renderer.WebGL.WebGLShader-createAttributes
since: 3.50.0
name: createAttributes
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: attributes:Array.<Phaser.Types.Renderer.WebGL.WebGLPipelineAttributeConfig>
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Takes the vertex attributes config and parses it, creating the resulting array that is stored
in this shaders `attributes` property, calculating the offset, normalization and location
in the process.

Calling this method resets `WebGLShader.attributes`, `WebGLShader.vertexSize` and
`WebGLShader.vertexComponentCount`.

It is called automatically when this class is created, but can be called manually if required.


longname: Phaser.Renderer.WebGL.WebGLShader-bind
since: 3.50.0
name: bind
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: setAttributes?:boolean,flush?:boolean
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets the program this shader uses as being the active shader in the WebGL Renderer.

This method is called every time the parent pipeline is made the current active pipeline.


longname: Phaser.Renderer.WebGL.WebGLShader-rebind
since: 3.50.0
name: rebind
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets the program this shader uses as being the active shader in the WebGL Renderer.

Then resets all of the attribute pointers.


longname: Phaser.Renderer.WebGL.WebGLShader-setAttribPointers
since: 3.50.0
name: setAttribPointers
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: reset?:boolean
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets the vertex attribute pointers.

This should only be called after the vertex buffer has been bound.

It is called automatically during the `bind` method.


longname: Phaser.Renderer.WebGL.WebGLShader-createUniforms
since: 3.50.0
name: createUniforms
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets up the `WebGLShader.uniforms` object, populating it with the names
and locations of the shader uniforms this shader requires.

It works by first calling `gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS)` to
find out how many active uniforms this shader has. It then iterates through them,
calling `gl.getActiveUniform` to get the WebGL Active Info from each one. Finally,
the name and location are stored in the local array.

This method is called automatically when this class is created.


longname: Phaser.Renderer.WebGL.WebGLShader-setUniform1
since: 3.50.0
name: setUniform1
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: setter:function,name:string,value1:boolean|number|Array.<number>|Float32Array,skipCheck?:boolean
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets the given uniform value/s based on the name and GL function.

This method is called internally by other methods such as `set1f` and `set3iv`.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-setUniform2
since: 3.50.0
name: setUniform2
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets the given uniform value/s based on the name and GL function.

This method is called internally by other methods such as `set1f` and `set3iv`.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.

signature:
setter:function,name:string,value1:boolean|number|Array.<number>|Float32Array,value2:boolean|number|Array.<number>|Float32Array,skipCheck?:boolean


longname: Phaser.Renderer.WebGL.WebGLShader-setUniform3
since: 3.50.0
name: setUniform3
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets the given uniform value/s based on the name and GL function.

This method is called internally by other methods such as `set1f` and `set3iv`.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.

signature:
setter:function,name:string,value1:boolean|number|Array.<number>|Float32Array,value2:boolean|number|Array.<number>|Float32Array,value3:boolean|number|Array.<number>|Float32Array,skipCheck?:boolean


longname: Phaser.Renderer.WebGL.WebGLShader-setUniform4
since: 3.50.0
name: setUniform4
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
signature:
setter:function,name:string,value1:boolean|number|Array.<number>|Float32Array,value2:boolean|number|Array.<number>|Float32Array,value3:boolean|number|Array.<number>|Float32Array,value4:boolean|number|Array.<number>|Float32Array,skipCheck?:boolean


longname: Phaser.Renderer.WebGL.WebGLShader-set1f
since: 3.50.0
name: set1f
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,x:number
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 1f uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set2f
since: 3.50.0
name: set2f
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,x:number,y:number
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 2f uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set3f
since: 3.50.0
name: set3f
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,x:number,y:number,z:number
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 3f uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set4f
since: 3.50.0
name: set4f
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,x:number,y:number,z:number,w:number
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 4f uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set1fv
since: 3.50.0
name: set1fv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,arr:Array.<number>|Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 1fv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set2fv
since: 3.50.0
name: set2fv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,arr:Array.<number>|Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 2fv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set3fv
since: 3.50.0
name: set3fv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,arr:Array.<number>|Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 3fv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set4fv
since: 3.50.0
name: set4fv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,arr:Array.<number>|Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 4fv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set1iv
since: 3.50.0
name: set1iv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,arr:Array.<number>|Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 1iv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set2iv
since: 3.50.0
name: set2iv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,arr:Array.<number>|Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 2iv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set3iv
since: 3.50.0
name: set3iv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,arr:Array.<number>|Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 3iv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set4iv
since: 3.50.0
name: set4iv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,arr:Array.<number>|Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 4iv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set1i
since: 3.50.0
name: set1i
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,x:number
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 1i uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set2i
since: 3.50.0
name: set2i
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,x:number,y:number
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 2i uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set3i
since: 3.50.0
name: set3i
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,x:number,y:number,z:number
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 3i uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-set4i
since: 3.50.0
name: set4i
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,x:number,y:number,z:number,w:number
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a 4i uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-setMatrix2fv
since: 3.50.0
name: setMatrix2fv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,transpose:boolean,matrix:Array.<number>|Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a matrix 2fv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-setMatrix3fv
since: 3.50.0
name: setMatrix3fv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,transpose:boolean,matrix:Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a matrix 3fv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-setMatrix4fv
since: 3.50.0
name: setMatrix4fv
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
signature: name:string,transpose:boolean,matrix:Float32Array
returnstype: Phaser.Renderer.WebGL.WebGLShader
returnsdescription: This WebGLShader instance.
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Sets a matrix 4fv uniform value based on the given name on this shader.

The uniform is only set if the value/s given are different to those previously set.

This method works by first setting this shader as being the current shader within the
WebGL Renderer, if it isn't already. It also sets this shader as being the current
one within the pipeline it belongs to.


longname: Phaser.Renderer.WebGL.WebGLShader-destroy
since: 3.50.0
name: destroy
memberof: Phaser.Renderer.WebGL.WebGLShader
scope: instance
metafilename: WebGLShader.js
metapath: renderer/webgl
description:
Removes all external references from this class and deletes the WebGL program from the WebGL context.

Does not remove this shader from the parent pipeline.


longname: Phaser.Scale.ScaleManager-boot
since: 3.16.0
name: boot
memberof: Phaser.Scale.ScaleManager
scope: instance
fires: Phaser.Scale.Events.RESIZE
metafilename: ScaleManager.js
metapath: scale
access: protected
description:
The Boot handler is called by Phaser.Game when it first starts up.
The renderer is available by now and the canvas has been added to the DOM.


longname: Phaser.Scale.ScaleManager-getParentBounds
since: 3.16.0
name: getParentBounds
memberof: Phaser.Scale.ScaleManager
scope: instance
returnstype: boolean
returnsdescription: `true` if the parent bounds have changed size, otherwise `false`.
metafilename: ScaleManager.js
metapath: scale
description:
Calculates the size of the parent bounds and updates the `parentSize` component, if the canvas has a dom parent.


longname: Phaser.Scale.ScaleManager-lockOrientation
since: 3.16.0
name: lockOrientation
memberof: Phaser.Scale.ScaleManager
scope: instance
signature: orientation:string
returnstype: boolean
returnsdescription: `true` if the orientation was successfully locked, otherwise `false`.
metafilename: ScaleManager.js
metapath: scale
description:
Attempts to lock the orientation of the web browser using the Screen Orientation API.

This API is only available on modern mobile browsers.
See [https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation) for details.


longname: Phaser.Scale.ScaleManager-setParentSize
since: 3.16.0
name: setParentSize
memberof: Phaser.Scale.ScaleManager
scope: instance
fires: Phaser.Scale.Events.RESIZE
signature: width:number,height:number
returnstype: Phaser.Scale.ScaleManager
returnsdescription: The Scale Manager instance.
metafilename: ScaleManager.js
metapath: scale
description:
This method will set the size of the Parent Size component, which is used in scaling
and centering calculations. You only need to call this method if you have explicitly
disabled the use of a parent in your game config, but still wish to take advantage of
other Scale Manager features.


longname: Phaser.Scale.ScaleManager-setGameSize
since: 3.16.0
name: setGameSize
memberof: Phaser.Scale.ScaleManager
scope: instance
fires: Phaser.Scale.Events.RESIZE
signature: width:number,height:number
returnstype: Phaser.Scale.ScaleManager
returnsdescription: The Scale Manager instance.
metafilename: ScaleManager.js
metapath: scale
description:
This method will set a new size for your game.

It should only be used if you're looking to change the base size of your game and are using
one of the Scale Manager scaling modes, i.e. `FIT`. If you're using `NONE` and wish to
change the game and canvas size directly, then please use the `resize` method instead.


longname: Phaser.Scale.ScaleManager-resize
since: 3.16.0
name: resize
memberof: Phaser.Scale.ScaleManager
scope: instance
fires: Phaser.Scale.Events.RESIZE
signature: width:number,height:number
returnstype: Phaser.Scale.ScaleManager
returnsdescription: The Scale Manager instance.
metafilename: ScaleManager.js
metapath: scale
description:
Call this to modify the size of the Phaser canvas element directly.
You should only use this if you are using the `NONE` scale mode,
it will update all internal components completely.

If all you want to do is change the size of the parent, see the `setParentSize` method.

If all you want is to change the base size of the game, but still have the Scale Manager
manage all the scaling (i.e. you're **not** using `NONE`), then see the `setGameSize` method.

This method will set the `gameSize`, `baseSize` and `displaySize` components to the given
dimensions. It will then resize the canvas width and height to the values given, by
directly setting the properties. Finally, if you have set the Scale Manager zoom value
to anything other than 1 (the default), it will set the canvas CSS width and height to
be the given size multiplied by the zoom factor (the canvas pixel size remains untouched).

If you have enabled `autoCenter`, it is then passed to the `updateCenter` method and
the margins are set, allowing the canvas to be centered based on its parent element
alone. Finally, the `displayScale` is adjusted and the RESIZE event dispatched.


longname: Phaser.Scale.ScaleManager-refresh
since: 3.16.0
name: refresh
memberof: Phaser.Scale.ScaleManager
scope: instance
fires: Phaser.Scale.Events.RESIZE
signature: previousWidth?:number,previousHeight?:number
returnstype: Phaser.Scale.ScaleManager
returnsdescription: The Scale Manager instance.
metafilename: ScaleManager.js
metapath: scale
description:
Refreshes the internal scale values, bounds sizes and orientation checks.

Once finished, dispatches the resize event.

This is called automatically by the Scale Manager when the browser window size changes,
as long as it is using a Scale Mode other than 'NONE'.


longname: Phaser.Scale.ScaleManager-updateOrientation
since: 3.16.0
name: updateOrientation
memberof: Phaser.Scale.ScaleManager
scope: instance
fires: Phaser.Scale.Events.ORIENTATION_CHANGE
metafilename: ScaleManager.js
metapath: scale
description:
Internal method that checks the current screen orientation, only if the internal check flag is set.

If the orientation has changed it updates the orientation property and then dispatches the orientation change event.


longname: Phaser.Scale.ScaleManager-getMaxZoom
since: 3.16.0
name: getMaxZoom
memberof: Phaser.Scale.ScaleManager
scope: instance
returnstype: number
returnsdescription: The maximum possible zoom factor. At a minimum this value is always at least 1.
metafilename: ScaleManager.js
metapath: scale
description:
Calculates and returns the largest possible zoom factor, based on the current
parent and game sizes. If the parent has no dimensions (i.e. an unstyled div),
or is smaller than the un-zoomed game, then this will return a value of 1 (no zoom)


longname: Phaser.Scale.ScaleManager-updateCenter
since: 3.16.0
name: updateCenter
memberof: Phaser.Scale.ScaleManager
scope: instance
metafilename: ScaleManager.js
metapath: scale
description:
Calculates and updates the canvas CSS style in order to center it within the
bounds of its parent. If you have explicitly set parent to be `null` in your
game config then this method will likely give incorrect results unless you have called the
`setParentSize` method first.

It works by modifying the canvas CSS `marginLeft` and `marginTop` properties.

If they have already been set by your own style sheet, or code, this will overwrite them.

To prevent the Scale Manager from centering the canvas, either do not set the
`autoCenter` property in your game config, or make sure it is set to `NO_CENTER`.


longname: Phaser.Scale.ScaleManager-updateBounds
since: 3.16.0
name: updateBounds
memberof: Phaser.Scale.ScaleManager
scope: instance
metafilename: ScaleManager.js
metapath: scale
description:
Updates the `canvasBounds` rectangle to match the bounding client rectangle of the
canvas element being used to track input events.


longname: Phaser.Scale.ScaleManager-startFullscreen
since: 3.16.0
name: startFullscreen
memberof: Phaser.Scale.ScaleManager
scope: instance
signature: fullscreenOptions?:object
metafilename: ScaleManager.js
metapath: scale
description:
Sends a request to the browser to ask it to go in to full screen mode, using the {@link [https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API) Fullscreen API}.

If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.

This method _must_ be called from a `pointerup` user-input gesture (**not** `pointerdown`). You cannot launch
games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked
from fullscreen unless the iframe has the `allowfullscreen` attribute.

On touch devices, such as Android and iOS Safari, you should always use `pointerup` and NOT `pointerdown`,
otherwise the request will fail unless the document in which your game is embedded has already received
some form of touch input, which you cannot guarantee. Activating fullscreen via `pointerup` circumvents
this issue.

Performing an action that navigates to another page, or opens another tab, will automatically cancel
fullscreen mode, as will the user pressing the ESC key. To cancel fullscreen mode directly from your game,
i.e. by clicking an icon, call the `stopFullscreen` method.

A browser can only send one DOM element into fullscreen. You can control which element this is by
setting the `fullscreenTarget` property in your game config, or changing the property in the Scale Manager.
Note that the game canvas _must_ be a child of the target. If you do not give a target, Phaser will
automatically create a blank `<div>` element and move the canvas into it, before going fullscreen.
When it leaves fullscreen, the div will be removed.

fires:
Phaser.Scale.Events.ENTER_FULLSCREEN,Phaser.Scale.Events.FULLSCREEN_FAILED,Phaser.Scale.Events.FULLSCREEN_UNSUPPORTED,Phaser.Scale.Events.RESIZE


longname: Phaser.Scale.ScaleManager-toggleFullscreen
since: 3.16.0
name: toggleFullscreen
memberof: Phaser.Scale.ScaleManager
scope: instance
signature: fullscreenOptions?:object
metafilename: ScaleManager.js
metapath: scale
description:
Toggles the fullscreen mode. If already in fullscreen, calling this will cancel it.
If not in fullscreen, this will request the browser to enter fullscreen mode.

If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.

This method _must_ be called from a user-input gesture, such as `pointerdown`. You cannot launch
games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked
from fullscreen unless the iframe has the `allowfullscreen` attribute.

fires:
Phaser.Scale.Events.ENTER_FULLSCREEN,Phaser.Scale.Events.LEAVE_FULLSCREEN,Phaser.Scale.Events.FULLSCREEN_UNSUPPORTED,Phaser.Scale.Events.RESIZE


longname: Phaser.Scale.ScaleManager-step
since: 3.16.0
name: step
memberof: Phaser.Scale.ScaleManager
scope: instance
signature: time:number,delta:number
metafilename: ScaleManager.js
metapath: scale
description:
Internal method, called automatically by the game step.
Monitors the elapsed time and resize interval to see if a parent bounds check needs to take place.


longname: Phaser.Scale.ScaleManager-destroy
since: 3.16.0
name: destroy
memberof: Phaser.Scale.ScaleManager
scope: instance
metafilename: ScaleManager.js
metapath: scale
overrides: Phaser.Events.EventEmitter#destroy
description:
Destroys this Scale Manager, releasing all references to external resources.
Once destroyed, the Scale Manager cannot be used again.


longname: Phaser.Scenes.GetScenePlugins
since: 3.0.0
name: GetScenePlugins
memberof: Phaser.Scenes
scope: static
signature: sys:Phaser.Scenes.Systems
returnstype: array
metafilename: GetScenePlugins.js
metapath: scene
description:
Builds an array of which plugins (not including physics plugins) should be activated for the given Scene.

returnsdescription:
An array of all plugins which should be activated, either the default ones or the ones configured in the Scene Systems object.


longname: Phaser.Scene-update
since: 3.0.0
name: update
memberof: Phaser.Scene
scope: instance
signature: time:number,delta:number
metafilename: Scene.js
metapath: scene
description:
This method should be overridden by your own Scenes.

This method is called once per game step while the scene is running.


longname: Phaser.Scenes.SceneManager-add
since: 3.0.0
name: add
memberof: Phaser.Scenes.SceneManager
scope: instance
returnstype: Phaser.Scene
returnsdescription: The added Scene, if it was added immediately, otherwise `null`.
metafilename: SceneManager.js
metapath: scene
description:
Adds a new Scene into the SceneManager.
You must give each Scene a unique key by which you'll identify it.

The `sceneConfig` can be:

* A `Phaser.Scene` object, or an object that extends it.
* A plain JavaScript object
* A JavaScript ES6 Class that extends `Phaser.Scene`
* A JavaScript ES5 prototype based Class
* A JavaScript function

If a function is given then a new Scene will be created by calling it.

signature:
key:string,sceneConfig:Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function,autoStart?:boolean,data?:object


longname: Phaser.Scenes.SceneManager-remove
since: 3.2.0
name: remove
memberof: Phaser.Scenes.SceneManager
scope: instance
signature: key:string
returnstype: Phaser.Scenes.SceneManager
returnsdescription: This Scene Manager instance.
metafilename: SceneManager.js
metapath: scene
description:
Removes a Scene from the SceneManager.

The Scene is removed from the local scenes array, it's key is cleared from the keys
cache and Scene.Systems.destroy is then called on it.

If the SceneManager is processing the Scenes when this method is called it will
queue the operation for the next update sequence.


longname: Phaser.Scenes.SceneManager-createSceneFromObject
since: 3.0.0
name: createSceneFromObject
memberof: Phaser.Scenes.SceneManager
description: Creates and initializes a Scene from an Object definition.
scope: instance
returnstype: Phaser.Scene
returnsdescription: The created Scene.
metafilename: SceneManager.js
metapath: scene
access: private
signature:
key:string,sceneConfig:string|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig


longname: Phaser.Scenes.SceneManager-getScenes
since: 3.16.0
name: getScenes
memberof: Phaser.Scenes.SceneManager
scope: instance
signature: isActive?:boolean,inReverse?:boolean
returnstype: Array.<Phaser.Scene>
returnsdescription: An array containing all of the Scenes in the Scene Manager.
metafilename: SceneManager.js
metapath: scene
description:
Returns an array of all the current Scenes being managed by this Scene Manager.

You can filter the output by the active state of the Scene and choose to have
the array returned in normal or reversed order.


longname: Phaser.Scenes.SceneManager-run
since: 3.10.0
name: run
memberof: Phaser.Scenes.SceneManager
scope: instance
signature: key:string|Phaser.Scene,data?:object
returnstype: Phaser.Scenes.SceneManager
returnsdescription: This Scene Manager instance.
metafilename: SceneManager.js
metapath: scene
description:
Runs the given Scene.

If the given Scene is paused, it will resume it. If sleeping, it will wake it.
If not running at all, it will be started.

Use this if you wish to open a modal Scene by calling `pause` on the current
Scene, then `run` on the modal Scene.


longname: Phaser.Scenes.SceneManager-moveAbove
since: 3.2.0
name: moveAbove
memberof: Phaser.Scenes.SceneManager
scope: instance
signature: keyA:string|Phaser.Scene,keyB:string|Phaser.Scene
returnstype: Phaser.Scenes.SceneManager
returnsdescription: This Scene Manager instance.
metafilename: SceneManager.js
metapath: scene
description:
Moves a Scene so it is immediately above another Scene in the Scenes list.

This means it will render over the top of the other Scene.


longname: Phaser.Scenes.SceneManager-moveBelow
since: 3.2.0
name: moveBelow
memberof: Phaser.Scenes.SceneManager
scope: instance
signature: keyA:string|Phaser.Scene,keyB:string|Phaser.Scene
returnstype: Phaser.Scenes.SceneManager
returnsdescription: This Scene Manager instance.
metafilename: SceneManager.js
metapath: scene
description:
Moves a Scene so it is immediately below another Scene in the Scenes list.

This means it will render behind the other Scene.


longname: Phaser.Scenes.SceneManager-destroy
since: 3.0.0
name: destroy
memberof: Phaser.Scenes.SceneManager
scope: instance
metafilename: SceneManager.js
metapath: scene
description:
Destroy this Scene Manager and all of its systems.

This process cannot be reversed.

This method is called automatically when a Phaser Game instance is destroyed.


longname: Phaser.Scenes.ScenePlugin-start
since: 3.0.0
name: start
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: key?:string|Phaser.Scene,data?:object
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Shutdown this Scene and run the given one.

This will happen at the next Scene Manager update, not immediately.


longname: Phaser.Scenes.ScenePlugin-transition
since: 3.5.0
name: transition
memberof: Phaser.Scenes.ScenePlugin
scope: instance
fires: Phaser.Scenes.Events.TRANSITION_OUT
signature: config:Phaser.Types.Scenes.SceneTransitionConfig
returnstype: boolean
returnsdescription: `true` is the transition was started, otherwise `false`.
metafilename: ScenePlugin.js
metapath: scene
description:
This will start a transition from the current Scene to the target Scene given.

The transition will last for the duration specified in milliseconds.

You can have the target Scene moved above or below this one in the display list.

You can specify an update callback. This callback will be invoked _every frame_ for the duration
of the transition.

This Scene can either be sent to sleep at the end of the transition, or stopped. The default is to stop.

There are also 5 transition related events: This scene will emit the event `transitionout` when
the transition begins, which is typically the frame after calling this method.

The target Scene will emit the event `transitioninit` when that Scene's `init` method is called.
It will then emit the event `transitionstart` when its `create` method is called.
If the Scene was sleeping and has been woken up, it will emit the event `transitionwake` instead of these two,
as the Scenes `init` and `create` methods are not invoked when a Scene wakes up.

When the duration of the transition has elapsed it will emit the event `transitioncomplete`.
These events are cleared of all listeners when the Scene shuts down, but not if it is sent to sleep.

It's important to understand that the duration of the transition begins the moment you call this method.
If the Scene you are transitioning to includes delayed processes, such as waiting for files to load, the
time still counts down even while that is happening. If the game itself pauses, or something else causes
this Scenes update loop to stop, then the transition will also pause for that duration. There are
checks in place to prevent you accidentally stopping a transitioning Scene but if you've got code to
override this understand that until the target Scene completes it might never be unlocked for input events.


longname: Phaser.Scenes.ScenePlugin-add
since: 3.0.0
name: add
memberof: Phaser.Scenes.ScenePlugin
scope: instance
returnstype: Phaser.Scene
returnsdescription: The added Scene, if it was added immediately, otherwise `null`.
metafilename: ScenePlugin.js
metapath: scene
description:
Add the Scene into the Scene Manager and start it if 'autoStart' is true or the Scene config 'active' property is set.

signature:
key:string,sceneConfig:Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function,autoStart?:boolean,data?:object


longname: Phaser.Scenes.ScenePlugin-launch
since: 3.0.0
name: launch
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: key:string|Phaser.Scene,data?:object
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Launch the given Scene and run it in parallel with this one.

This will happen at the next Scene Manager update, not immediately.


longname: Phaser.Scenes.ScenePlugin-run
since: 3.10.0
name: run
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: key:string|Phaser.Scene,data?:object
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Runs the given Scene, but does not change the state of this Scene.

This will happen at the next Scene Manager update, not immediately.

If the given Scene is paused, it will resume it. If sleeping, it will wake it.
If not running at all, it will be started.

Use this if you wish to open a modal Scene by calling `pause` on the current
Scene, then `run` on the modal Scene.


longname: Phaser.Scenes.ScenePlugin-pause
since: 3.0.0
name: pause
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: key?:string|Phaser.Scene,data?:object
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Pause the Scene - this stops the update step from happening but it still renders.

This will happen at the next Scene Manager update, not immediately.


longname: Phaser.Scenes.ScenePlugin-resume
since: 3.0.0
name: resume
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: key?:string|Phaser.Scene,data?:object
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Resume the Scene - starts the update loop again.

This will happen at the next Scene Manager update, not immediately.


longname: Phaser.Scenes.ScenePlugin-sleep
since: 3.0.0
name: sleep
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: key?:string|Phaser.Scene,data?:object
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Makes the Scene sleep (no update, no render) but doesn't shutdown.

This will happen at the next Scene Manager update, not immediately.


longname: Phaser.Scenes.ScenePlugin-wake
since: 3.0.0
name: wake
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: key?:string|Phaser.Scene,data?:object
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Makes the Scene wake-up (starts update and render)

This will happen at the next Scene Manager update, not immediately.


longname: Phaser.Scenes.ScenePlugin-switch
since: 3.0.0
name: switch
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: key:string|Phaser.Scene
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Makes this Scene sleep then starts the Scene given.

This will happen at the next Scene Manager update, not immediately.


longname: Phaser.Scenes.ScenePlugin-stop
since: 3.0.0
name: stop
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: key?:string|Phaser.Scene,data?:any
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Shutdown the Scene, clearing display list, timers, etc.

This happens at the next Scene Manager update, not immediately.


longname: Phaser.Scenes.ScenePlugin-swapPosition
since: 3.2.0
name: swapPosition
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: keyA:string|Phaser.Scene,keyB?:string|Phaser.Scene
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Swaps the position of two scenes in the Scenes list.

This controls the order in which they are rendered and updated.


longname: Phaser.Scenes.ScenePlugin-moveAbove
since: 3.2.0
name: moveAbove
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: keyA:string|Phaser.Scene,keyB?:string|Phaser.Scene
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Swaps the position of two scenes in the Scenes list, so that Scene B is directly above Scene A.

This controls the order in which they are rendered and updated.


longname: Phaser.Scenes.ScenePlugin-moveBelow
since: 3.2.0
name: moveBelow
memberof: Phaser.Scenes.ScenePlugin
scope: instance
signature: keyA:string|Phaser.Scene,keyB?:string|Phaser.Scene
returnstype: Phaser.Scenes.ScenePlugin
returnsdescription: This Scene Plugin instance.
metafilename: ScenePlugin.js
metapath: scene
description:
Swaps the position of two scenes in the Scenes list, so that Scene B is directly below Scene A.

This controls the order in which they are rendered and updated.


longname: Phaser.Scenes.Systems-init
since: 3.0.0
name: init
memberof: Phaser.Scenes.Systems
scope: instance
fires: Phaser.Scenes.Events.BOOT
signature: game:Phaser.Game
metafilename: Systems.js
metapath: scene
access: protected
description:
This method is called only once by the Scene Manager when the Scene is instantiated.
It is responsible for setting up all of the Scene plugins and references.
It should never be called directly.


longname: Phaser.Scenes.Systems-step
since: 3.0.0
name: step
memberof: Phaser.Scenes.Systems
scope: instance
fires: Phaser.Scenes.Events.PRE_UPDATE,Phaser.Scenes.Events.UPDATE,Phaser.Scenes.Events.POST_UPDATE
signature: time:number,delta:number
metafilename: Systems.js
metapath: scene
description:
A single game step. Called automatically by the Scene Manager as a result of a Request Animation
Frame or Set Timeout call to the main Game instance.


longname: Phaser.Scenes.Systems-render
since: 3.0.0
name: render
memberof: Phaser.Scenes.Systems
scope: instance
fires: Phaser.Scenes.Events.PRE_RENDER,Phaser.Scenes.Events.RENDER
signature: renderer:Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer
metafilename: Systems.js
metapath: scene
description:
Called automatically by the Scene Manager.
Instructs the Scene to render itself via its Camera Manager to the renderer given.


longname: Phaser.Scenes.Systems-pause
since: 3.0.0
name: pause
memberof: Phaser.Scenes.Systems
scope: instance
fires: Phaser.Scenes.Events.PAUSE
signature: data?:object
returnstype: Phaser.Scenes.Systems
returnsdescription: This Systems object.
metafilename: Systems.js
metapath: scene
description:
Pause this Scene.
A paused Scene still renders, it just doesn't run ANY of its update handlers or systems.


longname: Phaser.Scenes.Systems-sleep
since: 3.0.0
name: sleep
memberof: Phaser.Scenes.Systems
scope: instance
fires: Phaser.Scenes.Events.SLEEP
signature: data?:object
returnstype: Phaser.Scenes.Systems
returnsdescription: This Systems object.
metafilename: Systems.js
metapath: scene
description:
Send this Scene to sleep.

A sleeping Scene doesn't run its update step or render anything, but it also isn't shut down
or has any of its systems or children removed, meaning it can be re-activated at any point and
will carry on from where it left off. It also keeps everything in memory and events and callbacks
from other Scenes may still invoke changes within it, so be careful what is left active.


longname: Phaser.Scenes.Systems-getData
since: 3.22.0
name: getData
memberof: Phaser.Scenes.Systems
scope: instance
returnstype: any
metafilename: Systems.js
metapath: scene
description:
Returns any data that was sent to this Scene by another Scene.

The data is also passed to `Scene.init` and in various Scene events, but
you can access it at any point via this method.


longname: Phaser.Scenes.Systems-setVisible
since: 3.0.0
name: setVisible
memberof: Phaser.Scenes.Systems
scope: instance
signature: value:boolean
returnstype: Phaser.Scenes.Systems
returnsdescription: This Systems object.
metafilename: Systems.js
metapath: scene
description:
Sets the visible state of this Scene.
An invisible Scene will not render, but will still process updates.


longname: Phaser.Scenes.Systems-shutdown
since: 3.0.0
name: shutdown
memberof: Phaser.Scenes.Systems
scope: instance
fires: Phaser.Scenes.Events.SHUTDOWN
signature: data?:object
metafilename: Systems.js
metapath: scene
description:
Shutdown this Scene and send a shutdown event to all of its systems.
A Scene that has been shutdown will not run its update loop or render, but it does
not destroy any of its plugins or references. It is put into hibernation for later use.
If you don't ever plan to use this Scene again, then it should be destroyed instead
to free-up resources.


longname: Phaser.Scenes.Systems-destroy
since: 3.0.0
name: destroy
memberof: Phaser.Scenes.Systems
scope: instance
fires: Phaser.Scenes.Events.DESTROY
metafilename: Systems.js
metapath: scene
access: private
description:
Destroy this Scene and send a destroy event all of its systems.
A destroyed Scene cannot be restarted.
You should not call this directly, instead use `SceneManager.remove`.


longname: Phaser.Sound.BaseSound-addMarker
since: 3.0.0
name: addMarker
memberof: Phaser.Sound.BaseSound
scope: instance
signature: marker:Phaser.Types.Sound.SoundMarker
returnstype: boolean
returnsdescription: Whether the marker was added successfully.
metafilename: BaseSound.js
metapath: sound
description:
Adds a marker into the current sound. A marker is represented by name, start time, duration, and optionally config object.
This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.


longname: Phaser.Sound.BaseSound-play
since: 3.0.0
name: play
memberof: Phaser.Sound.BaseSound
scope: instance
signature: markerName?:string|Phaser.Types.Sound.SoundConfig,config?:Phaser.Types.Sound.SoundConfig
returnstype: boolean
returnsdescription: Whether the sound started playing successfully.
metafilename: BaseSound.js
metapath: sound
description:
Play this sound, or a marked section of it.
It always plays the sound from the start. If you want to start playback from a specific time
you can set 'seek' setting of the config object, provided to this call, to that value.


longname: Phaser.Sound.BaseSoundManager-addAudioSprite
since: 3.0.0
name: addAudioSprite
memberof: Phaser.Sound.BaseSoundManager
scope: instance
signature: key:string,config?:Phaser.Types.Sound.SoundConfig
returnstype: Phaser.Sound.HTML5AudioSound|Phaser.Sound.WebAudioSound
returnsdescription: The new audio sprite sound instance.
metafilename: BaseSoundManager.js
metapath: sound
description:
Adds a new audio sprite sound into the sound manager.
Audio Sprites are a combination of audio files and a JSON configuration.
The JSON follows the format of that created by [https://github.com/tonistiigi/audiosprite](https://github.com/tonistiigi/audiosprite)


longname: Phaser.Sound.BaseSoundManager-play
since: 3.0.0
name: play
memberof: Phaser.Sound.BaseSoundManager
scope: instance
listens: Phaser.Sound.Events.COMPLETE
signature: key:string,extra?:Phaser.Types.Sound.SoundConfig|Phaser.Types.Sound.SoundMarker
returnstype: boolean
returnsdescription: Whether the sound started playing successfully.
metafilename: BaseSoundManager.js
metapath: sound
description:
Adds a new sound to the sound manager and plays it.
The sound will be automatically removed (destroyed) once playback ends.
This lets you play a new sound on the fly without the need to keep a reference to it.


longname: Phaser.Sound.BaseSoundManager-playAudioSprite
since: 3.0.0
name: playAudioSprite
memberof: Phaser.Sound.BaseSoundManager
scope: instance
listens: Phaser.Sound.Events.COMPLETE
signature: key:string,spriteName:string,config?:Phaser.Types.Sound.SoundConfig
returnstype: boolean
returnsdescription: Whether the audio sprite sound started playing successfully.
metafilename: BaseSoundManager.js
metapath: sound
description:
Adds a new audio sprite sound to the sound manager and plays it.
The sprite will be automatically removed (destroyed) once playback ends.
This lets you play a new sound on the fly without the need to keep a reference to it.


longname: Phaser.Sound.BaseSoundManager-removeByKey
since: 3.0.0
name: removeByKey
memberof: Phaser.Sound.BaseSoundManager
scope: instance
signature: key:string
returnstype: number
returnsdescription: The number of matching sound objects that were removed.
metafilename: BaseSoundManager.js
metapath: sound
description:
Removes all sounds from the sound manager that have an asset key matching the given value.
The removed sounds are destroyed before removal.


longname: Phaser.Sound.BaseSoundManager-unlock
since: 3.0.0
name: unlock
memberof: Phaser.Sound.BaseSoundManager
scope: instance
metafilename: BaseSoundManager.js
metapath: sound
access: protected
description:
Method used internally for unlocking audio playback on devices that
require user interaction before any sound can be played on a web page.

Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).


longname: Phaser.Sound.BaseSoundManager-onBlur
since: 3.0.0
name: onBlur
memberof: Phaser.Sound.BaseSoundManager
scope: instance
metafilename: BaseSoundManager.js
metapath: sound
access: protected
description:
Method used internally for pausing sound manager if
Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.


longname: Phaser.Sound.BaseSoundManager-onFocus
since: 3.0.0
name: onFocus
memberof: Phaser.Sound.BaseSoundManager
scope: instance
metafilename: BaseSoundManager.js
metapath: sound
access: protected
description:
Method used internally for resuming sound manager if
Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.


longname: Phaser.Sound.BaseSoundManager-update
since: 3.0.0
name: update
memberof: Phaser.Sound.BaseSoundManager
scope: instance
fires: Phaser.Sound.Events.UNLOCKED
signature: time:number,delta:number
metafilename: BaseSoundManager.js
metapath: sound
access: protected
description:
Update method called on every game step.
Removes destroyed sounds and updates every active sound in the game.


longname: Phaser.Sound.BaseSoundManager-forEachActiveSound
since: 3.0.0
name: forEachActiveSound
memberof: Phaser.Sound.BaseSoundManager
scope: instance
signature: callback:Phaser.Types.Sound.EachActiveSoundCallback,scope?:*
metafilename: BaseSoundManager.js
metapath: sound
access: private
description:
Method used internally for iterating only over active sounds and skipping sounds that are marked for removal.


longname: Phaser.Sound.BaseSoundManager-setRate
since: 3.3.0
name: setRate
memberof: Phaser.Sound.BaseSoundManager
scope: instance
fires: Phaser.Sound.Events.GLOBAL_RATE
signature: value:number
returnstype: Phaser.Sound.BaseSoundManager
returnsdescription: This Sound Manager.
metafilename: BaseSoundManager.js
metapath: sound
description:
Sets the global playback rate at which all the sounds will be played.

For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
and 2.0 doubles the audios playback speed.


longname: Phaser.Sound.BaseSoundManager-setDetune
since: 3.3.0
name: setDetune
memberof: Phaser.Sound.BaseSoundManager
scope: instance
fires: Phaser.Sound.Events.GLOBAL_DETUNE
signature: value:number
returnstype: Phaser.Sound.BaseSoundManager
returnsdescription: This Sound Manager.
metafilename: BaseSoundManager.js
metapath: sound
description:
Sets the global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).


longname: Phaser.Sound.HTML5AudioSound-pickAudioTag
since: 3.0.0
name: pickAudioTag
memberof: Phaser.Sound.HTML5AudioSound
scope: instance
returnstype: boolean
returnsdescription: Whether the sound was assigned an audio tag successfully.
metafilename: HTML5AudioSound.js
metapath: sound/html5
access: private
description:
This method performs the audio tag pooling logic. It first looks for
unused audio tag to assign to this sound object. If there are no unused
audio tags, based on HTML5AudioSoundManager#override property value, it
looks for sound with most advanced playback and hijacks its audio tag or
does nothing.


longname: Phaser.Sound.HTML5AudioSound-playCatchPromise
since: 3.0.0
name: playCatchPromise
memberof: Phaser.Sound.HTML5AudioSound
scope: instance
metafilename: HTML5AudioSound.js
metapath: sound/html5
access: private
description:
Method used for playing audio tag and catching possible exceptions
thrown from rejected Promise returned from play method call.


longname: Phaser.Sound.HTML5AudioSound-reset
since: 3.0.0
name: reset
memberof: Phaser.Sound.HTML5AudioSound
scope: instance
metafilename: HTML5AudioSound.js
metapath: sound/html5
access: private
description:
Method used internally to reset sound state, usually when stopping sound
or when hijacking audio tag from another sound.


longname: Phaser.Sound.HTML5AudioSoundManager-onBlur
since: 3.0.0
name: onBlur
memberof: Phaser.Sound.HTML5AudioSoundManager
scope: instance
metafilename: HTML5AudioSound.js
metapath: sound/html5
overrides: Phaser.Sound.BaseSoundManager#onBlur
access: private
description:
Method used internally by sound manager for pausing sound if
Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.


longname: Phaser.Sound.HTML5AudioSound-onFocus
since: 3.0.0
name: onFocus
memberof: Phaser.Sound.HTML5AudioSound
scope: instance
metafilename: HTML5AudioSound.js
metapath: sound/html5
access: private
description:
Method used internally by sound manager for resuming sound if
Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.


longname: Phaser.Sound.HTML5AudioSound-setRate
since: 3.3.0
name: setRate
memberof: Phaser.Sound.HTML5AudioSound
scope: instance
fires: Phaser.Sound.Events.RATE
signature: value:number
returnstype: Phaser.Sound.HTML5AudioSound
returnsdescription: This Sound instance.
metafilename: HTML5AudioSound.js
metapath: sound/html5
description:
Sets the playback rate of this Sound.

For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed
and 2.0 doubles the audios playback speed.


longname: Phaser.Sound.HTML5AudioSound-setDetune
since: 3.3.0
name: setDetune
memberof: Phaser.Sound.HTML5AudioSound
scope: instance
fires: Phaser.Sound.Events.DETUNE
signature: value:number
returnstype: Phaser.Sound.HTML5AudioSound
returnsdescription: This Sound instance.
metafilename: HTML5AudioSound.js
metapath: sound/html5
description:
Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).
The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).


longname: Phaser.Sound.HTML5AudioSound-setPan
since: 3.50.0
name: setPan
memberof: Phaser.Sound.HTML5AudioSound
scope: instance
fires: Phaser.Sound.Events.PAN
signature: value:number
returnstype: Phaser.Sound.HTML5AudioSound
returnsdescription: This Sound instance.
metafilename: HTML5AudioSound.js
metapath: sound/html5
description:
Sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).

Has no audible effect on HTML5 Audio Sound, but still generates the PAN Event.


longname: Phaser.Sound.HTML5AudioSoundManager-unlock
since: 3.0.0
name: unlock
memberof: Phaser.Sound.HTML5AudioSoundManager
scope: instance
metafilename: HTML5AudioSoundManager.js
metapath: sound/html5
overrides: Phaser.Sound.BaseSoundManager#unlock
description:
Unlocks HTML5 Audio loading and playback on mobile
devices on the initial explicit user interaction.


longname: Phaser.Sound.HTML5AudioSoundManager-onBlur
since: 3.0.0
name: onBlur
memberof: Phaser.Sound.HTML5AudioSoundManager
scope: instance
metafilename: HTML5AudioSoundManager.js
metapath: sound/html5
overrides: Phaser.Sound.BaseSoundManager#onBlur
access: protected
description:
Method used internally for pausing sound manager if
Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.


longname: Phaser.Sound.HTML5AudioSoundManager-onFocus
since: 3.0.0
name: onFocus
memberof: Phaser.Sound.HTML5AudioSoundManager
scope: instance
metafilename: HTML5AudioSoundManager.js
metapath: sound/html5
overrides: Phaser.Sound.BaseSoundManager#onFocus
access: protected
description:
Method used internally for resuming sound manager if
Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.


longname: Phaser.Sound.HTML5AudioSoundManager-isLocked
since: 3.0.0
name: isLocked
memberof: Phaser.Sound.HTML5AudioSoundManager
scope: instance
signature: sound:Phaser.Sound.HTML5AudioSound,prop:string,value?:*
returnstype: boolean
returnsdescription: Whether the sound manager is locked.
metafilename: HTML5AudioSoundManager.js
metapath: sound/html5
access: protected
description:
Method used internally by Phaser.Sound.HTML5AudioSound class methods and property setters
to check if sound manager is locked and then either perform action immediately or queue it
to be performed once the sound manager gets unlocked.


longname: Phaser.Sound.SoundManagerCreator
since: 3.0.0
name: SoundManagerCreator
memberof: Phaser.Sound
scope: static
signature: game:Phaser.Game
returnsdescription: The Sound Manager instance that was created.
metafilename: SoundManagerCreator.js
metapath: sound
description:
Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings.

Be aware of [https://developers.google.com/web/updates/2017/09/autoplay-policy-changes](https://developers.google.com/web/updates/2017/09/autoplay-policy-changes)

returnstype:
Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager|Phaser.Sound.NoAudioSoundManager


longname: Phaser.Sound.WebAudioSound-play
since: 3.0.0
name: play
memberof: Phaser.Sound.WebAudioSound
scope: instance
fires: Phaser.Sound.Events.PLAY
signature: markerName?:string|Phaser.Types.Sound.SoundConfig,config?:Phaser.Types.Sound.SoundConfig
returnstype: boolean
returnsdescription: Whether the sound started playing successfully.
metafilename: WebAudioSound.js
metapath: sound/webaudio
overrides: Phaser.Sound.BaseSound#play
description:
Play this sound, or a marked section of it.

It always plays the sound from the start. If you want to start playback from a specific time
you can set 'seek' setting of the config object, provided to this call, to that value.


longname: Phaser.Sound.WebAudioSound-setPan
since: 3.50.0
name: setPan
memberof: Phaser.Sound.WebAudioSound
scope: instance
fires: Phaser.Sound.Events.PAN
signature: value:number
returnstype: Phaser.Sound.WebAudioSound
returnsdescription: This Sound instance.
metafilename: WebAudioSound.js
metapath: sound/webaudio
description:
Sets the pan of this sound, a value between -1 (full left pan) and 1 (full right pan).

Note: iOS / Safari doesn't support the stereo panner node.


longname: Phaser.Sound.WebAudioSoundManager-createAudioContext
since: 3.0.0
name: createAudioContext
memberof: Phaser.Sound.WebAudioSoundManager
scope: instance
signature: game:Phaser.Game
returnstype: AudioContext
returnsdescription: The AudioContext instance to be used for playback.
metafilename: WebAudioSoundManager.js
metapath: sound/webaudio
description:
Method responsible for instantiating and returning AudioContext instance.
If an instance of an AudioContext class was provided through the game config,
that instance will be returned instead. This can come in handy if you are reloading
a Phaser game on a page that never properly refreshes (such as in an SPA project)
and you want to reuse already instantiated AudioContext.


longname: Phaser.Sound.WebAudioSoundManager-setAudioContext
since: 3.21.0
name: setAudioContext
memberof: Phaser.Sound.WebAudioSoundManager
scope: instance
signature: context:AudioContext
returnstype: Phaser.Sound.WebAudioSoundManager
returnsdescription: The WebAudioSoundManager instance.
metafilename: WebAudioSoundManager.js
metapath: sound/webaudio
description:
This method takes a new AudioContext reference and then sets
this Sound Manager to use that context for all playback.

As part of this call it also disconnects the master mute and volume
nodes and then re-creates them on the new given context.


longname: Phaser.Sound.WebAudioSoundManager-decodeAudio
since: 3.18.0
name: decodeAudio
memberof: Phaser.Sound.WebAudioSoundManager
scope: instance
fires: Phaser.Sound.Events.DECODED,Phaser.Sound.Events.DECODED_ALL
signature: audioKey?:Array.<Phaser.Types.Sound.DecodeAudioConfig>|string,audioData?:ArrayBuffer|string
metafilename: WebAudioSoundManager.js
metapath: sound/webaudio
description:
Decode audio data into a format ready for playback via Web Audio.

The audio data can be a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.

The `audioKey` is the key that will be used to save the decoded audio to the audio cache.

Instead of passing a single entry you can instead pass an array of `Phaser.Types.Sound.DecodeAudioConfig`
objects as the first and only argument.

Decoding is an async process, so be sure to listen for the events to know when decoding has completed.

Once the audio has decoded it can be added to the Sound Manager or played via its key.


longname: Phaser.Sound.WebAudioSoundManager-unlock
since: 3.0.0
name: unlock
memberof: Phaser.Sound.WebAudioSoundManager
scope: instance
metafilename: WebAudioSoundManager.js
metapath: sound/webaudio
overrides: Phaser.Sound.BaseSoundManager#unlock
description:
Unlocks Web Audio API on the initial input event.

Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).


longname: Phaser.Sound.WebAudioSoundManager-onBlur
since: 3.0.0
name: onBlur
memberof: Phaser.Sound.WebAudioSoundManager
scope: instance
metafilename: WebAudioSoundManager.js
metapath: sound/webaudio
overrides: Phaser.Sound.BaseSoundManager#onBlur
access: protected
description:
Method used internally for pausing sound manager if
Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.


longname: Phaser.Sound.WebAudioSoundManager-onFocus
since: 3.0.0
name: onFocus
memberof: Phaser.Sound.WebAudioSoundManager
scope: instance
metafilename: WebAudioSoundManager.js
metapath: sound/webaudio
overrides: Phaser.Sound.BaseSoundManager#onFocus
access: protected
description:
Method used internally for resuming sound manager if
Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.


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


longname: Phaser.Structs.List-getByName
since: 3.0.0
name: getByName
memberof: Phaser.Structs.List
scope: instance
signature: name:string
returnstype: *
returnsdescription: The first child with a matching name, or null if none were found.
metafilename: List.js
metapath: structs
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.Structs.List-getAll
since: 3.0.0
name: getAll
memberof: Phaser.Structs.List
scope: instance
signature: property?:string,value?:*,startIndex?:number,endIndex?:number
returnstype: Array.<*>
returnsdescription: All items of the List which match the given criterion, if any.
metafilename: List.js
metapath: structs
description:
Returns all children in this List.

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

For example: `getAll('parent')` would return only children that have a property called `parent`.

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

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

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


longname: Phaser.Structs.List-replace
since: 3.0.0
name: replace
memberof: Phaser.Structs.List
scope: instance
signature: oldChild:*,newChild:*
returnstype: *
returnsdescription: Returns the oldChild that was replaced within this group.
metafilename: List.js
metapath: structs
description:
Replaces a child of this List with the given newChild. The newChild cannot be a member of this List.


longname: Phaser.Structs.Map-set
since: 3.0.0
name: set
memberof: Phaser.Structs.Map
scope: instance
signature: key:string,value:*
returnstype: Phaser.Structs.Map
returnsdescription: This Map object.
metafilename: Map.js
metapath: structs
description:
Adds an element with a specified `key` and `value` to this Map.
If the `key` already exists, the value will be replaced.


longname: Phaser.Structs.Map-get
since: 3.0.0
name: get
memberof: Phaser.Structs.Map
description: Returns the value associated to the `key`, or `undefined` if there is none.
scope: instance
signature: key:string
returnstype: *
metafilename: Map.js
metapath: structs
returnsdescription:
The element associated with the specified key or `undefined` if the key can't be found in this Map object.


longname: Phaser.Structs.Map-each
since: 3.0.0
name: each
memberof: Phaser.Structs.Map
scope: instance
signature: callback:EachMapCallback
returnstype: Phaser.Structs.Map
returnsdescription: This Map object.
metafilename: Map.js
metapath: structs
description:
Iterates through all entries in this Map, passing each one to the given callback.

If the callback returns `false`, the iteration will break.


longname: Phaser.Structs.Map-merge
since: 3.0.0
name: merge
memberof: Phaser.Structs.Map
scope: instance
signature: map:Phaser.Structs.Map,override?:boolean
returnstype: Phaser.Structs.Map
returnsdescription: This Map object.
metafilename: Map.js
metapath: structs
description:
Merges all new keys from the given Map into this one.
If it encounters a key that already exists it will be skipped unless override is set to `true`.


longname: Phaser.Structs.ProcessQueue-add
since: 3.0.0
name: add
memberof: Phaser.Structs.ProcessQueue
scope: instance
signature: item:*
returnstype: *
returnsdescription: The item that was added.
metafilename: ProcessQueue.js
metapath: structs
description:
Adds a new item to the Process Queue.

The item is added to the pending list and made active in the next update.


longname: Phaser.Structs.ProcessQueue-remove
since: 3.0.0
name: remove
memberof: Phaser.Structs.ProcessQueue
scope: instance
signature: item:*
returnstype: *
returnsdescription: The item that was removed.
metafilename: ProcessQueue.js
metapath: structs
description:
Removes an item from the Process Queue.

The item is added to the pending destroy and fully removed in the next update.


longname: Phaser.Structs.ProcessQueue-removeAll
since: 3.20.0
name: removeAll
memberof: Phaser.Structs.ProcessQueue
scope: instance
returnstype: Phaser.Structs.ProcessQueue
returnsdescription: This Process Queue object.
metafilename: ProcessQueue.js
metapath: structs
description:
Removes all active items from this Process Queue.

All the items are marked as 'pending destroy' and fully removed in the next update.


longname: Phaser.Structs.ProcessQueue-update
since: 3.0.0
name: update
memberof: Phaser.Structs.ProcessQueue
scope: instance
returnstype: Array.<*>
returnsdescription: A list of active items.
metafilename: ProcessQueue.js
metapath: structs
description:
Update this queue. First it will process any items awaiting destruction, and remove them.

Then it will check to see if there are any items pending insertion, and move them to an
active state. Finally, it will return a list of active items for further processing.


longname: Phaser.Structs.ProcessQueue-getActive
since: 3.0.0
name: getActive
memberof: Phaser.Structs.ProcessQueue
scope: instance
returnstype: Array.<*>
returnsdescription: A list of active items.
metafilename: ProcessQueue.js
metapath: structs
description:
Returns the current list of active items.

This method returns a reference to the active list array, not a copy of it.
Therefore, be careful to not modify this array outside of the ProcessQueue.


longname: Phaser.Structs.ProcessQueue-destroy
since: 3.0.0
name: destroy
memberof: Phaser.Structs.ProcessQueue
scope: instance
metafilename: ProcessQueue.js
metapath: structs
overrides: Phaser.Events.EventEmitter#destroy
description:
Immediately destroys this process queue, clearing all of its internal arrays and resetting the process totals.


longname: Phaser.Structs.Set-set
since: 3.0.0
name: set
memberof: Phaser.Structs.Set
scope: instance
signature: value:*
returnstype: Phaser.Structs.Set
returnsdescription: This Set object.
metafilename: Set.js
metapath: structs
description:
Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect.


longname: Phaser.Structs.Set-get
since: 3.0.0
name: get
memberof: Phaser.Structs.Set
scope: instance
signature: property:string,value:*
returnstype: *
metafilename: Set.js
metapath: structs
description:
Get an element of this Set which has a property of the specified name, if that property is equal to the specified value.
If no elements of this Set satisfy the condition then this method will return `null`.

returnsdescription:
The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition.


longname: Phaser.Structs.Set-each
since: 3.0.0
name: each
memberof: Phaser.Structs.Set
scope: instance
signature: callback:EachSetCallback,callbackScope?:*
returnstype: Phaser.Structs.Set
returnsdescription: This Set object.
metafilename: Set.js
metapath: structs
description:
Passes each value in this Set to the given callback.
Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`.


longname: Phaser.Structs.Set-iterate
since: 3.0.0
name: iterate
memberof: Phaser.Structs.Set
scope: instance
signature: callback:EachSetCallback,callbackScope?:*
returnstype: Phaser.Structs.Set
returnsdescription: This Set object.
metafilename: Set.js
metapath: structs
description:
Passes each value in this Set to the given callback.
For when you absolutely know this Set won't be modified during the iteration.


longname: Phaser.Structs.Set-iterateLocal
since: 3.0.0
name: iterateLocal
memberof: Phaser.Structs.Set
scope: instance
signature: callbackKey:string,args?:*
returnstype: Phaser.Structs.Set
returnsdescription: This Set object.
metafilename: Set.js
metapath: structs
description:
Goes through each entry in this Set and invokes the given function on them, passing in the arguments.


longname: Phaser.Structs.Set-union
since: 3.0.0
name: union
memberof: Phaser.Structs.Set
scope: instance
signature: set:Phaser.Structs.Set
returnstype: Phaser.Structs.Set
returnsdescription: A new Set containing all the values in this Set and the Set provided as an argument.
metafilename: Set.js
metapath: structs
description:
Returns a new Set containing all values that are either in this Set or in the Set provided as an argument.


longname: Phaser.Structs.Set-intersect
since: 3.0.0
name: intersect
memberof: Phaser.Structs.Set
scope: instance
signature: set:Phaser.Structs.Set
returnstype: Phaser.Structs.Set
returnsdescription: The result of the intersection, as a new Set.
metafilename: Set.js
metapath: structs
description:
Returns a new Set that contains only the values which are in this Set and that are also in the given Set.


longname: Phaser.Structs.Set-difference
since: 3.0.0
name: difference
memberof: Phaser.Structs.Set
description: Returns a new Set containing all the values in this Set which are *not* also in the given Set.
scope: instance
signature: set:Phaser.Structs.Set
returnstype: Phaser.Structs.Set
metafilename: Set.js
metapath: structs
returnsdescription:
A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method.


longname: Phaser.Structs.Size-setAspectMode
since: 3.16.0
name: setAspectMode
memberof: Phaser.Structs.Size
scope: instance
signature: value?:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
Sets the aspect mode of this Size component.

The aspect mode controls what happens when you modify the `width` or `height` properties, or call `setSize`.

It can be a number from 0 to 4, or a Size constant:

0. NONE = Do not make the size fit the aspect ratio. Change the ratio when the size changes.
1. WIDTH_CONTROLS_HEIGHT = The height is automatically adjusted based on the width.
2. HEIGHT_CONTROLS_WIDTH = The width is automatically adjusted based on the height.
3. FIT = The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.
4. ENVELOP = The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.

Calling this method automatically recalculates the `width` and the `height`, if required.


longname: Phaser.Structs.Size-setSnap
since: 3.16.0
name: setSnap
memberof: Phaser.Structs.Size
scope: instance
signature: snapWidth?:number,snapHeight?:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
By setting a Snap To value when this Size component is modified its dimensions will automatically
by snapped to the nearest grid slice, using floor. For example, if you have snap value of 16,
and the width changes to 68, then it will snap down to 64 (the closest multiple of 16 when floored)

Note that snapping takes place before adjustments by the parent, or the min / max settings. If these
values are not multiples of the given snap values, then this can result in un-snapped dimensions.

Call this method with no arguments to reset the snap values.

Calling this method automatically recalculates the `width` and the `height`, if required.


longname: Phaser.Structs.Size-setParent
since: 3.16.0
name: setParent
memberof: Phaser.Structs.Size
scope: instance
signature: parent?:any
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
Sets, or clears, the parent of this Size component.

To clear the parent call this method with no arguments.

The parent influences the maximum extents to which this Size component can expand,
based on the aspect mode:

NONE - The parent clamps both the width and height.
WIDTH_CONTROLS_HEIGHT - The parent clamps just the width.
HEIGHT_CONTROLS_WIDTH - The parent clamps just the height.
FIT - The parent clamps whichever axis is required to ensure the size fits within it.
ENVELOP - The parent is used to ensure the size fully envelops the parent.

Calling this method automatically calls `setSize`.


longname: Phaser.Structs.Size-setMin
since: 3.16.0
name: setMin
memberof: Phaser.Structs.Size
scope: instance
signature: width?:number,height?:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
Set the minimum width and height values this Size component will allow.

The minimum values can never be below zero, or greater than the maximum values.

Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.

Note that based on the aspect mode, and if this Size component has a parent set or not, the minimums set here
_can_ be exceed in some situations.


longname: Phaser.Structs.Size-setMax
since: 3.16.0
name: setMax
memberof: Phaser.Structs.Size
scope: instance
signature: width?:number,height?:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
Set the maximum width and height values this Size component will allow.

Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.

Note that based on the aspect mode, and if this Size component has a parent set or not, the maximums set here
_can_ be exceed in some situations.


longname: Phaser.Structs.Size-setSize
since: 3.16.0
name: setSize
memberof: Phaser.Structs.Size
scope: instance
signature: width?:number,height?:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
Sets the width and height of this Size component based on the aspect mode.

If the aspect mode is 'none' then calling this method will change the aspect ratio, otherwise the current
aspect ratio is honored across all other modes.

If snapTo values have been set then the given width and height are snapped first, prior to any further
adjustment via min/max values, or a parent.

If minimum and/or maximum dimensions have been specified, the values given to this method will be clamped into
that range prior to adjustment, but may still exceed them depending on the aspect mode.

If this Size component has a parent set, and the aspect mode is `fit` or `envelop`, then the given sizes will
be clamped to the range specified by the parent.


longname: Phaser.Structs.Size-setAspectRatio
since: 3.16.0
name: setAspectRatio
memberof: Phaser.Structs.Size
scope: instance
signature: ratio:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
Sets a new aspect ratio, overriding what was there previously.

It then calls `setSize` immediately using the current dimensions.


longname: Phaser.Structs.Size-resize
since: 3.16.0
name: resize
memberof: Phaser.Structs.Size
scope: instance
signature: width:number,height?:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
Sets a new width and height for this Size component and updates the aspect ratio based on them.

It _doesn't_ change the `aspectMode` and still factors in size limits such as the min max and parent bounds.


longname: Phaser.Structs.Size-getNewWidth
since: 3.16.0
name: getNewWidth
memberof: Phaser.Structs.Size
scope: instance
signature: value:number,checkParent?:boolean
returnstype: number
returnsdescription: The modified width value.
metafilename: Size.js
metapath: structs
description:
Takes a new width and passes it through the min/max clamp and then checks it doesn't exceed the parent width.


longname: Phaser.Structs.Size-getNewHeight
since: 3.16.0
name: getNewHeight
memberof: Phaser.Structs.Size
scope: instance
signature: value:number,checkParent?:boolean
returnstype: number
returnsdescription: The modified height value.
metafilename: Size.js
metapath: structs
description:
Takes a new height and passes it through the min/max clamp and then checks it doesn't exceed the parent height.


longname: Phaser.Structs.Size-constrain
since: 3.16.0
name: constrain
memberof: Phaser.Structs.Size
scope: instance
signature: width?:number,height?:number,fit?:boolean
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.

If `fit` is true there may be some space inside the target area which is not covered if its aspect ratio differs.
If `fit` is false the size may extend further out than the target area if the aspect ratios differ.

If this Size component has a parent set, then the width and height passed to this method will be clamped so
it cannot exceed that of the parent.


longname: Phaser.Structs.Size-fitTo
since: 3.16.0
name: fitTo
memberof: Phaser.Structs.Size
scope: instance
signature: width?:number,height?:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.

There may be some space inside the target area which is not covered if its aspect ratio differs.

If this Size component has a parent set, then the width and height passed to this method will be clamped so
it cannot exceed that of the parent.


longname: Phaser.Structs.Size-envelop
since: 3.16.0
name: envelop
memberof: Phaser.Structs.Size
scope: instance
signature: width?:number,height?:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
The current `width` and `height` are adjusted so that they fully envelope the given dimensions, while keeping the aspect ratio.

The size may extend further out than the target area if the aspect ratios differ.

If this Size component has a parent set, then the values are clamped so that it never exceeds the parent
on the longest axis.


longname: Phaser.Structs.Size-setWidth
since: 3.16.0
name: setWidth
memberof: Phaser.Structs.Size
scope: instance
signature: width:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
Sets the width of this Size component.

Depending on the aspect mode, changing the width may also update the height and aspect ratio.


longname: Phaser.Structs.Size-setHeight
since: 3.16.0
name: setHeight
memberof: Phaser.Structs.Size
scope: instance
signature: height:number
returnstype: Phaser.Structs.Size
returnsdescription: This Size component instance.
metafilename: Size.js
metapath: structs
description:
Sets the height of this Size component.

Depending on the aspect mode, changing the height may also update the width and aspect ratio.


longname: Phaser.Structs.Size-setCSS
since: 3.17.0
name: setCSS
memberof: Phaser.Structs.Size
scope: instance
signature: element:HTMLElement
metafilename: Size.js
metapath: structs
description:
Sets the values of this Size component to the `element.style.width` and `height`
properties of the given DOM Element. The properties are set as `px` values.


longname: Phaser.Structs.Size-copy
since: 3.16.0
name: copy
memberof: Phaser.Structs.Size
scope: instance
signature: destination:Phaser.Structs.Size
returnstype: Phaser.Structs.Size
returnsdescription: The updated destination Size component.
metafilename: Size.js
metapath: structs
description:
Copies the aspect mode, aspect ratio, width and height from this Size component
to the given Size component. Note that the parent, if set, is not copied across.


longname: Phaser.Structs.Size-destroy
since: 3.16.0
name: destroy
memberof: Phaser.Structs.Size
scope: instance
metafilename: Size.js
metapath: structs
description:
Destroys this Size component.

This clears the local properties and any parent object, if set.

A destroyed Size component cannot be re-used.


longname: Phaser.Textures.CanvasTexture-update
since: 3.13.0
name: update
memberof: Phaser.Textures.CanvasTexture
scope: instance
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: This CanvasTexture.
metafilename: CanvasTexture.js
metapath: textures
description:
This re-creates the `imageData` from the current context.
It then re-builds the ArrayBuffer, the `data` Uint8ClampedArray reference and the `pixels` Int32Array.

Warning: This is a very expensive operation, so use it sparingly.


longname: Phaser.Textures.CanvasTexture-draw
since: 3.13.0
name: draw
memberof: Phaser.Textures.CanvasTexture
scope: instance
signature: x:number,y:number,source:HTMLImageElement|HTMLCanvasElement
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: This CanvasTexture.
metafilename: CanvasTexture.js
metapath: textures
description:
Draws the given Image or Canvas element to this CanvasTexture, then updates the internal
ImageData buffer and arrays.


longname: Phaser.Textures.CanvasTexture-drawFrame
since: 3.16.0
name: drawFrame
memberof: Phaser.Textures.CanvasTexture
scope: instance
signature: key:string,frame?:string|number,x?:number,y?:number
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: This CanvasTexture.
metafilename: CanvasTexture.js
metapath: textures
description:
Draws the given texture frame to this CanvasTexture, then updates the internal
ImageData buffer and arrays.


longname: Phaser.Textures.CanvasTexture-setPixel
since: 3.16.0
name: setPixel
memberof: Phaser.Textures.CanvasTexture
scope: instance
signature: x:number,y:number,red:number,green:number,blue:number,alpha?:number
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: This CanvasTexture.
metafilename: CanvasTexture.js
metapath: textures
description:
Sets a pixel in the CanvasTexture to the given color and alpha values.

This is an expensive operation to run in large quantities, so use sparingly.


longname: Phaser.Textures.CanvasTexture-putData
since: 3.16.0
name: putData
memberof: Phaser.Textures.CanvasTexture
description: Puts the ImageData into the context of this CanvasTexture at the given coordinates.
scope: instance
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: This CanvasTexture.
metafilename: CanvasTexture.js
metapath: textures
signature:
imageData:ImageData,x:number,y:number,dirtyX?:number,dirtyY?:number,dirtyWidth?:number,dirtyHeight?:number


longname: Phaser.Textures.CanvasTexture-getData
since: 3.16.0
name: getData
memberof: Phaser.Textures.CanvasTexture
scope: instance
signature: x:number,y:number,width:number,height:number
returnstype: ImageData
returnsdescription: The ImageData extracted from this CanvasTexture.
metafilename: CanvasTexture.js
metapath: textures
description:
Gets an ImageData region from this CanvasTexture from the position and size specified.
You can write this back using `CanvasTexture.putData`, or manipulate it.


longname: Phaser.Textures.CanvasTexture-getPixel
since: 3.13.0
name: getPixel
memberof: Phaser.Textures.CanvasTexture
scope: instance
signature: x:number,y:number,out?:Phaser.Display.Color
returnstype: Phaser.Display.Color
returnsdescription: An object with the red, green, blue and alpha values set in the r, g, b and a properties.
metafilename: CanvasTexture.js
metapath: textures
description:
Get the color of a specific pixel from this texture and store it in a Color object.

If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,
otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.


longname: Phaser.Textures.CanvasTexture-getPixels
since: 3.16.0
name: getPixels
memberof: Phaser.Textures.CanvasTexture
scope: instance
signature: x?:number,y?:number,width?:number,height?:number
returnstype: Array.<Array.<Phaser.Types.Textures.PixelConfig>>
returnsdescription: A 2d array of Pixel objects.
metafilename: CanvasTexture.js
metapath: textures
description:
Returns an array containing all of the pixels in the given region.

If the requested region extends outside the bounds of this CanvasTexture,
the region is truncated to fit.

If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,
otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.


longname: Phaser.Textures.CanvasTexture-getIndex
since: 3.16.0
name: getIndex
memberof: Phaser.Textures.CanvasTexture
scope: instance
signature: x:number,y:number
returnstype: number
metafilename: CanvasTexture.js
metapath: textures
description:
Returns the Image Data index for the given pixel in this CanvasTexture.

The index can be used to read directly from the `this.data` array.

The index points to the red value in the array. The subsequent 3 indexes
point to green, blue and alpha respectively.


longname: Phaser.Textures.CanvasTexture-refresh
since: 3.7.0
name: refresh
memberof: Phaser.Textures.CanvasTexture
scope: instance
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: This CanvasTexture.
metafilename: CanvasTexture.js
metapath: textures
description:
This should be called manually if you are running under WebGL.
It will refresh the WebGLTexture from the Canvas source. Only call this if you know that the
canvas has changed, as there is a significant GPU texture allocation cost involved in doing so.


longname: Phaser.Textures.CanvasTexture-clear
since: 3.7.0
name: clear
memberof: Phaser.Textures.CanvasTexture
scope: instance
signature: x?:number,y?:number,width?:number,height?:number
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: The Canvas Texture.
metafilename: CanvasTexture.js
metapath: textures
description:
Clears the given region of this Canvas Texture, resetting it back to transparent.
If no region is given, the whole Canvas Texture is cleared.


longname: Phaser.Textures.Frame-setSize
since: 3.7.0
name: setSize
memberof: Phaser.Textures.Frame
scope: instance
signature: width:number,height:number,x?:number,y?:number
returnstype: Phaser.Textures.Frame
returnsdescription: This Frame object.
metafilename: Frame.js
metapath: textures
description:
Sets the width, height, x and y of this Frame.

This is called automatically by the constructor
and should rarely be changed on-the-fly.


longname: Phaser.Textures.Frame-setCropUVs
since: 3.11.0
name: setCropUVs
memberof: Phaser.Textures.Frame
scope: instance
signature: crop:object,x:number,y:number,width:number,height:number,flipX:boolean,flipY:boolean
returnstype: object
returnsdescription: The updated crop data object.
metafilename: Frame.js
metapath: textures
description:
Takes a crop data object and, based on the rectangular region given, calculates the
required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.

This is called directly by the Game Object Texture Components `setCrop` method.
Please use that method to crop a Game Object.


longname: Phaser.Textures.Frame-updateCropUVs
since: 3.11.0
name: updateCropUVs
memberof: Phaser.Textures.Frame
scope: instance
signature: crop:object,flipX:boolean,flipY:boolean
returnstype: object
returnsdescription: The updated crop data object.
metafilename: Frame.js
metapath: textures
description:
Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.
Called automatically by `setFrame`.


longname: Phaser.Textures.Frame-setUVs
since: 3.50.0
name: setUVs
memberof: Phaser.Textures.Frame
scope: instance
signature: width:number,height:number,u0:number,v0:number,u1:number,v1:number
returnstype: Phaser.Textures.Frame
returnsdescription: This Frame object.
metafilename: Frame.js
metapath: textures
description:
Directly sets the canvas and WebGL UV data for this frame.

Use this if you need to override the values that are generated automatically
when the Frame is created.


longname: Phaser.Textures.Parsers.JSONArray
since: 3.0.0
name: JSONArray
memberof: Phaser.Textures.Parsers
scope: static
signature: texture:Phaser.Textures.Texture,sourceIndex:number,json:object
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture modified by this parser.
metafilename: JSONArray.js
metapath: textures/parsers
access: private
description:
Parses a Texture Atlas JSON Array and adds the Frames to the Texture.
JSON format expected to match that defined by Texture Packer, with the frames property containing an array of Frames.


longname: Phaser.Textures.Parsers.JSONHash
since: 3.0.0
name: JSONHash
memberof: Phaser.Textures.Parsers
scope: static
signature: texture:Phaser.Textures.Texture,sourceIndex:number,json:object
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture modified by this parser.
metafilename: JSONHash.js
metapath: textures/parsers
access: private
description:
Parses a Texture Atlas JSON Hash and adds the Frames to the Texture.
JSON format expected to match that defined by Texture Packer, with the frames property containing an object of Frames.


longname: Phaser.Textures.Parsers.SpriteSheet
since: 3.0.0
name: SpriteSheet
memberof: Phaser.Textures.Parsers
scope: static
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture modified by this parser.
metafilename: SpriteSheet.js
metapath: textures/parsers
access: private
description:
Parses a Sprite Sheet and adds the Frames to the Texture.

In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact
same size and cannot be trimmed or rotated.

signature:
texture:Phaser.Textures.Texture,sourceIndex:number,x:number,y:number,width:number,height:number,config:object,config.frameWidth:number,config.frameHeight?:number,config.startFrame?:number,config.endFrame?:number,config.margin?:number,config.spacing?:number


longname: Phaser.Textures.Parsers.SpriteSheetFromAtlas
since: 3.0.0
name: SpriteSheetFromAtlas
memberof: Phaser.Textures.Parsers
scope: static
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture modified by this parser.
metafilename: SpriteSheetFromAtlas.js
metapath: textures/parsers
access: private
description:
Parses a Sprite Sheet and adds the Frames to the Texture, where the Sprite Sheet is stored as a frame within an Atlas.

In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact
same size and cannot be trimmed or rotated.

signature:
texture:Phaser.Textures.Texture,frame:Phaser.Textures.Frame,config:object,config.frameWidth:number,config.frameHeight?:number,config.startFrame?:number,config.endFrame?:number,config.margin?:number,config.spacing?:number


longname: Phaser.Textures.Parsers.UnityYAML
since: 3.0.0
name: UnityYAML
memberof: Phaser.Textures.Parsers
scope: static
signature: texture:Phaser.Textures.Texture,sourceIndex:number,yaml:object
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture modified by this parser.
metafilename: UnityYAML.js
metapath: textures/parsers
access: private
description:
Parses a Unity YAML File and creates Frames in the Texture.
For more details about Sprite Meta Data see [https://docs.unity3d.com/ScriptReference/SpriteMetaData.html](https://docs.unity3d.com/ScriptReference/SpriteMetaData.html)


longname: Phaser.Textures.Texture-add
since: 3.0.0
name: add
memberof: Phaser.Textures.Texture
scope: instance
signature: name:number|string,sourceIndex:number,x:number,y:number,width:number,height:number
returnstype: Phaser.Textures.Frame
returnsdescription: The Frame that was added to this Texture, or `null` if the given name already exists.
metafilename: Texture.js
metapath: textures
description:
Adds a new Frame to this Texture.

A Frame is a rectangular region of a TextureSource with a unique index or string-based key.

The name given must be unique within this Texture. If it already exists, this method will return `null`.


longname: Phaser.Textures.Texture-remove
since: 3.19.0
name: remove
memberof: Phaser.Textures.Texture
scope: instance
signature: name:string
returnstype: boolean
returnsdescription: True if a Frame with the matching key was removed from this Texture.
metafilename: Texture.js
metapath: textures
description:
Removes the given Frame from this Texture. The Frame is destroyed immediately.

Any Game Objects using this Frame should stop using it _before_ you remove it,
as it does not happen automatically.


longname: Phaser.Textures.Texture-get
since: 3.0.0
name: get
memberof: Phaser.Textures.Texture
scope: instance
signature: name?:string|number
returnstype: Phaser.Textures.Frame
returnsdescription: The Texture Frame.
metafilename: Texture.js
metapath: textures
description:
Gets a Frame from this Texture based on either the key or the index of the Frame.

In a Texture Atlas Frames are typically referenced by a key.
In a Sprite Sheet Frames are referenced by an index.
Passing no value for the name returns the base texture.


longname: Phaser.Textures.Texture-getTextureSourceIndex
since: 3.0.0
name: getTextureSourceIndex
memberof: Phaser.Textures.Texture
scope: instance
signature: source:Phaser.Textures.TextureSource
returnstype: number
returnsdescription: The index of the TextureSource within this Texture, or -1 if not in this Texture.
metafilename: Texture.js
metapath: textures
description:
Takes the given TextureSource and returns the index of it within this Texture.
If it's not in this Texture, it returns -1.
Unless this Texture has multiple TextureSources, such as with a multi-atlas, this
method will always return zero or -1.


longname: Phaser.Textures.Texture-getFrameNames
since: 3.0.0
name: getFrameNames
memberof: Phaser.Textures.Texture
scope: instance
signature: includeBase?:boolean
returnstype: Array.<string>
returnsdescription: An array of all Frame names in this Texture.
metafilename: Texture.js
metapath: textures
description:
Returns an array with all of the names of the Frames in this Texture.

Useful if you want to randomly assign a Frame to a Game Object, as you can
pick a random element from the returned array.


longname: Phaser.Textures.Texture-getSourceImage
since: 3.0.0
name: getSourceImage
memberof: Phaser.Textures.Texture
scope: instance
signature: name?:string|number
returnstype: HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture
returnsdescription: The DOM Image, Canvas Element or Render Texture.
metafilename: Texture.js
metapath: textures
description:
Given a Frame name, return the source image it uses to render with.

This will return the actual DOM Image or Canvas element.


longname: Phaser.Textures.Texture-getDataSourceImage
since: 3.7.0
name: getDataSourceImage
memberof: Phaser.Textures.Texture
scope: instance
signature: name?:string|number
returnstype: HTMLImageElement|HTMLCanvasElement
returnsdescription: The DOM Image or Canvas Element.
metafilename: Texture.js
metapath: textures
description:
Given a Frame name, return the data source image it uses to render with.
You can use this to get the normal map for an image for example.

This will return the actual DOM Image.


longname: Phaser.Textures.Texture-setDataSource
since: 3.0.0
name: setDataSource
memberof: Phaser.Textures.Texture
scope: instance
signature: data:HTMLImageElement|HTMLCanvasElement|Array.<HTMLImageElement>|Array.<HTMLCanvasElement>
metafilename: Texture.js
metapath: textures
description:
Adds a data source image to this Texture.

An example of a data source image would be a normal map, where all of the Frames for this Texture
equally apply to the normal map.


longname: Phaser.Textures.Texture-setFilter
since: 3.0.0
name: setFilter
memberof: Phaser.Textures.Texture
scope: instance
signature: filterMode:Phaser.Textures.FilterMode
metafilename: Texture.js
metapath: textures
description:
Sets the Filter Mode for this Texture.

The mode can be either Linear, the default, or Nearest.

For pixel-art you should use Nearest.

The mode applies to the entire Texture, not just a specific Frame of it.


longname: Phaser.Textures.TextureManager-checkKey
since: 3.7.0
name: checkKey
memberof: Phaser.Textures.TextureManager
scope: instance
signature: key:string
returnstype: boolean
returnsdescription: `true` if it's safe to use the texture key, otherwise `false`.
metafilename: TextureManager.js
metapath: textures
description:
Checks the given texture key and throws a console.warn if the key is already in use, then returns false.
If you wish to avoid the console.warn then use `TextureManager.exists` instead.


longname: Phaser.Textures.TextureManager-remove
since: 3.7.0
name: remove
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.REMOVE
signature: key:string|Phaser.Textures.Texture
returnstype: Phaser.Textures.TextureManager
returnsdescription: The Texture Manager.
metafilename: TextureManager.js
metapath: textures
description:
Removes a Texture from the Texture Manager and destroys it. This will immediately
clear all references to it from the Texture Manager, and if it has one, destroy its
WebGLTexture. This will emit a `removetexture` event.

Note: If you have any Game Objects still using this texture they will start throwing
errors the next time they try to render. Make sure that removing the texture is the final
step when clearing down to avoid this.


longname: Phaser.Textures.TextureManager-addBase64
since: 3.0.0
name: addBase64
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.ADD,Phaser.Textures.Events.ERROR,Phaser.Textures.Events.LOAD
signature: key:string,data:*
returnstype: Phaser.Textures.TextureManager
returnsdescription: This Texture Manager instance.
metafilename: TextureManager.js
metapath: textures
description:
Adds a new Texture to the Texture Manager created from the given Base64 encoded data.

It works by creating an `Image` DOM object, then setting the `src` attribute to
the given base64 encoded data. As a result, the process is asynchronous by its nature,
so be sure to listen for the events this method dispatches before using the texture.


longname: Phaser.Textures.TextureManager-getBase64
since: 3.12.0
name: getBase64
memberof: Phaser.Textures.TextureManager
scope: instance
signature: key:string,frame?:string|number,type?:string,encoderOptions?:number
returnstype: string
returnsdescription: The base64 encoded data, or an empty string if the texture frame could not be found.
metafilename: TextureManager.js
metapath: textures
description:
Gets an existing texture frame and converts it into a base64 encoded image and returns the base64 data.

You can also provide the image type and encoder options.

This will only work with bitmap based texture frames, such as those created from Texture Atlases.
It will not work with GL Texture objects, such as Shaders, or Render Textures. For those please
see the WebGL Snapshot function instead.


longname: Phaser.Textures.TextureManager-addGLTexture
since: 3.19.0
name: addGLTexture
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.ADD
signature: key:string,glTexture:WebGLTexture,width?:number,height?:number
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Takes a WebGL Texture and creates a Phaser Texture from it, which is added to the Texture Manager using the given key.

This allows you to then use the Texture as a normal texture for texture based Game Objects like Sprites.

If the `width` and `height` arguments are omitted, but the WebGL Texture was created by Phaser's WebGL Renderer
and has `glTexture.width` and `glTexture.height` properties, these values will be used instead.

This is a WebGL only feature.


longname: Phaser.Textures.TextureManager-addRenderTexture
since: 3.12.0
name: addRenderTexture
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.ADD
signature: key:string,renderTexture:Phaser.GameObjects.RenderTexture
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Adds a Render Texture to the Texture Manager using the given key.
This allows you to then use the Render Texture as a normal texture for texture based Game Objects like Sprites.


longname: Phaser.Textures.TextureManager-generate
since: 3.0.0
name: generate
memberof: Phaser.Textures.TextureManager
scope: instance
signature: key:string,config:Phaser.Types.Create.GenerateTextureConfig
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Creates a new Texture using the given config values.

Generated textures consist of a Canvas element to which the texture data is drawn.

Generates a texture based on the given Create configuration object.

The texture is drawn using a fixed-size indexed palette of 16 colors, where the hex value in the
data cells map to a single color. For example, if the texture config looked like this:

```javascript
var star = [
  '.....828.....',
  '....72227....',
  '....82228....',
  '...7222227...',
  '2222222222222',
  '8222222222228',
  '.72222222227.',
  '..787777787..',
  '..877777778..',
  '.78778887787.',
  '.27887.78872.',
  '.787.....787.'
];

this.textures.generate('star', { data: star, pixelWidth: 4 });
```

Then it would generate a texture that is 52 x 48 pixels in size, because each cell of the data array
represents 1 pixel multiplied by the `pixelWidth` value. The cell values, such as `8`, maps to color
number 8 in the palette. If a cell contains a period character `.` then it is transparent.

The default palette is Arne16, but you can specify your own using the `palette` property.


longname: Phaser.Textures.TextureManager-createCanvas
since: 3.0.0
name: createCanvas
memberof: Phaser.Textures.TextureManager
scope: instance
signature: key:string,width?:number,height?:number
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: The Canvas Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Creates a new Texture using a blank Canvas element of the size given.

Canvas elements are automatically pooled and calling this method will
extract a free canvas from the CanvasPool, or create one if none are available.


longname: Phaser.Textures.TextureManager-addCanvas
since: 3.0.0
name: addCanvas
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.ADD
signature: key:string,source:HTMLCanvasElement,skipCache?:boolean
returnstype: Phaser.Textures.CanvasTexture
returnsdescription: The Canvas Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Creates a new Canvas Texture object from an existing Canvas element
and adds it to this Texture Manager, unless `skipCache` is true.


longname: Phaser.Textures.TextureManager-addAtlas
since: 3.0.0
name: addAtlas
memberof: Phaser.Textures.TextureManager
scope: instance
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Adds a new Texture Atlas to this Texture Manager.
It can accept either JSON Array or JSON Hash formats, as exported by Texture Packer and similar software.

signature:
key:string,source:HTMLImageElement,data:object,dataSource?:HTMLImageElement|HTMLCanvasElement|Array.<HTMLImageElement>|Array.<HTMLCanvasElement>


longname: Phaser.Textures.TextureManager-addAtlasJSONArray
since: 3.0.0
name: addAtlasJSONArray
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.ADD
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Adds a Texture Atlas to this Texture Manager.
The frame data of the atlas must be stored in an Array within the JSON.
This is known as a JSON Array in software such as Texture Packer.

signature:
key:string,source:HTMLImageElement|Array.<HTMLImageElement>,data:object|Array.<object>,dataSource?:HTMLImageElement|HTMLCanvasElement|Array.<HTMLImageElement>|Array.<HTMLCanvasElement>


longname: Phaser.Textures.TextureManager-addAtlasJSONHash
since: 3.0.0
name: addAtlasJSONHash
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.ADD
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Adds a Texture Atlas to this Texture Manager.
The frame data of the atlas must be stored in an Object within the JSON.
This is known as a JSON Hash in software such as Texture Packer.

signature:
key:string,source:HTMLImageElement,data:object,dataSource?:HTMLImageElement|HTMLCanvasElement|Array.<HTMLImageElement>|Array.<HTMLCanvasElement>


longname: Phaser.Textures.TextureManager-addUnityAtlas
since: 3.0.0
name: addUnityAtlas
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.ADD
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Adds a Unity Texture Atlas to this Texture Manager.
The data must be in the form of a Unity YAML file.


longname: Phaser.Textures.TextureManager-addSpriteSheet
since: 3.0.0
name: addSpriteSheet
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.ADD
signature: key:string,source:HTMLImageElement,config:Phaser.Types.Textures.SpriteSheetConfig
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Adds a Sprite Sheet to this Texture Manager.

In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact
same size and cannot be trimmed or rotated.


longname: Phaser.Textures.TextureManager-addSpriteSheetFromAtlas
since: 3.0.0
name: addSpriteSheetFromAtlas
memberof: Phaser.Textures.TextureManager
scope: instance
fires: Phaser.Textures.Events.ADD
signature: key:string,config:Phaser.Types.Textures.SpriteSheetFromAtlasConfig
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created, or `null` if the key is already in use.
metafilename: TextureManager.js
metapath: textures
description:
Adds a Sprite Sheet to this Texture Manager, where the Sprite Sheet exists as a Frame within a Texture Atlas.

In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact
same size and cannot be trimmed or rotated.


longname: Phaser.Textures.TextureManager-get
since: 3.0.0
name: get
memberof: Phaser.Textures.TextureManager
scope: instance
signature: key:string|Phaser.Textures.Texture
returnstype: Phaser.Textures.Texture
returnsdescription: The Texture that was created.
metafilename: TextureManager.js
metapath: textures
description:
Returns a Texture from the Texture Manager that matches the given key.

If the key is `undefined` it will return the `__DEFAULT` Texture.

If the key is an instance of a Texture, it will return the key directly.

Finally. if the key is given, but not found and not a Texture instance, it will return the `__MISSING` Texture.


longname: Phaser.Textures.TextureManager-getTextureKeys
since: 3.0.0
name: getTextureKeys
memberof: Phaser.Textures.TextureManager
scope: instance
returnstype: Array.<string>
returnsdescription: An array containing all of the Texture keys stored in this Texture Manager.
metafilename: TextureManager.js
metapath: textures
description:
Returns an array with all of the keys of all Textures in this Texture Manager.
The output array will exclude the `__DEFAULT` and `__MISSING` keys.


longname: Phaser.Textures.TextureManager-getPixel
since: 3.0.0
name: getPixel
memberof: Phaser.Textures.TextureManager
scope: instance
signature: x:number,y:number,key:string,frame?:string|number
returnstype: Phaser.Display.Color
metafilename: TextureManager.js
metapath: textures
description:
Given a Texture and an `x` and `y` coordinate this method will return a new
Color object that has been populated with the color and alpha values of the pixel
at that location in the Texture.

returnsdescription:
A Color object populated with the color values of the requested pixel,
or `null` if the coordinates were out of bounds.


longname: Phaser.Textures.TextureManager-getPixelAlpha
since: 3.10.0
name: getPixelAlpha
memberof: Phaser.Textures.TextureManager
scope: instance
signature: x:number,y:number,key:string,frame?:string|number
returnstype: number
returnsdescription: A value between 0 and 255, or `null` if the coordinates were out of bounds.
metafilename: TextureManager.js
metapath: textures
description:
Given a Texture and an `x` and `y` coordinate this method will return a value between 0 and 255
corresponding to the alpha value of the pixel at that location in the Texture. If the coordinate
is out of bounds it will return null.


longname: Phaser.Textures.TextureManager-setTexture
since: 3.0.0
name: setTexture
memberof: Phaser.Textures.TextureManager
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,key:string,frame?:string|number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: The Game Object the texture was set on.
metafilename: TextureManager.js
metapath: textures
description:
Sets the given Game Objects `texture` and `frame` properties so that it uses
the Texture and Frame specified in the `key` and `frame` arguments to this method.


longname: Phaser.Textures.TextureManager-renameTexture
since: 3.12.0
name: renameTexture
memberof: Phaser.Textures.TextureManager
scope: instance
signature: currentKey:string,newKey:string
returnstype: boolean
returnsdescription: `true` if the Texture key was successfully renamed, otherwise `false`.
metafilename: TextureManager.js
metapath: textures
description:
Changes the key being used by a Texture to the new key provided.

The old key is removed, allowing it to be re-used.

Game Objects are linked to Textures by a reference to the Texture object, so
all existing references will be retained.


longname: Phaser.Textures.TextureSource-setFilter
since: 3.0.0
name: setFilter
memberof: Phaser.Textures.TextureSource
scope: instance
signature: filterMode:Phaser.Textures.FilterMode
metafilename: TextureSource.js
metapath: textures
description:
Sets the Filter Mode for this Texture.

The mode can be either Linear, the default, or Nearest.

For pixel-art you should use Nearest.


longname: Phaser.Textures.TextureSource-update
since: 3.7.0
name: update
memberof: Phaser.Textures.TextureSource
scope: instance
metafilename: TextureSource.js
metapath: textures
description:
If this TextureSource is backed by a Canvas and is running under WebGL,
it updates the WebGLTexture using the canvas data.


longname: Phaser.Tilemaps.Components.CalculateFacesAt
since: 3.0.0
name: CalculateFacesAt
memberof: Phaser.Tilemaps.Components
scope: static
signature: tileX:number,tileY:number,layer:Phaser.Tilemaps.LayerData
metafilename: CalculateFacesAt.js
metapath: tilemaps/components
description:
Calculates interesting faces at the given tile coordinates of the specified layer. Interesting
faces are used internally for optimizing collisions against tiles. This method is mostly used
internally to optimize recalculating faces when only one tile has been changed.


longname: Phaser.Tilemaps.Components.CalculateFacesWithin
since: 3.0.0
name: CalculateFacesWithin
memberof: Phaser.Tilemaps.Components
scope: static
signature: tileX:number,tileY:number,width:number,height:number,layer:Phaser.Tilemaps.LayerData
metafilename: CalculateFacesWithin.js
metapath: tilemaps/components
description:
Calculates interesting faces within the rectangular area specified (in tile coordinates) of the
layer. Interesting faces are used internally for optimizing collisions against tiles. This method
is mostly used internally.


longname: Phaser.Tilemaps.Components.Copy
since: 3.0.0
name: Copy
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: Copy.js
metapath: tilemaps/components
description:
Copies the tiles in the source rectangular area to a new destination (all specified in tile
coordinates) within the layer. This copies all tile properties & recalculates collision
information in the destination region.

signature:
srcTileX:number,srcTileY:number,width:number,height:number,destTileX:number,destTileY:number,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.CreateFromTiles
since: 3.0.0
name: CreateFromTiles
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Array.<Phaser.GameObjects.Sprite>
returnsdescription: An array of the Sprites that were created.
metafilename: CreateFromTiles.js
metapath: tilemaps/components
description:
Creates a Sprite for every object matching the given tile indexes in the layer. You can
optionally specify if each tile will be replaced with a new tile after the Sprite has been
created. This is useful if you want to lay down special tiles in a level that are converted to
Sprites, but want to replace the tile itself with a floor tile or similar once converted.

signature:
indexes:number|Array.<number>,replacements:number|Array.<number>,spriteConfig:Phaser.Types.GameObjects.Sprite.SpriteConfig,scene:Phaser.Scene,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.CullBounds
since: 3.50.0
name: CullBounds
memberof: Phaser.Tilemaps.Components
scope: static
signature: layer:Phaser.Tilemaps.LayerData,camera:Phaser.Cameras.Scene2D.Camera
returnstype: Phaser.Geom.Rectangle
metafilename: CullBounds.js
metapath: tilemaps/components
description:
Returns the bounds in the given orthogonal layer that are within the cameras viewport.
This is used internally by the cull tiles function.

returnsdescription:
A rectangle containing the culled bounds. If you wish to retain this object, clone it, as it's recycled internally.


longname: Phaser.Tilemaps.Components.CullTiles
since: 3.50.0
name: CullTiles
memberof: Phaser.Tilemaps.Components
description: Returns the tiles in the given layer that are within the cameras viewport. This is used internally.
scope: static
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: An array of Tile objects.
metafilename: CullTiles.js
metapath: tilemaps/components
signature:
layer:Phaser.Tilemaps.LayerData,camera:Phaser.Cameras.Scene2D.Camera,outputArray?:array,renderOrder?:number


longname: Phaser.Tilemaps.Components.Fill
since: 3.0.0
name: Fill
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: Fill.js
metapath: tilemaps/components
description:
Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the
specified index. Tiles will be set to collide if the given index is a colliding index.
Collision information in the region will be recalculated.

signature:
index:number,tileX:number,tileY:number,width:number,height:number,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.FilterTiles
since: 3.0.0
name: FilterTiles
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: The filtered array of Tiles.
metafilename: FilterTiles.js
metapath: tilemaps/components
description:
For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
filter callback function. Any tiles that pass the filter test (i.e. where the callback returns
true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.

signature:
callback:function,context:object,tileX:number,tileY:number,width:number,height:number,filteringOptions:Phaser.Types.Tilemaps.FilteringOptions,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.FindByIndex
since: 3.0.0
name: FindByIndex
memberof: Phaser.Tilemaps.Components
scope: static
signature: index:number,skip:number,reverse:boolean,layer:Phaser.Tilemaps.LayerData
returnstype: Phaser.Tilemaps.Tile
returnsdescription: The first (or n skipped) tile with the matching index.
metafilename: FindByIndex.js
metapath: tilemaps/components
description:
Searches the entire map layer for the first tile matching the given index, then returns that Tile
object. If no match is found, it returns null. The search starts from the top-left tile and
continues horizontally until it hits the end of the row, then it drops down to the next column.
If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to
the top-left.


longname: Phaser.Tilemaps.Components.FindTile
since: 3.0.0
name: FindTile
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Tilemaps.Tile
returnsdescription: A Tile that matches the search, or null if no Tile found
metafilename: FindTile.js
metapath: tilemaps/components
description:
Find the first tile in the given rectangular area (in tile coordinates) of the layer that
satisfies the provided testing function. I.e. finds the first tile for which `callback` returns
true. Similar to Array.prototype.find in vanilla JS.

signature:
callback:FindTileCallback,context:object,tileX:number,tileY:number,width:number,height:number,filteringOptions:Phaser.Types.Tilemaps.FilteringOptions,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.ForEachTile
since: 3.0.0
name: ForEachTile
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: ForEachTile.js
metapath: tilemaps/components
description:
For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
callback. Similar to Array.prototype.forEach in vanilla JS.

signature:
callback:EachTileCallback,context:object,tileX:number,tileY:number,width:number,height:number,filteringOptions:Phaser.Types.Tilemaps.FilteringOptions,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.GetTileAtWorldXY
since: 3.0.0
name: GetTileAtWorldXY
memberof: Phaser.Tilemaps.Components
description: Gets a tile at the given world coordinates from the given layer.
scope: static
returnstype: Phaser.Tilemaps.Tile
returnsdescription: The tile at the given coordinates or null if no tile was found or the coordinates were invalid.
metafilename: GetTileAtWorldXY.js
metapath: tilemaps/components
signature:
worldX:number,worldY:number,nonNull:boolean,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.GetTilesWithin
since: 3.0.0
name: GetTilesWithin
memberof: Phaser.Tilemaps.Components
description: Gets the tiles in the given rectangular area (in tile coordinates) of the layer.
scope: static
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: Array of Tile objects.
metafilename: GetTilesWithin.js
metapath: tilemaps/components
signature:
tileX:number,tileY:number,width:number,height:number,filteringOptions:Phaser.Types.Tilemaps.FilteringOptions,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.GetTilesWithinShape
since: 3.0.0
name: GetTilesWithinShape
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: Array of Tile objects.
metafilename: GetTilesWithinShape.js
metapath: tilemaps/components
description:
Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,
Line, Rectangle or Triangle. The shape should be in world coordinates.

signature:
shape:Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle,filteringOptions:Phaser.Types.Tilemaps.FilteringOptions,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.GetTilesWithinWorldXY
since: 3.0.0
name: GetTilesWithinWorldXY
memberof: Phaser.Tilemaps.Components
description: Gets the tiles in the given rectangular area (in world coordinates) of the layer.
scope: static
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: Array of Tile objects.
metafilename: GetTilesWithinWorldXY.js
metapath: tilemaps/components
signature:
worldX:number,worldY:number,width:number,height:number,filteringOptions:Phaser.Types.Tilemaps.FilteringOptions,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.HasTileAt
since: 3.0.0
name: HasTileAt
memberof: Phaser.Tilemaps.Components
scope: static
signature: tileX:number,tileY:number,layer:Phaser.Tilemaps.LayerData
returnstype: boolean
returnsdescription: Returns a boolean, or null if the layer given was invalid.
metafilename: HasTileAt.js
metapath: tilemaps/components
description:
Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns
false if there is no tile or if the tile at that location has an index of -1.


longname: Phaser.Tilemaps.Components.HasTileAtWorldXY
since: 3.0.0
name: HasTileAtWorldXY
memberof: Phaser.Tilemaps.Components
scope: static
signature: worldX:number,worldY:number,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData
returnstype: boolean
returnsdescription: Returns a boolean, or null if the layer given was invalid.
metafilename: HasTileAtWorldXY.js
metapath: tilemaps/components
description:
Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns
false if there is no tile or if the tile at that location has an index of -1.


longname: Phaser.Tilemaps.Components.HexagonalCullBounds
since: 3.50.0
name: HexagonalCullBounds
memberof: Phaser.Tilemaps.Components
scope: static
signature: layer:Phaser.Tilemaps.LayerData,camera:Phaser.Cameras.Scene2D.Camera
returnstype: object
returnsdescription: An object containing the `left`, `right`, `top` and `bottom` bounds.
metafilename: HexagonalCullBounds.js
metapath: tilemaps/components
description:
Returns the bounds in the given layer that are within the camera's viewport.
This is used internally by the cull tiles function.


longname: Phaser.Tilemaps.Components.HexagonalTileToWorldXY
since: 3.50.0
name: HexagonalTileToWorldXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Math.Vector2
returnsdescription: The XY location in world coordinates.
metafilename: HexagonalTileToWorldXY.js
metapath: tilemaps/components
description:
Converts from hexagonal tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
layer's position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.

signature:
tileX:number,tileY:number,point:Phaser.Math.Vector2,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.HexagonalTileToWorldY
since: 3.50.0
name: HexagonalTileToWorldY
memberof: Phaser.Tilemaps.Components
scope: static
signature: tileY:number,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData
returnstype: number
returnsdescription: The Y location in world coordinates.
metafilename: HexagonalTileToWorldY.js
metapath: tilemaps/components
description:
Converts from hexagonal tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the
layer's position, scale and scroll.


longname: Phaser.Tilemaps.Components.HexagonalWorldToTileXY
since: 3.50.0
name: HexagonalWorldToTileXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Math.Vector2
returnsdescription: The XY location in tile units.
metafilename: HexagonalWorldToTileXY.js
metapath: tilemaps/components
description:
Converts from world XY coordinates (pixels) to hexagonal tile XY coordinates (tile units), factoring in the
layer's position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.

signature:
worldX:number,worldY:number,snapToFloor:boolean,point:Phaser.Math.Vector2,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.HexagonalWorldToTileY
since: 3.50.0
name: HexagonalWorldToTileY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: number
returnsdescription: The Y location in tile units.
metafilename: HexagonalWorldToTileY.js
metapath: tilemaps/components
description:
Converts from world Y coordinates (pixels) to hexagonal tile Y coordinates (tile units), factoring in the
layers position, scale and scroll.

signature:
worldY:number,snapToFloor:boolean,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.IsometricTileToWorldXY
since: 3.50.0
name: IsometricTileToWorldXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Math.Vector2
returnsdescription: The XY location in world coordinates.
metafilename: IsometricTileToWorldXY.js
metapath: tilemaps/components
description:
Converts from isometric tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
layer's position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.

signature:
tileX:number,tileY:number,point:Phaser.Math.Vector2,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.IsometricWorldToTileXY
since: 3.50.0
name: IsometricWorldToTileXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Math.Vector2
returnsdescription: The XY location in tile units.
metafilename: IsometricWorldToTileXY.js
metapath: tilemaps/components
description:
Converts from world XY coordinates (pixels) to isometric tile XY coordinates (tile units), factoring in the
layer's position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.

signature:
worldX:number,worldY:number,snapToFloor:boolean,point:Phaser.Math.Vector2,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.PutTileAt
since: 3.0.0
name: PutTileAt
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Tilemaps.Tile
returnsdescription: The Tile object that was created or added to this map.
metafilename: PutTileAt.js
metapath: tilemaps/components
description:
Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index
or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified
location. If you pass in an index, only the index at the specified location will be changed.
Collision information will be recalculated at the specified location.

signature:
tile:number|Phaser.Tilemaps.Tile,tileX:number,tileY:number,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.PutTileAtWorldXY
since: 3.0.0
name: PutTileAtWorldXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Tilemaps.Tile
returnsdescription: The Tile object that was created or added to this map.
metafilename: PutTileAtWorldXY.js
metapath: tilemaps/components
description:
Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either
an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the
specified location. If you pass in an index, only the index at the specified location will be
changed. Collision information will be recalculated at the specified location.

signature:
tile:number|Phaser.Tilemaps.Tile,worldX:number,worldY:number,recalculateFaces:boolean,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.PutTilesAt
since: 3.0.0
name: PutTilesAt
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: PutTilesAt.js
metapath: tilemaps/components
description:
Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified
layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,
all attributes will be copied over to the specified location. If you pass in an index, only the
index at the specified location will be changed. Collision information will be recalculated
within the region tiles were changed.

signature:
tile:Array.<number>|Array.<Array.<number>>|Array.<Phaser.Tilemaps.Tile>|Array.<Array.<Phaser.Tilemaps.Tile>>,tileX:number,tileY:number,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.Randomize
since: 3.0.0
name: Randomize
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: Randomize.js
metapath: tilemaps/components
description:
Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
specified layer. Each tile will receive a new index. If an array of indexes is passed in, then
those will be used for randomly assigning new tile indexes. If an array is not provided, the
indexes found within the region (excluding -1) will be used for randomly assigning new tile
indexes. This method only modifies tile indexes and does not change collision information.

signature:
tileX:number,tileY:number,width:number,height:number,indexes:Array.<number>,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.RemoveTileAt
since: 3.0.0
name: RemoveTileAt
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Tilemaps.Tile
returnsdescription: The Tile object that was removed.
metafilename: RemoveTileAt.js
metapath: tilemaps/components
description:
Removes the tile at the given tile coordinates in the specified layer and updates the layer's
collision information.

signature:
tileX:number,tileY:number,replaceWithNull:boolean,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.RemoveTileAtWorldXY
since: 3.0.0
name: RemoveTileAtWorldXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Tilemaps.Tile
returnsdescription: The Tile object that was removed.
metafilename: RemoveTileAtWorldXY.js
metapath: tilemaps/components
description:
Removes the tile at the given world coordinates in the specified layer and updates the layer's
collision information.

signature:
worldX:number,worldY:number,replaceWithNull:boolean,recalculateFaces:boolean,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.RenderDebug
since: 3.0.0
name: RenderDebug
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: RenderDebug.js
metapath: tilemaps/components
description:
Draws a debug representation of the layer to the given Graphics. This is helpful when you want to
get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles
are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation
wherever you want on the screen.

signature:
graphics:Phaser.GameObjects.Graphics,styleConfig:Phaser.Types.Tilemaps.DebugStyleOptions,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.ReplaceByIndex
since: 3.0.0
name: ReplaceByIndex
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: ReplaceByIndex.js
metapath: tilemaps/components
description:
Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
`findIndex` and updates their index to match `newIndex`. This only modifies the index and does
not change collision information.

signature:
findIndex:number,newIndex:number,tileX:number,tileY:number,width:number,height:number,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.SetCollision
since: 3.0.0
name: SetCollision
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: SetCollision.js
metapath: tilemaps/components
description:
Sets collision on the given tile or tiles within a layer by index. You can pass in either a
single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if
collision will be enabled (true) or disabled (false).

signature:
indexes:number|array,collides:boolean,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData,updateLayer?:boolean


longname: Phaser.Tilemaps.Components.SetCollisionBetween
since: 3.0.0
name: SetCollisionBetween
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: SetCollisionBetween.js
metapath: tilemaps/components
description:
Sets collision on a range of tiles in a layer whose index is between the specified `start` and
`stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set
collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be
enabled (true) or disabled (false).

signature:
start:number,stop:number,collides:boolean,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData,updateLayer?:boolean


longname: Phaser.Tilemaps.Components.SetCollisionByExclusion
since: 3.0.0
name: SetCollisionByExclusion
memberof: Phaser.Tilemaps.Components
scope: static
signature: indexes:Array.<number>,collides:boolean,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData
metafilename: SetCollisionByExclusion.js
metapath: tilemaps/components
description:
Sets collision on all tiles in the given layer, except for tiles that have an index specified in
the given array. The `collides` parameter controls if collision will be enabled (true) or
disabled (false). Tile indexes not currently in the layer are not affected.


longname: Phaser.Tilemaps.Components.SetCollisionByProperty
since: 3.0.0
name: SetCollisionByProperty
memberof: Phaser.Tilemaps.Components
scope: static
signature: properties:object,collides:boolean,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData
metafilename: SetCollisionByProperty.js
metapath: tilemaps/components
description:
Sets collision on the tiles within a layer by checking tile properties. If a tile has a property
that matches the given properties object, its collision flag will be set. The `collides`
parameter controls if collision will be enabled (true) or disabled (false). Passing in
`{ collides: true }` would update the collision flag on any tiles with a "collides" property that
has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can
also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a
"types" property that matches any of those values, its collision flag will be updated.


longname: Phaser.Tilemaps.Components.SetCollisionFromCollisionGroup
since: 3.0.0
name: SetCollisionFromCollisionGroup
memberof: Phaser.Tilemaps.Components
scope: static
signature: collides:boolean,recalculateFaces:boolean,layer:Phaser.Tilemaps.LayerData
metafilename: SetCollisionFromCollisionGroup.js
metapath: tilemaps/components
description:
Sets collision on the tiles within a layer by checking each tile's collision group data
(typically defined in Tiled within the tileset collision editor). If any objects are found within
a tile's collision group, the tile's colliding information will be set. The `collides` parameter
controls if collision will be enabled (true) or disabled (false).


longname: Phaser.Tilemaps.Components.SetLayerCollisionIndex
since: 3.0.0
name: SetLayerCollisionIndex
memberof: Phaser.Tilemaps.Components
scope: static
signature: tileIndex:number,collides:boolean,layer:Phaser.Tilemaps.LayerData
metafilename: SetLayerCollisionIndex.js
metapath: tilemaps/components
description:
Internally used method to keep track of the tile indexes that collide within a layer. This
updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`.


longname: Phaser.Tilemaps.Components.SetTileCollision
since: 3.0.0
name: SetTileCollision
memberof: Phaser.Tilemaps.Components
scope: static
signature: tile:Phaser.Tilemaps.Tile,collides?:boolean
metafilename: SetTileCollision.js
metapath: tilemaps/components
description:
Internally used method to set the colliding state of a tile. This does not recalculate
interesting faces.


longname: Phaser.Tilemaps.Components.SetTileIndexCallback
since: 3.0.0
name: SetTileIndexCallback
memberof: Phaser.Tilemaps.Components
scope: static
signature: indexes:number|array,callback:function,callbackContext:object,layer:Phaser.Tilemaps.LayerData
metafilename: SetTileIndexCallback.js
metapath: tilemaps/components
description:
Sets a global collision callback for the given tile index within the layer. This will affect all
tiles on this layer that have the same index. If a callback is already set for the tile index it
will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile
at a specific location on the map then see setTileLocationCallback.


longname: Phaser.Tilemaps.Components.SetTileLocationCallback
since: 3.0.0
name: SetTileLocationCallback
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: SetTileLocationCallback.js
metapath: tilemaps/components
description:
Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.
If a callback is already set for the tile index it will be replaced. Set the callback to null to
remove it.

signature:
tileX:number,tileY:number,width:number,height:number,callback:function,callbackContext:object,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.Shuffle
since: 3.0.0
name: Shuffle
memberof: Phaser.Tilemaps.Components
scope: static
signature: tileX:number,tileY:number,width:number,height:number,layer:Phaser.Tilemaps.LayerData
metafilename: Shuffle.js
metapath: tilemaps/components
description:
Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given
layer. It will only randomize the tiles in that area, so if they're all the same nothing will
appear to have changed! This method only modifies tile indexes and does not change collision
information.


longname: Phaser.Tilemaps.Components.StaggeredTileToWorldXY
since: 3.50.0
name: StaggeredTileToWorldXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Math.Vector2
returnsdescription: The XY location in world coordinates.
metafilename: StaggeredTileToWorldXY.js
metapath: tilemaps/components
description:
Converts from staggered tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
layer's position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.

signature:
tileX:number,tileY:number,point:Phaser.Math.Vector2,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.StaggeredTileToWorldY
since: 3.50.0
name: StaggeredTileToWorldY
memberof: Phaser.Tilemaps.Components
scope: static
signature: tileY:number,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData
returnstype: number
returnsdescription: The Y location in world coordinates.
metafilename: StaggeredTileToWorldY.js
metapath: tilemaps/components
description:
Converts from staggered tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the
layers position, scale and scroll.


longname: Phaser.Tilemaps.Components.StaggeredWorldToTileXY
since: 3.50.0
name: StaggeredWorldToTileXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Math.Vector2
returnsdescription: The XY location in tile units.
metafilename: StaggeredWorldToTileXY.js
metapath: tilemaps/components
description:
Converts from world XY coordinates (pixels) to staggered tile XY coordinates (tile units), factoring in the
layer's position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.

signature:
worldX:number,worldY:number,snapToFloor:boolean,point:Phaser.Math.Vector2,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.StaggeredWorldToTileY
since: 3.50.0
name: StaggeredWorldToTileY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: number
returnsdescription: The Y location in tile units.
metafilename: StaggeredWorldToTileY.js
metapath: tilemaps/components
description:
Converts from world Y coordinates (pixels) to staggered tile Y coordinates (tile units), factoring in the
layers position, scale and scroll.

signature:
worldY:number,snapToFloor:boolean,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.SwapByIndex
since: 3.0.0
name: SwapByIndex
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: SwapByIndex.js
metapath: tilemaps/components
description:
Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
`indexA` and swaps then with `indexB`. This only modifies the index and does not change collision
information.

signature:
tileA:number,tileB:number,tileX:number,tileY:number,width:number,height:number,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.TileToWorldX
since: 3.0.0
name: TileToWorldX
memberof: Phaser.Tilemaps.Components
scope: static
signature: tileX:number,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData
returnstype: number
metafilename: TileToWorldX.js
metapath: tilemaps/components
description:
Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the
layer's position, scale and scroll.


longname: Phaser.Tilemaps.Components.TileToWorldXY
since: 3.0.0
name: TileToWorldXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Math.Vector2
returnsdescription: The XY location in world coordinates.
metafilename: TileToWorldXY.js
metapath: tilemaps/components
description:
Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
layer's position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.


longname: Phaser.Tilemaps.Components.TileToWorldY
since: 3.0.0
name: TileToWorldY
memberof: Phaser.Tilemaps.Components
scope: static
signature: tileY:number,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData
returnstype: number
returnsdescription: The Y location in world coordinates.
metafilename: TileToWorldY.js
metapath: tilemaps/components
description:
Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the
layer's position, scale and scroll.


longname: Phaser.Tilemaps.Components.WeightedRandomize
since: 3.0.0
name: WeightedRandomize
memberof: Phaser.Tilemaps.Components
scope: static
metafilename: WeightedRandomize.js
metapath: tilemaps/components
description:
Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
specified layer. Each tile will receive a new index. New indexes are drawn from the given
weightedIndexes array. An example weighted array:

[
 { index: 6, weight: 4 },    // Probability of index 6 is 4 / 8
 { index: 7, weight: 2 },    // Probability of index 7 would be 2 / 8
 { index: 8, weight: 1.5 },  // Probability of index 8 would be 1.5 / 8
 { index: 26, weight: 0.5 }  // Probability of index 27 would be 0.5 / 8
]

The probability of any index being choose is (the index's weight) / (sum of all weights). This
method only modifies tile indexes and does not change collision information.

signature:
tileX:number,tileY:number,width:number,height:number,weightedIndexes:Array.<object>,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.WorldToTileX
since: 3.0.0
name: WorldToTileX
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: number
returnsdescription: The X location in tile units.
metafilename: WorldToTileX.js
metapath: tilemaps/components
description:
Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the
layer's position, scale and scroll.

signature:
worldX:number,snapToFloor:boolean,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Components.WorldToTileXY
since: 3.0.0
name: WorldToTileXY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: Phaser.Math.Vector2
returnsdescription: The XY location in tile units.
metafilename: WorldToTileXY.js
metapath: tilemaps/components
description:
Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the
layer's position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.


longname: Phaser.Tilemaps.Components.WorldToTileY
since: 3.0.0
name: WorldToTileY
memberof: Phaser.Tilemaps.Components
scope: static
returnstype: number
returnsdescription: The Y location in tile units.
metafilename: WorldToTileY.js
metapath: tilemaps/components
description:
Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the
layer's position, scale and scroll.

signature:
worldY:number,snapToFloor:boolean,camera:Phaser.Cameras.Scene2D.Camera,layer:Phaser.Tilemaps.LayerData


longname: Phaser.Tilemaps.Parsers.Parse
since: 3.0.0
name: Parse
memberof: Phaser.Tilemaps.Parsers
scope: static
returnstype: Phaser.Tilemaps.MapData
returnsdescription: The created `MapData` object.
metafilename: Parse.js
metapath: tilemaps/parsers
description:
Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format
is found, returns `null`. When loading from CSV or a 2D array, you should specify the tileWidth &
tileHeight. When parsing from a map from Tiled, the tileWidth & tileHeight will be pulled from
the map data.

signature:
name:string,mapFormat:number,data:Array.<Array.<number>>|string|object,tileWidth:number,tileHeight:number,insertNull:boolean


longname: Phaser.Tilemaps.Parsers.Tiled.ParseGID
since: 3.0.0
name: ParseGID
memberof: Phaser.Tilemaps.Parsers.Tiled
scope: static
signature: gid:number
returnstype: Phaser.Types.Tilemaps.GIDData
returnsdescription: The GID Data.
metafilename: ParseGID.js
metapath: tilemaps/parsers/tiled
description:
See Tiled documentation on tile flipping:
[http://docs.mapeditor.org/en/latest/reference/tmx-map-format/](http://docs.mapeditor.org/en/latest/reference/tmx-map-format/)


longname: Phaser.Tilemaps.Parsers.Tiled.ParseObject
since: 3.0.0
name: ParseObject
memberof: Phaser.Tilemaps.Parsers.Tiled
scope: static
signature: tiledObject:object,offsetX?:number,offsetY?:number
returnstype: object
metafilename: ParseObject.js
metapath: tilemaps/parsers/tiled
description:
Convert a Tiled object to an internal parsed object normalising and copying properties over, while applying optional x and y offsets. The parsed object will always have the properties `id`, `name`, `type`, `rotation`, `properties`, `visible`, `x`, `y`, `width` and `height`. Other properties will be added according to the object type (such as text, polyline, gid etc.)

returnsdescription:
The parsed object containing properties read from the Tiled object according to it's type with x and y values updated according to the given offsets.


longname: Phaser.Tilemaps.Parsers.Tiled.ParseWangsets
since: 3.53.0
name: ParseWangsets
memberof: Phaser.Tilemaps.Parsers.Tiled
scope: static
signature: wangsets:Array.<object>,datas:object
returnstype: object
returnsdescription: An object containing the tileset and image collection data.
metafilename: ParseWangsets.js
metapath: tilemaps/parsers/tiled
description:
Parses out the Wangset information from Tiled 1.1.5+ map data, if present.

Since a given tile can be in more than one wangset, the resulting properties
are nested. `tile.data.wangid[someWangsetName]` will return the array-based wang id in
this implementation.

Note that we're not guaranteed that there will be any 'normal' tiles if the only
thing in the tilset are wangtile definitions, so this has to be parsed separately.

See [https://doc.mapeditor.org/en/latest/manual/using-wang-tiles/](https://doc.mapeditor.org/en/latest/manual/using-wang-tiles/) for more information.


longname: Phaser.Tilemaps.ParseToTilemap
since: 3.0.0
name: ParseToTilemap
memberof: Phaser.Tilemaps
scope: static
returnstype: Phaser.Tilemaps.Tilemap
metafilename: ParseToTilemap.js
metapath: tilemaps
description:
Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When
loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from
a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map data. For
an empty map, you should specify tileWidth, tileHeight, width & height.

signature:
scene:Phaser.Scene,key?:string,tileWidth?:number,tileHeight?:number,width?:number,height?:number,data?:Array.<Array.<number>>,insertNull?:boolean


longname: Phaser.Tilemaps.Tile-containsPoint
since: 3.0.0
name: containsPoint
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: x:number,y:number
returnstype: boolean
returnsdescription: True if the coordinates are within this Tile, otherwise false.
metafilename: Tile.js
metapath: tilemaps
description:
Check if the given x and y world coordinates are within this Tile. This does not factor in
camera scroll, layer scale or layer position.


longname: Phaser.Tilemaps.Tile-copy
since: 3.0.0
name: copy
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: tile:Phaser.Tilemaps.Tile
returnstype: Phaser.Tilemaps.Tile
returnsdescription: This Tile object instance.
metafilename: Tile.js
metapath: tilemaps
description:
Copies the tile data & properties from the given tile to this tile. This copies everything
except for position and interesting faces.


longname: Phaser.Tilemaps.Tile-getCollisionGroup
since: 3.0.0
name: getCollisionGroup
memberof: Phaser.Tilemaps.Tile
scope: instance
returnstype: object
returnsdescription: The collision group for this Tile, as defined in the Tileset, or `null` if no group was defined.
metafilename: Tile.js
metapath: tilemaps
description:
The collision group for this Tile, defined within the Tileset. This returns a reference to
the collision group stored within the Tileset, so any modification of the returned object
will impact all tiles that have the same index as this tile.


longname: Phaser.Tilemaps.Tile-getTileData
since: 3.0.0
name: getTileData
memberof: Phaser.Tilemaps.Tile
scope: instance
returnstype: object
returnsdescription: The tile data for this Tile, as defined in the Tileset, or `null` if no data was defined.
metafilename: Tile.js
metapath: tilemaps
description:
The tile data for this Tile, defined within the Tileset. This typically contains Tiled
collision data, tile animations and terrain information. This returns a reference to the tile
data stored within the Tileset, so any modification of the returned object will impact all
tiles that have the same index as this tile.


longname: Phaser.Tilemaps.Tile-getLeft
since: 3.0.0
name: getLeft
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The left (x) value of this tile.
metafilename: Tile.js
metapath: tilemaps
description:
Gets the world X position of the left side of the tile, factoring in the layers position,
scale and scroll.


longname: Phaser.Tilemaps.Tile-getRight
since: 3.0.0
name: getRight
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The right (x) value of this tile.
metafilename: Tile.js
metapath: tilemaps
description:
Gets the world X position of the right side of the tile, factoring in the layer's position,
scale and scroll.


longname: Phaser.Tilemaps.Tile-getTop
since: 3.0.0
name: getTop
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The top (y) value of this tile.
metafilename: Tile.js
metapath: tilemaps
description:
Gets the world Y position of the top side of the tile, factoring in the layer's position,
scale and scroll.


longname: Phaser.Tilemaps.Tile-getBottom
since: 3.0.0
name: getBottom
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The bottom (y) value of this tile.
metafilename: Tile.js
metapath: tilemaps
description:
Gets the world Y position of the bottom side of the tile, factoring in the layer's position,
scale and scroll.


longname: Phaser.Tilemaps.Tile-getBounds
since: 3.0.0
name: getBounds
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: camera?:Phaser.Cameras.Scene2D.Camera,output?:Phaser.Geom.Rectangle
returnstype: Phaser.Geom.Rectangle|object
returnsdescription: The bounds of this Tile.
metafilename: Tile.js
metapath: tilemaps
description:
Gets the world rectangle bounding box for the tile, factoring in the layers position,
scale and scroll.


longname: Phaser.Tilemaps.Tile-getCenterX
since: 3.0.0
name: getCenterX
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The center x position of this Tile.
metafilename: Tile.js
metapath: tilemaps
description:
Gets the world X position of the center of the tile, factoring in the layer's position,
scale and scroll.


longname: Phaser.Tilemaps.Tile-getCenterY
since: 3.0.0
name: getCenterY
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The center y position of this Tile.
metafilename: Tile.js
metapath: tilemaps
description:
Gets the world Y position of the center of the tile, factoring in the layer's position,
scale and scroll.


longname: Phaser.Tilemaps.Tile-intersects
since: 3.0.0
name: intersects
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: x:number,y:number,right:number,bottom:number
returnstype: boolean
returnsdescription: `true` if the Tile intersects with the given dimensions, otherwise `false`.
metafilename: Tile.js
metapath: tilemaps
description:
Check for intersection with this tile. This does not factor in camera scroll, layer scale or
layer position.


longname: Phaser.Tilemaps.Tile-setCollisionCallback
since: 3.0.0
name: setCollisionCallback
memberof: Phaser.Tilemaps.Tile
scope: instance
signature: callback:function,context:object
returnstype: Phaser.Tilemaps.Tile
returnsdescription: This Tile object instance.
metafilename: Tile.js
metapath: tilemaps
description:
Set a callback to be called when this tile is hit by an object. The callback must true for
collision processing to take place.


longname: Phaser.Tilemaps.Tilemap-setRenderOrder
since: 3.12.0
name: setRenderOrder
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: renderOrder:number|string
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: This Tilemap object.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets the rendering (draw) order of the tiles in this map.

The default is 'right-down', meaning it will order the tiles starting from the top-left,
drawing to the right and then moving down to the next row.

The draw orders are:

0 = right-down
1 = left-down
2 = right-up
3 = left-up

Setting the render order does not change the tiles or how they are stored in the layer,
it purely impacts the order in which they are rendered.

You can provide either an integer (0 to 3), or the string version of the order.

Calling this method _after_ creating Tilemap Layers will **not** automatically
update them to use the new render order. If you call this method after creating layers, use their
own `setRenderOrder` methods to change them as needed.


longname: Phaser.Tilemaps.Tilemap-addTilesetImage
since: 3.0.0
name: addTilesetImage
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tileset
returnsdescription: Returns the Tileset object that was created or updated, or null if it failed.
metafilename: Tilemap.js
metapath: tilemaps
description:
Adds an image to the map to be used as a tileset. A single map may use multiple tilesets.
Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled
editor.

signature:
tilesetName:string,key?:string,tileWidth?:number,tileHeight?:number,tileMargin?:number,tileSpacing?:number,gid?:number


longname: Phaser.Tilemaps.Tilemap-copy
since: 3.0.0
name: copy
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Returns this, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Copies the tiles in the source rectangular area to a new destination (all specified in tile
coordinates) within the layer. This copies all tile properties & recalculates collision
information in the destination region.

If no layer specified, the map's current layer is used. This cannot be applied to StaticTilemapLayers.

signature:
srcTileX:number,srcTileY:number,width:number,height:number,destTileX:number,destTileY:number,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-createBlankLayer
since: 3.0.0
name: createBlankLayer
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.TilemapLayer
returnsdescription: Returns the new layer that was created, or `null` if it failed.
metafilename: Tilemap.js
metapath: tilemaps
description:
Creates a new and empty Tilemap Layer. The currently selected layer in the map is set to this new layer.

Prior to v3.50.0 this method was called `createBlankDynamicLayer`.

signature:
name:string,tileset:string|Array.<string>|Phaser.Tilemaps.Tileset|Array.<Phaser.Tilemaps.Tileset>,x?:number,y?:number,width?:number,height?:number,tileWidth?:number,tileHeight?:number


longname: Phaser.Tilemaps.Tilemap-createLayer
since: 3.0.0
name: createLayer
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.TilemapLayer
returnsdescription: Returns the new layer was created, or null if it failed.
metafilename: Tilemap.js
metapath: tilemaps
description:
Creates a new Tilemap Layer that renders the LayerData associated with the given
`layerID`. The currently selected layer in the map is set to this new layer.

The `layerID` is important. If you've created your map in Tiled then you can get this by
looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and
look at the layers[].name value. Either way it must match.

Prior to v3.50.0 this method was called `createDynamicLayer`.

signature:
layerID:number|string,tileset:string|Array.<string>|Phaser.Tilemaps.Tileset|Array.<Phaser.Tilemaps.Tileset>,x?:number,y?:number


longname: Phaser.Tilemaps.Tilemap-createFromObjects
since: 3.0.0
name: createFromObjects
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Array.<Phaser.GameObjects.GameObject>
metafilename: Tilemap.js
metapath: tilemaps
description:
This method will iterate through all of the objects defined in a Tiled Object Layer and then
convert the matching results into Phaser Game Objects (by default, Sprites)

Objects are matched on one of 3 criteria: The Object ID, the Object GID or the Object Name.

Within Tiled, Object IDs are unique per Object. Object GIDs, however, are shared by all objects
using the same image. Finally, Object Names are strings and the same name can be used on multiple
Objects in Tiled, they do not have to be unique.

You set the configuration parameter accordingly, based on which type of criteria you wish
to match against. For example, to convert all items on an Object Layer with a `gid` of 26:

```javascript
createFromObjects(layerName, {
  gid: 26
});
```

Or, to convert objects with the name 'bonus':

```javascript
createFromObjects(layerName, {
  name: 'bonus'
});
```

Or, to convert an object with a specific id:

```javascript
createFromObjects(layerName, {
  id: 9
});
```

You should only specify either `id`, `gid`, `name`, or none of them. Do not add more than
one criteria to your config. If you do not specify any criteria, then _all_ objects in the
Object Layer will be converted.

By default this method will convert objects into `Sprite` instances, but you can override
this by providing your own class type:

```javascript
createFromObjects(layerName, {
  gid: 26,
  classType: Coin
});
```

This will convert all Objects with a gid of 26 into your custom `Coin` class. You can pass
any class type here, but it _must_ extend `Phaser.GameObjects.GameObject` as its base class.
Your class will always be passed 1 parameter: `scene`, which is a reference to either the Scene
specified in the config object or, if not given, the Scene to which this Tilemap belongs.

All properties from object are copied into the Game Object, so you can use this as an easy
way to configure properties from within the map editor. For example giving an object a
property of `alpha: 0.5` in Tiled will be reflected in the Game Object that is created.

Custom object properties that do not exist as a Game Object property are set in the
Game Objects [data](Phaser.GameObjects.GameObject#data).

You can use set a `container` property in the config. If given, the class will be added to
the Container instance instead of the Scene.

Finally, you can provide an array of config objects, to convert multiple types of object in
a single call:

```javascript
createFromObjects(layerName, [
  {
    gid: 26,
    classType: Coin
  },
  {
    id: 9,
    classType: BossMonster
  },
  {
    name: 'lava',
    classType: LavaTile
  }
]);
```

The signature of this method changed significantly in v3.50.0. Prior to this, it did not take config objects.

signature:
objectLayerName:string,config:Phaser.Types.Tilemaps.CreateFromObjectLayerConfig|Array.<Phaser.Types.Tilemaps.CreateFromObjectLayerConfig>

returnsdescription:
An array containing the Game Objects that were created. Empty if invalid object layer, or no matching id/gid/name was found.


longname: Phaser.Tilemaps.Tilemap-createFromTiles
since: 3.0.0
name: createFromTiles
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Array.<Phaser.GameObjects.Sprite>
returnsdescription: Returns an array of Tiles, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Creates a Sprite for every object matching the given tile indexes in the layer. You can
optionally specify if each tile will be replaced with a new tile after the Sprite has been
created. This is useful if you want to lay down special tiles in a level that are converted to
Sprites, but want to replace the tile itself with a floor tile or similar once converted.

signature:
indexes:number|array,replacements:number|array,spriteConfig:Phaser.Types.GameObjects.Sprite.SpriteConfig,scene?:Phaser.Scene,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-fill
since: 3.0.0
name: fill
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Returns this, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the
specified index. Tiles will be set to collide if the given index is a colliding index.
Collision information in the region will be recalculated.

If no layer specified, the map's current layer is used.
This cannot be applied to StaticTilemapLayers.

signature:
index:number,tileX?:number,tileY?:number,width?:number,height?:number,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-filterObjects
since: 3.0.0
name: filterObjects
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: objectLayer:Phaser.Tilemaps.ObjectLayer|string,callback:TilemapFilterCallback,context?:object
returnstype: Array.<Phaser.Types.Tilemaps.TiledObject>
returnsdescription: An array of object that match the search, or null if the objectLayer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
For each object in the given object layer, run the given filter callback function. Any
objects that pass the filter test (i.e. where the callback returns true) will returned as a
new array. Similar to Array.prototype.Filter in vanilla JS.


longname: Phaser.Tilemaps.Tilemap-filterTiles
since: 3.0.0
name: filterTiles
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: Returns an array of Tiles, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
filter callback function. Any tiles that pass the filter test (i.e. where the callback returns
true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.
If no layer specified, the map's current layer is used.

signature:
callback:function,context?:object,tileX?:number,tileY?:number,width?:number,height?:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-findByIndex
since: 3.0.0
name: findByIndex
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: index:number,skip?:number,reverse?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: Phaser.Tilemaps.Tile
returnsdescription: Returns a Tiles, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Searches the entire map layer for the first tile matching the given index, then returns that Tile
object. If no match is found, it returns null. The search starts from the top-left tile and
continues horizontally until it hits the end of the row, then it drops down to the next column.
If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to
the top-left.
If no layer specified, the map's current layer is used.


longname: Phaser.Tilemaps.Tilemap-findObject
since: 3.0.0
name: findObject
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: objectLayer:Phaser.Tilemaps.ObjectLayer|string,callback:TilemapFindCallback,context?:object
returnstype: Phaser.Types.Tilemaps.TiledObject
returnsdescription: An object that matches the search, or null if no object found.
metafilename: Tilemap.js
metapath: tilemaps
description:
Find the first object in the given object layer that satisfies the provided testing function.
I.e. finds the first object for which `callback` returns true. Similar to
Array.prototype.find in vanilla JS.


longname: Phaser.Tilemaps.Tilemap-findTile
since: 3.0.0
name: findTile
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tile
returnsdescription: Returns a Tiles, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Find the first tile in the given rectangular area (in tile coordinates) of the layer that
satisfies the provided testing function. I.e. finds the first tile for which `callback` returns
true. Similar to Array.prototype.find in vanilla JS.
If no layer specified, the maps current layer is used.

signature:
callback:FindTileCallback,context?:object,tileX?:number,tileY?:number,width?:number,height?:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-forEachTile
since: 3.0.0
name: forEachTile
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Returns this, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
callback. Similar to Array.prototype.forEach in vanilla JS.

If no layer specified, the map's current layer is used.

signature:
callback:EachTileCallback,context?:object,tileX?:number,tileY?:number,width?:number,height?:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-getIndex
since: 3.0.0
name: getIndex
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: location:array,name:string
returnstype: number
returnsdescription: The index of the element in the array, or null if not found.
metafilename: Tilemap.js
metapath: tilemaps
description:
Internally used. Returns the index of the object in one of the Tilemaps arrays whose name
property matches the given `name`.


longname: Phaser.Tilemaps.Tilemap-getLayer
since: 3.0.0
name: getLayer
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: Phaser.Tilemaps.LayerData
returnsdescription: The corresponding LayerData within this.layers.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets the LayerData from `this.layers` that is associated with the given `layer`, or null if the layer is invalid.


longname: Phaser.Tilemaps.Tilemap-getObjectLayer
since: 3.0.0
name: getObjectLayer
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: name?:string
returnstype: Phaser.Tilemaps.ObjectLayer
returnsdescription: The corresponding `ObjectLayer` within `this.objects`, or null.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets the ObjectLayer from `this.objects` that has the given `name`, or null if no ObjectLayer is found with that name.


longname: Phaser.Tilemaps.Tilemap-getLayerIndex
since: 3.0.0
name: getLayerIndex
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: number
returnsdescription: The LayerData index within this.layers.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets the LayerData index of the given `layer` within this.layers, or null if an invalid
`layer` is given.


longname: Phaser.Tilemaps.Tilemap-getLayerIndexByName
since: 3.0.0
name: getLayerIndexByName
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: name:string
returnstype: number
returnsdescription: The LayerData index within this.layers.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets the index of the LayerData within this.layers that has the given `name`, or null if an
invalid `name` is given.


longname: Phaser.Tilemaps.Tilemap-getTileAt
since: 3.0.0
name: getTileAt
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: tileX:number,tileY:number,nonNull?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: Phaser.Tilemaps.Tile
returnsdescription: Returns a Tile, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets a tile at the given tile coordinates from the given layer.

If no layer is specified, the maps current layer is used.


longname: Phaser.Tilemaps.Tilemap-getTileAtWorldXY
since: 3.0.0
name: getTileAtWorldXY
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tile
returnsdescription: Returns a Tile, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets a tile at the given world coordinates from the given layer.

If no layer is specified, the maps current layer is used.

signature:
worldX:number,worldY:number,nonNull?:boolean,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-getTilesWithin
since: 3.0.0
name: getTilesWithin
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: Returns an array of Tiles, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets the tiles in the given rectangular area (in tile coordinates) of the layer.

If no layer is specified, the maps current layer is used.

signature:
tileX?:number,tileY?:number,width?:number,height?:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-getTilesWithinShape
since: 3.0.0
name: getTilesWithinShape
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: Returns an array of Tiles, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,
Line, Rectangle or Triangle. The shape should be in world coordinates.

If no layer is specified, the maps current layer is used.

signature:
shape:Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-getTilesWithinWorldXY
since: 3.0.0
name: getTilesWithinWorldXY
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: Returns an array of Tiles, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets the tiles in the given rectangular area (in world coordinates) of the layer.

If no layer is specified, the maps current layer is used.

signature:
worldX:number,worldY:number,width:number,height:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-getTilesetIndex
since: 3.0.0
name: getTilesetIndex
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: name:string
returnstype: number
returnsdescription: The Tileset index within this.tilesets.
metafilename: Tilemap.js
metapath: tilemaps
description:
Gets the index of the Tileset within this.tilesets that has the given `name`, or null if an
invalid `name` is given.


longname: Phaser.Tilemaps.Tilemap-hasTileAt
since: 3.0.0
name: hasTileAt
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: tileX:number,tileY:number,layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: boolean
returnsdescription: Returns a boolean, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns
false if there is no tile or if the tile at that location has an index of -1.

If no layer is specified, the maps current layer is used.


longname: Phaser.Tilemaps.Tilemap-hasTileAtWorldXY
since: 3.0.0
name: hasTileAtWorldXY
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: boolean
returnsdescription: Returns a boolean, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns
false if there is no tile or if the tile at that location has an index of -1.

If no layer is specified, the maps current layer is used.

signature:
worldX:number,worldY:number,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-putTileAt
since: 3.0.0
name: putTileAt
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tile
returnsdescription: Returns a Tile, or null if the layer given was invalid or the coordinates were out of bounds.
metafilename: Tilemap.js
metapath: tilemaps
description:
Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index
or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified
location. If you pass in an index, only the index at the specified location will be changed.
Collision information will be recalculated at the specified location.

If no layer is specified, the maps current layer is used.

signature:
tile:number|Phaser.Tilemaps.Tile,tileX:number,tileY:number,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-putTileAtWorldXY
since: 3.0.0
name: putTileAtWorldXY
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tile
returnsdescription: Returns a Tile, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either
an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the
specified location. If you pass in an index, only the index at the specified location will be
changed. Collision information will be recalculated at the specified location.

If no layer is specified, the maps current layer is used.

signature:
tile:number|Phaser.Tilemaps.Tile,worldX:number,worldY:number,recalculateFaces?:boolean,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-putTilesAt
since: 3.0.0
name: putTilesAt
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Returns this, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified
layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,
all attributes will be copied over to the specified location. If you pass in an index, only the
index at the specified location will be changed. Collision information will be recalculated
within the region tiles were changed.

If no layer is specified, the maps current layer is used.

signature:
tile:Array.<number>|Array.<Array.<number>>|Array.<Phaser.Tilemaps.Tile>|Array.<Array.<Phaser.Tilemaps.Tile>>,tileX:number,tileY:number,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-randomize
since: 3.0.0
name: randomize
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Returns this, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
specified layer. Each tile will receive a new index. If an array of indexes is passed in, then
those will be used for randomly assigning new tile indexes. If an array is not provided, the
indexes found within the region (excluding -1) will be used for randomly assigning new tile
indexes. This method only modifies tile indexes and does not change collision information.

If no layer is specified, the maps current layer is used.

signature:
tileX?:number,tileY?:number,width?:number,height?:number,indexes?:Array.<number>,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-calculateFacesAt
since: 3.0.0
name: calculateFacesAt
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: tileX:number,tileY:number,layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Returns this, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Calculates interesting faces at the given tile coordinates of the specified layer. Interesting
faces are used internally for optimizing collisions against tiles. This method is mostly used
internally to optimize recalculating faces when only one tile has been changed.

If no layer is specified, the maps current layer is used.


longname: Phaser.Tilemaps.Tilemap-calculateFacesWithin
since: 3.0.0
name: calculateFacesWithin
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Returns this, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Calculates interesting faces within the rectangular area specified (in tile coordinates) of the
layer. Interesting faces are used internally for optimizing collisions against tiles. This method
is mostly used internally.

If no layer is specified, the maps current layer is used.

signature:
tileX?:number,tileY?:number,width?:number,height?:number,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-removeLayer
since: 3.17.0
name: removeLayer
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Returns this, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Removes the given TilemapLayer from this Tilemap without destroying it.

If no layer is specified, the maps current layer is used.


longname: Phaser.Tilemaps.Tilemap-destroyLayer
since: 3.17.0
name: destroyLayer
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Returns this, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Destroys the given TilemapLayer and removes it from this Tilemap.

If no layer is specified, the maps current layer is used.


longname: Phaser.Tilemaps.Tilemap-removeTile
since: 3.17.0
name: removeTile
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: Returns an array of Tiles that were removed.
metafilename: Tilemap.js
metapath: tilemaps
description:
Removes the given Tile, or an array of Tiles, from the layer to which they belong,
and optionally recalculates the collision information.

signature:
tiles:Phaser.Tilemaps.Tile|Array.<Phaser.Tilemaps.Tile>,replaceIndex?:number,recalculateFaces?:boolean


longname: Phaser.Tilemaps.Tilemap-removeTileAt
since: 3.0.0
name: removeTileAt
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tile
returnsdescription: Returns the Tile that was removed, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Removes the tile at the given tile coordinates in the specified layer and updates the layers collision information.

If no layer is specified, the maps current layer is used.

signature:
tileX:number,tileY:number,replaceWithNull?:boolean,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-removeTileAtWorldXY
since: 3.0.0
name: removeTileAtWorldXY
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tile
returnsdescription: Returns a Tile, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Removes the tile at the given world coordinates in the specified layer and updates the layers collision information.

If no layer is specified, the maps current layer is used.

signature:
worldX:number,worldY:number,replaceWithNull?:boolean,recalculateFaces?:boolean,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-renderDebug
since: 3.0.0
name: renderDebug
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Draws a debug representation of the layer to the given Graphics object. This is helpful when you want to
get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles
are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation
wherever you want on the screen.

If no layer is specified, the maps current layer is used.

**Note:** This method currently only works with orthogonal tilemap layers.

signature:
graphics:Phaser.GameObjects.Graphics,styleConfig?:Phaser.Types.Tilemaps.StyleConfig,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-renderDebugFull
since: 3.17.0
name: renderDebugFull
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: graphics:Phaser.GameObjects.Graphics,styleConfig?:Phaser.Types.Tilemaps.StyleConfig
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: This Tilemap instance.
metafilename: Tilemap.js
metapath: tilemaps
description:
Draws a debug representation of all layers within this Tilemap to the given Graphics object.

This is helpful when you want to get a quick idea of which of your tiles are colliding and which
have interesting faces. The tiles are drawn starting at (0, 0) in the Graphics, allowing you to
place the debug representation wherever you want on the screen.


longname: Phaser.Tilemaps.Tilemap-replaceByIndex
since: 3.0.0
name: replaceByIndex
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
`findIndex` and updates their index to match `newIndex`. This only modifies the index and does
not change collision information.

If no layer is specified, the maps current layer is used.

signature:
findIndex:number,newIndex:number,tileX?:number,tileY?:number,width?:number,height?:number,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-setCollision
since: 3.0.0
name: setCollision
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets collision on the given tile or tiles within a layer by index. You can pass in either a
single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if
collision will be enabled (true) or disabled (false).

If no layer is specified, the maps current layer is used.

signature:
indexes:number|array,collides?:boolean,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer,updateLayer?:boolean


longname: Phaser.Tilemaps.Tilemap-setCollisionBetween
since: 3.0.0
name: setCollisionBetween
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets collision on a range of tiles in a layer whose index is between the specified `start` and
`stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set
collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be
enabled (true) or disabled (false).

If no layer is specified, the maps current layer is used.

signature:
start:number,stop:number,collides?:boolean,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-setCollisionByProperty
since: 3.0.0
name: setCollisionByProperty
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets collision on the tiles within a layer by checking tile properties. If a tile has a property
that matches the given properties object, its collision flag will be set. The `collides`
parameter controls if collision will be enabled (true) or disabled (false). Passing in
`{ collides: true }` would update the collision flag on any tiles with a "collides" property that
has a value of true. Any tile that doesn't have "collides" set to true will be ignored. You can
also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a
"types" property that matches any of those values, its collision flag will be updated.

If no layer is specified, the maps current layer is used.

signature:
properties:object,collides?:boolean,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-setCollisionByExclusion
since: 3.0.0
name: setCollisionByExclusion
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets collision on all tiles in the given layer, except for tiles that have an index specified in
the given array. The `collides` parameter controls if collision will be enabled (true) or
disabled (false). Tile indexes not currently in the layer are not affected.

If no layer is specified, the maps current layer is used.

signature:
indexes:Array.<number>,collides?:boolean,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-setCollisionFromCollisionGroup
since: 3.0.0
name: setCollisionFromCollisionGroup
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: collides?:boolean,recalculateFaces?:boolean,layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets collision on the tiles within a layer by checking each tiles collision group data
(typically defined in Tiled within the tileset collision editor). If any objects are found within
a tiles collision group, the tiles colliding information will be set. The `collides` parameter
controls if collision will be enabled (true) or disabled (false).

If no layer is specified, the maps current layer is used.


longname: Phaser.Tilemaps.Tilemap-setTileIndexCallback
since: 3.0.0
name: setTileIndexCallback
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets a global collision callback for the given tile index within the layer. This will affect all
tiles on this layer that have the same index. If a callback is already set for the tile index it
will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile
at a specific location on the map then see `setTileLocationCallback`.

If no layer is specified, the maps current layer is used.

signature:
indexes:number|Array.<number>,callback:function,callbackContext:object,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-setTileLocationCallback
since: 3.0.0
name: setTileLocationCallback
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.
If a callback is already set for the tile index it will be replaced. Set the callback to null to
remove it.

If no layer is specified, the maps current layer is used.

signature:
tileX:number,tileY:number,width:number,height:number,callback:function,callbackContext?:object,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-setBaseTileSize
since: 3.0.0
name: setBaseTileSize
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: tileWidth:number,tileHeight:number
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: This Tilemap object.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets the base tile size for the map. Note: this does not necessarily match the tileWidth and
tileHeight for all layers. This also updates the base size on all tiles across all layers.


longname: Phaser.Tilemaps.Tilemap-setLayerTileSize
since: 3.0.0
name: setLayerTileSize
memberof: Phaser.Tilemaps.Tilemap
scope: instance
signature: tileWidth:number,tileHeight:number,layer?:string|number|Phaser.Tilemaps.TilemapLayer
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: This Tilemap object.
metafilename: Tilemap.js
metapath: tilemaps
description:
Sets the tile size for a specific `layer`. Note: this does not necessarily match the maps
tileWidth and tileHeight for all layers. This will set the tile size for the layer and any
tiles the layer has.


longname: Phaser.Tilemaps.Tilemap-shuffle
since: 3.0.0
name: shuffle
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given
layer. It will only randomize the tiles in that area, so if they're all the same nothing will
appear to have changed! This method only modifies tile indexes and does not change collision
information.

If no layer is specified, the maps current layer is used.

signature:
tileX?:number,tileY?:number,width?:number,height?:number,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-swapByIndex
since: 3.0.0
name: swapByIndex
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
`indexA` and swaps then with `indexB`. This only modifies the index and does not change collision
information.

If no layer is specified, the maps current layer is used.

signature:
tileA:number,tileB:number,tileX?:number,tileY?:number,width?:number,height?:number,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-tileToWorldX
since: 3.0.0
name: tileToWorldX
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: number
returnsdescription: Returns a number, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the
layers position, scale and scroll.

If no layer is specified, the maps current layer is used.

signature:
tileX:number,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-tileToWorldY
since: 3.0.0
name: tileToWorldY
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: number
returnsdescription: Returns a number, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the
layers position, scale and scroll.

If no layer is specified, the maps current layer is used.

signature:
tileY:number,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-tileToWorldXY
since: 3.0.0
name: tileToWorldXY
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Math.Vector2
returnsdescription: Returns a Vector2, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
layers position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.

If no layer is specified, the maps current layer is used.

signature:
tileX:number,tileY:number,vec2?:Phaser.Math.Vector2,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-weightedRandomize
since: 3.0.0
name: weightedRandomize
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
returnsdescription: Return this Tilemap object, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the
specified layer. Each tile will receive a new index. New indexes are drawn from the given
weightedIndexes array. An example weighted array:

[
 { index: 6, weight: 4 },    // Probability of index 6 is 4 / 8
 { index: 7, weight: 2 },    // Probability of index 7 would be 2 / 8
 { index: 8, weight: 1.5 },  // Probability of index 8 would be 1.5 / 8
 { index: 26, weight: 0.5 }  // Probability of index 27 would be 0.5 / 8
]

The probability of any index being picked is (the indexs weight) / (sum of all weights). This
method only modifies tile indexes and does not change collision information.

If no layer is specified, the maps current layer is used.

signature:
weightedIndexes:Array.<object>,tileX?:number,tileY?:number,width?:number,height?:number,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-worldToTileX
since: 3.0.0
name: worldToTileX
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: number
returnsdescription: Returns a number, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the
layers position, scale and scroll.

If no layer is specified, the maps current layer is used.

signature:
worldX:number,snapToFloor?:boolean,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-worldToTileY
since: 3.0.0
name: worldToTileY
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: number
returnsdescription: Returns a number, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the
layers position, scale and scroll.

If no layer is specified, the maps current layer is used.

signature:
worldY:number,snapToFloor?:boolean,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-worldToTileXY
since: 3.0.0
name: worldToTileXY
memberof: Phaser.Tilemaps.Tilemap
scope: instance
returnstype: Phaser.Math.Vector2
returnsdescription: Returns a vec2, or null if the layer given was invalid.
metafilename: Tilemap.js
metapath: tilemaps
description:
Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the
layers position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.

If no layer is specified, the maps current layer is used.

signature:
worldX:number,worldY:number,snapToFloor?:boolean,vec2?:Phaser.Math.Vector2,camera?:Phaser.Cameras.Scene2D.Camera,layer?:string|number|Phaser.Tilemaps.TilemapLayer


longname: Phaser.Tilemaps.Tilemap-destroy
since: 3.0.0
name: destroy
memberof: Phaser.Tilemaps.Tilemap
scope: instance
metafilename: Tilemap.js
metapath: tilemaps
description:
Removes all layer data from this Tilemap and nulls the scene reference. This will destroy any
TilemapLayers that have been created.


longname: Phaser.GameObjects.GameObjectCreator-tilemap
since: 3.0.0
name: tilemap
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config?:Phaser.Types.Tilemaps.TilemapConfig
returnstype: Phaser.Tilemaps.Tilemap
metafilename: TilemapCreator.js
metapath: tilemaps
description:
Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.
When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing
from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map
data. For an empty map, you should specify tileWidth, tileHeight, width & height.


longname: Phaser.GameObjects.GameObjectFactory-tilemap
since: 3.0.0
name: tilemap
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
returnstype: Phaser.Tilemaps.Tilemap
metafilename: TilemapFactory.js
metapath: tilemaps
description:
Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.
When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing
from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map
data. For an empty map, you should specify tileWidth, tileHeight, width & height.

signature:
key?:string,tileWidth?:number,tileHeight?:number,width?:number,height?:number,data?:Array.<Array.<number>>,insertNull?:boolean


longname: Phaser.Tilemaps.TilemapLayer-setTilesets
since: 3.50.0
name: setTilesets
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: tileset:string|Array.<string>|Phaser.Tilemaps.Tileset|Array.<Phaser.Tilemaps.Tileset>
metafilename: TilemapLayer.js
metapath: tilemaps
access: private
description:
Populates the internal `tileset` array with the Tileset references this Layer requires for rendering.


longname: Phaser.Tilemaps.TilemapLayer-setRenderOrder
since: 3.50.0
name: setRenderOrder
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: renderOrder:number|string
returnstype: Phaser.Tilemaps.TilemapLayer
returnsdescription: This Tilemap Layer object.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Sets the rendering (draw) order of the tiles in this layer.

The default is 'right-down', meaning it will order the tiles starting from the top-left,
drawing to the right and then moving down to the next row.

The draw orders are:

0 = right-down
1 = left-down
2 = right-up
3 = left-up

Setting the render order does not change the tiles or how they are stored in the layer,
it purely impacts the order in which they are rendered.

You can provide either an integer (0 to 3), or the string version of the order.


longname: Phaser.Tilemaps.TilemapLayer-createFromTiles
since: 3.50.0
name: createFromTiles
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Array.<Phaser.GameObjects.Sprite>
returnsdescription: An array of the Sprites that were created.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Creates a Sprite for every object matching the given tile indexes in the layer. You can
optionally specify if each tile will be replaced with a new tile after the Sprite has been
created. This is useful if you want to lay down special tiles in a level that are converted to
Sprites, but want to replace the tile itself with a floor tile or similar once converted.

signature:
indexes:number|array,replacements:number|array,spriteConfig?:Phaser.Types.GameObjects.Sprite.SpriteConfig,scene?:Phaser.Scene,camera?:Phaser.Cameras.Scene2D.Camera


longname: Phaser.Tilemaps.TilemapLayer-cull
since: 3.50.0
name: cull
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: camera?:Phaser.Cameras.Scene2D.Camera
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: An array of Tile objects to render.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Returns the tiles in the given layer that are within the cameras viewport.
This is used internally during rendering.


longname: Phaser.Tilemaps.TilemapLayer-copy
since: 3.50.0
name: copy
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Phaser.Tilemaps.TilemapLayer
returnsdescription: This Tilemap Layer object.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Copies the tiles in the source rectangular area to a new destination (all specified in tile
coordinates) within the layer. This copies all tile properties & recalculates collision
information in the destination region.

signature:
srcTileX:number,srcTileY:number,width:number,height:number,destTileX:number,destTileY:number,recalculateFaces?:boolean


longname: Phaser.Tilemaps.TilemapLayer-filterTiles
since: 3.50.0
name: filterTiles
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: An array of Tile objects.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
filter callback function. Any tiles that pass the filter test (i.e. where the callback returns
true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.

signature:
callback:function,context?:object,tileX?:number,tileY?:number,width?:number,height?:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions


longname: Phaser.Tilemaps.TilemapLayer-findTile
since: 3.50.0
name: findTile
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Phaser.Tilemaps.Tile
returnsdescription: The first Tile found at the given location.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Find the first tile in the given rectangular area (in tile coordinates) of the layer that
satisfies the provided testing function. I.e. finds the first tile for which `callback` returns
true. Similar to Array.prototype.find in vanilla JS.

signature:
callback:FindTileCallback,context?:object,tileX?:number,tileY?:number,width?:number,height?:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions


longname: Phaser.Tilemaps.TilemapLayer-forEachTile
since: 3.50.0
name: forEachTile
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Phaser.Tilemaps.TilemapLayer
returnsdescription: This Tilemap Layer object.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
For each tile in the given rectangular area (in tile coordinates) of the layer, run the given
callback. Similar to Array.prototype.forEach in vanilla JS.

signature:
callback:EachTileCallback,context?:object,tileX?:number,tileY?:number,width?:number,height?:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions


longname: Phaser.Tilemaps.TilemapLayer-getTilesWithin
since: 3.50.0
name: getTilesWithin
memberof: Phaser.Tilemaps.TilemapLayer
description: Gets the tiles in the given rectangular area (in tile coordinates) of the layer.
scope: instance
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: An array of Tile objects found within the area.
metafilename: TilemapLayer.js
metapath: tilemaps
signature:
tileX?:number,tileY?:number,width?:number,height?:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions


longname: Phaser.Tilemaps.TilemapLayer-getTilesWithinShape
since: 3.50.0
name: getTilesWithinShape
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: An array of Tile objects found within the shape.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,
Line, Rectangle or Triangle. The shape should be in world coordinates.

signature:
shape:Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions,camera?:Phaser.Cameras.Scene2D.Camera


longname: Phaser.Tilemaps.TilemapLayer-getTilesWithinWorldXY
since: 3.50.0
name: getTilesWithinWorldXY
memberof: Phaser.Tilemaps.TilemapLayer
description: Gets the tiles in the given rectangular area (in world coordinates) of the layer.
scope: instance
returnstype: Array.<Phaser.Tilemaps.Tile>
returnsdescription: An array of Tile objects found within the area.
metafilename: TilemapLayer.js
metapath: tilemaps
signature:
worldX:number,worldY:number,width:number,height:number,filteringOptions?:Phaser.Types.Tilemaps.FilteringOptions,camera?:Phaser.Cameras.Scene2D.Camera


longname: Phaser.Tilemaps.TilemapLayer-putTileAtWorldXY
since: 3.50.0
name: putTileAtWorldXY
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Phaser.Tilemaps.Tile
returnsdescription: The Tile object that was inserted at the given coordinates.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either
an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the
specified location. If you pass in an index, only the index at the specified location will be
changed. Collision information will be recalculated at the specified location.

signature:
tile:number|Phaser.Tilemaps.Tile,worldX:number,worldY:number,recalculateFaces?:boolean,camera?:Phaser.Cameras.Scene2D.Camera


longname: Phaser.Tilemaps.TilemapLayer-putTilesAt
since: 3.50.0
name: putTilesAt
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Phaser.Tilemaps.TilemapLayer
returnsdescription: This Tilemap Layer object.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified
layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,
all attributes will be copied over to the specified location. If you pass in an index, only the
index at the specified location will be changed. Collision information will be recalculated
within the region tiles were changed.

signature:
tile:Array.<number>|Array.<Array.<number>>|Array.<Phaser.Tilemaps.Tile>|Array.<Array.<Phaser.Tilemaps.Tile>>,tileX:number,tileY:number,recalculateFaces?:boolean


longname: Phaser.Tilemaps.TilemapLayer-removeTileAt
since: 3.50.0
name: removeTileAt
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: tileX:number,tileY:number,replaceWithNull?:boolean,recalculateFaces?:boolean
returnstype: Phaser.Tilemaps.Tile
returnsdescription: A Tile object.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Removes the tile at the given tile coordinates in the specified layer and updates the layers
collision information.


longname: Phaser.Tilemaps.TilemapLayer-removeTileAtWorldXY
since: 3.50.0
name: removeTileAtWorldXY
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Phaser.Tilemaps.Tile
returnsdescription: The Tile object that was removed from the given location.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Removes the tile at the given world coordinates in the specified layer and updates the layers
collision information.

signature:
worldX:number,worldY:number,replaceWithNull?:boolean,recalculateFaces?:boolean,camera?:Phaser.Cameras.Scene2D.Camera


longname: Phaser.Tilemaps.TilemapLayer-setSkipCull
since: 3.50.0
name: setSkipCull
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: value?:boolean
returnstype: Phaser.Tilemaps.TilemapLayer
returnsdescription: This Tilemap Layer object.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
You can control if the Cameras should cull tiles before rendering them or not.

By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.

However, there are some instances when you may wish to disable this.


longname: Phaser.Tilemaps.TilemapLayer-setCullPadding
since: 3.50.0
name: setCullPadding
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: paddingX?:number,paddingY?:number
returnstype: Phaser.Tilemaps.TilemapLayer
returnsdescription: This Tilemap Layer object.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
When a Camera culls the tiles in this layer it does so using its view into the world, building up a
rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size
of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so
by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px
and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale)


longname: Phaser.Tilemaps.TilemapLayer-setCollisionFromCollisionGroup
since: 3.50.0
name: setCollisionFromCollisionGroup
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: collides?:boolean,recalculateFaces?:boolean
returnstype: Phaser.Tilemaps.TilemapLayer
returnsdescription: This Tilemap Layer object.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Sets collision on the tiles within a layer by checking each tiles collision group data
(typically defined in Tiled within the tileset collision editor). If any objects are found within
a tiles collision group, the tile's colliding information will be set. The `collides` parameter
controls if collision will be enabled (true) or disabled (false).


longname: Phaser.Tilemaps.TilemapLayer-tileToWorldX
since: 3.50.0
name: tileToWorldX
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: tileX:number,camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The Tile X coordinate converted to pixels.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the
layers position, scale and scroll.


longname: Phaser.Tilemaps.TilemapLayer-tileToWorldY
since: 3.50.0
name: tileToWorldY
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: tileY:number,camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The Tile Y coordinate converted to pixels.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the
layers position, scale and scroll.


longname: Phaser.Tilemaps.TilemapLayer-tileToWorldXY
since: 3.50.0
name: tileToWorldXY
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: tileX:number,tileY:number,point?:Phaser.Math.Vector2,camera?:Phaser.Cameras.Scene2D.Camera
returnstype: Phaser.Math.Vector2
returnsdescription: A Vector2 containing the world coordinates of the Tile.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the
layers position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.


longname: Phaser.Tilemaps.TilemapLayer-worldToTileX
since: 3.50.0
name: worldToTileX
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: worldX:number,snapToFloor?:boolean,camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The tile X coordinate based on the world value.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the
layers position, scale and scroll.


longname: Phaser.Tilemaps.TilemapLayer-worldToTileY
since: 3.50.0
name: worldToTileY
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
signature: worldY:number,snapToFloor?:boolean,camera?:Phaser.Cameras.Scene2D.Camera
returnstype: number
returnsdescription: The tile Y coordinate based on the world value.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the
layers position, scale and scroll.


longname: Phaser.Tilemaps.TilemapLayer-worldToTileXY
since: 3.50.0
name: worldToTileXY
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
returnstype: Phaser.Math.Vector2
returnsdescription: A Vector2 containing the tile coordinates of the world values.
metafilename: TilemapLayer.js
metapath: tilemaps
description:
Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the
layers position, scale and scroll. This will return a new Vector2 object or update the given
`point` object.

signature:
worldX:number,worldY:number,snapToFloor?:boolean,point?:Phaser.Math.Vector2,camera?:Phaser.Cameras.Scene2D.Camera


longname: Phaser.Tilemaps.TilemapLayer-renderCanvas
since: 3.50.0
name: renderCanvas
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
metafilename: TilemapLayerCanvasRenderer.js
metapath: tilemaps
access: private
signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,src:Phaser.Tilemaps.TilemapLayer,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Tilemaps.TilemapLayer-renderWebGL
since: 3.0.0
name: renderWebGL
memberof: Phaser.Tilemaps.TilemapLayer
scope: instance
metafilename: TilemapLayerWebGLRenderer.js
metapath: tilemaps
access: private
signature:
renderer:Phaser.Renderer.WebGL.WebGLRenderer,src:Phaser.Tilemaps.TilemapLayer,camera:Phaser.Cameras.Scene2D.Camera


longname: Phaser.Tilemaps.Tileset-getTileProperties
since: 3.0.0
name: getTileProperties
memberof: Phaser.Tilemaps.Tileset
scope: instance
signature: tileIndex:number
returnstype: object|undefined
metafilename: Tileset.js
metapath: tilemaps
description:
Get a tiles properties that are stored in the Tileset. Returns null if tile index is not
contained in this Tileset. This is typically defined in Tiled under the Tileset editor.


longname: Phaser.Tilemaps.Tileset-getTileData
since: 3.0.0
name: getTileData
memberof: Phaser.Tilemaps.Tileset
scope: instance
signature: tileIndex:number
returnstype: object|undefined
metafilename: Tileset.js
metapath: tilemaps
description:
Get a tile's data that is stored in the Tileset. Returns null if tile index is not contained
in this Tileset. This is typically defined in Tiled and will contain both Tileset collision
info and terrain mapping.


longname: Phaser.Tilemaps.Tileset-getTileCollisionGroup
since: 3.0.0
name: getTileCollisionGroup
memberof: Phaser.Tilemaps.Tileset
scope: instance
signature: tileIndex:number
returnstype: object
metafilename: Tileset.js
metapath: tilemaps
description:
Get a tile's collision group that is stored in the Tileset. Returns null if tile index is not
contained in this Tileset. This is typically defined within Tiled's tileset collision editor.


longname: Phaser.Tilemaps.Tileset-getTileTextureCoordinates
since: 3.0.0
name: getTileTextureCoordinates
memberof: Phaser.Tilemaps.Tileset
scope: instance
signature: tileIndex:number
returnstype: object
returnsdescription: Object in the form { x, y } representing the top-left UV coordinate within the Tileset image.
metafilename: Tileset.js
metapath: tilemaps
description:
Returns the texture coordinates (UV in pixels) in the Tileset image for the given tile index.
Returns null if tile index is not contained in this Tileset.


longname: Phaser.Time.Clock-addEvent
since: 3.0.0
name: addEvent
memberof: Phaser.Time.Clock
scope: instance
signature: config:Phaser.Time.TimerEvent|Phaser.Types.Time.TimerEventConfig
returnstype: Phaser.Time.TimerEvent
returnsdescription: The Timer Event which was created, or passed in.
metafilename: Clock.js
metapath: time
description:
Creates a Timer Event and adds it to this Clock at the start of the next frame.

You can pass in either a `TimerEventConfig` object, from with a new `TimerEvent` will
be created, or you can pass in a `TimerEvent` instance.

If passing an instance please make sure that this instance hasn't been used before.
If it has ever entered a 'completed' state then it will no longer be suitable to
run again.

Also, if the `TimerEvent` instance is being used by _another_ Clock (in another Scene)
it will still be updated by that Clock as well, so be careful when using this feature.


longname: Phaser.Time.Clock-delayedCall
since: 3.0.0
name: delayedCall
memberof: Phaser.Time.Clock
scope: instance
signature: delay:number,callback:function,args?:Array.<*>,callbackScope?:*
returnstype: Phaser.Time.TimerEvent
returnsdescription: The Timer Event which was created.
metafilename: Clock.js
metapath: time
description:
Creates a Timer Event and adds it to the Clock at the start of the frame.

This is a shortcut for [#addEvent](#addEvent) which can be shorter and is compatible with the syntax of the GreenSock Animation Platform (GSAP).


longname: Phaser.Time.Clock-removeEvent
since: 3.50.0
name: removeEvent
memberof: Phaser.Time.Clock
scope: instance
signature: events:Phaser.Time.TimerEvent|Array.<Phaser.Time.TimerEvent>
returnstype: Phaser.Time.Clock
returnsdescription: - This Clock instance.
metafilename: Clock.js
metapath: time
description:
Removes the given Timer Event, or an array of Timer Events, from this Clock.

The events are removed from all internal lists (active, pending and removal),
freeing the event up to be re-used.


longname: Phaser.Time.TimerEvent-reset
since: 3.0.0
name: reset
memberof: Phaser.Time.TimerEvent
scope: instance
signature: config:Phaser.Types.Time.TimerEventConfig
returnstype: Phaser.Time.TimerEvent
returnsdescription: This TimerEvent object.
metafilename: TimerEvent.js
metapath: time
description:
Completely reinitializes the Timer Event, regardless of its current state, according to a configuration object.


longname: Phaser.Time.TimerEvent-getRepeatCount
since: 3.0.0
name: getRepeatCount
memberof: Phaser.Time.TimerEvent
scope: instance
returnstype: number
returnsdescription: How many times the Timer Event will repeat.
metafilename: TimerEvent.js
metapath: time
description:
Returns the number of times this Timer Event will repeat before finishing.

This should not be confused with the number of times the Timer Event will fire before finishing. A return value of 0 doesn't indicate that the Timer Event has finished running - it indicates that it will not repeat after the next time it fires.


longname: Phaser.Time.TimerEvent-destroy
since: 3.0.0
name: destroy
memberof: Phaser.Time.TimerEvent
scope: instance
metafilename: TimerEvent.js
metapath: time
description:
Destroys all object references in the Timer Event, i.e. its callback, scope, and arguments.

Normally, this method is only called by the Clock when it shuts down. As such, it doesn't stop the Timer Event. If called manually, the Timer Event will still be updated by the Clock, but it won't do anything when it fires.


longname: Phaser.Tweens.Builders.GetEaseFunction
since: 3.0.0
name: GetEaseFunction
memberof: Phaser.Tweens.Builders
scope: static
signature: ease:string|function,easeParams?:Array.<number>
returnstype: function
returnsdescription: The ease function.
metafilename: GetEaseFunction.js
metapath: tweens/builders
description:
This internal function is used to return the correct ease function for a Tween.

It can take a variety of input, including an EaseMap based string, or a custom function.


longname: Phaser.Tweens.Builders.GetNewValue
since: 3.0.0
name: GetNewValue
memberof: Phaser.Tweens.Builders
scope: static
signature: source:any,key:string,defaultValue:any
returnstype: function
returnsdescription: A function which when called will return the property value from the source.
metafilename: GetNewValue.js
metapath: tweens/builders
description:
Internal function used by the Tween Builder to create a function that will return
the given value from the source.


longname: Phaser.Tweens.Builders.GetProps
since: 3.0.0
name: GetProps
memberof: Phaser.Tweens.Builders
scope: static
signature: config:Phaser.Types.Tweens.TweenBuilderConfig
returnstype: Array.<string>
returnsdescription: An array of all the properties the tween will operate on.
metafilename: GetProps.js
metapath: tweens/builders
description:
Internal function used by the Tween Builder to return an array of properties
that the Tween will be operating on. It takes a tween configuration object
and then checks that none of the `props` entries start with an underscore, or that
none of the direct properties are on the Reserved list.


longname: Phaser.Tweens.Builders.GetTargets
since: 3.0.0
name: GetTargets
memberof: Phaser.Tweens.Builders
scope: static
signature: config:object
returnstype: array
returnsdescription: An array of targets (may contain only one element), or `null` if no targets were specified.
metafilename: GetTargets.js
metapath: tweens/builders
description:
Extracts an array of targets from a Tween configuration object.

The targets will be looked for in a `targets` property. If it's a function, its return value will be used as the result.


longname: Phaser.Tweens.Builders.GetTweens
since: 3.0.0
name: GetTweens
memberof: Phaser.Tweens.Builders
scope: static
signature: config:Phaser.Types.Tweens.TimelineBuilderConfig
returnstype: Array.<Phaser.Tweens.Tween>
returnsdescription: An array of Tween instances that the Timeline will manage.
metafilename: GetTweens.js
metapath: tweens/builders
description:
Internal function used by the Timeline Builder.

It returns an array of all tweens in the given timeline config.


longname: Phaser.Tweens.Builders.GetValueOp
since: 3.0.0
name: GetValueOp
memberof: Phaser.Tweens.Builders
scope: static
signature: key:string,propertyValue:*
returnstype: function
metafilename: GetValueOp.js
metapath: tweens/builders
description:
Returns `getActive`, `getStart` and `getEnd` functions for a TweenData based on a target property and end value.

`getActive` if not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.
`getEnd` is invoked once any start delays have expired and returns what the value should tween to.
`getStart` is invoked when the tween reaches the end and needs to either repeat or yoyo, it returns the value to go back to.

If the end value is a number, it will be treated as an absolute value and the property will be tweened to it.
A string can be provided to specify a relative end value which consists of an operation
(`+=` to add to the current value, `-=` to subtract from the current value, `*=` to multiply the current
value, or `/=` to divide the current value) followed by its operand.

A function can be provided to allow greater control over the end value; it will receive the target
object being tweened, the name of the property being tweened, and the current value of the property
as its arguments.

If both the starting and the ending values need to be controlled, an object with `getStart` and `getEnd`
callbacks, which will receive the same arguments, can be provided instead. If an object with a `value`
property is provided, the property will be used as the effective value under the same rules described here.

returnsdescription:
An array of functions, `getActive`, `getStart` and `getEnd`, which return the starting and the ending value of the property based on the provided value.


longname: Phaser.Tweens.Builders.NumberTweenBuilder
since: 3.0.0
name: NumberTweenBuilder
memberof: Phaser.Tweens.Builders
description: Creates a new Number Tween.
scope: static
returnstype: Phaser.Tweens.Tween
returnsdescription: The new tween.
metafilename: NumberTweenBuilder.js
metapath: tweens/builders
signature:
parent:Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline,config:Phaser.Types.Tweens.NumberTweenBuilderConfig,defaults:Phaser.Types.Tweens.TweenConfigDefaults


longname: Phaser.Tweens.Builders.StaggerBuilder
since: 3.19.0
name: StaggerBuilder
memberof: Phaser.Tweens.Builders
scope: static
signature: value:number|Array.<number>,config?:Phaser.Types.Tweens.StaggerConfig
returnstype: function
returnsdescription: The stagger function.
metafilename: StaggerBuilder.js
metapath: tweens/builders
description:
Creates a Stagger function to be used by a Tween property.

The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.

This is only worth using if the tween has multiple targets.

The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2
over the duration specified:

```javascript
this.tweens.add({
    targets: [ ... ],
    scale: 0.2,
    ease: 'linear',
    duration: 1000,
    delay: this.tweens.stagger(100)
});
```

The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering
from the center out, using a cubic ease.

```javascript
this.tweens.add({
    targets: [ ... ],
    scale: 0.2,
    ease: 'linear',
    duration: 1000,
    delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })
});
```


longname: Phaser.Tweens.Builders.TweenBuilder
since: 3.0.0
name: TweenBuilder
memberof: Phaser.Tweens.Builders
description: Creates a new Tween.
scope: static
returnstype: Phaser.Tweens.Tween
returnsdescription: The new tween.
metafilename: TweenBuilder.js
metapath: tweens/builders
signature:
parent:Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline,config:Phaser.Types.Tweens.TweenBuilderConfig|object,defaults:Phaser.Types.Tweens.TweenConfigDefaults


longname: Phaser.Tweens.Timeline-setTimeScale
since: 3.0.0
name: setTimeScale
memberof: Phaser.Tweens.Timeline
scope: instance
signature: value:number
returnstype: Phaser.Tweens.Timeline
returnsdescription: This Timeline object.
metafilename: Timeline.js
metapath: tweens
description:
Sets the value of the time scale applied to this Timeline. A value of 1 runs in real-time.
A value of 0.5 runs 50% slower, and so on.

The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only.


longname: Phaser.Tweens.Timeline-getTimeScale
since: 3.0.0
name: getTimeScale
memberof: Phaser.Tweens.Timeline
scope: instance
returnstype: number
returnsdescription: The value of the time scale applied to this Timeline.
metafilename: Timeline.js
metapath: tweens
description:
Gets the value of the time scale applied to this Timeline. A value of 1 runs in real-time.
A value of 0.5 runs 50% slower, and so on.


longname: Phaser.Tweens.Timeline-isOffsetRelative
since: 3.0.0
name: isOffsetRelative
memberof: Phaser.Tweens.Timeline
scope: instance
signature: value:string
returnstype: boolean
returnsdescription: `true` if the value is relative, i.e " -= 1000". If `false`, the offset is absolute.
metafilename: Timeline.js
metapath: tweens
description:
Checks if the offset is a relative value rather than an absolute one.
If the value is just a number, this returns false.


longname: Phaser.Tweens.Timeline-calcDuration
since: 3.0.0
name: calcDuration
memberof: Phaser.Tweens.Timeline
scope: instance
metafilename: Timeline.js
metapath: tweens
description:
Calculates the total duration of the timeline.

Computes all tween durations and returns the full duration of the timeline.

The resulting number is stored in the timeline, not as a return value.


longname: Phaser.Tweens.Timeline-init
since: 3.0.0
name: init
memberof: Phaser.Tweens.Timeline
scope: instance
returnstype: boolean
returnsdescription: `true` if the Timeline is started. `false` if it is paused.
metafilename: Timeline.js
metapath: tweens
description:
Initializes the timeline, which means all Tweens get their init() called, and the total duration will be computed.
Returns a boolean indicating whether the timeline is auto-started or not.


longname: Phaser.Tweens.Timeline-resetTweens
since: 3.0.0
name: resetTweens
memberof: Phaser.Tweens.Timeline
scope: instance
signature: resetFromLoop:boolean
metafilename: Timeline.js
metapath: tweens
description:
Resets all of the timeline's tweens back to their initial states.
The boolean parameter indicates whether tweens that are looping should reset as well, or not.


longname: Phaser.Tweens.Timeline-update
since: 3.0.0
name: update
memberof: Phaser.Tweens.Timeline
scope: instance
fires: Phaser.Tweens.Events.TIMELINE_COMPLETE,Phaser.Tweens.Events.TIMELINE_UPDATE
signature: timestamp:number,delta:number
returnstype: boolean
returnsdescription: Returns `true` if this Timeline has finished and should be removed from the Tween Manager.
metafilename: Timeline.js
metapath: tweens
description:
Returns 'true' if this Timeline has finished and should be removed from the Tween Manager.
Otherwise, returns false.


longname: Phaser.Tweens.Timeline-stop
since: 3.0.0
name: stop
memberof: Phaser.Tweens.Timeline
scope: instance
metafilename: Timeline.js
metapath: tweens
description:
Stops the Timeline immediately, whatever stage of progress it is at and flags it for removal by the TweenManager.


longname: Phaser.Tweens.Timeline-pause
since: 3.0.0
name: pause
memberof: Phaser.Tweens.Timeline
scope: instance
fires: Phaser.Tweens.Events.TIMELINE_PAUSE
returnstype: Phaser.Tweens.Timeline
returnsdescription: This Timeline object.
metafilename: Timeline.js
metapath: tweens
description:
Pauses the Timeline, retaining its internal state.

Calling this on a Timeline that is already paused has no effect and fires no event.


longname: Phaser.Tweens.Timeline-resume
since: 3.0.0
name: resume
memberof: Phaser.Tweens.Timeline
scope: instance
fires: Phaser.Tweens.Events.TIMELINE_RESUME
returnstype: Phaser.Tweens.Timeline
returnsdescription: This Timeline object.
metafilename: Timeline.js
metapath: tweens
description:
Resumes a paused Timeline from where it was when it was paused.

Calling this on a Timeline that isn't paused has no effect and fires no event.


longname: Phaser.Tweens.Timeline-hasTarget
since: 3.0.0
name: hasTarget
memberof: Phaser.Tweens.Timeline
scope: instance
signature: target:object
returnstype: boolean
returnsdescription: `true` if there is at least a single Tween that operates on the target object, otherwise `false`.
metafilename: Timeline.js
metapath: tweens
description:
Checks if any of the Tweens in this Timeline as operating on the target object.

Returns `false` if no Tweens operate on the target object.


longname: Phaser.Tweens.Timeline-destroy
since: 3.0.0
name: destroy
memberof: Phaser.Tweens.Timeline
scope: instance
metafilename: Timeline.js
metapath: tweens
overrides: Phaser.Events.EventEmitter#destroy
description:
Stops all the Tweens in the Timeline immediately, whatever stage of progress they are at and flags
them for removal by the TweenManager.


longname: Phaser.Tweens.Tween-setTimeScale
since: 3.0.0
name: setTimeScale
memberof: Phaser.Tweens.Tween
scope: instance
signature: value:number
returnstype: Phaser.Tweens.Tween
returnsdescription: - This Tween instance.
metafilename: Tween.js
metapath: tweens/tween
description:
Set the scale the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.


longname: Phaser.Tweens.Tween-updateTo
since: 3.0.0
name: updateTo
memberof: Phaser.Tweens.Tween
scope: instance
signature: key:string,value:*,startToCurrent?:boolean
returnstype: Phaser.Tweens.Tween
returnsdescription: - This Tween instance.
metafilename: Tween.js
metapath: tweens/tween
description:
Updates the 'end' value of the given property across all matching targets.

Calling this does not adjust the duration of the tween, or the current progress.

You can optionally tell it to set the 'start' value to be the current value (before the change).


longname: Phaser.Tweens.Tween-init
since: 3.0.0
name: init
memberof: Phaser.Tweens.Tween
scope: instance
returnstype: boolean
metafilename: Tween.js
metapath: tweens/tween
description:
Called by TweenManager.preUpdate as part of its loop to check pending and active tweens.
Should not be called directly.

returnsdescription:
Returns `true` if this Tween should be moved from the pending list to the active list by the Tween Manager.


longname: Phaser.Tweens.Tween-makeActive
since: 3.19.0
name: makeActive
memberof: Phaser.Tweens.Tween
scope: instance
fires: Phaser.Tweens.Events.TWEEN_ACTIVE
metafilename: Tween.js
metapath: tweens/tween
description:
Internal method that makes this Tween active within the TweenManager
and emits the onActive event and callback.


longname: Phaser.Tweens.Tween-play
since: 3.0.0
name: play
memberof: Phaser.Tweens.Tween
scope: instance
signature: resetFromTimeline?:boolean
returnstype: Phaser.Tweens.Tween
returnsdescription: This Tween instance.
metafilename: Tween.js
metapath: tweens/tween
description:
Starts a Tween playing.

You only need to call this method if you have configured the tween to be paused on creation.

If the Tween is already playing, calling this method again will have no effect. If you wish to
restart the Tween, use `Tween.restart` instead.

Calling this method after the Tween has completed will start the Tween playing again from the start.
This is the same as calling `Tween.seek(0)` and then `Tween.play()`.


longname: Phaser.Tweens.Tween-seek
since: 3.0.0
name: seek
memberof: Phaser.Tweens.Tween
scope: instance
signature: toPosition:number,delta?:number
returnstype: Phaser.Tweens.Tween
returnsdescription: This Tween instance.
metafilename: Tween.js
metapath: tweens/tween
description:
Seeks to a specific point in the Tween.

**Note:** Be careful when seeking a Tween that repeats or loops forever,
or that has an unusually long total duration, as it's possible to hang the browser.

The given position is a value between 0 and 1 which represents how far through the Tween to seek to.
A value of 0.5 would seek to half-way through the Tween, where-as a value of zero would seek to the start.

Note that the seek takes the entire duration of the Tween into account, including delays, loops and repeats.
For example, a Tween that lasts for 2 seconds, but that loops 3 times, would have a total duration of 6 seconds,
so seeking to 0.5 would seek to 3 seconds into the Tween, as that's half-way through its _entire_ duration.

Seeking works by resetting the Tween to its initial values and then iterating through the Tween at `delta`
jumps per step. The longer the Tween, the longer this can take.


longname: Phaser.Tweens.Tween-setCallback
since: 3.0.0
name: setCallback
memberof: Phaser.Tweens.Tween
scope: instance
signature: type:string,callback:function,params?:array,scope?:any
returnstype: Phaser.Tweens.Tween
returnsdescription: This Tween instance.
metafilename: Tween.js
metapath: tweens/tween
description:
Sets an event based callback to be invoked during playback.

Calling this method will replace a previously set callback for the given type, if any exists.

The types available are:

`onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused.
`onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay.
`onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.
`onRepeat` When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.
`onComplete` When the Tween finishes playback fully or `Tween.stop` is called. Never invoked if tween is set to repeat infinitely.
`onUpdate` When a TweenData updates a property on a source target during playback.
`onLoop` When a Tween loops. This happens _after_ the `loopDelay` expires, if set.


longname: Phaser.Tweens.Tween-complete
since: 3.2.0
name: complete
memberof: Phaser.Tweens.Tween
scope: instance
fires: Phaser.Tweens.Events.TWEEN_COMPLETE
signature: delay?:number
returnstype: Phaser.Tweens.Tween
returnsdescription: This Tween instance.
metafilename: Tween.js
metapath: tweens/tween
description:
Flags the Tween as being complete, whatever stage of progress it is at.

If an onComplete callback has been defined it will automatically invoke it, unless a `delay`
argument is provided, in which case the Tween will delay for that period of time before calling the callback.

If you don't need a delay, or have an onComplete callback, then call `Tween.stop` instead.


longname: Phaser.Tweens.Tween-remove
since: 3.17.0
name: remove
memberof: Phaser.Tweens.Tween
scope: instance
returnstype: Phaser.Tweens.Tween
returnsdescription: This Tween instance.
metafilename: Tween.js
metapath: tweens/tween
description:
Immediately removes this Tween from the TweenManager and all of its internal arrays,
no matter what stage it as it. Then sets the tween state to `REMOVED`.

You should dispose of your reference to this tween after calling this method, to
free it from memory.


longname: Phaser.Tweens.Tween-stop
since: 3.0.0
name: stop
memberof: Phaser.Tweens.Tween
scope: instance
signature: resetTo?:number
returnstype: Phaser.Tweens.Tween
returnsdescription: This Tween instance.
metafilename: Tween.js
metapath: tweens/tween
description:
Stops the Tween immediately, whatever stage of progress it is at and flags it for removal by the TweenManager.


longname: Phaser.Tweens.Tween-update
since: 3.0.0
name: update
memberof: Phaser.Tweens.Tween
description: Internal method that advances the Tween based on the time values.
scope: instance
signature: timestamp:number,delta:number
returnstype: boolean
metafilename: Tween.js
metapath: tweens/tween
fires:
Phaser.Tweens.Events.TWEEN_COMPLETE,Phaser.Tweens.Events.TWEEN_LOOP,Phaser.Tweens.Events.TWEEN_START

returnsdescription:
Returns `true` if this Tween has finished and should be removed from the Tween Manager, otherwise returns `false`.


longname: Phaser.GameObjects.GameObjectFactory-tween
since: 3.0.0
name: tween
memberof: Phaser.GameObjects.GameObjectFactory
scope: instance
signature: config:Phaser.Types.Tweens.TweenBuilderConfig|object
returnstype: Phaser.Tweens.Tween
returnsdescription: The Tween that was created.
metafilename: Tween.js
metapath: tweens/tween
description:
Creates a new Tween object.

Note: This method will only be available if Tweens have been built into Phaser.


longname: Phaser.GameObjects.GameObjectCreator-tween
since: 3.0.0
name: tween
memberof: Phaser.GameObjects.GameObjectCreator
scope: instance
signature: config:Phaser.Types.Tweens.TweenBuilderConfig|object
returnstype: Phaser.Tweens.Tween
returnsdescription: The Tween that was created.
metafilename: Tween.js
metapath: tweens/tween
description:
Creates a new Tween object and returns it.

Note: This method will only be available if Tweens have been built into Phaser.


longname: Phaser.Tweens.TweenData
since: 3.0.0
name: TweenData
memberof: Phaser.Tweens
scope: static
returnstype: Phaser.Types.Tweens.TweenDataConfig
returnsdescription: The config object describing this TweenData.
metafilename: TweenData.js
metapath: tweens/tween
description:
Returns a TweenDataConfig object that describes the tween data for a unique property of a unique target.
A single Tween consists of multiple TweenDatas, depending on how many properties are being changed by the Tween.

This is an internal function used by the TweenBuilder and should not be accessed directly, instead,
Tweens should be created using the GameObjectFactory or GameObjectCreator.

signature:
target:any,index:number,key:string,getEnd:function,getStart:function,getActive:function,ease:function,delay:number,duration:number,yoyo:boolean,hold:number,repeat:number,repeatDelay:number,flipX:boolean,flipY:boolean


longname: Phaser.Tweens.TweenManager-preUpdate
since: 3.0.0
name: preUpdate
memberof: Phaser.Tweens.TweenManager
scope: instance
metafilename: TweenManager.js
metapath: tweens
description:
Updates the Tween Manager's internal lists at the start of the frame.

This method will return immediately if no changes have been indicated.


longname: Phaser.Tweens.TweenManager-makeActive
since: 3.0.0
name: makeActive
memberof: Phaser.Tweens.TweenManager
scope: instance
signature: tween:Phaser.Tweens.Tween
returnstype: Phaser.Tweens.TweenManager
returnsdescription: This Tween Manager object.
metafilename: TweenManager.js
metapath: tweens
description:
Checks if a Tween or Timeline is active and adds it to the Tween Manager at the start of the frame if it isn't.


longname: Phaser.Tweens.TweenManager-getTweensOf
since: 3.0.0
name: getTweensOf
memberof: Phaser.Tweens.TweenManager
scope: instance
signature: target:object|array,includePending?:boolean
returnstype: Array.<Phaser.Tweens.Tween>
returnsdescription: A new array containing all Tweens and Timelines which affect the given target(s).
metafilename: TweenManager.js
metapath: tweens
description:
Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets.

Only the currently active tweens are tested. A tween that has completed and is
awaiting removal will not be included in the results.

If you wish to also search pending tweens, use the `includePending` flag.


longname: Phaser.Tweens.TweenManager-killTweensOf
since: 3.0.0
name: killTweensOf
memberof: Phaser.Tweens.TweenManager
scope: instance
signature: target:object|array
returnstype: Phaser.Tweens.TweenManager
returnsdescription: This Tween Manager.
metafilename: TweenManager.js
metapath: tweens
description:
Stops all Tweens which affect the given target or array of targets. The Tweens will be removed from the Tween Manager at the start of the frame.


longname: Phaser.Tweens.TweenManager-setGlobalTimeScale
since: 3.0.0
name: setGlobalTimeScale
memberof: Phaser.Tweens.TweenManager
scope: instance
signature: value:number
returnstype: Phaser.Tweens.TweenManager
returnsdescription: This Tween Manager.
metafilename: TweenManager.js
metapath: tweens
description:
Sets a new scale of the time delta for this Tween Manager.

The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Tween Manager and all Tweens it owns. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing all Tweens.


longname: Phaser.Utils.Array.Add
since: 3.4.0
name: Add
memberof: Phaser.Utils.Array
scope: static
signature: array:array,item:any|Array.<any>,limit?:number,callback?:function,context?:object
returnstype: array
returnsdescription: The input array.
metafilename: Add.js
metapath: utils/array
description:
Adds the given item, or array of items, to the array.

Each item must be unique within the array.

The array is modified in-place and returned.

You can optionally specify a limit to the maximum size of the array. If the quantity of items being
added will take the array length over this limit, it will stop adding once the limit is reached.

You can optionally specify a callback to be invoked for each item successfully added to the array.


longname: Phaser.Utils.Array.AddAt
since: 3.4.0
name: AddAt
memberof: Phaser.Utils.Array
scope: static
signature: array:array,item:any|Array.<any>,index?:number,limit?:number,callback?:function,context?:object
returnstype: array
returnsdescription: The input array.
metafilename: AddAt.js
metapath: utils/array
description:
Adds the given item, or array of items, to the array starting at the index specified.

Each item must be unique within the array.

Existing elements in the array are shifted up.

The array is modified in-place and returned.

You can optionally specify a limit to the maximum size of the array. If the quantity of items being
added will take the array length over this limit, it will stop adding once the limit is reached.

You can optionally specify a callback to be invoked for each item successfully added to the array.


longname: Phaser.Utils.Array.FindClosestInSorted
since: 3.0.0
name: FindClosestInSorted
memberof: Phaser.Utils.Array
scope: static
signature: value:number,array:array,key?:string
returnstype: number|any
metafilename: FindClosestInSorted.js
metapath: utils/array
description:
Searches a pre-sorted array for the closet value to the given number.

If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,
and will check for the closest value of those to the given number.

returnsdescription:
The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.


longname: Phaser.Utils.Array.GetAll
since: 3.4.0
name: GetAll
memberof: Phaser.Utils.Array
scope: static
signature: array:array,property?:string,value?:*,startIndex?:number,endIndex?:number
returnstype: array
returnsdescription: All matching elements from the array.
metafilename: GetAll.js
metapath: utils/array
description:
Returns all elements in the array.

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

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

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


longname: Phaser.Utils.Array.GetFirst
since: 3.4.0
name: GetFirst
memberof: Phaser.Utils.Array
scope: static
signature: array:array,property?:string,value?:*,startIndex?:number,endIndex?:number
returnstype: object
metafilename: GetFirst.js
metapath: utils/array
description:
Returns the first element in the array.

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

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

Optionally you can specify a start and end index. For example if the array had 100 elements,
and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.

returnsdescription:
The first matching element from the array, or `null` if no element could be found in the range given.


longname: Phaser.Utils.Array.Matrix.CheckMatrix
since: 3.0.0
name: CheckMatrix
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: matrix?:Array.<Array.<T>>
returnstype: boolean
returnsdescription: `true` if the given `matrix` array is a valid matrix.
metafilename: CheckMatrix.js
metapath: utils/array/matrix
description:
Checks if an array can be used as a matrix.

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.Matrix.MatrixToString
since: 3.0.0
name: MatrixToString
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: matrix?:Array.<Array.<T>>
returnstype: string
returnsdescription: A string representing the matrix.
metafilename: MatrixToString.js
metapath: utils/array/matrix
description:
Generates a string (which you can pass to console.log) from the given Array Matrix.

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.Matrix.ReverseColumns
since: 3.0.0
name: ReverseColumns
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: matrix?:Array.<Array.<T>>
returnstype: Array.<Array.<T>>
returnsdescription: The column reversed matrix.
metafilename: ReverseColumns.js
metapath: utils/array/matrix
description:
Reverses the columns in the given Array Matrix.

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.Matrix.ReverseRows
since: 3.0.0
name: ReverseRows
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: matrix?:Array.<Array.<T>>
returnstype: Array.<Array.<T>>
returnsdescription: The column reversed matrix.
metafilename: ReverseRows.js
metapath: utils/array/matrix
description:
Reverses the rows in the given Array Matrix.

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.Matrix.Rotate180
since: 3.0.0
name: Rotate180
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: matrix?:Array.<Array.<T>>
returnstype: Array.<Array.<T>>
returnsdescription: The rotated matrix array. The source matrix should be discard for the returned matrix.
metafilename: Rotate180.js
metapath: utils/array/matrix
description:
Rotates the array matrix 180 degrees.

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.Matrix.RotateLeft
since: 3.0.0
name: RotateLeft
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: matrix?:Array.<Array.<T>>
returnstype: Array.<Array.<T>>
returnsdescription: The rotated matrix array. The source matrix should be discard for the returned matrix.
metafilename: RotateLeft.js
metapath: utils/array/matrix
description:
Rotates the array matrix to the left (or 90 degrees)

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.Matrix.RotateMatrix
since: 3.0.0
name: RotateMatrix
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: matrix?:Array.<Array.<T>>,direction?:number|string
returnstype: Array.<Array.<T>>
returnsdescription: The rotated matrix array. The source matrix should be discard for the returned matrix.
metafilename: RotateMatrix.js
metapath: utils/array/matrix
description:
Rotates the array matrix based on the given rotation value.

The value can be given in degrees: 90, -90, 270, -270 or 180,
or a string command: `rotateLeft`, `rotateRight` or `rotate180`.

Based on the routine from [http://jsfiddle.net/MrPolywhirl/NH42z/](http://jsfiddle.net/MrPolywhirl/NH42z/).

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.Matrix.RotateRight
since: 3.0.0
name: RotateRight
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: matrix?:Array.<Array.<T>>
returnstype: Array.<Array.<T>>
returnsdescription: The rotated matrix array. The source matrix should be discard for the returned matrix.
metafilename: RotateRight.js
metapath: utils/array/matrix
description:
Rotates the array matrix to the left (or -90 degrees)

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.Matrix.Translate
since: 3.50.0
name: Translate
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: matrix?:Array.<Array.<T>>,x?:number,y?:number
returnstype: Array.<Array.<T>>
returnsdescription: The translated matrix.
metafilename: TranslateMatrix.js
metapath: utils/array/matrix
description:
Translates the given Array Matrix by shifting each column and row the
amount specified.

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.Matrix.TransposeMatrix
since: 3.0.0
name: TransposeMatrix
memberof: Phaser.Utils.Array.Matrix
scope: static
signature: array?:Array.<Array.<T>>
returnstype: Array.<Array.<T>>
returnsdescription: A new array matrix which is a transposed version of the given array.
metafilename: TransposeMatrix.js
metapath: utils/array/matrix
description:
Transposes the elements of the given matrix (array of arrays).

The transpose of a matrix is a new matrix whose rows are the columns of the original.

A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
have the same length. There must be at least two rows. This is an example matrix:

```
[
   [ 1, 1, 1, 1, 1, 1 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 2, 0, 1, 2, 0, 4 ],
   [ 2, 0, 3, 4, 0, 4 ],
   [ 2, 0, 0, 0, 0, 4 ],
   [ 3, 3, 3, 3, 3, 3 ]
]
```


longname: Phaser.Utils.Array.MoveTo
since: 3.4.0
name: MoveTo
memberof: Phaser.Utils.Array
scope: static
signature: array:array,item:*,index:number
returnstype: *
returnsdescription: The element that was moved.
metafilename: MoveTo.js
metapath: utils/array
description:
Moves an element in an array to a new position within the same array.
The array is modified in-place.


longname: Phaser.Utils.Array.NumberArray
since: 3.0.0
name: NumberArray
memberof: Phaser.Utils.Array
scope: static
signature: start:number,end:number,prefix?:string,suffix?:string
returnstype: Array.<number>|Array.<string>
returnsdescription: The array of number values, or strings if a prefix or suffix was provided.
metafilename: NumberArray.js
metapath: utils/array
description:
Create an array representing the range of numbers (usually integers), between, and inclusive of,
the given `start` and `end` arguments. For example:

`var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`
`var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`
`var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`

This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.

You can optionally provide a prefix and / or suffix string. If given the array will contain
strings, not integers. For example:

`var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]`
`var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]`


longname: Phaser.Utils.Array.NumberArrayStep
since: 3.0.0
name: NumberArrayStep
memberof: Phaser.Utils.Array
scope: static
signature: start?:number,end?:number,step?:number
returnstype: Array.<number>
returnsdescription: The array of number values.
metafilename: NumberArrayStep.js
metapath: utils/array
description:
Create an array of numbers (positive and/or negative) progressing from `start`
up to but not including `end` by advancing by `step`.

If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.

Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;
for forward compatibility make sure to pass in actual numbers.


longname: Phaser.Utils.Array.QuickSelect
since: 3.0.0
name: QuickSelect
memberof: Phaser.Utils.Array
scope: static
signature: arr:array,k:number,left?:number,right?:number,compare?:function
metafilename: QuickSelect.js
metapath: utils/array
description:
A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.

Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];
The k-th element will have the (k - left + 1)th smallest value in [left, right].

The array is modified in-place.

Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)


longname: Phaser.Utils.Array.Range
since: 3.0.0
name: Range
memberof: Phaser.Utils.Array
scope: static
signature: a:array,b:array,options?:object
returnstype: array
returnsdescription: An array of arranged elements.
metafilename: Range.js
metapath: utils/array
description:
Creates an array populated with a range of values, based on the given arguments and configuration object.

Range ([a,b,c], [1,2,3]) =
a1, a2, a3, b1, b2, b3, c1, c2, c3

Range ([a,b], [1,2,3], qty = 3) =
a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3

Range ([a,b,c], [1,2,3], repeat x1) =
a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3

Range ([a,b], [1,2], repeat -1 = endless, max = 14) =
Maybe if max is set then repeat goes to -1 automatically?
a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)

Range ([a], [1,2,3,4,5], random = true) =
a4, a1, a5, a2, a3

Range ([a, b], [1,2,3], random = true) =
b3, a2, a1, b1, a3, b2

Range ([a, b, c], [1,2,3], randomB = true) =
a3, a1, a2, b2, b3, b1, c1, c3, c2

Range ([a], [1,2,3,4,5], yoyo = true) =
a1, a2, a3, a4, a5, a5, a4, a3, a2, a1

Range ([a, b], [1,2,3], yoyo = true) =
a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1


longname: Phaser.Utils.Array.Remove
since: 3.4.0
name: Remove
memberof: Phaser.Utils.Array
scope: static
signature: array:array,item:*|Array.<*>,callback?:function,context?:object
returnstype: *|Array.<*>
returnsdescription: The item, or array of items, that were successfully removed from the array.
metafilename: Remove.js
metapath: utils/array
description:
Removes the given item, or array of items, from the array.

The array is modified in-place.

You can optionally specify a callback to be invoked for each item successfully removed from the array.


longname: Phaser.Utils.Array.RemoveAt
since: 3.4.0
name: RemoveAt
memberof: Phaser.Utils.Array
scope: static
signature: array:array,index:number,callback?:function,context?:object
returnstype: *
returnsdescription: The item that was removed.
metafilename: RemoveAt.js
metapath: utils/array
description:
Removes the item from the given position in the array.

The array is modified in-place.

You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.


longname: Phaser.Utils.Array.RemoveBetween
since: 3.4.0
name: RemoveBetween
memberof: Phaser.Utils.Array
scope: static
signature: array:array,startIndex:number,endIndex:number,callback?:function,context?:object
returnstype: Array.<*>
returnsdescription: An array of items that were removed.
metafilename: RemoveBetween.js
metapath: utils/array
description:
Removes the item within the given range in the array.

The array is modified in-place.

You can optionally specify a callback to be invoked for the item/s successfully removed from the array.


longname: Phaser.Utils.Array.RemoveRandomElement
since: 3.0.0
name: RemoveRandomElement
memberof: Phaser.Utils.Array
scope: static
signature: array:array,start?:number,length?:number
returnstype: object
metafilename: RemoveRandomElement.js
metapath: utils/array
description:
Removes a random object from the given array and returns it.
Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.

returnsdescription:
The random element that was removed, or `null` if there were no array elements that fell within the given range.


longname: Phaser.Utils.Array.Replace
since: 3.4.0
name: Replace
memberof: Phaser.Utils.Array
scope: static
signature: array:array,oldChild:*,newChild:*
returnstype: boolean
returnsdescription: Returns true if the oldChild was successfully replaced, otherwise returns false.
metafilename: Replace.js
metapath: utils/array
description:
Replaces an element of the array with the new element.
The new element cannot already be a member of the array.
The array is modified in-place.


longname: Phaser.Utils.Array.RotateLeft
since: 3.0.0
name: RotateLeft
memberof: Phaser.Utils.Array
scope: static
signature: array:array,total?:number
returnstype: *
returnsdescription: The most recently shifted element.
metafilename: RotateLeft.js
metapath: utils/array
description:
Moves the element at the start of the array to the end, shifting all items in the process.
The "rotation" happens to the left.


longname: Phaser.Utils.Array.RotateRight
since: 3.0.0
name: RotateRight
memberof: Phaser.Utils.Array
scope: static
signature: array:array,total?:number
returnstype: *
returnsdescription: The most recently shifted element.
metafilename: RotateRight.js
metapath: utils/array
description:
Moves the element at the end of the array to the start, shifting all items in the process.
The "rotation" happens to the right.


longname: Phaser.Utils.Array.SetAll
since: 3.4.0
name: SetAll
memberof: Phaser.Utils.Array
scope: static
signature: array:array,property:string,value:*,startIndex?:number,endIndex?:number
returnstype: array
returnsdescription: The input array.
metafilename: SetAll.js
metapath: utils/array
description:
Scans the array for elements with the given property. If found, the property is set to the `value`.

For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.

Optionally you can specify a start and end index. For example if the array had 100 elements,
and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.


longname: Phaser.Utils.Array.Shuffle
since: 3.0.0
name: Shuffle
memberof: Phaser.Utils.Array
scope: static
signature: array:Array.<T>
returnstype: Array.<T>
returnsdescription: The shuffled array.
metafilename: Shuffle.js
metapath: utils/array
description:
Shuffles the contents of the given array using the Fisher-Yates implementation.

The original array is modified directly and returned.


longname: Phaser.Utils.Array.SortByDigits
since: 3.50.0
name: SortByDigits
memberof: Phaser.Utils.Array
scope: static
signature: array:Array.<string>
returnstype: Array.<string>
returnsdescription: The sorted input array.
metafilename: SortByDigits.js
metapath: utils/array
description:
Takes the given array and runs a numeric sort on it, ignoring any non-digits that
may be in the entries.

You should only run this on arrays containing strings.


longname: Phaser.Utils.Array.SpliceOne
since: 3.0.0
name: SpliceOne
memberof: Phaser.Utils.Array
scope: static
signature: array:array,index:number
returnstype: *
returnsdescription: The item which was spliced (removed).
metafilename: SpliceOne.js
metapath: utils/array
description:
Removes a single item from an array and returns it without creating gc, like the native splice does.
Based on code by Mike Reinstein.


longname: Phaser.Utils.Array.StableSort
since: 3.0.0
name: StableSort
memberof: Phaser.Utils.Array
scope: static
signature: array:array,compare?:function
returnstype: array
returnsdescription: The sorted result.
metafilename: StableSort.js
metapath: utils/array
description:
An in-place stable array sort, because `Array#sort()` is not guaranteed stable.

This is an implementation of merge sort, without recursion.

Function based on the Two-Screen/stable sort 0.1.8 from [https://github.com/Two-Screen/stable](https://github.com/Two-Screen/stable)


longname: Phaser.Utils.Array.Swap
since: 3.4.0
name: Swap
memberof: Phaser.Utils.Array
scope: static
signature: array:array,item1:*,item2:*
returnstype: array
returnsdescription: The input array.
metafilename: Swap.js
metapath: utils/array
description:
Swaps the position of two elements in the given array.
The elements must exist in the same array.
The array is modified in-place.


longname: Phaser.Utils.Base64.ArrayBufferToBase64
since: 3.18.0
name: ArrayBufferToBase64
memberof: Phaser.Utils.Base64
scope: static
signature: arrayBuffer:ArrayBuffer,mediaType?:string
returnstype: string
returnsdescription: The base64 encoded Array Buffer.
metafilename: ArrayBufferToBase64.js
metapath: utils/base64
description:
Converts an ArrayBuffer into a base64 string.

The resulting string can optionally be a data uri if the `mediaType` argument is provided.

See [https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) for more details.


longname: Phaser.Utils.NOOP
since: 3.0.0
name: NOOP
memberof: Phaser.Utils
scope: static
metafilename: NOOP.js
metapath: utils
description:
A NOOP (No Operation) callback function.

Used internally by Phaser when it's more expensive to determine if a callback exists
than it is to just invoke an empty function.


longname: Phaser.Utils.Objects.Extend
since: 3.0.0
name: Extend
memberof: Phaser.Utils.Objects
scope: static
signature: args?:*
returnstype: object
returnsdescription: The extended object.
metafilename: Extend.js
metapath: utils/object
description:
This is a slightly modified version of [http://api.jquery.com/jQuery.extend/](http://api.jquery.com/jQuery.extend/)


longname: Phaser.Utils.Objects.GetAdvancedValue
since: 3.0.0
name: GetAdvancedValue
memberof: Phaser.Utils.Objects
scope: static
signature: source:object,key:string,defaultValue:*
returnstype: *
returnsdescription: The value of the requested key.
metafilename: GetAdvancedValue.js
metapath: utils/object
description:
Retrieves a value from an object. Allows for more advanced selection options, including:

Allowed types:

Implicit
{
    x: 4
}

From function
{
    x: function ()
}

Randomly pick one element from the array
{
    x: [a, b, c, d, e, f]
}

Random integer between min and max:
{
    x: { randInt: [min, max] }
}

Random float between min and max:
{
    x: { randFloat: [min, max] }
}


longname: Phaser.Utils.Objects.GetFastValue
since: 3.0.0
name: GetFastValue
memberof: Phaser.Utils.Objects
scope: static
signature: source:object,key:string,defaultValue?:*
returnstype: *
returnsdescription: The value if found; otherwise, defaultValue (null if none provided)
metafilename: GetFastValue.js
metapath: utils/object
description:
Finds the key within the top level of the [source](source) object, or returns [defaultValue](defaultValue)


longname: Phaser.Utils.Objects.IsPlainObject
since: 3.0.0
name: IsPlainObject
memberof: Phaser.Utils.Objects
scope: static
signature: obj:object
returnstype: boolean
returnsdescription: `true` if the object is plain, otherwise `false`.
metafilename: IsPlainObject.js
metapath: utils/object
description:
This is a slightly modified version of jQuery.isPlainObject.
A plain object is an object whose internal class property is [object Object].


longname: Phaser.Utils.Objects.Merge
since: 3.0.0
name: Merge
memberof: Phaser.Utils.Objects
scope: static
signature: obj1:object,obj2:object
returnstype: object
returnsdescription: A new object containing the union of obj1's and obj2's properties.
metafilename: Merge.js
metapath: utils/object
description:
Creates a new Object using all values from obj1 and obj2.
If a value exists in both obj1 and obj2, the value in obj1 is used.

This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this
function on shallow objects.


longname: Phaser.Utils.Objects.MergeRight
since: 3.0.0
name: MergeRight
memberof: Phaser.Utils.Objects
scope: static
signature: obj1:object,obj2:object
returnstype: object
returnsdescription: The merged object. `obj1` and `obj2` are not modified.
metafilename: MergeRight.js
metapath: utils/object
description:
Creates a new Object using all values from obj1.

Then scans obj2. If a property is found in obj2 that *also* exists in obj1, the value from obj2 is used, otherwise the property is skipped.


longname: Phaser.Utils.Objects.Pick
since: 3.18.0
name: Pick
memberof: Phaser.Utils.Objects
scope: static
signature: object:object,keys:array
returnstype: object
metafilename: Pick.js
metapath: utils/object
description:
Returns a new object that only contains the `keys` that were found on the object provided.
If no `keys` are found, an empty object is returned.

returnsdescription:
A new object that only contains the `keys` that were found on the provided object. If no `keys` were found, an empty object will be returned.


longname: Phaser.Utils.Objects.SetValue
since: 3.17.0
name: SetValue
memberof: Phaser.Utils.Objects
scope: static
signature: source:object,key:string,value:any
returnstype: boolean
returnsdescription: `true` if the property key was valid and the value was set, otherwise `false`.
metafilename: SetValue.js
metapath: utils/object
description:
Sets a value in an object, allowing for dot notation to control the depth of the property.

For example:

```javascript
var data = {
  world: {
    position: {
      x: 200,
      y: 100
    }
  }
};

SetValue(data, 'world.position.y', 300);

console.log(data.world.position.y); // 300
```


longname: Phaser.Utils.String.Format
since: 3.0.0
name: Format
memberof: Phaser.Utils.String
scope: static
signature: string:string,values:array
returnstype: string
returnsdescription: The string containing replaced values.
metafilename: Format.js
metapath: utils/string
description:
Takes a string and replaces instances of markers with values in the given array.
The markers take the form of `%1`, `%2`, etc. I.e.:

`Format("The %1 is worth %2 gold", [ 'Sword', 500 ])`


longname: Phaser.Utils.String.Pad
since: 3.0.0
name: Pad
memberof: Phaser.Utils.String
scope: static
signature: str:string|number|object,len?:number,pad?:string,dir?:number
returnstype: string
returnsdescription: The padded string.
metafilename: Pad.js
metapath: utils/string
description:
Takes the given string and pads it out, to the length required, using the character
specified. For example if you need a string to be 6 characters long, you can call:

`pad('bob', 6, '-', 2)`

This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.

You can also use it to pad numbers (they are always returned as strings):

`pad(512, 6, '0', 1)`

Would return: `000512` with the string padded to the left.

If you don't specify a direction it'll pad to both sides:

`pad('c64', 7, '*')`

Would return: `**c64**`


longname: Phaser.Utils.String.Reverse
since: 3.0.0
name: Reverse
memberof: Phaser.Utils.String
scope: static
signature: string:string
returnstype: string
returnsdescription: The reversed string.
metafilename: Reverse.js
metapath: utils/string
description:
Takes the given string and reverses it, returning the reversed string.
For example if given the string `Atari 520ST` it would return `TS025 iratA`.


longname: Phaser.Utils.String.UUID
since: 3.12.0
name: UUID
memberof: Phaser.Utils.String
scope: static
returnstype: string
returnsdescription: The UUID string.
metafilename: UUID.js
metapath: utils/string
description:
Creates and returns an RFC4122 version 4 compliant UUID.

The string is in the form: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx` where each `x` is replaced with a random
hexadecimal digit from 0 to f, and `y` is replaced with a random hexadecimal digit from 8 to b.


longname: Phaser.FacebookInstantGamesPlugin-showLoadProgress
since: 3.13.0
name: showLoadProgress
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: scene:Phaser.Scene
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Call this method from your `Scene.preload` in order to sync the load progress
of the Phaser Loader with the Facebook Instant Games loader display, i.e.:

```javascript
this.facebook.showLoadProgress(this);
this.facebook.once('startgame', this.startGame, this);
```


longname: Phaser.FacebookInstantGamesPlugin-gameStarted
since: 3.13.0
name: gameStarted
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
metafilename: FacebookInstantGamesPlugin.js
description:
This method is called automatically when the game has finished loading,
if you used the `showLoadProgress` method. If your game doesn't need to
load any assets, or you're managing the load yourself, then call this
method directly to start the API running.

When the API has finished starting this plugin will emit a `startgame` event
which you should listen for.


longname: Phaser.FacebookInstantGamesPlugin-getID
since: 3.13.0
name: getID
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: string
returnsdescription: The context ID.
metafilename: FacebookInstantGamesPlugin.js
description:
Returns the unique identifier for the current game context. This represents a specific context
that the game is being played in (for example, a particular messenger conversation or facebook post).
The identifier will be null if game is being played in a solo context.

It is only populated if `contextGetID` is in the list of supported APIs.


longname: Phaser.FacebookInstantGamesPlugin-getType
since: 3.13.0
name: getType
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: string
returnsdescription: The context type.
metafilename: FacebookInstantGamesPlugin.js
description:
Returns the current context in which your game is running. This can be either `null` or one of:

`POST` - The game is running inside of a Facebook post.
`THREAD` - The game is running inside a Facebook Messenger thread.
`GROUP` - The game is running inside a Facebook Group.
`SOLO` - This is the default context, the player is the only participant.

It is only populated if `contextGetType` is in the list of supported APIs.


longname: Phaser.FacebookInstantGamesPlugin-getLocale
since: 3.13.0
name: getLocale
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: string
returnsdescription: The current locale.
metafilename: FacebookInstantGamesPlugin.js
description:
Returns the current locale.
See [https://origincache.facebook.com/developers/resources/?id=FacebookLocales.xml](https://origincache.facebook.com/developers/resources/?id=FacebookLocales.xml) for a complete list of supported locale values.
Use this to determine what languages the current game should be localized with.
It is only populated if `getLocale` is in the list of supported APIs.


longname: Phaser.FacebookInstantGamesPlugin-getPlatform
since: 3.13.0
name: getPlatform
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: string
returnsdescription: The current platform.
metafilename: FacebookInstantGamesPlugin.js
description:
Returns the platform on which the game is currently running, i.e. `IOS`.
It is only populated if `getPlatform` is in the list of supported APIs.


longname: Phaser.FacebookInstantGamesPlugin-getSDKVersion
since: 3.13.0
name: getSDKVersion
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: string
returnsdescription: The sdk version.
metafilename: FacebookInstantGamesPlugin.js
description:
Returns the string representation of the Facebook Instant Games SDK version being used.
It is only populated if `getSDKVersion` is in the list of supported APIs.


longname: Phaser.FacebookInstantGamesPlugin-getPlayerID
since: 3.13.0
name: getPlayerID
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: string
returnsdescription: The player ID.
metafilename: FacebookInstantGamesPlugin.js
description:
Returns the id of the player. This is a string based ID, the same as `FBInstant.player.getID()`.
It is only populated if `playerGetID` is in the list of supported APIs.


longname: Phaser.FacebookInstantGamesPlugin-getPlayerName
since: 3.13.0
name: getPlayerName
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: string
returnsdescription: The player's localized display name.
metafilename: FacebookInstantGamesPlugin.js
description:
Returns the player's localized display name.
It is only populated if `playerGetName` is in the list of supported APIs.


longname: Phaser.FacebookInstantGamesPlugin-getPlayerPhotoURL
since: 3.13.0
name: getPlayerPhotoURL
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: string
returnsdescription: The player's photo url.
metafilename: FacebookInstantGamesPlugin.js
description:
Returns the url to the player's public profile photo. The photo will always be a square, and with dimensions
of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant.
It's recommended to always scale the image to a desired size before rendering.
It is only populated if `playerGetPhoto` is in the list of supported APIs.


longname: Phaser.FacebookInstantGamesPlugin-loadPlayerPhoto
since: 3.13.0
name: loadPlayerPhoto
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: scene:Phaser.Scene,key:string
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Load the player's photo and store it in the Texture Manager, ready for use in-game.

This method works by using a Scene Loader instance and then asking the Loader to
retrieve the image.

When complete the plugin will emit a `photocomplete` event, along with the key of the photo.

```javascript
this.facebook.loadPlayerPhoto(this, 'player').once('photocomplete', function (key) {
  this.add.image(x, y, 'player');
}, this);
```


longname: Phaser.FacebookInstantGamesPlugin-canSubscribeBot
since: 3.13.0
name: canSubscribeBot
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Checks if the current player can subscribe to the game bot.

It makes an async call to the API, so the result isn't available immediately.

If they can subscribe, the `playerCanSubscribeBot` property is set to `true`
and this plugin will emit the `cansubscribebot` event.

If they cannot, i.e. it's not in the list of supported APIs, or the request
was rejected, it will emit a `cansubscribebotfail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-subscribeBot
since: 3.13.0
name: subscribeBot
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Subscribes the current player to the game bot.

It makes an async call to the API, so the result isn't available immediately.

If they are successfully subscribed this plugin will emit the `subscribebot` event.

If they cannot, i.e. it's not in the list of supported APIs, or the request
was rejected, it will emit a `subscribebotfail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-getData
since: 3.13.0
name: getData
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: keys:string|Array.<string>
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Gets the associated data from the player based on the given key, or array of keys.

The data is requested in an async call, so the result isn't available immediately.

When the call completes the data is set into this plugins Data Manager and the
`getdata` event will be emitted.


longname: Phaser.FacebookInstantGamesPlugin-saveData
since: 3.13.0
name: saveData
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: data:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Set data to be saved to the designated cloud storage of the current player. The game can store up to 1MB of data for each unique player.

The data save is requested in an async call, so the result isn't available immediately.

Data managed via this plugins Data Manager instance is automatically synced with Facebook. However, you can call this
method directly if you need to replace the data object directly.

When the APIs `setDataAsync` call resolves it will emit the `savedata` event from this plugin. If the call fails for some
reason it will emit `savedatafail` instead.

The call resolving does not necessarily mean that the input has already been persisted. Rather, it means that the data was valid and
has been scheduled to be saved. It also guarantees that all values that were set are now available in `getData`.


longname: Phaser.FacebookInstantGamesPlugin-flushData
since: 3.13.0
name: flushData
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Immediately flushes any changes to the player data to the designated cloud storage.
This function is expensive, and should primarily be used for critical changes where persistence needs to be immediate
and known by the game. Non-critical changes should rely on the platform to persist them in the background.
NOTE: Calls to player.setDataAsync will be rejected while this function's result is pending.

Data managed via this plugins Data Manager instance is automatically synced with Facebook. However, you can call this
method directly if you need to flush the data directly.

When the APIs `flushDataAsync` call resolves it will emit the `flushdata` event from this plugin. If the call fails for some
reason it will emit `flushdatafail` instead.


longname: Phaser.FacebookInstantGamesPlugin-getStats
since: 3.13.0
name: getStats
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: keys?:Array.<string>
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Retrieve stats from the designated cloud storage of the current player.

The data is requested in an async call, so the result isn't available immediately.

When the call completes the `getstats` event will be emitted along with the data object returned.

If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,
it will emit a `getstatsfail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-saveStats
since: 3.13.0
name: saveStats
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: data:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Save the stats of the current player to the designated cloud storage.

Stats in the Facebook Instant Games API are purely numerical values paired with a string-based key. Only numbers can be saved as stats,
all other data types will be ignored.

The data is requested in an async call, so the result isn't available immediately.

When the call completes the `savestats` event will be emitted along with the data object returned.

If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,
it will emit a `savestatsfail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-incStats
since: 3.13.0
name: incStats
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: data:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Increment the stats of the current player and save them to the designated cloud storage.

Stats in the Facebook Instant Games API are purely numerical values paired with a string-based key. Only numbers can be saved as stats,
all other data types will be ignored.

The data object provided for this call should contain offsets for how much to modify the stats by:

```javascript
this.facebook.incStats({
    level: 1,
    zombiesSlain: 17,
    rank: -1
});
```

The data is requested in an async call, so the result isn't available immediately.

When the call completes the `incstats` event will be emitted along with the data object returned.

If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,
it will emit a `incstatsfail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-saveSession
since: 3.13.0
name: saveSession
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: data:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Sets the data associated with the individual gameplay session for the current context.

This function should be called whenever the game would like to update the current session data.

This session data may be used to populate a variety of payloads, such as game play webhooks.


longname: Phaser.FacebookInstantGamesPlugin-openShare
since: 3.13.0
name: openShare
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: text:string,key:string,frame?:string,sessionData?:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.

A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.

This data must be less than or equal to 1000 characters when stringified.

When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.

The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.


longname: Phaser.FacebookInstantGamesPlugin-openInvite
since: 3.13.0
name: openInvite
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: text:string,key:string,frame?:string,sessionData?:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
This invokes a dialog to let the user invite a friend to play this game, either as a message in Messenger or as a post on the user's timeline.

A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.

This data must be less than or equal to 1000 characters when stringified.

When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.

The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.


longname: Phaser.FacebookInstantGamesPlugin-isSizeBetween
since: 3.13.0
name: isSizeBetween
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: min?:integer,max?:integer
returnstype: object
metafilename: FacebookInstantGamesPlugin.js
description:
This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive.
If one of the bounds is null only the other bound will be checked against.
It will always return the original result for the first call made in a context in a given game play session.
Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.

returnsdescription:
The Context Size Response object in the format: `{answer: boolean, minSize: number?, maxSize: number?}`.


longname: Phaser.FacebookInstantGamesPlugin-switchContext
since: 3.13.0
name: switchContext
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: contextID:string
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Request a switch into a specific context. If the player does not have permission to enter that context,
or if the player does not provide permission for the game to enter that context, this will emit a `switchfail` event.

Otherwise, the plugin will emit the `switch` event when the game has switched into the specified context.


longname: Phaser.FacebookInstantGamesPlugin-chooseContext
since: 3.13.0
name: chooseContext
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: options?:ChooseContextConfig
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Opens a context selection dialog for the player. If the player selects an available context,
the client will attempt to switch into that context, and emit the `choose` event if successful.
Otherwise, if the player exits the menu or the client fails to switch into the new context, the `choosefail` event will be emitted.


longname: Phaser.FacebookInstantGamesPlugin-createContext
since: 3.13.0
name: createContext
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: playerID:string
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Attempts to create or switch into a context between a specified player and the current player.
This plugin will emit the `create` event once the context switch is completed.
If the API call fails, such as if the player listed is not a Connected Player of the current player or if the
player does not provide permission to enter the new context, then the plugin will emit a 'createfail' event.


longname: Phaser.FacebookInstantGamesPlugin-getPlayers
since: 3.13.0
name: getPlayers
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Fetches an array of ConnectedPlayer objects containing information about active players
(people who played the game in the last 90 days) that are connected to the current player.

It makes an async call to the API, so the result isn't available immediately.

If they are successfully subscribed this plugin will emit the `players` event along
with the player data.

If they cannot, i.e. it's not in the list of supported APIs, or the request
was rejected, it will emit a `playersfail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-getCatalog
since: 3.13.0
name: getCatalog
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Fetches the game's product catalog.

It makes an async call to the API, so the result isn't available immediately.

If they are successfully subscribed this plugin will emit the `getcatalog` event along
with the catalog data.

If they cannot, i.e. it's not in the list of supported APIs, or the request
was rejected, it will emit a `getcatalogfail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-getProduct
since: 3.17.0
name: getProduct
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: productID:string
returnstype: Product
returnsdescription: The Product from the catalog, or `null` if it couldn't be found or the catalog isn't populated.
metafilename: FacebookInstantGamesPlugin.js
description:
Fetches a single Product from the game's product catalog.

The product catalog must have been populated using `getCatalog` prior to calling this method.

Use this to look-up product details based on a purchase list.


longname: Phaser.FacebookInstantGamesPlugin-purchase
since: 3.13.0
name: purchase
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: productID:string,developerPayload?:string
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Begins the purchase flow for a specific product.

It makes an async call to the API, so the result isn't available immediately.

If they are successfully subscribed this plugin will emit the `purchase` event along
with the purchase data.

If they cannot, i.e. it's not in the list of supported APIs, or the request
was rejected, it will emit a `purchasefail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-getPurchases
since: 3.13.0
name: getPurchases
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Fetches all of the player's unconsumed purchases. The game must fetch the current player's purchases
as soon as the client indicates that it is ready to perform payments-related operations,
i.e. at game start. The game can then process and consume any purchases that are waiting to be consumed.

It makes an async call to the API, so the result isn't available immediately.

If they are successfully subscribed this plugin will emit the `getpurchases` event along
with the purchase data.

If they cannot, i.e. it's not in the list of supported APIs, or the request
was rejected, it will emit a `getpurchasesfail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-consumePurchase
since: 3.17.0
name: consumePurchase
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: purchaseToken:string
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Consumes a specific purchase belonging to the current player. Before provisioning a product's effects to the player,
the game should request the consumption of the purchased product. Once the purchase is successfully consumed,
the game should immediately provide the player with the effects of their purchase.

It makes an async call to the API, so the result isn't available immediately.

If they are successfully subscribed this plugin will emit the `consumepurchase` event along
with the purchase data.

If they cannot, i.e. it's not in the list of supported APIs, or the request
was rejected, it will emit a `consumepurchasefail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-update
since: 3.13.0
name: update
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: cta:string,text:object,key:string,frame:string|integer,template:string,updateData:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Informs Facebook of a custom update that occurred in the game.
This will temporarily yield control to Facebook and Facebook will decide what to do based on what the update is.
Once Facebook returns control to the game the plugin will emit an `update` or `updatefail` event.

It makes an async call to the API, so the result isn't available immediately.

The `text` parameter is an update payload with the following structure:

```
text: {
    default: 'X just invaded Y\'s village!',
    localizations: {
        ar_AR: 'X \u0641\u0642\u0637 \u063A\u0632\u062A ' +
        '\u0642\u0631\u064A\u0629 Y!',
        en_US: 'X just invaded Y\'s village!',
        es_LA: '\u00A1X acaba de invadir el pueblo de Y!',
    }
}
```


longname: Phaser.FacebookInstantGamesPlugin-updateLeaderboard
since: 3.13.0
name: updateLeaderboard
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: cta:string,text:object,key:string,frame:string|integer,template:string,updateData:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Informs Facebook of a leaderboard update that occurred in the game.
This will temporarily yield control to Facebook and Facebook will decide what to do based on what the update is.
Once Facebook returns control to the game the plugin will emit an `update` or `updatefail` event.

It makes an async call to the API, so the result isn't available immediately.

The `text` parameter is an update payload with the following structure:

```
text: {
    default: 'X just invaded Y\'s village!',
    localizations: {
        ar_AR: 'X \u0641\u0642\u0637 \u063A\u0632\u062A ' +
        '\u0642\u0631\u064A\u0629 Y!',
        en_US: 'X just invaded Y\'s village!',
        es_LA: '\u00A1X acaba de invadir el pueblo de Y!',
    }
}
```


longname: Phaser.FacebookInstantGamesPlugin-_update
since: 3.13.0
name: _update
memberof: Phaser.FacebookInstantGamesPlugin
description: Internal update handler.
scope: instance
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
access: private
signature:
action:string,cta:string,text:object,key:string,frame:string|integer,template:string,updateData:object


longname: Phaser.FacebookInstantGamesPlugin-switchGame
since: 3.13.0
name: switchGame
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: appID:string,data?:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Request that the client switch to a different Instant Game.

It makes an async call to the API, so the result isn't available immediately.

If the game switches successfully this plugin will emit the `switchgame` event and the client will load the new game.

If they cannot, i.e. it's not in the list of supported APIs, or the request
was rejected, it will emit a `switchgamefail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-createShortcut
since: 3.13.0
name: createShortcut
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Prompts the user to create a shortcut to the game if they are eligible to.
Can only be called once per session.

It makes an async call to the API, so the result isn't available immediately.

If the user choose to create a shortcut this plugin will emit the `shortcutcreated` event.

If they cannot, i.e. it's not in the list of supported APIs, or the request
was rejected, it will emit a `shortcutcreatedfail` event instead.


longname: Phaser.FacebookInstantGamesPlugin-log
since: 3.13.0
name: log
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: name:string,value?:number,params?:object
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Log an app event with FB Analytics.

See [https://developers.facebook.com/docs/javascript/reference/v2.8#app_events](https://developers.facebook.com/docs/javascript/reference/v2.8#app_events) for more details about FB Analytics.


longname: Phaser.FacebookInstantGamesPlugin-preloadAds
since: 3.13.0
name: preloadAds
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: placementID:string|Array.<string>
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Attempt to create an instance of an interstitial ad.

If the instance is created successfully then the ad is preloaded ready for display in-game via the method `showAd()`.

If the ad loads it will emit the `adloaded` event, passing the AdInstance as the only parameter.

If the ad cannot be displayed because there was no inventory to fill it, it will emit the `adsnofill` event.


longname: Phaser.FacebookInstantGamesPlugin-preloadVideoAds
since: 3.13.0
name: preloadVideoAds
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: placementID:string|Array.<string>
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Attempt to create an instance of an rewarded video ad.

If the instance is created successfully then the ad is preloaded ready for display in-game via the method `showVideo()`.

If the ad loads it will emit the `adloaded` event, passing the AdInstance as the only parameter.

If the ad cannot be displayed because there was no inventory to fill it, it will emit the `adsnofill` event.


longname: Phaser.FacebookInstantGamesPlugin-showAd
since: 3.13.0
name: showAd
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: placementID:string
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Displays a previously loaded interstitial ad.

If the ad is successfully displayed this plugin will emit the `adfinished` event, with the AdInstance object as its parameter.

If the ad cannot be displayed, it will emit the `adsnotloaded` event.


longname: Phaser.FacebookInstantGamesPlugin-showVideo
since: 3.13.0
name: showVideo
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: placementID:string
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Displays a previously loaded interstitial video ad.

If the ad is successfully displayed this plugin will emit the `adfinished` event, with the AdInstance object as its parameter.

If the ad cannot be displayed, it will emit the `adsnotloaded` event.


longname: Phaser.FacebookInstantGamesPlugin-matchPlayer
since: 3.13.0
name: matchPlayer
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: matchTag?:string,switchImmediately?:boolean
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Attempts to match the current player with other users looking for people to play with.
If successful, a new Messenger group thread will be created containing the matched players and the player will
be context switched to that thread. This plugin will also dispatch the `matchplayer` event, containing the new context ID and Type.

The default minimum and maximum number of players in one matched thread are 2 and 20 respectively,
depending on how many players are trying to get matched around the same time.

The values can be changed in `fbapp-config.json`. See the Bundle Config documentation for documentation about `fbapp-config.json`.


longname: Phaser.FacebookInstantGamesPlugin-getLeaderboard
since: 3.13.0
name: getLeaderboard
memberof: Phaser.FacebookInstantGamesPlugin
scope: instance
signature: name:string
returnstype: Phaser.FacebookInstantGamesPlugin
returnsdescription: This Facebook Instant Games Plugin instance.
metafilename: FacebookInstantGamesPlugin.js
description:
Fetch a specific leaderboard belonging to this Instant Game.

The data is requested in an async call, so the result isn't available immediately.

When the call completes the `getleaderboard` event will be emitted along with a Leaderboard object instance.


longname: Phaser.FacebookInstantGamesLeaderboard-getEntryCount
since: 3.13.0
name: getEntryCount
memberof: Phaser.FacebookInstantGamesLeaderboard
scope: instance
returnstype: Phaser.FacebookInstantGamesLeaderboard
returnsdescription: This Leaderboard instance.
metafilename: Leaderboard.js
description:
Fetches the total number of player entries in the leaderboard.

The data is requested in an async call, so the result isn't available immediately.

When the call completes this Leaderboard will emit the `getentrycount` event along with the count and name of the Leaderboard.


longname: Phaser.FacebookInstantGamesLeaderboard-setScore
since: 3.13.0
name: setScore
memberof: Phaser.FacebookInstantGamesLeaderboard
scope: instance
signature: score:integer,data?:string|any
returnstype: Phaser.FacebookInstantGamesLeaderboard
returnsdescription: This Leaderboard instance.
metafilename: Leaderboard.js
description:
Updates the player's score. If the player has an existing score, the old score will only be replaced if the new score is better than it.
NOTE: If the leaderboard is associated with a specific context, the game must be in that context to set a score for the player.

The data is requested in an async call, so the result isn't available immediately.

When the call completes this Leaderboard will emit the `setscore` event along with the LeaderboardScore object and the name of the Leaderboard.

If the save fails the event will send `null` as the score value.


longname: Phaser.FacebookInstantGamesLeaderboard-getPlayerScore
since: 3.13.0
name: getPlayerScore
memberof: Phaser.FacebookInstantGamesLeaderboard
scope: instance
returnstype: Phaser.FacebookInstantGamesLeaderboard
returnsdescription: This Leaderboard instance.
metafilename: Leaderboard.js
description:
Gets the players leaderboard entry and stores it in the `playerScore` property.

The data is requested in an async call, so the result isn't available immediately.

When the call completes this Leaderboard will emit the `getplayerscore` event along with the score and the name of the Leaderboard.

If the player has not yet saved a score, the event will send `null` as the score value, and `playerScore` will be set to `null` as well.


longname: Phaser.FacebookInstantGamesLeaderboard-getScores
since: 3.13.0
name: getScores
memberof: Phaser.FacebookInstantGamesLeaderboard
scope: instance
signature: count?:integer,offset?:integer
returnstype: Phaser.FacebookInstantGamesLeaderboard
returnsdescription: This Leaderboard instance.
metafilename: Leaderboard.js
description:
Retrieves a set of leaderboard entries, ordered by score ranking in the leaderboard.

The data is requested in an async call, so the result isn't available immediately.

When the call completes this Leaderboard will emit the `getscores` event along with an array of LeaderboardScore entries and the name of the Leaderboard.


longname: Phaser.FacebookInstantGamesLeaderboard-getConnectedScores
since: 3.16.0
name: getConnectedScores
memberof: Phaser.FacebookInstantGamesLeaderboard
scope: instance
returnstype: Phaser.FacebookInstantGamesLeaderboard
returnsdescription: This Leaderboard instance.
metafilename: Leaderboard.js
description:
Retrieves a set of leaderboard entries, based on the current player's connected players (including the current player), ordered by local rank within the set of connected players.

The data is requested in an async call, so the result isn't available immediately.

When the call completes this Leaderboard will emit the `getconnectedscores` event along with an array of LeaderboardScore entries and the name of the Leaderboard.


longname: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline-batchQuad
since: 3.50.0
name: batchQuad
memberof: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline
scope: instance
returnstype: boolean
returnsdescription: `true` if this method caused the batch to flush, otherwise `false`.
metafilename: GraphicsPipeline.js
metapath: renderer/webgl/pipelines
inherits: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline#batchQuad
overrides: Phaser.Renderer.WebGL.WebGLPipeline#batchQuad
description:
Adds the vertices data into the batch and flushes if full.

Assumes 6 vertices in the following arrangement:

```
0----3
|\  B|
| \  |
|  \ |
| A \|
|    \
1----2
```

Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3

signature:
x0:number,y0:number,x1:number,y1:number,x2:number,y2:number,x3:number,y3:number,tintTL:number,tintTR:number,tintBL:number,tintBR:number


longname: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline-batchTri
since: 3.50.0
name: batchTri
memberof: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline
scope: instance
returnstype: boolean
returnsdescription: `true` if this method caused the batch to flush, otherwise `false`.
metafilename: GraphicsPipeline.js
metapath: renderer/webgl/pipelines
inherits: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline#batchTri
overrides: Phaser.Renderer.WebGL.WebGLPipeline#batchTri
description:
Adds the vertices data into the batch and flushes if full.

Assumes 3 vertices in the following arrangement:

```
0
|\
| \
|  \
|   \
|    \
1-----2
```

signature:
x1:number,y1:number,x2:number,y2:number,x3:number,y3:number,tintTL:number,tintTR:number,tintBL:number


