Is there a way to access mesh information of a 3D object loaded at runtime in Aframe?
My method for loading the 3D model is as follows:
targetObj = document.createElement('a-obj-model');
targetObj.setAttribute('gltf-model', '#whatever_model');
Here is how I attempted to retrieve the mesh information:
targetObj.addEventListener('loaded', function () {
console.log(targetObj.hasLoaded);
console.log(targetObj.getObject3D('mesh'));
});
However, even though the targetObj
is loaded, the mesh information appears to be undefined
.