diff options
Diffstat (limited to 'packages/client/src/scripts/physics.ts')
| -rw-r--r-- | packages/client/src/scripts/physics.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/client/src/scripts/physics.ts b/packages/client/src/scripts/physics.ts index f0a5b0fdd6..efda80f074 100644 --- a/packages/client/src/scripts/physics.ts +++ b/packages/client/src/scripts/physics.ts @@ -29,7 +29,7 @@ export function physics(container: HTMLElement) { height: containerHeight, background: 'transparent', // transparent to hide wireframeBackground: 'transparent', // transparent to hide - } + }, }); // Disable to hide debug @@ -43,7 +43,7 @@ export function physics(container: HTMLElement) { const ground = Matter.Bodies.rectangle(containerCenterX, containerHeight + (groundThickness / 2), containerWidth, groundThickness, { isStatic: true, restitution: 0.1, - friction: 2 + friction: 2, }); //const wallRight = Matter.Bodies.rectangle(window.innerWidth+50, window.innerHeight/2, 100, window.innerHeight, wallopts); @@ -68,8 +68,8 @@ export function physics(container: HTMLElement) { top + (objEl.offsetHeight / 2), Math.max(objEl.offsetWidth, objEl.offsetHeight) / 2, { - restitution: 0.5 - } + restitution: 0.5, + }, ); } else { const style = window.getComputedStyle(objEl); @@ -80,8 +80,8 @@ export function physics(container: HTMLElement) { objEl.offsetHeight, { chamfer: { radius: parseInt(style.borderRadius || '0', 10) }, - restitution: 0.5 - } + restitution: 0.5, + }, ); } objEl.id = obj.id.toString(); @@ -98,9 +98,9 @@ export function physics(container: HTMLElement) { constraint: { stiffness: 0.1, render: { - visible: false - } - } + visible: false, + }, + }, }); Matter.World.add(engine.world, mouseConstraint); @@ -147,6 +147,6 @@ export function physics(container: HTMLElement) { stop = true; Matter.Runner.stop(runner); window.clearInterval(intervalId); - } + }, }; } |