Optional
cameraAn object defining camera perspective parameters
Optional
lightsAn 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.
Optional
productionFlag indicating whether we're running the production mode or not. If not, useful warnings could be logged to the console.
Optional
adapterAdditional options to use when requesting an adapter.
Optional
autoWhether the GPUDeviceManager should create its own requestAnimationFrame loop to render or not.
Optional
requiredOptional required features representing additional functionalities to use when requesting a device.
Optional
requestOptional limits keys to use to force the device to use the maximum supported adapter limits.
Optional
labelOptional label of this GPURenderer.
Optional
pixelPixel ratio to use for rendering.
Optional
contextOptions used to configure this GPURenderer context. If not specified, format
will be set with GPU.getPreferredCanvasFormat()
and alphaMode
with premultiplied
.
Optional
renderThe renderer RenderPass parameters.
Optional
useDepth?: booleanWhether the renderer RenderPass should handle depth. Default to true
.
Optional
sampleCount?: numberThe renderer RenderPass sample count (i.e. whether it should use multisampled antialiasing). Default to 4
.
Optional
colorAttachments?: [Partial<ColorAttachmentParams>, ...ColorAttachmentParams[]]Array of one or multiple ColorAttachmentParams. Useful to set a default clear value.
Optional
autoWhether the renderers created by this GPUCurtains instance should handle resizing by themselves or not.
Optional
watchWhether this GPUCurtains instance should listen to scroll event or not.
Optional
containerHTMLElement or string representing an HTMLElement selector that will hold the WebGPU HTMLCanvasElement. Could be set later if not specified.
Parameters used to create a GPUCurtains