Screen helpers · function
holdSplash
Keep the engine's badge up until until settles, as well as until the game's first frame: a game
whose first screen loads for longer than that frame — a stage, figures and their pictures on a
first visit — is seen whole rather than loading. capMs is the game's own ceiling on the
badge in place of the engine's twenty seconds, longer for a slow first visit or shorter, so a load
that never settles is still shown in the end; the longest of several holds' wins, and the minimum
hold is unchanged.
Explained in Recording and clips.
function holdSplash(until: PromiseLike<unknown>, options?:import { holdSplash } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
until | PromiseLike<unknown> | |
options? | { capMs?: number; } |
In depth
Frames run while the game loads behind the plate, since a load may need them, and are held
once it has settled, for whatever is left of the minimum, as they are after a first frame with no
hold. Returns whether there was a badge to hold: none in a packaged build, whose shell shows its
own until the first frame, nor where splash: false or ?splash=0 turned it off.