import { BufferGeometry, Group, Material, Mesh, OrthographicCamera, PerspectiveCamera, WebGLRenderer } from "three"; import { Channel, Volume } from "."; import type { VolumeRenderImpl } from "./VolumeRenderImpl.js"; import { SettingsFlags, VolumeRenderSettings } from "./VolumeRenderSettings.js"; import type { FuseChannel } from "./types.js"; /** * Creates a plane that renders a 2D XY slice of volume atlas data. */ export default class Atlas2DSlice implements VolumeRenderImpl { private settings; volume: Volume; private geometry; protected geometryMesh: Mesh; private geometryTransformNode; private boxHelper; private uniforms; private channelData; private sliceUpdateWaiting; /** * Creates a new Atlas2DSlice. * @param volume The volume that this renderer should render data from. * @param settings Optional settings object. If set, updates the renderer with * the given settings. Otherwise, uses the default VolumeRenderSettings. */ constructor(volume: Volume, settings?: VolumeRenderSettings); /** * Syncs `this.settings.zSlice` with the corresponding shader uniform, or defers syncing until the slice is loaded. * @returns a boolean indicating whether the slice is out of bounds of the volume entirely. */ private updateSlice; updateVolumeDimensions(): void; updateSettings(newSettings: VolumeRenderSettings, dirtyFlags?: number | SettingsFlags): void; private createGeometry; cleanup(): void; viewpointMoved(): void; doRender(renderer: WebGLRenderer, camera: PerspectiveCamera | OrthographicCamera): void; get3dObject(): Group; updateActiveChannels(channelcolors: FuseChannel[], channeldata: Channel[]): void; private setUniform; setRenderUpdateListener(_listener?: ((iteration: number) => void) | undefined): void; }