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.

Calling built in functions in Visual Logic

Home Forums Programming Calling built in functions in Visual Logic

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #70138
    maherbert604
    Participant

    I see there is this function in visual_logic.js

    // updateTextObject puzzle

    function updateTextObj(objSelector, text) {
        var objNames = retrieveObjectNames(objSelector);
    
        for (var i = 0; i < objNames.length; i++) {
            var objName = objNames;
            if (!objName) continue;
            var obj = getObjectByName(objName);
            if (!obj || !obj.geometry || !obj.geometry.cloneWithText)
                continue;
            obj.geometry = obj.geometry.cloneWithText(String(text));
        }
    }

    Is there a way I can call this function in an external function in my main.js file?

    `updateLeaderboardRanks = () => {
    if(progress){
    // Progress for teams comes sorted from the websocket
    const score = progress[0].score
    v3d.puzzles.updateTextObj(“LDRB_RANK_SCORE_01”, score)
    }
    }`

    • This topic was modified 9 months, 2 weeks ago by maherbert604.
    • This topic was modified 9 months, 2 weeks ago by maherbert604.
    • This topic was modified 9 months, 2 weeks ago by maherbert604.
    #70442

    Hi maherbert604,

    Those functions are not exported at the moment. Perhaps you could copy the code and use it elsewhere. You can also create a plugin.

    Chief 3D Verger | LinkedIn | Twitter

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