softbox 4.10.1 → 4.11.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
@@ -491,6 +491,20 @@ export declare interface SimpleViewerHandle {
491
491
  playAnimations: (clipName?: string) => void;
492
492
  /** Freezes playback on the current pose; playAnimations() resumes. */
493
493
  pauseAnimations: () => void;
494
+ /**
495
+ * Replace the environment map (reflections + background) at runtime with the
496
+ * equirectangular HDRI/LDR image at `url`. Cached by URL, so re-applying is cheap.
497
+ */
498
+ setEnvironmentMap: (url: string) => Promise<void>;
499
+ /** Restore the built-in studio environment and clean gradient background. */
500
+ resetEnvironment: () => void;
501
+ /**
502
+ * Paint an uploaded image (URL, File, or HTMLImageElement) as the scene backdrop
503
+ * without changing the environment lighting. Clear it with setBackgroundColor.
504
+ */
505
+ setBackgroundImage: (source: string | File | HTMLImageElement) => Promise<void>;
506
+ /** Set a solid background color (also clears a background image). */
507
+ setBackgroundColor: (color: string | number) => void;
494
508
  dispose: () => void;
495
509
  }
496
510
 
package/dist/index.d.ts CHANGED
@@ -491,6 +491,20 @@ export declare interface SimpleViewerHandle {
491
491
  playAnimations: (clipName?: string) => void;
492
492
  /** Freezes playback on the current pose; playAnimations() resumes. */
493
493
  pauseAnimations: () => void;
494
+ /**
495
+ * Replace the environment map (reflections + background) at runtime with the
496
+ * equirectangular HDRI/LDR image at `url`. Cached by URL, so re-applying is cheap.
497
+ */
498
+ setEnvironmentMap: (url: string) => Promise<void>;
499
+ /** Restore the built-in studio environment and clean gradient background. */
500
+ resetEnvironment: () => void;
501
+ /**
502
+ * Paint an uploaded image (URL, File, or HTMLImageElement) as the scene backdrop
503
+ * without changing the environment lighting. Clear it with setBackgroundColor.
504
+ */
505
+ setBackgroundImage: (source: string | File | HTMLImageElement) => Promise<void>;
506
+ /** Set a solid background color (also clears a background image). */
507
+ setBackgroundColor: (color: string | number) => void;
494
508
  dispose: () => void;
495
509
  }
496
510
 
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D2nrtXiT.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-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,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-51m_nNmI.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-Df3usb4t.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.10.1",
4
+ "version": "4.11.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",