Using millimeters (mm), centimeters (cm), inches and zoom/pan with p5.js

The first thing I wanted to do when I started using p5.js was to use dimensions in millimeters. I couldn’t find anything about this topic on the internet. So, I wrote a small extension myself (use p5.js with mm, cm, inches / panning and zooming / easy exporting to png). If some of you find it usefull, i will refine/extend it further.

p5.start2d.js

2 Likes

Any specific reason you prefer to use the metric system over pixels? Printing?

I only make sketches to print. It’s easier to create them in millimeters (or cm, inches) and let the computer calculate the pixel size. It’s easier to print the sketch in different resolutions. the only change I have to make is the PPI of the sketch.

1 Like