Exposed consts and added jsdocs

This commit is contained in:
Richard Davey 2018-03-16 17:35:01 +00:00
parent 05a4385cd7
commit 1b20232bd1
10 changed files with 18 additions and 1 deletions

View file

@ -4,11 +4,14 @@
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var FilterMode = require('./FilterMode');
var Extend = require('../utils/object/Extend');
/**
* @namespace Phaser.Textures
*/
module.exports = {
var Textures = {
Parsers: require('./parsers'),
@ -19,3 +22,8 @@ module.exports = {
TextureSource: require('./TextureSource')
};
// Merge in the consts
Textures = Extend(false, Textures, FilterMode);
module.exports = Textures;

View file

@ -8,6 +8,7 @@
* Adds a Canvas Element to a Texture.
*
* @function Phaser.Textures.Parsers.Canvas
* @memberOf Phaser.Textures.Parsers
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.

View file

@ -8,6 +8,7 @@
* Adds an Image Element to a Texture.
*
* @function Phaser.Textures.Parsers.Image
* @memberOf Phaser.Textures.Parsers
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.

View file

@ -11,6 +11,7 @@ var Clone = require('../../utils/object/Clone');
* JSON format expected to match that defined by Texture Packer, with the frames property containing an array of Frames.
*
* @function Phaser.Textures.Parsers.JSONArray
* @memberOf Phaser.Textures.Parsers
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.

View file

@ -11,6 +11,7 @@ var Clone = require('../../utils/object/Clone');
* JSON format expected to match that defined by Texture Packer, with the frames property containing an object of Frames.
*
* @function Phaser.Textures.Parsers.JSONHash
* @memberOf Phaser.Textures.Parsers
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.

View file

@ -8,6 +8,7 @@
* Parses a Pyxel JSON object and adds the Frames to a Texture.
*
* @function Phaser.Textures.Parsers.Pyxel
* @memberOf Phaser.Textures.Parsers
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.

View file

@ -13,6 +13,7 @@ var GetFastValue = require('../../utils/object/GetFastValue');
* same size and cannot be trimmed or rotated.
*
* @function Phaser.Textures.Parsers.SpriteSheet
* @memberOf Phaser.Textures.Parsers
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.

View file

@ -13,6 +13,7 @@ var GetFastValue = require('../../utils/object/GetFastValue');
* same size and cannot be trimmed or rotated.
*
* @function Phaser.Textures.Parsers.SpriteSheetFromAtlas
* @memberOf Phaser.Textures.Parsers
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.

View file

@ -8,6 +8,7 @@
* Parses a Starling XML object and adds all the Frames into a Texture.
*
* @function Phaser.Textures.Parsers.StarlingXML
* @memberOf Phaser.Textures.Parsers
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.

View file

@ -40,6 +40,7 @@ var addFrame = function (texture, sourceIndex, name, frame)
* For more details about Sprite Meta Data see https://docs.unity3d.com/ScriptReference/SpriteMetaData.html
*
* @function Phaser.Textures.Parsers.UnityYAML
* @memberOf Phaser.Textures.Parsers
* @since 3.0.0
*
* @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.