update method

dynamic update()

Implementation

update() {
  this.frameId++;

  if (this.lastTime == undefined) this.lastTime = performance.now();

  this.deltaTime = (performance.now() - this.lastTime) / 1000;

  this.lastTime = performance.now();

  this.time += this.deltaTime;
}