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.

jortijn

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Set material from project.js #31751
    jortijn
    Participant

    Hi Yuri,

    Thank you! you pointed me in the right direction it works great now!

    for others(hope this is allowed)
    app.ExternalInterface.parse_selections = function (selections) {
    var colorInputValue = ( selections[‘COLOR’] != undefined ) ? selections[‘COLOR’] : ‘CHROME’ ;
    v3d.puzzles.procedures.cubeColor(colorInputValue);
    };

    and for the puzzle see the image attached.

    Kind regards,

    Jortijn

    in reply to: Set material from project.js #31746
    jortijn
    Participant

    Hi Yuri,

    Thank you for your quick reply.

    As I get a JSON back from our application with an input value

    How do I pass this back to puzzle?

    my current function

    app.ExternalInterface.parse_selections = function (selections) {
    var colorInputValue = ( selections[‘COLOR’] != undefined ) ? selections[‘COLOR’] : ‘CHROME’ ;
    console.log(“colorInputValue” + colorInputValue);
    };

    The color selection is right as I can see it in my logger I am not sure how I can get puzzle to trigger when parse_selections function is called and to pickup the JSON in the dictionary?

    I probably should add we had something like “when called from JS as” but I can’t find that in puzzle(See attachment).

    Many thanks,

    Jortijn

Viewing 2 posts - 1 through 2 (of 2 total)