# functions

longname: Phaser.Loader.LoaderPlugin-atlas
since: 3.0.0
name: atlas
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: AtlasJSONFile.js
metapath: loader/filetypes
description:
Adds a JSON based Texture Atlas, or array of atlases, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.

Phaser expects the atlas data to be provided in a JSON file, using either the JSON Hash or JSON Array format.
These files are created by software such as Texture Packer, Shoebox and Adobe Flash / Animate.
If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader
instead of this one.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.atlas({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    atlasURL: 'images/MainMenu.json'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig` for more details.

Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.

Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:

```javascript
this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');
// and later in your game ...
this.add.image(x, y, 'mainmenu', 'background');
```

To get a list of all available frames within an atlas please consult your Texture Atlas software.

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the `url` where the second element is the normal map:

```javascript
this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json');
```

Or, if you are using a config object use the `normalMap` property:

```javascript
this.load.atlas({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    normalMap: 'images/MainMenu-n.png',
    atlasURL: 'images/MainMenu.json'
});
```

The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.

Note: The ability to load this type of file will only be available if the Atlas JSON File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Array.<Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig>,textureURL?:string|Array.<string>,atlasURL?:object|string,textureXhrSettings?:Phaser.Types.Loader.XHRSettingsObject,atlasXhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-atlasXML
since: 3.7.0
name: atlasXML
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: AtlasXMLFile.js
metapath: loader/filetypes
description:
Adds an XML based Texture Atlas, or array of atlases, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.

Phaser expects the atlas data to be provided in an XML file format.
These files are created by software such as Shoebox and Adobe Flash / Animate.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.atlasXML({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    atlasURL: 'images/MainMenu.xml'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig` for more details.

Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:

```javascript
this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');
// and later in your game ...
this.add.image(x, y, 'mainmenu', 'background');
```

To get a list of all available frames within an atlas please consult your Texture Atlas software.

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the `url` where the second element is the normal map:

```javascript
this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml');
```

Or, if you are using a config object use the `normalMap` property:

```javascript
this.load.atlasXML({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    normalMap: 'images/MainMenu-n.png',
    atlasURL: 'images/MainMenu.xml'
});
```

The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.

Note: The ability to load this type of file will only be available if the Atlas XML File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig|Array.<Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig>,textureURL?:string|Array.<string>,atlasURL?:string,textureXhrSettings?:Phaser.Types.Loader.XHRSettingsObject,atlasXhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-audio
since: 3.0.0
name: audio
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: AudioFile.js
metapath: loader/filetypes
description:
Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.audio('title', [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]);
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Audio Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Audio Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.audio({
    key: 'title',
    url: [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.AudioFileConfig` for more details.

The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.

Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.
ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on
browser support.

If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.

Note: The ability to load this type of file will only be available if the Audio File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.AudioFileConfig|Array.<Phaser.Types.Loader.FileTypes.AudioFileConfig>,urls?:string|Array.<string>,config?:any,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-audioSprite
since: 3.0.0
name: audioSprite
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader.
metafilename: AudioSpriteFile.js
metapath: loader/filetypes
description:
Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.audioSprite('kyobi', 'kyobi.json', [
        'kyobi.ogg',
        'kyobi.mp3',
        'kyobi.m4a'
    ]);
}
```

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)

If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio
files automatically based on its content. To do this exclude the audio URLs from the load:

```javascript
function preload ()
{
    this.load.audioSprite('kyobi', 'kyobi.json');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.

The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Audio Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Audio Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.audioSprite({
    key: 'kyobi',
    jsonURL: 'audio/Kyobi.json',
    audioURL: [
        'audio/Kyobi.ogg',
        'audio/Kyobi.mp3',
        'audio/Kyobi.m4a'
    ]
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig` for more details.

Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead.

Once the audio has finished loading you can use it create an Audio Sprite by referencing its key:

```javascript
this.load.audioSprite('kyobi', 'kyobi.json');
// and later in your game ...
var music = this.sound.addAudioSprite('kyobi');
music.play('title');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.
ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on
browser support.

If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.

Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig|Array.<Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig>,jsonURL:string,audioURL?:string|Array.<string>,audioConfig?:any,audioXhrSettings?:Phaser.Types.Loader.XHRSettingsObject,jsonXhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-binary
since: 3.0.0
name: binary
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: BinaryFile.js
metapath: loader/filetypes
description:
Adds a Binary file, or array of Binary files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.binary('doom', 'files/Doom.wad');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Binary Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Binary Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Binary Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.binary({
    key: 'doom',
    url: 'files/Doom.wad',
    dataType: Uint8Array
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.BinaryFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.binary('doom', 'files/Doom.wad');
// and later in your game ...
var data = this.cache.binary.get('doom');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Data` the final key will be `LEVEL1.Data` and
this is what you would use to retrieve the text from the Binary Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "doom"
and no URL is given then the Loader will set the URL to be "doom.bin". It will always add `.bin` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Binary File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.BinaryFileConfig|Array.<Phaser.Types.Loader.FileTypes.BinaryFileConfig>,url?:string,dataType?:any,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-bitmapFont
since: 3.0.0
name: bitmapFont
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: BitmapFontFile.js
metapath: loader/filetypes
description:
Adds an XML based Bitmap Font, or array of fonts, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:
```javascript
function preload ()
{
    this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.

Phaser expects the font data to be provided in an XML file format.
These files are created by software such as the [Angelcode Bitmap Font Generator](http://www.angelcode.com/products/bmfont/),
[Littera](http://kvazars.com/littera/) or [Glyph Designer](https://71squared.com/glyphdesigner)

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.bitmapFont({
    key: 'goldenFont',
    textureURL: 'images/GoldFont.png',
    fontDataURL: 'images/GoldFont.xml'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.BitmapFontFileConfig` for more details.

Once the atlas has finished loading you can use key of it when creating a Bitmap Text Game Object:

```javascript
this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');
// and later in your game ...
this.add.bitmapText(x, y, 'goldenFont', 'Hello World');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use when creating a Bitmap Text object.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the `url` where the second element is the normal map:

```javascript
this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml');
```

Or, if you are using a config object use the `normalMap` property:

```javascript
this.load.bitmapFont({
    key: 'goldenFont',
    textureURL: 'images/GoldFont.png',
    normalMap: 'images/GoldFont-n.png',
    fontDataURL: 'images/GoldFont.xml'
});
```

The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.

Note: The ability to load this type of file will only be available if the Bitmap Font File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig|Array.<Phaser.Types.Loader.FileTypes.BitmapFontFileConfig>,textureURL?:string|Array.<string>,fontDataURL?:string,textureXhrSettings?:Phaser.Types.Loader.XHRSettingsObject,fontDataXhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-css
since: 3.17.0
name: css
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: CSSFile.js
metapath: loader/filetypes
description:
Adds a CSS file, or array of CSS files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.css('headers', 'styles/headers.css');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String and not already in-use by another file in the Loader.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.css({
    key: 'headers',
    url: 'styles/headers.css'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.CSSFileConfig` for more details.

Once the file has finished loading it will automatically be converted into a style DOM element
via `document.createElement('style')`. It will have its `defer` property set to false and then the
resulting element will be appended to `document.head`. The CSS styles are then applied to the current document.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.css". It will always add `.css` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the CSS File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.CSSFileConfig|Array.<Phaser.Types.Loader.FileTypes.CSSFileConfig>,url?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-glsl
since: 3.0.0
name: glsl
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: GLSLFile.js
metapath: loader/filetypes
description:
Adds a GLSL file, or array of GLSL files, to the current load queue.
In Phaser 3 GLSL files are just plain Text files at the current moment in time.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.glsl('plasma', 'shaders/Plasma.glsl');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Shader Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Shader Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Shader Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.glsl({
    key: 'plasma',
    shaderType: 'fragment',
    url: 'shaders/Plasma.glsl'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.GLSLFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.glsl('plasma', 'shaders/Plasma.glsl');
// and later in your game ...
var data = this.cache.shader.get('plasma');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `FX.` and the key was `Plasma` the final key will be `FX.Plasma` and
this is what you would use to retrieve the text from the Shader Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "plasma"
and no URL is given then the Loader will set the URL to be "plasma.glsl". It will always add `.glsl` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the GLSL File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.GLSLFileConfig|Array.<Phaser.Types.Loader.FileTypes.GLSLFileConfig>,url?:string,shaderType?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-html
since: 3.12.0
name: html
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: HTMLFile.js
metapath: loader/filetypes
description:
Adds an HTML file, or array of HTML files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.html('story', 'files/LoginForm.html');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global HTML Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the HTML Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the HTML Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.html({
    key: 'login',
    url: 'files/LoginForm.html'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.HTMLFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.html('login', 'files/LoginForm.html');
// and later in your game ...
var data = this.cache.html.get('login');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
this is what you would use to retrieve the html from the HTML Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "story"
and no URL is given then the Loader will set the URL to be "story.html". It will always add `.html` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the HTML File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.HTMLFileConfig|Array.<Phaser.Types.Loader.FileTypes.HTMLFileConfig>,url?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-htmlTexture
since: 3.12.0
name: htmlTexture
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: HTMLTextureFile.js
metapath: loader/filetypes
description:
Adds an HTML File, or array of HTML Files, to the current load queue. When the files are loaded they
will be rendered to textures and stored in the Texture Manager.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.htmlTexture({
    key: 'instructions',
    url: 'content/intro.html',
    width: 256,
    height: 512
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig` for more details.

Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:

```javascript
this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);
// and later in your game ...
this.add.image(x, y, 'instructions');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.html". It will always add `.html` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

The width and height are the size of the texture to which the HTML will be rendered. It's not possible to determine these
automatically, so you will need to provide them, either as arguments or in the file config object.
When the HTML file has loaded a new SVG element is created with a size and viewbox set to the width and height given.
The SVG file has a body tag added to it, with the HTML file contents included. It then calls `window.Blob` on the SVG,
and if successful is added to the Texture Manager, otherwise it fails processing. The overall quality of the rendered
HTML depends on your browser, and some of them may not even support the svg / blob process used. Be aware that there are
limitations on what HTML can be inside an SVG. You can find out more details in this
[Mozilla MDN entry](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas).

Note: The ability to load this type of file will only be available if the HTMLTextureFile File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig|Array.<Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig>,url?:string,width?:number,height?:number,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-image
since: 3.0.0
name: image
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: ImageFile.js
metapath: loader/filetypes
description:
Adds an Image, or array of Images, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.image('logo', 'images/phaserLogo.png');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback
of animated gifs to Canvas elements.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.image({
    key: 'logo',
    url: 'images/AtariLogo.png'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.

Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:

```javascript
this.load.image('logo', 'images/AtariLogo.png');
// and later in your game ...
this.add.image(x, y, 'logo');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the `url` where the second element is the normal map:

```javascript
this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);
```

Or, if you are using a config object use the `normalMap` property:

```javascript
this.load.image({
    key: 'logo',
    url: 'images/AtariLogo.png',
    normalMap: 'images/AtariLogo-n.png'
});
```

The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.

Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Array.<Phaser.Types.Loader.FileTypes.ImageFileConfig>,url?:string|Array.<string>,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-json
since: 3.0.0
name: json
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: JSONFile.js
metapath: loader/filetypes
description:
Adds a JSON file, or array of JSON files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.json('wavedata', 'files/AlienWaveData.json');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the JSON Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the JSON Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.json({
    key: 'wavedata',
    url: 'files/AlienWaveData.json'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.json('wavedata', 'files/AlienWaveData.json');
// and later in your game ...
var data = this.cache.json.get('wavedata');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and
this is what you would use to retrieve the text from the JSON Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data"
and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,
rather than the whole file. For example, if your JSON data had a structure like this:

```json
{
    "level1": {
        "baddies": {
            "aliens": {},
            "boss": {}
        }
    },
    "level2": {},
    "level3": {}
}
```

And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.

Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Array.<Phaser.Types.Loader.FileTypes.JSONFileConfig>,url?:object|string,dataKey?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-multiatlas
since: 3.7.0
name: multiatlas
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: MultiAtlasFile.js
metapath: loader/filetypes
description:
Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.multiatlas('level1', 'images/Level1.json');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.

Phaser expects the atlas data to be provided in a JSON file as exported from the application Texture Packer,
version 4.6.3 or above, where you have made sure to use the Phaser 3 Export option.

The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and
extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps,
Phaser will load those as well.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.multiatlas({
    key: 'level1',
    atlasURL: 'images/Level1.json'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig` for more details.

Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.

Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:

```javascript
this.load.multiatlas('level1', 'images/Level1.json');
// and later in your game ...
this.add.image(x, y, 'level1', 'background');
```

To get a list of all available frames within an atlas please consult your Texture Atlas software.

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Multi Atlas File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig|Array.<Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig>,atlasURL?:string,path?:string,baseURL?:string,atlasXhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-scripts
since: 3.17.0
name: scripts
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: MultiScriptFile.js
metapath: loader/filetypes
description:
Adds an array of Script files to the current load queue.

The difference between this and the `ScriptFile` file type is that you give an array of scripts to this method,
and the scripts are then processed _exactly_ in that order. This allows you to load a bunch of scripts that
may have dependencies on each other without worrying about the async nature of traditional script loading.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.scripts('PostProcess', [
        'libs/shaders/CopyShader.js',
        'libs/postprocessing/EffectComposer.js',
        'libs/postprocessing/RenderPass.js',
        'libs/postprocessing/MaskPass.js',
        'libs/postprocessing/ShaderPass.js',
        'libs/postprocessing/AfterimagePass.js'
   ]);
}
```

In the code above the script files will all be loaded in parallel but only processed (i.e. invoked) in the exact
order given in the array.

The files are **not** loaded right away. They are added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the files are queued
it means you cannot use the files immediately after calling this method, but must wait for the files to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String and not already in-use by another file in the Loader.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.scripts({
    key: 'PostProcess',
    url: [
        'libs/shaders/CopyShader.js',
        'libs/postprocessing/EffectComposer.js',
        'libs/postprocessing/RenderPass.js',
        'libs/postprocessing/MaskPass.js',
        'libs/postprocessing/ShaderPass.js',
        'libs/postprocessing/AfterimagePass.js'
       ]
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.MultiScriptFileConfig` for more details.

Once all the files have finished loading they will automatically be converted into a script element
via `document.createElement('script')`. They will have their language set to JavaScript, `defer` set to
false and then the resulting element will be appended to `document.head`. Any code then in the
script will be executed. This is done in the exact order the files are specified in the url array.

The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.

Note: The ability to load this type of file will only be available if the MultiScript File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig|Array.<Phaser.Types.Loader.FileTypes.MultiScriptFileConfig>,url?:Array.<string>,extension?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-obj
since: 3.50.0
name: obj
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: OBJFile.js
metapath: loader/filetypes
description:
Adds a Wavefront OBJ file, or array of OBJ files, to the current load queue.

Note: You should ensure your 3D package has triangulated the OBJ file prior to export.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.obj('ufo', 'files/spaceship.obj');
}
```

You can optionally also load a Wavefront Material file as well, by providing the 3rd parameter:

```javascript
function preload ()
{
    this.load.obj('ufo', 'files/spaceship.obj', 'files/spaceship.mtl');
}
```

If given, the material will be parsed and stored along with the obj data in the cache.

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global OBJ Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the OBJ Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the OBJ Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.obj({
    key: 'ufo',
    url: 'files/spaceship.obj',
    matURL: 'files/spaceship.mtl',
    flipUV: true
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.OBJFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.obj('ufo', 'files/spaceship.obj');
// and later in your game ...
var data = this.cache.obj.get('ufo');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
this is what you would use to retrieve the obj from the OBJ Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "story"
and no URL is given then the Loader will set the URL to be "story.obj". It will always add `.obj` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the OBJ File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.OBJFileConfig|Array.<Phaser.Types.Loader.FileTypes.OBJFileConfig>,objURL?:string,matURL?:string,flipUV?:boolean,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-pack
since: 3.7.0
name: pack
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: PackFile.js
metapath: loader/filetypes
description:
Adds a JSON File Pack, or array of packs, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.pack('level1', 'data/Level1Files.json');
}
```

A File Pack is a JSON file (or object) that contains details about other files that should be added into the Loader.
Here is a small example:

```json
{
   "test1": {
       "files": [
           {
               "type": "image",
               "key": "taikodrummaster",
               "url": "assets/pics/taikodrummaster.jpg"
           },
           {
               "type": "image",
               "key": "sukasuka-chtholly",
               "url": "assets/pics/sukasuka-chtholly.png"
           }
       ]
   },
   "meta": {
       "generated": "1401380327373",
       "app": "Phaser 3 Asset Packer",
       "url": "[https://phaser.io](https://phaser.io)",
       "version": "1.0",
       "copyright": "Photon Storm Ltd. 2018"
   }
}
```

The pack can be split into sections. In the example above you'll see a section called `test1. You can tell
the `load.pack` method to parse only a particular section of a pack. The pack is stored in the JSON Cache,
so you can pass it to the Loader to process additional sections as needed in your game, or you can just load
them all at once without specifying anything.

The pack file can contain an entry for any type of file that Phaser can load. The object structures exactly
match that of the file type configs, and all properties available within the file type configs can be used
in the pack file too.

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.

The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the JSON Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the JSON Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.pack({
    key: 'level1',
    url: 'data/Level1Files.json'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.PackFileConfig` for more details.

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and
this is what you would use to retrieve the text from the JSON Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data"
and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,
rather than the whole file. For example, if your JSON data had a structure like this:

```json
{
    "level1": {
        "baddies": {
            "aliens": {},
            "boss": {}
        }
    },
    "level2": {},
    "level3": {}
}
```

And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.

Note: The ability to load this type of file will only be available if the Pack File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.PackFileConfig|Array.<Phaser.Types.Loader.FileTypes.PackFileConfig>,url?:string,dataKey?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-plugin
since: 3.0.0
name: plugin
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: PluginFile.js
metapath: loader/filetypes
description:
Adds a Plugin Script file, or array of plugin files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.plugin('modplayer', 'plugins/ModPlayer.js');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String and not already in-use by another file in the Loader.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.plugin({
    key: 'modplayer',
    url: 'plugins/ModPlayer.js'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.PluginFileConfig` for more details.

Once the file has finished loading it will automatically be converted into a script element
via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to
false and then the resulting element will be appended to `document.head`. Any code then in the
script will be executed. It will then be passed to the Phaser PluginCache.register method.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Plugin File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.PluginFileConfig|Array.<Phaser.Types.Loader.FileTypes.PluginFileConfig>,url?:string|function,start?:boolean,mapping?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-sceneFile
since: 3.16.0
name: sceneFile
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: SceneFile.js
metapath: loader/filetypes
description:
Adds an external Scene file, or array of Scene files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.sceneFile('Level1', 'src/Level1.js');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Scene Manager upon a successful load.

For a Scene File it's vitally important that the key matches the class name in the JavaScript file.

For example here is the source file:

```javascript
class ExternalScene extends Phaser.Scene {

    constructor ()
    {
        super('myScene');
    }

}
```

Because the class is called `ExternalScene` that is the exact same key you must use when loading it:

```javascript
function preload ()
{
    this.load.sceneFile('ExternalScene', 'src/yourScene.js');
}
```

The key that is used within the Scene Manager can either be set to the same, or you can override it in the Scene
constructor, as we've done in the example above, where the Scene key was changed to `myScene`.

The key should be unique both in terms of files being loaded and Scenes already present in the Scene Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Scene Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.sceneFile({
    key: 'Level1',
    url: 'src/Level1.js'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.SceneFileConfig` for more details.

Once the file has finished loading it will be added to the Scene Manager.

```javascript
this.load.sceneFile('Level1', 'src/Level1.js');
// and later in your game ...
this.scene.start('Level1');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `WORLD1.` and the key was `Story` the final key will be `WORLD1.Story` and
this is what you would use to retrieve the text from the Scene Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "story"
and no URL is given then the Loader will set the URL to be "story.js". It will always add `.js` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Scene File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.SceneFileConfig|Array.<Phaser.Types.Loader.FileTypes.SceneFileConfig>,url?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-scenePlugin
since: 3.8.0
name: scenePlugin
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: ScenePluginFile.js
metapath: loader/filetypes
description:
Adds a Scene Plugin Script file, or array of plugin files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.scenePlugin('ModPlayer', 'plugins/ModPlayer.js', 'modPlayer', 'mods');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String and not already in-use by another file in the Loader.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.scenePlugin({
    key: 'modplayer',
    url: 'plugins/ModPlayer.js'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.ScenePluginFileConfig` for more details.

Once the file has finished loading it will automatically be converted into a script element
via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to
false and then the resulting element will be appended to `document.head`. Any code then in the
script will be executed. It will then be passed to the Phaser PluginCache.register method.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig|Array.<Phaser.Types.Loader.FileTypes.ScenePluginFileConfig>,url?:string|function,systemKey?:string,sceneKey?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-script
since: 3.0.0
name: script
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: ScriptFile.js
metapath: loader/filetypes
description:
Adds a Script file, or array of Script files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.script('aliens', 'lib/aliens.js');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String and not already in-use by another file in the Loader.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.script({
    key: 'aliens',
    url: 'lib/aliens.js'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.ScriptFileConfig` for more details.

Once the file has finished loading it will automatically be converted into a script element
via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to
false and then the resulting element will be appended to `document.head`. Any code then in the
script will be executed.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.ScriptFileConfig|Array.<Phaser.Types.Loader.FileTypes.ScriptFileConfig>,url?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-spritesheet
since: 3.0.0
name: spritesheet
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: SpriteSheetFile.js
metapath: loader/filetypes
description:
Adds a Sprite Sheet Image, or array of Sprite Sheet Images, to the current load queue.

The term 'Sprite Sheet' in Phaser means a fixed-size sheet. Where every frame in the sheet is the exact same size,
and you reference those frames using numbers, not frame names. This is not the same thing as a Texture Atlas, where
the frames are packed in a way where they take up the least amount of space, and are referenced by their names,
not numbers. Some articles and software use the term 'Sprite Sheet' to mean Texture Atlas, so please be aware of
what sort of file you're actually trying to load.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.
If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback
of animated gifs to Canvas elements.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.spritesheet({
    key: 'bot',
    url: 'images/robot.png',
    frameConfig: {
        frameWidth: 32,
        frameHeight: 38,
        startFrame: 0,
        endFrame: 8
    }
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig` for more details.

Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:

```javascript
this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });
// and later in your game ...
this.add.image(x, y, 'bot', 0);
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `PLAYER.` and the key was `Running` the final key will be `PLAYER.Running` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the `url` where the second element is the normal map:

```javascript
this.load.spritesheet('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ], { frameWidth: 256, frameHeight: 80 });
```

Or, if you are using a config object use the `normalMap` property:

```javascript
this.load.spritesheet({
    key: 'logo',
    url: 'images/AtariLogo.png',
    normalMap: 'images/AtariLogo-n.png',
    frameConfig: {
        frameWidth: 256,
        frameHeight: 80
    }
});
```

The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.

Note: The ability to load this type of file will only be available if the Sprite Sheet File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig|Array.<Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig>,url?:string,frameConfig?:Phaser.Types.Loader.FileTypes.ImageFrameConfig,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-svg
since: 3.0.0
name: svg
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: SVGFile.js
metapath: loader/filetypes
description:
Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they
will be rendered to bitmap textures and stored in the Texture Manager.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.svg('morty', 'images/Morty.svg');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.svg({
    key: 'morty',
    url: 'images/Morty.svg'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.SVGFileConfig` for more details.

Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:

```javascript
this.load.svg('morty', 'images/Morty.svg');
// and later in your game ...
this.add.image(x, y, 'morty');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.html". It will always add `.html` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture
at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down
or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize
the SVG to:

```javascript
function preload ()
{
    this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 });
}
```

Or when using a configuration object:

```javascript
this.load.svg({
    key: 'morty',
    url: 'images/Morty.svg',
    svgConfig: {
        width: 300,
        height: 600
    }
});
```

Alternatively, you can just provide a scale factor instead:

```javascript
function preload ()
{
    this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 });
}
```

Or when using a configuration object:

```javascript
this.load.svg({
    key: 'morty',
    url: 'images/Morty.svg',
    svgConfig: {
        scale: 2.5
    }
});
```

If scale, width and height values are all given, the scale has priority and the width and height values are ignored.

Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.SVGFileConfig|Array.<Phaser.Types.Loader.FileTypes.SVGFileConfig>,url?:string,svgConfig?:Phaser.Types.Loader.FileTypes.SVGSizeConfig,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-text
since: 3.0.0
name: text
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: TextFile.js
metapath: loader/filetypes
description:
Adds a Text file, or array of Text files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.text('story', 'files/IntroStory.txt');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Text Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Text Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.text({
    key: 'story',
    url: 'files/IntroStory.txt'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.text('story', 'files/IntroStory.txt');
// and later in your game ...
var data = this.cache.text.get('story');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
this is what you would use to retrieve the text from the Text Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "story"
and no URL is given then the Loader will set the URL to be "story.txt". It will always add `.txt` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.TextFileConfig|Array.<Phaser.Types.Loader.FileTypes.TextFileConfig>,url?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-tilemapCSV
since: 3.0.0
name: tilemapCSV
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: TilemapCSVFile.js
metapath: loader/filetypes
description:
Adds a CSV Tilemap file, or array of CSV files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.tilemapCSV('level1', 'maps/Level1.csv');
}
```

Tilemap CSV data can be created in a text editor, or a 3rd party app that exports as CSV.

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Text Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.tilemapCSV({
    key: 'level1',
    url: 'maps/Level1.csv'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.tilemapCSV('level1', 'maps/Level1.csv');
// and later in your game ...
var map = this.make.tilemap({ key: 'level1' });
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
this is what you would use to retrieve the text from the Tilemap Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "level"
and no URL is given then the Loader will set the URL to be "level.csv". It will always add `.csv` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Tilemap CSV File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig|Array.<Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig>,url?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-tilemapImpact
since: 3.7.0
name: tilemapImpact
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: TilemapImpactFile.js
metapath: loader/filetypes
description:
Adds an Impact.js Tilemap file, or array of map files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.tilemapImpact('level1', 'maps/Level1.json');
}
```

Impact Tilemap data is created the Impact.js Map Editor called Weltmeister.

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Text Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.tilemapImpact({
    key: 'level1',
    url: 'maps/Level1.json'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.tilemapImpact('level1', 'maps/Level1.json');
// and later in your game ...
var map = this.make.tilemap({ key: 'level1' });
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
this is what you would use to retrieve the text from the Tilemap Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "level"
and no URL is given then the Loader will set the URL to be "level.json". It will always add `.json` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Tilemap Impact File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig|Array.<Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig>,url?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-tilemapTiledJSON
since: 3.0.0
name: tilemapTiledJSON
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: TilemapJSONFile.js
metapath: loader/filetypes
description:
Adds a Tiled JSON Tilemap file, or array of map files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.tilemapTiledJSON('level1', 'maps/Level1.json');
}
```

The Tilemap data is created using the Tiled Map Editor and selecting JSON as the export format.

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Text Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.tilemapTiledJSON({
    key: 'level1',
    url: 'maps/Level1.json'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.tilemapTiledJSON('level1', 'maps/Level1.json');
// and later in your game ...
var map = this.make.tilemap({ key: 'level1' });
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and
this is what you would use to retrieve the text from the Tilemap Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "level"
and no URL is given then the Loader will set the URL to be "level.json". It will always add `.json` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the Tilemap JSON File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Array.<Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig>,url?:object|string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-unityAtlas
since: 3.0.0
name: unityAtlas
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: UnityAtlasFile.js
metapath: loader/filetypes
description:
Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.txt');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring
its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.

Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity.

Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Texture Manager.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Texture Manager first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.unityAtlas({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    atlasURL: 'images/MainMenu.txt'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig` for more details.

Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:

```javascript
this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');
// and later in your game ...
this.add.image(x, y, 'mainmenu', 'background');
```

To get a list of all available frames within an atlas please consult your Texture Atlas software.

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and
this is what you would use to retrieve the image from the Texture Manager.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,
then you can specify it by providing an array as the `url` where the second element is the normal map:

```javascript
this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.txt');
```

Or, if you are using a config object use the `normalMap` property:

```javascript
this.load.unityAtlas({
    key: 'mainmenu',
    textureURL: 'images/MainMenu.png',
    normalMap: 'images/MainMenu-n.png',
    atlasURL: 'images/MainMenu.txt'
});
```

The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.
Normal maps are a WebGL only feature.

Note: The ability to load this type of file will only be available if the Unity Atlas File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig|Array.<Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig>,textureURL?:string|Array.<string>,atlasURL?:string,textureXhrSettings?:Phaser.Types.Loader.XHRSettingsObject,atlasXhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-video
since: 3.20.0
name: video
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: VideoFile.js
metapath: loader/filetypes
description:
Adds a Video file, or array of video files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.video('intro', [ 'video/level1.mp4', 'video/level1.webm', 'video/level1.mov' ]);
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global Video Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the Video Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the Video Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.video({
    key: 'intro',
    url: [ 'video/level1.mp4', 'video/level1.webm', 'video/level1.mov' ],
    asBlob: false,
    noAudio: true
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.VideoFileConfig` for more details.

The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.

Due to different browsers supporting different video file types you should usually provide your video files in a variety of formats.
mp4, mov and webm are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on
browser support, starting with the first in the array and progressing to the end.

Unlike most asset-types, videos do not _need_ to be preloaded. You can create a Video Game Object and then call its `loadURL` method,
to load a video at run-time, rather than in advance.

Note: The ability to load this type of file will only be available if the Video File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.VideoFileConfig|Array.<Phaser.Types.Loader.FileTypes.VideoFileConfig>,urls?:string|Array.<string>,loadEvent?:string,asBlob?:boolean,noAudio?:boolean,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.LoaderPlugin-xml
since: 3.0.0
name: xml
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.LoaderPlugin.ADD
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: The Loader instance.
metafilename: XMLFile.js
metapath: loader/filetypes
description:
Adds an XML file, or array of XML files, to the current load queue.

You can call this method from within your Scene's `preload`, along with any other files you wish to load:

```javascript
function preload ()
{
    this.load.xml('wavedata', 'files/AlienWaveData.xml');
}
```

The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,
or if it's already running, when the next free load slot becomes available. This happens automatically if you
are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued
it means you cannot use the file immediately after calling this method, but must wait for the file to complete.
The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the
Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been
loaded.

The key must be a unique String. It is used to add the file to the global XML Cache upon a successful load.
The key should be unique both in terms of files being loaded and files already present in the XML Cache.
Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file
then remove it from the XML Cache first, before loading a new one.

Instead of passing arguments you can pass a configuration object, such as:

```javascript
this.load.xml({
    key: 'wavedata',
    url: 'files/AlienWaveData.xml'
});
```

See the documentation for `Phaser.Types.Loader.FileTypes.XMLFileConfig` for more details.

Once the file has finished loading you can access it from its Cache using its key:

```javascript
this.load.xml('wavedata', 'files/AlienWaveData.xml');
// and later in your game ...
var data = this.cache.xml.get('wavedata');
```

If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files
key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and
this is what you would use to retrieve the text from the XML Cache.

The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data"
and no URL is given then the Loader will set the URL to be "data.xml". It will always add `.xml` as the extension, although
this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.

Note: The ability to load this type of file will only be available if the XML File type has been built into Phaser.
It is available in the default build but can be excluded from custom builds.

signature:
key:string|Phaser.Types.Loader.FileTypes.XMLFileConfig|Array.<Phaser.Types.Loader.FileTypes.XMLFileConfig>,url?:string,xhrSettings?:Phaser.Types.Loader.XHRSettingsObject


longname: Phaser.Loader.FileTypesManager.install
since: 3.0.0
name: install
memberof: Phaser.Loader.FileTypesManager
scope: static
signature: loader:Phaser.Loader.LoaderPlugin
metafilename: FileTypesManager.js
metapath: loader
description:
Static method called when a LoaderPlugin is created.

Loops through the local types object and injects all of them as
properties into the LoaderPlugin instance.


longname: Phaser.Loader.FileTypesManager.register
since: 3.0.0
name: register
memberof: Phaser.Loader.FileTypesManager
scope: static
signature: key:string,factoryFunction:function
metafilename: FileTypesManager.js
metapath: loader
description:
Static method called directly by the File Types.

The key is a reference to the function used to load the files via the Loader, i.e. `image`.


longname: Phaser.Loader.LoaderPlugin-setBaseURL
since: 3.0.0
name: setBaseURL
memberof: Phaser.Loader.LoaderPlugin
scope: instance
signature: url?:string
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: This Loader object.
metafilename: LoaderPlugin.js
metapath: loader
description:
If you want to append a URL before the path of any asset you can set this here.

Useful if allowing the asset base url to be configured outside of the game code.

Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any
file _already_ being loaded. To reset it, call this method with no arguments.


longname: Phaser.Loader.LoaderPlugin-setPath
since: 3.0.0
name: setPath
memberof: Phaser.Loader.LoaderPlugin
scope: instance
signature: path?:string
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: This Loader object.
metafilename: LoaderPlugin.js
metapath: loader
description:
The value of `path`, if set, is placed before any _relative_ file path given. For example:

```javascript
this.load.setPath("images/sprites/");
this.load.image("ball", "ball.png");
this.load.image("tree", "level1/oaktree.png");
this.load.image("boom", "[http://server.com/explode.png](http://server.com/explode.png)");
```

Would load the `ball` file from `images/sprites/ball.png` and the tree from
`images/sprites/level1/oaktree.png` but the file `boom` would load from the URL
given as it's an absolute URL.

Please note that the path is added before the filename but *after* the baseURL (if set.)

Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any
file _already_ in the load queue. To reset it, call this method with no arguments.


longname: Phaser.Loader.LoaderPlugin-setPrefix
since: 3.7.0
name: setPrefix
memberof: Phaser.Loader.LoaderPlugin
scope: instance
signature: prefix?:string
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: This Loader object.
metafilename: LoaderPlugin.js
metapath: loader
description:
An optional prefix that is automatically prepended to the start of every file key.

If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`.

Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any
file _already_ in the load queue. To reset it, call this method with no arguments.


longname: Phaser.Loader.LoaderPlugin-setCORS
since: 3.0.0
name: setCORS
memberof: Phaser.Loader.LoaderPlugin
scope: instance
signature: crossOrigin?:string
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: This Loader object.
metafilename: LoaderPlugin.js
metapath: loader
description:
Sets the Cross Origin Resource Sharing value used when loading files.

Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config.

Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have
their own CORs setting. To reset it, call this method with no arguments.

For more details about CORs see [https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)


longname: Phaser.Loader.LoaderPlugin-addFile
since: 3.0.0
name: addFile
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.Events.ADD
signature: file:Phaser.Loader.File|Array.<Phaser.Loader.File>
metafilename: LoaderPlugin.js
metapath: loader
description:
Adds a file, or array of files, into the load queue.

The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key
used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache.
If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already
started, ready for the next batch of files to be pulled from the list to the inflight queue.

You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`,
however you can call this as long as the file given to it is well formed.


longname: Phaser.Loader.LoaderPlugin-keyExists
since: 3.7.0
name: keyExists
memberof: Phaser.Loader.LoaderPlugin
scope: instance
signature: file:Phaser.Loader.File
returnstype: boolean
returnsdescription: `true` if adding this file will cause a cache or queue conflict, otherwise `false`.
metafilename: LoaderPlugin.js
metapath: loader
description:
Checks the key and type of the given file to see if it will conflict with anything already
in a Cache, the Texture Manager, or the list or inflight queues.


longname: Phaser.Loader.LoaderPlugin-addPack
since: 3.7.0
name: addPack
memberof: Phaser.Loader.LoaderPlugin
scope: instance
signature: pack:any,packKey?:string
returnstype: boolean
returnsdescription: `true` if any files were added to the queue, otherwise `false`.
metafilename: LoaderPlugin.js
metapath: loader
description:
Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call
this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the
pack data. However, if you've got the data prepared you can pass it to this method.

You can also provide an optional key. If you do then it will only add the entries from that part of the pack into
to the load queue. If not specified it will add all entries it finds. For more details about the pack file format
see the `LoaderPlugin.pack` method.


longname: Phaser.Loader.LoaderPlugin-start
since: 3.0.0
name: start
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.Events.START
metafilename: LoaderPlugin.js
metapath: loader
description:
Starts the Loader running. This will reset the progress and totals and then emit a `start` event.
If there is nothing in the queue the Loader will immediately complete, otherwise it will start
loading the first batch of files.

The Loader is started automatically if the queue is populated within your Scenes `preload` method.

However, outside of this, you need to call this method to start it.

If the Loader is already running this method will simply return.


longname: Phaser.Loader.LoaderPlugin-updateProgress
since: 3.0.0
name: updateProgress
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.Events.PROGRESS
metafilename: LoaderPlugin.js
metapath: loader
description:
Called automatically during the load process.
It updates the `progress` value and then emits a progress event, which you can use to
display a loading bar in your game.


longname: Phaser.Loader.LoaderPlugin-checkLoadQueue
since: 3.7.0
name: checkLoadQueue
memberof: Phaser.Loader.LoaderPlugin
scope: instance
metafilename: LoaderPlugin.js
metapath: loader
access: private
description:
An internal method called by the Loader.

It will check to see if there are any more files in the pending list that need loading, and if so it will move
them from the list Set into the inflight Set, set their CORs flag and start them loading.

It will carrying on doing this for each file in the pending list until it runs out, or hits the max allowed parallel downloads.


longname: Phaser.Loader.LoaderPlugin-nextFile
since: 3.0.0
name: nextFile
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.Events.FILE_LOAD,Phaser.Loader.Events.FILE_LOAD_ERROR
signature: file:Phaser.Loader.File,success:boolean
metafilename: LoaderPlugin.js
metapath: loader
description:
An internal method called automatically by the XHRLoader belong to a File.

This method will remove the given file from the inflight Set and update the load progress.
If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue.


longname: Phaser.Loader.LoaderPlugin-fileProcessComplete
since: 3.7.0
name: fileProcessComplete
memberof: Phaser.Loader.LoaderPlugin
scope: instance
signature: file:Phaser.Loader.File
metafilename: LoaderPlugin.js
metapath: loader
description:
An internal method that is called automatically by the File when it has finished processing.

If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called.

It this then removed from the queue. If there are no more files to load `loadComplete` is called.


longname: Phaser.Loader.LoaderPlugin-loadComplete
since: 3.7.0
name: loadComplete
memberof: Phaser.Loader.LoaderPlugin
scope: instance
fires: Phaser.Loader.Events.COMPLETE,Phaser.Loader.Events.POST_PROCESS
metafilename: LoaderPlugin.js
metapath: loader
description:
Called at the end when the load queue is exhausted and all files have either loaded or errored.
By this point every loaded file will now be in its associated cache and ready for use.

Also clears down the Sets, puts progress to 1 and clears the deletion queue.


longname: Phaser.Loader.LoaderPlugin-saveJSON
since: 3.0.0
name: saveJSON
memberof: Phaser.Loader.LoaderPlugin
scope: instance
signature: data:*,filename?:string
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: This Loader plugin.
metafilename: LoaderPlugin.js
metapath: loader
description:
Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally.

The data must be well formed JSON and ready-parsed, not a JavaScript object.


longname: Phaser.Loader.LoaderPlugin-save
since: 3.0.0
name: save
memberof: Phaser.Loader.LoaderPlugin
scope: instance
signature: data:*,filename?:string,filetype?:string
returnstype: Phaser.Loader.LoaderPlugin
returnsdescription: This Loader plugin.
metafilename: LoaderPlugin.js
metapath: loader
description:
Causes the browser to save the given data as a file to its default Downloads folder.

Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href
to be an ObjectURL based on the given data, and then invokes a click event.


longname: Phaser.Loader.LoaderPlugin-reset
since: 3.0.0
name: reset
memberof: Phaser.Loader.LoaderPlugin
scope: instance
metafilename: LoaderPlugin.js
metapath: loader
description:
Resets the Loader.

This will clear all lists and reset the base URL, path and prefix.

Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted.


longname: Phaser.Loader.MergeXHRSettings
since: 3.0.0
name: MergeXHRSettings
memberof: Phaser.Loader
scope: static
signature: global:Phaser.Types.Loader.XHRSettingsObject,local:Phaser.Types.Loader.XHRSettingsObject
returnstype: Phaser.Types.Loader.XHRSettingsObject
returnsdescription: A newly formed XHRSettings object.
metafilename: MergeXHRSettings.js
metapath: loader
description:
Takes two XHRSettings Objects and creates a new XHRSettings object from them.

The new object is seeded by the values given in the global settings, but any setting in
the local object overrides the global ones.


longname: Phaser.Loader.XHRLoader
since: 3.0.0
name: XHRLoader
memberof: Phaser.Loader
scope: static
signature: file:Phaser.Loader.File,globalXHRSettings:Phaser.Types.Loader.XHRSettingsObject
returnstype: XMLHttpRequest
returnsdescription: The XHR object.
metafilename: XHRLoader.js
metapath: loader
description:
Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings
and starts the download of it. It uses the Files own XHRSettings and merges them
with the global XHRSettings object to set the xhr values before download.


longname: Phaser.Loader.XHRSettings
since: 3.0.0
name: XHRSettings
memberof: Phaser.Loader
description: Creates an XHRSettings Object with default values.
scope: static
returnstype: Phaser.Types.Loader.XHRSettingsObject
returnsdescription: The XHRSettings object as used by the Loader.
metafilename: XHRSettings.js
metapath: loader
signature:
responseType?:XMLHttpRequestResponseType,async?:boolean,user?:string,password?:string,timeout?:number,withCredentials?:boolean


longname: Phaser.Math.Angle.BetweenPoints
since: 3.0.0
name: BetweenPoints
memberof: Phaser.Math.Angle
scope: static
signature: point1:Phaser.Types.Math.Vector2Like,point2:Phaser.Types.Math.Vector2Like
returnstype: number
returnsdescription: The angle in radians.
metafilename: BetweenPoints.js
metapath: math/angle
description:
Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).

Calculates the angle of the vector from the first point to the second point.


longname: Phaser.Math.Angle.BetweenPointsY
since: 3.0.0
name: BetweenPointsY
memberof: Phaser.Math.Angle
scope: static
signature: point1:Phaser.Types.Math.Vector2Like,point2:Phaser.Types.Math.Vector2Like
returnstype: number
returnsdescription: The angle in radians.
metafilename: BetweenPointsY.js
metapath: math/angle
description:
Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).

The difference between this method and [Phaser.Math.Angle.BetweenPoints](Phaser.Math.Angle.BetweenPoints) is that this assumes the y coordinate
travels down the screen.


longname: Phaser.Math.Angle.BetweenY
since: 3.0.0
name: BetweenY
memberof: Phaser.Math.Angle
scope: static
signature: x1:number,y1:number,x2:number,y2:number
returnstype: number
returnsdescription: The angle in radians.
metafilename: BetweenY.js
metapath: math/angle
description:
Find the angle of a segment from (x1, y1) -> (x2, y2).

The difference between this method and [Phaser.Math.Angle.Between](Phaser.Math.Angle.Between) is that this assumes the y coordinate
travels down the screen.


longname: Phaser.Math.Angle.CounterClockwise
since: 3.16.0
name: CounterClockwise
memberof: Phaser.Math.Angle
scope: static
signature: angle:number
returnstype: number
returnsdescription: The converted angle, in radians.
metafilename: CounterClockwise.js
metapath: math/angle
description:
Takes an angle in Phasers default clockwise format and converts it so that
0 is North, 90 is West, 180 is South and 270 is East,
therefore running counter-clockwise instead of clockwise.

You can pass in the angle from a Game Object using:

```javascript
var converted = CounterClockwise(gameobject.rotation);
```

All values for this function are in radians.


longname: Phaser.Math.Angle.RotateTo
since: 3.0.0
name: RotateTo
memberof: Phaser.Math.Angle
scope: static
signature: currentAngle:number,targetAngle:number,lerp?:number
returnstype: number
returnsdescription: The adjusted angle.
metafilename: RotateTo.js
metapath: math/angle
description:
Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.


longname: Phaser.Math.Angle.ShortestBetween
since: 3.0.0
name: ShortestBetween
memberof: Phaser.Math.Angle
scope: static
signature: angle1:number,angle2:number
returnstype: number
returnsdescription: The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.
metafilename: ShortestBetween.js
metapath: math/angle
description:
Gets the shortest angle between `angle1` and `angle2`.

Both angles must be in the range -180 to 180, which is the same clamped
range that `sprite.angle` uses, so you can pass in two sprite angles to
this method and get the shortest angle back between the two of them.

The angle returned will be in the same range. If the returned angle is
greater than 0 then it's a counter-clockwise rotation, if < 0 then it's
a clockwise rotation.


longname: Phaser.Math.CeilTo
since: 3.0.0
name: CeilTo
memberof: Phaser.Math
scope: static
signature: value:number,place?:number,base?:number
returnstype: number
returnsdescription: The rounded value.
metafilename: CeilTo.js
metapath: math
description:
Ceils to some place comparative to a `base`, default is 10 for decimal place.

The `place` is represented by the power applied to `base` to get that place.


longname: Phaser.Math.Distance.Chebyshev
since: 3.22.0
name: Chebyshev
memberof: Phaser.Math.Distance
scope: static
signature: x1:number,y1:number,x2:number,y2:number
returnstype: number
returnsdescription: The distance between each point.
metafilename: DistanceChebyshev.js
metapath: math/distance
description:
Calculate the Chebyshev distance between two sets of coordinates (points).

Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.
It's the effective distance when movement can be horizontal, vertical, or diagonal.


longname: Phaser.Math.Distance.Snake
since: 3.22.0
name: Snake
memberof: Phaser.Math.Distance
scope: static
signature: x1:number,y1:number,x2:number,y2:number
returnstype: number
returnsdescription: The distance between each point.
metafilename: DistanceSnake.js
metapath: math/distance
description:
Calculate the snake distance between two sets of coordinates (points).

Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.
It's the effective distance when movement is allowed only horizontally or vertically (but not both).


longname: Phaser.Math.FloatBetween
since: 3.0.0
name: FloatBetween
memberof: Phaser.Math
scope: static
signature: min:number,max:number
returnstype: number
returnsdescription: A random float within the given range.
metafilename: FloatBetween.js
metapath: math
description:
Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.


longname: Phaser.Math.FloorTo
since: 3.0.0
name: FloorTo
memberof: Phaser.Math
scope: static
signature: value:number,place?:number,base?:number
returnstype: number
returnsdescription: The rounded value.
metafilename: FloorTo.js
metapath: math
description:
Floors to some place comparative to a `base`, default is 10 for decimal place.

The `place` is represented by the power applied to `base` to get that place.


longname: Phaser.Math.Fuzzy.Equal
since: 3.0.0
name: Equal
memberof: Phaser.Math.Fuzzy
scope: static
signature: a:number,b:number,epsilon?:number
returnstype: boolean
returnsdescription: `true` if the values are fuzzily equal, otherwise `false`.
metafilename: Equal.js
metapath: math/fuzzy
description:
Check whether the given values are fuzzily equal.

Two numbers are fuzzily equal if their difference is less than `epsilon`.


longname: Phaser.Math.Fuzzy.GreaterThan
since: 3.0.0
name: GreaterThan
memberof: Phaser.Math.Fuzzy
scope: static
signature: a:number,b:number,epsilon?:number
returnstype: boolean
returnsdescription: `true` if `a` is fuzzily greater than than `b`, otherwise `false`.
metafilename: GreaterThan.js
metapath: math/fuzzy
description:
Check whether `a` is fuzzily greater than `b`.

`a` is fuzzily greater than `b` if it is more than `b - epsilon`.


longname: Phaser.Math.Fuzzy.LessThan
since: 3.0.0
name: LessThan
memberof: Phaser.Math.Fuzzy
scope: static
signature: a:number,b:number,epsilon?:number
returnstype: boolean
returnsdescription: `true` if `a` is fuzzily less than `b`, otherwise `false`.
metafilename: LessThan.js
metapath: math/fuzzy
description:
Check whether `a` is fuzzily less than `b`.

`a` is fuzzily less than `b` if it is less than `b + epsilon`.


longname: Phaser.Math.Interpolation.CubicBezier
since: 3.0.0
name: CubicBezier
memberof: Phaser.Math.Interpolation
scope: static
signature: t:number,p0:number,p1:number,p2:number,p3:number
returnstype: number
returnsdescription: The interpolated value.
metafilename: CubicBezierInterpolation.js
metapath: math/interpolation
description:
A cubic bezier interpolation method.

[https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a](https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a)


longname: Phaser.Math.Matrix3-scale
since: 3.0.0
name: scale
memberof: Phaser.Math.Matrix3
scope: instance
signature: v:Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4
returnstype: Phaser.Math.Matrix3
returnsdescription: This Matrix3.
metafilename: Matrix3.js
metapath: math
description:
Apply a scale transformation to this Matrix.

Uses the `x` and `y` components of the given Vector to scale the Matrix.


longname: Phaser.Math.Matrix4-setValues
since: 3.50.0
name: setValues
memberof: Phaser.Math.Matrix4
description: Sets all values of this Matrix4.
scope: instance
returnstype: Phaser.Math.Matrix4
returnsdescription: This Matrix4 instance.
metafilename: Matrix4.js
metapath: math
signature:
m00:number,m01:number,m02:number,m03:number,m10:number,m11:number,m12:number,m13:number,m20:number,m21:number,m22:number,m23:number,m30:number,m31:number,m32:number,m33:number


longname: Phaser.Math.Matrix4-premultiply
since: 3.50.0
name: premultiply
memberof: Phaser.Math.Matrix4
scope: instance
signature: m:Phaser.Math.Matrix4
returnstype: Phaser.Math.Matrix4
returnsdescription: This Matrix4.
metafilename: Matrix4.js
metapath: math
description:
Multiplies the given Matrix4 object with this Matrix.

This is the same as calling `multiplyMatrices(m, this)`.


longname: Phaser.Math.Matrix4-scale
since: 3.0.0
name: scale
memberof: Phaser.Math.Matrix4
scope: instance
signature: v:Phaser.Math.Vector3|Phaser.Math.Vector4
returnstype: Phaser.Math.Matrix4
returnsdescription: This Matrix4.
metafilename: Matrix4.js
metapath: math
description:
Apply a scale transformation to this Matrix.

Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.


longname: Phaser.Math.Matrix4-setWorldMatrix
since: 3.0.0
name: setWorldMatrix
memberof: Phaser.Math.Matrix4
scope: instance
returnstype: Phaser.Math.Matrix4
returnsdescription: This Matrix4.
metafilename: Matrix4.js
metapath: math
description:
Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.

signature:
rotation:Phaser.Math.Vector3,position:Phaser.Math.Vector3,scale:Phaser.Math.Vector3,viewMatrix?:Phaser.Math.Matrix4,projectionMatrix?:Phaser.Math.Matrix4


longname: Phaser.Math.Median
since: 3.54.0
name: Median
memberof: Phaser.Math
scope: static
signature: values:Array.<number>
returnstype: number
returnsdescription: The median value.
metafilename: Median.js
metapath: math
description:
Calculate the median of the given values. The values are sorted and the middle value is returned.
In case of an even number of values, the average of the two middle values is returned.


longname: Phaser.Math.Percent
since: 3.0.0
name: Percent
memberof: Phaser.Math
scope: static
signature: value:number,min:number,max?:number,upperMax?:number
returnstype: number
returnsdescription: A value between 0 and 1 representing the percentage.
metafilename: Percent.js
metapath: math
description:
Work out what percentage `value` is of the range between `min` and `max`.
If `max` isn't given then it will return the percentage of `value` to `min`.

You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.


longname: Phaser.Math.Pow2.IsSize
since: 3.0.0
name: IsSize
memberof: Phaser.Math.Pow2
scope: static
signature: width:number,height:number
returnstype: boolean
returnsdescription: `true` if `width` and `height` are a power of two, otherwise `false`.
metafilename: IsSizePowerOfTwo.js
metapath: math/pow2
description:
Checks if the given `width` and `height` are a power of two.
Useful for checking texture dimensions.


longname: Phaser.Math.RandomDataGenerator-sow
since: 3.0.0
name: sow
memberof: Phaser.Math.RandomDataGenerator
scope: instance
signature: seeds:Array.<string>
metafilename: RandomDataGenerator.js
metapath: math/random-data-generator
description:
Reset the seed of the random data generator.

_Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.


longname: Phaser.Math.RandomDataGenerator-between
since: 3.0.0
name: between
memberof: Phaser.Math.RandomDataGenerator
scope: instance
signature: min:number,max:number
returnstype: number
returnsdescription: A random number between min and max.
metafilename: RandomDataGenerator.js
metapath: math/random-data-generator
description:
Returns a random integer between and including min and max.
This method is an alias for RandomDataGenerator.integerInRange.


longname: Phaser.Math.RandomDataGenerator-uuid
since: 3.0.0
name: uuid
memberof: Phaser.Math.RandomDataGenerator
scope: instance
returnstype: string
returnsdescription: A valid RFC4122 version4 ID hex string
metafilename: RandomDataGenerator.js
metapath: math/random-data-generator
description:
Returns a valid RFC4122 version4 ID hex string from [https://gist.github.com/1308368](https://gist.github.com/1308368)


longname: Phaser.Math.RandomDataGenerator-timestamp
since: 3.0.0
name: timestamp
memberof: Phaser.Math.RandomDataGenerator
scope: instance
signature: min:number,max:number
returnstype: number
returnsdescription: A random timestamp between min and max.
metafilename: RandomDataGenerator.js
metapath: math/random-data-generator
description:
Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.


longname: Phaser.Math.RandomDataGenerator-state
since: 3.0.0
name: state
memberof: Phaser.Math.RandomDataGenerator
scope: instance
signature: state?:string
returnstype: string
returnsdescription: The current state of the generator.
metafilename: RandomDataGenerator.js
metapath: math/random-data-generator
description:
Gets or Sets the state of the generator. This allows you to retain the values
that the generator is using between games, i.e. in a game save file.

To seed this generator with a previously saved state you can pass it as the
`seed` value in your game config, or call this method directly after Phaser has booted.

Call this method with no parameters to return the current state.

If providing a state it should match the same format that this method
returns, which is a string with a header `!rnd` followed by the `c`,
`s0`, `s1` and `s2` values respectively, each comma-delimited.


longname: Phaser.Math.RandomXY
since: 3.0.0
name: RandomXY
memberof: Phaser.Math
scope: static
signature: vector:Phaser.Math.Vector2,scale?:number
returnstype: Phaser.Math.Vector2
returnsdescription: The given Vector.
metafilename: RandomXY.js
metapath: math
description:
Compute a random unit vector.

Computes random values for the given vector between -1 and 1 that can be used to represent a direction.

Optionally accepts a scale value to scale the resulting vector by.


longname: Phaser.Math.RotateAround
since: 3.0.0
name: RotateAround
memberof: Phaser.Math
scope: static
signature: point:Phaser.Geom.Point|object,x:number,y:number,angle:number
returnstype: Phaser.Types.Math.Vector2Like
returnsdescription: The given point.
metafilename: RotateAround.js
metapath: math
description:
Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.

In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).


longname: Phaser.Math.RotateAroundDistance
since: 3.0.0
name: RotateAroundDistance
memberof: Phaser.Math
scope: static
signature: point:Phaser.Geom.Point|object,x:number,y:number,angle:number,distance:number
returnstype: Phaser.Types.Math.Vector2Like
returnsdescription: The given point.
metafilename: RotateAroundDistance.js
metapath: math
description:
Rotate a `point` around `x` and `y` by the given `angle` and `distance`.

In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).


longname: Phaser.Math.RotateVec3
since: 3.0.0
name: RotateVec3
memberof: Phaser.Math
scope: static
signature: vec:Phaser.Math.Vector3,axis:Phaser.Math.Vector3,radians:number
returnstype: Phaser.Math.Vector3
returnsdescription: The given vector.
metafilename: RotateVec3.js
metapath: math
description:
Rotates a vector in place by axis angle.

This is the same as transforming a point by an
axis-angle quaternion, but it has higher precision.


longname: Phaser.Math.RoundAwayFromZero
since: 3.0.0
name: RoundAwayFromZero
memberof: Phaser.Math
scope: static
signature: value:number
returnstype: number
returnsdescription: The rounded number, rounded away from zero.
metafilename: RoundAwayFromZero.js
metapath: math
description:
Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.


longname: Phaser.Math.RoundTo
since: 3.0.0
name: RoundTo
memberof: Phaser.Math
scope: static
signature: value:number,place?:number,base?:number
returnstype: number
returnsdescription: The rounded value.
metafilename: RoundTo.js
metapath: math
description:
Round a value to the given precision.

For example:

```javascript
RoundTo(123.456, 0) = 123
RoundTo(123.456, 1) = 120
RoundTo(123.456, 2) = 100
```

To round the decimal, i.e. to round to precision, pass in a negative `place`:

```javascript
RoundTo(123.456789, 0) = 123
RoundTo(123.456789, -1) = 123.5
RoundTo(123.456789, -2) = 123.46
RoundTo(123.456789, -3) = 123.457
```


longname: Phaser.Math.SmootherStep
since: 3.0.0
name: SmootherStep
memberof: Phaser.Math
scope: static
signature: x:number,min:number,max:number
returnstype: number
returnsdescription: The percentage of interpolation, between 0 and 1.
metafilename: SmootherStep.js
metapath: math
description:
Calculate a smoother interpolation percentage of `x` between `min` and `max`.

The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,
1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,
between 0 and 1 otherwise.

Produces an even smoother interpolation than [Phaser.Math.SmoothStep](Phaser.Math.SmoothStep).


longname: Phaser.Math.SmoothStep
since: 3.0.0
name: SmoothStep
memberof: Phaser.Math
scope: static
signature: x:number,min:number,max:number
returnstype: number
returnsdescription: The percentage of interpolation, between 0 and 1.
metafilename: SmoothStep.js
metapath: math
description:
Calculate a smooth interpolation percentage of `x` between `min` and `max`.

The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,
1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,
between 0 and 1 otherwise.


longname: Phaser.Math.Snap.Ceil
since: 3.0.0
name: Ceil
memberof: Phaser.Math.Snap
scope: static
signature: value:number,gap:number,start?:number,divide?:boolean
returnstype: number
returnsdescription: The snapped value.
metafilename: SnapCeil.js
metapath: math/snap
description:
Snap a value to nearest grid slice, using ceil.

Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.
As will `14` snap to `15`... but `16` will snap to `20`.


longname: Phaser.Math.Snap.Floor
since: 3.0.0
name: Floor
memberof: Phaser.Math.Snap
scope: static
signature: value:number,gap:number,start?:number,divide?:boolean
returnstype: number
returnsdescription: The snapped value.
metafilename: SnapFloor.js
metapath: math/snap
description:
Snap a value to nearest grid slice, using floor.

Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.
As will `14` snap to `10`... but `16` will snap to `15`.


longname: Phaser.Math.Snap.To
since: 3.0.0
name: To
memberof: Phaser.Math.Snap
scope: static
signature: value:number,gap:number,start?:number,divide?:boolean
returnstype: number
returnsdescription: The snapped value.
metafilename: SnapTo.js
metapath: math/snap
description:
Snap a value to nearest grid slice, using rounding.

Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.


longname: Phaser.Math.ToXY
since: 3.19.0
name: ToXY
memberof: Phaser.Math
scope: static
signature: index:number,width:number,height:number,out?:Phaser.Math.Vector2
returnstype: Phaser.Math.Vector2
returnsdescription: A Vector2 where the x and y properties contain the given grid index.
metafilename: ToXY.js
metapath: math
description:
Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.

For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.

If the given index is out of range an empty Vector2 is returned.


longname: Phaser.Math.TransformXY
since: 3.0.0
name: TransformXY
memberof: Phaser.Math
scope: static
returnstype: Phaser.Math.Vector2|Phaser.Geom.Point|object
returnsdescription: The translated point.
metafilename: TransformXY.js
metapath: math
description:
Takes the `x` and `y` coordinates and transforms them into the same space as
defined by the position, rotation and scale values.

signature:
x:number,y:number,positionX:number,positionY:number,rotation:number,scaleX:number,scaleY:number,output?:Phaser.Math.Vector2|Phaser.Geom.Point|object


longname: Phaser.Math.Vector2-equals
since: 3.0.0
name: equals
memberof: Phaser.Math.Vector2
scope: instance
signature: v:Phaser.Types.Math.Vector2Like
returnstype: boolean
returnsdescription: Whether the given Vector is equal to this Vector.
metafilename: Vector2.js
metapath: math
description:
Check whether this Vector is equal to a given Vector.

Performs a strict equality check against each Vector's components.


longname: Phaser.Math.Vector2-multiply
since: 3.0.0
name: multiply
memberof: Phaser.Math.Vector2
scope: instance
signature: src:Phaser.Types.Math.Vector2Like
returnstype: Phaser.Math.Vector2
returnsdescription: This Vector2.
metafilename: Vector2.js
metapath: math
description:
Perform a component-wise multiplication between this Vector and the given Vector.

Multiplies this Vector by the given Vector.


longname: Phaser.Math.Vector2-divide
since: 3.0.0
name: divide
memberof: Phaser.Math.Vector2
scope: instance
signature: src:Phaser.Types.Math.Vector2Like
returnstype: Phaser.Math.Vector2
returnsdescription: This Vector2.
metafilename: Vector2.js
metapath: math
description:
Perform a component-wise division between this Vector and the given Vector.

Divides this Vector by the given Vector.


longname: Phaser.Math.Vector2-normalize
since: 3.0.0
name: normalize
memberof: Phaser.Math.Vector2
scope: instance
returnstype: Phaser.Math.Vector2
returnsdescription: This Vector2.
metafilename: Vector2.js
metapath: math
description:
Normalize this Vector.

Makes the vector a unit length vector (magnitude of 1) in the same direction.


longname: Phaser.Math.Vector2-lerp
since: 3.0.0
name: lerp
memberof: Phaser.Math.Vector2
scope: instance
signature: src:Phaser.Types.Math.Vector2Like,t?:number
returnstype: Phaser.Math.Vector2
returnsdescription: This Vector2.
metafilename: Vector2.js
metapath: math
description:
Linearly interpolate between this Vector and the given Vector.

Interpolates this Vector towards the given Vector.


longname: Phaser.Math.Vector3-fromArray
since: 3.50.0
name: fromArray
memberof: Phaser.Math.Vector3
scope: instance
signature: array:Array.<number>,offset?:number
returnstype: Phaser.Math.Vector3
returnsdescription: This Vector3.
metafilename: Vector3.js
metapath: math
description:
Sets the components of this Vector3 from the given array, based on the offset.

Vector3.x = array[offset]
Vector3.y = array[offset + 1]
Vector3.z = array[offset + 2]


longname: Phaser.Math.Vector3-project
since: 3.0.0
name: project
memberof: Phaser.Math.Vector3
scope: instance
signature: mat:Phaser.Math.Matrix4
returnstype: Phaser.Math.Vector3
returnsdescription: This Vector3.
metafilename: Vector3.js
metapath: math
description:
Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,
e.g. unprojecting a 2D point into 3D space.


longname: Phaser.Math.Vector3-unproject
since: 3.0.0
name: unproject
memberof: Phaser.Math.Vector3
scope: instance
signature: viewport:Phaser.Math.Vector4,invProjectionView:Phaser.Math.Matrix4
returnstype: Phaser.Math.Vector3
returnsdescription: This Vector3.
metafilename: Vector3.js
metapath: math
description:
Unproject this point from 2D space to 3D space.
The point should have its x and y properties set to
2D screen space, and the z either at 0 (near plane)
or 1 (far plane). The provided matrix is assumed to already
be combined, i.e. projection * view * model.

After this operation, this vector's (x, y, z) components will
represent the unprojected 3D coordinate.


longname: Phaser.Math.Vector4-equals
since: 3.0.0
name: equals
memberof: Phaser.Math.Vector4
scope: instance
signature: v:Phaser.Math.Vector4
returnstype: boolean
returnsdescription: A boolean indicating whether the two Vectors are equal or not.
metafilename: Vector4.js
metapath: math
description:
Check whether this Vector is equal to a given Vector.

Performs a strict quality check against each Vector's components.


longname: Phaser.Math.Vector4-set
since: 3.0.0
name: set
memberof: Phaser.Math.Vector4
scope: instance
signature: x:number|object,y:number,z:number,w:number
returnstype: Phaser.Math.Vector4
returnsdescription: This Vector4.
metafilename: Vector4.js
metapath: math
description:
Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.


longname: Phaser.Physics.Arcade.ArcadePhysics-enableUpdate
since: 3.50.0
name: enableUpdate
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Causes `World.update` to be automatically called each time the Scene
emits and `UPDATE` event. This is the default setting, so only needs
calling if you have specifically disabled it.


longname: Phaser.Physics.Arcade.ArcadePhysics-disableUpdate
since: 3.50.0
name: disableUpdate
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Causes `World.update` to **not** be automatically called each time the Scene
emits and `UPDATE` event.

If you wish to run the World update at your own rate, or from your own
component, then you should call this method to disable the built-in link,
and then call `World.update(delta, time)` accordingly.

Note that `World.postUpdate` is always automatically called when the Scene
emits a `POST_UPDATE` event, regardless of this setting.


longname: Phaser.Physics.Arcade.ArcadePhysics-overlap
since: 3.0.0
name: overlap
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
returnstype: boolean
returnsdescription: True if at least one Game Object overlaps another.
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Tests if Game Objects overlap. See [Phaser.Physics.Arcade.World#overlap](Phaser.Physics.Arcade.World#overlap)

signature:
object1:Phaser.Types.Physics.Arcade.ArcadeColliderType,object2?:Phaser.Types.Physics.Arcade.ArcadeColliderType,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:*


longname: Phaser.Physics.Arcade.ArcadePhysics-collide
since: 3.0.0
name: collide
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
returnstype: boolean
returnsdescription: True if any overlapping Game Objects were separated, otherwise false.
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Performs a collision check and separation between the two physics enabled objects given, which can be single
Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.

If you don't require separation then use [#overlap](#overlap) instead.

If two Groups or arrays are passed, each member of one will be tested against each member of the other.

If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.

If **only** one Array is passed, the array is iterated and every element in it is tested against the others.

Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding
objects are passed to it.

Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable
for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.
The separation that stops two objects penetrating may create a new penetration against a different object. If you
require a high level of stability please consider using an alternative physics system, such as Matter.js.

signature:
object1:Phaser.Types.Physics.Arcade.ArcadeColliderType,object2?:Phaser.Types.Physics.Arcade.ArcadeColliderType,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:*


longname: Phaser.Physics.Arcade.ArcadePhysics-collideTiles
since: 3.17.0
name: collideTiles
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
fires: Phaser.Physics.Arcade.Events.TILE_COLLIDE
returnstype: boolean
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
This advanced method is specifically for testing for collision between a single Sprite and an array of Tile objects.

You should generally use the `collide` method instead, with a Sprite vs. a Tilemap Layer, as that will perform
tile filtering and culling for you, as well as handle the interesting face collision automatically.

This method is offered for those who would like to check for collision with specific Tiles in a layer, without
having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic collisions
on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,
you should filter them before passing them to this method.

Important: Use of this method skips the `interesting faces` system that Tilemap Layers use. This means if you have
say a row or column of tiles, and you jump into, or walk over them, it's possible to get stuck on the edges of the
tiles as the interesting face calculations are skipped. However, for quick-fire small collision set tests on
dynamic maps, this method can prove very useful.

signature:
sprite:Phaser.GameObjects.GameObject,tiles:Array.<Phaser.Tilemaps.Tile>,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:any

returnsdescription:
True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.


longname: Phaser.Physics.Arcade.ArcadePhysics-overlapTiles
since: 3.17.0
name: overlapTiles
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
fires: Phaser.Physics.Arcade.Events.TILE_OVERLAP
returnstype: boolean
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.

You should generally use the `overlap` method instead, with a Sprite vs. a Tilemap Layer, as that will perform
tile filtering and culling for you, as well as handle the interesting face collision automatically.

This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without
having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap
tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,
you should filter them before passing them to this method.

signature:
sprite:Phaser.GameObjects.GameObject,tiles:Array.<Phaser.Tilemaps.Tile>,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:any

returnsdescription:
True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.


longname: Phaser.Physics.Arcade.ArcadePhysics-accelerateTo
since: 3.0.0
name: accelerateTo
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
returnstype: number
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared)

You must give a maximum speed value, beyond which the game object won't go any faster.

Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.
Note: The game object doesn't stop moving once it reaches the destination coordinates.

signature:
gameObject:Phaser.GameObjects.GameObject,x:number,y:number,speed?:number,xSpeedMax?:number,ySpeedMax?:number

returnsdescription:
The angle (in radians) that the object should be visually set to in order to match its new velocity.


longname: Phaser.Physics.Arcade.ArcadePhysics-accelerateToObject
since: 3.0.0
name: accelerateToObject
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
returnstype: number
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared)

You must give a maximum speed value, beyond which the game object won't go any faster.

Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.
Note: The game object doesn't stop moving once it reaches the destination coordinates.

signature:
gameObject:Phaser.GameObjects.GameObject,destination:Phaser.GameObjects.GameObject,speed?:number,xSpeedMax?:number,ySpeedMax?:number

returnsdescription:
The angle (in radians) that the object should be visually set to in order to match its new velocity.


longname: Phaser.Physics.Arcade.ArcadePhysics-closest
since: 3.0.0
name: closest
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
returnstype: Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|Phaser.GameObjects.GameObject
returnsdescription: The target closest to the given source point.
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Finds the Body or Game Object closest to a source point or object.

If a `targets` argument is passed, this method finds the closest of those.
The targets can be Arcade Physics Game Objects, Dynamic Bodies, or Static Bodies.

If no `targets` argument is passed, this method finds the closest Dynamic Body.

If two or more targets are the exact same distance from the source point, only the first target
is returned.

signature:
source:any,targets?:Array.<Phaser.Physics.Arcade.Body>|Array.<Phaser.Physics.Arcade.StaticBody>|Array.<Phaser.GameObjects.GameObject>


longname: Phaser.Physics.Arcade.ArcadePhysics-furthest
since: 3.0.0
name: furthest
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
returnstype: Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|Phaser.GameObjects.GameObject
returnsdescription: The target farthest from the given source point.
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Finds the Body or Game Object farthest from a source point or object.

If a `targets` argument is passed, this method finds the farthest of those.
The targets can be Arcade Physics Game Objects, Dynamic Bodies, or Static Bodies.

If no `targets` argument is passed, this method finds the farthest Dynamic Body.

If two or more targets are the exact same distance from the source point, only the first target
is returned.

signature:
source:any,targets?:Array.<Phaser.Physics.Arcade.Body>|Array.<Phaser.Physics.Arcade.StaticBody>|Array.<Phaser.GameObjects.GameObject>


longname: Phaser.Physics.Arcade.ArcadePhysics-moveTo
since: 3.0.0
name: moveTo
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,x:number,y:number,speed?:number,maxTime?:number
returnstype: number
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Move the given display object towards the x/y coordinates at a steady velocity.
If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.
Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.
Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
Note: The display object doesn't stop moving once it reaches the destination coordinates.
Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

returnsdescription:
The angle (in radians) that the object should be visually set to in order to match its new velocity.


longname: Phaser.Physics.Arcade.ArcadePhysics-moveToObject
since: 3.0.0
name: moveToObject
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,destination:object,speed?:number,maxTime?:number
returnstype: number
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Move the given display object towards the destination object at a steady velocity.
If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds.
Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.
Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
Note: The display object doesn't stop moving once it reaches the destination coordinates.
Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)


longname: Phaser.Physics.Arcade.ArcadePhysics-velocityFromAngle
since: 3.0.0
name: velocityFromAngle
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
signature: angle:number,speed?:number,vec2?:Phaser.Math.Vector2
returnstype: Phaser.Math.Vector2
returnsdescription: The Vector2 that stores the velocity.
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Given the angle (in degrees) and speed calculate the velocity and return it as a vector, or set it to the given vector object.
One way to use this is: velocityFromAngle(angle, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.


longname: Phaser.Physics.Arcade.ArcadePhysics-velocityFromRotation
since: 3.0.0
name: velocityFromRotation
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
signature: rotation:number,speed?:number,vec2?:Phaser.Math.Vector2
returnstype: Phaser.Math.Vector2
returnsdescription: The Vector2 that stores the velocity.
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
Given the rotation (in radians) and speed calculate the velocity and return it as a vector, or set it to the given vector object.
One way to use this is: velocityFromRotation(rotation, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.


longname: Phaser.Physics.Arcade.ArcadePhysics-overlapRect
since: 3.17.0
name: overlapRect
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
signature: x:number,y:number,width:number,height:number,includeDynamic?:boolean,includeStatic?:boolean
returnstype: Array.<Phaser.Physics.Arcade.Body>|Array.<Phaser.Physics.Arcade.StaticBody>
returnsdescription: An array of bodies that overlap with the given area.
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
This method will search the given rectangular area and return an array of all physics bodies that
overlap with it. It can return either Dynamic, Static bodies or a mixture of both.

A body only has to intersect with the search area to be considered, it doesn't have to be fully
contained within it.

If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast,
otherwise the search is O(N) for Dynamic Bodies.


longname: Phaser.Physics.Arcade.ArcadePhysics-overlapCirc
since: 3.21.0
name: overlapCirc
memberof: Phaser.Physics.Arcade.ArcadePhysics
scope: instance
signature: x:number,y:number,radius:number,includeDynamic?:boolean,includeStatic?:boolean
returnstype: Array.<Phaser.Physics.Arcade.Body>|Array.<Phaser.Physics.Arcade.StaticBody>
returnsdescription: An array of bodies that overlap with the given area.
metafilename: ArcadePhysics.js
metapath: physics/arcade
description:
This method will search the given circular area and return an array of all physics bodies that
overlap with it. It can return either Dynamic, Static bodies or a mixture of both.

A body only has to intersect with the search area to be considered, it doesn't have to be fully
contained within it.

If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast,
otherwise the search is O(N) for Dynamic Bodies.


longname: Phaser.Physics.Arcade.Body-updateBounds
since: 3.0.0
name: updateBounds
memberof: Phaser.Physics.Arcade.Body
scope: instance
metafilename: Body.js
metapath: physics/arcade
description:
Updates the Body's `transform`, `width`, `height`, and `center` from its Game Object.
The Body's `position` isn't changed.


longname: Phaser.Physics.Arcade.Body-updateFromGameObject
since: 3.24.0
name: updateFromGameObject
memberof: Phaser.Physics.Arcade.Body
scope: instance
metafilename: Body.js
metapath: physics/arcade
description:
Updates the Body's `position`, `width`, `height`, and `center` from its Game Object and `offset`.

You don't need to call this for Dynamic Bodies, as it happens automatically during the physics step.
But you could use it if you have modified the Body offset or Game Object transform and need to immediately
read the Body's new `position` or `center`.

To resynchronize the Body with its Game Object, use `reset()` instead.


longname: Phaser.Physics.Arcade.Body-resetFlags
since: 3.18.0
name: resetFlags
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: clear?:boolean
metafilename: Body.js
metapath: physics/arcade
description:
Prepares the Body for a physics step by resetting the `wasTouching`, `touching` and `blocked` states.

This method is only called if the physics world is going to run a step this frame.


longname: Phaser.Physics.Arcade.Body-preUpdate
since: 3.17.0
name: preUpdate
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: willStep:boolean,delta:number
metafilename: Body.js
metapath: physics/arcade
description:
Syncs the position body position with the parent Game Object.

This method is called every game frame, regardless if the world steps or not.


longname: Phaser.Physics.Arcade.Body-update
since: 3.0.0
name: update
memberof: Phaser.Physics.Arcade.Body
scope: instance
fires: Phaser.Physics.Arcade.Events.WORLD_BOUNDS
signature: delta:number
metafilename: Body.js
metapath: physics/arcade
description:
Performs a single physics step and updates the body velocity, angle, speed and other properties.

This method can be called multiple times per game frame, depending on the physics step rate.

The results are synced back to the Game Object in `postUpdate`.


longname: Phaser.Physics.Arcade.Body-postUpdate
since: 3.0.0
name: postUpdate
memberof: Phaser.Physics.Arcade.Body
scope: instance
metafilename: Body.js
metapath: physics/arcade
description:
Feeds the Body results back into the parent Game Object.

This method is called every game frame, regardless if the world steps or not.


longname: Phaser.Physics.Arcade.Body-setBoundsRectangle
since: 3.20
name: setBoundsRectangle
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: bounds?:Phaser.Geom.Rectangle
returnstype: Phaser.Physics.Arcade.Body
returnsdescription: This Body object.
metafilename: Body.js
metapath: physics/arcade
description:
Sets a custom collision boundary rectangle. Use if you want to have a custom
boundary instead of the world boundaries.


longname: Phaser.Physics.Arcade.Body-setOffset
since: 3.0.0
name: setOffset
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: x:number,y?:number
returnstype: Phaser.Physics.Arcade.Body
returnsdescription: This Body object.
metafilename: Body.js
metapath: physics/arcade
description:
Sets the offset of the Body's position from its Game Object's position.
The Body's `position` isn't changed until the next `preUpdate`.


longname: Phaser.Physics.Arcade.Body-setSize
since: 3.0.0
name: setSize
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: width?:number,height?:number,center?:boolean
returnstype: Phaser.Physics.Arcade.Body
returnsdescription: This Body object.
metafilename: Body.js
metapath: physics/arcade
description:
Sizes and positions this Body, as a rectangle.
Modifies the Body `offset` if `center` is true (the default).
Resets the width and height to match current frame, if no width and height provided and a frame is found.


longname: Phaser.Physics.Arcade.Body-reset
since: 3.0.0
name: reset
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: x:number,y:number
metafilename: Body.js
metapath: physics/arcade
description:
Sets this Body's parent Game Object to the given coordinates and resets this Body at the new coordinates.
If the Body had any velocity or acceleration it is lost as a result of calling this.


longname: Phaser.Physics.Arcade.Body-deltaX
since: 3.0.0
name: deltaX
memberof: Phaser.Physics.Arcade.Body
scope: instance
returnstype: number
returnsdescription: The delta value.
metafilename: Body.js
metapath: physics/arcade
description:
The change in this Body's horizontal position from the previous step.
This value is set during the Body's update phase.

As a Body can update multiple times per step this may not hold the final
delta value for the Body. In this case, please see the `deltaXFinal` method.


longname: Phaser.Physics.Arcade.Body-deltaY
since: 3.0.0
name: deltaY
memberof: Phaser.Physics.Arcade.Body
scope: instance
returnstype: number
returnsdescription: The delta value.
metafilename: Body.js
metapath: physics/arcade
description:
The change in this Body's vertical position from the previous step.
This value is set during the Body's update phase.

As a Body can update multiple times per step this may not hold the final
delta value for the Body. In this case, please see the `deltaYFinal` method.


longname: Phaser.Physics.Arcade.Body-deltaXFinal
since: 3.22.0
name: deltaXFinal
memberof: Phaser.Physics.Arcade.Body
scope: instance
returnstype: number
returnsdescription: The final delta x value.
metafilename: Body.js
metapath: physics/arcade
description:
The change in this Body's horizontal position from the previous game update.

This value is set during the `postUpdate` phase and takes into account the
`deltaMax` and final position of the Body.

Because this value is not calculated until `postUpdate`, you must listen for it
during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will
not be calculated by that point. If you _do_ use these values in `update` they
will represent the delta from the _previous_ game frame.


longname: Phaser.Physics.Arcade.Body-deltaYFinal
since: 3.22.0
name: deltaYFinal
memberof: Phaser.Physics.Arcade.Body
scope: instance
returnstype: number
returnsdescription: The final delta y value.
metafilename: Body.js
metapath: physics/arcade
description:
The change in this Body's vertical position from the previous game update.

This value is set during the `postUpdate` phase and takes into account the
`deltaMax` and final position of the Body.

Because this value is not calculated until `postUpdate`, you must listen for it
during a Scene `POST_UPDATE` or `RENDER` event, and not in `update`, as it will
not be calculated by that point. If you _do_ use these values in `update` they
will represent the delta from the _previous_ game frame.


longname: Phaser.Physics.Arcade.Body-setCollideWorldBounds
since: 3.0.0
name: setCollideWorldBounds
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: value?:boolean,bounceX?:number,bounceY?:number,onWorldBounds?:boolean
returnstype: Phaser.Physics.Arcade.Body
returnsdescription: This Body object.
metafilename: Body.js
metapath: physics/arcade
description:
Sets whether this Body collides with the world boundary.

Optionally also sets the World Bounce and `onWorldBounds` values.


longname: Phaser.Physics.Arcade.Body-setDamping
since: 3.50.0
name: setDamping
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: value:boolean
returnstype: Phaser.Physics.Arcade.Body
returnsdescription: This Body object.
metafilename: Body.js
metapath: physics/arcade
description:
If this Body is using `drag` for deceleration this property controls how the drag is applied.
If set to `true` drag will use a damping effect rather than a linear approach. If you are
creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in
the game Asteroids) then you will get a far smoother and more visually correct deceleration
by using damping, avoiding the axis-drift that is prone with linear deceleration.

If you enable this property then you should use far smaller `drag` values than with linear, as
they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow
deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.


longname: Phaser.Physics.Arcade.Body-processX
since: 3.50.0
name: processX
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: x:number,vx?:number,left?:boolean,right?:boolean
metafilename: Body.js
metapath: physics/arcade
description:
This is an internal handler, called by the `ProcessX` function as part
of the collision step. You should almost never call this directly.


longname: Phaser.Physics.Arcade.Body-processY
since: 3.50.0
name: processY
memberof: Phaser.Physics.Arcade.Body
scope: instance
signature: y:number,vy?:number,up?:boolean,down?:boolean
metafilename: Body.js
metapath: physics/arcade
description:
This is an internal handler, called by the `ProcessY` function as part
of the collision step. You should almost never call this directly.


longname: Phaser.Physics.Arcade.Components.Acceleration-setAcceleration
since: 3.0.0
name: setAcceleration
memberof: Phaser.Physics.Arcade.Components.Acceleration
scope: instance
signature: x:number,y?:number
returnstype: Phaser.Physics.Arcade.Components.Acceleration
returnsdescription: This Game Object.
metafilename: Acceleration.js
metapath: physics/arcade/components
description:
Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration.


longname: Phaser.Physics.Arcade.Components.Angular-setAngularVelocity
since: 3.0.0
name: setAngularVelocity
memberof: Phaser.Physics.Arcade.Components.Angular
scope: instance
signature: value:number
returnstype: Phaser.Physics.Arcade.Components.Angular
returnsdescription: This Game Object.
metafilename: Angular.js
metapath: physics/arcade/components
description:
Sets the angular velocity of the body.

In Arcade Physics, bodies cannot rotate. They are always axis-aligned.
However, they can have angular motion, which is passed on to the Game Object bound to the body,
causing them to visually rotate, even though the body remains axis-aligned.


longname: Phaser.Physics.Arcade.Components.Angular-setAngularAcceleration
since: 3.0.0
name: setAngularAcceleration
memberof: Phaser.Physics.Arcade.Components.Angular
scope: instance
signature: value:number
returnstype: Phaser.Physics.Arcade.Components.Angular
returnsdescription: This Game Object.
metafilename: Angular.js
metapath: physics/arcade/components
description:
Sets the angular acceleration of the body.

In Arcade Physics, bodies cannot rotate. They are always axis-aligned.
However, they can have angular motion, which is passed on to the Game Object bound to the body,
causing them to visually rotate, even though the body remains axis-aligned.


longname: Phaser.Physics.Arcade.Components.Angular-setAngularDrag
since: 3.0.0
name: setAngularDrag
memberof: Phaser.Physics.Arcade.Components.Angular
scope: instance
signature: value:number
returnstype: Phaser.Physics.Arcade.Components.Angular
returnsdescription: This Game Object.
metafilename: Angular.js
metapath: physics/arcade/components
description:
Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration.


longname: Phaser.Physics.Arcade.Components.Bounce-setBounce
since: 3.0.0
name: setBounce
memberof: Phaser.Physics.Arcade.Components.Bounce
scope: instance
signature: x:number,y?:number
returnstype: Phaser.Physics.Arcade.Components.Bounce
returnsdescription: This Game Object.
metafilename: Bounce.js
metapath: physics/arcade/components
description:
Sets the bounce values of this body.

Bounce is the amount of restitution, or elasticity, the body has when it collides with another object.
A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all.


longname: Phaser.Physics.Arcade.Components.Bounce-setCollideWorldBounds
since: 3.0.0
name: setCollideWorldBounds
memberof: Phaser.Physics.Arcade.Components.Bounce
scope: instance
signature: value?:boolean,bounceX?:number,bounceY?:number
returnstype: Phaser.Physics.Arcade.Components.Bounce
returnsdescription: This Game Object.
metafilename: Bounce.js
metapath: physics/arcade/components
description:
Sets whether this Body collides with the world boundary.

Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Phaser.Math.Vector2 first.


longname: Phaser.Physics.Arcade.Components.Debug-setDebug
since: 3.0.0
name: setDebug
memberof: Phaser.Physics.Arcade.Components.Debug
scope: instance
signature: showBody:boolean,showVelocity:boolean,bodyColor:number
returnstype: Phaser.Physics.Arcade.Components.Debug
returnsdescription: This Game Object.
metafilename: Debug.js
metapath: physics/arcade/components
description:
Sets the debug values of this body.

Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole.
Note that there is a performance cost in drawing debug displays. It should never be used in production.


longname: Phaser.Physics.Arcade.Components.Drag-setDrag
since: 3.0.0
name: setDrag
memberof: Phaser.Physics.Arcade.Components.Drag
scope: instance
signature: x:number,y?:number
returnstype: Phaser.Physics.Arcade.Components.Drag
returnsdescription: This Game Object.
metafilename: Drag.js
metapath: physics/arcade/components
description:
Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag.

Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
It is the absolute loss of velocity due to movement, in pixels per second squared.
The x and y components are applied separately.

When `useDamping` is true, this is 1 minus the damping factor.
A value of 1 means the Body loses no velocity.
A value of 0.95 means the Body loses 5% of its velocity per step.
A value of 0.5 means the Body loses 50% of its velocity per step.

Drag is applied only when `acceleration` is zero.


longname: Phaser.Physics.Arcade.Components.Drag-setDragX
since: 3.0.0
name: setDragX
memberof: Phaser.Physics.Arcade.Components.Drag
scope: instance
signature: value:number
returnstype: Phaser.Physics.Arcade.Components.Drag
returnsdescription: This Game Object.
metafilename: Drag.js
metapath: physics/arcade/components
description:
Sets the body's horizontal drag.

Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
It is the absolute loss of velocity due to movement, in pixels per second squared.
The x and y components are applied separately.

When `useDamping` is true, this is 1 minus the damping factor.
A value of 1 means the Body loses no velocity.
A value of 0.95 means the Body loses 5% of its velocity per step.
A value of 0.5 means the Body loses 50% of its velocity per step.

Drag is applied only when `acceleration` is zero.


longname: Phaser.Physics.Arcade.Components.Drag-setDragY
since: 3.0.0
name: setDragY
memberof: Phaser.Physics.Arcade.Components.Drag
scope: instance
signature: value:number
returnstype: Phaser.Physics.Arcade.Components.Drag
returnsdescription: This Game Object.
metafilename: Drag.js
metapath: physics/arcade/components
description:
Sets the body's vertical drag.

Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.
It is the absolute loss of velocity due to movement, in pixels per second squared.
The x and y components are applied separately.

When `useDamping` is true, this is 1 minus the damping factor.
A value of 1 means the Body loses no velocity.
A value of 0.95 means the Body loses 5% of its velocity per step.
A value of 0.5 means the Body loses 50% of its velocity per step.

Drag is applied only when `acceleration` is zero.


longname: Phaser.Physics.Arcade.Components.Drag-setDamping
since: 3.10.0
name: setDamping
memberof: Phaser.Physics.Arcade.Components.Drag
scope: instance
signature: value:boolean
returnstype: Phaser.Physics.Arcade.Components.Drag
returnsdescription: This Game Object.
metafilename: Drag.js
metapath: physics/arcade/components
description:
If this Body is using `drag` for deceleration this function controls how the drag is applied.
If set to `true` drag will use a damping effect rather than a linear approach. If you are
creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in
the game Asteroids) then you will get a far smoother and more visually correct deceleration
by using damping, avoiding the axis-drift that is prone with linear deceleration.

If you enable this property then you should use far smaller `drag` values than with linear, as
they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow
deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.


longname: Phaser.Physics.Arcade.Components.Enable-refreshBody
since: 3.1.0
name: refreshBody
memberof: Phaser.Physics.Arcade.Components.Enable
scope: instance
returnstype: Phaser.Physics.Arcade.Components.Enable
returnsdescription: This Game Object.
metafilename: Enable.js
metapath: physics/arcade/components
description:
Syncs the Body's position and size with its parent Game Object.
You don't need to call this for Dynamic Bodies, as it happens automatically.
But for Static bodies it's a useful way of modifying the position of a Static Body
in the Physics World, based on its Game Object.


longname: Phaser.Physics.Arcade.Components.Friction-setFriction
since: 3.0.0
name: setFriction
memberof: Phaser.Physics.Arcade.Components.Friction
scope: instance
signature: x:number,y?:number
returnstype: Phaser.Physics.Arcade.Components.Friction
returnsdescription: This Game Object.
metafilename: Friction.js
metapath: physics/arcade/components
description:
Sets the friction of this game object's physics body.
In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body.


longname: Phaser.Physics.Arcade.Components.Friction-setFrictionX
since: 3.0.0
name: setFrictionX
memberof: Phaser.Physics.Arcade.Components.Friction
scope: instance
signature: x:number
returnstype: Phaser.Physics.Arcade.Components.Friction
returnsdescription: This Game Object.
metafilename: Friction.js
metapath: physics/arcade/components
description:
Sets the horizontal friction of this game object's physics body.
This can move a riding body horizontally when it collides with this one on the vertical axis.


longname: Phaser.Physics.Arcade.Components.Friction-setFrictionY
since: 3.0.0
name: setFrictionY
memberof: Phaser.Physics.Arcade.Components.Friction
scope: instance
signature: y:number
returnstype: Phaser.Physics.Arcade.Components.Friction
returnsdescription: This Game Object.
metafilename: Friction.js
metapath: physics/arcade/components
description:
Sets the vertical friction of this game object's physics body.
This can move a riding body vertically when it collides with this one on the horizontal axis.


longname: Phaser.Physics.Arcade.Components.Gravity-setGravity
since: 3.0.0
name: setGravity
memberof: Phaser.Physics.Arcade.Components.Gravity
scope: instance
signature: x:number,y?:number
returnstype: Phaser.Physics.Arcade.Components.Gravity
returnsdescription: This Game Object.
metafilename: Gravity.js
metapath: physics/arcade/components
description:
Set the X and Y values of the gravitational pull to act upon this Arcade Physics Game Object. Values can be positive or negative. Larger values result in a stronger effect.

If only one value is provided, this value will be used for both the X and Y axis.


longname: Phaser.Physics.Arcade.Components.Gravity-setGravityX
since: 3.0.0
name: setGravityX
memberof: Phaser.Physics.Arcade.Components.Gravity
scope: instance
signature: x:number
returnstype: Phaser.Physics.Arcade.Components.Gravity
returnsdescription: This Game Object.
metafilename: Gravity.js
metapath: physics/arcade/components
description:
Set the gravitational force to be applied to the X axis. Value can be positive or negative. Larger values result in a stronger effect.


longname: Phaser.Physics.Arcade.Components.Gravity-setGravityY
since: 3.0.0
name: setGravityY
memberof: Phaser.Physics.Arcade.Components.Gravity
scope: instance
signature: y:number
returnstype: Phaser.Physics.Arcade.Components.Gravity
returnsdescription: This Game Object.
metafilename: Gravity.js
metapath: physics/arcade/components
description:
Set the gravitational force to be applied to the Y axis. Value can be positive or negative. Larger values result in a stronger effect.


longname: Phaser.Physics.Arcade.Components.Immovable-setImmovable
since: 3.0.0
name: setImmovable
memberof: Phaser.Physics.Arcade.Components.Immovable
scope: instance
signature: value?:boolean
returnstype: Phaser.Physics.Arcade.Components.Immovable
returnsdescription: This Game Object.
metafilename: Immovable.js
metapath: physics/arcade/components
description:
Sets if this Body can be separated during collisions with other bodies.

When a body is immovable it means it won't move at all, not even to separate it from collision
overlap. If you just wish to prevent a body from being knocked around by other bodies, see
the `setPushable` method instead.


longname: Phaser.Physics.Arcade.Components.Pushable-setPushable
since: 3.50.0
name: setPushable
memberof: Phaser.Physics.Arcade.Components.Pushable
scope: instance
signature: value?:boolean
returnstype: Phaser.Physics.Arcade.Components.Pushable
returnsdescription: This Game Object.
metafilename: Pushable.js
metapath: physics/arcade/components
description:
Sets if this Body can be pushed by another Body.

A body that cannot be pushed will reflect back all of the velocity it is given to the
colliding body. If that body is also not pushable, then the separation will be split
between them evenly.

If you want your body to never move or seperate at all, see the `setImmovable` method.


longname: Phaser.Physics.Arcade.Components.Size-setOffset
since: 3.0.0
name: setOffset
memberof: Phaser.Physics.Arcade.Components.Size
scope: instance
signature: x:number,y?:number
returnstype: Phaser.Physics.Arcade.Components.Size
returnsdescription: This Game Object.
metafilename: Size.js
metapath: physics/arcade/components
description:
Sets the body offset. This allows you to adjust the difference between the center of the body
and the x and y coordinates of the parent Game Object.


longname: Phaser.Physics.Arcade.Components.Size-setSize
since: 3.0.0
name: setSize
memberof: Phaser.Physics.Arcade.Components.Size
scope: instance
signature: width:number,height:number,center?:boolean
returnstype: Phaser.Physics.Arcade.Components.Size
returnsdescription: This Game Object.
metafilename: Size.js
metapath: physics/arcade/components
description:
**DEPRECATED**: Please use `setBodySize` instead.

Sets the size of this physics body. Setting the size does not adjust the dimensions of the parent Game Object.


longname: Phaser.Physics.Arcade.Components.Size-setBodySize
since: 3.24.0
name: setBodySize
memberof: Phaser.Physics.Arcade.Components.Size
scope: instance
signature: width:number,height:number,center?:boolean
returnstype: Phaser.Physics.Arcade.Components.Size
returnsdescription: This Game Object.
metafilename: Size.js
metapath: physics/arcade/components
description:
Sets the size of this physics body. Setting the size does not adjust the dimensions of the parent Game Object.


longname: Phaser.Physics.Arcade.Components.Velocity-setVelocityX
since: 3.0.0
name: setVelocityX
memberof: Phaser.Physics.Arcade.Components.Velocity
scope: instance
signature: x:number
returnstype: Phaser.Physics.Arcade.Components.Velocity
returnsdescription: This Game Object.
metafilename: Velocity.js
metapath: physics/arcade/components
description:
Sets the horizontal component of the body's velocity.

Positive values move the body to the right, while negative values move it to the left.


longname: Phaser.Physics.Arcade.Components.Velocity-setVelocityY
since: 3.0.0
name: setVelocityY
memberof: Phaser.Physics.Arcade.Components.Velocity
scope: instance
signature: y:number
returnstype: Phaser.Physics.Arcade.Components.Velocity
returnsdescription: This Game Object.
metafilename: Velocity.js
metapath: physics/arcade/components
description:
Sets the vertical component of the body's velocity.

Positive values move the body down, while negative values move it up.


longname: Phaser.Physics.Arcade.Factory-collider
since: 3.0.0
name: collider
memberof: Phaser.Physics.Arcade.Factory
description: Creates a new Arcade Physics Collider object.
scope: instance
returnstype: Phaser.Physics.Arcade.Collider
returnsdescription: The Collider that was created.
metafilename: Factory.js
metapath: physics/arcade
signature:
object1:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>|Phaser.GameObjects.Group|Array.<Phaser.GameObjects.Group>,object2:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>|Phaser.GameObjects.Group|Array.<Phaser.GameObjects.Group>,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:*


longname: Phaser.Physics.Arcade.Factory-staticGroup
since: 3.0.0
name: staticGroup
memberof: Phaser.Physics.Arcade.Factory
scope: instance
returnstype: Phaser.Physics.Arcade.StaticGroup
returnsdescription: The Static Group object that was created.
metafilename: Factory.js
metapath: physics/arcade
description:
Creates a Static Physics Group object.
All Game Objects created by this Group will automatically be static Arcade Physics objects.

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


longname: Phaser.Physics.Arcade.Factory-group
since: 3.0.0
name: group
memberof: Phaser.Physics.Arcade.Factory
scope: instance
returnstype: Phaser.Physics.Arcade.Group
returnsdescription: The Group object that was created.
metafilename: Factory.js
metapath: physics/arcade
description:
Creates a Physics Group object.
All Game Objects created by this Group will automatically be dynamic Arcade Physics objects.

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


longname: Phaser.Physics.Arcade.GetOverlapX
since: 3.0.0
name: GetOverlapX
memberof: Phaser.Physics.Arcade
scope: static
signature: body1:Phaser.Physics.Arcade.Body,body2:Phaser.Physics.Arcade.Body,overlapOnly:boolean,bias:number
returnstype: number
returnsdescription: The amount of overlap.
metafilename: GetOverlapX.js
metapath: physics/arcade
description:
Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties
accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX'.


longname: Phaser.Physics.Arcade.GetOverlapY
since: 3.0.0
name: GetOverlapY
memberof: Phaser.Physics.Arcade
scope: static
signature: body1:Phaser.Physics.Arcade.Body,body2:Phaser.Physics.Arcade.Body,overlapOnly:boolean,bias:number
returnstype: number
returnsdescription: The amount of overlap.
metafilename: GetOverlapY.js
metapath: physics/arcade
description:
Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties
accordingly, including: `touching.up`, `touching.down`, `touching.none` and `overlapY'.


longname: Phaser.Physics.Arcade.Group-createCallbackHandler
since: 3.0.0
name: createCallbackHandler
memberof: Phaser.Physics.Arcade.Group
scope: instance
signature: child:Phaser.GameObjects.GameObject
metafilename: PhysicsGroup.js
metapath: physics/arcade
description:
Enables a Game Object's Body and assigns `defaults`. Called when a Group member is added or created.


longname: Phaser.Physics.Arcade.SeparateX
since: 3.0.0
name: SeparateX
memberof: Phaser.Physics.Arcade
scope: static
signature: body1:Phaser.Physics.Arcade.Body,body2:Phaser.Physics.Arcade.Body,overlapOnly:boolean,bias:number
returnstype: boolean
returnsdescription: `true` if the two bodies overlap vertically, otherwise `false`.
metafilename: SeparateX.js
metapath: physics/arcade
description:
Separates two overlapping bodies on the X-axis (horizontally).

Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.

The bodies won't be separated if there is no horizontal overlap between them, if they are static, or if either one uses custom logic for its separation.


longname: Phaser.Physics.Arcade.SeparateY
since: 3.0.0
name: SeparateY
memberof: Phaser.Physics.Arcade
scope: static
signature: body1:Phaser.Physics.Arcade.Body,body2:Phaser.Physics.Arcade.Body,overlapOnly:boolean,bias:number
returnstype: boolean
returnsdescription: `true` if the two bodies overlap vertically, otherwise `false`.
metafilename: SeparateY.js
metapath: physics/arcade
description:
Separates two overlapping bodies on the Y-axis (vertically).

Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.

The bodies won't be separated if there is no vertical overlap between them, if they are static, or if either one uses custom logic for its separation.


longname: Phaser.Physics.Arcade.StaticBody-setGameObject
since: 3.1.0
name: setGameObject
memberof: Phaser.Physics.Arcade.StaticBody
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,update?:boolean
returnstype: Phaser.Physics.Arcade.StaticBody
returnsdescription: This Static Body object.
metafilename: StaticBody.js
metapath: physics/arcade
description:
Changes the Game Object this Body is bound to.
First it removes its reference from the old Game Object, then sets the new one.
You can optionally update the position and dimensions of this Body to reflect that of the new Game Object.


longname: Phaser.Physics.Arcade.StaticBody-setSize
since: 3.0.0
name: setSize
memberof: Phaser.Physics.Arcade.StaticBody
scope: instance
signature: width?:number,height?:number,center?:boolean
returnstype: Phaser.Physics.Arcade.StaticBody
returnsdescription: This Static Body object.
metafilename: StaticBody.js
metapath: physics/arcade
description:
Sets the size of the Static Body.
When `center` is true, also repositions it.
Resets the width and height to match current frame, if no width and height provided and a frame is found.


longname: Phaser.Physics.Arcade.StaticBody-reset
since: 3.0.0
name: reset
memberof: Phaser.Physics.Arcade.StaticBody
scope: instance
signature: x?:number,y?:number
metafilename: StaticBody.js
metapath: physics/arcade
description:
Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates.


longname: Phaser.Physics.Arcade.StaticBody-getBounds
since: 3.0.0
name: getBounds
memberof: Phaser.Physics.Arcade.StaticBody
description: Returns the x and y coordinates of the top left and bottom right points of the StaticBody.
scope: instance
signature: obj:Phaser.Types.Physics.Arcade.ArcadeBodyBounds
returnstype: Phaser.Types.Physics.Arcade.ArcadeBodyBounds
metafilename: StaticBody.js
metapath: physics/arcade
returnsdescription:
The same object that was passed with `x`, `y`, `right` and `bottom` values matching the respective values of the StaticBody.


longname: Phaser.Physics.Arcade.StaticBody-deltaAbsX
since: 3.0.0
name: deltaAbsX
memberof: Phaser.Physics.Arcade.StaticBody
scope: instance
returnstype: number
returnsdescription: Always zero for a Static Body.
metafilename: StaticBody.js
metapath: physics/arcade
description:
The absolute (non-negative) change in this StaticBody's horizontal position from the previous step. Always zero.


longname: Phaser.Physics.Arcade.StaticBody-deltaAbsY
since: 3.0.0
name: deltaAbsY
memberof: Phaser.Physics.Arcade.StaticBody
scope: instance
returnstype: number
returnsdescription: Always zero for a Static Body.
metafilename: StaticBody.js
metapath: physics/arcade
description:
The absolute (non-negative) change in this StaticBody's vertical position from the previous step. Always zero.


longname: Phaser.Physics.Arcade.StaticBody-setMass
since: 3.0.0
name: setMass
memberof: Phaser.Physics.Arcade.StaticBody
scope: instance
signature: value:number
returnstype: Phaser.Physics.Arcade.StaticBody
returnsdescription: This Static Body object.
metafilename: StaticBody.js
metapath: physics/arcade
description:
Sets the Mass of the StaticBody. Will set the Mass to 0.1 if the value passed is less than or equal to zero.


longname: Phaser.Physics.Arcade.StaticGroup-refresh
since: 3.0.0
name: refresh
memberof: Phaser.Physics.Arcade.StaticGroup
scope: instance
returnstype: Phaser.Physics.Arcade.StaticGroup
returnsdescription: This group.
metafilename: StaticPhysicsGroup.js
metapath: physics/arcade
description:
Resets each Body to the position of its parent Game Object.
Body sizes aren't changed (use [Phaser.Physics.Arcade.Components.Enable#refreshBody](Phaser.Physics.Arcade.Components.Enable#refreshBody) for that).


longname: Phaser.Physics.Arcade.Tilemap.ProcessTileCallbacks
since: 3.0.0
name: ProcessTileCallbacks
memberof: Phaser.Physics.Arcade.Tilemap
scope: static
signature: tile:Phaser.Tilemaps.Tile,sprite:Phaser.GameObjects.Sprite
returnstype: boolean
returnsdescription: The result of the callback, `true` for further processing, or `false` to skip this pair.
metafilename: ProcessTileCallbacks.js
metapath: physics/arcade/tilemap
description:
A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object.


longname: Phaser.Physics.Arcade.Tilemap.SeparateTile
since: 3.0.0
name: SeparateTile
memberof: Phaser.Physics.Arcade.Tilemap
description: The core separation function to separate a physics body and a tile.
scope: static
returnstype: boolean
returnsdescription: `true` if the body was separated, otherwise `false`.
metafilename: SeparateTile.js
metapath: physics/arcade/tilemap
signature:
i:number,body:Phaser.Physics.Arcade.Body,tile:Phaser.Tilemaps.Tile,tileWorldRect:Phaser.Geom.Rectangle,tilemapLayer:Phaser.Tilemaps.TilemapLayer,tileBias:number,isLayer:boolean


longname: Phaser.Physics.Arcade.Tilemap.TileCheckX
since: 3.0.0
name: TileCheckX
memberof: Phaser.Physics.Arcade.Tilemap
description: Check the body against the given tile on the X axis. Used internally by the SeparateTile function.
scope: static
returnstype: number
returnsdescription: The amount of separation that occurred.
metafilename: TileCheckX.js
metapath: physics/arcade/tilemap
signature:
body:Phaser.Physics.Arcade.Body,tile:Phaser.Tilemaps.Tile,tileLeft:number,tileRight:number,tileBias:number,isLayer:boolean


longname: Phaser.Physics.Arcade.Tilemap.TileCheckY
since: 3.0.0
name: TileCheckY
memberof: Phaser.Physics.Arcade.Tilemap
description: Check the body against the given tile on the Y axis. Used internally by the SeparateTile function.
scope: static
returnstype: number
returnsdescription: The amount of separation that occurred.
metafilename: TileCheckY.js
metapath: physics/arcade/tilemap
signature:
body:Phaser.Physics.Arcade.Body,tile:Phaser.Tilemaps.Tile,tileTop:number,tileBottom:number,tileBias:number,isLayer:boolean


longname: Phaser.Physics.Arcade.World-enable
since: 3.0.0
name: enable
memberof: Phaser.Physics.Arcade.World
scope: instance
metafilename: World.js
metapath: physics/arcade
description:
Adds an Arcade Physics Body to a Game Object, an array of Game Objects, or the children of a Group.

The difference between this and the `enableBody` method is that you can pass arrays or Groups
to this method.

You can specify if the bodies are to be Dynamic or Static. A dynamic body can move via velocity and
acceleration. A static body remains fixed in place and as such is able to use an optimized search
tree, making it ideal for static elements such as level objects. You can still collide and overlap
with static bodies.

Normally, rather than calling this method directly, you'd use the helper methods available in the
Arcade Physics Factory, such as:

```javascript
this.physics.add.image(x, y, textureKey);
this.physics.add.sprite(x, y, textureKey);
```

Calling factory methods encapsulates the creation of a Game Object and the creation of its
body at the same time. If you are creating custom classes then you can pass them to this
method to have their bodies created.

signature:
object:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>|Phaser.GameObjects.Group|Array.<Phaser.GameObjects.Group>,bodyType?:number


longname: Phaser.Physics.Arcade.World-enableBody
since: 3.0.0
name: enableBody
memberof: Phaser.Physics.Arcade.World
scope: instance
signature: object:Phaser.GameObjects.GameObject,bodyType?:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: The Game Object on which the body was created.
metafilename: World.js
metapath: physics/arcade
description:
Creates an Arcade Physics Body on a single Game Object.

If the Game Object already has a body, this method will simply add it back into the simulation.

You can specify if the body is Dynamic or Static. A dynamic body can move via velocity and
acceleration. A static body remains fixed in place and as such is able to use an optimized search
tree, making it ideal for static elements such as level objects. You can still collide and overlap
with static bodies.

Normally, rather than calling this method directly, you'd use the helper methods available in the
Arcade Physics Factory, such as:

```javascript
this.physics.add.image(x, y, textureKey);
this.physics.add.sprite(x, y, textureKey);
```

Calling factory methods encapsulates the creation of a Game Object and the creation of its
body at the same time. If you are creating custom classes then you can pass them to this
method to have their bodies created.


longname: Phaser.Physics.Arcade.World-add
since: 3.10.0
name: add
memberof: Phaser.Physics.Arcade.World
scope: instance
signature: body:Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody
returnstype: Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody
returnsdescription: The Body that was added to the simulation.
metafilename: World.js
metapath: physics/arcade
description:
Adds an existing Arcade Physics Body or StaticBody to the simulation.

The body is enabled and added to the local search trees.


longname: Phaser.Physics.Arcade.World-disable
since: 3.0.0
name: disable
memberof: Phaser.Physics.Arcade.World
scope: instance
metafilename: World.js
metapath: physics/arcade
description:
Disables the Arcade Physics Body of a Game Object, an array of Game Objects, or the children of a Group.

The difference between this and the `disableBody` method is that you can pass arrays or Groups
to this method.

The body itself is not deleted, it just has its `enable` property set to false, which
means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`.

signature:
object:Phaser.GameObjects.GameObject|Array.<Phaser.GameObjects.GameObject>|Phaser.GameObjects.Group|Array.<Phaser.GameObjects.Group>


longname: Phaser.Physics.Arcade.World-disableBody
since: 3.0.0
name: disableBody
memberof: Phaser.Physics.Arcade.World
scope: instance
signature: body:Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody
metafilename: World.js
metapath: physics/arcade
description:
Disables an existing Arcade Physics Body or StaticBody and removes it from the simulation.

The body is disabled and removed from the local search trees.

The body itself is not deleted, it just has its `enable` property set to false, which
means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`.


longname: Phaser.Physics.Arcade.World-remove
since: 3.0.0
name: remove
memberof: Phaser.Physics.Arcade.World
scope: instance
signature: body:Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody
metafilename: World.js
metapath: physics/arcade
description:
Removes an existing Arcade Physics Body or StaticBody from the simulation.

The body is disabled and removed from the local search trees.

The body itself is not deleted, it just has its `enabled` property set to false, which
means you can re-enable it again at any point by passing it to enable `enable` or `add`.


longname: Phaser.Physics.Arcade.World-createDebugGraphic
since: 3.0.0
name: createDebugGraphic
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: The Graphics object that was created for use by the World.
metafilename: World.js
metapath: physics/arcade
description:
Creates a Graphics Game Object that the world will use to render the debug display to.

This is called automatically when the World is instantiated if the `debug` config property
was set to `true`. However, you can call it at any point should you need to display the
debug Graphic from a fixed point.

You can control which objects are drawn to the Graphics object, and the colors they use,
by setting the debug properties in the physics config.

You should not typically use this in a production game. Use it to aid during debugging.


longname: Phaser.Physics.Arcade.World-setBounds
since: 3.0.0
name: setBounds
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: Phaser.Physics.Arcade.World
returnsdescription: This World object.
metafilename: World.js
metapath: physics/arcade
description:
Sets the position, size and properties of the World boundary.

The World boundary is an invisible rectangle that defines the edges of the World.
If a Body is set to collide with the world bounds then it will automatically stop
when it reaches any of the edges. You can optionally set which edges of the boundary
should be checked against.

signature:
x:number,y:number,width:number,height:number,checkLeft?:boolean,checkRight?:boolean,checkUp?:boolean,checkDown?:boolean


longname: Phaser.Physics.Arcade.World-pause
since: 3.0.0
name: pause
memberof: Phaser.Physics.Arcade.World
scope: instance
fires: Phaser.Physics.Arcade.Events.PAUSE
returnstype: Phaser.Physics.Arcade.World
returnsdescription: This World object.
metafilename: World.js
metapath: physics/arcade
description:
Pauses the simulation.

A paused simulation does not update any existing bodies, or run any Colliders.

However, you can still enable and disable bodies within it, or manually run collide or overlap
checks.


longname: Phaser.Physics.Arcade.World-addCollider
since: 3.0.0
name: addCollider
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: Phaser.Physics.Arcade.Collider
returnsdescription: The Collider that was created.
metafilename: World.js
metapath: physics/arcade
description:
Creates a new Collider object and adds it to the simulation.

A Collider is a way to automatically perform collision checks between two objects,
calling the collide and process callbacks if they occur.

Colliders are run as part of the World update, after all of the Bodies have updated.

By creating a Collider you don't need then call `World.collide` in your `update` loop,
as it will be handled for you automatically.

signature:
object1:Phaser.Types.Physics.Arcade.ArcadeColliderType,object2:Phaser.Types.Physics.Arcade.ArcadeColliderType,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:*


longname: Phaser.Physics.Arcade.World-addOverlap
since: 3.0.0
name: addOverlap
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: Phaser.Physics.Arcade.Collider
returnsdescription: The Collider that was created.
metafilename: World.js
metapath: physics/arcade
description:
Creates a new Overlap Collider object and adds it to the simulation.

A Collider is a way to automatically perform overlap checks between two objects,
calling the collide and process callbacks if they occur.

Colliders are run as part of the World update, after all of the Bodies have updated.

By creating a Collider you don't need then call `World.overlap` in your `update` loop,
as it will be handled for you automatically.

signature:
object1:Phaser.Types.Physics.Arcade.ArcadeColliderType,object2:Phaser.Types.Physics.Arcade.ArcadeColliderType,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:*


longname: Phaser.Physics.Arcade.World-removeCollider
since: 3.0.0
name: removeCollider
memberof: Phaser.Physics.Arcade.World
scope: instance
signature: collider:Phaser.Physics.Arcade.Collider
returnstype: Phaser.Physics.Arcade.World
returnsdescription: This World object.
metafilename: World.js
metapath: physics/arcade
description:
Removes a Collider from the simulation so it is no longer processed.

This method does not destroy the Collider. If you wish to add it back at a later stage you can call
`World.colliders.add(Collider)`.

If you no longer need the Collider you can call the `Collider.destroy` method instead, which will
automatically clear all of its references and then remove it from the World. If you call destroy on
a Collider you _don't_ need to pass it to this method too.


longname: Phaser.Physics.Arcade.World-setFPS
since: 3.10.0
name: setFPS
memberof: Phaser.Physics.Arcade.World
scope: instance
signature: framerate:number
returnstype: Phaser.Physics.Arcade.World
returnsdescription: This World object.
metafilename: World.js
metapath: physics/arcade
description:
Sets the frame rate to run the simulation at.

The frame rate value is used to simulate a fixed update time step. This fixed
time step allows for a straightforward implementation of a deterministic game state.

This frame rate is independent of the frequency at which the game is rendering. The
higher you set the fps, the more physics simulation steps will occur per game step.
Conversely, the lower you set it, the less will take place.

You can optionally advance the simulation directly yourself by calling the `step` method.


longname: Phaser.Physics.Arcade.World-update
since: 3.0.0
name: update
memberof: Phaser.Physics.Arcade.World
scope: instance
fires: Phaser.Physics.Arcade.Events.WORLD_STEP
signature: time:number,delta:number
metafilename: World.js
metapath: physics/arcade
description:
Advances the simulation based on the elapsed time and fps rate.

This is called automatically by your Scene and does not need to be invoked directly.


longname: Phaser.Physics.Arcade.World-separate
since: 3.0.0
name: separate
memberof: Phaser.Physics.Arcade.World
description: Separates two Bodies.
scope: instance
fires: Phaser.Physics.Arcade.Events.COLLIDE,Phaser.Physics.Arcade.Events.OVERLAP
returnstype: boolean
returnsdescription: True if separation occurred, otherwise false.
metafilename: World.js
metapath: physics/arcade
signature:
body1:Phaser.Physics.Arcade.Body,body2:Phaser.Physics.Arcade.Body,processCallback?:ArcadePhysicsCallback,callbackContext?:*,overlapOnly?:boolean,intersects?:boolean


longname: Phaser.Physics.Arcade.World-overlap
since: 3.0.0
name: overlap
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: boolean
returnsdescription: True if at least one Game Object overlaps another.
metafilename: World.js
metapath: physics/arcade
description:
Tests if Game Objects overlap.

See details in [Phaser.Physics.Arcade.World#collide](Phaser.Physics.Arcade.World#collide).

signature:
object1:Phaser.Types.Physics.Arcade.ArcadeColliderType,object2?:Phaser.Types.Physics.Arcade.ArcadeColliderType,overlapCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:*


longname: Phaser.Physics.Arcade.World-collide
since: 3.0.0
name: collide
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: boolean
returnsdescription: `true` if any overlapping Game Objects were separated, otherwise `false`.
metafilename: World.js
metapath: physics/arcade
description:
Performs a collision check and separation between the two physics enabled objects given, which can be single
Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.

If you don't require separation then use [Phaser.Physics.Arcade.World#overlap](Phaser.Physics.Arcade.World#overlap) instead.

If two Groups or arrays are passed, each member of one will be tested against each member of the other.

If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.

If **only** one Array is passed, the array is iterated and every element in it is tested against the others.

Two callbacks can be provided; they receive the colliding game objects as arguments.
If an overlap is detected, the `processCallback` is called first. It can cancel the collision by returning false.
Next the objects are separated and `collideCallback` is invoked.

Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable
for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.
The separation that stops two objects penetrating may create a new penetration against a different object. If you
require a high level of stability please consider using an alternative physics system, such as Matter.js.

signature:
object1:Phaser.Types.Physics.Arcade.ArcadeColliderType,object2?:Phaser.Types.Physics.Arcade.ArcadeColliderType,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:any


longname: Phaser.Physics.Arcade.World-collideObjects
since: 3.0.0
name: collideObjects
memberof: Phaser.Physics.Arcade.World
description: Internal helper function. Please use Phaser.Physics.Arcade.World#collide instead.
scope: instance
returnstype: boolean
metafilename: World.js
metapath: physics/arcade
access: private
signature:
object1:Phaser.Types.Physics.Arcade.ArcadeColliderType,object2?:Phaser.Types.Physics.Arcade.ArcadeColliderType,collideCallback:ArcadePhysicsCallback,processCallback:ArcadePhysicsCallback,callbackContext:any,overlapOnly:boolean

returnsdescription:
True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.


longname: Phaser.Physics.Arcade.World-collideHandler
since: 3.0.0
name: collideHandler
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: boolean
metafilename: World.js
metapath: physics/arcade
access: private
description:
Internal helper function. Please use Phaser.Physics.Arcade.World#collide and Phaser.Physics.Arcade.World#overlap instead.

signature:
object1:Phaser.Types.Physics.Arcade.ArcadeColliderType,object2:Phaser.Types.Physics.Arcade.ArcadeColliderType,collideCallback:ArcadePhysicsCallback,processCallback:ArcadePhysicsCallback,callbackContext:any,overlapOnly:boolean


longname: Phaser.Physics.Arcade.World-collideSpriteVsSprite
since: 3.0.0
name: collideSpriteVsSprite
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: boolean
metafilename: World.js
metapath: physics/arcade
access: private
description:
Internal handler for Sprite vs. Sprite collisions.
Please use Phaser.Physics.Arcade.World#collide instead.

signature:
sprite1:Phaser.GameObjects.GameObject,sprite2:Phaser.GameObjects.GameObject,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:any,overlapOnly:boolean


longname: Phaser.Physics.Arcade.World-collideSpriteVsGroup
since: 3.0.0
name: collideSpriteVsGroup
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: boolean
returnsdescription: `true` if the Sprite collided with the given Group, otherwise `false`.
metafilename: World.js
metapath: physics/arcade
access: private
description:
Internal handler for Sprite vs. Group collisions.
Please use Phaser.Physics.Arcade.World#collide instead.

signature:
sprite:Phaser.GameObjects.GameObject,group:Phaser.GameObjects.Group,collideCallback:ArcadePhysicsCallback,processCallback:ArcadePhysicsCallback,callbackContext:any,overlapOnly:boolean


longname: Phaser.Physics.Arcade.World-collideGroupVsTilemapLayer
since: 3.0.0
name: collideGroupVsTilemapLayer
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: boolean
metafilename: World.js
metapath: physics/arcade
access: private
description:
Internal handler for Group vs. Tilemap collisions.
Please use Phaser.Physics.Arcade.World#collide instead.

signature:
group:Phaser.GameObjects.Group,tilemapLayer:Phaser.Tilemaps.TilemapLayer,collideCallback:ArcadePhysicsCallback,processCallback:ArcadePhysicsCallback,callbackContext:any,overlapOnly:boolean


longname: Phaser.Physics.Arcade.World-collideSpriteVsTilemapLayer
since: 3.0.0
name: collideSpriteVsTilemapLayer
memberof: Phaser.Physics.Arcade.World
scope: instance
fires: Phaser.Physics.Arcade.Events.TILE_COLLIDE,Phaser.Physics.Arcade.Events.TILE_OVERLAP
returnstype: boolean
metafilename: World.js
metapath: physics/arcade
description:
Internal handler for Sprite vs. Tilemap collisions.
Please use Phaser.Physics.Arcade.World#collide instead.

signature:
sprite:Phaser.GameObjects.GameObject,tilemapLayer:Phaser.Tilemaps.TilemapLayer,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:any,overlapOnly?:boolean


longname: Phaser.Physics.Arcade.World-collideSpriteVsTilesHandler
since: 3.17.0
name: collideSpriteVsTilesHandler
memberof: Phaser.Physics.Arcade.World
scope: instance
fires: Phaser.Physics.Arcade.Events.TILE_COLLIDE,Phaser.Physics.Arcade.Events.TILE_OVERLAP
returnstype: boolean
metafilename: World.js
metapath: physics/arcade
access: private
description:
Internal handler for Sprite vs. Tilemap collisions.
Please use Phaser.Physics.Arcade.World#collide instead.

signature:
sprite:Phaser.GameObjects.GameObject,tilemapLayer:Phaser.Tilemaps.TilemapLayer,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:any,overlapOnly?:boolean,isLayer?:boolean


longname: Phaser.Physics.Arcade.World-collideGroupVsGroup
since: 3.0.0
name: collideGroupVsGroup
memberof: Phaser.Physics.Arcade.World
scope: instance
returnstype: boolean
metafilename: World.js
metapath: physics/arcade
access: private
description:
Internal helper for Group vs. Group collisions.
Please use Phaser.Physics.Arcade.World#collide instead.

signature:
group1:Phaser.GameObjects.Group,group2:Phaser.GameObjects.Group,collideCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:any,overlapOnly:boolean


longname: Phaser.Physics.Arcade.World-wrap
since: 3.3.0
name: wrap
memberof: Phaser.Physics.Arcade.World
scope: instance
signature: object:any,padding?:number
metafilename: World.js
metapath: physics/arcade
description:
Wrap an object's coordinates (or several objects' coordinates) within [Phaser.Physics.Arcade.World#bounds](Phaser.Physics.Arcade.World#bounds).

If the object is outside any boundary edge (left, top, right, bottom), it will be moved to the same offset from the opposite edge (the interior).


longname: Phaser.Physics.Arcade.World-wrapArray
since: 3.3.0
name: wrapArray
memberof: Phaser.Physics.Arcade.World
scope: instance
signature: objects:Array.<*>,padding?:number
metafilename: World.js
metapath: physics/arcade
description:
Wrap each object's coordinates within [Phaser.Physics.Arcade.World#bounds](Phaser.Physics.Arcade.World#bounds).


longname: Phaser.Physics.Arcade.World-wrapObject
since: 3.3.0
name: wrapObject
memberof: Phaser.Physics.Arcade.World
scope: instance
signature: object:*,padding?:number
metafilename: World.js
metapath: physics/arcade
description:
Wrap an object's coordinates within [Phaser.Physics.Arcade.World#bounds](Phaser.Physics.Arcade.World#bounds).


longname: Phaser.Physics.Matter.BodyBounds-parseBody
since: 3.22.0
name: parseBody
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody
returnstype: boolean
returnsdescription: `true` if it was able to get the bounds, otherwise `false`.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Parses the given body to get the bounds diff values from it.

They're stored in this class in the temporary properties `boundsCenter` and `centerDiff`.

This method is called automatically by all other methods in this class.


longname: Phaser.Physics.Matter.BodyBounds-getTopLeft
since: 3.22.0
name: getTopLeft
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x?:number,y?:number
returnstype: Phaser.Math.Vector2|false
returnsdescription: A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Takes a Body and returns the world coordinates of the top-left of its _bounds_.

Body bounds are updated by Matter each step and factor in scale and rotation.
This will return the world coordinate based on the bodies _current_ position and bounds.


longname: Phaser.Physics.Matter.BodyBounds-getTopCenter
since: 3.22.0
name: getTopCenter
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x?:number,y?:number
returnstype: Phaser.Math.Vector2|false
returnsdescription: A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Takes a Body and returns the world coordinates of the top-center of its _bounds_.

Body bounds are updated by Matter each step and factor in scale and rotation.
This will return the world coordinate based on the bodies _current_ position and bounds.


longname: Phaser.Physics.Matter.BodyBounds-getTopRight
since: 3.22.0
name: getTopRight
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x?:number,y?:number
returnstype: Phaser.Math.Vector2|false
returnsdescription: A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Takes a Body and returns the world coordinates of the top-right of its _bounds_.

Body bounds are updated by Matter each step and factor in scale and rotation.
This will return the world coordinate based on the bodies _current_ position and bounds.


longname: Phaser.Physics.Matter.BodyBounds-getLeftCenter
since: 3.22.0
name: getLeftCenter
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x?:number,y?:number
returnstype: Phaser.Math.Vector2|false
returnsdescription: A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Takes a Body and returns the world coordinates of the left-center of its _bounds_.

Body bounds are updated by Matter each step and factor in scale and rotation.
This will return the world coordinate based on the bodies _current_ position and bounds.


longname: Phaser.Physics.Matter.BodyBounds-getCenter
since: 3.22.0
name: getCenter
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x?:number,y?:number
returnstype: Phaser.Math.Vector2|false
returnsdescription: A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Takes a Body and returns the world coordinates of the center of its _bounds_.

Body bounds are updated by Matter each step and factor in scale and rotation.
This will return the world coordinate based on the bodies _current_ position and bounds.


longname: Phaser.Physics.Matter.BodyBounds-getRightCenter
since: 3.22.0
name: getRightCenter
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x?:number,y?:number
returnstype: Phaser.Math.Vector2|false
returnsdescription: A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Takes a Body and returns the world coordinates of the right-center of its _bounds_.

Body bounds are updated by Matter each step and factor in scale and rotation.
This will return the world coordinate based on the bodies _current_ position and bounds.


longname: Phaser.Physics.Matter.BodyBounds-getBottomLeft
since: 3.22.0
name: getBottomLeft
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x?:number,y?:number
returnstype: Phaser.Math.Vector2|false
returnsdescription: A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Takes a Body and returns the world coordinates of the bottom-left of its _bounds_.

Body bounds are updated by Matter each step and factor in scale and rotation.
This will return the world coordinate based on the bodies _current_ position and bounds.


longname: Phaser.Physics.Matter.BodyBounds-getBottomCenter
since: 3.22.0
name: getBottomCenter
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x?:number,y?:number
returnstype: Phaser.Math.Vector2|false
returnsdescription: A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Takes a Body and returns the world coordinates of the bottom-center of its _bounds_.

Body bounds are updated by Matter each step and factor in scale and rotation.
This will return the world coordinate based on the bodies _current_ position and bounds.


longname: Phaser.Physics.Matter.BodyBounds-getBottomRight
since: 3.22.0
name: getBottomRight
memberof: Phaser.Physics.Matter.BodyBounds
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x?:number,y?:number
returnstype: Phaser.Math.Vector2|false
returnsdescription: A Vector2 containing the coordinates, or `false` if it was unable to parse the body.
metafilename: BodyBounds.js
metapath: physics/matter-js
description:
Takes a Body and returns the world coordinates of the bottom-right of its _bounds_.

Body bounds are updated by Matter each step and factor in scale and rotation.
This will return the world coordinate based on the bodies _current_ position and bounds.


longname: Phaser.Physics.Matter.Components.Collision-setCollisionCategory
since: 3.0.0
name: setCollisionCategory
memberof: Phaser.Physics.Matter.Components.Collision
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Collision.js
metapath: physics/matter-js/components
description:
Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31.
Two bodies with different collision groups (see [#setCollisionGroup](#setCollisionGroup)) will only collide if their collision
categories are included in their collision masks (see [#setCollidesWith](#setCollidesWith)).


longname: Phaser.Physics.Matter.Components.Collision-setCollisionGroup
since: 3.0.0
name: setCollisionGroup
memberof: Phaser.Physics.Matter.Components.Collision
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Collision.js
metapath: physics/matter-js/components
description:
Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values,
they will collide according to the usual rules (see [#setCollisionCategory](#setCollisionCategory) and [#setCollisionGroup](#setCollisionGroup)).
If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value,
they will never collide.


longname: Phaser.Physics.Matter.Components.Collision-setCollidesWith
since: 3.0.0
name: setCollidesWith
memberof: Phaser.Physics.Matter.Components.Collision
scope: instance
signature: categories:number|Array.<number>
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Collision.js
metapath: physics/matter-js/components
description:
Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only
collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0`
and `(categoryB & maskA) !== 0` are both true.


longname: Phaser.Physics.Matter.Components.Collision-setOnCollide
since: 3.22.0
name: setOnCollide
memberof: Phaser.Physics.Matter.Components.Collision
scope: instance
signature: callback:function
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Collision.js
metapath: physics/matter-js/components
description:
The callback is sent a `Phaser.Types.Physics.Matter.MatterCollisionData` object.

This does not change the bodies collision category, group or filter. Those must be set in addition
to the callback.


longname: Phaser.Physics.Matter.Components.Collision-setOnCollideWith
since: 3.22.0
name: setOnCollideWith
memberof: Phaser.Physics.Matter.Components.Collision
scope: instance
signature: body:MatterJS.Body|Array.<MatterJS.Body>,callback:function
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Collision.js
metapath: physics/matter-js/components
description:
The callback is sent a reference to the other body, along with a `Phaser.Types.Physics.Matter.MatterCollisionData` object.

This does not change the bodies collision category, group or filter. Those must be set in addition
to the callback.


longname: Phaser.Physics.Matter.Components.Force-thrust
since: 3.0.0
name: thrust
memberof: Phaser.Physics.Matter.Components.Force
scope: instance
signature: speed:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Force.js
metapath: physics/matter-js/components
description:
Apply thrust to the forward position of the body.

Use very small values, such as 0.1, depending on the mass and required speed.


longname: Phaser.Physics.Matter.Components.Force-thrustLeft
since: 3.0.0
name: thrustLeft
memberof: Phaser.Physics.Matter.Components.Force
scope: instance
signature: speed:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Force.js
metapath: physics/matter-js/components
description:
Apply thrust to the left position of the body.

Use very small values, such as 0.1, depending on the mass and required speed.


longname: Phaser.Physics.Matter.Components.Force-thrustRight
since: 3.0.0
name: thrustRight
memberof: Phaser.Physics.Matter.Components.Force
scope: instance
signature: speed:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Force.js
metapath: physics/matter-js/components
description:
Apply thrust to the right position of the body.

Use very small values, such as 0.1, depending on the mass and required speed.


longname: Phaser.Physics.Matter.Components.Force-thrustBack
since: 3.0.0
name: thrustBack
memberof: Phaser.Physics.Matter.Components.Force
scope: instance
signature: speed:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Force.js
metapath: physics/matter-js/components
description:
Apply thrust to the back position of the body.

Use very small values, such as 0.1, depending on the mass and required speed.


longname: Phaser.Physics.Matter.Components.Friction-setFrictionAir
since: 3.0.0
name: setFrictionAir
memberof: Phaser.Physics.Matter.Components.Friction
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Friction.js
metapath: physics/matter-js/components
description:
Sets a new air resistance for this Game Object's Matter Body.
A value of 0 means the Body will never slow as it moves through space.
The higher the value, the faster a Body slows when moving through space.


longname: Phaser.Physics.Matter.Components.Friction-setFrictionStatic
since: 3.0.0
name: setFrictionStatic
memberof: Phaser.Physics.Matter.Components.Friction
scope: instance
signature: value:number
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Friction.js
metapath: physics/matter-js/components
description:
Sets a new static friction for this Game Object's Matter Body.
A value of 0 means the Body will never "stick" when it is nearly stationary.
The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary.


longname: Phaser.Physics.Matter.Components.Sensor-setSensor
since: 3.0.0
name: setSensor
memberof: Phaser.Physics.Matter.Components.Sensor
scope: instance
signature: value:boolean
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: Sensor.js
metapath: physics/matter-js/components
description:
Set the body belonging to this Game Object to be a sensor.
Sensors trigger collision events, but don't react with colliding body physically.


longname: Phaser.Physics.Matter.Components.SetBody-setRectangle
since: 3.0.0
name: setRectangle
memberof: Phaser.Physics.Matter.Components.SetBody
scope: instance
signature: width:number,height:number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: SetBody.js
metapath: physics/matter-js/components
description:
Set the body on a Game Object to a rectangle.

Calling this methods resets previous properties you may have set on the body, including
plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed.


longname: Phaser.Physics.Matter.Components.SetBody-setCircle
since: 3.0.0
name: setCircle
memberof: Phaser.Physics.Matter.Components.SetBody
scope: instance
signature: radius:number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: SetBody.js
metapath: physics/matter-js/components
description:
Set the body on a Game Object to a circle.

Calling this methods resets previous properties you may have set on the body, including
plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed.


longname: Phaser.Physics.Matter.Components.SetBody-setPolygon
since: 3.0.0
name: setPolygon
memberof: Phaser.Physics.Matter.Components.SetBody
scope: instance
signature: radius:number,sides:number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: SetBody.js
metapath: physics/matter-js/components
description:
Set the body on the Game Object to a polygon shape.

Calling this methods resets previous properties you may have set on the body, including
plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed.


longname: Phaser.Physics.Matter.Components.SetBody-setTrapezoid
since: 3.0.0
name: setTrapezoid
memberof: Phaser.Physics.Matter.Components.SetBody
scope: instance
signature: width:number,height:number,slope:number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: SetBody.js
metapath: physics/matter-js/components
description:
Set the body on the Game Object to a trapezoid shape.

Calling this methods resets previous properties you may have set on the body, including
plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed.


longname: Phaser.Physics.Matter.Components.SetBody-setExistingBody
since: 3.0.0
name: setExistingBody
memberof: Phaser.Physics.Matter.Components.SetBody
scope: instance
signature: body:MatterJS.BodyType,addToWorld?:boolean
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: SetBody.js
metapath: physics/matter-js/components
description:
Set this Game Object to use the given existing Matter Body.

The body is first removed from the world before being added to this Game Object.


longname: Phaser.Physics.Matter.Components.SetBody-setBody
since: 3.0.0
name: setBody
memberof: Phaser.Physics.Matter.Components.SetBody
scope: instance
returnstype: Phaser.GameObjects.GameObject
returnsdescription: This Game Object.
metafilename: SetBody.js
metapath: physics/matter-js/components
description:
Set this Game Object to create and use a new Body based on the configuration object given.

Calling this method resets previous properties you may have set on the body, including
plugins, mass, friction, etc. So be sure to re-apply these in the options object if needed.

signature:
config:string|Phaser.Types.Physics.Matter.MatterSetBodyConfig,options?:Phaser.Types.Physics.Matter.MatterBodyConfig


longname: Phaser.Physics.Matter.Components.Sleep-setSleepThreshold
since: 3.0.0
name: setSleepThreshold
memberof: Phaser.Physics.Matter.Components.Sleep
scope: instance
signature: value?:number
returnstype: Phaser.Physics.Matter.Components.Sleep
returnsdescription: This Game Object.
metafilename: Sleep.js
metapath: physics/matter-js/components
description:
Sets the number of updates in which this body must have near-zero velocity before it is set as sleeping (if sleeping is enabled by the engine).


longname: Phaser.Physics.Matter.Components.Sleep-setSleepEvents
since: 3.0.0
name: setSleepEvents
memberof: Phaser.Physics.Matter.Components.Sleep
scope: instance
signature: start:boolean,end:boolean
returnstype: Phaser.Physics.Matter.Components.Sleep
returnsdescription: This Game Object.
metafilename: Sleep.js
metapath: physics/matter-js/components
description:
Enable sleep and wake events for this body.

By default when a body goes to sleep, or wakes up, it will not emit any events.

The events are emitted by the Matter World instance and can be listened to via
the `SLEEP_START` and `SLEEP_END` events.


longname: Phaser.Physics.Matter.Components.Transform-setPosition
since: 3.0.0
name: setPosition
memberof: Phaser.Physics.Matter.Components.Transform
scope: instance
signature: x?:number,y?:number
returnstype: Phaser.Physics.Matter.Components.Transform
returnsdescription: This Game Object.
metafilename: Transform.js
metapath: physics/matter-js/components
description:
Sets the position of the physics body along x and y axes.
Both the parameters to this function are optional and if not passed any they default to 0.
Velocity, angle, force etc. are unchanged.


longname: Phaser.Physics.Matter.Components.Transform-setFixedRotation
since: 3.0.0
name: setFixedRotation
memberof: Phaser.Physics.Matter.Components.Transform
scope: instance
returnstype: Phaser.Physics.Matter.Components.Transform
returnsdescription: This Game Object.
metafilename: Transform.js
metapath: physics/matter-js/components
description:
Setting fixed rotation sets the Body inertia to Infinity, which stops it
from being able to rotate when forces are applied to it.


longname: Phaser.Physics.Matter.Factory-trapezoid
since: 3.0.0
name: trapezoid
memberof: Phaser.Physics.Matter.Factory
description: Creates a new rigid trapezoidal Body and adds it to the World.
scope: instance
returnstype: MatterJS.BodyType
returnsdescription: A Matter JS Body.
metafilename: Factory.js
metapath: physics/matter-js
signature:
x:number,y:number,width:number,height:number,slope:number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig


longname: Phaser.Physics.Matter.Factory-circle
since: 3.0.0
name: circle
memberof: Phaser.Physics.Matter.Factory
description: Creates a new rigid circular Body and adds it to the World.
scope: instance
returnstype: MatterJS.BodyType
returnsdescription: A Matter JS Body.
metafilename: Factory.js
metapath: physics/matter-js
signature:
x:number,y:number,radius:number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig,maxSides?:number


longname: Phaser.Physics.Matter.Factory-fromVertices
since: 3.0.0
name: fromVertices
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: MatterJS.BodyType
returnsdescription: A Matter JS Body.
metafilename: Factory.js
metapath: physics/matter-js
description:
Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World.
If the vertices are convex, they will pass through as supplied. Otherwise, if the vertices are concave, they will be decomposed. Note that this process is not guaranteed to support complex sets of vertices, e.g. ones with holes.

signature:
x:number,y:number,vertexSets:string|array,options?:Phaser.Types.Physics.Matter.MatterBodyConfig,flagInternal?:boolean,removeCollinear?:number,minimumArea?:number


longname: Phaser.Physics.Matter.Factory-fromPhysicsEditor
since: 3.22.0
name: fromPhysicsEditor
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: MatterJS.BodyType
returnsdescription: A Matter JS Body.
metafilename: Factory.js
metapath: physics/matter-js
description:
Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor)

The PhysicsEditor file should be loaded as JSON:

```javascript
preload ()
{
  this.load.json('vehicles', 'assets/vehicles.json);
}

create ()
{
  const vehicleShapes = this.cache.json.get('vehicles');
  this.matter.add.fromPhysicsEditor(400, 300, vehicleShapes.truck);
}
```

Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it.

If you pas in an `options` object, any settings in there will override those in the PhysicsEditor config object.

signature:
x:number,y:number,config:any,options?:Phaser.Types.Physics.Matter.MatterBodyConfig,addToWorld?:boolean


longname: Phaser.Physics.Matter.Factory-fromSVG
since: 3.22.0
name: fromSVG
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: MatterJS.BodyType
returnsdescription: A Matter JS Body.
metafilename: Factory.js
metapath: physics/matter-js
description:
Creates a body using the path data from an SVG file.

SVG Parsing requires the pathseg polyfill from [https://github.com/progers/pathseg](https://github.com/progers/pathseg)

The SVG file should be loaded as XML, as this method requires the ability to extract
the path data from it. I.e.:

```javascript
preload ()
{
  this.load.xml('face', 'assets/face.svg);
}

create ()
{
  this.matter.add.fromSVG(400, 300, this.cache.xml.get('face'));
}
```

signature:
x:number,y:number,xml:object,scale?:number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig,addToWorld?:boolean


longname: Phaser.Physics.Matter.Factory-fromJSON
since: 3.22.0
name: fromJSON
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: MatterJS.BodyType
returnsdescription: A Matter JS Body.
metafilename: Factory.js
metapath: physics/matter-js
description:
Creates a body using the supplied physics data, as provided by a JSON file.

The data file should be loaded as JSON:

```javascript
preload ()
{
  this.load.json('ninjas', 'assets/ninjas.json);
}

create ()
{
  const ninjaShapes = this.cache.json.get('ninjas');

  this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi);
}
```

Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it.

If you pas in an `options` object, any settings in there will override those in the config object.

The structure of the JSON file is as follows:

```text
{
  'generator_info': // The name of the application that created the JSON data
  'shapeName': {
    'type': // The type of body
    'label': // Optional body label
    'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs
  }
}
```

At the time of writing, only the Phaser Physics Tracer App exports in this format.

signature:
x:number,y:number,config:any,options?:Phaser.Types.Physics.Matter.MatterBodyConfig,addToWorld?:boolean


longname: Phaser.Physics.Matter.Factory-imageStack
since: 3.0.0
name: imageStack
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: MatterJS.CompositeType
returnsdescription: A Matter JS Composite Stack.
metafilename: Factory.js
metapath: physics/matter-js
description:
Create a new composite containing Matter Image objects created in a grid arrangement.
This function uses the body bounds to prevent overlaps.

signature:
key:string,frame:string|number,x:number,y:number,columns:number,rows:number,columnGap?:number,rowGap?:number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig


longname: Phaser.Physics.Matter.Factory-stack
since: 3.0.0
name: stack
memberof: Phaser.Physics.Matter.Factory
scope: instance
signature: x:number,y:number,columns:number,rows:number,columnGap:number,rowGap:number,callback:function
returnstype: MatterJS.CompositeType
returnsdescription: A new composite containing objects created in the callback.
metafilename: Factory.js
metapath: physics/matter-js
description:
Create a new composite containing bodies created in the callback in a grid arrangement.

This function uses the body bounds to prevent overlaps.


longname: Phaser.Physics.Matter.Factory-pyramid
since: 3.0.0
name: pyramid
memberof: Phaser.Physics.Matter.Factory
scope: instance
signature: x:number,y:number,columns:number,rows:number,columnGap:number,rowGap:number,callback:function
returnstype: MatterJS.CompositeType
returnsdescription: A Matter JS Composite pyramid.
metafilename: Factory.js
metapath: physics/matter-js
description:
Create a new composite containing bodies created in the callback in a pyramid arrangement.
This function uses the body bounds to prevent overlaps.


longname: Phaser.Physics.Matter.Factory-chain
since: 3.0.0
name: chain
memberof: Phaser.Physics.Matter.Factory
description: Chains all bodies in the given composite together using constraints.
scope: instance
returnstype: MatterJS.CompositeType
returnsdescription: The original composite that was passed to this method.
metafilename: Factory.js
metapath: physics/matter-js
signature:
composite:MatterJS.CompositeType,xOffsetA:number,yOffsetA:number,xOffsetB:number,yOffsetB:number,options?:Phaser.Types.Physics.Matter.MatterConstraintConfig


longname: Phaser.Physics.Matter.Factory-mesh
since: 3.0.0
name: mesh
memberof: Phaser.Physics.Matter.Factory
description: Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.
scope: instance
returnstype: MatterJS.CompositeType
returnsdescription: The original composite that was passed to this method.
metafilename: Factory.js
metapath: physics/matter-js
signature:
composite:MatterJS.CompositeType,columns:number,rows:number,crossBrace:boolean,options?:Phaser.Types.Physics.Matter.MatterConstraintConfig


longname: Phaser.Physics.Matter.Factory-softBody
since: 3.0.0
name: softBody
memberof: Phaser.Physics.Matter.Factory
description: Creates a simple soft body like object.
scope: instance
returnstype: MatterJS.CompositeType
returnsdescription: A new composite simple soft body.
metafilename: Factory.js
metapath: physics/matter-js
signature:
x:number,y:number,columns:number,rows:number,columnGap:number,rowGap:number,crossBrace:boolean,particleRadius:number,particleOptions?:Phaser.Types.Physics.Matter.MatterBodyConfig,constraintOptions?:Phaser.Types.Physics.Matter.MatterConstraintConfig


longname: Phaser.Physics.Matter.Factory-joint
since: 3.0.0
name: joint
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: MatterJS.ConstraintType
returnsdescription: A Matter JS Constraint.
metafilename: Factory.js
metapath: physics/matter-js
description:
This method is an alias for `Factory.constraint`.

Constraints (or joints) are used for specifying that a fixed distance must be maintained
between two bodies, or a body and a fixed world-space position.

The stiffness of constraints can be modified to create springs or elastic.

To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness`
value (e.g. `0.7` or above).

If the constraint is unstable, try lowering the `stiffness` value and / or increasing
`constraintIterations` within the Matter Config.

For compound bodies, constraints must be applied to the parent body and not one of its parts.

signature:
bodyA:MatterJS.BodyType,bodyB:MatterJS.BodyType,length?:number,stiffness?:number,options?:Phaser.Types.Physics.Matter.MatterConstraintConfig


longname: Phaser.Physics.Matter.Factory-constraint
since: 3.0.0
name: constraint
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: MatterJS.ConstraintType
returnsdescription: A Matter JS Constraint.
metafilename: Factory.js
metapath: physics/matter-js
description:
Constraints (or joints) are used for specifying that a fixed distance must be maintained
between two bodies, or a body and a fixed world-space position.

The stiffness of constraints can be modified to create springs or elastic.

To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness`
value (e.g. `0.7` or above).

If the constraint is unstable, try lowering the `stiffness` value and / or increasing
`constraintIterations` within the Matter Config.

For compound bodies, constraints must be applied to the parent body and not one of its parts.

signature:
bodyA:MatterJS.BodyType,bodyB:MatterJS.BodyType,length?:number,stiffness?:number,options?:Phaser.Types.Physics.Matter.MatterConstraintConfig


longname: Phaser.Physics.Matter.Factory-worldConstraint
since: 3.0.0
name: worldConstraint
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: MatterJS.ConstraintType
returnsdescription: A Matter JS Constraint.
metafilename: Factory.js
metapath: physics/matter-js
description:
Constraints (or joints) are used for specifying that a fixed distance must be maintained
between two bodies, or a body and a fixed world-space position.

A world constraint has only one body, you should specify a `pointA` position in
the constraint options parameter to attach the constraint to the world.

The stiffness of constraints can be modified to create springs or elastic.

To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness`
value (e.g. `0.7` or above).

If the constraint is unstable, try lowering the `stiffness` value and / or increasing
`constraintIterations` within the Matter Config.

For compound bodies, constraints must be applied to the parent body and not one of its parts.

signature:
body:MatterJS.BodyType,length?:number,stiffness?:number,options?:Phaser.Types.Physics.Matter.MatterConstraintConfig


longname: Phaser.Physics.Matter.Factory-mouseSpring
since: 3.0.0
name: mouseSpring
memberof: Phaser.Physics.Matter.Factory
scope: instance
signature: options?:Phaser.Types.Physics.Matter.MatterConstraintConfig
returnstype: MatterJS.ConstraintType
returnsdescription: A Matter JS Constraint.
metafilename: Factory.js
metapath: physics/matter-js
description:
This method is an alias for `Factory.pointerConstraint`.

A Pointer Constraint is a special type of constraint that allows you to click
and drag bodies in a Matter World. It monitors the active Pointers in a Scene,
and when one is pressed down it checks to see if that hit any part of any active
body in the world. If it did, and the body has input enabled, it will begin to
drag it until either released, or you stop it via the `stopDrag` method.

You can adjust the stiffness, length and other properties of the constraint via
the `options` object on creation.


longname: Phaser.Physics.Matter.Factory-image
since: 3.0.0
name: image
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: Phaser.Physics.Matter.Image
returnsdescription: The Matter Image Game Object.
metafilename: Factory.js
metapath: physics/matter-js
description:
Creates a Matter Physics Image Game Object.

An Image is a light-weight Game Object useful for the display of static images in your game,
such as logos, backgrounds, scenery or other non-animated elements. Images can have input
events and physics bodies, or be tweened, tinted or scrolled. The main difference between an
Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.

signature:
x:number,y:number,key:string,frame?:string|number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig


longname: Phaser.Physics.Matter.Factory-tileBody
since: 3.0.0
name: tileBody
memberof: Phaser.Physics.Matter.Factory
scope: instance
signature: tile:Phaser.Tilemaps.Tile,options?:Phaser.Types.Physics.Matter.MatterTileOptions
returnstype: Phaser.Physics.Matter.TileBody
returnsdescription: The Matter Tile Body Game Object.
metafilename: Factory.js
metapath: physics/matter-js
description:
Creates a wrapper around a Tile that provides access to a corresponding Matter body. A tile can only
have one Matter body associated with it. You can either pass in an existing Matter body for
the tile or allow the constructor to create the corresponding body for you. If the Tile has a
collision group (defined in Tiled), those shapes will be used to create the body. If not, the
tile's rectangle bounding box will be used.

The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody.

Note: not all Tiled collision shapes are supported. See
Phaser.Physics.Matter.TileBody#setFromTileCollision for more information.


longname: Phaser.Physics.Matter.Factory-sprite
since: 3.0.0
name: sprite
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: Phaser.Physics.Matter.Sprite
returnsdescription: The Matter Sprite Game Object.
metafilename: Factory.js
metapath: physics/matter-js
description:
Creates a Matter Physics Sprite Game Object.

A Sprite Game Object is used for the display of both static and animated images in your game.
Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled
and animated.

The main difference between a Sprite and an Image Game Object is that you cannot animate Images.
As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation
Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.

signature:
x:number,y:number,key:string,frame?:string|number,options?:Phaser.Types.Physics.Matter.MatterBodyConfig


longname: Phaser.Physics.Matter.Factory-gameObject
since: 3.3.0
name: gameObject
memberof: Phaser.Physics.Matter.Factory
scope: instance
returnstype: Phaser.Physics.Matter.Image|Phaser.Physics.Matter.Sprite|Phaser.GameObjects.GameObject
returnsdescription: The Game Object that had the Matter Components injected into it.
metafilename: Factory.js
metapath: physics/matter-js
description:
Takes an existing Game Object and injects all of the Matter Components into it.

This enables you to use component methods such as `setVelocity` or `isSensor` directly from
this Game Object.

You can also pass in either a Matter Body Configuration object, or a Matter Body instance
to link with this Game Object.

signature:
gameObject:Phaser.GameObjects.GameObject,options?:Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body,addToWorld?:boolean


longname: Phaser.Physics.Matter.MatterGameObject
since: 3.3.0
name: MatterGameObject
memberof: Phaser.Physics.Matter
scope: static
returnstype: Phaser.GameObjects.GameObject
returnsdescription: The Game Object that was created with the Matter body.
metafilename: MatterGameObject.js
metapath: physics/matter-js
description:
A Matter Game Object is a generic object that allows you to combine any Phaser Game Object,
including those you have extended or created yourself, with all of the Matter Components.

This enables you to use component methods such as `setVelocity` or `isSensor` directly from
this Game Object.

signature:
world:Phaser.Physics.Matter.World,gameObject:Phaser.GameObjects.GameObject,options?:Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body,addToWorld?:boolean


longname: Phaser.Physics.Matter.MatterPhysics-enableAttractorPlugin
since: 3.0.0
name: enableAttractorPlugin
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Enables the Matter Attractors Plugin.

The attractors plugin that makes it easy to apply continual forces on bodies.
It's possible to simulate effects such as wind, gravity and magnetism.

[https://github.com/liabru/matter-attractors](https://github.com/liabru/matter-attractors)

This method is called automatically if `plugins.attractors` is set in the Matter World Config.
However, you can also call it directly from within your game.


longname: Phaser.Physics.Matter.MatterPhysics-enableWrapPlugin
since: 3.0.0
name: enableWrapPlugin
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Enables the Matter Wrap Plugin.

The coordinate wrapping plugin that automatically wraps the position of bodies such that they always stay
within the given bounds. Upon crossing a boundary the body will appear on the opposite side of the bounds,
while maintaining its velocity.

[https://github.com/liabru/matter-wrap](https://github.com/liabru/matter-wrap)

This method is called automatically if `plugins.wrap` is set in the Matter World Config.
However, you can also call it directly from within your game.


longname: Phaser.Physics.Matter.MatterPhysics-enableCollisionEventsPlugin
since: 3.22.0
name: enableCollisionEventsPlugin
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Enables the Matter Collision Events Plugin.

Note that this plugin is enabled by default. So you should only ever need to call this
method if you have specifically disabled the plugin in your Matter World Config.
You can disable it by setting `plugins.collisionevents: false` in your Matter World Config.

This plugin triggers three new events on Matter.Body:

1. `onCollide`
2. `onCollideEnd`
3. `onCollideActive`

These events correspond to the Matter.js events `collisionStart`, `collisionActive` and `collisionEnd`, respectively.
You can listen to these events via Matter.Events or they will also be emitted from the Matter World.

This plugin also extends Matter.Body with three convenience functions:

`Matter.Body.setOnCollide(callback)`
`Matter.Body.setOnCollideEnd(callback)`
`Matter.Body.setOnCollideActive(callback)`

You can register event callbacks by providing a function of type (pair: Matter.Pair) => void

[https://github.com/dxu/matter-collision-events](https://github.com/dxu/matter-collision-events)


longname: Phaser.Physics.Matter.MatterPhysics-pause
since: 3.0.0
name: pause
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
fires: Phaser.Physics.Matter.Events.PAUSE
returnstype: Phaser.Physics.Matter.World
returnsdescription: The Matter World object.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Pauses the Matter World instance and sets `enabled` to `false`.

A paused world will not run any simulations for the duration it is paused.


longname: Phaser.Physics.Matter.MatterPhysics-set60Hz
since: 3.4.0
name: set60Hz
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Sets the Matter Engine to run at fixed timestep of 60Hz and enables `autoUpdate`.
If you have set a custom `getDelta` function then this will override it.


longname: Phaser.Physics.Matter.MatterPhysics-set30Hz
since: 3.4.0
name: set30Hz
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Sets the Matter Engine to run at fixed timestep of 30Hz and enables `autoUpdate`.
If you have set a custom `getDelta` function then this will override it.


longname: Phaser.Physics.Matter.MatterPhysics-step
since: 3.4.0
name: step
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
signature: delta?:number,correction?:number
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Manually advances the physics simulation by one iteration.

You can optionally pass in the `delta` and `correction` values to be used by Engine.update.
If undefined they use the Matter defaults of 60Hz and no correction.

Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`.

It also ignores any custom `getDelta` functions, as you should be passing the delta
value in to this call.

You can adjust the number of iterations that Engine.update performs internally.
Use the Scene Matter Physics config object to set the following properties:

positionIterations (defaults to 6)
velocityIterations (defaults to 4)
constraintIterations (defaults to 2)

Adjusting these values can help performance in certain situations, depending on the physics requirements
of your game.


longname: Phaser.Physics.Matter.MatterPhysics-containsPoint
since: 3.22.0
name: containsPoint
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: boolean
returnsdescription: `true` if the point is within one of the bodies given, otherwise `false`.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Checks if the vertices of the given body, or an array of bodies, contains the given point, or not.

You can pass in either a single body, or an array of bodies to be checked. This method will
return `true` if _any_ of the bodies in the array contain the point. See the `intersectPoint` method if you need
to get a list of intersecting bodies.

The point should be transformed into the Matter World coordinate system in advance. This happens by
default with Input Pointers, but if you wish to use points from another system you may need to
transform them before passing them.

signature:
body:Phaser.Types.Physics.Matter.MatterBody|Array.<Phaser.Types.Physics.Matter.MatterBody>,x:number,y:number


longname: Phaser.Physics.Matter.MatterPhysics-intersectPoint
since: 3.22.0
name: intersectPoint
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
signature: x:number,y:number,bodies?:Array.<Phaser.Types.Physics.Matter.MatterBody>
returnstype: Array.<Phaser.Types.Physics.Matter.MatterBody>
returnsdescription: An array of bodies which contain the given point.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Checks the given coordinates to see if any vertices of the given bodies contain it.

If no bodies are provided it will search all bodies in the Matter World, including within Composites.

The coordinates should be transformed into the Matter World coordinate system in advance. This happens by
default with Input Pointers, but if you wish to use coordinates from another system you may need to
transform them before passing them.


longname: Phaser.Physics.Matter.MatterPhysics-intersectRect
since: 3.22.0
name: intersectRect
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Array.<Phaser.Types.Physics.Matter.MatterBody>
returnsdescription: An array of bodies that intersect with the given area.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Checks the given rectangular area to see if any vertices of the given bodies intersect with it.
Or, if the `outside` parameter is set to `true`, it checks to see which bodies do not
intersect with it.

If no bodies are provided it will search all bodies in the Matter World, including within Composites.

signature:
x:number,y:number,width:number,height:number,outside?:boolean,bodies?:Array.<Phaser.Types.Physics.Matter.MatterBody>


longname: Phaser.Physics.Matter.MatterPhysics-intersectRay
since: 3.22.0
name: intersectRay
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Array.<Phaser.Types.Physics.Matter.MatterBody>
returnsdescription: An array of bodies whos vertices intersect with the ray segment.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Checks the given ray segment to see if any vertices of the given bodies intersect with it.

If no bodies are provided it will search all bodies in the Matter World.

The width of the ray can be specified via the `rayWidth` parameter.

signature:
x1:number,y1:number,x2:number,y2:number,rayWidth?:number,bodies?:Array.<Phaser.Types.Physics.Matter.MatterBody>


longname: Phaser.Physics.Matter.MatterPhysics-intersectBody
since: 3.22.0
name: intersectBody
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,bodies?:Array.<Phaser.Types.Physics.Matter.MatterBody>
returnstype: Array.<Phaser.Types.Physics.Matter.MatterBody>
returnsdescription: An array of bodies whos vertices intersect with target body.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Checks the given Matter Body to see if it intersects with any of the given bodies.

If no bodies are provided it will check against all bodies in the Matter World.


longname: Phaser.Physics.Matter.MatterPhysics-overlap
since: 3.22.0
name: overlap
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: boolean
returnsdescription: `true` if the target body intersects with _any_ of the bodies given, otherwise `false`.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Checks to see if the target body, or an array of target bodies, intersects with any of the given bodies.

If intersection occurs this method will return `true` and, if provided, invoke the callbacks.

If no bodies are provided for the second parameter the target will check again all bodies in the Matter World.

Note that bodies can only overlap if they are in non-colliding collision groups or categories.

If you provide a `processCallback` then the two bodies that overlap are sent to it. This callback
must return a boolean and is used to allow you to perform additional processing tests before a final
outcome is decided. If it returns `true` then the bodies are finally passed to the `overlapCallback`, if set.

If you provide an `overlapCallback` then the matching pairs of overlapping bodies will be sent to it.

Both callbacks have the following signature: `function (bodyA, bodyB, collisionInfo)` where `bodyA` is always
the target body. The `collisionInfo` object contains additional data, such as the angle and depth of penetration.

signature:
target:Phaser.Types.Physics.Matter.MatterBody|Array.<Phaser.Types.Physics.Matter.MatterBody>,bodies?:Array.<Phaser.Types.Physics.Matter.MatterBody>,overlapCallback?:ArcadePhysicsCallback,processCallback?:ArcadePhysicsCallback,callbackContext?:*


longname: Phaser.Physics.Matter.MatterPhysics-setCollisionCategory
since: 3.22.0
name: setCollisionCategory
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
signature: bodies:Array.<Phaser.Types.Physics.Matter.MatterBody>,value:number
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Sets the collision filter category of all given Matter Bodies to the given value.

This number must be a power of two between 2^0 (= 1) and 2^31.

Bodies with different collision groups (see [#setCollisionGroup](#setCollisionGroup)) will only collide if their collision
categories are included in their collision masks (see [#setCollidesWith](#setCollidesWith)).


longname: Phaser.Physics.Matter.MatterPhysics-setCollisionGroup
since: 3.22.0
name: setCollisionGroup
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
signature: bodies:Array.<Phaser.Types.Physics.Matter.MatterBody>,value:number
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Sets the collision filter group of all given Matter Bodies to the given value.

If the group value is zero, or if two Matter Bodies have different group values,
they will collide according to the usual collision filter rules (see [#setCollisionCategory](#setCollisionCategory) and [#setCollisionGroup](#setCollisionGroup)).

If two Matter Bodies have the same positive group value, they will always collide;
if they have the same negative group value they will never collide.


longname: Phaser.Physics.Matter.MatterPhysics-setCollidesWith
since: 3.22.0
name: setCollidesWith
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
signature: bodies:Array.<Phaser.Types.Physics.Matter.MatterBody>,categories:number|Array.<number>
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Sets the collision filter mask of all given Matter Bodies to the given value.

Two Matter Bodies with different collision groups will only collide if each one includes the others
category in its mask based on a bitwise AND operation: `(categoryA & maskB) !== 0` and 
`(categoryB & maskA) !== 0` are both true.


longname: Phaser.Physics.Matter.MatterPhysics-getMatterBodies
since: 3.22.0
name: getMatterBodies
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
signature: bodies?:array
returnstype: Array.<MatterJS.BodyType>
returnsdescription: An array of native Matter Body objects.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Takes an array and returns a new array made from all of the Matter Bodies found in the original array.

For example, passing in Matter Game Objects, such as a bunch of Matter Sprites, to this method, would
return an array containing all of their native Matter Body objects.

If the `bodies` argument is falsey, it will return all bodies in the world.


longname: Phaser.Physics.Matter.MatterPhysics-setVelocity
since: 3.22.0
name: setVelocity
memberof: Phaser.Physics.Matter.MatterPhysics
description: Sets both the horizontal and vertical linear velocity of the physics bodies.
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
signature:
bodies:Phaser.Types.Physics.Matter.MatterBody|Array.<Phaser.Types.Physics.Matter.MatterBody>,x:number,y:number


longname: Phaser.Physics.Matter.MatterPhysics-setVelocityX
since: 3.22.0
name: setVelocityX
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Sets just the horizontal linear velocity of the physics bodies.
The vertical velocity of the body is unchanged.

signature:
bodies:Phaser.Types.Physics.Matter.MatterBody|Array.<Phaser.Types.Physics.Matter.MatterBody>,x:number


longname: Phaser.Physics.Matter.MatterPhysics-setVelocityY
since: 3.22.0
name: setVelocityY
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Sets just the vertical linear velocity of the physics bodies.
The horizontal velocity of the body is unchanged.

signature:
bodies:Phaser.Types.Physics.Matter.MatterBody|Array.<Phaser.Types.Physics.Matter.MatterBody>,y:number


longname: Phaser.Physics.Matter.MatterPhysics-setAngularVelocity
since: 3.22.0
name: setAngularVelocity
memberof: Phaser.Physics.Matter.MatterPhysics
description: Sets the angular velocity of the bodies instantly. Position, angle, force etc. are unchanged.
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
signature:
bodies:Phaser.Types.Physics.Matter.MatterBody|Array.<Phaser.Types.Physics.Matter.MatterBody>,value:number


longname: Phaser.Physics.Matter.MatterPhysics-applyForce
since: 3.22.0
name: applyForce
memberof: Phaser.Physics.Matter.MatterPhysics
description: Applies a force to a body, at the bodies current position, including resulting torque.
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
signature:
bodies:Phaser.Types.Physics.Matter.MatterBody|Array.<Phaser.Types.Physics.Matter.MatterBody>,force:Phaser.Types.Math.Vector2Like


longname: Phaser.Physics.Matter.MatterPhysics-applyForceFromPosition
since: 3.22.0
name: applyForceFromPosition
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Applies a force to a body, from the given world position, including resulting torque.
If no angle is given, the current body angle is used.

Use very small speed values, such as 0.1, depending on the mass and required velocity.

signature:
bodies:Phaser.Types.Physics.Matter.MatterBody|Array.<Phaser.Types.Physics.Matter.MatterBody>,position:Phaser.Types.Math.Vector2Like,speed:number,angle?:number


longname: Phaser.Physics.Matter.MatterPhysics-applyForceFromAngle
since: 3.22.0
name: applyForceFromAngle
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Apply a force to a body based on the given angle and speed.
If no angle is given, the current body angle is used.

Use very small speed values, such as 0.1, depending on the mass and required velocity.

signature:
bodies:Phaser.Types.Physics.Matter.MatterBody|Array.<Phaser.Types.Physics.Matter.MatterBody>,speed:number,angle?:number


longname: Phaser.Physics.Matter.MatterPhysics-alignBody
since: 3.22.0
name: alignBody
memberof: Phaser.Physics.Matter.MatterPhysics
scope: instance
signature: body:Phaser.Types.Physics.Matter.MatterBody,x:number,y:number,align:number
returnstype: Phaser.Physics.Matter.MatterPhysics
returnsdescription: This Matter Physics instance.
metafilename: MatterPhysics.js
metapath: physics/matter-js
description:
Aligns a Body, or Matter Game Object, against the given coordinates.

The alignment takes place using the body bounds, which take into consideration things
like body scale and rotation.

Although a Body has a `position` property, it is based on the center of mass for the body,
not a dimension based center. This makes aligning bodies difficult, especially if they have
rotated or scaled. This method will derive the correct position based on the body bounds and
its center of mass offset, in order to align the body with the given coordinate.

For example, if you wanted to align a body so it sat in the bottom-center of the
Scene, and the world was 800 x 600 in size:

```javascript
this.matter.alignBody(body, 400, 600, Phaser.Display.Align.BOTTOM_CENTER);
```

You pass in 400 for the x coordinate, because that is the center of the world, and 600 for
the y coordinate, as that is the base of the world.


longname: Phaser.Physics.Matter.TileBody-setFromTileCollision
since: 3.0.0
name: setFromTileCollision
memberof: Phaser.Physics.Matter.TileBody
scope: instance
signature: options?:Phaser.Types.Physics.Matter.MatterBodyTileOptions
returnstype: Phaser.Physics.Matter.TileBody
returnsdescription: This TileBody object.
metafilename: MatterTileBody.js
metapath: physics/matter-js
description:
Sets the current body from the collision group associated with the Tile. This is typically
set up in Tiled's collision editor.

Note: Matter doesn't support all shapes from Tiled. Rectangles and polygons are directly
supported. Ellipses are converted into circle bodies. Polylines are treated as if they are
closed polygons. If a tile has multiple shapes, a multi-part body will be created. Concave
shapes are supported if poly-decomp library is included. Decomposition is not guaranteed to
work for complex shapes (e.g. holes), so it's often best to manually decompose a concave
polygon into multiple convex polygons yourself.


longname: Phaser.Physics.Matter.PointerConstraint-onDown
since: 3.0.0
name: onDown
memberof: Phaser.Physics.Matter.PointerConstraint
scope: instance
signature: pointer:Phaser.Input.Pointer
metafilename: PointerConstraint.js
metapath: physics/matter-js
description:
A Pointer has been pressed down onto the Scene.

If this Constraint doesn't have an active Pointer then a hit test is set to
run against all active bodies in the world during the _next_ call to `update`.
If a body is found, it is bound to this constraint and the drag begins.


longname: Phaser.Physics.Matter.PointerConstraint-onUp
since: 3.22.0
name: onUp
memberof: Phaser.Physics.Matter.PointerConstraint
scope: instance
signature: pointer:Phaser.Input.Pointer
metafilename: PointerConstraint.js
metapath: physics/matter-js
description:
A Pointer has been released from the Scene. If it was the one this constraint was using, it's cleared.


longname: Phaser.Physics.Matter.PointerConstraint-getBody
since: 3.16.2
name: getBody
memberof: Phaser.Physics.Matter.PointerConstraint
scope: instance
fires: Phaser.Physics.Matter.Events.DRAG_START
returnstype: boolean
returnsdescription: `true` if a body was found and set, otherwise `false`.
metafilename: PointerConstraint.js
metapath: physics/matter-js
description:
Scans all active bodies in the current Matter World to see if any of them
are hit by the Pointer. The _first one_ found to hit is set as the active contraint
body.


longname: Phaser.Physics.Matter.PointerConstraint-hitTestBody
since: 3.16.2
name: hitTestBody
memberof: Phaser.Physics.Matter.PointerConstraint
scope: instance
signature: body:MatterJS.BodyType,position:Phaser.Math.Vector2
returnstype: boolean
returnsdescription: `true` if a part of the body was hit, otherwise `false`.
metafilename: PointerConstraint.js
metapath: physics/matter-js
description:
Scans the current body to determine if a part of it was clicked on.
If a part is found the body is set as the `constraint.bodyB` property,
as well as the `body` property of this class. The part is also set.


longname: Phaser.Physics.Matter.PointerConstraint-stopDrag
since: 3.16.2
name: stopDrag
memberof: Phaser.Physics.Matter.PointerConstraint
scope: instance
fires: Phaser.Physics.Matter.Events.DRAG_END
metafilename: PointerConstraint.js
metapath: physics/matter-js
description:
Stops the Pointer Constraint from dragging the body any further.

This is called automatically if the Pointer is released while actively
dragging a body. Or, you can call it manually to release a body from a
constraint without having to first release the pointer.


longname: Phaser.Physics.Matter.World-setCompositeRenderStyle
since: 3.22.0
name: setCompositeRenderStyle
memberof: Phaser.Physics.Matter.World
scope: instance
signature: composite:MatterJS.CompositeType
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World instance for method chaining.
metafilename: World.js
metapath: physics/matter-js
description:
Sets the debug render style for the children of the given Matter Composite.

Composites themselves do not render, but they can contain bodies, constraints and other composites that may do.
So the children of this composite are passed to the `setBodyRenderStyle`, `setCompositeRenderStyle` and
`setConstraintRenderStyle` methods accordingly.


longname: Phaser.Physics.Matter.World-setBodyRenderStyle
since: 3.22.0
name: setBodyRenderStyle
memberof: Phaser.Physics.Matter.World
scope: instance
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World instance for method chaining.
metafilename: World.js
metapath: physics/matter-js
description:
Sets the debug render style for the given Matter Body.

If you are using this on a Phaser Game Object, such as a Matter Sprite, then pass in the body property
to this method, not the Game Object itself.

If you wish to skip a parameter, so it retains its current value, pass `false` for it.

If you wish to reset the Body render colors to the defaults found in the World Debug Config, then call
this method with just the `body` parameter provided and no others.

signature:
body:MatterJS.BodyType,lineColor?:number,lineOpacity?:number,lineThickness?:number,fillColor?:number,fillOpacity?:number


longname: Phaser.Physics.Matter.World-setConstraintRenderStyle
since: 3.22.0
name: setConstraintRenderStyle
memberof: Phaser.Physics.Matter.World
scope: instance
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World instance for method chaining.
metafilename: World.js
metapath: physics/matter-js
description:
Sets the debug render style for the given Matter Constraint.

If you are using this on a Phaser Game Object, then pass in the body property
to this method, not the Game Object itself.

If you wish to skip a parameter, so it retains its current value, pass `false` for it.

If you wish to reset the Constraint render colors to the defaults found in the World Debug Config, then call
this method with just the `constraint` parameter provided and no others.

signature:
constraint:MatterJS.ConstraintType,lineColor?:number,lineOpacity?:number,lineThickness?:number,pinSize?:number,anchorColor?:number,anchorSize?:number


longname: Phaser.Physics.Matter.World-setEventsProxy
since: 3.0.0
name: setEventsProxy
memberof: Phaser.Physics.Matter.World
scope: instance
metafilename: World.js
metapath: physics/matter-js
description:
This internal method acts as a proxy between all of the Matter JS events and then re-emits them
via this class.


longname: Phaser.Physics.Matter.World-setBounds
since: 3.0.0
name: setBounds
memberof: Phaser.Physics.Matter.World
scope: instance
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World object.
metafilename: World.js
metapath: physics/matter-js
description:
Sets the bounds of the Physics world to match the given world pixel dimensions.
You can optionally set which 'walls' to create: left, right, top or bottom.
If none of the walls are given it will default to use the walls settings it had previously.
I.e. if you previously told it to not have the left or right walls, and you then adjust the world size
the newly created bounds will also not have the left and right walls.
Explicitly state them in the parameters to override this.

signature:
x?:number,y?:number,width?:number,height?:number,thickness?:number,left?:boolean,right?:boolean,top?:boolean,bottom?:boolean


longname: Phaser.Physics.Matter.World-updateWall
since: 3.0.0
name: updateWall
memberof: Phaser.Physics.Matter.World
scope: instance
signature: add:boolean,position?:string,x?:number,y?:number,width?:number,height?:number
metafilename: World.js
metapath: physics/matter-js
description:
Updates the 4 rectangle bodies that were created, if `setBounds` was set in the Matter config, to use
the new positions and sizes. This method is usually only called internally via the `setBounds` method.


longname: Phaser.Physics.Matter.World-createDebugGraphic
since: 3.0.0
name: createDebugGraphic
memberof: Phaser.Physics.Matter.World
scope: instance
returnstype: Phaser.GameObjects.Graphics
returnsdescription: The newly created Graphics object.
metafilename: World.js
metapath: physics/matter-js
description:
Creates a Phaser.GameObjects.Graphics object that is used to render all of the debug bodies and joints to.

This method is called automatically by the constructor, if debugging has been enabled.

The created Graphics object is automatically added to the Scene at 0x0 and given a depth of `Number.MAX_VALUE`,
so it renders above all else in the Scene.

The Graphics object is assigned to the `debugGraphic` property of this class and `drawDebug` is enabled.


longname: Phaser.Physics.Matter.World-setGravity
since: 3.0.0
name: setGravity
memberof: Phaser.Physics.Matter.World
scope: instance
signature: x?:number,y?:number,scale?:number
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World object.
metafilename: World.js
metapath: physics/matter-js
description:
Sets the worlds gravity to the values given.

Gravity effects all bodies in the world, unless they have the `ignoreGravity` flag set.


longname: Phaser.Physics.Matter.World-add
since: 3.0.0
name: add
memberof: Phaser.Physics.Matter.World
scope: instance
signature: object:object|Array.<object>
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World object.
metafilename: World.js
metapath: physics/matter-js
description:
Adds a Matter JS object, or array of objects, to the world.

The objects should be valid Matter JS entities, such as a Body, Composite or Constraint.

Triggers `beforeAdd` and `afterAdd` events.


longname: Phaser.Physics.Matter.World-remove
since: 3.0.0
name: remove
memberof: Phaser.Physics.Matter.World
scope: instance
signature: object:object|Array.<object>,deep?:boolean
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World object.
metafilename: World.js
metapath: physics/matter-js
description:
Removes a Matter JS object, or array of objects, from the world.

The objects should be valid Matter JS entities, such as a Body, Composite or Constraint.

Triggers `beforeRemove` and `afterRemove` events.


longname: Phaser.Physics.Matter.World-removeConstraint
since: 3.0.0
name: removeConstraint
memberof: Phaser.Physics.Matter.World
scope: instance
signature: constraint:MatterJS.ConstraintType|Array.<MatterJS.ConstraintType>,deep?:boolean
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World object.
metafilename: World.js
metapath: physics/matter-js
description:
Removes a Matter JS constraint, or array of constraints, from the world.

Triggers `beforeRemove` and `afterRemove` events.


longname: Phaser.Physics.Matter.World-convertTilemapLayer
since: 3.0.0
name: convertTilemapLayer
memberof: Phaser.Physics.Matter.World
scope: instance
signature: tilemapLayer:Phaser.Tilemaps.TilemapLayer,options?:object
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World object.
metafilename: World.js
metapath: physics/matter-js
description:
Adds `MatterTileBody` instances for all the colliding tiles within the given tilemap layer.

Set the appropriate tiles in your layer to collide before calling this method!


longname: Phaser.Physics.Matter.World-convertTiles
since: 3.0.0
name: convertTiles
memberof: Phaser.Physics.Matter.World
scope: instance
signature: tiles:Array.<Phaser.Tilemaps.Tile>,options?:object
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World object.
metafilename: World.js
metapath: physics/matter-js
description:
Adds `MatterTileBody` instances for the given tiles. This adds bodies regardless of whether the
tiles are set to collide or not.


longname: Phaser.Physics.Matter.World-nextGroup
since: 3.0.0
name: nextGroup
memberof: Phaser.Physics.Matter.World
scope: instance
signature: isNonColliding?:boolean
returnstype: number
returnsdescription: Unique category bitfield
metafilename: World.js
metapath: physics/matter-js
description:
Returns the next unique group index for which bodies will collide.
If `isNonColliding` is `true`, returns the next unique group index for which bodies will not collide.


longname: Phaser.Physics.Matter.World-nextCategory
since: 3.0.0
name: nextCategory
memberof: Phaser.Physics.Matter.World
scope: instance
returnstype: number
returnsdescription: Unique category bitfield
metafilename: World.js
metapath: physics/matter-js
description:
Returns the next unique category bitfield (starting after the initial default category 0x0001).
There are 32 available.


longname: Phaser.Physics.Matter.World-pause
since: 3.0.0
name: pause
memberof: Phaser.Physics.Matter.World
scope: instance
fires: Phaser.Physics.Matter.Events.PAUSE
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World object.
metafilename: World.js
metapath: physics/matter-js
description:
Pauses this Matter World instance and sets `enabled` to `false`.

A paused world will not run any simulations for the duration it is paused.


longname: Phaser.Physics.Matter.World-update
since: 3.0.0
name: update
memberof: Phaser.Physics.Matter.World
scope: instance
signature: time:number,delta:number
metafilename: World.js
metapath: physics/matter-js
description:
The internal update method. This is called automatically by the parent Scene.

Moves the simulation forward in time by delta ms. Uses `World.correction` value as an optional number that
specifies the time correction factor to apply to the update. This can help improve the accuracy of the
simulation in cases where delta is changing between updates. The value of correction is defined as `delta / lastDelta`,
i.e. the percentage change of delta over the last step. Therefore the value is always 1 (no correction) when
delta is constant (or when no correction is desired, which is the default).
See the paper on Time Corrected Verlet for more information.

Triggers `beforeUpdate` and `afterUpdate` events. Triggers `collisionStart`, `collisionActive` and `collisionEnd` events.

If the World is paused, `update` is still run, but exits early and does not update the Matter Engine.


longname: Phaser.Physics.Matter.World-getAllConstraints
since: 3.22.0
name: getAllConstraints
memberof: Phaser.Physics.Matter.World
scope: instance
returnstype: Array.<MatterJS.ConstraintType>
returnsdescription: An array of all the Matter JS Constraints in this World.
metafilename: World.js
metapath: physics/matter-js
description:
Returns all the constraints in the Matter World, including all constraints in children, recursively.


longname: Phaser.Physics.Matter.World-postUpdate
since: 3.0.0
name: postUpdate
memberof: Phaser.Physics.Matter.World
scope: instance
metafilename: World.js
metapath: physics/matter-js
access: private
description:
Handles the rendering of bodies and debug information to the debug Graphics object, if enabled.

This method is called automatically by the Scene after all processing has taken place.


longname: Phaser.Physics.Matter.World-renderGrid
since: 3.22.0
name: renderGrid
memberof: Phaser.Physics.Matter.World
scope: instance
signature: grid:MatterJS.Grid,graphics:Phaser.GameObjects.Graphics,lineColor:number,lineOpacity:number
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World instance for method chaining.
metafilename: World.js
metapath: physics/matter-js
description:
Renders the Engine Broadphase Controller Grid to the given Graphics instance.

The debug renderer calls this method if the `showBroadphase` config value is set.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should
you wish to render the Grid to your own Graphics instance.


longname: Phaser.Physics.Matter.World-renderSeparations
since: 3.22.0
name: renderSeparations
memberof: Phaser.Physics.Matter.World
scope: instance
signature: pairs:Array.<MatterJS.Pair>,graphics:Phaser.GameObjects.Graphics,lineColor:number
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World instance for method chaining.
metafilename: World.js
metapath: physics/matter-js
description:
Renders the list of Pair separations to the given Graphics instance.

The debug renderer calls this method if the `showSeparations` config value is set.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should
you wish to render the Grid to your own Graphics instance.


longname: Phaser.Physics.Matter.World-renderCollisions
since: 3.22.0
name: renderCollisions
memberof: Phaser.Physics.Matter.World
scope: instance
signature: pairs:Array.<MatterJS.Pair>,graphics:Phaser.GameObjects.Graphics,lineColor:number
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World instance for method chaining.
metafilename: World.js
metapath: physics/matter-js
description:
Renders the list of collision points and normals to the given Graphics instance.

The debug renderer calls this method if the `showCollisions` config value is set.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should
you wish to render the Grid to your own Graphics instance.


longname: Phaser.Physics.Matter.World-renderBodyBounds
since: 3.22.0
name: renderBodyBounds
memberof: Phaser.Physics.Matter.World
scope: instance
signature: bodies:array,graphics:Phaser.GameObjects.Graphics,lineColor:number,lineOpacity:number
metafilename: World.js
metapath: physics/matter-js
description:
Renders the bounds of an array of Bodies to the given Graphics instance.

If the body is a compound body, it will render the bounds for the parent compound.

The debug renderer calls this method if the `showBounds` config value is set.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should
you wish to render bounds to your own Graphics instance.


longname: Phaser.Physics.Matter.World-renderBodyAxes
since: 3.22.0
name: renderBodyAxes
memberof: Phaser.Physics.Matter.World
scope: instance
metafilename: World.js
metapath: physics/matter-js
description:
Renders either all axes, or a single axis indicator, for an array of Bodies, to the given Graphics instance.

The debug renderer calls this method if the `showAxes` or `showAngleIndicator` config values are set.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should
you wish to render bounds to your own Graphics instance.

signature:
bodies:array,graphics:Phaser.GameObjects.Graphics,showAxes:boolean,lineColor:number,lineOpacity:number


longname: Phaser.Physics.Matter.World-renderBodyVelocity
since: 3.22.0
name: renderBodyVelocity
memberof: Phaser.Physics.Matter.World
scope: instance
metafilename: World.js
metapath: physics/matter-js
description:
Renders a velocity indicator for an array of Bodies, to the given Graphics instance.

The debug renderer calls this method if the `showVelocity` config value is set.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should
you wish to render bounds to your own Graphics instance.

signature:
bodies:array,graphics:Phaser.GameObjects.Graphics,lineColor:number,lineOpacity:number,lineThickness:number


longname: Phaser.Physics.Matter.World-renderBodies
since: 3.14.0
name: renderBodies
memberof: Phaser.Physics.Matter.World
scope: instance
signature: bodies:array
metafilename: World.js
metapath: physics/matter-js
access: private
description:
Renders the given array of Bodies to the debug graphics instance.

Called automatically by the `postUpdate` method.


longname: Phaser.Physics.Matter.World-renderBody
since: 3.22.0
name: renderBody
memberof: Phaser.Physics.Matter.World
scope: instance
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World instance for method chaining.
metafilename: World.js
metapath: physics/matter-js
description:
Renders a single Matter Body to the given Phaser Graphics Game Object.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should
you wish to render a Body to your own Graphics instance.

If you don't wish to render a line around the body, set the `lineColor` parameter to `null`.
Equally, if you don't wish to render a fill, set the `fillColor` parameter to `null`.

signature:
body:MatterJS.BodyType,graphics:Phaser.GameObjects.Graphics,showInternalEdges:boolean,lineColor?:number,lineOpacity?:number,lineThickness?:number,fillColor?:number,fillOpacity?:number


longname: Phaser.Physics.Matter.World-renderConvexHull
since: 3.22.0
name: renderConvexHull
memberof: Phaser.Physics.Matter.World
scope: instance
signature: body:MatterJS.BodyType,graphics:Phaser.GameObjects.Graphics,hullColor:number,lineThickness?:number
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World instance for method chaining.
metafilename: World.js
metapath: physics/matter-js
description:
Renders the Convex Hull for a single Matter Body to the given Phaser Graphics Game Object.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should
you wish to render a Body hull to your own Graphics instance.


longname: Phaser.Physics.Matter.World-renderJoints
since: 3.14.0
name: renderJoints
memberof: Phaser.Physics.Matter.World
scope: instance
metafilename: World.js
metapath: physics/matter-js
access: private
description:
Renders all of the constraints in the world (unless they are specifically set to invisible).

Called automatically by the `postUpdate` method.


longname: Phaser.Physics.Matter.World-renderConstraint
since: 3.22.0
name: renderConstraint
memberof: Phaser.Physics.Matter.World
scope: instance
returnstype: Phaser.Physics.Matter.World
returnsdescription: This Matter World instance for method chaining.
metafilename: World.js
metapath: physics/matter-js
description:
Renders a single Matter Constraint, such as a Pin or a Spring, to the given Phaser Graphics Game Object.

This method is used internally by the Matter Debug Renderer, but is also exposed publically should
you wish to render a Constraint to your own Graphics instance.

signature:
constraint:MatterJS.ConstraintType,graphics:Phaser.GameObjects.Graphics,lineColor:number,lineOpacity:number,lineThickness:number,pinSize:number,anchorColor:number,anchorSize:number


longname: Phaser.Physics.Matter.World-resetCollisionIDs
since: 3.17.0
name: resetCollisionIDs
memberof: Phaser.Physics.Matter.World
scope: instance
metafilename: World.js
metapath: physics/matter-js
description:
Resets the internal collision IDs that Matter.JS uses for Body collision groups.

You should call this before destroying your game if you need to restart the game
again on the same page, without first reloading the page. Or, if you wish to
consistently destroy a Scene that contains Matter.js and then run it again
later in the same game.


longname: Phaser.Physics.Matter.World-shutdown
since: 3.0.0
name: shutdown
memberof: Phaser.Physics.Matter.World
scope: instance
metafilename: World.js
metapath: physics/matter-js
overrides: Phaser.Events.EventEmitter#shutdown
description:
Will remove all Matter physics event listeners and clear the matter physics world,
engine and any debug graphics, if any.


longname: Phaser.Physics.Matter.World-destroy
since: 3.0.0
name: destroy
memberof: Phaser.Physics.Matter.World
scope: instance
metafilename: World.js
metapath: physics/matter-js
overrides: Phaser.Events.EventEmitter#destroy
description:
Will remove all Matter physics event listeners and clear the matter physics world,
engine and any debug graphics, if any.

After destroying the world it cannot be re-used again.


longname: Phaser.Plugins.BasePlugin-init
since: 3.8.0
name: init
memberof: Phaser.Plugins.BasePlugin
scope: instance
signature: data?:any
metafilename: BasePlugin.js
metapath: plugins
description:
The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.
It will never be called again on this instance.
In here you can set-up whatever you need for this plugin to run.
If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.
On a Scene Plugin, this method is never called. Use [Phaser.Plugins.ScenePlugin#boot](Phaser.Plugins.ScenePlugin#boot) instead.


longname: Phaser.Plugins.BasePlugin-start
since: 3.8.0
name: start
memberof: Phaser.Plugins.BasePlugin
scope: instance
metafilename: BasePlugin.js
metapath: plugins
description:
The PluginManager calls this method on a Global Plugin when the plugin is started.
If a plugin is stopped, and then started again, this will get called again.
Typically called immediately after `BasePlugin.init`.
On a Scene Plugin, this method is never called.


longname: Phaser.Plugins.BasePlugin-stop
since: 3.8.0
name: stop
memberof: Phaser.Plugins.BasePlugin
scope: instance
metafilename: BasePlugin.js
metapath: plugins
description:
The PluginManager calls this method on a Global Plugin when the plugin is stopped.
The game code has requested that your plugin stop doing whatever it does.
It is now considered as 'inactive' by the PluginManager.
Handle that process here (i.e. stop listening for events, etc)
If the plugin is started again then `BasePlugin.start` will be called again.
On a Scene Plugin, this method is never called.


longname: Phaser.Plugins.BasePlugin-destroy
since: 3.8.0
name: destroy
memberof: Phaser.Plugins.BasePlugin
scope: instance
metafilename: BasePlugin.js
metapath: plugins
description:
Game instance has been destroyed.
You must release everything in here, all references, all objects, free it all up.


longname: Phaser.Plugins.PluginCache.registerCustom
since: 3.8.0
name: registerCustom
memberof: Phaser.Plugins.PluginCache
scope: static
signature: key:string,plugin:function,mapping:string,data:any
metafilename: PluginCache.js
metapath: plugins
description:
Stores a custom plugin in the global plugin cache.
The key must be unique, within the scope of the cache.


longname: Phaser.Plugins.PluginCache.destroyCorePlugins
since: 3.12.0
name: destroyCorePlugins
memberof: Phaser.Plugins.PluginCache
scope: static
metafilename: PluginCache.js
metapath: plugins
description:
Removes all Core Plugins.

This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.
So be sure you only call this if you do not wish to run Phaser again.


longname: Phaser.Plugins.PluginManager-addToScene
since: 3.8.0
name: addToScene
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: sys:Phaser.Scenes.Systems,globalPlugins:array,scenePlugins:array
metafilename: PluginManager.js
metapath: plugins
access: protected
description:
Called by the Scene Systems class. Tells the plugin manager to install all Scene plugins into it.

First it will install global references, i.e. references from the Game systems into the Scene Systems (and Scene if mapped.)
Then it will install Core Scene Plugins followed by Scene Plugins registered with the PluginManager.
Finally it will install any references to Global Plugins that have a Scene mapping property into the Scene itself.


longname: Phaser.Plugins.PluginManager-installScenePlugin
since: 3.8.0
name: installScenePlugin
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string,plugin:function,mapping?:string,addToScene?:Phaser.Scene,fromLoader?:boolean
metafilename: PluginManager.js
metapath: plugins
description:
Installs a new Scene Plugin into the Plugin Manager and optionally adds it
to the given Scene as well. A Scene Plugin added to the manager in this way
will be automatically installed into all new Scenes using the key and mapping given.

The `key` property is what the plugin is injected into Scene.Systems as.
The `mapping` property is optional, and if specified is what the plugin is installed into
the Scene as. For example:

```javascript
this.plugins.installScenePlugin('powerupsPlugin', pluginCode, 'powerups');

// and from within the scene:
this.sys.powerupsPlugin; // key value
this.powerups; // mapping value
```

This method is called automatically by Phaser if you install your plugins using either the
Game Configuration object, or by preloading them via the Loader.


longname: Phaser.Plugins.PluginManager-install
since: 3.8.0
name: install
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string,plugin:function,start?:boolean,mapping?:string,data?:any
returnstype: Phaser.Plugins.BasePlugin
returnsdescription: The plugin that was started, or `null` if `start` was false, or game isn't yet booted.
metafilename: PluginManager.js
metapath: plugins
description:
Installs a new Global Plugin into the Plugin Manager and optionally starts it running.
A global plugin belongs to the Plugin Manager, rather than a specific Scene, and can be accessed
and used by all Scenes in your game.

The `key` property is what you use to access this plugin from the Plugin Manager.

```javascript
this.plugins.install('powerupsPlugin', pluginCode);

// and from within the scene:
this.plugins.get('powerupsPlugin');
```

This method is called automatically by Phaser if you install your plugins using either the
Game Configuration object, or by preloading them via the Loader.

The same plugin can be installed multiple times into the Plugin Manager by simply giving each
instance its own unique key.


longname: Phaser.Plugins.PluginManager-start
since: 3.8.0
name: start
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string,runAs?:string
returnstype: Phaser.Plugins.BasePlugin
returnsdescription: The plugin that was started, or `null` if invalid key given or plugin is already stopped.
metafilename: PluginManager.js
metapath: plugins
description:
Starts a global plugin running.

If the plugin was previously active then calling `start` will reset it to an active state and then
call its `start` method.

If the plugin has never been run before a new instance of it will be created within the Plugin Manager,
its active state set and then both of its `init` and `start` methods called, in that order.

If the plugin is already running under the given key then nothing happens.


longname: Phaser.Plugins.PluginManager-stop
since: 3.8.0
name: stop
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string
returnstype: Phaser.Plugins.PluginManager
returnsdescription: The Plugin Manager.
metafilename: PluginManager.js
metapath: plugins
description:
Stops a global plugin from running.

If the plugin is active then its active state will be set to false and the plugins `stop` method
will be called.

If the plugin is not already running, nothing will happen.


longname: Phaser.Plugins.PluginManager-get
since: 3.8.0
name: get
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string,autoStart?:boolean
returnstype: Phaser.Plugins.BasePlugin|function
returnsdescription: The plugin, or `null` if no plugin was found matching the key.
metafilename: PluginManager.js
metapath: plugins
description:
Gets a global plugin from the Plugin Manager based on the given key and returns it.

If it cannot find an active plugin based on the key, but there is one in the Plugin Cache with the same key,
then it will create a new instance of the cached plugin and return that.


longname: Phaser.Plugins.PluginManager-removeGlobalPlugin
since: 3.8.0
name: removeGlobalPlugin
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string
metafilename: PluginManager.js
metapath: plugins
description:
Removes a global plugin from the Plugin Manager and Plugin Cache.

It is up to you to remove all references to this plugin that you may hold within your game code.


longname: Phaser.Plugins.PluginManager-removeScenePlugin
since: 3.8.0
name: removeScenePlugin
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string
metafilename: PluginManager.js
metapath: plugins
description:
Removes a scene plugin from the Plugin Manager and Plugin Cache.

This will not remove the plugin from any active Scenes that are already using it.

It is up to you to remove all references to this plugin that you may hold within your game code.


longname: Phaser.Plugins.PluginManager-registerGameObject
since: 3.8.0
name: registerGameObject
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string,factoryCallback?:function,creatorCallback?:function
metafilename: PluginManager.js
metapath: plugins
description:
Registers a new type of Game Object with the global Game Object Factory and / or Creator.
This is usually called from within your Plugin code and is a helpful short-cut for creating
new Game Objects.

The key is the property that will be injected into the factories and used to create the
Game Object. For example:

```javascript
this.plugins.registerGameObject('clown', clownFactoryCallback, clownCreatorCallback);
// later in your game code:
this.add.clown();
this.make.clown();
```

The callbacks are what are called when the factories try to create a Game Object
matching the given key. It's important to understand that the callbacks are invoked within
the context of the GameObjectFactory. In this context there are several properties available
to use:

this.scene - A reference to the Scene that owns the GameObjectFactory.
this.displayList - A reference to the Display List the Scene owns.
this.updateList - A reference to the Update List the Scene owns.

See the GameObjectFactory and GameObjectCreator classes for more details.
Any public property or method listed is available from your callbacks under `this`.


longname: Phaser.Plugins.PluginManager-removeGameObject
since: 3.19.0
name: removeGameObject
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string,removeFromFactory?:boolean,removeFromCreator?:boolean
metafilename: PluginManager.js
metapath: plugins
description:
Removes a previously registered Game Object from the global Game Object Factory and / or Creator.
This is usually called from within your Plugin destruction code to help clean-up after your plugin has been removed.


longname: Phaser.Plugins.PluginManager-registerFileType
since: 3.8.0
name: registerFileType
memberof: Phaser.Plugins.PluginManager
scope: instance
signature: key:string,callback:function,addToScene?:Phaser.Scene
metafilename: PluginManager.js
metapath: plugins
description:
Registers a new file type with the global File Types Manager, making it available to all Loader
Plugins created after this.

This is usually called from within your Plugin code and is a helpful short-cut for creating
new loader file types.

The key is the property that will be injected into the Loader Plugin and used to load the
files. For example:

```javascript
this.plugins.registerFileType('wad', doomWadLoaderCallback);
// later in your preload code:
this.load.wad();
```

The callback is what is called when the loader tries to load a file  matching the given key.
It's important to understand that the callback is invoked within
the context of the LoaderPlugin. In this context there are several properties / methods available
to use:

this.addFile - A method to add the new file to the load queue.
this.scene - The Scene that owns the Loader Plugin instance.

See the LoaderPlugin class for more details. Any public property or method listed is available from
your callback under `this`.


longname: Phaser.Plugins.PluginManager-destroy
since: 3.8.0
name: destroy
memberof: Phaser.Plugins.PluginManager
scope: instance
metafilename: PluginManager.js
metapath: plugins
description:
Destroys this Plugin Manager and all associated plugins.
It will iterate all plugins found and call their `destroy` methods.

The PluginCache will remove all custom plugins.


longname: Phaser.Plugins.ScenePlugin-boot
since: 3.8.0
name: boot
memberof: Phaser.Plugins.ScenePlugin
scope: instance
metafilename: ScenePlugin.js
metapath: plugins
description:
This method is called when the Scene boots. It is only ever called once.

By this point the plugin properties `scene` and `systems` will have already been set.

In here you can listen for [Scene](Phaser.Scenes.Events) and set-up whatever you need for this plugin to run.
Here are the Scene events you can listen to:

- start
- ready
- preupdate
- update
- postupdate
- resize
- pause
- resume
- sleep
- wake
- transitioninit
- transitionstart
- transitioncomplete
- transitionout
- shutdown
- destroy

At the very least you should offer a destroy handler for when the Scene closes down, i.e:

```javascript
var eventEmitter = this.systems.events;
eventEmitter.once('destroy', this.sceneDestroy, this);
```


longname: Phaser.Plugins.ScenePlugin-destroy
since: 3.8.0
name: destroy
memberof: Phaser.Plugins.ScenePlugin
scope: instance
metafilename: ScenePlugin.js
metapath: plugins
overrides: Phaser.Plugins.BasePlugin#destroy
description:
Game instance has been destroyed.

You must release everything in here, all references, all objects, free it all up.


longname: Phaser.Renderer.Canvas.CanvasRenderer-resetTransform
since: 3.0.0
name: resetTransform
memberof: Phaser.Renderer.Canvas.CanvasRenderer
scope: instance
metafilename: CanvasRenderer.js
metapath: renderer/canvas
description:
Resets the transformation matrix of the current context to the identity matrix, thus resetting any transformation.


longname: Phaser.Renderer.Canvas.CanvasRenderer-render
since: 3.0.0
name: render
memberof: Phaser.Renderer.Canvas.CanvasRenderer
scope: instance
fires: Phaser.Renderer.Events.RENDER
metafilename: CanvasRenderer.js
metapath: renderer/canvas
description:
The core render step for a Scene Camera.

Iterates through the given array of Game Objects and renders them with the given Camera.

This is called by the `CameraManager.render` method. The Camera Manager instance belongs to a Scene, and is invoked
by the Scene Systems.render method.

This method is not called if `Camera.visible` is `false`, or `Camera.alpha` is zero.

signature:
scene:Phaser.Scene,children:Array.<Phaser.GameObjects.GameObject>,camera:Phaser.Cameras.Scene2D.Camera


longname: Phaser.Renderer.Canvas.CanvasRenderer-postRender
since: 3.0.0
name: postRender
memberof: Phaser.Renderer.Canvas.CanvasRenderer
scope: instance
fires: Phaser.Renderer.Events.POST_RENDER
metafilename: CanvasRenderer.js
metapath: renderer/canvas
description:
Restores the game context's global settings and takes a snapshot if one is scheduled.

The post-render step happens after all Cameras in all Scenes have been rendered.


longname: Phaser.Renderer.Canvas.CanvasRenderer-snapshotCanvas
since: 3.19.0
name: snapshotCanvas
memberof: Phaser.Renderer.Canvas.CanvasRenderer
scope: instance
returnstype: Phaser.Renderer.Canvas.CanvasRenderer
returnsdescription: This Canvas Renderer.
metafilename: CanvasRenderer.js
metapath: renderer/canvas
description:
Takes a snapshot of the given area of the given canvas.

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

Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets
more expensive the larger the canvas size gets, so please be careful how you employ this in your game.

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


longname: Phaser.Renderer.Canvas.CanvasRenderer-snapshot
since: 3.0.0
name: snapshot
memberof: Phaser.Renderer.Canvas.CanvasRenderer
scope: instance
signature: callback:Phaser.Types.Renderer.Snapshot.SnapshotCallback,type?:string,encoderOptions?:number
returnstype: Phaser.Renderer.Canvas.CanvasRenderer
returnsdescription: This WebGL Renderer.
metafilename: CanvasRenderer.js
metapath: renderer/canvas
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 creating an Image object from the canvas data, this is a 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.Canvas.CanvasRenderer-snapshotArea
since: 3.16.0
name: snapshotArea
memberof: Phaser.Renderer.Canvas.CanvasRenderer
scope: instance
returnstype: Phaser.Renderer.Canvas.CanvasRenderer
returnsdescription: This WebGL Renderer.
metafilename: CanvasRenderer.js
metapath: renderer/canvas
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 creating an Image object from the canvas data, this is a 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.Canvas.CanvasRenderer-snapshotPixel
since: 3.16.0
name: snapshotPixel
memberof: Phaser.Renderer.Canvas.CanvasRenderer
scope: instance
signature: x:number,y:number,callback:Phaser.Types.Renderer.Snapshot.SnapshotCallback
returnstype: Phaser.Renderer.Canvas.CanvasRenderer
returnsdescription: This WebGL Renderer.
metafilename: CanvasRenderer.js
metapath: renderer/canvas
description:
Schedules a snapshot of the given pixel from 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 area, see `snapshotArea`.

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

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


longname: Phaser.Renderer.Canvas.CanvasRenderer-batchSprite
since: 3.12.0
name: batchSprite
memberof: Phaser.Renderer.Canvas.CanvasRenderer
description: Takes a Sprite Game Object, or any object that extends it, and draws it to the current context.
scope: instance
metafilename: CanvasRenderer.js
metapath: renderer/canvas
signature:
sprite:Phaser.GameObjects.GameObject,frame:Phaser.Textures.Frame,camera:Phaser.Cameras.Scene2D.Camera,parentTransformMatrix?:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.Canvas.GetBlendModes
since: 3.0.0
name: GetBlendModes
memberof: Phaser.Renderer.Canvas
scope: static
returnstype: array
returnsdescription: Which Canvas blend mode corresponds to which default Phaser blend mode.
metafilename: GetBlendModes.js
metapath: renderer/canvas/utils
description:
Returns an array which maps the default blend modes to supported Canvas blend modes.

If the browser doesn't support a blend mode, it will default to the normal `source-over` blend mode.


longname: Phaser.Renderer.Canvas.SetTransform
since: 3.12.0
name: SetTransform
memberof: Phaser.Renderer.Canvas
scope: static
returnstype: boolean
returnsdescription: `true` if the Game Object context was set, otherwise `false`.
metafilename: SetTransform.js
metapath: renderer/canvas/utils
description:
Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix
and then performs the following steps:

1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts.
2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given.
3. Sets the blend mode of the context to be that used by the Game Object.
4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera.
5. Saves the context state.
6. Sets the final matrix values into the context via setTransform.
7. If Renderer.antialias, or the frame.source.scaleMode is set, then imageSmoothingEnabled is set.

This function is only meant to be used internally. Most of the Canvas Renderer classes use it.

signature:
renderer:Phaser.Renderer.Canvas.CanvasRenderer,ctx:CanvasRenderingContext2D,src:Phaser.GameObjects.GameObject,camera:Phaser.Cameras.Scene2D.Camera,parentMatrix?:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.Snapshot.Canvas
since: 3.0.0
name: Canvas
memberof: Phaser.Renderer.Snapshot
scope: static
signature: sourceCanvas:HTMLCanvasElement,config:Phaser.Types.Renderer.Snapshot.SnapshotState
metafilename: CanvasSnapshot.js
metapath: renderer/snapshot
description:
Takes a snapshot of an area from the current frame displayed by a canvas.

This is then copied to an Image object. When this loads, the results are sent
to the callback provided in the Snapshot Configuration object.


longname: Phaser.Renderer.Snapshot.WebGL
since: 3.0.0
name: WebGL
memberof: Phaser.Renderer.Snapshot
scope: static
signature: sourceCanvas:HTMLCanvasElement,config:Phaser.Types.Renderer.Snapshot.SnapshotState
metafilename: WebGLSnapshot.js
metapath: renderer/snapshot
description:
Takes a snapshot of an area from the current frame displayed by a WebGL canvas.

This is then copied to an Image object. When this loads, the results are sent
to the callback provided in the Snapshot Configuration object.


longname: Phaser.Renderer.WebGL.PipelineManager-boot
since: 3.50.0
name: boot
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: pipelineConfig?:Phaser.Types.Core.PipelineConfig
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Internal boot handler, called by the WebGLRenderer durings its boot process.

Adds all of the default pipelines, based on the game config, and then calls
the `boot` method on each one of them.

Finally, the default pipeline is set.


longname: Phaser.Renderer.WebGL.PipelineManager-add
since: 3.50.0
name: add
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: name:string,pipeline:Phaser.Renderer.WebGL.WebGLPipeline
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: The pipeline instance that was passed.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Adds a pipeline instance to this Pipeline Manager.

The name of the instance must be unique within this manager.

Make sure to pass an instance to this method, not a base class.

For example, you should pass it like this:

```javascript
this.add('yourName', new CustomPipeline());`
```

and **not** like this:

```javascript
this.add('yourName', CustomPipeline);`
```

To add a **Post Pipeline**, see `addPostPipeline` instead.


longname: Phaser.Renderer.WebGL.PipelineManager-addPostPipeline
since: 3.50.0
name: addPostPipeline
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: name:string,pipeline:function
returnstype: Phaser.Renderer.WebGL.PipelineManager
returnsdescription: This Pipeline Manager.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Adds a Post Pipeline to this Pipeline Manager.

Make sure to pass a base class to this method, not an instance.

For example, you should pass it like this:

```javascript
this.addPostPipeline('yourName', CustomPipeline);`
```

and **not** like this:

```javascript
this.addPostPipeline('yourName', new CustomPipeline());`
```

To add a regular pipeline, see the `add` method instead.


longname: Phaser.Renderer.WebGL.PipelineManager-get
since: 3.50.0
name: get
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: pipeline:string|Phaser.Renderer.WebGL.WebGLPipeline
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: The pipeline instance, or `undefined` if not found.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Returns the pipeline instance based on the given name, or instance.

If no instance, or matching name, exists in this manager, it returns `undefined`.


longname: Phaser.Renderer.WebGL.PipelineManager-getPostPipeline
since: 3.50.0
name: getPostPipeline
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
returnstype: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline
returnsdescription: The pipeline instance, or `undefined` if not found.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Returns a _new instance_ of the post pipeline based on the given name, or class.

If no instance, or matching name, exists in this manager, it returns `undefined`.

signature:
pipeline:string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline,gameObject?:Phaser.GameObjects.GameObject


longname: Phaser.Renderer.WebGL.PipelineManager-remove
since: 3.50.0
name: remove
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: name:string,removeClass?:boolean,removePostPipelineClass?:boolean
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Removes a pipeline instance based on the given name.

If no pipeline matches the name, this method does nothing.

Note that the pipeline will not be flushed or destroyed, it's simply removed from
this manager.


longname: Phaser.Renderer.WebGL.PipelineManager-set
since: 3.50.0
name: set
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: The pipeline that was set, or undefined if it couldn't be set.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Sets the current pipeline to be used by the `WebGLRenderer`.

This method accepts a pipeline instance as its parameter, not the name.

If the pipeline isn't already the current one it will call `WebGLPipeline.bind` and then `onBind`.

You cannot set Post FX Pipelines using this method. To use a Post FX Pipeline, you should
apply it to either a Camera, Container or other supporting Game Object.

signature:
pipeline:Phaser.Renderer.WebGL.WebGLPipeline,gameObject?:Phaser.GameObjects.GameObject,currentShader?:Phaser.Renderer.WebGL.WebGLShader


longname: Phaser.Renderer.WebGL.PipelineManager-preBatch
since: 3.50.0
name: preBatch
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
This method is called by the `WebGLPipeline.batchQuad` method, right before a quad
belonging to a Game Object is about to be added to the batch. It causes a batch
flush, then calls the `preBatch` method on the post-fx pipelines belonging to the
Game Object.


longname: Phaser.Renderer.WebGL.PipelineManager-postBatch
since: 3.50.0
name: postBatch
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
This method is called by the `WebGLPipeline.batchQuad` method, right after a quad
belonging to a Game Object has been added to the batch. It causes a batch
flush, then calls the `postBatch` method on the post-fx pipelines belonging to the
Game Object.


longname: Phaser.Renderer.WebGL.PipelineManager-preBatchCamera
since: 3.50.0
name: preBatchCamera
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: camera:Phaser.Cameras.Scene2D.Camera
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Called at the start of the `WebGLRenderer.preRenderCamera` method.

If the Camera has post pipelines set, it will flush the batch and then call the
`preBatch` method on the post-fx pipelines belonging to the Camera.


longname: Phaser.Renderer.WebGL.PipelineManager-postBatchCamera
since: 3.50.0
name: postBatchCamera
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: camera:Phaser.Cameras.Scene2D.Camera
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Called at the end of the `WebGLRenderer.postRenderCamera` method.

If the Camera has post pipelines set, it will flush the batch and then call the
`postBatch` method on the post-fx pipelines belonging to the Camera.


longname: Phaser.Renderer.WebGL.PipelineManager-isCurrent
since: 3.50.0
name: isCurrent
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: pipeline:Phaser.Renderer.WebGL.WebGLPipeline,currentShader?:Phaser.Renderer.WebGL.WebGLShader
returnstype: boolean
returnsdescription: `true` if the given pipeline is already the current pipeline, otherwise `false`.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Checks to see if the given pipeline is already the active pipeline, both within this
Pipeline Manager and also has the same shader set in the Renderer.


longname: Phaser.Renderer.WebGL.PipelineManager-copyFrame
since: 3.50.0
name: copyFrame
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
returnstype: Phaser.Renderer.WebGL.PipelineManager
returnsdescription: This Pipeline Manager instance.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Copy the `source` Render Target to the `target` Render Target.

You can optionally set the brightness factor of the copy.

The difference between this method and `drawFrame` is that this method
uses a faster copy shader, where only the brightness can be modified.
If you need color level manipulation, see `drawFrame` instead.

The copy itself is handled by the Utility Pipeline.

signature:
source:Phaser.Renderer.WebGL.RenderTarget,target?:Phaser.Renderer.WebGL.RenderTarget,brightness?:number,clear?:boolean,clearAlpha?:boolean


longname: Phaser.Renderer.WebGL.PipelineManager-copyToGame
since: 3.50.0
name: copyToGame
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: source:Phaser.Renderer.WebGL.RenderTarget
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Pops the framebuffer from the renderers FBO stack and sets that as the active target,
then draws the `source` Render Target to it. It then resets the renderer textures.

This should be done when you need to draw the _final_ results of a pipeline to the game
canvas, or the next framebuffer in line on the FBO stack. You should only call this once
in the `onDraw` handler and it should be the final thing called. Be careful not to call
this if you need to actually use the pipeline shader, instead of the copy shader. In
those cases, use the `bindAndDraw` method.


longname: Phaser.Renderer.WebGL.PipelineManager-drawFrame
since: 3.50.0
name: drawFrame
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
returnstype: Phaser.Renderer.WebGL.PipelineManager
returnsdescription: This Pipeline Manager instance.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Copy the `source` Render Target to the `target` Render Target, using the
given Color Matrix.

The difference between this method and `copyFrame` is that this method
uses a color matrix shader, where you have full control over the luminance
values used during the copy. If you don't need this, you can use the faster
`copyFrame` method instead.

The copy itself is handled by the Utility Pipeline.

signature:
source:Phaser.Renderer.WebGL.RenderTarget,target?:Phaser.Renderer.WebGL.RenderTarget,clearAlpha?:boolean,colorMatrix?:Phaser.Display.ColorMatrix


longname: Phaser.Renderer.WebGL.PipelineManager-blendFrames
since: 3.50.0
name: blendFrames
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
returnstype: Phaser.Renderer.WebGL.PipelineManager
returnsdescription: This Pipeline Manager instance.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Draws the `source1` and `source2` Render Targets to the `target` Render Target
using a linear blend effect, which is controlled by the `strength` parameter.

The draw itself is handled by the Utility Pipeline.

signature:
source1:Phaser.Renderer.WebGL.RenderTarget,source2:Phaser.Renderer.WebGL.RenderTarget,target?:Phaser.Renderer.WebGL.RenderTarget,strength?:number,clearAlpha?:boolean


longname: Phaser.Renderer.WebGL.PipelineManager-blendFramesAdditive
since: 3.50.0
name: blendFramesAdditive
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
returnstype: Phaser.Renderer.WebGL.PipelineManager
returnsdescription: This Pipeline Manager instance.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Draws the `source1` and `source2` Render Targets to the `target` Render Target
using an additive blend effect, which is controlled by the `strength` parameter.

The draw itself is handled by the Utility Pipeline.

signature:
source1:Phaser.Renderer.WebGL.RenderTarget,source2:Phaser.Renderer.WebGL.RenderTarget,target?:Phaser.Renderer.WebGL.RenderTarget,strength?:number,clearAlpha?:boolean


longname: Phaser.Renderer.WebGL.PipelineManager-blitFrame
since: 3.50.0
name: blitFrame
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
returnstype: Phaser.Renderer.WebGL.PipelineManager
returnsdescription: This Pipeline Manager instance.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Copy the `source` Render Target to the `target` Render Target.

The difference with this copy is that no resizing takes place. If the `source`
Render Target is larger than the `target` then only a portion the same size as
the `target` dimensions is copied across.

You can optionally set the brightness factor of the copy.

signature:
source:Phaser.Renderer.WebGL.RenderTarget,target:Phaser.Renderer.WebGL.RenderTarget,brightness?:number,clear?:boolean,clearAlpha?:boolean,eraseMode?:boolean


longname: Phaser.Renderer.WebGL.PipelineManager-copyFrameRect
since: 3.50.0
name: copyFrameRect
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
returnstype: Phaser.Renderer.WebGL.PipelineManager
returnsdescription: This Pipeline Manager instance.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Binds the `source` Render Target and then copies a section of it to the `target` Render Target.

This method is extremely fast because it uses `gl.copyTexSubImage2D` and doesn't
require the use of any shaders. Remember the coordinates are given in standard WebGL format,
where x and y specify the lower-left corner of the section, not the top-left. Also, the
copy entirely replaces the contents of the target texture, no 'merging' or 'blending' takes
place.

signature:
source:Phaser.Renderer.WebGL.RenderTarget,target:Phaser.Renderer.WebGL.RenderTarget,x:number,y:number,width:number,height:number,clear?:boolean,clearAlpha?:boolean


longname: Phaser.Renderer.WebGL.PipelineManager-setMulti
since: 3.50.0
name: setMulti
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
returnstype: Phaser.Renderer.WebGL.Pipelines.MultiPipeline
returnsdescription: The Multi Pipeline instance.
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Sets the Multi Pipeline to be the currently bound pipeline.

This is the default Phaser 3 rendering pipeline.


longname: Phaser.Renderer.WebGL.PipelineManager-rebind
since: 3.50.0
name: rebind
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
signature: pipeline?:Phaser.Renderer.WebGL.WebGLPipeline
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Use this to reset the gl context to the state that Phaser requires to continue rendering.

Calling this will:

* Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`.
* Clear the depth buffer and stencil buffers.
* Reset the viewport size.
* Reset the blend mode.
* Bind a blank texture as the active texture on texture unit zero.
* Rebinds the given pipeline instance.

You should call this if you have previously called `clear`, and then wish to return
rendering control to Phaser again.


longname: Phaser.Renderer.WebGL.PipelineManager-clear
since: 3.50.0
name: clear
memberof: Phaser.Renderer.WebGL.PipelineManager
scope: instance
metafilename: PipelineManager.js
metapath: renderer/webgl
description:
Flushes the current pipeline being used and then clears it, along with the
the current shader program and vertex buffer from the `WebGLRenderer`.

Then resets the blend mode to NORMAL.

Call this before jumping to your own gl context handler, and then call `rebind` when
you wish to return control to Phaser again.


longname: Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline-beginMask
since: 3.0.0
name: beginMask
memberof: Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline
scope: instance
metafilename: BitmapMaskPipeline.js
metapath: renderer/webgl/pipelines
description:
Binds necessary resources and renders the mask to a separated framebuffer.
The framebuffer for the masked object is also bound for further use.

signature:
mask:Phaser.GameObjects.GameObject,maskedObject:Phaser.GameObjects.GameObject,camera:Phaser.Cameras.Scene2D.Camera


longname: Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline-endMask
since: 3.0.0
name: endMask
memberof: Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline
scope: instance
signature: mask:Phaser.GameObjects.GameObject
metafilename: BitmapMaskPipeline.js
metapath: renderer/webgl/pipelines
description:
The masked game objects framebuffer is unbound and its texture
is bound together with the mask texture and the mask shader and
a draw call with a single quad is processed. Here is where the
masking effect is applied.


longname: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline-batchFillRect
since: 3.50.0
name: batchFillRect
memberof: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline
scope: instance
metafilename: GraphicsPipeline.js
metapath: renderer/webgl/pipelines
description:
Pushes a filled rectangle into the vertex batch.

Rectangle factors in the given transform matrices before adding to the batch.

signature:
x:number,y:number,width:number,height:number,currentMatrix:Phaser.GameObjects.Components.TransformMatrix,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline-batchFillTriangle
since: 3.50.0
name: batchFillTriangle
memberof: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline
scope: instance
metafilename: GraphicsPipeline.js
metapath: renderer/webgl/pipelines
description:
Pushes a filled triangle into the vertex batch.

Triangle factors in the given transform matrices before adding to the batch.

signature:
x0:number,y0:number,x1:number,y1:number,x2:number,y2:number,currentMatrix:Phaser.GameObjects.Components.TransformMatrix,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline-batchStrokeTriangle
since: 3.50.0
name: batchStrokeTriangle
memberof: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline
scope: instance
metafilename: GraphicsPipeline.js
metapath: renderer/webgl/pipelines
description:
Pushes a stroked triangle into the vertex batch.

Triangle factors in the given transform matrices before adding to the batch.

The triangle is created from 3 lines and drawn using the `batchStrokePath` method.

signature:
x0:number,y0:number,x1:number,y1:number,x2:number,y2:number,lineWidth:number,currentMatrix:Phaser.GameObjects.Components.TransformMatrix,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline-batchFillPath
since: 3.50.0
name: batchFillPath
memberof: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline
scope: instance
metafilename: GraphicsPipeline.js
metapath: renderer/webgl/pipelines
description:
Adds the given path to the vertex batch for rendering.

It works by taking the array of path data and then passing it through Earcut, which
creates a list of polygons. Each polygon is then added to the batch.

The path is always automatically closed because it's filled.

signature:
path:Array.<Phaser.Types.Math.Vector2Like>,currentMatrix:Phaser.GameObjects.Components.TransformMatrix,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline-batchStrokePath
since: 3.50.0
name: batchStrokePath
memberof: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline
scope: instance
metafilename: GraphicsPipeline.js
metapath: renderer/webgl/pipelines
description:
Adds the given path to the vertex batch for rendering.

It works by taking the array of path data and calling `batchLine` for each section
of the path.

The path is optionally closed at the end.

signature:
path:Array.<Phaser.Types.Math.Vector2Like>,lineWidth:number,pathOpen:boolean,currentMatrix:Phaser.GameObjects.Components.TransformMatrix,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline-batchLine
since: 3.50.0
name: batchLine
memberof: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline
description: Creates a line out of 4 quads and adds it to the vertex batch based on the given line values.
scope: instance
metafilename: GraphicsPipeline.js
metapath: renderer/webgl/pipelines
signature:
ax:number,ay:number,bx:number,by:number,aLineWidth:number,bLineWidth:number,index:number,closePath:boolean,currentMatrix:Phaser.GameObjects.Components.TransformMatrix,parentMatrix:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline-batchVert
since: 3.50.0
name: batchVert
memberof: Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline
scope: instance
signature: x:number,y:number,tint:number
metafilename: GraphicsPipeline.js
metapath: renderer/webgl/pipelines
overrides: Phaser.Renderer.WebGL.WebGLPipeline#batchVert
description:
Adds a single vertex to the current vertex buffer and increments the
`vertexCount` property by 1.

This method is called directly by `batchTri` and `batchQuad`.

It does not perform any batch limit checking itself, so if you need to call
this method directly, do so in the same way that `batchQuad` does, for example.


longname: Phaser.Renderer.WebGL.Pipelines.LightPipeline-boot
since: 3.11.0
name: boot
memberof: Phaser.Renderer.WebGL.Pipelines.LightPipeline
scope: instance
metafilename: LightPipeline.js
metapath: renderer/webgl/pipelines
overrides: Phaser.Renderer.WebGL.Pipelines.MultiPipeline#boot
description:
Called when the Game has fully booted and the Renderer has finished setting up.

By this stage all Game level systems are now in place and you can perform any final
tasks that the pipeline may need that relied on game systems such as the Texture Manager.


longname: Phaser.Renderer.WebGL.Pipelines.LightPipeline-getNormalMap
since: 3.50.0
name: getNormalMap
memberof: Phaser.Renderer.WebGL.Pipelines.LightPipeline
scope: instance
signature: gameObject?:Phaser.GameObjects.GameObject
returnstype: WebGLTexture
returnsdescription: The normal map texture.
metafilename: LightPipeline.js
metapath: renderer/webgl/pipelines
description:
Returns the normal map WebGLTexture from the given Game Object.
If the Game Object doesn't have one, it returns the default normal map from this pipeline instead.


longname: Phaser.Renderer.WebGL.Pipelines.LightPipeline-batchSprite
since: 3.50.0
name: batchSprite
memberof: Phaser.Renderer.WebGL.Pipelines.LightPipeline
description: Takes a Sprite Game Object, or any object that extends it, and adds it to the batch.
scope: instance
metafilename: LightPipeline.js
metapath: renderer/webgl/pipelines
overrides: Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchSprite
signature:
gameObject:Phaser.GameObjects.Image|Phaser.GameObjects.Sprite,camera:Phaser.Cameras.Scene2D.Camera,parentTransformMatrix?:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.WebGL.Pipelines.LightPipeline-batchTexture
since: 3.50.0
name: batchTexture
memberof: Phaser.Renderer.WebGL.Pipelines.LightPipeline
description: Generic function for batching a textured quad using argument values instead of a Game Object.
scope: instance
metafilename: LightPipeline.js
metapath: renderer/webgl/pipelines
overrides: Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTexture
signature:
gameObject:Phaser.GameObjects.GameObject,texture:WebGLTexture,textureWidth:number,textureHeight:number,srcX:number,srcY:number,srcWidth:number,srcHeight:number,scaleX:number,scaleY:number,rotation:number,flipX:boolean,flipY:boolean,scrollFactorX:number,scrollFactorY:number,displayOriginX:number,displayOriginY:number,frameX:number,frameY:number,frameWidth:number,frameHeight:number,tintTL:number,tintTR:number,tintBL:number,tintBR:number,tintEffect:number,uOffset:number,vOffset:number,camera:Phaser.Cameras.Scene2D.Camera,parentTransformMatrix:Phaser.GameObjects.Components.TransformMatrix,skipFlip?:boolean,textureUnit?:number


longname: Phaser.Renderer.WebGL.Pipelines.LightPipeline-batchTextureFrame
since: 3.50.0
name: batchTextureFrame
memberof: Phaser.Renderer.WebGL.Pipelines.LightPipeline
description: Adds a Texture Frame into the batch for rendering.
scope: instance
metafilename: LightPipeline.js
metapath: renderer/webgl/pipelines
overrides: Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTextureFrame
signature:
frame:Phaser.Textures.Frame,x:number,y:number,tint:number,alpha:number,transformMatrix:Phaser.GameObjects.Components.TransformMatrix,parentTransformMatrix?:Phaser.GameObjects.Components.TransformMatrix


longname: Phaser.Renderer.WebGL.Pipelines.MultiPipeline-bind
since: 3.50.0
name: bind
memberof: Phaser.Renderer.WebGL.Pipelines.MultiPipeline
scope: instance
returnstype: Phaser.Renderer.WebGL.Pipelines.MultiPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: MultiPipeline.js
metapath: renderer/webgl/pipelines
overrides: Phaser.Renderer.WebGL.WebGLPipeline#bind
description:
Called every time the pipeline is bound by the renderer.
Sets the shader program, vertex buffer and other resources.
Should only be called when changing pipeline.


longname: Phaser.Renderer.WebGL.Pipelines.PointLightPipeline-batchPointLight
since: 3.50.0
name: batchPointLight
memberof: Phaser.Renderer.WebGL.Pipelines.PointLightPipeline
description: Adds a Point Light Game Object to the batch, flushing if required.
scope: instance
metafilename: PointLightPipeline.js
metapath: renderer/webgl/pipelines
signature:
light:Phaser.GameObjects.PointLight,camera:Phaser.Cameras.Scene2D.Camera,x0:number,y0:number,x1:number,y1:number,x2:number,y2:number,x3:number,y3:number,lightX:number,lightY:number


longname: Phaser.Renderer.WebGL.Pipelines.PointLightPipeline-batchLightVert
since: 3.50.0
name: batchLightVert
memberof: Phaser.Renderer.WebGL.Pipelines.PointLightPipeline
scope: instance
metafilename: PointLightPipeline.js
metapath: renderer/webgl/pipelines
description:
Adds a single Point Light vertex to the current vertex buffer and increments the
`vertexCount` property by 1.

This method is called directly by `batchPointLight`.

signature:
x:number,y:number,lightX:number,lightY:number,radius:number,attenuation:number,r:number,g:number,b:number,a:number


longname: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline-copyFrame
since: 3.50.0
name: copyFrame
memberof: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline
scope: instance
metafilename: PostFXPipeline.js
metapath: renderer/webgl/pipelines
description:
Copy the `source` Render Target to the `target` Render Target.

You can optionally set the brightness factor of the copy.

The difference between this method and `drawFrame` is that this method
uses a faster copy shader, where only the brightness can be modified.
If you need color level manipulation, see `drawFrame` instead.

signature:
source:Phaser.Renderer.WebGL.RenderTarget,target?:Phaser.Renderer.WebGL.RenderTarget,brightness?:number,clear?:boolean,clearAlpha?:boolean


longname: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline-drawFrame
since: 3.50.0
name: drawFrame
memberof: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline
scope: instance
metafilename: PostFXPipeline.js
metapath: renderer/webgl/pipelines
description:
Copy the `source` Render Target to the `target` Render Target, using the
given Color Matrix.

The difference between this method and `copyFrame` is that this method
uses a color matrix shader, where you have full control over the luminance
values used during the copy. If you don't need this, you can use the faster
`copyFrame` method instead.

signature:
source:Phaser.Renderer.WebGL.RenderTarget,target?:Phaser.Renderer.WebGL.RenderTarget,clearAlpha?:boolean


longname: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline-blendFrames
since: 3.50.0
name: blendFrames
memberof: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline
scope: instance
metafilename: PostFXPipeline.js
metapath: renderer/webgl/pipelines
description:
Draws the `source1` and `source2` Render Targets to the `target` Render Target
using a linear blend effect, which is controlled by the `strength` parameter.

signature:
source1:Phaser.Renderer.WebGL.RenderTarget,source2:Phaser.Renderer.WebGL.RenderTarget,target?:Phaser.Renderer.WebGL.RenderTarget,strength?:number,clearAlpha?:boolean


longname: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline-blendFramesAdditive
since: 3.50.0
name: blendFramesAdditive
memberof: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline
scope: instance
metafilename: PostFXPipeline.js
metapath: renderer/webgl/pipelines
description:
Draws the `source1` and `source2` Render Targets to the `target` Render Target
using an additive blend effect, which is controlled by the `strength` parameter.


longname: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline-bindAndDraw
since: 3.50.0
name: bindAndDraw
memberof: Phaser.Renderer.WebGL.Pipelines.PostFXPipeline
scope: instance
metafilename: PostFXPipeline.js
metapath: renderer/webgl/pipelines
description:
Binds this pipeline and draws the `source` Render Target to the `target` Render Target.

If no `target` is specified, it will pop the framebuffer from the Renderers FBO stack
and use that instead, which should be done when you need to draw the final results of
this pipeline to the game canvas.

You can optionally set the shader to be used for the draw here, if this is a multi-shader
pipeline. By default `currentShader` will be used. If you need to set a shader but not
a target, just pass `null` as the `target` parameter.

signature:
source:Phaser.Renderer.WebGL.RenderTarget,target?:Phaser.Renderer.WebGL.RenderTarget,clear?:boolean,clearAlpha?:boolean,currentShader?:Phaser.Renderer.WebGL.WebGLShader


longname: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline-blendFrames
since: 3.50.0
name: blendFrames
memberof: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline
scope: instance
metafilename: UtilityPipeline.js
metapath: renderer/webgl/pipelines
description:
Draws the `source1` and `source2` Render Targets to the `target` Render Target
using a linear blend effect, which is controlled by the `strength` parameter.

signature:
source1:Phaser.Renderer.WebGL.RenderTarget,source2:Phaser.Renderer.WebGL.RenderTarget,target?:Phaser.Renderer.WebGL.RenderTarget,strength?:number,clearAlpha?:boolean,blendShader?:Phaser.Renderer.WebGL.WebGLShader


longname: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline-setUVs
since: 3.50.0
name: setUVs
memberof: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline
scope: instance
signature: uA:number,vA:number,uB:number,vB:number,uC:number,vC:number,uD:number,vD:number
metafilename: UtilityPipeline.js
metapath: renderer/webgl/pipelines
description:
Set the UV values for the 6 vertices that make up the quad used by the shaders
in the Utility Pipeline.

Be sure to call `resetUVs` once you have finished manipulating the UV coordinates.


longname: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline-setTargetUVs
since: 3.50.0
name: setTargetUVs
memberof: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline
scope: instance
signature: source:Phaser.Renderer.WebGL.RenderTarget,target:Phaser.Renderer.WebGL.RenderTarget
metafilename: UtilityPipeline.js
metapath: renderer/webgl/pipelines
description:
Sets the vertex UV coordinates of the quad used by the shaders in the Utility Pipeline
so that they correctly adjust the texture coordinates for a blit frame effect.

Be sure to call `resetUVs` once you have finished manipulating the UV coordinates.


longname: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline-flipX
since: 3.50.0
name: flipX
memberof: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline
scope: instance
metafilename: UtilityPipeline.js
metapath: renderer/webgl/pipelines
description:
Horizontally flips the UV coordinates of the quad used by the shaders in this
Utility Pipeline.

Be sure to call `resetUVs` once you have finished manipulating the UV coordinates.


longname: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline-flipY
since: 3.50.0
name: flipY
memberof: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline
scope: instance
metafilename: UtilityPipeline.js
metapath: renderer/webgl/pipelines
description:
Vertically flips the UV coordinates of the quad used by the shaders in this
Utility Pipeline.

Be sure to call `resetUVs` once you have finished manipulating the UV coordinates.


longname: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline-resetUVs
since: 3.50.0
name: resetUVs
memberof: Phaser.Renderer.WebGL.Pipelines.UtilityPipeline
scope: instance
metafilename: UtilityPipeline.js
metapath: renderer/webgl/pipelines
description:
Resets the quad vertice UV values to their default settings.

The quad is used by all shaders of the Utility Pipeline.


longname: Phaser.Renderer.WebGL.RenderTarget-setAutoResize
since: 3.50.0
name: setAutoResize
memberof: Phaser.Renderer.WebGL.RenderTarget
scope: instance
signature: autoResize:boolean
returnstype: Phaser.Renderer.WebGL.RenderTarget
returnsdescription: This RenderTarget instance.
metafilename: RenderTarget.js
metapath: renderer/webgl
description:
Sets if this Render Target should automatically resize when the WebGL Renderer
emits a resize event.


longname: Phaser.Renderer.WebGL.RenderTarget-resize
since: 3.50.0
name: resize
memberof: Phaser.Renderer.WebGL.RenderTarget
scope: instance
signature: width:number,height:number
returnstype: Phaser.Renderer.WebGL.RenderTarget
returnsdescription: This RenderTarget instance.
metafilename: RenderTarget.js
metapath: renderer/webgl
description:
Resizes this Render Target.

Deletes both the frame buffer and texture, if they exist and then re-creates
them using the new sizes.

This method is called automatically by the pipeline during its resize handler.


longname: Phaser.Renderer.WebGL.RenderTarget-bind
since: 3.50.0
name: bind
memberof: Phaser.Renderer.WebGL.RenderTarget
scope: instance
signature: adjustViewport?:boolean,width?:number,height?:number
metafilename: RenderTarget.js
metapath: renderer/webgl
description:
Pushes this Render Target as the current frame buffer of the renderer.

If `autoClear` is set, then clears the texture.

If `adjustViewport` is `true` then it will flush the renderer and then adjust the GL viewport.


longname: Phaser.Renderer.WebGL.RenderTarget-adjustViewport
since: 3.50.0
name: adjustViewport
memberof: Phaser.Renderer.WebGL.RenderTarget
scope: instance
metafilename: RenderTarget.js
metapath: renderer/webgl
description:
Adjusts the GL viewport to match the width and height of this Render Target.

Also disables `SCISSOR_TEST`.


longname: Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha
since: 3.0.0
name: getTintAppendFloatAlpha
memberof: Phaser.Renderer.WebGL.Utils
scope: static
signature: rgb:number,a:number
returnstype: number
returnsdescription: Packed RGBA as Uint32
metafilename: Utils.js
metapath: renderer/webgl
description:
Packs a Uint24, representing RGB components, with a Float32, representing
the alpha component, with a range between 0.0 and 1.0 and return a Uint32


longname: Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap
since: 3.0.0
name: getTintAppendFloatAlphaAndSwap
memberof: Phaser.Renderer.WebGL.Utils
scope: static
signature: rgb:number,a:number
returnstype: number
returnsdescription: Packed RGBA as Uint32
metafilename: Utils.js
metapath: renderer/webgl
description:
Packs a Uint24, representing RGB components, with a Float32, representing
the alpha component, with a range between 0.0 and 1.0 and return a
swizzled Uint32


longname: Phaser.Renderer.WebGL.Utils.checkShaderMax
since: 3.50.0
name: checkShaderMax
memberof: Phaser.Renderer.WebGL.Utils
scope: static
signature: gl:WebGLRenderingContext,maxTextures:number
returnstype: number
returnsdescription: The number of texture units that is supported by this browser and GPU.
metafilename: Utils.js
metapath: renderer/webgl
description:
Check to see how many texture units the GPU supports, based on the given config value.
Then tests this against the maximum number of iterations GLSL can support.


longname: Phaser.Renderer.WebGL.Utils.parseFragmentShaderMaxTextures
since: 3.50.0
name: parseFragmentShaderMaxTextures
memberof: Phaser.Renderer.WebGL.Utils
scope: static
signature: fragmentShaderSource:string,maxTextures:number
returnstype: string
returnsdescription: The modified Fragment Shader source.
metafilename: Utils.js
metapath: renderer/webgl
description:
Checks the given Fragment Shader Source for `%count%` and `%forloop%` declarations and
replaces those with GLSL code for setting `texture = texture2D(uMainSampler[i], outTexCoord)`.


longname: Phaser.Renderer.WebGL.WebGLPipeline-boot
since: 3.11.0
name: boot
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
fires: Phaser.Renderer.WebGL.Pipelines.Events.BOOT
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Called when the Game has fully booted and the Renderer has finished setting up.

By this stage all Game level systems are now in place. You can perform any final tasks that the
pipeline may need, that relies on game systems such as the Texture Manager being ready.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onBoot
since: 3.50.0
name: onBoot
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
This method is called once when this pipeline has finished being set-up
at the end of the boot process. By the time this method is called, all
of the shaders are ready and configured.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onResize
since: 3.50.0
name: onResize
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: width:number,height:number
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
This method is called once when this pipeline has finished being set-up
at the end of the boot process. By the time this method is called, all
of the shaders are ready and configured. It's also called if the renderer
changes size.


longname: Phaser.Renderer.WebGL.WebGLPipeline-setShadersFromConfig
since: 3.50.0
name: setShadersFromConfig
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: config:Phaser.Types.Renderer.WebGL.WebGLPipelineConfig
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Destroys all shaders currently set in the `WebGLPipeline.shaders` array and then parses the given
`config` object, extracting the shaders from it, creating `WebGLShader` instances and finally
setting them into the `shaders` array of this pipeline.

This is a destructive process. Be very careful when you call it, should you need to.


longname: Phaser.Renderer.WebGL.WebGLPipeline-setGameObject
since: 3.50.0
name: setGameObject
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: gameObject:Phaser.GameObjects.GameObject,frame?:Phaser.Textures.Frame
returnstype: number
returnsdescription: The texture unit the Game Object has been assigned.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Custom pipelines can use this method in order to perform any required pre-batch tasks
for the given Game Object. It must return the texture unit the Game Object was assigned.


longname: Phaser.Renderer.WebGL.WebGLPipeline-shouldFlush
since: 3.0.0
name: shouldFlush
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: amount?:number
returnstype: boolean
returnsdescription: `true` if the current batch should be flushed, otherwise `false`.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Check if the current batch of vertices is full.

You can optionally provide an `amount` parameter. If given, it will check if the batch
needs to flush _if_ the `amount` is added to it. This allows you to test if you should
flush before populating the batch.


longname: Phaser.Renderer.WebGL.WebGLPipeline-resize
since: 3.0.0
name: resize
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
fires: Phaser.Renderer.WebGL.Pipelines.Events.RESIZE
signature: width:number,height:number
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Resizes the properties used to describe the viewport.

This method is called automatically by the renderer during its resize handler.


longname: Phaser.Renderer.WebGL.WebGLPipeline-setProjectionMatrix
since: 3.50.0
name: setProjectionMatrix
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: width:number,height:number
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Adjusts this pipelines ortho Projection Matrix to use the given dimensions
and resets the `uProjectionMatrix` uniform on all bound shaders.

This method is called automatically by the renderer during its resize handler.


longname: Phaser.Renderer.WebGL.WebGLPipeline-updateProjectionMatrix
since: 3.50.0
name: updateProjectionMatrix
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Adjusts this pipelines ortho Projection Matrix to match that of the global
WebGL Renderer Projection Matrix.

This method is called automatically by the Pipeline Manager when this
pipeline is set.


longname: Phaser.Renderer.WebGL.WebGLPipeline-bind
since: 3.0.0
name: bind
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
fires: Phaser.Renderer.WebGL.Pipelines.Events.BIND
signature: currentShader?:Phaser.Renderer.WebGL.WebGLShader
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
This method is called every time the Pipeline Manager makes this pipeline the currently active one.

It binds the resources and shader needed for this pipeline, including setting the vertex buffer
and attribute pointers.


longname: Phaser.Renderer.WebGL.WebGLPipeline-rebind
since: 3.0.0
name: rebind
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
fires: Phaser.Renderer.WebGL.Pipelines.Events.REBIND
signature: currentShader?:Phaser.Renderer.WebGL.WebGLShader
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
This method is called every time the Pipeline Manager rebinds this pipeline.

It resets all shaders this pipeline uses, setting their attributes again.


longname: Phaser.Renderer.WebGL.WebGLPipeline-setVertexBuffer
since: 3.50.0
name: setVertexBuffer
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
returnstype: boolean
returnsdescription: `true` if the vertex buffer was bound, or `false` if it was already bound.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Binds the vertex buffer to be the active ARRAY_BUFFER on the WebGL context.

It first checks to see if it's already set as the active buffer and only
binds itself if not.


longname: Phaser.Renderer.WebGL.WebGLPipeline-preBatch
since: 3.50.0
name: preBatch
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: gameObject?:Phaser.GameObjects.GameObject|Phaser.Cameras.Scene2D.Camera
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
This method is called as a result of the `WebGLPipeline.batchQuad` method, right before a quad
belonging to a Game Object is about to be added to the batch. When this is called, the
renderer has just performed a flush. It will bind the current render target, if any are set
and finally call the `onPreBatch` hook.


longname: Phaser.Renderer.WebGL.WebGLPipeline-postBatch
since: 3.50.0
name: postBatch
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: gameObject?:Phaser.GameObjects.GameObject|Phaser.Cameras.Scene2D.Camera
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
This method is called as a result of the `WebGLPipeline.batchQuad` method, right after a quad
belonging to a Game Object has been added to the batch. When this is called, the
renderer has just performed a flush.

It calls the `onDraw` hook followed by the `onPostBatch` hook, which can be used to perform
additional Post FX Pipeline processing.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onDraw
since: 3.50.0
name: onDraw
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: renderTarget:Phaser.Renderer.WebGL.RenderTarget
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
This method is only used by Post FX Pipelines and those that extend from them.

This method is called every time the `postBatch` method is called and is passed a
reference to the current render target.

At the very least a Post FX Pipeline should call `this.bindAndDraw(renderTarget)`,
however, you can do as much additional processing as you like in this method if
you override it from within your own pipelines.


longname: Phaser.Renderer.WebGL.WebGLPipeline-unbind
since: 3.50.0
name: unbind
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
This method is called every time the Pipeline Manager deactivates this pipeline, swapping from
it to another one. This happens after a call to `flush` and before the new pipeline is bound.


longname: Phaser.Renderer.WebGL.WebGLPipeline-flush
since: 3.0.0
name: flush
memberof: Phaser.Renderer.WebGL.WebGLPipeline
description: Uploads the vertex data and emits a draw call for the current batch of vertices.
scope: instance
signature: isPostFlush?:boolean
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
fires:
Phaser.Renderer.WebGL.Pipelines.Events.BEFORE_FLUSH,Phaser.Renderer.WebGL.Pipelines.Events.AFTER_FLUSH


longname: Phaser.Renderer.WebGL.WebGLPipeline-onActive
since: 3.50.0
name: onActive
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: currentShader:Phaser.Renderer.WebGL.WebGLShader
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called every time the Pipeline Manager makes this the active pipeline. It is called
at the end of the `WebGLPipeline.bind` method, after the current shader has been set. The current
shader is passed to this hook.

For example, if a display list has 3 Sprites in it that all use the same pipeline, this hook will
only be called for the first one, as the 2nd and 3rd Sprites do not cause the pipeline to be changed.

If you need to listen for that event instead, use the `onBind` hook.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onBind
since: 3.50.0
name: onBind
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: gameObject?:Phaser.GameObjects.GameObject
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called every time a **Game Object** asks the Pipeline Manager to use this pipeline,
even if the pipeline is already active.

Unlike the `onActive` method, which is only called when the Pipeline Manager makes this pipeline
active, this hook is called for every Game Object that requests use of this pipeline, allowing you to
perform per-object set-up, such as loading shader uniform data.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onRebind
since: 3.50.0
name: onRebind
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called when the Pipeline Manager needs to rebind this pipeline. This happens after a
pipeline has been cleared, usually when passing control over to a 3rd party WebGL library, like Spine,
and then returing to Phaser again.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onBatch
since: 3.50.0
name: onBatch
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: gameObject?:Phaser.GameObjects.GameObject
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called every time the `batchQuad` or `batchTri` methods are called. If this was
as a result of a Game Object, then the Game Object reference is passed to this hook too.

This hook is called _after_ the quad (or tri) has been added to the batch, so you can safely
call 'flush' from within this.

Note that Game Objects may call `batchQuad` or `batchTri` multiple times for a single draw,
for example the Graphics Game Object.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onPreBatch
since: 3.50.0
name: onPreBatch
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: gameObject?:Phaser.GameObjects.GameObject
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called immediately before a **Game Object** is about to add itself to the batch.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onPostBatch
since: 3.50.0
name: onPostBatch
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: gameObject?:Phaser.GameObjects.GameObject
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called immediately after a **Game Object** has been added to the batch.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onPreRender
since: 3.50.0
name: onPreRender
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called once per frame, right before anything has been rendered, but after the canvas
has been cleared. If this pipeline has a render target, it will also have been cleared by this point.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onRender
since: 3.50.0
name: onRender
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: scene:Phaser.Scene,camera:Phaser.Cameras.Scene2D.Camera
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called _once per frame_, by every Camera in a Scene that wants to render.

It is called at the start of the rendering process, before anything has been drawn to the Camera.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onPostRender
since: 3.50.0
name: onPostRender
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called _once per frame_, after all rendering has happened and snapshots have been taken.

It is called at the very end of the rendering process, once all Cameras, for all Scenes, have
been rendered.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onBeforeFlush
since: 3.50.0
name: onBeforeFlush
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: isPostFlush?:boolean
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called every time this pipeline is asked to flush its batch.

It is called immediately before the `gl.bufferData` and `gl.drawArrays` calls are made, so you can
perform any final pre-render modifications. To apply changes post-render, see `onAfterFlush`.


longname: Phaser.Renderer.WebGL.WebGLPipeline-onAfterFlush
since: 3.50.0
name: onAfterFlush
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: isPostFlush?:boolean
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
By default this is an empty method hook that you can override and use in your own custom pipelines.

This method is called immediately after this pipeline has finished flushing its batch.

It is called after the `gl.drawArrays` call.

You can perform additional post-render effects, but be careful not to call `flush`
on this pipeline from within this method, or you'll cause an infinite loop.

To apply changes pre-render, see `onBeforeFlush`.


longname: Phaser.Renderer.WebGL.WebGLPipeline-batchQuad
since: 3.50.0
name: batchQuad
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
returnstype: boolean
returnsdescription: `true` if this method caused the batch to flush, otherwise `false`.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
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:
gameObject:Phaser.GameObjects.GameObject|null,x0:number,y0:number,x1:number,y1:number,x2:number,y2:number,x3:number,y3:number,u0:number,v0:number,u1:number,v1:number,tintTL:number,tintTR:number,tintBL:number,tintBR:number,tintEffect:number|boolean,texture?:WebGLTexture,unit?:number


longname: Phaser.Renderer.WebGL.WebGLPipeline-batchTri
since: 3.50.0
name: batchTri
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
returnstype: boolean
returnsdescription: `true` if this method caused the batch to flush, otherwise `false`.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Adds the vertices data into the batch and flushes if full.

Assumes 3 vertices in the following arrangement:

```
0
|\
| \
|  \
|   \
|    \
1-----2
```

signature:
gameObject:Phaser.GameObjects.GameObject|null,x1:number,y1:number,x2:number,y2:number,x3:number,y3:number,u0:number,v0:number,u1:number,v1:number,tintTL:number,tintTR:number,tintBL:number,tintEffect:number|boolean,texture?:WebGLTexture,unit?:number


longname: Phaser.Renderer.WebGL.WebGLPipeline-drawFillRect
since: 3.50.0
name: drawFillRect
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Pushes a filled rectangle into the vertex batch.

The dimensions are run through `Math.floor` before the quad is generated.

Rectangle has no transform values and isn't transformed into the local space.

Used for directly batching untransformed rectangles, such as Camera background colors.

signature:
x:number,y:number,width:number,height:number,color:number,alpha:number,texture?:WebGLTexture,flipUV?:boolean


longname: Phaser.Renderer.WebGL.WebGLPipeline-setTime
since: 3.50.0
name: setTime
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
signature: name:string
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Sets the current duration into a 1f uniform value based on the given name.

This can be used for mapping time uniform values, such as `iTime`.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


longname: Phaser.Renderer.WebGL.WebGLPipeline-setMatrix2fv
since: 3.50.0
name: setMatrix2fv
memberof: Phaser.Renderer.WebGL.WebGLPipeline
scope: instance
returnstype: Phaser.Renderer.WebGL.WebGLPipeline
returnsdescription: This WebGLPipeline instance.
metafilename: WebGLPipeline.js
metapath: renderer/webgl
description:
Sets a matrix 2fv uniform value based on the given name on the currently set shader.

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.

signature:
name:string,transpose:boolean,matrix:Array.<number>|Float32Array,shader?:Phaser.Renderer.WebGL.WebGLShader


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


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

The current shader is bound, before the uniform is set, making it active within the
WebGLRenderer. This means you can safely call this method from a location such as
a Scene `create` or `update` method. However, when working within a Shader file
directly, use the `WebGLShader` method equivalent instead, to avoid the program
being set.


longname: Phaser.Renderer.WebGL.WebGLRenderer-beginCapture
since: 3.50.0
name: beginCapture
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: width?:number,height?:number
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Binds the WebGL Renderers Render Target, so all drawn content is now redirected to it.

Make sure to call `endCapture` when you are finished.


longname: Phaser.Renderer.WebGL.WebGLRenderer-endCapture
since: 3.50.0
name: endCapture
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
returnstype: Phaser.Renderer.WebGL.RenderTarget
returnsdescription: A reference to the WebGL Renderer Render Target.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Unbinds the WebGL Renderers Render Target and returns it, stopping any further content being drawn to it.

If the viewport or scissors were modified during the capture, you should reset them by calling
`resetViewport` and `resetScissor` accordingly.


longname: Phaser.Renderer.WebGL.WebGLRenderer-resetProjectionMatrix
since: 3.50.0
name: resetProjectionMatrix
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Resets the Projection Matrix back to this renderers width and height.

This is called during `endCapture`, should the matrix have been changed
as a result of the capture process.


longname: Phaser.Renderer.WebGL.WebGLRenderer-resetScissor
since: 3.50.0
name: resetScissor
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Resets the gl scissor state to be whatever the current scissor is, if there is one, without
modifying the scissor stack.


longname: Phaser.Renderer.WebGL.WebGLRenderer-setBlendMode
since: 3.0.0
name: setBlendMode
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: blendModeId:number,force?:boolean
returnstype: boolean
returnsdescription: `true` if the blend mode was changed as a result of this call, forcing a flush, otherwise `false`.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Sets the blend mode to the value given.

If the current blend mode is different from the one given, the pipeline is flushed and the new
blend mode is enabled.


longname: Phaser.Renderer.WebGL.WebGLRenderer-addBlendMode
since: 3.0.0
name: addBlendMode
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: func:Array.<GLenum>,equation:GLenum
returnstype: number
returnsdescription: The index of the new blend mode, used for referencing it in the future.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Creates a new custom blend mode for the renderer.

See [https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Blending_modes](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Blending_modes)


longname: Phaser.Renderer.WebGL.WebGLRenderer-removeBlendMode
since: 3.0.0
name: removeBlendMode
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
signature: index:number
returnstype: Phaser.Renderer.WebGL.WebGLRenderer
returnsdescription: This WebGLRenderer instance.
metafilename: WebGLRenderer.js
metapath: renderer/webgl
description:
Removes a custom blend mode from the renderer.
Any Game Objects still using this blend mode will error, so be sure to clear them first.


longname: Phaser.Renderer.WebGL.WebGLRenderer-setBlankTexture
since: 3.12.0
name: setBlankTexture
memberof: Phaser.Renderer.WebGL.WebGLRenderer
scope: instance
metafilename: WebGLRenderer.js
metapath: renderer/webgl
access: private
description:
Sets the current active texture for texture unit zero to be a blank texture.
This only happens if there isn't a texture already in use by texture unit zero.


