INNER CODE UNIT · JavaScript

dt

rohitg00/k8sgames · js/engine/GameEngine.js:316

      const dt = this._fixedTimeStep / 1000;
      this.simulation.tick(dt);
      this._gameTime += this._fixedTimeStep;

      for (const cb of this._updateCallbacks) {
        cb(dt, this._gameTime);
      }

      this._checkObjectives();
      this._accumulator -= this._fixedTimeStep;
    }

    const alpha = this._accumulator / this._fixedTimeStep;
    for (const cb of this._renderCallbacks) {
      cb(alpha, this._gameTime);
    }

    this.eventBus.emit('engine:frame', {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…