My question involves an Object with 2 parameters - Obj3D and Name, and I am trying to load the object by its name:
function load3DObjectByName(obj, loader)
{
loader.load(
"resources/3D/meshes.dae",
function(collada) {
obj.Obj = collada.scene.getChildByName(obj.Name, true);
window.alert(obj.Obj["name"]); // obj.Obj is not undefined
}
);
window.alert(obj.Obj["name"]); // obj.Obj is undefined
}
Unfortunately, even after loading, obj.Obj remains undefined... where the loader used is ColladaLoader.