mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-10 15:50:44 -05:00
update Example.ragdoll
This commit is contained in:
parent
b2bd492d05
commit
ec38638711
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue