initial commit

This commit is contained in:
2026-03-16 13:53:01 +02:00
parent 631dc7df36
commit 81e6e0a7a2
23381 changed files with 8224173 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
/**
* Internal class for loading an image that has been split into an alpha channel image and a
* RGB only color image.
* @class ColorAlphaTask
* @extends jibo.loader.Task
* @memberof jibo.loader
* @private
* @param {Object} asset The data properties.
* @param {String} asset.src The source path to the color image.
* @param {String} asset.alpha The source path to the alpha image.
* @param {Boolean} [asset.cache=false] `true` to cache the result.
* @param {String} [asset.id] ID of asset.
* @param {Function} [asset.complete] The event to call when done.
* @param {Object} [asset.sizes=null] Define if certain sizes are not supported.
*/
/**
* Tests if task should be run.
* @method jibo.loader.ColorAlphaTask.test
* @static
* @param {Object} asset The asset to check.
* @return {Boolean} `true` if the asset is compatible with this task.
*/
/**
* Pulled from EaselJS's SpriteSheetUtils.
* Merges the rgb channels of one image with the alpha channel of another. This can be used to
* combine a compressed JPEG image containing color data with a PNG32 monochromatic image
* containing alpha data. With certain types of images (those with detail that lend itself to
* JPEG compression) this can provide significant file size savings versus a single RGBA PNG32.
* This method is very fast (generally on the order of 1-2 ms to run).
* @method jibo.loader.ColorAlphaTask.mergeAlpha
* @static
* @param {Image} rbgImage The image (or canvas) containing the RGB channels to use.
* @param {Image} alphaImage The image (or canvas) containing the alpha channel to use.
* @param {Canvas} [canvas] If specified, this canvas will be used and returned. If not, a new
* canvas will be created.
* @return {Canvas} A canvas with the combined image data. This can be used as a source for a
* texture.
*/
/**
* The atlas color source path.
* @type {String}
* @name jibo.loader.ColorAlphaTask#src
*/
/**
* The atlas alpha source path.
* @type {String}
* @name jibo.loader.ColorAlphaTask#alpha
*/
/**
* Starts the task.
* @method jibo.loader.ColorAlphaTask#start
* @param {jibo.loader.Task~completeCallback} callback Callback when finished.
*/

View File

@@ -0,0 +1,32 @@
/**
* Loads an image and sets it up for Pixi to use as a PIXI.Texture.
* @class CompressedImageTask
* @memberof jibo.loader
* @private
* @param {String} asset.src The texture image path. Must end in .dds or .crn
* @param {Boolean} [asset.remote=false] `true` to force a remote download over XMLHttpRequest.
* @param {Number} [asset.timeout=0] Number of milliseconds for remote load to timeout.
* @param {Boolean|String} [asset.cache=false] `true` to cache the result. String to add to a specific cache.
* @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.CompressedImageTask.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.CompressedImageTask#src
* @type {String}
*/
/**
* Starts the load.
* @method jibo.loader.CompressedImageTask#start
* @param {jibo.loader.Task~completeCallback} callback Callback to call when the load is done
*/

View File

@@ -0,0 +1,10 @@
/**
* Loads an animation timeline with PixiAnimate.
* @class AnimDataTask
* @memberof jibo.loader
* @private
* @param priority {number}
* @param src {string}
* @param data {any}
* @param root {string}
*/

View File

@@ -0,0 +1,51 @@
/**
* Loads an animation timeline with PixiAnimate.
* @class KeysTask
* @memberof jibo.loader
* @private
* @param {String} asset.type Must be set to "keys".
* @param {String} [asset.src] The keys file path.
* @param {String} [asset.data] The keys file object.
* @param {String} [assets.root] The root directory of stored keys file.
* @param {Boolean} [asset.cache=false] `true` to cache the result.
* @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.KeysTask.test
* @static
* @param {Object} asset The asset to test.
* @return {Boolean} `true` if the asset qualifies for this task.
*/
/**
* The timeline source path.
* @name jibo.loader.KeysTask#src
* @type {String}
*/
/**
* The timeline object.
* @name jibo.loader.KeysTask#data
* @type {String}
*/
/**
* The root for the project.
* @name jibo.loader.KeysTask#root
* @type {String}
*/
/**
* Load texture immediate to the GPU.
* @name jibo.loader.KeysTask#upload
* @type {Boolean}
*/
/**
* Starts the load.
* @method jibo.loader.KeysTask#start
* @param {jibo.loader.Task~completeCallback} callback Callback to call when the load is done
*/

View File

@@ -0,0 +1,32 @@
/**
* Loads a shapes manifest file and sets it up for PixiAnimate.
* @class ShapesTask
* @memberof jibo.loader
* @private
* @param {String} asset.type Must be "shapes" to signify that this asset should be parsed
* specifically for PixiAnimate.
* @param {String} [asset.src] The texture image path.
* @param {Boolean} [asset.cache=false] `true` to cache the result.
* @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.ShapesTask.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.ShapesTask#src
* @type {String}
*/
/**
* Starts the load.
* @method jibo.loader.ShapesTask#start
* @param {jibo.loader.Task~completeCallback} callback Callback to call when the load is done.
*/

View File

@@ -0,0 +1,41 @@
/**
* 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
*/

View File

@@ -0,0 +1,48 @@
/**
* Loads an image and sets it up for Pixi to use as a PIXI.Texture.
* @class TextureTask
* @memberof jibo.loader
* @private
* @param {String} asset.type Must be "texture" to signify that this asset should be parsed
* specifically for Pixi.js.
* @param {String} [asset.src] The texture image path.
* @param {Boolean} [asset.upload=false] `true` to upload the GPU immediate after loading.
* @param {Boolean} [asset.remote=false] `true` to force a remote download over XMLHttpRequest.
* @param {Number} [asset.timeout=0] Number of milliseconds for remote load to timeout.
* @param {Boolean|String} [asset.cache=false] `true` to cache the result. String to add to a specific cache.
* @param {String} [asset.alpha] The alpha image path, if not using image property.
* @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.TextureTask.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.TextureTask#src
* @type {String}
*/
/**
* The atlas alpha source path.
* @name jibo.loader.TextureTask#alpha
* @type {String}
*/
/**
* `true` if the texture should be uploaded to the GPU immediately.
* @name jibo.loader.TextureTask#upload
* @type {Boolean}
*/
/**
* Starts the load.
* @method jibo.loader.TextureTask#start
* @param {jibo.loader.Task~completeCallback} callback Callback to call when the load is done
*/

View File

@@ -0,0 +1,46 @@
/**
* Loads an animation timeline with PixiAnimate.
* @class TimelineTask
* @memberof jibo.loader
* @private
* @param {String} asset.type Must be "texture" to signify that this asset should be parsed
* specifically for Pixi.js.
* @param {String} [asset.src] The texture image path.
* @param {Boolean} [asset.upload=false] Upload the GPU immediate after loading.
* @param {String} [asset.alpha] The alpha image path, if not using image property.
* @param {Boolean} [asset.cache=false] `true` to cache the result.
* @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.TimelineTask.test
* @static
* @param {Object} asset The asset to test.
* @return {Boolean} `true` if the asset qualifies for this task.
*/
/**
* The timeline source path.
* @name jibo.loader.TimelineTask#src
* @type {String}
*/
/**
* Texture are uploaded to the GPU immediately.
* @name jibo.loader.TimelineTask#upload
* @type {Boolean}
*/
/**
* Cause timeline to add an instance on load.
* @name jibo.loader.TimelineTask#instance
* @type {Boolean}
*/
/**
* Starts the load.
* @method jibo.loader.TimelineTask#start
* @param {jibo.loader.Task~completeCallback} callback Callback to call when the load is done
*/