Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Make loop.stop() actually stop #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/game-loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class GameLoop {
}

stop() {
if (!this.loopID) {
if (this.loopID) {
window.cancelAnimationFrame(this.loopID);
this.loopID = null;
}
Expand Down