Documentation
    Preparing search index...

    Interface RendererEventMap

    Events a renderer emits (§61, §6b).

    Both payloads carry the renderer itself, because one application may run several (a main view plus an off-screen pass) and a shared listener has to be able to tell which one lost its context.

    interface RendererEventMap {
        contextlost: { renderer: Renderer };
        contextrestored: { renderer: Renderer };
    }
    Index
    contextlost: { renderer: Renderer }

    The backing GPU context or device was lost (§61).

    Emitted after the renderer has marked itself lost, so a listener observing the renderer sees the lost state. Not an error: nothing is thrown, no FourError is raised, and the application keeps running.

    contextrestored: { renderer: Renderer }

    The context or device was restored and engine-owned GPU resources have been re-created (§61).

    Emitted after re-creation, so the first render a listener triggers in response already draws normally.