jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
936 stars 185 forks source link

Running a three obj method on an indexed geometry causes the index attribute to disappear #294

Open sirbardo opened 4 years ago

sirbardo commented 4 years ago

Here is a screenshot demonstrating a minimum reproducible bit of code that causes the problem:

image

I would like to add that the three obj method does work, but only once: the first time it's run it does effectively set the draw range, but since it "kills" the index attribute it can not be run more than once.

MORE INFO:

the index is being lost in the three.js function "syncToModel", because for some reason it thinks it's an "attribute generated by three", or something like that. I will report back with more info / a pull request if I can fix this.