forked from Jibo-Revival-Group/JiboOs
41 lines
1.5 KiB
JavaScript
41 lines
1.5 KiB
JavaScript
/**
|
|
* Loads an JSON atlas and sets it up for Pixi to use as a collectino of PIXI.Texture objects.
|
|
* @class SpritesheetTask
|
|
* @memberof jibo.loader
|
|
* @private
|
|
* @param {String} asset.type Must be "spritesheet" to signify that this asset should be parsed
|
|
* specifically for Pixi.js.
|
|
* @param {String} [asset.src] The JSON atlas path.
|
|
* @param {Boolean} [asset.upload=false] `true` to upload the GPU immediate after loading.
|
|
* @param {Boolean} [asset.cache=false] `true` to cache the result.
|
|
* @param {Number} [asset.timeout=0] Number of milliseconds for remote timeout.
|
|
* @param {Boolean} [asset.remote=false] `true` for force remote load.
|
|
* @param {String} [asset.id] The ID of the task.
|
|
* @param {Function} [asset.complete] The callback to call when the load is completed.
|
|
*/
|
|
|
|
/**
|
|
* Tests if an asset should be loaded.
|
|
* @method jibo.loader.SpritesheetTask.test
|
|
* @static
|
|
* @param {Object} asset The asset to test.
|
|
* @return {Boolean} `true` if the asset qualifies for this task.
|
|
*/
|
|
|
|
/**
|
|
* The atlas source path.
|
|
* @name jibo.loader.SpritesheetTask#src
|
|
* @type {String}
|
|
*/
|
|
|
|
/**
|
|
* `true` if the texture should be uploaded to the GPU immediately.
|
|
* @name jibo.loader.SpritesheetTask#upload
|
|
* @type {Boolean}
|
|
*/
|
|
|
|
/**
|
|
* Starts the load.
|
|
* @method jibo.loader.SpritesheetTask#start
|
|
* @param {jibo.loader.Task~completeCallback} callback Callback to call when the load is done
|
|
*/ |