INNER CODE UNIT · TypeScript

delta

WorldQL/dreamlab-engine · engine/_web/main.ts:70

  delta = now - then;
  const FRAME_TIME = 1000 / MAX_FPS;

  if (delta >= FRAME_TIME) {
    then = now - (delta % FRAME_TIME);
    game.tickClient(delta);
  } else {
    console.log("skipped");
  }

  requestAnimationFrame(onTick);
};

requestAnimationFrame(onTick);

const FPS_TEST_MODE = false;

if (FPS_TEST_MODE) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…