You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setup:
OS: Windows 11
IDE: VSCode + p5.vscode extension
(Possibly) relevant hardware: Laptop screen + 2x Dell S3221QS: one landscape, one portrait. Sketch output is on landscape monitor.
Behavior:
In Ch. 0, the code for the Perlin Noise pixel map produces an output that occasionally switches to being repeated 4x horizontally, and squished vertically to 25% of its height.
What worked for me:
Add pixelDensity(1); to setup().
The text was updated successfully, but these errors were encountered:
Could you send a screenshot, I don't have a setup where I can reproduce. I wonder if this is a p5.js or JS/canvas bug rather than an issue with the nature of code examples specifically?
Oh, sorry for not specifying, I very much think this is a bug in the software not the book's code, and that it might just be helpful to add a note about. Screenshots show before/after setting pixelDensity (been messing with the color value calculations and nosieDetail, which is why it looks nothing like the original example, but the issue is similar to the original).
Setup:
OS: Windows 11
IDE: VSCode + p5.vscode extension
(Possibly) relevant hardware: Laptop screen + 2x Dell S3221QS: one landscape, one portrait. Sketch output is on landscape monitor.
Behavior:
In Ch. 0, the code for the Perlin Noise pixel map produces an output that occasionally switches to being repeated 4x horizontally, and squished vertically to 25% of its height.
What worked for me:
Add
pixelDensity(1);
tosetup()
.The text was updated successfully, but these errors were encountered: