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.

Puzzle JS Function Doesn’t Recognize JS Function in VueJS

Home Forums General Questions Puzzle JS Function Doesn’t Recognize JS Function in VueJS

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #32007
    yasse
    Customer

    Hello Dear Vergers :)

    Hope you doing good and safe.

    Please I’m facing the issue that Javascript is not recognized on the puzzle using Vue.JS even when it’s put in the specific area for the external app,

    is there any way how to fix this, please?

    #32011
    yasse
    Customer

    it’s ok, i figured it out, the mistake i have done, is placing the html folder, and the app.js within the folder holding 3D,
    which shouldn’t thoses files need to be placed in folder called SRC.

    #32012

    glad you worked it out! :good:

    Chief 3D Verger | LinkedIn | Twitter

    #32016
    yasse
    Customer

    Oh sorry not yet. the behavious is a bit messy.

    it’s not recognized again Yuri ? doesn’t JS function recognized on verge puzle ?

    thank you

    #32017
    yasse
    Customer

    So my question please :) what’s the best way to call javascript function in VueJS. so it appear in puzzle editor ?

    #32025

    Hi,

    this function should be added to app.ExternalInterface before the puzzles-generated script is loaded (visual_logic.js). This should make it work.

    Chief 3D Verger | LinkedIn | Twitter

    #32088
    origgin
    Participant

    I created a variable called v3d inside the vue data object and then ran a function which waits until the global object v3d.apps gets created and when it is there, it references the v3d app external interface to the created variable, as below:

    this.v3d = v3d.apps[0].ExternalInterface

    So, every time when you need to run a function, you just need to run this.v3d.myFunction().

    But this was the solution I found some time ago, before existing an official integration with vue.js available

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