API reference
Preparing search index…

preloadResources

  • Prepare resources with Native workers and the selected file provider, then commit texture uploads and font registration on the owning runtime thread.

    Parameters

    resources

    Texture paths and explicit font descriptors.

    options

    Optional cancellation and texture renderer.

    Returns

    Promise<void>

    A promise resolved after every requested resource is committed.

    Error for invalid arguments or unavailable runtime/renderer.

    Custom FileInterface callbacks supply byte snapshots on the owning thread; Native image decoding still runs on workers. Filesystem providers perform reads and decoding on workers. Initialise first. Concurrent identical resources share preparation and commit. Failure rejects; resources committed earlier remain available. Abort, matching resource release and shutdown prevent pending commits. Font bytes remain Native-owned until shutdown. Font atlases are generated during text layout; update/render before showing the window to warm them.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0