mirror of
https://github.com/photonstorm/phaser
synced 2024-12-02 17:41:06 +00:00
1 line
No EOL
33 KiB
JSON
Executable file
1 line
No EOL
33 KiB
JSON
Executable file
{"class":{"name":"Phaser.Loader","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null}],"help":"The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.\\nIt uses a combination of Image() loading and xhr and provides progress and completion callbacks."},"consts":[{"name":"PHYSICS_LIME_CORONA_JSON","type":"number","help":"","line":173},{"name":"PHYSICS_PHASER_JSON","type":"number","help":"","line":179},{"name":"TEXTURE_ATLAS_JSON_ARRAY","type":"number","help":"","line":155},{"name":"TEXTURE_ATLAS_JSON_HASH","type":"number","help":"","line":161},{"name":"TEXTURE_ATLAS_XML_STARLING","type":"number","help":"","line":167}],"methods":{"public":[{"name":"atlas","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new texture atlas to the loader.","line":856,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the texture atlas file.","optional":false,"default":null},{"name":"textureURL","type":["string"],"help":"The url of the texture atlas image file.","optional":false,"default":null},{"name":"atlasURL","type":["string"],"help":"The url of the texture atlas data file (json\/xml). You don't need this if you are passing an atlasData object instead.","optional":true,"default":null},{"name":"atlasData","type":["object"],"help":"A JSON or XML data object. You don't need this if the data is being loaded from a URL.","optional":true,"default":null},{"name":"format","type":["number"],"help":"A value describing the format of the data, the default is Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"atlasJSONArray","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new texture atlas to the loader. This atlas uses the JSON Array data format.","line":807,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the texture atlas file.","optional":false,"default":null},{"name":"textureURL","type":["string"],"help":"The url of the texture atlas image file.","optional":false,"default":null},{"name":"atlasURL","type":["string"],"help":"The url of the texture atlas data file (json\/xml). You don't need this if you are passing an atlasData object instead.","optional":true,"default":null},{"name":"atlasData","type":["object"],"help":"A JSON or XML data object. You don't need this if the data is being loaded from a URL.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"atlasJSONHash","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new texture atlas to the loader. This atlas uses the JSON Hash data format.","line":823,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the texture atlas file.","optional":false,"default":null},{"name":"textureURL","type":["string"],"help":"The url of the texture atlas image file.","optional":false,"default":null},{"name":"atlasURL","type":["string"],"help":"The url of the texture atlas data file (json\/xml). You don't need this if you are passing an atlasData object instead.","optional":true,"default":null},{"name":"atlasData","type":["object"],"help":"A JSON or XML data object. You don't need this if the data is being loaded from a URL.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"atlasXML","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new texture atlas to the loader. This atlas uses the Starling XML data format.","line":839,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the texture atlas file.","optional":false,"default":null},{"name":"textureURL","type":["string"],"help":"The url of the texture atlas image file.","optional":false,"default":null},{"name":"atlasURL","type":["string"],"help":"The url of the texture atlas data file (json\/xml). You don't need this if you are passing an atlasData object instead.","optional":true,"default":null},{"name":"atlasData","type":["object"],"help":"A JSON or XML data object. You don't need this if the data is being loaded from a URL.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"audio","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new audio file to the loader.","line":607,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the audio file.","optional":false,"default":null},{"name":"urls","type":["array","string"],"help":"An array containing the URLs of the audio files, i.e.: [ 'jump.mp3', 'jump.ogg', 'jump.m4a' ] or a single string containing just one URL.","optional":false,"default":null},{"name":"autoDecode","type":["boolean"],"help":"When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"audiosprite","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new audiosprite file to the loader. Audio Sprites are a combination of audio files and a JSON configuration.\\nThe JSON follows the format of that created by https:\/\/github.com\/tonistiigi\/audiosprite","line":627,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the audio file.","optional":false,"default":null},{"name":"urls","type":["array","string"],"help":"An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL.","optional":false,"default":null},{"name":"atlasURL","type":["string"],"help":"The URL of the audiosprite configuration json.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"binary","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a binary file to the Loader. It will be loaded via xhr with a responseType of \"arraybuffer\". You can specify an optional callback to process the file after load.\\nWhen the callback is called it will be passed 2 parameters: the key of the file and the file data.\\nWARNING: If you specify a callback, the file data will be set to whatever your callback returns. So always return the data object, even if you didn't modify it.","line":562,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the binary file.","optional":false,"default":null},{"name":"url","type":["string"],"help":"URL of the binary file.","optional":false,"default":null},{"name":"callback","type":["function"],"help":"Optional callback that will be passed the file after loading, so you can perform additional processing on it.","optional":true,"default":null},{"name":"callbackContext","type":["function"],"help":"The context under which the callback will be applied. If not specified it will use the callback itself as the context.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"bitmapFont","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new bitmap font loading request.","line":745,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the bitmap font.","optional":false,"default":null},{"name":"textureURL","type":["string"],"help":"The url of the font image file.","optional":false,"default":null},{"name":"xmlURL","type":["string"],"help":"The url of the font data file (xml\/fnt)","optional":true,"default":null},{"name":"xmlData","type":["object"],"help":"An optional XML data object.","optional":true,"default":null},{"name":"xSpacing","type":["number"],"help":"If you'd like to add additional horizontal spacing between the characters then set the pixel value here.","optional":true,"default":"0"},{"name":"ySpacing","type":["number"],"help":"If you'd like to add additional vertical spacing between the lines then set the pixel value here.","optional":true,"default":"0"}],"inherited":false,"inheritedFrom":""},{"name":"checkKeyExists","static":false,"returns":{"types":["boolean"],"help":"Return true if exists, otherwise return false."},"help":"Check whether asset exists with a specific key.\\nUse Phaser.Cache to access loaded assets, e.g. Phaser.Cache#checkImageKey","line":224,"public":true,"protected":false,"private":false,"parameters":[{"name":"type","type":["string"],"help":"The type asset you want to check.","optional":false,"default":null},{"name":"key","type":["string"],"help":"Key of the asset you want to check.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"csvLoadComplete","static":false,"returns":null,"help":"Successfully loaded a CSV file.","line":1625,"public":true,"protected":false,"private":false,"parameters":[{"name":"index","type":["number"],"help":"The index of the file in the file queue that loaded.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"dataLoadError","static":false,"returns":null,"help":"Error occured when load a JSON.","line":1650,"public":true,"protected":false,"private":false,"parameters":[{"name":"index","type":["number"],"help":"The index of the file in the file queue that errored.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"fileComplete","static":false,"returns":null,"help":"Called when a file is successfully loaded.","line":1434,"public":true,"protected":false,"private":false,"parameters":[{"name":"index","type":["number"],"help":"The index of the file in the file queue that loaded.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"fileError","static":false,"returns":null,"help":"Error occured when loading a file.","line":1415,"public":true,"protected":false,"private":false,"parameters":[{"name":"index","type":["number"],"help":"The index of the file in the file queue that errored.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"getAsset","static":false,"returns":{"types":["any"],"help":"Returns an object if found that has 2 properties: index and file. Otherwise false."},"help":"Gets the asset that is queued for load.","line":274,"public":true,"protected":false,"private":false,"parameters":[{"name":"type","type":["string"],"help":"The type asset you want to check.","optional":false,"default":null},{"name":"key","type":["string"],"help":"Key of the asset you want to check.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"getAssetIndex","static":false,"returns":{"types":["number"],"help":"The index of this key in the filelist, or -1 if not found."},"help":"Gets the fileList index for the given key.","line":249,"public":true,"protected":false,"private":false,"parameters":[{"name":"type","type":["string"],"help":"The type asset you want to check.","optional":false,"default":null},{"name":"key","type":["string"],"help":"Key of the asset you want to check.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"image","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add an image to the Loader.","line":433,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of this image file.","optional":false,"default":null},{"name":"url","type":["string"],"help":"URL of image file.","optional":false,"default":null},{"name":"overwrite","type":["boolean"],"help":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"json","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a json file to the Loader.","line":485,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the json file.","optional":false,"default":null},{"name":"url","type":["string"],"help":"URL of the json file.","optional":false,"default":null},{"name":"overwrite","type":["boolean"],"help":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"jsonLoadComplete","static":false,"returns":null,"help":"Successfully loaded a JSON file.","line":1581,"public":true,"protected":false,"private":false,"parameters":[{"name":"index","type":["number"],"help":"The index of the file in the file queue that loaded.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"pack","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add an image to the Loader.","line":397,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of this image file.","optional":false,"default":null},{"name":"url","type":["string"],"help":"URL of the Asset Pack JSON file. If you wish to pass a json object instead set this to null and pass the object as the data parameter.","optional":true,"default":null},{"name":"data","type":["object"],"help":"The Asset Pack JSON data. Use this to pass in a json data object rather than loading it from a URL. TODO","optional":true,"default":null},{"name":"callbackContext","type":["object"],"help":"Some Loader operations, like Binary and Script require a context for their callbacks. Pass the context here.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"physics","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new physics data object loading request.\\nThe data must be in Lime + Corona JSON format. Physics Editor by code'n'web exports in this format natively.","line":701,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the physics json data.","optional":false,"default":null},{"name":"url","type":["string"],"help":"The url of the map data file (csv\/json)","optional":true,"default":null},{"name":"data","type":["object"],"help":"An optional JSON data object. If given then the url is ignored and this JSON object is used for physics data instead.","optional":true,"default":null},{"name":"format","type":["string"],"help":"The format of the physics data.","optional":true,"default":"Phaser.Physics.LIME_CORONA_JSON"}],"inherited":false,"inheritedFrom":""},{"name":"removeAll","static":false,"returns":null,"help":"Remove all file loading requests.","line":948,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"removeFile","static":false,"returns":null,"help":"Remove loading request of a file.","line":932,"public":true,"protected":false,"private":false,"parameters":[{"name":"type","type":["string"],"help":"The type of resource to add to the list (image, audio, xml, etc).","optional":false,"default":null},{"name":"key","type":["string"],"help":"Key of the file you want to remove.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"reset","static":false,"returns":null,"help":"Reset loader, this will remove the load queue.","line":296,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"script","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a JavaScript file to the Loader. Once loaded the JavaScript file will be automatically turned into a script tag (and executed), so be careful what you load!\\nYou can also specify a callback. This will be executed as soon as the script tag has been created.","line":539,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the script file.","optional":false,"default":null},{"name":"url","type":["string"],"help":"URL of the JavaScript file.","optional":false,"default":null},{"name":"callback","type":["function"],"help":"Optional callback that will be called after the script tag has loaded, so you can perform additional processing.","optional":true,"default":null},{"name":"callbackContext","type":["function"],"help":"The context under which the callback will be applied. If not specified it will use the callback itself as the context.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setPreloadSprite","static":false,"returns":null,"help":"You can set a Sprite to be a \"preload\" sprite by passing it to this method.\\nA \"preload\" sprite will have its width or height crop adjusted based on the percentage of the loader in real-time.\\nThis allows you to easily make loading bars for games. Note that Sprite.visible = true will be set when calling this.","line":192,"public":true,"protected":false,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"help":"The sprite or image that will be cropped during the load.","optional":false,"default":null},{"name":"direction","type":["number"],"help":"A value of zero means the sprite will be cropped horizontally, a value of 1 means its will be cropped vertically.","optional":true,"default":"0"}],"inherited":false,"inheritedFrom":""},{"name":"spritesheet","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new sprite sheet to the loader.","line":586,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the sheet file.","optional":false,"default":null},{"name":"url","type":["string"],"help":"URL of the sheet file.","optional":false,"default":null},{"name":"frameWidth","type":["number"],"help":"Width of each single frame.","optional":false,"default":null},{"name":"frameHeight","type":["number"],"help":"Height of each single frame.","optional":false,"default":null},{"name":"frameMax","type":["number"],"help":"How many frames in this sprite sheet. If not specified it will divide the whole image into frames.","optional":true,"default":"-1"},{"name":"margin","type":["number"],"help":"If the frames have been drawn with a margin, specify the amount here.","optional":true,"default":"0"},{"name":"spacing","type":["number"],"help":"If the frames have been drawn with spacing between them, specify the amount here.","optional":true,"default":"0"}],"inherited":false,"inheritedFrom":""},{"name":"start","static":false,"returns":null,"help":"Start loading the assets. Normally you don't need to call this yourself as the StateManager will do so.","line":959,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"text","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a text file to the Loader.","line":459,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the text file.","optional":false,"default":null},{"name":"url","type":["string"],"help":"URL of the text file.","optional":false,"default":null},{"name":"overwrite","type":["boolean"],"help":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"tilemap","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add a new tilemap loading request.","line":647,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the tilemap data.","optional":false,"default":null},{"name":"url","type":["string"],"help":"The url of the map data file (csv\/json)","optional":true,"default":null},{"name":"data","type":["object"],"help":"An optional JSON data object. If given then the url is ignored and this JSON object is used for map data instead.","optional":true,"default":null},{"name":"format","type":["number"],"help":"The format of the map data. Either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON.","optional":true,"default":"Phaser.Tilemap.CSV"}],"inherited":false,"inheritedFrom":""},{"name":"totalLoadedFiles","static":false,"returns":{"types":["number"],"help":"The number of files that have already been loaded (even if they errored)"},"help":"Returns the number of files that have already been loaded, even if they errored.","line":1781,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"totalLoadedPacks","static":false,"returns":{"types":["number"],"help":"The number of asset packs that have already been loaded (even if they errored)"},"help":"Returns the number of asset packs that have already been loaded, even if they errored.","line":1825,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"totalQueuedFiles","static":false,"returns":{"types":["number"],"help":"The number of files that still remain in the load queue."},"help":"Returns the number of files still waiting to be processed in the load queue. This value decreases as each file in the queue is loaded.","line":1803,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"totalQueuedPacks","static":false,"returns":{"types":["number"],"help":"The number of asset packs that still remain in the load queue."},"help":"Returns the number of asset packs still waiting to be processed in the load queue. This value decreases as each pack in the queue is loaded.","line":1847,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"xml","static":false,"returns":{"types":["Phaser.Loader"],"help":"This Loader instance."},"help":"Add an XML file to the Loader.","line":511,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Unique asset key of the xml file.","optional":false,"default":null},{"name":"url","type":["string"],"help":"URL of the xml file.","optional":false,"default":null},{"name":"overwrite","type":["boolean"],"help":"If an unloaded file with a matching key already exists in the queue, this entry will overwrite it.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"xmlLoadComplete","static":false,"returns":null,"help":"Successfully loaded an XML file.","line":1669,"public":true,"protected":false,"private":false,"parameters":[{"name":"index","type":["number"],"help":"The index of the file in the file queue that loaded.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"protected":[{"name":"addToFileList","static":false,"returns":null,"help":"Internal function that adds a new entry to the file list. Do not call directly.","line":319,"public":false,"protected":true,"private":false,"parameters":[{"name":"type","type":["string"],"help":"The type of resource to add to the list (image, audio, xml, etc).","optional":false,"default":null},{"name":"key","type":["string"],"help":"The unique Cache ID key of this resource.","optional":false,"default":null},{"name":"url","type":["string"],"help":"The URL the asset will be loaded from.","optional":false,"default":null},{"name":"properties","type":["object"],"help":"Any additional properties needed to load the file.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"replaceInFileList","static":false,"returns":null,"help":"Internal function that replaces an existing entry in the file list with a new one. Do not call directly.","line":355,"public":false,"protected":true,"private":false,"parameters":[{"name":"type","type":["string"],"help":"The type of resource to add to the list (image, audio, xml, etc).","optional":false,"default":null},{"name":"key","type":["string"],"help":"The unique Cache ID key of this resource.","optional":false,"default":null},{"name":"url","type":["string"],"help":"The URL the asset will be loaded from.","optional":false,"default":null},{"name":"properties","type":["object"],"help":"Any additional properties needed to load the file.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"private":[{"name":"beginLoad","static":false,"returns":null,"help":"Starts off the actual loading process after the asset packs have been sorted out.","line":984,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"getAudioURL","static":false,"returns":null,"help":"Private method ONLY used by loader.","line":1383,"public":false,"protected":false,"private":true,"parameters":[{"name":"urls","type":["array","string"],"help":"Either an array of audio file URLs or a string containing a single URL path.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"loadFile","static":false,"returns":null,"help":"Load files. Private method ONLY used by loader.","line":1195,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"loadPack","static":false,"returns":null,"help":"Loads the current asset pack in the queue.","line":1016,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"nextFile","static":false,"returns":null,"help":"Handle loading next file.","line":1732,"public":false,"protected":false,"private":true,"parameters":[{"name":"previousIndex","type":["number"],"help":"Index of the previously loaded asset.","optional":false,"default":null},{"name":"success","type":["boolean"],"help":"Whether the previous asset loaded successfully or not.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"nextPack","static":false,"returns":null,"help":"Handle loading the next asset pack.","line":1172,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"packError","static":false,"returns":null,"help":"Error occured when loading an asset pack.","line":1153,"public":false,"protected":false,"private":true,"parameters":[{"name":"index","type":["number"],"help":"The index of the file in the file queue that errored.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"packLoadComplete","static":false,"returns":null,"help":"Handle the successful loading of a JSON asset pack.","line":1046,"public":false,"protected":false,"private":true,"parameters":[{"name":"index","type":["number"],"help":"The index of the file in the file queue that loaded.","optional":false,"default":null},{"name":"parse","type":["boolean"],"help":"Automatically parse the JSON data?","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"xhrLoad","static":false,"returns":null,"help":"Starts the xhr loader.","line":1357,"public":false,"protected":false,"private":true,"parameters":[{"name":"index","type":["number"],"help":"The index of the file to load from the file list.","optional":false,"default":null},{"name":"url","type":["string"],"help":"The URL of the file.","optional":false,"default":null},{"name":"type","type":["string"],"help":"The xhr responseType.","optional":false,"default":null},{"name":"onload","type":["string"],"help":"A String of the name of the local function to be called on a successful file load.","optional":false,"default":null},{"name":"onerror","type":["string"],"help":"A String of the name of the local function to be called on a file load error.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"static":[]},"properties":{"public":[{"name":"baseURL","type":["string"],"help":"If you want to append a URL before the path of any asset you can set this here.\\nUseful if you need to allow an asset url to be configured outside of the game code.\\nMUST have \/ on the end of it!","inlineHelp":"","line":69,"default":"''","public":true,"protected":false,"private":false,"readOnly":false},{"name":"crossOrigin","type":["boolean","string"],"help":"","inlineHelp":"The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.","line":60,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"Local reference to game.","line":21,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"hasLoaded","type":["boolean"],"help":"","inlineHelp":"True if all assets in the queue have finished loading.","line":33,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"isLoading","type":["boolean"],"help":"","inlineHelp":"True if the Loader is in the process of loading the queue.","line":27,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"onFileComplete","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is dispatched when a file completes loading successfully.","line":84,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onFileError","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is dispatched when a file errors as a result of the load request.","line":89,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onFileStart","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is dispatched immediately before a file starts loading. It's possible the file may still error (404, etc) after this event is sent.","line":79,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onLoadComplete","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is dispatched when the final file in the load queue has either loaded or failed.","line":94,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onLoadStart","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is dispatched when the loading process starts, before the first file has been requested.","line":74,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onPackComplete","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is dispatched when an asset pack has either loaded or failed.","line":99,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"preloadSprite","type":["object"],"help":"You can optionally link a sprite to the preloader.\\nIf you do so the Sprites width or height will be cropped based on the percentage loaded.\\nThis property is an object containing: sprite, rect, direction, width and height","inlineHelp":"","line":54,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"progress","type":["number"],"help":"","inlineHelp":"The rounded load progress percentage value (from 0 to 100)","line":39,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"progressFloat","type":["number"],"help":"","inlineHelp":"The non-rounded load progress value (from 0.0 to 100.0)","line":45,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"useXDomainRequest","type":["boolean"],"help":"","inlineHelp":"If true and if the browser supports XDomainRequest, it will be used in preference for xhr when loading json files. It is enabled automatically if the browser is IE9, but you can disable it as required.","line":104,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"-","type":["XDomainRequest"],"help":"","inlineHelp":" An ajax request used specifically by IE9 for CORs loading issues.","line":147,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_fileIndex","type":["number"],"help":"","inlineHelp":"The index of the current file being loaded.","line":128,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_fileList","type":["array"],"help":"","inlineHelp":"Contains all the assets file infos.","line":122,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_packIndex","type":["number"],"help":"","inlineHelp":"The index of the current asset pack.","line":116,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_packList","type":["array"],"help":"","inlineHelp":"Contains all the assets packs.","line":110,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_progressChunk","type":["number"],"help":"","inlineHelp":"Indicates the size of 1 file in terms of a percentage out of 100.","line":135,"default":"0","public":false,"protected":false,"private":true,"readOnly":false}]}} |