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 to listen to events from Verge to javascript and send inputs to it

Home Forums Programming How to listen to events from Verge to javascript and send inputs to it

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #40878

    We are looking for a way to send some data to v3d app using javascript and to listen for events:

    So a practical example could be that we have a 3d, and when we send data to it it does some action like focus on some element inside 3d.
    Similar, when something is clicked inside 3d we want to get that in javascript.

    Is this possible and how to do it, I can share some code details what we do.

    Pseudo = we load visual_logic.js file and then we init scene, but haven’t found any docs how to pass data and to listen for some events.

    If anyone knows something or some example it would be nice to hear from you.

    Best, Miroslav

    #40882
    GLiFTeK
    Customer

    Hi,
    To send data to js from events, in your events puzzle put an “exec script”

    Follow instructions in that link to pass puzzle vars to your js vars…

    In js, to call puzzle procedures in Verge use:

    `
    v3d.puzzles.procedures.proc_name(arg1,arg2);
    `

    (Thanks to CyberFox for that snippet of code)
    :good:

    #40917

    Awesome,

    We used call external js function and puzzles procedures.

    Thanks

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