softbox 4.3.2 → 4.4.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
@@ -435,6 +435,15 @@ export declare interface SimpleViewerOptions {
435
435
  */
436
436
  animationLoop?: ((time: number) => void) | null;
437
437
  replaceWithScreenshotOnComplete?: boolean;
438
+ /**
439
+ * When to boot the WebGL engine and fetch the model (default `'eager'`).
440
+ * `'lazy'` defers everything until the viewer first approaches the
441
+ * viewport (like `<img loading="lazy">`) — on pages with many viewers
442
+ * only the visible ones pay for a GL context and a model download. Once
443
+ * booted a viewer stays booted; where IntersectionObserver is unavailable
444
+ * the option gracefully degrades to eager.
445
+ */
446
+ loading?: 'eager' | 'lazy';
438
447
  /**
439
448
  * Built-in loading overlay shown while a model loads. `true`/omitted shows the
440
449
  * default spinner; `false` hides it (render your own via the loading events);
package/dist/index.d.ts CHANGED
@@ -435,6 +435,15 @@ export declare interface SimpleViewerOptions {
435
435
  */
436
436
  animationLoop?: ((time: number) => void) | null;
437
437
  replaceWithScreenshotOnComplete?: boolean;
438
+ /**
439
+ * When to boot the WebGL engine and fetch the model (default `'eager'`).
440
+ * `'lazy'` defers everything until the viewer first approaches the
441
+ * viewport (like `<img loading="lazy">`) — on pages with many viewers
442
+ * only the visible ones pay for a GL context and a model download. Once
443
+ * booted a viewer stays booted; where IntersectionObserver is unavailable
444
+ * the option gracefully degrades to eager.
445
+ */
446
+ loading?: 'eager' | 'lazy';
438
447
  /**
439
448
  * Built-in loading overlay shown while a model loads. `true`/omitted shows the
440
449
  * default spinner; `false` hides it (render your own via the loading events);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-QkQEREfW.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-Bgui8z4D.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, i as t, e as E, T as i, V as p, j as T, r as l } from "./index-BdrQXlCy.js";
1
+ import { f as s, E as o, H as a, i as t, e as E, T as i, V as p, j as T, r as l } from "./index-BS5O0Opu.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.3.2",
4
+ "version": "4.4.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",