Options used to create a GPUCurtains.

interface GPUCurtainsOptions {
    camera?: PerspectiveCameraBaseOptions;
    lights?: false | GPUCameraRendererLightParams;
    production?: boolean;
    adapterOptions?: GPURequestAdapterOptions;
    autoRender?: boolean;
    requiredFeatures?: GPUFeatureName[];
    requestAdapterLimits?: (keyof GPUSupportedLimits)[];
    label?: string;
    container: string | HTMLElement;
    pixelRatio?: number;
    context?: GPURendererContextParams;
    renderPass?: {
        useDepth?: boolean;
        sampleCount?: number;
        colorAttachments?: [
            Partial<ColorAttachmentParams>,
            ...ColorAttachmentParams[],
        ];
    };
    autoResize?: boolean;
    watchScroll?: boolean;
}

Hierarchy

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.

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.

requiredFeatures?: GPUFeatureName[]

Optional required features representing additional functionalities to use when requesting a device.

requestAdapterLimits?: (keyof GPUSupportedLimits)[]

Optional limits keys to use to force the device to use the maximum supported adapter limits.

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;
    colorAttachments?: [
        Partial<ColorAttachmentParams>,
        ...ColorAttachmentParams[],
    ];
}

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.