Home › Forums › Programming › Fullscreen Javascript-change verge3d variables values when fullscreen is activated/deactivated?
- This topic has 3 replies, 2 voices, and was last updated 3 months, 1 week ago by
c4cc.
-
AuthorPosts
-
2025-07-17 at 7:50 pm #83221
c4ccCustomerI’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?
FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e
2025-07-22 at 9:18 am #83253
c4ccCustomerOn 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?
FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e
2025-07-22 at 5:08 pm #83264
xeonCustomerYou 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.com2025-07-22 at 6:49 pm #83267
c4ccCustomerYou 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

FPS trialproduct 20.9.25 https://postimg.cc/gallery/LMM5vkQ/af43346e
-
AuthorPosts
- You must be logged in to reply to this topic.



