Interface WebGLRendererParameters

interface WebGLRendererParameters {
    canvas?: HTMLCanvasElement | OffscreenCanvas;
    context?: WebGLRenderingContext;
    precision?: string;
    alpha?: boolean;
    premultipliedAlpha?: boolean;
    antialias?: boolean;
    stencil?: boolean;
    preserveDrawingBuffer?: boolean;
    powerPreference?: string;
    depth?: boolean;
    logarithmicDepthBuffer?: boolean;
    failIfMajorPerformanceCaveat?: boolean;
}

Properties

canvas?: HTMLCanvasElement | OffscreenCanvas

A Canvas where the renderer draws its output.

context?: WebGLRenderingContext
precision?: string

shader precision. Can be "highp", "mediump" or "lowp".

alpha?: boolean

default is false.

premultipliedAlpha?: boolean

default is true.

antialias?: boolean

default is false.

stencil?: boolean

default is false.

preserveDrawingBuffer?: boolean

default is false.

powerPreference?: string

Can be "high-performance", "low-power" or "default"

depth?: boolean

default is true.

logarithmicDepthBuffer?: boolean

default is false.

failIfMajorPerformanceCaveat?: boolean

default is false.