Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138249

Is there a way to scaling a p5js sketch, while maintaining its pixel size?

$
0
0

I'm working on a project in p5.js where I need to be able to define obscure canvas sizes that are much bigger then my browser window. I essentially need to maintain a p5js pixel size (ex. 3840px, 1920px) but have the entire canvas in view. Think of how you can zoom in and out of a canvas in photoshop, thats the functionality I'm trying to achieve.

For now, zooming in and out with the default browser functionality is Okay but not ideal and causes some other errors with arrow key presses etc. I've looked all over processing, p5 and html canvas forums and can't seem to find my exact scenario.


Viewing all articles
Browse latest Browse all 138249

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>