I’m importing a library of FBX into divs and I would like to save the mesh loaded from the first one to be reused with the next imported files.
I’m not sure how to do that and I’m trying it using object.traverse. If the child isMesh I can store it and then apply it to the next one.
But it seems to not working:
loaderF.load(url, function (object) {
....
object.traverse(function (child) {
if (child.isMesh) {
child.castShadow = true;
child.receiveShadow = true;
if (!them.model) them.model = child;
child = them.model;
}
});
....
}
Any suggestions? Thanks for your time!