summaryrefslogtreecommitdiff
path: root/packages/client/src/scripts/physics.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-01-16 10:14:14 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-01-16 10:14:14 +0900
commit8322c908340fa720d4f1afc781ef34e9d16ae6b0 (patch)
tree624cc9d2296870cdff8fab7dcb47d05638fc9ac7 /packages/client/src/scripts/physics.ts
parentclean up (diff)
downloadsharkey-8322c908340fa720d4f1afc781ef34e9d16ae6b0.tar.gz
sharkey-8322c908340fa720d4f1afc781ef34e9d16ae6b0.tar.bz2
sharkey-8322c908340fa720d4f1afc781ef34e9d16ae6b0.zip
refactor(client): specify global scope
Diffstat (limited to 'packages/client/src/scripts/physics.ts')
-rw-r--r--packages/client/src/scripts/physics.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/client/src/scripts/physics.ts b/packages/client/src/scripts/physics.ts
index 445b6296eb..36e476b6f9 100644
--- a/packages/client/src/scripts/physics.ts
+++ b/packages/client/src/scripts/physics.ts
@@ -136,7 +136,7 @@ export function physics(container: HTMLElement) {
}
// 奈落に落ちたオブジェクトは消す
- const intervalId = setInterval(() => {
+ const intervalId = window.setInterval(() => {
for (const obj of objs) {
if (obj.position.y > (containerHeight + 1024)) Matter.World.remove(world, obj);
}
@@ -146,7 +146,7 @@ export function physics(container: HTMLElement) {
stop: () => {
stop = true;
Matter.Runner.stop(runner);
- clearInterval(intervalId);
+ window.clearInterval(intervalId);
}
};
}