mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
JSDocs added for whole Spine Plugin
This commit is contained in:
parent
d99512255b
commit
dc332f1e1e
6 changed files with 711 additions and 215 deletions
|
@ -39,11 +39,11 @@ var TextFile = require('../../../src/loader/filetypes/TextFile.js');
|
|||
* @constructor
|
||||
*
|
||||
* @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.
|
||||
* @param {(string|Phaser.Loader.FileTypes.UnityAtlasFileConfig)} key - The key to use for this file, or a file configuration object.
|
||||
* @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png".
|
||||
* @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.
|
||||
* @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json".
|
||||
* @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `<key>.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt".
|
||||
* @param {boolean} [preMultipliedAlpha=false] -
|
||||
* @param {XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.
|
||||
* @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?
|
||||
* @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.
|
||||
* @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.
|
||||
*/
|
||||
var SpineFile = new Class({
|
||||
|
@ -89,11 +89,10 @@ var SpineFile = new Class({
|
|||
key: key,
|
||||
url: atlasURL[i],
|
||||
extension: GetFastValue(config, 'atlasExtension', 'atlas'),
|
||||
xhrSettings: GetFastValue(config, 'atlasXhrSettings'),
|
||||
xhrSettings: GetFastValue(config, 'atlasXhrSettings')
|
||||
});
|
||||
|
||||
atlas.cache = cache;
|
||||
// atlas.config.preMultipliedAlpha = preMultipliedAlpha;
|
||||
|
||||
files.push(atlas);
|
||||
}
|
||||
|
@ -111,7 +110,6 @@ var SpineFile = new Class({
|
|||
{
|
||||
atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);
|
||||
atlas.cache = cache;
|
||||
// atlas.config.preMultipliedAlpha = preMultipliedAlpha;
|
||||
|
||||
files.push(atlas);
|
||||
}
|
||||
|
@ -127,8 +125,8 @@ var SpineFile = new Class({
|
|||
/**
|
||||
* Called by each File when it finishes loading.
|
||||
*
|
||||
* @method Phaser.Loader.MultiFile#onFileComplete
|
||||
* @since 3.7.0
|
||||
* @method Phaser.Loader.FileTypes.SpineFile#onFileComplete
|
||||
* @since 3.19.0
|
||||
*
|
||||
* @param {Phaser.Loader.File} file - The File that has completed processing.
|
||||
*/
|
||||
|
@ -201,7 +199,7 @@ var SpineFile = new Class({
|
|||
* Adds this file to its target cache upon successful loading and processing.
|
||||
*
|
||||
* @method Phaser.Loader.FileTypes.SpineFile#addToCache
|
||||
* @since 3.16.0
|
||||
* @since 3.19.0
|
||||
*/
|
||||
addToCache: function ()
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,24 +1,24 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2018 Photon Storm Ltd.
|
||||
* @copyright 2019 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
var Class = require('../../../../src/utils/Class');
|
||||
var AngleBetween = require('../../../../src/math/angle/Between');
|
||||
var Clamp = require('../../../../src/math/Clamp');
|
||||
var Class = require('../../../../src/utils/Class');
|
||||
var ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');
|
||||
var ComponentsDepth = require('../../../../src/gameobjects/components/Depth');
|
||||
var ComponentsFlip = require('../../../../src/gameobjects/components/Flip');
|
||||
var ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');
|
||||
var ComponentsTransform = require('../../../../src/gameobjects/components/Transform');
|
||||
var ComponentsVisible = require('../../../../src/gameobjects/components/Visible');
|
||||
var SpineEvents = require('../events/');
|
||||
var GameObject = require('../../../../src/gameobjects/GameObject');
|
||||
var SpineGameObjectRender = require('./SpineGameObjectRender');
|
||||
var AngleBetween = require('../../../../src/math/angle/Between');
|
||||
var CounterClockwise = require('../../../../src/math/angle/CounterClockwise');
|
||||
var DegToRad = require('../../../../src/math/DegToRad');
|
||||
var GameObject = require('../../../../src/gameobjects/GameObject');
|
||||
var RadToDeg = require('../../../../src/math/RadToDeg');
|
||||
var SpineEvents = require('../events/');
|
||||
var SpineGameObjectRender = require('./SpineGameObjectRender');
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
|
@ -26,10 +26,15 @@ var RadToDeg = require('../../../../src/math/RadToDeg');
|
|||
*
|
||||
* @class SpineGameObject
|
||||
* @constructor
|
||||
* @since 3.16.0
|
||||
* @since 3.19.0
|
||||
*
|
||||
* @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.
|
||||
* @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.
|
||||
* @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.
|
||||
* @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.
|
||||
* @param {number} x - The horizontal position of this Game Object in the world.
|
||||
* @param {number} y - The vertical position of this Game Object in the world.
|
||||
* @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.
|
||||
* @param {string} [animationName] - The name of the animation to set on this Skeleton.
|
||||
* @param {boolean} [loop=false] - Should the animation playback be looped or not?
|
||||
*/
|
||||
var SpineGameObject = new Class({
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2018 Photon Storm Ltd.
|
||||
* @copyright 2019 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
|
@ -13,12 +13,12 @@ var Wrap = require('../../../../src/math/Wrap');
|
|||
* The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.
|
||||
* This method should not be called directly. It is a utility function of the Render module.
|
||||
*
|
||||
* @method Phaser.GameObjects.SpineGameObject#renderCanvas
|
||||
* @since 3.16.0
|
||||
* @method SpineGameObject#renderCanvas
|
||||
* @since 3.19.0
|
||||
* @private
|
||||
*
|
||||
* @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.
|
||||
* @param {Phaser.GameObjects.SpineGameObject} src - The Game Object being rendered in this call.
|
||||
* @param {SpineGameObject} src - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2018 Photon Storm Ltd.
|
||||
* @copyright 2019 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2018 Photon Storm Ltd.
|
||||
* @copyright 2019 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
|
@ -13,7 +13,7 @@ var Wrap = require('../../../../src/math/Wrap');
|
|||
* The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.
|
||||
* This method should not be called directly. It is a utility function of the Render module.
|
||||
*
|
||||
* @method Phaser.GameObjects.SpineGameObject#renderWebGL
|
||||
* @method SpineGameObject#renderWebGL
|
||||
* @since 3.19.0
|
||||
* @private
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue