How can I split a glb model into all parts in React Three Fiber

I am searching for a way to implement the same functionality as autodesk forge provides to split a 3d model into all available parts and zoom into them. Example is here: Forge | RCDB


This kind of decompose effect will only work if all individual parts of the model are separate 3D objects. You have to ensure this in a 3D modeling tool like Blender.

The actual translation in your three.js app can be done in various ways. One obvious approach is to compute the center of the model with a bounding box and then determine for each model part the direction vector from the origin to its position in world space. You can then apply an offset along this vector depending on the slider’s current value.

Hi @Mugen87, Could you share and example abou it using threejs? Thanks.

1 Like

there’s an easy way to do model explode where you slide along the calculated direction from 000 towards the parts origin, which i think what @Mugen87 said. a CAD system, like autodesk above, is a little bit more complicated as parts will slide out according to their coordinate systems and constraints. there’s also a super simple way to make it in blender and then you can run it as a keyframe animation, lots of tutorials for that as well How to Create an EXPLODED VIEW ANIMATION in Blender! - YouTube