Interface DeckGlContextLossRecoveryOptionsExperimental

interface DeckGlContextLossRecoveryOptions {
    onLost?: ((event: Event) => void);
    onRestored?: ((event: Event) => void);
}

Properties

Properties

onLost?: ((event: Event) => void)

Called after the browser's webglcontextlost event fires and this binding has already called event.preventDefault() (required by the WebGL spec for the context to become restorable at all). The GPU device and every layer's GPU resources are gone at this point; a host typically stops issuing new render calls here.

onRestored?: ((event: Event) => void)

Called after the browser's webglcontextrestored event fires. The canvas has a new, empty WebGL context; deck.gl/luma.gl do not automatically recreate the Deck instance or re-mount layers. A host typically disposes the old adapter/projection/mount, creates a new Deck bound to this canvas, and re-projects + re-mounts from its own retained source data (the SDK never retains a copy on the host's behalf).