Skip to content

Commit

Permalink
update Example.ragdoll
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Dec 30, 2021
1 parent b2bd492 commit ec38638
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/ragdoll.js
Expand Up @@ -83,7 +83,7 @@ Example.ragdoll = function() {
lastTime = Common.now();

Events.on(engine, 'afterUpdate', function(event) {
var timeScale = timeScale = (event.delta || (1000 / 60)) / 1000;
var timeScale = (event.delta || (1000 / 60)) / 1000;

// tween the timescale for slow-mo
if (mouse.button === -1) {
Expand All @@ -92,7 +92,7 @@ Example.ragdoll = function() {
engine.timing.timeScale = 1;
}

// every 1.5 sec (real time)
// every 2 sec (real time)
if (Common.now() - lastTime >= 2000) {
// flip the timescale
if (timeScaleTarget < 1) {
Expand Down

0 comments on commit ec38638

Please sign in to comment.