Hi,
I want to be able to select an individual object out of 29 objects in a scene similar to this tutorial: https://support.shapediver.com/hc/en-us/articles/360023385492-Tutorial-User-interface-with-clickable-3d-objects.
I am using a web page with JavaScript and the embed ticket to access the ShapeDiver model. All of my 29 objects from my scene go into a single asset (different from the example). This is because having each object as a distinct asset (as in the example), I would have to define 29 ShapeDiverDisplayGeometry components in my Grasshopper script – one for each object – as far as I understand the example. Any change in the number of objects in the scene would require to adjust the number of ShapeDiverDisplayGeometry components in the script accordingly. Thus I prefer to have all 29 objects in a single asset.
I intend to access them individually by their index in the “content” array of the particular asset (holding 29 objects).
Now I am wondering if there is a way to determine in advance which index in the “content” array each of the objects will have in the ShapeDiver asset? I want to output additional attribute values for the selected object which are present in the Grasshopper script. Since I do not know which tree branch (index) does match which of the indices in the “content” array, I am not able to filter the data accordingly.
Maybe my approach is not correct. Any suggestions?
Thanks,
Eduard