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 - loader/LoaderParser.js, line 12

Methods

<static> bitmapFont(xml, baseTexture, xSpacing, ySpacing) → {object}

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.

Returns:
object -

The parsed Bitmap Font data.

Source - loader/LoaderParser.js, line 14

<static> dds(arrayBuffer) → {object}

Extract DDS header from loaded binary

Parameters:
Name Type Description
arrayBuffer ArrayBuffer
Returns:
object -

The parsed DDS file including texture data.

Source - loader/LoaderParser.js, line 276

<static> jsonBitmapFont(json, baseTexture, xSpacing, ySpacing, frame, resolution) → {object}

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>

Optional game resolution to apply to the kerning data.

Returns:
object -

The parsed Bitmap Font data.

Source - loader/LoaderParser.js, line 89

<static> ktx(arrayBuffer) → {object}

Extract KTX header from loaded binary

Parameters:
Name Type Description
arrayBuffer ArrayBuffer
Returns:
object -

The parsed KTX file including texture data.

Source - loader/LoaderParser.js, line 373

<static> pkm(arrayBuffer) → {object}

Extract PKM header from loaded binary

Parameters:
Name Type Description
arrayBuffer ArrayBuffer
Returns:
object -

The parsed PKM file including texture data.

Source - loader/LoaderParser.js, line 472

<static> pvr(arrayBuffer) → {object}

Extract PVR header from loaded binary

Parameters:
Name Type Description
arrayBuffer ArrayBuffer
Returns:
object -

The parsed PVR file including texture data.

Source - loader/LoaderParser.js, line 177

<static> xmlBitmapFont(xml, baseTexture, xSpacing, ySpacing, frame, resolution) → {object}

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>

Optional game resolution to apply to the kerning data.

Returns:
object -

The parsed Bitmap Font data.

Source - loader/LoaderParser.js, line 30
Phaser Copyright © 2012-2016 Photon Storm Ltd.
Documentation generated by JSDoc 3.4.3 on Thu Apr 13 2017 12:05:10 GMT-0700 (PDT) using the DocStrap template.