import { BoxGeometry, Mesh, NodeMaterial, Object3D, WebGPURenderer } from 'three/webgpu'; import { FluidSimulation } from '../engine/FluidSimulation.ts'; import { type LightAnchor } from './SceneLights.ts'; import { type DebugField, type ResolvedSimulationOptions } from './options.ts'; /** Draws into the application's render pipeline with premultiplied volume radiance. */ export declare class SceneVolumeRenderer extends Mesh { private readonly owner; private readonly simulation; private readonly options; private readonly anchors; private readonly params; private readonly values; private readonly gpuSampler; private readonly blackbody; private lighting; private slicer; /** Placeholder bound while the half-resolution march is off. */ private readonly emptySlices; private readonly sliceParams; private uploads?; private sceneLights?; private readonly wrappers; private readonly field; /** The boxes' page tables and the boxes (VolumeLighting). */ private readonly pages; private readonly boxes; private readonly smokeField; private readonly smokeDivisor; private readonly velocityDivisor; private readonly velocity; /** The expansion, or the solver field the simulation copies out for a debug view. */ private readonly solverField; private debugField; private readonly incident; private readonly occupancy; private readonly slices; private readonly halfResolution; /** Voxel size, log2 of the field brick size, and the number of boxes. */ private readonly grid; private readonly inverseVP; private readonly optical; private readonly light; private readonly smoke; private readonly fire; private readonly sootGlow; private readonly sampling; private readonly viewport; private readonly sceneLight; private readonly ambient; private readonly displayField; /** The debug view's heat map: its range, and 1 when it is signed (DEBUG_SCALES). */ private readonly debugScale; private readonly reconstructionFilter; private readonly depth; private readonly direction; private disposed; private lastLightStep; /** The field pool of the previous frame: the field and its scratch alternate. */ private previousField?; private previousSmoke?; /** The version of the boxes the mesh was fitted to. */ private fitted; private constructor(); /** `anchors` are where flames light the scene from (SceneLights). */ static create(renderer: WebGPURenderer, simulation: FluidSimulation, parent: Object3D, options: () => ResolvedSimulationOptions, anchors: () => readonly LightAnchor[], field: DebugField): Promise; /** Fit the mesh around every box, after they changed; hide it without any. */ private fit; /** Which field to show. */ setDebug(field: DebugField): void; invalidate(): void; reset(): void; private wrap; private renderSettings; private readSceneLighting; /** The compute passes' parameters (volume-common.wgsl RenderParams). */ private writeParameters; /** Keep the mesh around the boxes, and light the scene from the latest step, whether or * not the camera sees the simulation. */ update(): void; /** Whether an explosion's light has died down (SceneLights). */ lightFinished(id: string): boolean; /** Native renderer allocations, including lighting, slice targets and readback. * Borrowed solver scratch is counted by the simulation. Three.js-managed scene * targets, geometry and backend bookkeeping are outside this total. */ get memoryBytes(): number; private prepare; dispose(): void; }