Options used to create a GPUCurtains.

interface GPUCurtainsOptions {
    camera?: CameraBasePerspectiveOptions;
    lights?: false | GPUCameraRendererLightParams;
    production?: boolean;
    adapterOptions?: GPURequestAdapterOptions;
    autoRender?: boolean;
    label?: string;
    container: string | HTMLElement;
    pixelRatio?: number;
    context?: GPURendererContextParams;
    renderPass?: {
        useDepth: boolean;
        sampleCount: number;
        clearValue: GPUColor;
    };
    autoResize?: boolean;
    watchScroll?: boolean;
}

Hierarchy (View Summary)

Properties

An object defining camera perspective parameters

An object defining the maximum number of light to use when creating the GPUCameraRenderer. Can be set to false to avoid creating lights and shadows buffers, but note this is a permanent choice and cannot be changed later.

production?: boolean

Flag indicating whether we're running the production mode or not. If not, useful warnings could be logged to the console.

adapterOptions?: GPURequestAdapterOptions

Additional options to use when requesting an adapter.

autoRender?: boolean

Whether the GPUDeviceManager should create its own requestAnimationFrame loop to render or not.

label?: string

Optional label of this GPURenderer

container: string | HTMLElement

HTMLElement or selector used as a container for our canvas. Could also be directly a canvas element.

pixelRatio?: number

Pixel ratio to use for rendering

Options used to configure this GPURenderer context. If not specified, format will be set with GPU.getPreferredCanvasFormat() and alphaMode with premultiplied.

renderPass?: { useDepth: boolean; sampleCount: number; clearValue: GPUColor }

The renderer RenderPass parameters

Type declaration

autoResize?: boolean

Whether the renderers created by this GPUCurtains instance should handle resizing by themselves or not.

watchScroll?: boolean

Whether this GPUCurtains instance should listen to scroll event or not.