I am trying to find a solution for calculating minimum and maximum distance for clipping Planes for a given mesh (which is something user is going to upload in GLTF/STL format)
Basic Playground is here given below, can someone help me in dynamically calculating the clipPlanes min and max distances.
If your clipping planes are axis-aligned like you have in the PG, you probably can use mesh.getBoundingInfo() to get the min and max values from the mesh.
I tried doing that but it doesn’t work, I mean I was using getBoundingInfo().boundingBox.minimum and getBoundingInfo().boundingBox.maximum to decide the minimum and maximum range for the clip but it isn’t working properly.
Here is playground for your reference, feel free to modify it. let me know if you have any solution for this,