Skip to content

Commit d50d8b5

Browse files
committed
Merge branch 'master' of https://github.com/photonstorm/phaser
2 parents a8e0e22 + f2c5f9f commit d50d8b5

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

src/textures/TextureManager.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var Texture = require('./Texture');
1818
/**
1919
* @callback EachTextureCallback
2020
*
21-
* @param {Phaser.Textures.Texture} texture - [description]
21+
* @param {Phaser.Textures.Texture} texture - Each texture in Texture Manager.
2222
* @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.
2323
*/
2424

@@ -37,7 +37,7 @@ var Texture = require('./Texture');
3737
* @constructor
3838
* @since 3.0.0
3939
*
40-
* @param {Phaser.Game} game - [description]
40+
* @param {Phaser.Game} game - The Phaser.Game instance this Texture Manager belongs to.
4141
*/
4242
var TextureManager = new Class({
4343

@@ -50,7 +50,7 @@ var TextureManager = new Class({
5050
EventEmitter.call(this);
5151

5252
/**
53-
* [description]
53+
* The Game that this TextureManager belongs to.
5454
*
5555
* @name Phaser.Textures.TextureManager#game
5656
* @type {Phaser.Game}
@@ -59,7 +59,7 @@ var TextureManager = new Class({
5959
this.game = game;
6060

6161
/**
62-
* [description]
62+
* The name of this manager.
6363
*
6464
* @name Phaser.Textures.TextureManager#name
6565
* @type {string}
@@ -68,7 +68,8 @@ var TextureManager = new Class({
6868
this.name = 'TextureManager';
6969

7070
/**
71-
* [description]
71+
* An object that has all of textures that Texture Manager creates.
72+
* Textures are assigned to keys so we can access to any texture that this object has directly by key value without iteration.
7273
*
7374
* @name Phaser.Textures.TextureManager#list
7475
* @type {object}
@@ -78,7 +79,7 @@ var TextureManager = new Class({
7879
this.list = {};
7980

8081
/**
81-
* [description]
82+
* The temporary canvas element to save an pixel data of an arbitrary texture in getPixel() and getPixelAlpha() method.
8283
*
8384
* @name Phaser.Textures.TextureManager#_tempCanvas
8485
* @type {HTMLCanvasElement}
@@ -88,7 +89,7 @@ var TextureManager = new Class({
8889
this._tempCanvas = CanvasPool.create2D(this, 1, 1);
8990

9091
/**
91-
* [description]
92+
* The context of the temporary canvas element made to save an pixel data in getPixel() and getPixelAlpha() method.
9293
*
9394
* @name Phaser.Textures.TextureManager#_tempContext
9495
* @type {CanvasRenderingContext2D}
@@ -98,7 +99,7 @@ var TextureManager = new Class({
9899
this._tempContext = this._tempCanvas.getContext('2d');
99100

100101
/**
101-
* [description]
102+
* An counting value used for emitting 'ready' event after all of managers in game is loaded.
102103
*
103104
* @name Phaser.Textures.TextureManager#_pending
104105
* @type {integer}
@@ -112,7 +113,7 @@ var TextureManager = new Class({
112113
},
113114

114115
/**
115-
* [description]
116+
* The Boot Handler called by Phaser.Game when it first starts up.
116117
*
117118
* @method Phaser.Textures.TextureManager#boot
118119
* @since 3.0.0
@@ -131,7 +132,7 @@ var TextureManager = new Class({
131132
},
132133

133134
/**
134-
* [description]
135+
* After 'onload' or 'onerror' invoked twice, emit 'ready' event.
135136
*
136137
* @method Phaser.Textures.TextureManager#updatePending
137138
* @since 3.0.0
@@ -296,7 +297,7 @@ var TextureManager = new Class({
296297
* @since 3.0.0
297298
*
298299
* @param {string} key - The unique string-based key of the Texture.
299-
* @param {object} config - [description]
300+
* @param {object} config - The configuration object needed to generate the texture.
300301
*
301302
* @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.
302303
*/
@@ -909,7 +910,7 @@ var TextureManager = new Class({
909910
* @method Phaser.Textures.TextureManager#setTexture
910911
* @since 3.0.0
911912
*
912-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
913+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the texture would be set on.
913914
* @param {string} key - The unique string-based key of the Texture.
914915
* @param {(string|integer)} frame - The string or index of the Frame.
915916
*

0 commit comments

Comments
 (0)