🍒 p5.grain.cherries (v0.7.0) #9
Pinned
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
-
After more than half a year of no p5.grain releases, I'm happy to announce the arrival of 🍒 p5.grain.cherries (v0.7.0)!
This release, introduces support for instance mode and brings several other improvements and changes. Let's dive into the details.
Instance Mode
Instance mode, initiated by @campionfellin in PR #6 and adapted in #7, allows you to use p5.grain with p5 instances. Here's a simple example of configuring p5.grain to work on a specific instance:
loopPixels()
In contrast to the
tinkerPixels
function, no pixel manipulations are performed withloopPixels
. In other wordsloopPixels
has the same effect as usingtinkerPixels
in read-only mode. Here's a comparison of the two functions with the same result:With
tinkerPixels
:With
loopPixels
:Improved Errors Readability
Improving readability by not logging the "Uncaught (in promise) Error" prefix anymore when validating arguments.
Before:
Uncaught (in promise) Error: [p5.grain] The amount argument passed to applyMonochromaticGrain() must be of type number.
After:
[p5.grain] The amount argument passed to applyMonochromaticGrain() must be of type number.
New Function Names
To improve clarity and consistency, the functions
granulateSimple
andgranulateChannels
have been renamed toapplyMonochromaticGrain
andapplyChromaticGrain
respectively. The new names align with other design tools (e.g. Photoshop), which have a "monochromatic" option when adding noise.Deprecated function names:
New function names:
Note: The deprecated function names are still supported in
v0.7.0
but will most likely be removed in future releases.File Naming Convention
For better naming conventions,
p5.grain.core.js
has been renamed top5.grain.min.js
– serving as the new "core" version without error and warning handling. The unminified version,p5.grain.js
, is recommended for development only, while the minified version,p5.grain.min.js
should be used for final sketches, if you've made sure that p5.grain-related errors or warnings cannot occur.Have fun creating and enjoy 🍒!
This discussion was created from the release v0.7.0.
Beta Was this translation helpful? Give feedback.
All reactions