Loader#shader()

shader(key, url, overwrite) → {Phaser.Loader} Adds a fragment shader file to the current load queue. The file is not loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts. The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load. Retrieve the file via Cache.getShader(key). The URL can be relative or absolute. If the URL is relative the Loader.baseURL and Loader.path values will be prep

Loader#setPreloadSprite()

setPreloadSprite(sprite, direction) Set a Sprite to be a "preload" sprite by passing it to this method. A "preload" sprite will have its width or height crop adjusted based on the percentage of the loader in real-time.This allows you to easily make loading bars for games. The sprite will automatically be made visible when calling this. Parameters Name Type Argument Default Description sprite Phaser.Sprite | Phaser.Image The sprite or image that will be cropped during the load. directio

Loader#script()

script(key, url, callback, callbackContext) → {Phaser.Loader} Adds a JavaScript file to the current load queue. The file is not loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts. The key must be a unique String. 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.

Loader#resetLocked

resetLocked : boolean If true all calls to Loader.reset will be ignored. Useful if you need to create a load queue before swapping to a preloader state. Source code: loader/Loader.js (Line 43)

Loader#progressFloat

progressFloat The non-rounded load progress value (from 0.0 to 100.0). A general indicator of the progress.It is possible for the progress to decrease, after onLoadStart, if more files are dynamically added. Properties: Type Description number Source code: loader/Loader.js (Line 3042)

Loader#progress

progress The rounded load progress percentage value (from 0 to 100). See Phaser.Loader#progressFloat. Properties: Type Description integer Source code: loader/Loader.js (Line 3060)

Loader#physics()

physics(key, url, data, format) → {Phaser.Loader} Adds a physics data file to the current load queue. The data must be in Lime + Corona JSON format. Physics Editor by code'n'web exports in this format natively. You can choose to either load the data externally, by providing a URL to a json file.Or you can pass in a JSON object or String via the data parameter.If you pass a String the data is automatically run through JSON.parse and then immediately added to the Phaser.Cache. If a URL is provi

Loader#path

path : string The value of path, if set, is placed before any relative file path given. For example: load.path = "images/sprites/"; load.image("ball", "ball.png"); load.image("tree", "level1/oaktree.png"); load.image("boom", "http://server.com/explode.png"); Would load the ball file from images/sprites/ball.png and the tree fromimages/sprites/level1/oaktree.png but the file boom would load from the URLgiven as it's an absolute URL. Please note that the path is added before the filename but af

Loader#pack()

pack(key, url, data, callbackContext) → {Phaser.Loader} Add a JSON resource pack ('packfile') to the Loader. A packfile is a JSON file that contains a list of assets to the be loaded.Please see the example 'loader/asset pack' in the Phaser Examples repository. Packs are always put before the first non-pack file that is not loaded / loading. This means that all packs added before any loading has started are added to the frontof the file queue, in the order added. The key must be a unique Strin

Loader#onPackComplete

onPackComplete : Phaser.Signal This event is dispatched when an asset pack has either loaded or failed to load. This is called when the asset pack manifest file has loaded and successfully added its contents to the loader queue. Params: (pack key, success?, total packs loaded, total packs) Source code: loader/Loader.js (Line 152)