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.

Fullscreen Javascript-change verge3d variables values when fullscreen is activated/deactivated?

Home Forums Programming Fullscreen Javascript-change verge3d variables values when fullscreen is activated/deactivated?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #83221
    c4cc
    Customer

    I’d need smaller variable values when v3d is in small player screen, and larger variable values for fullscreen.

    Only when verge3d is loaded, and when I click a certain HTML element enabling fullscreen, the variables are changed as desired. However, when I escape fullscreen, the variables’ values do not change back to the earlier value.

    Also, when I press that fullscreen html element before v3d loads, the variable values do not increase as intended for fullscreen variable values.

    What did I do wrong here?

    Latest javascript:

    #83253
    c4cc
    Customer

    On 2nd thought, I partially solved this issue on 20.07.25 by these puzzles

    The other issue is when I activate fullscreen before the app loads, the app still uses those small screen variable values, after fullscreen has loaded. How do I get app to apply fullscreen variable values whenever fullscreen is turned on before app has loaded?

    #83264
    xeon
    Customer

    You might have success with a different approach. Instead of using your own toggle for if the app is full screen or not…you may want to actually test the size and ratio of the “container”. You can use “get prop” for the container with offset width and height and then use that data and a table you create to determine the settings you want for the app. If you put this logic into a procedure and the procedure is called each time there is a screen resize…it will work really nicely. Check out the “event on resize for element window”. Might help.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #83267
    c4cc
    Customer

    You can use “get prop” for the container with offset width and height and then use that data and a table you create to determine the settings you want for the app. If you put this logic into a procedure and the procedure is called each time there is a screen resize…it will work really nicely. Check out the “event on resize for element window”. Might help.

    Could you show me how this is done please? Thanks.

    I tried to recreate your way but failed

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