storysplat-viewer 2.3.0 → 2.3.2
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.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/storysplat-viewer.umd.js +1 -1
- package/dist/storysplat-viewer.umd.js.map +1 -1
- package/dist/types/html-generation/generateHTML.d.ts +4 -0
- package/dist/types/transformers/sceneToConfig.d.ts +1 -0
- package/dist/types/types/index.d.ts +50 -1
- package/package.json +1 -1
|
@@ -19,6 +19,10 @@ export interface GenerateHTMLOptions {
|
|
|
19
19
|
customCSS?: string;
|
|
20
20
|
/** Whether to minify the output */
|
|
21
21
|
minify?: boolean;
|
|
22
|
+
/** Enable lazy loading - shows thumbnail with start button before loading (overrides scene data) */
|
|
23
|
+
lazyLoad?: boolean;
|
|
24
|
+
/** Custom button text for lazy loading (overrides scene data) */
|
|
25
|
+
lazyLoadButtonText?: string;
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
28
|
* Generate standalone HTML for a StorySplat scene
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* StorySplat Viewer Types
|
|
3
3
|
*/
|
|
4
|
+
/** Special URL value indicating "return to original splat" */
|
|
5
|
+
export declare const ORIGINAL_SPLAT_URL = "__ORIGINAL__";
|
|
4
6
|
export type { ViewerConfig } from '../transformers/sceneToConfig';
|
|
5
7
|
export type { ViewerFromSceneIdOptions } from '../dynamic-viewer/createViewerFromSceneId';
|
|
6
8
|
export type { FrameSequenceConfig, FrameSequencePlayerOptions } from '../dynamic-viewer/FrameSequencePlayer';
|
|
@@ -387,6 +389,10 @@ export interface SceneData {
|
|
|
387
389
|
buttonLabels?: ButtonLabels;
|
|
388
390
|
/** Custom preloader logo URL for whitelabeling */
|
|
389
391
|
customPreloaderLogoUrl?: string;
|
|
392
|
+
/** Enable lazy loading - shows thumbnail with start button before loading */
|
|
393
|
+
lazyLoad?: boolean;
|
|
394
|
+
/** Custom button text for lazy loading. Default: "Start Experience" */
|
|
395
|
+
lazyLoadButtonText?: string;
|
|
390
396
|
};
|
|
391
397
|
defaultCameraMode?: 'first-person' | 'orbit' | 'drone';
|
|
392
398
|
allowedCameraModes?: string[];
|
|
@@ -415,6 +421,8 @@ export interface SceneData {
|
|
|
415
421
|
additionalSplats?: SplatSwapPoint[];
|
|
416
422
|
/** Keep preloaded splats in memory (true = hide/show, false = dispose/reload) */
|
|
417
423
|
keepMeshesInMemory?: boolean;
|
|
424
|
+
/** Standalone spatial audio sources in the scene */
|
|
425
|
+
audioEmitters?: AudioEmitterConfig[];
|
|
418
426
|
/** Frame sequence configuration for 4DGS playback */
|
|
419
427
|
frameSequence?: {
|
|
420
428
|
frameUrls: string[];
|
|
@@ -589,6 +597,8 @@ export interface HotspotData {
|
|
|
589
597
|
fontSize?: number;
|
|
590
598
|
/** Popup font family */
|
|
591
599
|
fontFamily?: string;
|
|
600
|
+
/** Popup close button color (hex) */
|
|
601
|
+
closeButtonColor?: string;
|
|
592
602
|
}
|
|
593
603
|
/**
|
|
594
604
|
* Portal data structure - links to another StorySplat scene
|
|
@@ -684,6 +694,12 @@ export interface ViewerInstance {
|
|
|
684
694
|
getFps?: () => number;
|
|
685
695
|
getFrameProgress?: () => number;
|
|
686
696
|
setFrameProgress?: (progress: number) => void;
|
|
697
|
+
/** Switch back to the original/initial splat */
|
|
698
|
+
goToOriginalSplat: () => void;
|
|
699
|
+
/** Get the URL of the currently displayed splat */
|
|
700
|
+
getCurrentSplatUrl: () => string;
|
|
701
|
+
/** Check if currently showing the original splat */
|
|
702
|
+
isShowingOriginalSplat: () => boolean;
|
|
687
703
|
destroy: () => void;
|
|
688
704
|
resize: () => void;
|
|
689
705
|
navigateToScene: (sceneId: string) => Promise<void>;
|
|
@@ -710,7 +726,7 @@ export interface ViewerOptions {
|
|
|
710
726
|
/**
|
|
711
727
|
* Events emitted by viewer
|
|
712
728
|
*/
|
|
713
|
-
export type ViewerEvent = 'ready' | 'waypointChange' | 'playbackStart' | 'playbackStop' | 'error' | 'loaded' | 'progress' | 'warning' | 'portalActivated' | 'frameChange' | 'frameComplete';
|
|
729
|
+
export type ViewerEvent = 'ready' | 'waypointChange' | 'playbackStart' | 'playbackStop' | 'error' | 'loaded' | 'progress' | 'warning' | 'portalActivated' | 'frameChange' | 'frameComplete' | 'splatChange';
|
|
714
730
|
/**
|
|
715
731
|
* Warning event data structure
|
|
716
732
|
*/
|
|
@@ -720,3 +736,36 @@ export interface ViewerWarning {
|
|
|
720
736
|
details?: string;
|
|
721
737
|
url?: string;
|
|
722
738
|
}
|
|
739
|
+
/**
|
|
740
|
+
* Audio emitter configuration - standalone spatial audio sources
|
|
741
|
+
*/
|
|
742
|
+
export interface AudioEmitterConfig {
|
|
743
|
+
id: string;
|
|
744
|
+
name?: string;
|
|
745
|
+
/** URL to the audio file */
|
|
746
|
+
url: string;
|
|
747
|
+
/** Position in world space */
|
|
748
|
+
position: {
|
|
749
|
+
x: number;
|
|
750
|
+
y: number;
|
|
751
|
+
z: number;
|
|
752
|
+
};
|
|
753
|
+
/** Volume (0-1) */
|
|
754
|
+
volume?: number;
|
|
755
|
+
/** Loop playback */
|
|
756
|
+
loop?: boolean;
|
|
757
|
+
/** Auto-play when scene loads */
|
|
758
|
+
autoplay?: boolean;
|
|
759
|
+
/** Use 3D spatial audio */
|
|
760
|
+
spatialSound?: boolean;
|
|
761
|
+
/** Distance model for spatial audio */
|
|
762
|
+
distanceModel?: 'linear' | 'inverse' | 'exponential';
|
|
763
|
+
/** Maximum distance for spatial audio */
|
|
764
|
+
maxDistance?: number;
|
|
765
|
+
/** Reference distance for spatial audio */
|
|
766
|
+
refDistance?: number;
|
|
767
|
+
/** Rolloff factor for spatial audio */
|
|
768
|
+
rolloffFactor?: number;
|
|
769
|
+
/** Whether the emitter is enabled */
|
|
770
|
+
enabled?: boolean;
|
|
771
|
+
}
|
package/package.json
CHANGED