I want to clone a model loaded with loader, I found this issue on github,but the solution doesn't work. It seems there has been an structural change in Object3D.
How can I clone an Object3D in current stable version of Three.js?
I want to clone a model loaded with loader, I found this issue on github,but the solution doesn't work. It seems there has been an structural change in Object3D.
How can I clone an Object3D in current stable version of Three.js?
Actually mrdoob's answer is your answer...
The loader output a geometry you use to create a mesh. You need to create a new mesh with the loader-created mesh's geometry and material.
You want to clone a Mesh and not an Object3D because the output of the loader is a Mesh.
In this new version of three.js you have a method
clone
.For example, I use a queen from chess and I had to duplicate multiple times:
It will work with any mesh.
I used three.js r61.