Author Topic: A HTML5/WebGL Journey  (Read 1098 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10859
  • here on my island the sea says 'hello'
    • View Profile
Re: A HTML5/WebGL Journey
« Reply #45 on: 2023-Mar-09 »
if you type "await" before a function call, it should not continue until the asynchronous task is completed.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4082
    • View Profile
    • Space Fractal
Re: A HTML5/WebGL Journey
« Reply #46 on: 2023-Mar-09 »
its was inside the JavaScript code, called directly from c++ (but wasent aware of await) and there was some confusion. And its seen its take comply of frame, so waiting is actuelly not a good idea either really.

anyway its works as intended and a another function can check it under loading, so the games can show something to you without its freezing.

Instead im just added a another function that checks when the task have been done or failed, so its wait just before when the load game progress is required (and later than normal)..... and with no a black screen.
« Last Edit: 2023-Mar-09 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.