Navigation
These archived docs are for Phaser 2.2.2 Phaser 3 docs can be found on newdocs.phaser.io.
Phaser CE docs can be found on the Phaser CE Documentation site.

Constructor

PIXI. JsonLoader

new JsonLoader(url, crossorigin)

The json file loader is used to load in JSON data and parse it When loaded this class will dispatch a 'loaded' event If loading fails this class will dispatch an 'error' event

Parameters
Name Type Description
url String

The url of the JSON file

crossorigin Boolean

Whether requests should be treated as crossorigin

Source code: pixi/loaders/JsonLoader.js, line 5

Public Properties

[readonly] baseUrl : string

[read-only] The base url of the bitmap font data

Source code: pixi/loaders/JsonLoader.js, line 33

crossorigin : boolean

Whether the requests should be treated as cross origin

Source code: pixi/loaders/JsonLoader.js, line 25

[readonly] loaded : boolean

[read-only] Whether the data has loaded yet

Source code: pixi/loaders/JsonLoader.js, line 42

url : string

The url of the bitmap font data

Source code: pixi/loaders/JsonLoader.js, line 17

Public Methods

load()

Loads the JSON data

Source code: pixi/loaders/JsonLoader.js, line 57