Parameters used to configure the renderer canvas context.

interface GPURendererContextParams {
    format?: GPUTextureFormat;
    viewFormats?: Iterable<GPUTextureFormat>;
    colorSpace?: PredefinedColorSpace;
    toneMapping?: GPUCanvasToneMapping;
    alphaMode?: GPUCanvasAlphaMode;
}

Hierarchy

Properties

format?: GPUTextureFormat

The format that textures returned by GPUCanvasContext#getCurrentTexture will have. Must be one of the Supported context formats.

viewFormats?: Iterable<GPUTextureFormat>

The formats that views created from textures returned by GPUCanvasContext#getCurrentTexture may use.

colorSpace?: PredefinedColorSpace

The color space that values written into textures returned by GPUCanvasContext#getCurrentTexture should be displayed with.

toneMapping?: GPUCanvasToneMapping

The tone mapping determines how the content of textures returned by GPUCanvasContext#getCurrentTexture are to be displayed.

alphaMode?: GPUCanvasAlphaMode

Determines the effect that alpha values will have on the content of textures returned by GPUCanvasContext#getCurrentTexture when read, displayed, or used as an image source.