processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.08k stars 3.22k forks source link

Switch camera keep transform #7067

Closed davepagurek closed 1 month ago

davepagurek commented 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!)

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:

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

Qianqianye commented 1 month ago

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

davepagurek commented 1 month ago

this is good to go now too, yep!