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
If Time.elapsed was > Time.timeCap it would reset the elapsed value to be 1 / 60. It's now set to Time.timeCap and Time.timeCap defaults to 1 / 60 * 1000 as it's a ms value (thanks @casensiomphaserjs#899)
* Arcade.overlap and collide are now more consistent about allowing a Group vs. Group or Group vs. Array of Groups set (thanks @pyromanfo#877#1147)
121
121
* The Pointer move callbacks are now sent an extra parameter: `fromClick` allowing your callbacks to distinguish between the Pointer just moving, or moving as a result of being pressed down (thanks @iforce2d#1055)
122
122
* GamePad and SinglePad onAxisCallback parameters have changed. You are now sent: this (a reference to the SinglePad that caused the callback), the axis index and the axis value in that order.
123
+
* If Time.elapsed was > Time.timeCap it would reset the elapsed value to be 1 / 60. It's now set to Time.timeCap and Time.timeCap defaults to `1 / 60 * 1000` as it's a ms value (thanks @casensiom#899)
Copy file name to clipboardExpand all lines: src/time/Time.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ Phaser.Time = function (game) {
89
89
/**
90
90
* @property {number} timeCap - If the difference in time between two frame updates exceeds this value, the frame time is reset to avoid huge elapsed counts.
91
91
*/
92
-
this.timeCap=1000;
92
+
this.timeCap=1/60*1000;
93
93
94
94
/**
95
95
* @property {number} frames - The number of frames record in the last second. Only calculated if Time.advancedTiming is true.
@@ -248,7 +248,7 @@ Phaser.Time.prototype = {
248
248
// For some reason the time between now and the last time the game was updated was larger than our timeCap
249
249
// This can happen if the Stage.disableVisibilityChange is true and you swap tabs, which makes the raf pause.
250
250
// In this case we'll drop to some default values to stop the game timers going nuts.
251
-
this.elapsed=1/60;
251
+
this.elapsed=this.timeCap;
252
252
}
253
253
254
254
// Calculate physics elapsed, ensure it's > 0, use 1/60 as a fallback
0 commit comments