vasturiano / aframe-globe-component

3D Globe data visualization component for A-Frame
https://vasturiano.github.io/aframe-globe-component/
MIT License
33 stars 11 forks source link

add gltf model to the custom layer #16

Open mohsspark829 opened 2 years ago

mohsspark829 commented 2 years ago

Hi Vasco,

Thank you for developing this nice entity, mazing tool!

I have difficulty to add a 3d model (gltf) to a custom layer, wondering if you could provide an example if this is possible. I have posted my question in stackoverflow (https://stackoverflow.com/questions/73044742/load-3d-model-in-aframe-globe-component)

Thanks, Mohsen

vasturiano commented 2 years ago

@mohsspark829 thanks for reaching out.

I concur with the answer provided on SO. You need to swap the nesting of the callback functions. GLTFLoader().load needs to be outer, and customThreeObject the inner call.

mohsspark829 commented 2 years ago

Thanks Vasco so much for getting back to me. I have tried to swap these two but still no success with my limited knowledge of Threejs . I updated my question in SO, and still working on it, along with studying Threejs. But if you have some moments to spare it would be great to have your advise as well, of course at your convenience:)