Skip to content

Commit 007ac01

Browse files
committed
Documented the Animation, Pipeline and ToJSON Game Object components.
1 parent cb6077f commit 007ac01

3 files changed

Lines changed: 20 additions & 21 deletions

File tree

src/gameobjects/components/Animation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,12 +566,12 @@ var Animation = new Class({
566566
},
567567

568568
/**
569-
* [description]
569+
* Handle the removal of an animation from the Animation Manager.
570570
*
571571
* @method Phaser.GameObjects.Components.Animation#remove
572572
* @since 3.0.0
573573
*
574-
* @param {Phaser.Animations.Animation} [event] - [description]
574+
* @param {Phaser.Animations.Animation} [event] - The removed Animation.
575575
*/
576576
remove: function (event)
577577
{

src/gameobjects/components/Pipeline.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
/**
88
* Provides methods used for setting the WebGL rendering pipeline of a Game Object.
9-
*
9+
*
1010
* @name Phaser.GameObjects.Components.Pipeline
1111
* @webglOnly
1212
* @since 3.0.0
1313
*/
1414

1515
var Pipeline = {
16-
16+
1717
/**
18-
* [description]
19-
*
18+
* The initial WebGL pipeline of this Game Object.
19+
*
2020
* @name Phaser.GameObjects.Components.Pipeline#defaultPipeline
2121
* @type {Phaser.Renderer.WebGL.WebGLPipeline}
2222
* @default null
@@ -26,8 +26,8 @@ var Pipeline = {
2626
defaultPipeline: null,
2727

2828
/**
29-
* [description]
30-
*
29+
* The current WebGL pipeline of this Game Object.
30+
*
3131
* @name Phaser.GameObjects.Components.Pipeline#pipeline
3232
* @type {Phaser.Renderer.WebGL.WebGLPipeline}
3333
* @default null
@@ -39,13 +39,13 @@ var Pipeline = {
3939
/**
4040
* Sets the initial WebGL Pipeline of this Game Object.
4141
* This should only be called during the instantiation of the Game Object.
42-
*
42+
*
4343
* @method Phaser.GameObjects.Components.Pipeline#initPipeline
4444
* @webglOnly
4545
* @since 3.0.0
4646
*
4747
* @param {string} pipelineName - The name of the pipeline to set on this Game Object.
48-
*
48+
*
4949
* @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.
5050
*/
5151
initPipeline: function (pipelineName)
@@ -65,13 +65,13 @@ var Pipeline = {
6565

6666
/**
6767
* Sets the active WebGL Pipeline of this Game Object.
68-
*
68+
*
6969
* @method Phaser.GameObjects.Components.Pipeline#setPipeline
7070
* @webglOnly
7171
* @since 3.0.0
7272
*
7373
* @param {string} pipelineName - The name of the pipeline to set on this Game Object.
74-
*
74+
*
7575
* @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.
7676
*/
7777
setPipeline: function (pipelineName)
@@ -84,13 +84,13 @@ var Pipeline = {
8484

8585
return true;
8686
}
87-
87+
8888
return false;
8989
},
9090

9191
/**
9292
* Resets the WebGL Pipeline of this Game Object back to the default it was created with.
93-
*
93+
*
9494
* @method Phaser.GameObjects.Components.Pipeline#resetPipeline
9595
* @webglOnly
9696
* @since 3.0.0
@@ -106,7 +106,7 @@ var Pipeline = {
106106

107107
/**
108108
* Gets the name of the WebGL Pipeline this Game Object is currently using.
109-
*
109+
*
110110
* @method Phaser.GameObjects.Components.Pipeline#getPipelineName
111111
* @webglOnly
112112
* @since 3.0.0

src/gameobjects/components/ToJSON.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@
2929
* @property {object} data - The data of this Game Object.
3030
*/
3131

32-
// Default Game Object JSON export
33-
// Is extended further by Game Object specific implementations
34-
3532
/**
36-
* [description]
33+
* Export a Game Object as a JSON object.
34+
*
35+
* This is typically extended further by Game Object specific implementations.
3736
*
3837
* @method Phaser.GameObjects.Components.ToJSON
3938
* @since 3.0.0
4039
*
41-
* @param {Phaser.GameObjects.GameObject} gameObject - [description]
40+
* @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export.
4241
*
43-
* @return {JSONGameObject} [description]
42+
* @return {JSONGameObject} The exported Game Object.
4443
*/
4544
var ToJSON = function (gameObject)
4645
{

0 commit comments

Comments
 (0)