Skip to content

Commit

Permalink
feat(viewer-lib): Updates on mouse orbiting:
Browse files Browse the repository at this point in the history
- When clicking outside of the model, oribitig will switch to polar and use the last computed origin (which is still going to be based on the last pivot point)
Made the pivot sphere speckle blue
The pivot sphere now only shows when clicking on objects, when clicking outside of the model it will not show
  • Loading branch information
AlexandruPopovici committed Jan 14, 2025
1 parent cf0c1e8 commit 572ae38
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export class SmoothOrbitControls extends SpeckleControls {
this._options = Object.assign({}, options)
this.setDamperDecayTime(this._options.damperDecay)

const billboardMaterial = new SpeckleBasicMaterial({ color: 0x43af11 }, [
const billboardMaterial = new SpeckleBasicMaterial({ color: 0x047efb }, [
'BILLBOARD_FIXED'
])
billboardMaterial.opacity = 0.75
Expand Down Expand Up @@ -1017,9 +1017,12 @@ export class SmoothOrbitControls extends SpeckleControls {
if (res && res.length) {
this.pivotPoint.copy(res[0].point)
this.usePivotal = true
this.orbitSphere.visible = this._options.showOrbitPoint
} else {
this.usePivotal = false
this.orbitSphere.visible = false
}
}
this.orbitSphere.visible = this._options.showOrbitPoint

if (this.pointers.length > 2) {
return
Expand Down

0 comments on commit 572ae38

Please sign in to comment.