xeolabs / xeogl

A WebGL-based 3D engine for technical visualization. Not actively maintained.
http://xeogl.org
Other
1.15k stars 264 forks source link

Annotations not working correctly with gltf files #267

Closed stefHin closed 5 years ago

stefHin commented 6 years ago

Describe the bug I tried to rewrite your annotations_tronTank example so that an gltf file is loaded instead of an scenejs file. The model itself loaded correctly and for the annotations I used model.meshes[..] for the mesh parameter (as described in your documentation). But the viewer seems to always put all annotations to the same spot, no matter which index I use for the model.meshes parameter, and it does not react to changing the primIndex or the bary parameter either.

To Reproduce Steps to reproduce the behavior: Simply try to use a gltf model in the tron tank example.

Screenshots http://prntscr.com/kkq37e http://prntscr.com/kkq3on

Desktop (please complete the following information): using firefox 62.0b17 on a windows 10 pc

stefHin commented 6 years ago

update: I found out that model.meshes[..] was undefined. Somehow an index with an _ is required to access a mesh. All the ids of model.meshes seem to be something like _361, so when using mesh: model.meshes["361"] as parameter it works. I also tested one of your test models (hoverbike in this case), seems to be the same, also ids with as prefix.