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

Switch camera keep transform #7067

Merged
merged 36 commits into from
May 25, 2024

Conversation

davepagurek
Copy link
Contributor

Resolves #7056 (but don't merge this until after #6761 is merged!)

Changes

This branches off of #6761, which is ready to merge, but will be merged after our final docs release today so that we have time to beta test more thoroughly before doing a release. In the mean time, the actual diff can be seen here: deveshidwivedi/p5.js@model-view...davepagurek:p5.js:switch-camera-keep-transform

But to summarize:

  • setCamera updates the view matrix in addition to the projection matrix
  • camera() no longer resets the model matrix, just the view matrix

Now, a resetMatrix() is no longer required after using setCamera in a framebuffer's begin/end: https://editor.p5js.org/davepagurek/sketches/k71F1YPDp

PR Checklist

  • npm run lint passes
  • [Inline documentation] is included / updated
  • [Unit tests] are included / updated

@Qianqianye
Copy link
Contributor

Since #6761 is merged, are we ready to merge this one @davepagurek? Thanks!

@davepagurek
Copy link
Contributor Author

this is good to go now too, yep!

@Qianqianye Qianqianye merged commit a908695 into processing:main May 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should setCamera() also call resetMatrix()?
3 participants