I would like to know which is the most efficient way of reusing geometries and textures in ThreeJS.
Let’s say I have three files (mesh1.js, mesh2.js and mesh3.js for example), using the same PBR material (with textures) and the same geometry. Nevertheless, in each file I want to display the geometry with a different color.
I load the PBR material and the geometry file in a fourth file (loader.js) and make them globally available using window.externalMaterials and window.externalGeometry.
Which is the most efficient way of using these geometries/textures in order to avoid unnecesary copies while displaying meshes with different colors/maps? Does cloning save resources vs reloading the model in each file?
Thanks in advance!!