import { type Camera, type Scene } from 'three'; import { type WebGPURenderer } from 'three/webgpu'; import type { SceneAtmosphereSource } from '../components/viewer/scene-atmosphere'; import { type EdgeMode } from './edge-style'; export declare const THUMBNAIL_WIDTH = 1920; export declare const THUMBNAIL_HEIGHT = 1080; /** * Captures are re-renderable artifacts, not user originals, so they encode as * webp: a 1920×1080 hero shot lands roughly an order of magnitude under PNG, * which is what listings and the catalog actually ship over the wire. Alpha * survives, so transparent item/preset captures keep working. */ export declare const SNAPSHOT_MIME = "image/webp"; export declare const SNAPSHOT_QUALITY = 0.9; export declare const SNAPSHOT_MAX_EDGE = 2048; export type SnapshotCaptureMode = 'standard' | 'viewport' | 'area'; export type SnapshotCropRegion = { x: number; y: number; width: number; height: number; }; export type SnapshotSize = { w: number; h: number; }; export type SnapshotCaptureResult = { blob: Blob; outW: number; outH: number; }; /** * An opaque studio backdrop in place of the theme sky: a radial gradient in * exact sRGB (never tone mapped, so the hexes land as authored). Fixed at * pipeline creation — callers without one get the untouched theme-backdrop * pipeline. Ground shadows come from the caller's own shadow catcher, which * composites over it through the scene alpha. */ export type StudioBackdrop = { /** sRGB hex at `center`. */ inner: string; /** sRGB hex at the frame corner farthest from `center`. */ outer: string; /** Gradient centre in screen UV (0,0 = top-left). */ center: [number, number]; }; export type SnapshotPipeline = { applyEnvironment: ({ theme, transparent, grade, edges, camera, }: { theme: string; transparent: boolean; grade: boolean; edges: EdgeMode; camera: Camera; }) => void; capture: ({ captureMode, cropRegion, standardSize, mime, }: { captureMode?: SnapshotCaptureMode; cropRegion?: SnapshotCropRegion; standardSize?: SnapshotSize; /** The encoding, when not the snapshot default (a print picture wants a lossless `image/png`). */ mime?: string; }) => Promise; dispose: () => void; }; export declare function createSnapshotPipeline({ renderer, scene, camera, atmosphere, studioBackdrop, }: { renderer: WebGPURenderer; scene: Scene; camera: Camera; atmosphere?: SceneAtmosphereSource | null; studioBackdrop?: StudioBackdrop; }): Promise; /** * A capture WITHOUT the post-processing stack: the scene as the renderer * draws it, into an offscreen target, read back and encoded like the * post-processed frames. The sheets' orthographic elevation captures use * it (2026-09-10): an SSGI pass built for a second, orthographic camera * never delivered a frame and held the generator's guard forever. */ export declare function createPlainSnapshotPipeline({ renderer, scene, camera, }: { renderer: WebGPURenderer; scene: Scene; camera: Camera; }): Promise; //# sourceMappingURL=snapshot-pipeline.d.ts.map