Situation: I'm building a complex 3d object (for example, a house) with three.js. Next, I recognize the clicks on a certain part of the object (floor or window) and perform certain actions. All this is displayed on the web page. The problem is that if I want to design a new model (for another house), I need to rewrite the entire code for its construction.
So the question is: is there an environment or library or any other way of quick building an object with the ability to get the source code of the object to continue working on it? This would greatly simplify the work in the future. There may be suggestions for another approach to solving the problem. The solution should be web-based for access from various devices.
P.S. For a more global description of the work, in the future I want to use two way binding for model and connect it to controller(like raspberry).