Back to the Shapespark home page

Hiding Object from html

I’m looking to hide a nested model completely from from the body-end.html file.
I am able to do this through changing the material on the object but I was wondering if there is a possibility to hide an object on the highest level (the AssimpFBX$_Translation)?

Because this way a few elements could be grouped and hidden together.

This part of the API isn’t yet official, but you achieve this with:

for (const node of viewer.findNodesOfType('<OBJECT TYPE NAME>')) {
  node.hide();  //;

The nodes intended to be dynamically hidden/shown must be marked as editable using the Viewer.setNodeTypeEditable('<OBJECT TYPE NAME>') function before the scene is loaded.