sprites
This commit is contained in:
parent
6d2537e3e3
commit
0e8ece2dc0
23 changed files with 2030 additions and 395 deletions
|
|
@ -19,7 +19,9 @@ function loop() {
|
|||
world.update(dt);
|
||||
render();
|
||||
statsTimer += dt;
|
||||
if (statsTimer > 0.2) {
|
||||
const perf = world.performanceLevel ? world.performanceLevel() : 0;
|
||||
const statsInterval = perf >= 3 ? 1.20 : perf === 2 ? 0.92 : perf === 1 ? 0.68 : 0.48;
|
||||
if (statsTimer > statsInterval) {
|
||||
renderStats();
|
||||
statsTimer = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue