softbox 4.22.0 → 4.24.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/README.md +53 -0
- package/dist/{ThreePathTracingService-Io1vC_FO.cjs → ThreePathTracingService-CamzPwtW.cjs} +4 -4
- package/dist/{ThreePathTracingService-CcWLjj2l.js → ThreePathTracingService-yCaEtW_f.js} +51 -51
- package/dist/index.d.cts +53 -0
- package/dist/index.d.ts +53 -0
- package/dist/simple-viewer.cjs +7 -7
- package/dist/simple-viewer.es.js +1760 -1543
- package/dist/smoothstep-BsyRnZAu.cjs +2 -0
- package/dist/{smoothstep-DR5B0_eF.js → smoothstep-gC155W8-.js} +216 -214
- package/package.json +1 -1
- package/dist/smoothstep-DUhHZEuB.cjs +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,33 @@ export declare interface AnimationOptions {
|
|
|
31
31
|
speed?: number;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* AR handoff configuration: a small button over the canvas that opens the
|
|
36
|
+
* model in the platform's native AR viewer — AR Quick Look on iOS, Scene
|
|
37
|
+
* Viewer on Android. UI-only: the button never touches the WebGL viewer, and
|
|
38
|
+
* toggling it never rebuilds anything. The button only renders on devices
|
|
39
|
+
* that can actually hand off (never on desktop).
|
|
40
|
+
*/
|
|
41
|
+
export declare interface AROptions {
|
|
42
|
+
/**
|
|
43
|
+
* USDZ counterpart of the model, for iOS AR Quick Look — Quick Look cannot
|
|
44
|
+
* read GLB, so without this the button stays hidden on iOS. Android Scene
|
|
45
|
+
* Viewer instead reuses the loaded model's own URL and needs nothing here
|
|
46
|
+
* (but requires the model to be loaded from a network URL — a dropped
|
|
47
|
+
* `blob:` file has no address a native app could fetch).
|
|
48
|
+
*/
|
|
49
|
+
iosSrc?: string;
|
|
50
|
+
/** Title shown on Android Scene Viewer's info card. */
|
|
51
|
+
title?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Corner the button floats in (default `bottom-left`). When the built-in
|
|
54
|
+
* preset picker is enabled, a bottom-placed button lifts above the chip
|
|
55
|
+
* row on its own — pick a top corner if it must clear other chrome (e.g.
|
|
56
|
+
* a `bottom-left` gizmo).
|
|
57
|
+
*/
|
|
58
|
+
placement?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
59
|
+
}
|
|
60
|
+
|
|
34
61
|
export declare interface AxesHelperOptions {
|
|
35
62
|
size?: number;
|
|
36
63
|
}
|
|
@@ -581,6 +608,14 @@ export declare interface SimpleViewerHandle {
|
|
|
581
608
|
captureVideo: (options?: CaptureVideoOptions) => Promise<Blob>;
|
|
582
609
|
/** Clip names of the loaded model, in file order (empty when none). */
|
|
583
610
|
getAnimationNames: () => string[];
|
|
611
|
+
/** KHR_materials_variants names of the loaded model (empty when none). */
|
|
612
|
+
getVariantNames: () => string[];
|
|
613
|
+
/**
|
|
614
|
+
* Switch the loaded model to a material variant; `null` restores the
|
|
615
|
+
* authored materials. Applies live (no reload). Throws `INVALID_PARAMETER`
|
|
616
|
+
* on a variant name the model does not carry.
|
|
617
|
+
*/
|
|
618
|
+
setVariant: (variant: string | null) => void;
|
|
584
619
|
/**
|
|
585
620
|
* Plays one clip by name, or ALL clips when no name is given (looped).
|
|
586
621
|
* Throws `INVALID_PARAMETER` on a clip name the model does not carry.
|
|
@@ -624,6 +659,16 @@ export declare interface SimpleViewerOptions {
|
|
|
624
659
|
* Any other option you pass overrides the scene's values.
|
|
625
660
|
*/
|
|
626
661
|
scene?: ViewerScene;
|
|
662
|
+
/**
|
|
663
|
+
* KHR_materials_variants variant to show (e.g. a product colorway baked
|
|
664
|
+
* into the GLB). Applies LIVE — switching never rebuilds the viewer or
|
|
665
|
+
* reloads the model. `null` shows the authored default materials; leaving
|
|
666
|
+
* the option out is "uncontrolled" (an imperative `handle.setVariant()`
|
|
667
|
+
* pick survives other option changes); an unknown name warns and keeps
|
|
668
|
+
* the defaults. Enumerate the model's variants via
|
|
669
|
+
* `handle.getVariantNames()`.
|
|
670
|
+
*/
|
|
671
|
+
variant?: string | null;
|
|
627
672
|
/**
|
|
628
673
|
* Length unit the model geometry is authored in (default `'meters'`).
|
|
629
674
|
* Non-meter models are rescaled on load — without touching the model's own
|
|
@@ -712,6 +757,14 @@ export declare interface SimpleViewerOptions {
|
|
|
712
757
|
* live preset picker). All opt-in; UI-only — never rebuilds the viewer.
|
|
713
758
|
*/
|
|
714
759
|
ui?: UIOptions;
|
|
760
|
+
/**
|
|
761
|
+
* AR handoff button: opens the model in the platform's native AR viewer —
|
|
762
|
+
* AR Quick Look on iOS (needs `iosSrc`, a USDZ counterpart), Scene Viewer
|
|
763
|
+
* on Android (reuses the model's own URL). `true` enables with defaults.
|
|
764
|
+
* The button renders only on devices that can actually hand off, so it is
|
|
765
|
+
* safe to set unconditionally. UI-only — never rebuilds the viewer.
|
|
766
|
+
*/
|
|
767
|
+
ar?: boolean | AROptions;
|
|
715
768
|
/**
|
|
716
769
|
* Click-picking / hotspot-occlusion raycast tuning (e.g. `selection: { bvh:
|
|
717
770
|
* false }` to skip the load-time BVH build on memory-constrained targets).
|