Hey guys,
I am working in P5.js to create an interactive website where, when the mouse is moved along the x-axis, a box responsively scales with it. This works on my screen as I have created it to fit my browser on fullscreen. However, depending on different screen sizes, the boxes don't scale correctly. When the browser window is small, I want the box to retain the same scale relative to the window. I am thinking I need to work in percentages instead of pixels but I'm wondering is there a better way to go about this?
Thanks for any help, and I can attach the code if need be (I don't have access to it right at this moment).
Thanks!