Skip to content

Commit

Permalink
changed orbitControl to use mouseButton object
Browse files Browse the repository at this point in the history
  • Loading branch information
diyaayay committed Dec 5, 2024
1 parent dc45d60 commit 9cf3c8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webgl/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,10 @@ function interaction(p5, fn){
this._renderer.executeZoom = false;
}
if (this.mouseIsPressed) {
if (this.mouseButton === this.LEFT) {
if (this.mouseButton.left) {
deltaTheta = -sensitivityX * this.movedX / scaleFactor;
deltaPhi = sensitivityY * this.movedY / scaleFactor;
} else if (this.mouseButton === this.RIGHT) {
} else if (this.mouseButton.right) {
moveDeltaX = this.movedX;
moveDeltaY = this.movedY * cam.yScale;
}
Expand Down

0 comments on commit 9cf3c8c

Please sign in to comment.