Documentation / @ripl/webgpu / WebGPUContextOptions
Interface: WebGPUContextOptions ​
Defined in: webgpu/src/context.ts:50
Options for constructing a WebGPU 3D context.
Extends ​
Properties ​
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
ambientIntensity? | number | Intensity of the default rig's ambient light. Defaults to 0.3. | Context3DOptions.ambientIntensity | 3d/src/core/context.ts:168 |
clearColor? | [number, number, number, number] | Straight (non-premultiplied) RGBA clear color, 0–1 per channel, applied at the start of each frame. Defaults to transparent. The surface is configured alphaMode: 'premultiplied', so the channels are multiplied by the alpha on the way in. | - | webgpu/src/context.ts:58 |
dragThreshold? | number | Minimum pointer movement, in pixels, before a drag gesture is recognized. | Context3DOptions.dragThreshold | core/src/context/types.ts:154 |
far? | number | The distance to the far clipping plane. Defaults to 1000. | Context3DOptions.far | 3d/src/core/context.ts:155 |
fog? | Fog | Atmospheric haze blending distant geometry towards a colour. Omit for none. | Context3DOptions.fog | 3d/src/core/context.ts:170 |
fov? | number | The vertical field of view in degrees. Defaults to 60. | Context3DOptions.fov | 3d/src/core/context.ts:151 |
interactive? | boolean | Whether the context listens for and emits pointer and drag events. | Context3DOptions.interactive | core/src/context/types.ts:152 |
lightDirection? | Vector3 | The directional light vector used for shading. Defaults to a top-left-front direction. | Context3DOptions.lightDirection | 3d/src/core/context.ts:157 |
lightMode? | LightMode | Whether the light is fixed in world space or follows the camera. Defaults to 'world'. | Context3DOptions.lightMode | 3d/src/core/context.ts:159 |
lights? | Light[] | The lights illuminating the scene, replacing the default ambient-plus-directional rig. Supplying this detaches Context3D.lightDirection and Context3D.lightMode, which exist to drive that default rig. | Context3DOptions.lights | 3d/src/core/context.ts:166 |
meta? | Context3DMeta | Arbitrary metadata attached to the context. | Context3DOptions.meta | core/src/context/types.ts:156 |
near? | number | The distance to the near clipping plane. Defaults to 0.1. | Context3DOptions.near | 3d/src/core/context.ts:153 |
sampleCount? | number | MSAA sample count for the render pipeline. Defaults to 4. | - | webgpu/src/context.ts:52 |