How to hide the roof/ceiling in top view?

I’m attempting to use Java Script to hide the ceiling/roof only when the view is panned to the “Top View” but my code does not seem to trigger anything upon that request. Not to familiar with code and using ChatGPT to aid but I think a combination of that and not understanding how to upload that into Shapespark is where I’m going wrong. I’m placing my code into the “Script” extension but nothing seems to happen.

Typically to achieve this you can use the hide in views property of the objects. You don’t need the JavaScript for this. You only need to go the the Objects tab and select the ceiling that’s blocking the view and then enable Custom hide in views and select the view for which it should be disabled.

You can also use custom JS code for this, you’d have to build your own logic around this and hide and show the nodes that represent the ceiling/roof. Take a look at GitHub - shapespark/shapespark-viewer-api: JavaScript API for interacting with the Shapespark 3D scene.
and
How To hide certain object in the scene - #8 by apex-studio

I hope this helps!

1 Like

Thank you! This helped tremendously with my efforts.