| 23 | } from "./utils"; |
| 24 | |
| 25 | export interface SparkRendererOptions { |
| 26 | /** |
| 27 | * Pass in your THREE.WebGLRenderer instance so Spark can perform work |
| 28 | * outside the usual render loop. Should be created with antialias: false |
| 29 | * (default setting) as WebGL anti-aliasing doesn't improve Gaussian Splatting |
| 30 | * rendering and significantly reduces performance. |
| 31 | */ |
| 32 | renderer: THREE.WebGLRenderer; |
| 33 | /** |
| 34 | * Callback function to be called when SparkRenderer needs to re-render, |
| 35 | * for example when splat sort order or LoD updates complete. |
| 36 | */ |
| 37 | onDirty?: () => void; |
| 38 | /** |
| 39 | * Whether to use premultiplied alpha when accumulating splat RGB |
| 40 | * @default true |
| 41 | */ |
| 42 | premultipliedAlpha?: boolean; |
| 43 | /** |
| 44 | * Whether to encode Gsplat with linear RGB (for environment mapping) |
| 45 | * @default false |
| 46 | */ |
| 47 | encodeLinear?: boolean; |
| 48 | /** |
| 49 | * Pass in a THREE.Clock to synchronize time-based effects across different |
| 50 | * systems. Alternatively, you can set the property time directly. |
| 51 | * (default: new THREE.Clock) |
| 52 | */ |
| 53 | clock?: THREE.Clock; |
| 54 | /** |
| 55 | * Controls whether to check and automatically update Gsplat collection |
| 56 | * each frame render. |
| 57 | * @default true |
| 58 | */ |
| 59 | autoUpdate?: boolean; |
| 60 | /** |
| 61 | * Controls whether to update the Gsplats before or after rendering. For WebXR |
| 62 | * this is set to false in order to complete rendering as soon as possible. |
| 63 | * @default true (if not WebXR) |
| 64 | */ |
| 65 | preUpdate?: boolean; |
| 66 | /** |
| 67 | * Maximum standard deviations from the center to render Gaussians. Values |
| 68 | * Math.sqrt(4)..Math.sqrt(9) produce acceptable results and can be tweaked for |
| 69 | * performance. |
| 70 | * @default Math.sqrt(8) |
| 71 | */ |
| 72 | maxStdDev?: number; |
| 73 | /* |
| 74 | ** |
| 75 | * Minimum pixel radius for splat rendering. |
| 76 | * @default 0.0 |
| 77 | */ |
| 78 | minPixelRadius?: number; |
| 79 | /** |
| 80 | * Maximum pixel radius for splat rendering. |
| 81 | * @default 512.0 |
| 82 | */ |
nothing calls this directly
no outgoing calls
no test coverage detected