Skip to content

Commit 6947a68

Browse files
committed
Added postUpdate NOOP
1 parent 4d976e5 commit 6947a68

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

v3/src/physics/impact/World.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ var World = new Class({
208208
return this;
209209
},
210210

211+
postUpdate: function ()
212+
{
213+
// NOOP
214+
},
215+
211216
update: function (time, delta)
212217
{
213218
if (!this.enabled || this.bodies.size === 0)
@@ -216,7 +221,10 @@ var World = new Class({
216221
}
217222

218223
// Impact uses a divided delta value that is clamped to the maxStep (20fps) maximum
219-
this.delta = Math.min(delta / 1000, this.maxStep) * this.timeScale;
224+
225+
var clampedDelta = Math.min(delta / 1000, this.maxStep) * this.timeScale;
226+
227+
this.delta = clampedDelta;
220228

221229
// Update all active bodies
222230

@@ -233,7 +241,7 @@ var World = new Class({
233241

234242
if (body.enabled)
235243
{
236-
body.update(this.delta);
244+
body.update(clampedDelta);
237245
}
238246
}
239247

0 commit comments

Comments
 (0)