Hi,I have a requirement where the camera should face at the face of the warehouse on the initial load of the page. But the issue is the warehouse structure can vary in structure Below is the attached images of three different projects This is a warehouse structure
I’m expected to display a zoomed version of this
i cannot hardcore the camera positions as the structure can vary for other projects. example
I was trying to adjust by using
camera.position.x = -warehouse.geometry.parameters.depth/2;
camera.position.y = 3;
camera.position.z = warehouse.geometry.parameters.width;
Can someone guide me how to resolve this issue. Thanks for your time
Have you tried to compute the AABB of your warehouse and then use it to configure the camera? This approach is often used by viewers, e.g.:
object variable in line 266 would represent your warehouse mesh.
I tried using this method,but I’m getting the below error
I googled this but didnt get anything helpful
Do you have any idea abt this
Well, you probably have to add the
THREE namespace. So
Ahh ,I went through the error so many times.yet could not spot this.