Skip to content

Commit

Permalink
fix: animation frames
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Dec 5, 2024
1 parent 3dcd892 commit 4103e6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/slimy-mails-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"runed": patch
---

fix: `AnimationFrames`
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class AnimationFrames {
});
}

#loop(timestamp: DOMHighResTimeStamp): void {
#loop = (timestamp: DOMHighResTimeStamp): void => {
if (!this.#running) return;

if (this.#previousTimestamp === null) {
Expand All @@ -78,7 +78,7 @@ export class AnimationFrames {
this.#previousTimestamp = timestamp;
this.#callback({ delta, timestamp });
this.#frame = requestAnimationFrame(this.#loop);
}
};

start(): void {
this.#running = true;
Expand Down

0 comments on commit 4103e6e

Please sign in to comment.