I've loaded a .dae
model, which I would like to use more times in my scene. This code works with meshes, but the collada.scene
object isn't a mesh:
var mesh2 = new THREE.Mesh( loadedMesh.geometry, loadedMesh.material );
How is it possible, to share the same collada model between some objects?
The dae scene is not a mesh, but there's certainly a mesh in it. You should console.log the collada object, or put a breakpoint in the
load
function, and inspect where is the mesh you want.Given a mesh located in
collada.scene.children[0]
In the
load
function, store the mesh somewhere, saywindow.referenceModel
Later, when you want to clone this model