How can I switch nodeTypes via api?

I know this is possible in extension if it’s defined as "type": "SwitchObjects" . however, As I have a requirement, that I need to allow the user to select and change the nodeTypes using javascript. can this be possible?
In api doc, I only see a method Viewer.onNodeTypeClicked, but I hope there are some methods that enable me to change the nodeType like I can change the materials.

1 Like

The Switch Objects extension implements switching between two objects by hiding the first one and showing the second one. You can find the appropriate viewer API methods in this forum post: Hiding Object from html - #2 by wojtek

1 Like