Skip to content

Commit

Permalink
fix-fps
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderpopelnyk committed Jun 13, 2024
1 parent 5b9a519 commit 8d80f36
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@
render: 0,
}
player.addEventListener("framereceived", () => fps.cam++)
player.addEventListener(
"frameprocessed",
({ detail }) => (fps.processing = 1 / detail.averagedDuration)
)
player.addEventListener("frameprocessed", ({ detail }) => fps.processing = 1000 / detail.averagedDuration)
player.addEventListener("framerendered", () => fps.render++)

setInterval(() => {
Expand Down

0 comments on commit 8d80f36

Please sign in to comment.