Skip to content

Commit 0a29238

Browse files
committed
Remove FPS counter
1 parent c9a41a7 commit 0a29238

File tree

5 files changed

+2
-28
lines changed

5 files changed

+2
-28
lines changed

docs/all.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/all.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
>
1717
demo on David Nolen's blog.
1818
</p>
19-
<p><span id="fps"></span> FPS</p>
2019
</div>
2120
<script type="text/javascript" src="all.js"></script></body>
2221
</html>

src/docs/html/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
>
1717
demo on David Nolen's blog.
1818
</p>
19-
<p><span id="fps"></span> FPS</p>
2019
</div>
2120
</body>
2221
</html>

src/docs/js/index.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,6 @@ function tableCreate(numberOfRows, numberOfColumns) {
3737
main.appendChild(tbl)
3838
}
3939

40-
// from https://www.growingwiththeweb.com/2017/12/fast-simple-js-fps-counter.html
41-
const times = []
42-
let fps
43-
let fpsEl
44-
45-
function refreshLoop() {
46-
window.requestAnimationFrame(() => {
47-
const now = performance.now()
48-
while (times.length > 0 && times[0] <= now - 1000) {
49-
times.shift()
50-
}
51-
times.push(now)
52-
fps = times.length
53-
if (!fpsEl) {
54-
fpsEl = document.getElementById('fps')
55-
}
56-
57-
fpsEl.textContent = fps.toString()
58-
refreshLoop()
59-
})
60-
}
61-
6240
document.addEventListener('DOMContentLoaded', function(event) {
6341
const system = new Processes.ProcessSystem(
6442
new Processes.RequestAnimationScheduler()
@@ -69,8 +47,6 @@ document.addEventListener('DOMContentLoaded', function(event) {
6947

7048
const maxProcesses = rows * columns
7149

72-
refreshLoop()
73-
7450
tableCreate(rows, columns)
7551

7652
for (let i = 0; i < maxProcesses; i++) {

0 commit comments

Comments
 (0)