@spiffcommerce/preview 5.0.0-rc.0 → 5.0.0-rc.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.d.mts +0 -39
- package/dist/index.esm.js +284 -326
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -56,19 +56,6 @@ type ThreeDPreviewService = {
|
|
|
56
56
|
* @param listener The listener to remove.
|
|
57
57
|
*/
|
|
58
58
|
unregisterFocusLostListener(listener: () => void): void;
|
|
59
|
-
/**
|
|
60
|
-
* Providers listeners with information about load progress when
|
|
61
|
-
* the preview is loading scenes.
|
|
62
|
-
* @param listener A function to get load progress updates
|
|
63
|
-
*/
|
|
64
|
-
registerLoadProgressListener(listener: (e: LoadProgressEventData) => void): void;
|
|
65
|
-
/**
|
|
66
|
-
* Allows you to pass any function that originally called registerLoadProgressListener()
|
|
67
|
-
* to have it excluded from load progress updates.
|
|
68
|
-
* If the function was never registered this call has no effect.
|
|
69
|
-
* @param listener The listener to exclude from load progress.
|
|
70
|
-
*/
|
|
71
|
-
unregisterLoadProgressListener(listener: (e: LoadProgressEventData) => void): void;
|
|
72
59
|
/**
|
|
73
60
|
* Provides a callback that will be called when the service has been initialized.
|
|
74
61
|
* @param listener The callback function to add.
|
|
@@ -145,10 +132,6 @@ type ThreeDPreviewService = {
|
|
|
145
132
|
* @param shouldAutoRotate When true rotation is running, paused otherwise.
|
|
146
133
|
*/
|
|
147
134
|
setAutoRotation(shouldAutoRotate: boolean): void;
|
|
148
|
-
/**
|
|
149
|
-
* Get current load progress for the scene.
|
|
150
|
-
*/
|
|
151
|
-
getSceneInitializationProgress(): number;
|
|
152
135
|
/**
|
|
153
136
|
* Returns the current configuration object applied to the scene.
|
|
154
137
|
*/
|
|
@@ -1010,10 +993,6 @@ declare class SpiffCommerce3DPreviewService implements ThreeDPreviewService {
|
|
|
1010
993
|
private readonly configuration;
|
|
1011
994
|
private readonly engine;
|
|
1012
995
|
private readonly scene;
|
|
1013
|
-
/**
|
|
1014
|
-
* The current progress of loading the scene. A value between 0-100.
|
|
1015
|
-
*/
|
|
1016
|
-
private loadProgress;
|
|
1017
996
|
/**
|
|
1018
997
|
* The last camera animation requested if the scene wasn't ready.
|
|
1019
998
|
*/
|
|
@@ -1023,10 +1002,6 @@ declare class SpiffCommerce3DPreviewService implements ThreeDPreviewService {
|
|
|
1023
1002
|
* this field will be set to true.
|
|
1024
1003
|
*/
|
|
1025
1004
|
private focusLostNotified;
|
|
1026
|
-
/**
|
|
1027
|
-
* A list of listener who want to know about the progress of scene loading.
|
|
1028
|
-
*/
|
|
1029
|
-
private loadObservable;
|
|
1030
1005
|
/**
|
|
1031
1006
|
* An observable handling loss of target focus by the camera.
|
|
1032
1007
|
*/
|
|
@@ -1061,8 +1036,6 @@ declare class SpiffCommerce3DPreviewService implements ThreeDPreviewService {
|
|
|
1061
1036
|
};
|
|
1062
1037
|
registerFocusLostListener(listener: () => void): void;
|
|
1063
1038
|
unregisterFocusLostListener(listener: () => void): void;
|
|
1064
|
-
registerLoadProgressListener(listener: (e: LoadProgressEventData) => void): void;
|
|
1065
|
-
unregisterLoadProgressListener(listener: (e: LoadProgressEventData) => void): void;
|
|
1066
1039
|
registerInitializedListener(listener: () => void | Promise<void>): void;
|
|
1067
1040
|
unregisterInitializedListener(listener: () => void | Promise<void>): void;
|
|
1068
1041
|
getIsInitialized(): boolean;
|
|
@@ -1072,7 +1045,6 @@ declare class SpiffCommerce3DPreviewService implements ThreeDPreviewService {
|
|
|
1072
1045
|
getNumViewports(): number;
|
|
1073
1046
|
unregisterView(canvas: HTMLCanvasElement): void;
|
|
1074
1047
|
shutdown(): void;
|
|
1075
|
-
getSceneInitializationProgress(): number;
|
|
1076
1048
|
private renderLoop;
|
|
1077
1049
|
executeCameraAnimation(animation: CameraAnimation): void;
|
|
1078
1050
|
getCameraPose(): CameraPose | undefined;
|
|
@@ -1102,23 +1074,12 @@ declare class SpiffCommerce3DPreviewService implements ThreeDPreviewService {
|
|
|
1102
1074
|
rotation: Vector;
|
|
1103
1075
|
scale: Vector;
|
|
1104
1076
|
};
|
|
1105
|
-
private handleMaterialProgressCallback;
|
|
1106
|
-
private handleModelProgressCallback;
|
|
1107
1077
|
/**
|
|
1108
1078
|
* Given a valid canvas element, will remove any existing input controls
|
|
1109
1079
|
* and re-attach them to the given canvas. The pan mouse button can be set
|
|
1110
1080
|
* to either 0 (left mouse) or 2 (right mouse).
|
|
1111
1081
|
*/
|
|
1112
1082
|
private reattachControls;
|
|
1113
|
-
/**
|
|
1114
|
-
* Computes a load listener event based on current state of scene.
|
|
1115
|
-
*/
|
|
1116
|
-
private getLoadListenerEvent;
|
|
1117
|
-
/**
|
|
1118
|
-
* Computes the average loading time across all loading events and notifies
|
|
1119
|
-
* listeners of the current load progress.
|
|
1120
|
-
*/
|
|
1121
|
-
private notifyLoadHandlers;
|
|
1122
1083
|
}
|
|
1123
1084
|
|
|
1124
1085
|
/**
|