INNER CODE UNIT · TypeScript

delay

jamesroutley/24a2 · src/engine.ts:272

    const delay = 1000 / (this._config.frameRate || 24);
    this._interval = window.setInterval(this._update.bind(this), delay);
  }

  /**
   * The internal function that's called on every frame.
   */
  private _update() {
    if (this._ended) {
      window.clearInterval(this._interval);
      return;
    }
    this._frameCount++;
    if (this._clear) {
      this._clearGrid();
    }
    if (this._config.update) {
      this._config.update(this);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…