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.

How use the function in visual_logic.js?

Home Forums Programming How use the function in visual_logic.js?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #68289
    omejar
    Participant

    Thank you for your attention, I copy the code from visual_logic.js to “exec script”

    
    function getAllObjectNames() {
        var objNameList = [];
        appInstance.scene.traverse(function(obj) {
            if (notIgnoredObj(obj))
                objNameList.push(obj.name)
        });
        return objNameList;
    }
    getAllObjectNames()
    

    Error “Uncaught (in promise) ReferenceError: appInstance is not defined” when running.

    How should I fix my code?

    #68291
    kdv
    Participant

    appInstance is not defined

    replace appInstance with app

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #68295
    omejar
    Participant

    Thank you!
    谢谢!
    ありがとうございます!
    감사합니다!
    Merci beaucoup!
    Danke sehr!

    #68298
    kdv
    Participant

    If you want to get a list of all objects in the scene you can do it this way

    or this way

    What’s the point to use scripting for that? :scratch:

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #69669
    Cory Moore
    Customer

    I created a Showroom, within it are five different screens in the same scene, if i click one screen it plays a video if i move and click the next screen it continues to play the same video regardless the five different urls for each puzzles. It seems to me are sharing the same source. Is there script to add more video elements, so they do not share the same source. Basically, I want 5 different videos playing of 5 different screens within the same scene one at a time. Thank you for your help.

    Attachments:
    You must be logged in to view attached files.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.