I’m currently using (and I’m new here) this library to create 3d objects, but unfortunately I cannot fit the object inside the canvas. It’s always overflowing outside the canvas if the object is a bit long.
Change the camera position, e.g.
camera.position.z = 1.2 * boxWidth;
camera.lookAt( , , );
@hofk I tried, but I got the same result. Please see my update above.
Here are some functions to fit objects within a view using a few lines of trigonometry math: