diff --git a/packages/viewer/src/modules/Viewer.ts b/packages/viewer/src/modules/Viewer.ts index d88bd1cd2..d4b846c28 100644 --- a/packages/viewer/src/modules/Viewer.ts +++ b/packages/viewer/src/modules/Viewer.ts @@ -104,6 +104,7 @@ export class Viewer extends EventEmitter implements IViewer { WorldTree.getRenderTree(url).buildRenderTree() this.speckleRenderer.addRenderTree(url) this.zoom() + this.speckleRenderer.resetPipeline(true) }) } public setSectionBox( diff --git a/packages/viewer/src/modules/objects/SpeckleCameraControls.ts b/packages/viewer/src/modules/objects/SpeckleCameraControls.ts index d7b60a09c..2c8eeb43a 100644 --- a/packages/viewer/src/modules/objects/SpeckleCameraControls.ts +++ b/packages/viewer/src/modules/objects/SpeckleCameraControls.ts @@ -309,10 +309,7 @@ export class SpeckleCameraControls extends CameraControls { } const zoomDelta = this._zoomEnd - this._zoom this._zoom += - zoomDelta * - (this.overrideZoomLerpRatio - ? this.overrideZoomLerpRatio - : this.overrideZoomLerpRatio) + zoomDelta * (this.overrideZoomLerpRatio ? this.overrideZoomLerpRatio : lerpRatio) if (this._camera.zoom !== this._zoom) { if (approxZero(zoomDelta)) { this._zoom = this._zoomEnd @@ -344,7 +341,7 @@ export class SpeckleCameraControls extends CameraControls { approxZero(deltaOffset.z, this.restThreshold) && !this._hasRested && !this._isTrucking && - !this._didZoom + (isOrthographicCamera(this._camera) ? !this._didZoom : true) ) { this._hasRested = true this.dispatchEvent({ type: 'rest' }) @@ -364,7 +361,7 @@ export class SpeckleCameraControls extends CameraControls { approxZero(deltaOffset.y, this.restThreshold) && approxZero(deltaOffset.z, this.restThreshold) && !this._isTrucking && - !this._didZoom + (isOrthographicCamera(this._camera) ? !this._didZoom : true) ) { this.dispatchEvent({ type: 'rest' }) this._didDollyLastFrame = false