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.

Javascript puzzles run before app initialization?Detect javascript in html page with verge3d ifram?

Home Forums Puzzles Javascript puzzles run before app initialization?Detect javascript in html page with verge3d ifram?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #84478
    c4cc
    Customer

    I mean these puzzles: exec script, call external function, javascript object

    My original question asking how to detect user input during app initialization.

    This is to change puzzle variable values depending on fullscreen being activated or deactivated during scene loading, so when the screen is finally full or window sized after being loaded, the puzzles’ variable values are set accordingly.

    Edit:
    SOLVED: fullscreen error is solved in this post and the last. Fullscreen puzzle variables values’ now can be updated when fullscreen and reset to default values when smallscreen

    :good:

    • This topic was modified 1 month, 1 week ago by c4cc.

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #84480
    QiangGe
    Participant

    Is this the mini case the effect you want? You can follow the internal source code and it’s not difficult if you know JavaScript. If you need a puzzle plugin, developers can customize it
    FullScreenChangeValue

    #84484
    c4cc
    Customer

    Thanks, but it’s about changing those variable stats when the fullscreen element is clicked on BEFORE/DURING the app initialization.

    Example: Here, when you click fullscreen html element under this game’s iframe, including before/during the game is initially loading, the game’s movement speed/acceleration stats are scaled up accordingly to the fullscreen/small screen.

    • This reply was modified 1 month, 3 weeks ago by c4cc.
    • This reply was modified 1 month, 3 weeks ago by c4cc.

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #84490
    QiangGe
    Participant

    Thanks, but it’s about changing those variable stats when the fullscreen element is clicked on BEFORE/DURING the app initialization.

    In this case, it’s more accurate to say whether the app inside the iframe is ready, not whether the app has been fully initialized.
    I modified the demo to simulate a 5-second loading time. During those 5 seconds, and also after the 5 seconds, you can click the fullscreen button and send JSON data.
    As for your example, the length of the data doesn’t make any difference — it’s always the same.

    #84492
    c4cc
    Customer

    Thanks, looks like this is what I need. Now how do I get that javascript?

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #84493
    QiangGe
    Participant

    Thanks, looks like this is what I need. Now how do I get that javascript?

    In the console, you can click the link on the right to view the source code, or just right-click to download and check it.

    #84540
    c4cc
    Customer

    I modified the demo to simulate a 5-second loading time. During those 5 seconds, and also after the 5 seconds, you can click the fullscreen button and send JSON data.
    As for your example, the length of the data doesn’t make any difference — it’s always the same.

    Again, I do appreciate your time/effort building this example, which is an important foundation. That said, I have to use variables/functions/event handlers according to verge3d/blender’s code, so I’m trying to change variables in parent html containing verge3d iframe.

    javascript in parent html:

    javascript in application_js:

    Why isn’t verge3d’s puzzle variables being updated when the parent html updates those variables?

    • This reply was modified 1 month, 2 weeks ago by c4cc.
    • This reply was modified 1 month, 2 weeks ago by c4cc.

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

    #84557
    c4cc
    Customer

    I tried to change puzzle variable from html by:

    Exec Variables puzzles in Init tab:

    updating global variable HTML document parent

    Still no way to change puzzle variable via user input before app loads?

    Edit: fullscreen error is solved in this post and the last. Fullscreen puzzle variables values’ now can be updated when fullscreen and reset to default values when smallscreen

    :good:

    • This reply was modified 1 month, 1 week ago by c4cc.

    FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e

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