diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-12-28 21:59:59 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-12-28 21:59:59 +0900 |
| commit | 17eca2a18f71f7690e956ca638b7ff19d2395907 (patch) | |
| tree | ee20bb086b1974b06e0440ee9ea06e392cc0f8a5 /src | |
| parent | Bump @fortawesome/vue-fontawesome from 3.0.0-2 to 3.0.0-3 (#6971) (diff) | |
| download | sharkey-17eca2a18f71f7690e956ca638b7ff19d2395907.tar.gz sharkey-17eca2a18f71f7690e956ca638b7ff19d2395907.tar.bz2 sharkey-17eca2a18f71f7690e956ca638b7ff19d2395907.zip | |
Update physics.ts
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/scripts/physics.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/scripts/physics.ts b/src/client/scripts/physics.ts index 0366de96e7..8e971d5844 100644 --- a/src/client/scripts/physics.ts +++ b/src/client/scripts/physics.ts @@ -67,6 +67,9 @@ export function physics(container: HTMLElement) { left + (objEl.offsetWidth / 2), top + (objEl.offsetHeight / 2), Math.max(objEl.offsetWidth, objEl.offsetHeight) / 2, + { + restitution: 0.5 + } ); } else { const style = window.getComputedStyle(objEl); @@ -77,6 +80,7 @@ export function physics(container: HTMLElement) { objEl.offsetHeight, { chamfer: { radius: parseInt(style.borderRadius, 10) }, + restitution: 0.5 } ); } @@ -92,7 +96,7 @@ export function physics(container: HTMLElement) { const mouseConstraint = Matter.MouseConstraint.create(engine, { mouse: mouse, constraint: { - stiffness: 0.05, + stiffness: 0.1, render: { visible: false } |