0
0
Fork 0
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:
liabru 2021-12-30 23:57:30 +00:00
parent b2bd492d05
commit ec38638711

View file

@ -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) {