INNER CODE UNIT · JavaScript

alpha

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

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

    this.eventBus.emit('engine:frame', {
      fps: this._fps,
      gameTime: this._gameTime,
      realTime: this._realTime,
      alpha,
    });

    if (!this._lastTickEmit || this._realTime - this._lastTickEmit > 500) {
      this._lastTickEmit = this._realTime;
      const stats = this.cluster.getClusterStats();
      this.eventBus.emit('tick', {
        elapsed: this._gameTime,
        gameTime: this._gameTime,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…