softbox 4.11.0 → 4.13.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.
package/dist/index.d.cts CHANGED
@@ -2,6 +2,19 @@ import { default as default_2 } from 'react';
2
2
  import * as React_2 from 'react';
3
3
  import * as THREE from 'three';
4
4
 
5
+ /**
6
+ * A soft, shadowless directional light used for the fill and rim/back roles of
7
+ * a studio three-point rig. Same direction semantics as the key, but it never
8
+ * casts shadows (only the key does — see `findDirectionalLight`, which resolves
9
+ * the first directional as the shadow/contact-shadow source).
10
+ */
11
+ export declare interface AccentLightOptions {
12
+ color?: string | number;
13
+ intensity?: number;
14
+ /** Direction is position → origin; distance does not attenuate. */
15
+ position?: Vec3Like | [number, number, number];
16
+ }
17
+
5
18
  /** Uniform fill from every direction; lifts shadows, adds no shading. */
6
19
  export declare interface AmbientLightOptions {
7
20
  color?: string | number;
@@ -286,13 +299,20 @@ export declare interface HotspotProps {
286
299
  }
287
300
 
288
301
  /**
289
- * The three-light studio rig. Every light is optional; the defaults are a
290
- * balanced product-shot setup (see `defaultOptions.lighting`).
302
+ * The studio rig. Every light is optional; the defaults are a balanced
303
+ * product-shot three-point setup (see `defaultOptions.lighting`): a shadow-
304
+ * casting key, a soft opposite-side fill that opens the shadow, and a rim/back
305
+ * light behind the subject that separates its silhouette from the background.
306
+ * Ambient + hemisphere add a gentle omnidirectional base.
291
307
  */
292
308
  export declare interface LightingOptions {
293
309
  ambientLight?: AmbientLightOptions;
294
310
  hemisphereLight?: HemisphereLightOptions;
295
311
  directionalLight?: DirectionalLightOptions;
312
+ /** Soft opposite-side fill; opens the shadow side without a second shadow. */
313
+ fillLight?: AccentLightOptions;
314
+ /** Rim/back light behind the subject; separates the silhouette from the backdrop. */
315
+ rimLight?: AccentLightOptions;
296
316
  }
297
317
 
298
318
  /**
@@ -530,6 +550,14 @@ export declare interface SimpleViewerOptions {
530
550
  */
531
551
  floorAlignment?: boolean;
532
552
  backgroundColor?: string | number;
553
+ /**
554
+ * Optional darker edge colour for a RADIAL backdrop vignette. When set,
555
+ * `backgroundColor` is painted as the centre (behind the subject) and this as
556
+ * the corners/bottom, floating the model in a soft cove instead of a flat
557
+ * fill. Omit for a flat background. Runtime-tunable (applies on a live preset
558
+ * switch without a rebuild), same as `backgroundColor`.
559
+ */
560
+ backgroundColorEdge?: string | number;
533
561
  staticScene?: boolean;
534
562
  /** GLTF animation playback (autoplay, speed). */
535
563
  animations?: AnimationOptions;
@@ -702,10 +730,11 @@ declare interface Vec3Like {
702
730
  /**
703
731
  * Visual presets: cohesive deltas layered over the defaults (deep-merged) so a
704
732
  * model looks intentional on first paint. Each preset only sets **runtime** look
705
- * fields — background color, tone-mapping exposure and environment intensity —
706
- * so switching presets is applied live (no viewer rebuild, no model reload) and
707
- * everything else (camera auto-framing, lighting rig, controls, grid) is
708
- * inherited from the defaults. Explicit user options always win.
733
+ * fields — background color (plus an optional radial-vignette edge colour),
734
+ * tone-mapping exposure and environment intensity — so switching presets is
735
+ * applied live (no viewer rebuild, no model reload) and everything else (camera
736
+ * auto-framing, lighting rig, controls, grid) is inherited from the defaults.
737
+ * Explicit user options always win.
709
738
  */
710
739
  export declare const VIEWER_PRESETS: Record<ViewerPreset, Partial<SimpleViewerOptions>>;
711
740
 
package/dist/index.d.ts CHANGED
@@ -2,6 +2,19 @@ import { default as default_2 } from 'react';
2
2
  import * as React_2 from 'react';
3
3
  import * as THREE from 'three';
4
4
 
5
+ /**
6
+ * A soft, shadowless directional light used for the fill and rim/back roles of
7
+ * a studio three-point rig. Same direction semantics as the key, but it never
8
+ * casts shadows (only the key does — see `findDirectionalLight`, which resolves
9
+ * the first directional as the shadow/contact-shadow source).
10
+ */
11
+ export declare interface AccentLightOptions {
12
+ color?: string | number;
13
+ intensity?: number;
14
+ /** Direction is position → origin; distance does not attenuate. */
15
+ position?: Vec3Like | [number, number, number];
16
+ }
17
+
5
18
  /** Uniform fill from every direction; lifts shadows, adds no shading. */
6
19
  export declare interface AmbientLightOptions {
7
20
  color?: string | number;
@@ -286,13 +299,20 @@ export declare interface HotspotProps {
286
299
  }
287
300
 
288
301
  /**
289
- * The three-light studio rig. Every light is optional; the defaults are a
290
- * balanced product-shot setup (see `defaultOptions.lighting`).
302
+ * The studio rig. Every light is optional; the defaults are a balanced
303
+ * product-shot three-point setup (see `defaultOptions.lighting`): a shadow-
304
+ * casting key, a soft opposite-side fill that opens the shadow, and a rim/back
305
+ * light behind the subject that separates its silhouette from the background.
306
+ * Ambient + hemisphere add a gentle omnidirectional base.
291
307
  */
292
308
  export declare interface LightingOptions {
293
309
  ambientLight?: AmbientLightOptions;
294
310
  hemisphereLight?: HemisphereLightOptions;
295
311
  directionalLight?: DirectionalLightOptions;
312
+ /** Soft opposite-side fill; opens the shadow side without a second shadow. */
313
+ fillLight?: AccentLightOptions;
314
+ /** Rim/back light behind the subject; separates the silhouette from the backdrop. */
315
+ rimLight?: AccentLightOptions;
296
316
  }
297
317
 
298
318
  /**
@@ -530,6 +550,14 @@ export declare interface SimpleViewerOptions {
530
550
  */
531
551
  floorAlignment?: boolean;
532
552
  backgroundColor?: string | number;
553
+ /**
554
+ * Optional darker edge colour for a RADIAL backdrop vignette. When set,
555
+ * `backgroundColor` is painted as the centre (behind the subject) and this as
556
+ * the corners/bottom, floating the model in a soft cove instead of a flat
557
+ * fill. Omit for a flat background. Runtime-tunable (applies on a live preset
558
+ * switch without a rebuild), same as `backgroundColor`.
559
+ */
560
+ backgroundColorEdge?: string | number;
533
561
  staticScene?: boolean;
534
562
  /** GLTF animation playback (autoplay, speed). */
535
563
  animations?: AnimationOptions;
@@ -702,10 +730,11 @@ declare interface Vec3Like {
702
730
  /**
703
731
  * Visual presets: cohesive deltas layered over the defaults (deep-merged) so a
704
732
  * model looks intentional on first paint. Each preset only sets **runtime** look
705
- * fields — background color, tone-mapping exposure and environment intensity —
706
- * so switching presets is applied live (no viewer rebuild, no model reload) and
707
- * everything else (camera auto-framing, lighting rig, controls, grid) is
708
- * inherited from the defaults. Explicit user options always win.
733
+ * fields — background color (plus an optional radial-vignette edge colour),
734
+ * tone-mapping exposure and environment intensity — so switching presets is
735
+ * applied live (no viewer rebuild, no model reload) and everything else (camera
736
+ * auto-framing, lighting rig, controls, grid) is inherited from the defaults.
737
+ * Explicit user options always win.
709
738
  */
710
739
  export declare const VIEWER_PRESETS: Record<ViewerPreset, Partial<SimpleViewerOptions>>;
711
740
 
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BtZrTFUk.cjs");exports.ControlType=e.ControlType;exports.ErrorCode=e.ErrorCode;exports.Hotspot=e.Hotspot;exports.SimpleViewer=e.SimpleViewerWrapper;exports.ThreeViewerError=e.ThreeViewerError;exports.TypedEventEmitter=e.TypedEventEmitter;exports.VIEWER_PRESETS=e.VIEWER_PRESETS;exports.defaultOptions=e.defaultOptions;exports.resolvePreset=e.resolvePreset;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Boctv1Ta.cjs");exports.ControlType=e.ControlType;exports.ErrorCode=e.ErrorCode;exports.Hotspot=e.Hotspot;exports.SimpleViewer=e.SimpleViewerWrapper;exports.ThreeViewerError=e.ThreeViewerError;exports.TypedEventEmitter=e.TypedEventEmitter;exports.VIEWER_PRESETS=e.VIEWER_PRESETS;exports.defaultOptions=e.defaultOptions;exports.resolvePreset=e.resolvePreset;
@@ -1,4 +1,4 @@
1
- import { f as s, E as o, H as a, h as t, e as E, T as i, V as p, i as T, r as l } from "./index-Df3usb4t.js";
1
+ import { f as s, E as o, H as a, h as t, e as E, T as i, V as p, i as T, r as l } from "./index-CWhSg5nm.js";
2
2
  export {
3
3
  s as ControlType,
4
4
  o as ErrorCode,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "softbox",
3
3
  "private": false,
4
- "version": "4.11.0",
4
+ "version": "4.13.0",
5
5
  "homepage": "https://leming.github.io/softbox/",
6
6
  "type": "module",
7
7
  "description": "Batteries-included React 3D viewer — any GLB looks studio-shot in one line",