Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misbehaving Resolution on Wide Monitors #1007

Open
osoleve opened this issue Aug 18, 2024 · 2 comments
Open

Misbehaving Resolution on Wide Monitors #1007

osoleve opened this issue Aug 18, 2024 · 2 comments

Comments

@osoleve
Copy link

osoleve commented Aug 18, 2024

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().

@shiffman
Copy link
Member

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?

@osoleve
Copy link
Author

osoleve commented Aug 18, 2024

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).

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants