findNodesOfType

Hi, currently findNodesOfType only functions on a single mesh or 3d object. How about selecting a group of mesh or 3d objects to be possible? I have a UI button to hide a group of mesh but not possible using findNodesOfType.

Thanks

How is your 3D scene structured? Are all the objects to hide within the same grouping object? Assuming the group parent object type is named GroupToHide the following code snippet will hide all instances of the group:

  for (const node of viewer.findNodesOfType('GroupToHide')) {
    node.hide();  
  }
  viewer.requestFrame();
1 Like

thanks @wojtek its working now

1 Like