@@ -11,22 +11,29 @@ var EventEmitter = require('eventemitter3');
1111var GetValue = require ( '../utils/object/GetValue' ) ;
1212var Pad = require ( '../utils/string/Pad' ) ;
1313
14+ /**
15+ * @typedef {object } JSONAnimationManager
16+ *
17+ * @property {JSONAnimation[] } anims - [description]
18+ * @property {number } globalTimeScale - [description]
19+ */
20+
1421/**
1522 * @classdesc
1623 * The Animation Manager.
17- *
24+ *
1825 * Animations are managed by the global Animation Manager. This is a singleton class that is
1926 * responsible for creating and delivering animations and their corresponding data to all Game Objects.
2027 * Unlike plugins it is owned by the Game instance, not the Scene.
21- *
28+ *
2229 * Sprites and other Game Objects get the data they need from the AnimationManager.
2330 *
2431 * @class AnimationManager
2532 * @extends EventEmitter
2633 * @memberOf Phaser.Animations
2734 * @constructor
2835 * @since 3.0.0
29- *
36+ *
3037 * @param {Phaser.Game } game - [description]
3138 */
3239var AnimationManager = new Class ( {
@@ -120,10 +127,10 @@ var AnimationManager = new Class({
120127 * @method Phaser.Animations.AnimationManager#add
121128 * @fires AddAnimationEvent
122129 * @since 3.0.0
123- *
130+ *
124131 * @param {string } key - [description]
125132 * @param {Phaser.Animations.Animation } animation - [description]
126- *
133+ *
127134 * @return {Phaser.Animations.AnimationManager } This Animation Manager.
128135 */
129136 add : function ( key , animation )
@@ -149,9 +156,9 @@ var AnimationManager = new Class({
149156 * @method Phaser.Animations.AnimationManager#create
150157 * @fires AddAnimationEvent
151158 * @since 3.0.0
152- *
153- * @param {object } config - [description]
154- *
159+ *
160+ * @param {AnimationConfig } config - [description]
161+ *
155162 * @return {Phaser.Animations.Animation } The Animation that was created.
156163 */
157164 create : function ( config )
@@ -178,10 +185,10 @@ var AnimationManager = new Class({
178185 *
179186 * @method Phaser.Animations.AnimationManager#fromJSON
180187 * @since 3.0.0
181- *
188+ *
182189 * @param {string|object } data - [description]
183190 * @param {boolean } [clearCurrentAnimations=false] - [description]
184- *
191+ *
185192 * @return {Phaser.Animations.Animation[] } An array containing all of the Animation objects that were created as a result of this call.
186193 */
187194 fromJSON : function ( data , clearCurrentAnimations )
@@ -227,7 +234,7 @@ var AnimationManager = new Class({
227234 *
228235 * @method Phaser.Animations.AnimationManager#generateFrameNames
229236 * @since 3.0.0
230- *
237+ *
231238 * @param {string } key - [description]
232239 * @param {object } config - [description]
233240 * @param {string } [config.prefix=''] - [description]
@@ -237,8 +244,8 @@ var AnimationManager = new Class({
237244 * @param {integer } [config.zeroPad=0] - [description]
238245 * @param {array } [config.outputArray=[]] - [description]
239246 * @param {boolean } [config.frames=false] - [description]
240- *
241- * @return {object [] } [description]
247+ *
248+ * @return {AnimationFrameConfig [] } [description]
242249 */
243250 generateFrameNames : function ( key , config )
244251 {
@@ -299,16 +306,16 @@ var AnimationManager = new Class({
299306 *
300307 * @method Phaser.Animations.AnimationManager#generateFrameNumbers
301308 * @since 3.0.0
302- *
309+ *
303310 * @param {string } key - [description]
304311 * @param {object } config - [description]
305312 * @param {integer } [config.start=0] - [description]
306313 * @param {integer } [config.end=-1] - [description]
307314 * @param {boolean } [config.first=false] - [description]
308315 * @param {array } [config.outputArray=[]] - [description]
309316 * @param {boolean } [config.frames=false] - [description]
310- *
311- * @return {object [] } [description]
317+ *
318+ * @return {AnimationFrameConfig [] } [description]
312319 */
313320 generateFrameNumbers : function ( key , config )
314321 {
@@ -369,9 +376,9 @@ var AnimationManager = new Class({
369376 *
370377 * @method Phaser.Animations.AnimationManager#get
371378 * @since 3.0.0
372- *
379+ *
373380 * @param {string } key - [description]
374- *
381+ *
375382 * @return {Phaser.Animations.Animation } [description]
376383 */
377384 get : function ( key )
@@ -384,11 +391,11 @@ var AnimationManager = new Class({
384391 *
385392 * @method Phaser.Animations.AnimationManager#load
386393 * @since 3.0.0
387- *
394+ *
388395 * @param {Phaser.GameObjects.GameObject } child - [description]
389396 * @param {string } key - [description]
390397 * @param {string|integer } [startFrame] - [description]
391- *
398+ *
392399 * @return {Phaser.GameObjects.GameObject } [description]
393400 */
394401 load : function ( child , key , startFrame )
@@ -409,7 +416,7 @@ var AnimationManager = new Class({
409416 * @method Phaser.Animations.AnimationManager#pauseAll
410417 * @fires PauseAllAnimationEvent
411418 * @since 3.0.0
412- *
419+ *
413420 * @return {Phaser.Animations.AnimationManager } This Animation Manager.
414421 */
415422 pauseAll : function ( )
@@ -429,10 +436,10 @@ var AnimationManager = new Class({
429436 *
430437 * @method Phaser.Animations.AnimationManager#play
431438 * @since 3.0.0
432- *
439+ *
433440 * @param {string } key - [description]
434441 * @param {Phaser.GameObjects.GameObject } child - [description]
435- *
442+ *
436443 * @return {Phaser.Animations.AnimationManager } This Animation Manager.
437444 */
438445 play : function ( key , child )
@@ -463,9 +470,9 @@ var AnimationManager = new Class({
463470 * @method Phaser.Animations.AnimationManager#remove
464471 * @fires RemoveAnimationEvent
465472 * @since 3.0.0
466- *
473+ *
467474 * @param {string } key - [description]
468- *
475+ *
469476 * @return {Phaser.Animations.Animation } [description]
470477 */
471478 remove : function ( key )
@@ -488,7 +495,7 @@ var AnimationManager = new Class({
488495 * @method Phaser.Animations.AnimationManager#resumeAll
489496 * @fires ResumeAllAnimationEvent
490497 * @since 3.0.0
491- *
498+ *
492499 * @return {Phaser.Animations.AnimationManager } This Animation Manager.
493500 */
494501 resumeAll : function ( )
@@ -508,11 +515,11 @@ var AnimationManager = new Class({
508515 *
509516 * @method Phaser.Animations.AnimationManager#staggerPlay
510517 * @since 3.0.0
511- *
518+ *
512519 * @param {string } key - [description]
513520 * @param {Phaser.GameObjects.GameObject } child - [description]
514521 * @param {number } [stagger=0] - [description]
515- *
522+ *
516523 * @return {Phaser.Animations.AnimationManager } This Animation Manager.
517524 */
518525 staggerPlay : function ( key , child , stagger )
@@ -544,10 +551,10 @@ var AnimationManager = new Class({
544551 *
545552 * @method Phaser.Animations.AnimationManager#toJSON
546553 * @since 3.0.0
547- *
554+ *
548555 * @param {string } key - [description]
549- *
550- * @return {object } [description]
556+ *
557+ * @return {JSONAnimationManager } [description]
551558 */
552559 toJSON : function ( key )
553560 {
0 commit comments