From 1de71b0451829475f9022cfaf25cb206a2563c87 Mon Sep 17 00:00:00 2001 From: Perminder Singh Date: Thu, 9 Nov 2023 18:21:36 +0530 Subject: [PATCH 1/4] Solved y-axis inverted in framebuffer --- src/webgl/interaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/interaction.js b/src/webgl/interaction.js index c5b1b86f89..9300caf9b9 100644 --- a/src/webgl/interaction.js +++ b/src/webgl/interaction.js @@ -229,7 +229,7 @@ p5.prototype.orbitControl = function( deltaPhi = sensitivityY * this.movedY / scaleFactor; } else if (this.mouseButton === this.RIGHT) { moveDeltaX = this.movedX; - moveDeltaY = this.movedY; + moveDeltaY = (this.movedY * -1); } // start rotate and move when mouse is pressed within the canvas. if (pointersInCanvas) this._renderer.executeRotateAndMove = true; From 425dcccbe7e090e5ed6d82ec1b0df42d684481d0 Mon Sep 17 00:00:00 2001 From: perminder-17 <127239756+perminder-17@users.noreply.github.com> Date: Thu, 9 Nov 2023 19:37:04 +0530 Subject: [PATCH 2/4] Update interaction.js --- src/webgl/interaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/interaction.js b/src/webgl/interaction.js index 9300caf9b9..fbc722a26b 100644 --- a/src/webgl/interaction.js +++ b/src/webgl/interaction.js @@ -229,7 +229,7 @@ p5.prototype.orbitControl = function( deltaPhi = sensitivityY * this.movedY / scaleFactor; } else if (this.mouseButton === this.RIGHT) { moveDeltaX = this.movedX; - moveDeltaY = (this.movedY * -1); + moveDeltaY = (this.movedY * (cam.projMatrix.mat4[5] < 0 ? 1 : -1)); } // start rotate and move when mouse is pressed within the canvas. if (pointersInCanvas) this._renderer.executeRotateAndMove = true; From 3b0c5a8ee756de1753cdb22b81df8b04d669c484 Mon Sep 17 00:00:00 2001 From: perminder-17 <127239756+perminder-17@users.noreply.github.com> Date: Thu, 9 Nov 2023 19:46:28 +0530 Subject: [PATCH 3/4] Update interaction.js --- src/webgl/interaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/interaction.js b/src/webgl/interaction.js index fbc722a26b..e5dc1928ae 100644 --- a/src/webgl/interaction.js +++ b/src/webgl/interaction.js @@ -229,7 +229,7 @@ p5.prototype.orbitControl = function( deltaPhi = sensitivityY * this.movedY / scaleFactor; } else if (this.mouseButton === this.RIGHT) { moveDeltaX = this.movedX; - moveDeltaY = (this.movedY * (cam.projMatrix.mat4[5] < 0 ? 1 : -1)); + moveDeltaY = (this.movedY * (cam.yScale)); } // start rotate and move when mouse is pressed within the canvas. if (pointersInCanvas) this._renderer.executeRotateAndMove = true; From e375f7f657cb927b3fdef612be5c157c754a8f45 Mon Sep 17 00:00:00 2001 From: perminder-17 <127239756+perminder-17@users.noreply.github.com> Date: Thu, 9 Nov 2023 20:11:58 +0530 Subject: [PATCH 4/4] Removed bracket.js --- src/webgl/interaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/interaction.js b/src/webgl/interaction.js index e5dc1928ae..828fdd32a2 100644 --- a/src/webgl/interaction.js +++ b/src/webgl/interaction.js @@ -229,7 +229,7 @@ p5.prototype.orbitControl = function( deltaPhi = sensitivityY * this.movedY / scaleFactor; } else if (this.mouseButton === this.RIGHT) { moveDeltaX = this.movedX; - moveDeltaY = (this.movedY * (cam.yScale)); + moveDeltaY = this.movedY * cam.yScale; } // start rotate and move when mouse is pressed within the canvas. if (pointersInCanvas) this._renderer.executeRotateAndMove = true;