Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved the issue with Pan y-axis inverted in frameBuffer. #6545

Merged
merged 4 commits into from
Nov 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/webgl/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for accessing the projection matrix rather than using cam.yScale?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, i just confused with the y-scale. now i have done the changes. it's working fine as you told

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess both have the same sign?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I think the yScale value is used in creating the projection matrices. In the end I think they should be equivalent, but it's maybe just more readable to see a value like yScale than an index into a matrix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, Got it now. Thanks

}
// start rotate and move when mouse is pressed within the canvas.
if (pointersInCanvas) this._renderer.executeRotateAndMove = true;
Expand Down
Loading