gpu-curtains
    Preparing search index...

    Interface GPUCurtainsParams

    Parameters used to create a GPUCurtains

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

    Hierarchy

    Index

    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.

    exposure?: number

    Exposure to use. Default to 1.

    toneMapping?: ToneMappings

    Tone mapping to use if any. Default to Khronos.

    colorSpace?: ColorSpace

    Output color space to use. Default to srgb.

    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 & { minFeatureLevel?: string }

    Additional options to use when requesting an adapter.

    Type Declaration

    • OptionalminFeatureLevel?: string

      Defines the minimum desired featured level. If set to compatibility, then the it will try to get a core adapter first, and fallback to a compatibility adapter if it fails. Whenever the adapter is successfully created, the featureLevel flag will reflect the actual feature level of the adapter. Note that it won't have any effect if featureLevel is already set to compatibility.

    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.

    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.

    hdrRendering?: boolean

    Whether to render the full pipeline to HDR, i.e. using rgba16float texture format. When set to true, a mandatory ShaderPass will be used to render the last pass to the context current format.

    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.

    container?: string | HTMLElement

    HTMLElement or string representing an HTMLElement selector that will hold the WebGPU HTMLCanvasElement. Could be set later if not specified.