Hide group of objects


Hi everyone,

i have a problem with hide/show objects from api.

My goal is to create a panel where i can hide parts of the ship with buttons.

I attached an example

I can’t find the way to hide the “piano group” just as seen in the example in you click on piano1 or piano 2 etc…

i saw that is possible to pick object from id, but in this case it would be better to put variable “piano1” and hide from api, but like this can’t work

Thanks :slight_smile:

  • At load you request the list of node and get the id of the group node from the getSceneGraph api call, looks for piano1 group and get the instanceID value
  • on button click you show/hide the group using the api calls show/hide with that ID

Here I forled that sample Viewer API - Examples - Sketchfab
and it gives
sketchfab viewer api sample - JSFiddle - Code Playground

1 Like

Thank you so much for yout help Paul!!

1 Like