Class: LoaderParser

Phaser. LoaderParser

new LoaderParser()

Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.

Source:
src/loader/LoaderParser.js line 12

Methods

<static> bitmapFont(xml, baseTexture [, xSpacing] [, ySpacing] [, frame] [, resolution])

Alias for xmlBitmapFont, for backwards compatibility.

Parameters:
Name Type Argument Default Description
xml object

XML data you want to parse.

baseTexture PIXI.BaseTexture

The BaseTexture this font uses.

xSpacing number <optional>
0

Additional horizontal spacing between the characters.

ySpacing number <optional>
0

Additional vertical spacing between the characters.

frame Phaser.Frame <optional>

Optional Frame, if this font is embedded in a texture atlas.

resolution number <optional>
1

Optional game resolution to apply to the kerning data.

Source:
src/loader/LoaderParser.js line 14
Returns:

The parsed Bitmap Font data.

Type
object

<static> dds(arrayBuffer)

Extract DDS header from loaded binary

Parameters:
Name Type Description
arrayBuffer ArrayBuffer
Source:
src/loader/LoaderParser.js line 350
Returns:

The parsed DDS file including texture data.

Type
object

<static> jsonBitmapFont(json, baseTexture [, xSpacing] [, ySpacing] [, frame] [, resolution])

Parse a Bitmap Font from a JSON file.

Parameters:
Name Type Argument Default Description
json object

JSON data you want to parse.

baseTexture PIXI.BaseTexture

The BaseTexture this font uses.

xSpacing number <optional>
0

Additional horizontal spacing between the characters.

ySpacing number <optional>
0

Additional vertical spacing between the characters.

frame Phaser.Frame <optional>

Optional Frame, if this font is embedded in a texture atlas.

resolution number <optional>
1

Optional game resolution to apply to the kerning data.

Source:
src/loader/LoaderParser.js line 124
Returns:

The parsed Bitmap Font data.

Type
object

<static> ktx(arrayBuffer)

Extract KTX header from loaded binary

Parameters:
Name Type Description
arrayBuffer ArrayBuffer
Source:
src/loader/LoaderParser.js line 458
Returns:

The parsed KTX file including texture data.

Type
object

<static> pkm(arrayBuffer)

Extract PKM header from loaded binary

Parameters:
Name Type Description
arrayBuffer ArrayBuffer
Source:
src/loader/LoaderParser.js line 563
Returns:

The parsed PKM file including texture data.

Type
object

<static> pvr(arrayBuffer)

Extract PVR header from loaded binary

Parameters:
Name Type Description
arrayBuffer ArrayBuffer
Source:
src/loader/LoaderParser.js line 243
Returns:

The parsed PVR file including texture data.

Type
object

<static> xmlBitmapFont(xml, baseTexture [, xSpacing] [, ySpacing] [, frame] [, resolution])

Parse a Bitmap Font from an XML file.

Parameters:
Name Type Argument Default Description
xml object

XML data you want to parse.

baseTexture PIXI.BaseTexture

The BaseTexture this font uses.

xSpacing number <optional>
0

Additional horizontal spacing between the characters.

ySpacing number <optional>
0

Additional vertical spacing between the characters.

frame Phaser.Frame <optional>

Optional Frame, if this font is embedded in a texture atlas.

resolution number <optional>
1

Optional game resolution to apply to the kerning data.

Source:
src/loader/LoaderParser.js line 31
Returns:

The parsed Bitmap Font data.

Type
object

phaser-ce@2.20.1 is on GitHub and NPM

Documentation generated by JSDoc 3.6.11 on 2024-10-05 using Tomorrow.