So, you know how changing the height of the canvas will scale in the content (scale the camera?) and keep the object in the vertical bounds, however this isn’t the case when you change the width of the canvas. Eventually you’ll be able to crop the scene. I get that this is natural, what I’m trying to do is create a canvas that will always keep the object within the bounds. This is what I mean
I’m not really asking how to do it, but probably more so if anyone has any ideas on how to approach this?
Things I can think of
-
A function that will draw the camera back at a ratio to the width of the canvas, tricky when taking into account the current height of the canvas too
-
Having an array of ‘responsive breakpoints’ for the camera distance, again tricky with the height of the canvas changing this
-
Ummm, maybe keeping the canvas height exactly proportional to the fluid width? So the camera and canvas has a fixed aspect ratio
Does that make sense?