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 call a JSCallback ?

Home Forums Puzzles How call a JSCallback ?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1475
    brice
    Participant

    Hello,
    in Puzzles -> Events -> when called from JS as “myJSCallback”, how V3D call “myJSCallback” ?
    Thank you

    #1483
    Will Welker
    Customer

    There is an example of this in the example apps that come with Verge3D. Look for the JavaScript Callback example. This example shows two things: calling a custom function from your Puzzles and calling a Puzzles block from your JavaScript code.
    Each project has a JavaScript file named like: my_projects_name.js.
    Near the bottom of that file you will find a comment that says: //add your code here.
    So have a look at the Puzzles and the JS file in the example app.

    #1490
    brice
    Participant

    Hello Will, thank you a lot :good: , it’s exactly what i was searching for, demo apps seems to be more instructive than the documentation, I will take the time to observe them well before coming back posting into the forum ;-)

    #7755
    Yorick
    Customer

    Are there any plans to add a functionality to write the JS code inside the Puzzles editor?
    That way there is no copy/pasting necessary each time we export a Puzzle.

    #7757

    Hi Yorick,

    the Puzzles editor generates a self-contained JavaScript module which you can possibly use as-is. This module can communicate with the rest of JavaScript via ExternalInterface namespace as described https://www.soft8soft.com/docs/manual/en/introduction/Puzzles.html#call_JS_function

    Chief 3D Verger | LinkedIn | Twitter

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