We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Delete an object

Home Forums Puzzles Delete an object

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7659
    Atomfreak
    Customer

    Hi
    I have not found a topic about this topic so I ask the question.
    What is the best way to delete an object in our scene? I speak here when we are in the app.
    Basically I create a DELETE button and the selected object disappears from my scene. I can do it with the HIDE function but is it the best way for performance?
    Because if I created 8-10 objects in my scene and I hide 4 of them. Are they still calculated on the screen even if they are hidden?
    Thanks

    #7663

    Hi,

    Yes, hiding objects instead of deleting them from a scenegraph is a non-invasive method with a very little overhead. So I think this is the way to go.

    Chief 3D Verger | LinkedIn | Twitter

    #7665
    Atomfreak
    Customer

    Thanks again!
    But just out of curiosity, is there a delete function?

    #7666

    Yep, but it is only exposed as JavaScript API:

    app.scene.remove(myObject);

    Chief 3D Verger | LinkedIn | Twitter

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.