Closed davepagurek closed 1 month ago
Resolves https://github.com/processing/p5.js/issues/7056 (but don't merge this until after https://github.com/processing/p5.js/pull/6761/ is merged!)
This branches off of https://github.com/processing/p5.js/pull/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: https://github.com/deveshidwivedi/p5.js/compare/model-view...davepagurek:p5.js:switch-camera-keep-transform
But to summarize:
setCamera
camera()
Now, a resetMatrix() is no longer required after using setCamera in a framebuffer's begin/end: https://editor.p5js.org/davepagurek/sketches/k71F1YPDp
resetMatrix()
begin
end
npm run lint
Since #6761 is merged, are we ready to merge this one @davepagurek? Thanks!
this is good to go now too, yep!
Resolves https://github.com/processing/p5.js/issues/7056 (but don't merge this until after https://github.com/processing/p5.js/pull/6761/ is merged!)
Changes
This branches off of https://github.com/processing/p5.js/pull/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: https://github.com/deveshidwivedi/p5.js/compare/model-view...davepagurek:p5.js:switch-camera-keep-transform
But to summarize:
setCamera
updates the view matrix in addition to the projection matrixcamera()
no longer resets the model matrix, just the view matrixNow, a
resetMatrix()
is no longer required after usingsetCamera
in a framebuffer'sbegin
/end
: https://editor.p5js.org/davepagurek/sketches/k71F1YPDpPR Checklist
npm run lint
passes