saveState method

dynamic saveState()
  • Save the current state of the control. This can later be recover with .reset

Implementation

saveState() {
  this._cameraMatrixState0.copy(this.camera.matrix);
  this._gizmoMatrixState0.copy(this._gizmos.matrix);
  this._nearPos = this.camera.near;
  this._farPos = this.camera.far;
  this._zoom0 = this.camera.zoom;
  this._up0.copy(this.camera.up);

  if (this.camera is PerspectiveCamera) {
    this._fov0 = this.camera.fov;
  }
}