INNER CODE UNIT · JavaScript
delta
loicbourgois/gravitle · front/alpha/index.js:137
delta = now - time;
const resolution = universe.get_delta_time_milli();
while (delta > resolution) {
delta -= resolution;
tick();
}
time = now - delta;
};
const start = () => {
time = Date.now();
interval = setInterval(tickMultiple, 1);
requestAnimationFrame(render_loop);
canvas.focus();
};
const keyup = (e) => {
if (bindings && bindings[e.key]) {