👀 p5.grain.readonly (v0.6.0) #5
meezwhite
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This (small) version release adds the
shouldUpdate
argument totinkerPixels
to make it possible to loop through pixels in read-only mode whereupdatePixels()
is skipped.Read-only mode example
In the following example, we loop through the pixels of the main canvas and determine the min, max average pixel values. Since pixel-manipulation is not necessary for this, we pass
false
to theshouldUpdate
argument, which will internally skipupdatePixels()
.Low impact breaking change
Unless you are explicitly using the alternative syntax for graphics buffers
tinkerPixels(callback, pg)
instead ofpg.tinkerPixels(callback)
, you don't need to worry about breaking changes.Old (alternative) syntax for graphics buffers:
New (alternative) syntax for graphics buffers:
However, we recommend using the common syntax for graphics buffers if possible:
Roadmap
You can check out the rough Roadmap here and you're welcome to collaborate on p5.grain. 🫶
Have fun creating! ✨
This update enabled further implementation of custom pixel-manipulation functions, where read-only looping through pixels is needed.
Have fun looping through your pixels with
tinkerPixels
in read-only mode!This discussion was created from the release v0.6.0.
Beta Was this translation helpful? Give feedback.
All reactions