softbox 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,621 @@
1
+ import { default as default_2 } from 'react';
2
+ import * as React_2 from 'react';
3
+ import * as THREE from 'three';
4
+
5
+ export declare interface AmbientLightOptions {
6
+ color?: string | number;
7
+ intensity?: number;
8
+ }
9
+
10
+ export declare interface AnimationOptions {
11
+ /**
12
+ * Start playback when a model with clips loads: `true` plays ALL clips
13
+ * (looped), a string plays the clip with that name.
14
+ */
15
+ autoplay?: boolean | string;
16
+ /** Playback rate multiplier (1 = authored speed). Applied live. */
17
+ speed?: number;
18
+ }
19
+
20
+ export declare interface AxesHelperOptions {
21
+ size?: number;
22
+ }
23
+
24
+ export declare interface CameraOptions {
25
+ position?: [number, number, number];
26
+ target?: [number, number, number];
27
+ fov?: number;
28
+ near?: number;
29
+ far?: number;
30
+ autoFitToObject?: boolean;
31
+ }
32
+
33
+ /**
34
+ * Output size for `captureStill`, in pixels. When only one dimension is given
35
+ * the other follows the canvas aspect ratio; when both are omitted the still
36
+ * matches the canvas drawing buffer.
37
+ */
38
+ export declare interface CaptureStillOptions {
39
+ width?: number;
40
+ height?: number;
41
+ }
42
+
43
+ export declare interface CaptureVideoOptions {
44
+ /** Capture length in seconds. Default 3. */
45
+ duration?: number;
46
+ /** Frame rate handed to `canvas.captureStream()`. Default 30. */
47
+ fps?: number;
48
+ /**
49
+ * Preferred container/codec (e.g. `'video/webm;codecs=vp9'`). When omitted
50
+ * or unsupported the best supported WebM flavor is picked, falling back to
51
+ * MP4 (Safari) and finally the browser default.
52
+ */
53
+ mimeType?: string;
54
+ /** Encoder bitrate hint in bits per second. */
55
+ videoBitsPerSecond?: number;
56
+ }
57
+
58
+ export declare type ControlsInstance = {
59
+ enabled: boolean;
60
+ update(): void;
61
+ dispose(): void;
62
+ target: THREE.Vector3;
63
+ getThreeControls?(): unknown;
64
+ };
65
+
66
+ export declare interface ControlsOptions {
67
+ type?: ControlType;
68
+ enabled?: boolean;
69
+ enableDamping?: boolean;
70
+ dampingFactor?: number;
71
+ enableZoom?: boolean;
72
+ enableRotate?: boolean;
73
+ enablePan?: boolean;
74
+ autoRotate?: boolean;
75
+ autoRotateSpeed?: number;
76
+ minDistance?: number;
77
+ maxDistance?: number;
78
+ minPolarAngle?: number;
79
+ maxPolarAngle?: number;
80
+ }
81
+
82
+ export declare enum ControlType {
83
+ MapControls = "MapControls",
84
+ OrbitControls = "OrbitControls"
85
+ }
86
+
87
+ /**
88
+ * Default options using the new format structure
89
+ */
90
+ export declare const defaultOptions: SimpleViewerOptions;
91
+
92
+ export declare interface DirectionalLightOptions {
93
+ color?: string | number;
94
+ intensity?: number;
95
+ position?: Vec3Like | [number, number, number];
96
+ castShadow?: boolean;
97
+ shadow?: {
98
+ mapSize?: {
99
+ width: number;
100
+ height: number;
101
+ };
102
+ camera?: {
103
+ near?: number;
104
+ far?: number;
105
+ left?: number;
106
+ right?: number;
107
+ top?: number;
108
+ bottom?: number;
109
+ };
110
+ bias?: number;
111
+ radius?: number;
112
+ };
113
+ }
114
+
115
+ export declare interface EnvironmentOptions {
116
+ url?: string;
117
+ backgroundBlurriness?: number;
118
+ backgroundIntensity?: number;
119
+ environmentIntensity?: number;
120
+ }
121
+
122
+ export declare enum ErrorCode {
123
+ SCENE_INIT_FAILED = "SCENE_INIT_FAILED",
124
+ RENDERER_INIT_FAILED = "RENDERER_INIT_FAILED",
125
+ RENDERER_NOT_INITIALIZED = "RENDERER_NOT_INITIALIZED",
126
+ CAMERA_INIT_FAILED = "CAMERA_INIT_FAILED",
127
+ WEBGL_NOT_SUPPORTED = "WEBGL_NOT_SUPPORTED",
128
+ INITIALIZATION_FAILED = "INITIALIZATION_FAILED",
129
+ PATH_TRACING_INIT_FAILED = "PATH_TRACING_INIT_FAILED",
130
+ MODEL_LOAD_FAILED = "MODEL_LOAD_FAILED",
131
+ TEXTURE_LOAD_FAILED = "TEXTURE_LOAD_FAILED",
132
+ RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND",
133
+ UNSUPPORTED_FORMAT = "UNSUPPORTED_FORMAT",
134
+ INVALID_CONFIGURATION = "INVALID_CONFIGURATION",
135
+ RENDER_ERROR = "RENDER_ERROR",
136
+ RENDER_FAILED = "RENDER_FAILED",
137
+ SCENE_OPERATION_FAILED = "SCENE_OPERATION_FAILED",
138
+ COMPONENT_NOT_MOUNTED = "COMPONENT_NOT_MOUNTED",
139
+ INVALID_STATE = "INVALID_STATE",
140
+ INVALID_PARAMETER = "INVALID_PARAMETER",
141
+ OPERATION_FAILED = "OPERATION_FAILED",
142
+ UNKNOWN = "UNKNOWN"
143
+ }
144
+
145
+ export declare interface ErrorContext {
146
+ [key: string]: unknown;
147
+ }
148
+
149
+ export declare interface GizmoOptions {
150
+ placement?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
151
+ size?: number;
152
+ }
153
+
154
+ export declare interface GridHelperOptions {
155
+ size?: number;
156
+ divisions?: number;
157
+ colorCenterLine?: string | number;
158
+ colorGrid?: string | number;
159
+ type?: 'square_wire' | 'hexagonal_wire' | 'hexagonal_glass' | 'stone_tiles';
160
+ opacity?: number;
161
+ styleOptions?: {
162
+ hexRadius?: number;
163
+ tileSize?: number;
164
+ texture?: string;
165
+ normalMap?: string;
166
+ roughnessMap?: string;
167
+ metalness?: number;
168
+ roughness?: number;
169
+ transmission?: number;
170
+ thickness?: number;
171
+ ior?: number;
172
+ height?: number;
173
+ bevelSize?: number;
174
+ randomHeight?: boolean;
175
+ randomRotation?: boolean;
176
+ };
177
+ }
178
+
179
+ export declare interface HelperOptions {
180
+ grid?: boolean | GridHelperOptions;
181
+ axes?: boolean | AxesHelperOptions;
182
+ stats?: boolean;
183
+ gizmo?: boolean | GizmoOptions;
184
+ studioEnvironment?: boolean;
185
+ darkStudioMode?: boolean;
186
+ }
187
+
188
+ export declare interface HemisphereLightOptions {
189
+ skyColor?: string | number;
190
+ groundColor?: string | number;
191
+ intensity?: number;
192
+ }
193
+
194
+ /**
195
+ * A DOM annotation anchored to a world-space point of the scene. Render it as
196
+ * a child of `SimpleViewer`; the anchor is projected through the camera after
197
+ * every rendered frame, so it tracks orbiting, zooming and resizes. Points
198
+ * behind the camera are hidden; `occlude` also hides it when the model covers
199
+ * the anchor. The projection math lives behind the viewer's anchor-projection
200
+ * port — this component only wires events to DOM styles.
201
+ */
202
+ export declare function Hotspot({ position, occlude, children }: HotspotProps): default_2.JSX.Element;
203
+
204
+ export declare interface HotspotProps {
205
+ /** World-space anchor point, e.g. a `point` from the `object:selected` event. */
206
+ position: [number, number, number];
207
+ /**
208
+ * Hide the hotspot when the model occludes its anchor point (a raycast per
209
+ * rendered frame). Off by default.
210
+ */
211
+ occlude?: boolean;
212
+ /** Pin content; without children a default dot pin is rendered. */
213
+ children?: default_2.ReactNode;
214
+ }
215
+
216
+ export declare interface LightingOptions {
217
+ ambientLight?: AmbientLightOptions;
218
+ hemisphereLight?: HemisphereLightOptions;
219
+ directionalLight?: DirectionalLightOptions;
220
+ }
221
+
222
+ /**
223
+ * Compression-decoder configuration for the built-in glTF/GLB loader.
224
+ *
225
+ * DRACO (geometry), KTX2/Basis (textures) and Meshopt (geometry) are all wired
226
+ * into the loader by default, so compressed assets exported by Blender,
227
+ * `gltfpack`, `gltf-transform`, etc. load without any extra setup.
228
+ *
229
+ * Meshopt is bundled and needs no external file. DRACO and KTX2 require a small
230
+ * WebAssembly decoder that is fetched **on demand** — only the first time an
231
+ * asset actually uses that compression — from a version-pinned CDN by default.
232
+ * Point `dracoDecoderPath` / `ktx2TranscoderPath` at a self-hosted copy (e.g.
233
+ * `three/examples/jsm/libs/draco/` and `.../basis/` copied into your public dir)
234
+ * for a fully offline, no-CDN setup.
235
+ */
236
+ export declare interface LoaderOptions {
237
+ /** Decode DRACO-compressed geometry. Default: `true`. */
238
+ draco?: boolean;
239
+ /** Decode KTX2 / Basis-compressed textures. Default: `true`. */
240
+ ktx2?: boolean;
241
+ /** Decode Meshopt-compressed geometry. Default: `true`. */
242
+ meshopt?: boolean;
243
+ /**
244
+ * Directory holding the DRACO decoder (`draco_wasm_wrapper.js` +
245
+ * `draco_decoder.wasm`). Must end with a trailing slash. Defaults to a
246
+ * version-pinned jsDelivr URL matching the installed Three.js revision.
247
+ */
248
+ dracoDecoderPath?: string;
249
+ /**
250
+ * Directory holding the KTX2 Basis transcoder (`basis_transcoder.js` +
251
+ * `basis_transcoder.wasm`). Must end with a trailing slash. Defaults to a
252
+ * version-pinned jsDelivr URL matching the installed Three.js revision.
253
+ */
254
+ ktx2TranscoderPath?: string;
255
+ }
256
+
257
+ /**
258
+ * Configuration for the built-in loading overlay shown while a model loads.
259
+ *
260
+ * Pass a boolean on `SimpleViewerOptions.loadingIndicator` to toggle the
261
+ * default overlay, or this object to customize it. Set `loadingIndicator: false`
262
+ * to render your own using the `model:loading` / `model:loaded` / `model:error`
263
+ * events on the viewer handle.
264
+ */
265
+ export declare interface LoadingIndicatorOptions {
266
+ /** Show the built-in overlay. Default: `true`. */
267
+ enabled?: boolean;
268
+ /** Text under the spinner while loading. Default: `'Loading…'`. */
269
+ label?: string;
270
+ /** Message shown if the model fails to load. Default: the error message. */
271
+ errorLabel?: string;
272
+ /** Spinner and text color. Default: `'#ffffff'`. */
273
+ color?: string;
274
+ /** Backdrop scrim behind the spinner. Default: a subtle dark scrim. */
275
+ backdrop?: string;
276
+ }
277
+
278
+ export declare interface PathTracingOptions {
279
+ enabled?: boolean;
280
+ maxSamples?: number;
281
+ bounces?: number;
282
+ transmissiveBounces?: number;
283
+ renderScale?: number;
284
+ lowResScale?: number;
285
+ dynamicLowRes?: boolean;
286
+ }
287
+
288
+ export declare interface RendererOptions {
289
+ antialias?: boolean;
290
+ alpha?: boolean;
291
+ shadowMapEnabled?: boolean;
292
+ pixelRatio?: number;
293
+ /** A `THREE.ShadowMapType` constant (e.g. `THREE.PCFShadowMap` === 1). */
294
+ shadowMapType?: number;
295
+ /** A `THREE.ToneMapping` constant (e.g. `THREE.ACESFilmicToneMapping` === 6). */
296
+ toneMapping?: number;
297
+ toneMappingExposure?: number;
298
+ /** A `THREE.ColorSpace` value (e.g. `'srgb'`, `'srgb-linear'`). */
299
+ outputColorSpace?: string;
300
+ }
301
+
302
+ /**
303
+ * Rendering behavior options
304
+ */
305
+ export declare interface RenderingOptions {
306
+ /**
307
+ * Enable idle detection to stop rendering when inactive
308
+ * @default true for static scenes, false for non-static scenes
309
+ */
310
+ enableIdleDetection?: boolean;
311
+ /**
312
+ * Time in milliseconds before entering idle state
313
+ * @default 1000
314
+ */
315
+ idleDelay?: number;
316
+ /**
317
+ * Target frames per second
318
+ * @default 60
319
+ */
320
+ targetFPS?: number;
321
+ /**
322
+ * Enable frame rate limiting
323
+ * @default true
324
+ */
325
+ enableFrameRateLimiting?: boolean;
326
+ }
327
+
328
+ /** The partial options for a preset, or an empty object when none is set. */
329
+ export declare function resolvePreset(preset?: ViewerPreset): Partial<SimpleViewerOptions>;
330
+
331
+ /**
332
+ * Click-picking and hotspot-occlusion raycast options.
333
+ */
334
+ export declare interface SelectionOptions {
335
+ /**
336
+ * Build a BVH (bounding volume hierarchy) for each loaded model, making
337
+ * raycasts logarithmic instead of linear — noticeable on high-poly models.
338
+ * Costs one synchronous build pass at load time (or on the first click for
339
+ * models passed as raw objects) and ~25% extra geometry memory. The build
340
+ * sorts each geometry's index in place (triangle order changes; rendering
341
+ * is unaffected) and adds an index to non-indexed geometry. Disable on
342
+ * memory-constrained targets or when the index order matters. Default on.
343
+ */
344
+ bvh?: boolean;
345
+ }
346
+
347
+ /**
348
+ * Public entry component for the viewer. Thin forwardRef pass-through to the
349
+ * clean-architecture SimpleViewer implementation.
350
+ */
351
+ export declare const SimpleViewer: default_2.ForwardRefExoticComponent<SimpleViewerProps & default_2.RefAttributes<SimpleViewerHandle>>;
352
+
353
+ /**
354
+ * Imperative handle exposed via `ref` on the `SimpleViewer` component. Lives in a
355
+ * dedicated type module (not the component file) so cross-cutting modules such as
356
+ * `events/ViewerEvents` can reference it without depending on a React component.
357
+ */
358
+ export declare interface SimpleViewerHandle {
359
+ scene: THREE.Scene | null;
360
+ camera: THREE.Camera | null;
361
+ renderer: THREE.WebGLRenderer | null;
362
+ controls: ControlsInstance | null;
363
+ events: TypedEventEmitter<ViewerEventMap>;
364
+ loadModel: (source: string | THREE.Object3D) => Promise<void>;
365
+ /**
366
+ * Capture a PNG still of the current scene (data URL). Pass `width`/`height`
367
+ * for a high-resolution raster capture; in path-traced mode omit them — the
368
+ * still is taken at canvas resolution once the accumulation completes.
369
+ */
370
+ captureStill: (options?: CaptureStillOptions) => Promise<string>;
371
+ /**
372
+ * Record the live canvas for a few seconds (default 3) and resolve with the
373
+ * encoded clip — WebM in Chromium/Firefox, MP4 in Safari. Motion (turntable,
374
+ * animations, user orbiting) is captured as it happens.
375
+ */
376
+ captureVideo: (options?: CaptureVideoOptions) => Promise<Blob>;
377
+ /** Clip names of the loaded model, in file order (empty when none). */
378
+ getAnimationNames: () => string[];
379
+ /** Plays one clip by name, or ALL clips when no name is given (looped). */
380
+ playAnimations: (clipName?: string) => void;
381
+ /** Freezes playback on the current pose; playAnimations() resumes. */
382
+ pauseAnimations: () => void;
383
+ dispose: () => void;
384
+ }
385
+
386
+ export declare interface SimpleViewerOptions {
387
+ /**
388
+ * A one-word visual preset (`studio`, `product`, `neutral`, `dark`, `outdoor`)
389
+ * that sets a cohesive lighting/environment/tone look. Any other option you
390
+ * pass overrides the preset's values.
391
+ */
392
+ preset?: ViewerPreset;
393
+ backgroundColor?: string | number;
394
+ staticScene?: boolean;
395
+ /** GLTF animation playback (autoplay, speed). */
396
+ animations?: AnimationOptions;
397
+ camera?: CameraOptions;
398
+ controls?: ControlsOptions;
399
+ environment?: EnvironmentOptions;
400
+ helpers?: HelperOptions;
401
+ lighting?: LightingOptions;
402
+ pathTracing?: PathTracingOptions;
403
+ renderer?: RendererOptions;
404
+ rendering?: RenderingOptions;
405
+ onLoad?: () => void;
406
+ onProgress?: (progress: number) => void;
407
+ onError?: (error: Error) => void;
408
+ animationLoop?: ((time: number) => void) | null;
409
+ replaceWithScreenshotOnComplete?: boolean;
410
+ /**
411
+ * Built-in loading overlay shown while a model loads. `true`/omitted shows the
412
+ * default spinner; `false` hides it (render your own via the loading events);
413
+ * an object customizes it. UI-only — changing it never rebuilds the viewer.
414
+ */
415
+ loadingIndicator?: boolean | LoadingIndicatorOptions;
416
+ /**
417
+ * Compression decoders for the glTF/GLB loader (DRACO, KTX2/Basis, Meshopt).
418
+ * All enabled by default so compressed assets load with no setup; pass this to
419
+ * disable a decoder or self-host the DRACO/KTX2 WebAssembly files offline.
420
+ */
421
+ loaders?: LoaderOptions;
422
+ /**
423
+ * Built-in UI chrome over the canvas (e.g. `ui: { presets: true }` for the
424
+ * live preset picker). All opt-in; UI-only — never rebuilds the viewer.
425
+ */
426
+ ui?: UIOptions;
427
+ /**
428
+ * Click-picking / hotspot-occlusion raycast tuning (e.g. `selection: { bvh:
429
+ * false }` to skip the load-time BVH build on memory-constrained targets).
430
+ */
431
+ selection?: SelectionOptions;
432
+ }
433
+
434
+ export declare interface SimpleViewerProps {
435
+ /**
436
+ * A URL to a glb/gltf file, or a Three.js object. The viewer takes
437
+ * OWNERSHIP of objects you pass: their geometries, materials and textures
438
+ * are disposed when the object is replaced or the viewer unmounts. Pass a
439
+ * `.clone()` if you need to keep using the original elsewhere.
440
+ */
441
+ object: THREE.Object3D | null | string;
442
+ options?: SimpleViewerOptions;
443
+ /**
444
+ * Shorthand for `options.preset` — a one-word look
445
+ * (`studio` / `product` / `neutral` / `dark` / `outdoor`).
446
+ * `options.preset` takes precedence if both are set.
447
+ */
448
+ preset?: ViewerPreset;
449
+ /**
450
+ * Shorthand for `options.pathTracing.enabled = true` — photoreal progressive
451
+ * path tracing (a construction-time render mode). Composes with a partial
452
+ * `options.pathTracing` (tuning fields are kept); an explicit
453
+ * `options.pathTracing.enabled` wins. Pair with `handle.captureStill()` for
454
+ * a photoreal still once the accumulation completes.
455
+ */
456
+ pathTraced?: boolean;
457
+ /**
458
+ * Shorthand for `options.controls.autoRotate = true` — a showcase turntable
459
+ * that slowly orbits the camera around the model. Toggling it never rebuilds
460
+ * the viewer (applied live), and rotation pauses automatically while the
461
+ * user is dragging. Speed is tuned via `options.controls.autoRotateSpeed`
462
+ * (2 ≈ one orbit per 30s). An explicit `options.controls.autoRotate` wins.
463
+ */
464
+ turntable?: boolean;
465
+ /**
466
+ * Shorthand for `options.animations.autoplay = true` — plays ALL of the
467
+ * model's animation clips, looped, as soon as it loads. Toggling is live
468
+ * (pause/resume without a rebuild). Pick a single clip or tune the speed
469
+ * via `options.animations`; an explicit `options.animations.autoplay` wins.
470
+ */
471
+ animations?: boolean;
472
+ /**
473
+ * Overlay children rendered inside the viewer container (over the canvas),
474
+ * e.g. `<Hotspot>` annotations.
475
+ */
476
+ children?: React_2.ReactNode;
477
+ }
478
+
479
+ export declare class ThreeViewerError extends Error {
480
+ readonly code: ErrorCode;
481
+ readonly context?: ErrorContext | undefined;
482
+ readonly timestamp: Date;
483
+ constructor(message: string, code: ErrorCode, context?: ErrorContext | undefined);
484
+ static fromError(error: unknown, code: ErrorCode, context?: ErrorContext): ThreeViewerError;
485
+ }
486
+
487
+ export declare class TypedEventEmitter<T> {
488
+ private listeners;
489
+ on<K extends keyof T>(event: K, listener: (data: T[K]) => void): () => void;
490
+ emit<K extends keyof T>(event: K, data: T[K]): void;
491
+ once<K extends keyof T>(event: K, listener: (data: T[K]) => void): () => void;
492
+ removeAllListeners(event?: keyof T): void;
493
+ listenerCount(event: keyof T): number;
494
+ /**
495
+ * Alias for removing a listener (compatible with Node.js EventEmitter)
496
+ */
497
+ off<K extends keyof T>(event: K, listener: (data: T[K]) => void): void;
498
+ /**
499
+ * Alias for on (compatible with Node.js EventEmitter)
500
+ */
501
+ removeListener<K extends keyof T>(event: K, listener: (data: T[K]) => void): void;
502
+ }
503
+
504
+ /**
505
+ * Built-in UI chrome rendered over the canvas. Everything here is opt-in and
506
+ * UI-only — toggling it never rebuilds the viewer or reloads the model.
507
+ */
508
+ export declare interface UIOptions {
509
+ /**
510
+ * Show the built-in preset picker: a row of chips over the canvas that
511
+ * switches the visual preset live. Off by default. Turning the picker off
512
+ * also clears any preset picked through it — your own `preset` takes over.
513
+ */
514
+ presets?: boolean;
515
+ /**
516
+ * Called when the user picks a preset via the built-in picker, e.g. to
517
+ * persist the choice. A later change to your own `preset` prop/option
518
+ * overrides the picked one; echoing a reported pick back into `preset`
519
+ * (even asynchronously) is safe and never reverts a newer pick.
520
+ */
521
+ onPresetChange?: (preset: ViewerPreset) => void;
522
+ }
523
+
524
+ /** A plain, engine-agnostic 3D point. */
525
+ declare interface Vec3Like {
526
+ x: number;
527
+ y: number;
528
+ z: number;
529
+ }
530
+
531
+ /**
532
+ * Visual presets: cohesive deltas layered over the defaults (deep-merged) so a
533
+ * model looks intentional on first paint. Each preset only sets **runtime** look
534
+ * fields — background color, tone-mapping exposure and environment intensity —
535
+ * so switching presets is applied live (no viewer rebuild, no model reload) and
536
+ * everything else (camera auto-framing, lighting rig, controls, grid) is
537
+ * inherited from the defaults. Explicit user options always win.
538
+ */
539
+ export declare const VIEWER_PRESETS: Record<ViewerPreset, Partial<SimpleViewerOptions>>;
540
+
541
+ /**
542
+ * The public, Three.js-typed view of the viewer event contract — the shape
543
+ * consumers see on the viewer handle's `events` emitter. Shares its single
544
+ * source of truth with the core map via the generic {@link GenericViewerEventMap}.
545
+ */
546
+ export declare type ViewerEventMap = ViewerEventMap_2<THREE.Object3D, THREE.Camera, ControlsInstance, SimpleViewerHandle>;
547
+
548
+ /**
549
+ * The viewer's event contract, generic over the layer-specific representations
550
+ * of a 3D object, camera, controls, and viewer handle. The engine-agnostic core
551
+ * instantiates it with its interfaces (`IObject3D`/`ICamera`/…); the public
552
+ * surface instantiates it with the concrete Three.js types. Keeping a single
553
+ * generic definition is what stops the two instantiations from drifting apart.
554
+ */
555
+ declare interface ViewerEventMap_2<TObject, TCamera, TControls, THandle> {
556
+ 'initialized': {
557
+ viewer: THandle;
558
+ };
559
+ 'disposed': {
560
+ viewer: THandle;
561
+ };
562
+ 'model:loading': {
563
+ url: string;
564
+ };
565
+ 'model:loaded': {
566
+ model: TObject;
567
+ loadTime: number;
568
+ };
569
+ 'model:error': {
570
+ error: ThreeViewerError;
571
+ url?: string;
572
+ };
573
+ 'render:start': {
574
+ frame: number;
575
+ };
576
+ 'render:complete': {
577
+ frame: number;
578
+ renderTime: number;
579
+ samples?: number;
580
+ };
581
+ 'pathtracing:complete': {
582
+ samples: number;
583
+ totalTime: number;
584
+ };
585
+ 'screenshot:captured': {
586
+ dataUrl: string;
587
+ };
588
+ 'controls:change': {
589
+ type?: string;
590
+ camera?: TCamera;
591
+ controls?: TControls;
592
+ };
593
+ /** A click (not a drag) hit the loaded model; `point` is the world-space hit. */
594
+ 'object:selected': {
595
+ object: TObject;
596
+ point: Vec3Like;
597
+ };
598
+ 'error': {
599
+ error: ThreeViewerError;
600
+ };
601
+ }
602
+
603
+ /**
604
+ * A one-word visual preset that sets the background, tone-mapping exposure and
605
+ * environment intensity as a cohesive "look", so a model looks intentional on
606
+ * first paint with zero manual tuning. Set it on `SimpleViewerOptions.preset`
607
+ * (or the `preset` prop). Presets apply live, so switching one never rebuilds
608
+ * the viewer or reloads the model. Any explicit option you pass overrides it.
609
+ *
610
+ * - `studio` — clean, neutral light-grey backdrop; the balanced default look.
611
+ * - `product` — bright, high-key white backdrop for e-commerce hero shots.
612
+ * - `neutral` — flat, even, low-drama lighting for accurate inspection.
613
+ * - `dark` — dramatic dark backdrop for portfolios and glossy materials.
614
+ * - `outdoor` — brighter, daylight-leaning sky tint.
615
+ *
616
+ * Path-traced output is a construction-time render mode (`pathTracing.enabled`),
617
+ * not a live-switchable preset.
618
+ */
619
+ export declare type ViewerPreset = 'studio' | 'product' | 'neutral' | 'dark' | 'outdoor';
620
+
621
+ export { }