Loading screen
Revo keeps its loading screen visible during connection and client script startup.
By default, it closes once all client modules finish evaluating, including any
top-level await. Timers and asynchronous work started without awaiting it do not
extend this wait.
Hold the loading screen
Section titled “Hold the loading screen”Use these client functions when the initial scene or interface needs more time:
| Function | Behavior |
|---|---|
deferLoadingScreen() |
Keeps the screen visible. Call during module evaluation, before starting asynchronous initialization. |
finishLoadingScreen() |
Marks the calling resource ready. The screen closes once all modules finish evaluating and all deferred resources are ready. |
failLoadingScreen(message) |
Displays a startup error and keeps the screen visible. |
While the screen is visible, game input and audio are blocked. Client scripts and WebViews continue running.
Prepare the scene
Section titled “Prepare the scene”Before calling finishLoadingScreen(), set up the camera, load the models and
collision needed at its location, and prepare the interface that should appear.
For a login screen, release loading once its interface and background are ready.
WebView’s waitForReady() confirms that the page’s JavaScript bridge is connected.
Images, application data, and the interface can still be loading. If these are
required for the initial scene, have the page send its own readiness message.
The mod controls fades and camera transitions. finishLoadingScreen() does not
spawn the player or send a readiness event to the server.
Startup failures
Section titled “Startup failures”Client startup has a 120-second timeout. If initialization fails, call
failLoadingScreen(message) with a message of 1 to 512 characters. The player sees
the error instead of an unfinished scene.
These functions return false after startup has ended. deferLoadingScreen() also
returns false after the calling module finishes evaluating. Reconnecting resets
the startup state.
To customize its appearance, see Custom loading screen.