You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tween/Tween.js
+19-87Lines changed: 19 additions & 87 deletions
Original file line number
Diff line number
Diff line change
@@ -796,125 +796,57 @@ Phaser.Tween.prototype = {
796
796
}
797
797
}
798
798
799
-
}
799
+
},
800
800
801
801
/**
802
802
* This will generate an array populated with the tweened object values from start to end.
803
-
* It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and similar functions.
804
-
* It ignores delay and repeat counts and any chained tweens. Just one play through of tween data is returned, including yoyo if set.
803
+
* It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from.
804
+
* It ignores delay and repeat counts and any chained tweens, but does include child tweens.
805
+
* Just one play through of the tween data is returned, including yoyo if set.
805
806
*
806
807
* @method Phaser.Tween#generateData
807
808
* @param {number} [frameRate=60] - The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates.
808
809
* @param {array} [data] - If given the generated data will be appended to this array, otherwise a new array will be returned.
809
810
* @return {array} An array of tweened values.
811
+
*/
810
812
generateData: function(frameRate,data){
811
813
812
814
if(this.game===null||this.target===null)
813
815
{
814
816
returnnull;
815
817
}
816
818
817
-
this.startTime = 0;
819
+
if(typeofdata==='undefined'){data=[];}
818
820
819
-
for (var property in this._valuesEnd)
820
-
{
821
-
// Check if an Array was provided as property value
822
-
if (Array.isArray(this._valuesEnd[property]))
823
-
{
824
-
if (this._valuesEnd[property].length === 0)
825
-
{
826
-
continue;
827
-
}
828
-
829
-
// create a local copy of the Array with the start value at the front
* This will generate an array populated with the tweened object values from start to end.
374
+
* It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from.
375
+
* Just one play through of the tween data is returned, including yoyo if set.
376
+
*
377
+
* @method Phaser.TweenData#generateData
378
+
* @param {number} [frameRate=60] - The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates.
0 commit comments