Thank you, I will watch it but I don’t want to work with react there are too many layers already… I know is easier but I prefer to have as much control as I want over my work and react has its own bugs and issues…
If parts have the same shape - just swap materials (see 1:11)
If parts have different shape - use invisible “socket” meshes, to define positioning, and then add / remove children meshes from these sockets to use different model depending on the configuration (see how unreal does it for an example.)
in my opinion vanilla three is OK for simple viewers. a configurator is a state machine. once you attempt to solve that with mutation and querying , it will cause complexity.
i know you just want an answer, but it isn’t simple. android and the web were the last platforms using layout inflation (mutation + query), and they have stopped. it is alive in threejs, but for no good reason.
a framework merely establishes clean dataflow: state → view, the view on the screen is the outcome of state, if state changes, so must the view. here’s one example:
the full code is 77 LOC. this would be 1000-2000 lines in vanilla, madly complex code where everything is tied to everything else.
Regardless of using a framework or not — you would also need to create a model that is ready for configuration. I’d guess that most people do in tools like Blender, creating a model with different compatible parts, un-colored textures (so that material.color chosen in UI can multiply with the textures), and strict naming conventions for each part. Then it’s easy to swap things out, however you want to build your web app.