Skip to content

Commit ef558fe

Browse files
committed
Type definition fixes
1 parent 8bc4d06 commit ef558fe

6 files changed

Lines changed: 25 additions & 28 deletions

File tree

src/animations/Animation.js

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ var Animation = new Class({
583583
// Yoyo? (happens before repeat)
584584
if (component._yoyo)
585585
{
586-
this._handleYoyoFrame(component, false);
586+
this.handleYoyoFrame(component, false);
587587
}
588588
else if (component.repeatCounter > 0)
589589
{
@@ -605,39 +605,45 @@ var Animation = new Class({
605605
}
606606
else
607607
{
608-
this._updateAndGetNextTick(component, frame.nextFrame);
608+
this.updateAndGetNextTick(component, frame.nextFrame);
609609
}
610610
},
611611

612612
/**
613613
* Handle the yoyo functionality in nextFrame and previousFrame methods.
614614
*
615-
* @method Phaser.Animations.Animation#_handleYoyoFrame
615+
* @method Phaser.Animations.Animation#handleYoyoFrame
616+
* @private
616617
* @since 3.12.0
617618
*
618619
* @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.
619-
* @param {bool} isReverse - Is animation in reverse mode? (Default: false)
620+
* @param {boolean} isReverse - Is animation in reverse mode? (Default: false)
620621
*/
621-
_handleYoyoFrame: function (component, isReverse)
622+
handleYoyoFrame: function (component, isReverse)
622623
{
623624
if (!isReverse) { isReverse = false; }
624625

625626
if (component._reverse === !isReverse && component.repeatCounter > 0)
626627
{
627628
component.forward = isReverse;
629+
628630
this.repeatAnimation(component);
631+
629632
return;
630633
}
631634

632635
if (component._reverse !== isReverse && component.repeatCounter === 0)
633636
{
634637
this.completeAnimation(component);
638+
635639
return;
636640
}
637641

638642
component.forward = isReverse;
639-
var frame = isReverse ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;
640-
this._updateAndGetNextTick(component, frame);
643+
644+
var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;
645+
646+
this.updateAndGetNextTick(component, frame);
641647
},
642648

643649
/**
@@ -673,7 +679,7 @@ var Animation = new Class({
673679

674680
if (component._yoyo)
675681
{
676-
this._handleYoyoFrame(component, true);
682+
this.handleYoyoFrame(component, true);
677683
}
678684
else if (component.repeatCounter > 0)
679685
{
@@ -696,22 +702,23 @@ var Animation = new Class({
696702
}
697703
else
698704
{
699-
this._updateAndGetNextTick(component, frame.prevFrame);
705+
this.updateAndGetNextTick(component, frame.prevFrame);
700706
}
701707
},
702708

703709
/**
704-
* Update Frame and Wait next tick
710+
* Update Frame and Wait next tick.
705711
*
706-
* @method Phaser.Animations.Animation#_updateAndGetNextTick
712+
* @method Phaser.Animations.Animation#updateAndGetNextTick
713+
* @private
707714
* @since 3.12.0
708715
*
709-
* @param {Phaser.Animations.AnimationFrame} frame - An Animation frame
710-
*
716+
* @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.
711717
*/
712-
_updateAndGetNextTick: function (component, frame)
718+
updateAndGetNextTick: function (component, frame)
713719
{
714720
component.updateFrame(frame);
721+
715722
this.getNextTick(component);
716723
},
717724

src/boot/ScaleManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var Vec2 = require('../math/Vector2');
3333
* @since 3.12.0
3434
*
3535
* @param {Phaser.Game} game - A reference to the Phaser.Game instance.
36-
* @param {ScaleManagerConfig} config
36+
* @param {any} config
3737
*/
3838
var ScaleManager = new Class({
3939

src/cameras/2d/effects/Fade.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ var Fade = new Class({
348348
* @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL
349349
* @since 3.5.0
350350
*
351-
* @param {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} pipeline - The WebGL Pipeline to render to.
351+
* @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.
352352
* @param {function} getTintFunction - A function that will return the gl safe tint colors.
353353
*
354354
* @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.

src/cameras/2d/effects/Flash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ var Flash = new Class({
295295
* @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL
296296
* @since 3.5.0
297297
*
298-
* @param {Phaser.Renderer.WebGL.Pipelines.FlatTintPipeline} pipeline - The WebGL Pipeline to render to.
298+
* @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.
299299
* @param {function} getTintFunction - A function that will return the gl safe tint colors.
300300
*
301301
* @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.

src/curves/Curve.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ var Curve = new Class({
131131
// So you can chain graphics calls
132132
return graphics.strokePoints(this.getPoints(pointsTotal));
133133
},
134-
134+
135135
/**
136136
* Returns a Rectangle where the position and dimensions match the bounds of this Curve.
137137
*

src/scene/Scene.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,6 @@ var Scene = new Class({
113113
*/
114114
this.cameras;
115115

116-
/**
117-
* A scene level 3D Camera System.
118-
* This property will only be available if defined in the Scene Injection Map.
119-
*
120-
* @name Phaser.Scene#cameras3d
121-
* @type {Phaser.Cameras.Sprite3D.CameraManager}
122-
* @since 3.0.0
123-
*/
124-
this.cameras3d;
125-
126116
/**
127117
* A scene level Game Object Factory.
128118
* This property will only be available if defined in the Scene Injection Map.

0 commit comments

Comments
 (0)