Interface GPUCanvasContext

    interface GPUCanvasContext {
        __brand: "GPUCanvasContext";
        canvas: HTMLCanvasElement | OffscreenCanvas;
        configure(configuration: GPUCanvasConfiguration): undefined;
        getCurrentTexture(): GPUTexture;
        unconfigure(): undefined;
    }

    Properties

    __brand: "GPUCanvasContext"

    The canvas this context was created from.

    Methods

    • Configures the context for this canvas. This clears the drawing buffer to transparent black (in [$Replace the drawing buffer$]).

      Parameters

      Returns undefined

    • Removes the context configuration. Destroys any textures produced while configured.

      Returns undefined