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.

Call a procedure from external JS

Home Forums Programming Call a procedure from external JS

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #40750
    raphroberts
    Participant

    Hello everyone!

    This is my first post, hopefully in the best place :)

    I have been exploring the Verge3D trial, and scoured the docs/forums but I cannot seem to find up-to-date information on calling a procedure from an external file.

    I can see how to trigger a procedure from within the puzzles interface, but I would prefer to have the code that calls the procedure located within my custom menu (built with tumult hype).

    So, if I have a procedure called “hidestuff” that hides some 3d objects, is it possible to call this procedure (given the “when called from JS as” puzzle is now deprecated), without having to add event listeners within the verge3D puzzle interface?

    Any help would be greatly appreciated!

    Warm regards,
    Raph.

    • This topic was modified 1 month, 2 weeks ago by raphroberts.
    #40803

    Hi,

    To exec Puzzles procedures use the v3d.puzzles.procedures namespace:

    v3d.puzzles.procedures['myProcedure']();

    Indeed, it’s not in the Manual yet, going to fix it soon!

    Co-founder and CTO at Soft8Soft
    FB | Twitter | VK

    #40828
    raphroberts
    Participant

    Wonderful! Thank you this is great :)

    #40853

    :good:

    Co-founder and CTO at Soft8Soft
    FB | Twitter | VK

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