reset method
dynamic
reset()
- Reset trackball
Implementation
reset() {
this.camera.zoom = this._zoom0;
if (this.camera is PerspectiveCamera) {
this.camera.fov = this._fov0;
}
this.camera.near = this._nearPos;
this.camera.far = this._farPos;
this._cameraMatrixState.copy(this._cameraMatrixState0);
this._cameraMatrixState.decompose(
this.camera.position, this.camera.quaternion, this.camera.scale);
this.camera.up.copy(this._up0);
this.camera.updateMatrix();
this.camera.updateProjectionMatrix();
this._gizmoMatrixState.copy(this._gizmoMatrixState0);
this._gizmoMatrixState0.decompose(
this._gizmos.position, this._gizmos.quaternion, this._gizmos.scale);
this._gizmos.updateMatrix();
this._tbRadius = this.calculateTbRadius(this.camera);
this.makeGizmos(this._gizmos.position, this._tbRadius);
this.camera.lookAt(this._gizmos.position);
this.updateTbState(STATE2.IDLE, false);
this.dispatchEvent(_changeEvent);
}