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.

API to access attributes

Home Forums Programming API to access attributes

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3499
    baohua
    Participant

    Is there any API to return some object’s visibility?
    Is there any API to get some object’s attributes?

    #3502

    Yes. Here is an example to be placed inside the runCode() function of an app JS file:

    
    app.scene.traverse(function(obj) {',
        if (obj.name == "My Object")
            obj.visible = false;
    });
    

    For other properties see the reference.

    Chief 3D Verger | LinkedIn | Twitter

    #3714
    baohua
    Participant

    Thanks a lot.
    If this can be done in puzzles it will be great.

    #3717

    Some properties can be modified with Puzzles as well. For example, visibility can be affected using the show and hide puzzles.

    Chief 3D Verger | LinkedIn | Twitter

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