@babylonjs/viewer 5.0.0 → 5.0.3

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.
Files changed (127) hide show
  1. package/configuration/configuration.d.ts +107 -107
  2. package/configuration/configuration.js +15 -15
  3. package/configuration/configurationCompatibility.d.ts +8 -8
  4. package/configuration/configurationCompatibility.js +65 -65
  5. package/configuration/configurationContainer.d.ts +10 -10
  6. package/configuration/configurationContainer.js +9 -9
  7. package/configuration/globals.d.ts +6 -6
  8. package/configuration/globals.js +17 -17
  9. package/configuration/index.d.ts +2 -2
  10. package/configuration/index.js +3 -3
  11. package/configuration/interfaces/cameraConfiguration.d.ts +31 -31
  12. package/configuration/interfaces/cameraConfiguration.js +1 -1
  13. package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -81
  14. package/configuration/interfaces/colorGradingConfiguration.js +1 -1
  15. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -20
  16. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +1 -1
  17. package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -22
  18. package/configuration/interfaces/environmentMapConfiguration.js +1 -1
  19. package/configuration/interfaces/groundConfiguration.d.ts +24 -24
  20. package/configuration/interfaces/groundConfiguration.js +1 -1
  21. package/configuration/interfaces/imageProcessingConfiguration.d.ts +43 -43
  22. package/configuration/interfaces/imageProcessingConfiguration.js +1 -1
  23. package/configuration/interfaces/index.d.ts +15 -15
  24. package/configuration/interfaces/index.js +15 -15
  25. package/configuration/interfaces/lightConfiguration.d.ts +60 -60
  26. package/configuration/interfaces/lightConfiguration.js +1 -1
  27. package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -26
  28. package/configuration/interfaces/modelAnimationConfiguration.js +1 -1
  29. package/configuration/interfaces/modelConfiguration.d.ts +65 -65
  30. package/configuration/interfaces/modelConfiguration.js +1 -1
  31. package/configuration/interfaces/observersConfiguration.d.ts +5 -5
  32. package/configuration/interfaces/observersConfiguration.js +1 -1
  33. package/configuration/interfaces/sceneConfiguration.d.ts +48 -48
  34. package/configuration/interfaces/sceneConfiguration.js +1 -1
  35. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -23
  36. package/configuration/interfaces/sceneOptimizerConfiguration.js +1 -1
  37. package/configuration/interfaces/skyboxConfiguration.d.ts +21 -21
  38. package/configuration/interfaces/skyboxConfiguration.js +1 -1
  39. package/configuration/interfaces/templateConfiguration.d.ts +67 -67
  40. package/configuration/interfaces/templateConfiguration.js +1 -1
  41. package/configuration/interfaces/vrConfiguration.d.ts +16 -16
  42. package/configuration/interfaces/vrConfiguration.js +1 -1
  43. package/configuration/loader.d.ts +4 -4
  44. package/configuration/loader.js +16 -16
  45. package/configuration/mappers.d.ts +42 -42
  46. package/configuration/mappers.js +190 -190
  47. package/configuration/renderOnlyLoader.d.ts +33 -33
  48. package/configuration/renderOnlyLoader.js +161 -161
  49. package/configuration/types/default.d.ts +6 -6
  50. package/configuration/types/default.js +120 -120
  51. package/configuration/types/environmentMap.d.ts +5 -5
  52. package/configuration/types/environmentMap.js +13 -13
  53. package/configuration/types/extended.d.ts +6 -6
  54. package/configuration/types/extended.js +316 -316
  55. package/configuration/types/index.d.ts +13 -13
  56. package/configuration/types/index.js +49 -49
  57. package/configuration/types/minimal.d.ts +6 -6
  58. package/configuration/types/minimal.js +42 -42
  59. package/configuration/types/renderOnlyDefault.d.ts +30 -30
  60. package/configuration/types/renderOnlyDefault.js +30 -30
  61. package/configuration/types/shadowLight.d.ts +9 -9
  62. package/configuration/types/shadowLight.js +63 -63
  63. package/helper/index.d.ts +26 -26
  64. package/helper/index.js +62 -62
  65. package/index.d.ts +30 -30
  66. package/index.js +45 -45
  67. package/initializer.d.ts +11 -11
  68. package/initializer.js +34 -34
  69. package/interfaces.d.ts +5 -5
  70. package/interfaces.js +1 -1
  71. package/labs/environmentSerializer.d.ts +126 -126
  72. package/labs/environmentSerializer.js +190 -190
  73. package/labs/texture.d.ts +183 -183
  74. package/labs/texture.js +300 -300
  75. package/labs/viewerLabs.d.ts +51 -51
  76. package/labs/viewerLabs.js +133 -133
  77. package/loader/modelLoader.d.ts +47 -47
  78. package/loader/modelLoader.js +189 -189
  79. package/loader/plugins/applyMaterialConfig.d.ts +12 -12
  80. package/loader/plugins/applyMaterialConfig.js +15 -15
  81. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -9
  82. package/loader/plugins/extendedMaterialLoaderPlugin.js +15 -15
  83. package/loader/plugins/index.d.ts +18 -18
  84. package/loader/plugins/index.js +42 -42
  85. package/loader/plugins/loaderPlugin.d.ts +24 -24
  86. package/loader/plugins/loaderPlugin.js +1 -1
  87. package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -12
  88. package/loader/plugins/msftLodLoaderPlugin.js +20 -20
  89. package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -12
  90. package/loader/plugins/telemetryLoaderPlugin.js +35 -35
  91. package/managers/observablesManager.d.ts +66 -66
  92. package/managers/observablesManager.js +34 -34
  93. package/managers/sceneManager.d.ts +243 -243
  94. package/managers/sceneManager.js +1388 -1388
  95. package/managers/telemetryManager.d.ts +57 -57
  96. package/managers/telemetryManager.js +113 -113
  97. package/model/modelAnimation.d.ts +215 -215
  98. package/model/modelAnimation.js +232 -232
  99. package/model/viewerModel.d.ts +228 -228
  100. package/model/viewerModel.js +669 -669
  101. package/optimizer/custom/extended.d.ts +11 -11
  102. package/optimizer/custom/extended.js +98 -98
  103. package/optimizer/custom/index.d.ts +8 -8
  104. package/optimizer/custom/index.js +24 -24
  105. package/package.json +5 -5
  106. package/renderOnlyIndex.d.ts +11 -11
  107. package/renderOnlyIndex.js +17 -17
  108. package/templating/eventManager.d.ts +35 -35
  109. package/templating/eventManager.js +65 -65
  110. package/templating/plugins/hdButtonPlugin.d.ts +9 -9
  111. package/templating/plugins/hdButtonPlugin.js +21 -21
  112. package/templating/plugins/printButton.d.ts +9 -9
  113. package/templating/plugins/printButton.js +40 -40
  114. package/templating/templateManager.d.ts +190 -190
  115. package/templating/templateManager.js +553 -553
  116. package/templating/viewerTemplatePlugin.d.ts +21 -21
  117. package/templating/viewerTemplatePlugin.js +68 -68
  118. package/viewer/defaultViewer.d.ts +122 -122
  119. package/viewer/defaultViewer.js +665 -665
  120. package/viewer/renderOnlyViewer.d.ts +8 -8
  121. package/viewer/renderOnlyViewer.js +43 -43
  122. package/viewer/viewer.d.ts +254 -254
  123. package/viewer/viewer.js +777 -777
  124. package/viewer/viewerManager.d.ts +55 -55
  125. package/viewer/viewerManager.js +87 -87
  126. package/viewer/viewerWithTemplate.d.ts +9 -9
  127. package/viewer/viewerWithTemplate.js +19 -19
@@ -1,215 +1,215 @@
1
- import type { Vector3 } from "@babylonjs/core/Maths/math.vector.js";
2
- import type { AnimationGroup } from "@babylonjs/core/Animations/index.js";
3
- /**
4
- * Animation play mode enum - is the animation looping or playing once
5
- */
6
- export declare enum AnimationPlayMode {
7
- ONCE = 0,
8
- LOOP = 1
9
- }
10
- /**
11
- * An enum representing the current state of an animation object
12
- */
13
- export declare enum AnimationState {
14
- INIT = 0,
15
- PLAYING = 1,
16
- PAUSED = 2,
17
- STOPPED = 3,
18
- ENDED = 4
19
- }
20
- /**
21
- * The different type of easing functions available
22
- */
23
- export declare enum EasingFunction {
24
- Linear = 0,
25
- CircleEase = 1,
26
- BackEase = 2,
27
- BounceEase = 3,
28
- CubicEase = 4,
29
- ElasticEase = 5,
30
- ExponentialEase = 6,
31
- PowerEase = 7,
32
- QuadraticEase = 8,
33
- QuarticEase = 9,
34
- QuinticEase = 10,
35
- SineEase = 11
36
- }
37
- /**
38
- * Defines a simple animation to be applied to a model (scale).
39
- */
40
- export interface ModelAnimationConfiguration {
41
- /**
42
- * Time of animation, in seconds
43
- */
44
- time: number;
45
- /**
46
- * Scale to apply
47
- */
48
- scaling?: Vector3;
49
- /**
50
- * Easing function to apply
51
- * See SPECTRE.EasingFunction
52
- */
53
- easingFunction?: number;
54
- /**
55
- * An Easing mode to apply to the easing function
56
- * See BABYLON.EasingFunction
57
- */
58
- easingMode?: number;
59
- }
60
- /**
61
- * This interface can be implemented to define new types of ModelAnimation objects.
62
- */
63
- export interface IModelAnimation {
64
- /**
65
- * Current animation state (playing, stopped etc')
66
- */
67
- readonly state: AnimationState;
68
- /**
69
- * the name of the animation
70
- */
71
- readonly name: string;
72
- /**
73
- * Get the max numbers of frame available in the animation group
74
- *
75
- * In correlation to an array, this would be ".length"
76
- */
77
- readonly frames: number;
78
- /**
79
- * Get the current frame playing right now.
80
- * This can be used to poll the frame currently playing (and, for example, display a progress bar with the data)
81
- *
82
- * In correlation to an array, this would be the current index
83
- */
84
- readonly currentFrame: number;
85
- /**
86
- * Animation's FPS value
87
- */
88
- readonly fps: number;
89
- /**
90
- * Get or set the animation's speed ration (Frame-to-fps)
91
- */
92
- speedRatio: number;
93
- /**
94
- * Gets or sets the aimation's play mode.
95
- */
96
- playMode: AnimationPlayMode;
97
- /**
98
- * Start the animation
99
- */
100
- start(): void;
101
- /**
102
- * Stop the animation.
103
- * This will fail silently if the animation group is already stopped.
104
- */
105
- stop(): void;
106
- /**
107
- * Pause the animation
108
- * This will fail silently if the animation is not currently playing
109
- */
110
- pause(): void;
111
- /**
112
- * Reset this animation
113
- */
114
- reset(): void;
115
- /**
116
- * Restart the animation
117
- */
118
- restart(): void;
119
- /**
120
- * Go to a specific
121
- * @param frameNumber the frame number to go to
122
- */
123
- goToFrame(frameNumber: number): void;
124
- /**
125
- * Dispose this animation
126
- */
127
- dispose(): void;
128
- }
129
- /**
130
- * The GroupModelAnimation is an implementation of the IModelAnimation interface using BABYLON's
131
- * native GroupAnimation class.
132
- */
133
- export declare class GroupModelAnimation implements IModelAnimation {
134
- private _animationGroup;
135
- private _playMode;
136
- private _state;
137
- /**
138
- * Create a new GroupModelAnimation object using an AnimationGroup object
139
- * @param _animationGroup The animation group to base the class on
140
- */
141
- constructor(_animationGroup: AnimationGroup);
142
- /**
143
- * Get the animation's name
144
- */
145
- get name(): string;
146
- /**
147
- * Get the current animation's state
148
- */
149
- get state(): AnimationState;
150
- /**
151
- * Gets the speed ratio to use for all animations
152
- */
153
- get speedRatio(): number;
154
- /**
155
- * Sets the speed ratio to use for all animations
156
- */
157
- set speedRatio(value: number);
158
- /**
159
- * Get the max numbers of frame available in the animation group
160
- *
161
- * In correlation to an array, this would be ".length"
162
- */
163
- get frames(): number;
164
- /**
165
- * Get the current frame playing right now.
166
- * This can be used to poll the frame currently playing (and, for example, display a progress bar with the data)
167
- *
168
- * In correlation to an array, this would be the current index
169
- */
170
- get currentFrame(): number;
171
- /**
172
- * Get the FPS value of this animation
173
- */
174
- get fps(): number;
175
- /**
176
- * What is the animation'S play mode (looping or played once)
177
- */
178
- get playMode(): AnimationPlayMode;
179
- /**
180
- * Set the play mode.
181
- * If the animation is played, it will continue playing at least once more, depending on the new play mode set.
182
- * If the animation is not set, the will be initialized and will wait for the user to start playing it.
183
- */
184
- set playMode(value: AnimationPlayMode);
185
- /**
186
- * Reset the animation group
187
- */
188
- reset(): void;
189
- /**
190
- * Restart the animation group
191
- */
192
- restart(): void;
193
- /**
194
- *
195
- * @param frameNumber Go to a specific frame in the animation
196
- */
197
- goToFrame(frameNumber: number): void;
198
- /**
199
- * Start playing the animation.
200
- */
201
- start(): void;
202
- /**
203
- * Pause the animation
204
- */
205
- pause(): void;
206
- /**
207
- * Stop the animation.
208
- * This will fail silently if the animation group is already stopped.
209
- */
210
- stop(): void;
211
- /**
212
- * Dispose this animation object.
213
- */
214
- dispose(): void;
215
- }
1
+ import type { Vector3 } from "@babylonjs/core/Maths/math.vector.js";
2
+ import type { AnimationGroup } from "@babylonjs/core/Animations/index.js";
3
+ /**
4
+ * Animation play mode enum - is the animation looping or playing once
5
+ */
6
+ export declare enum AnimationPlayMode {
7
+ ONCE = 0,
8
+ LOOP = 1
9
+ }
10
+ /**
11
+ * An enum representing the current state of an animation object
12
+ */
13
+ export declare enum AnimationState {
14
+ INIT = 0,
15
+ PLAYING = 1,
16
+ PAUSED = 2,
17
+ STOPPED = 3,
18
+ ENDED = 4
19
+ }
20
+ /**
21
+ * The different type of easing functions available
22
+ */
23
+ export declare enum EasingFunction {
24
+ Linear = 0,
25
+ CircleEase = 1,
26
+ BackEase = 2,
27
+ BounceEase = 3,
28
+ CubicEase = 4,
29
+ ElasticEase = 5,
30
+ ExponentialEase = 6,
31
+ PowerEase = 7,
32
+ QuadraticEase = 8,
33
+ QuarticEase = 9,
34
+ QuinticEase = 10,
35
+ SineEase = 11
36
+ }
37
+ /**
38
+ * Defines a simple animation to be applied to a model (scale).
39
+ */
40
+ export interface ModelAnimationConfiguration {
41
+ /**
42
+ * Time of animation, in seconds
43
+ */
44
+ time: number;
45
+ /**
46
+ * Scale to apply
47
+ */
48
+ scaling?: Vector3;
49
+ /**
50
+ * Easing function to apply
51
+ * See SPECTRE.EasingFunction
52
+ */
53
+ easingFunction?: number;
54
+ /**
55
+ * An Easing mode to apply to the easing function
56
+ * See BABYLON.EasingFunction
57
+ */
58
+ easingMode?: number;
59
+ }
60
+ /**
61
+ * This interface can be implemented to define new types of ModelAnimation objects.
62
+ */
63
+ export interface IModelAnimation {
64
+ /**
65
+ * Current animation state (playing, stopped etc')
66
+ */
67
+ readonly state: AnimationState;
68
+ /**
69
+ * the name of the animation
70
+ */
71
+ readonly name: string;
72
+ /**
73
+ * Get the max numbers of frame available in the animation group
74
+ *
75
+ * In correlation to an array, this would be ".length"
76
+ */
77
+ readonly frames: number;
78
+ /**
79
+ * Get the current frame playing right now.
80
+ * This can be used to poll the frame currently playing (and, for example, display a progress bar with the data)
81
+ *
82
+ * In correlation to an array, this would be the current index
83
+ */
84
+ readonly currentFrame: number;
85
+ /**
86
+ * Animation's FPS value
87
+ */
88
+ readonly fps: number;
89
+ /**
90
+ * Get or set the animation's speed ration (Frame-to-fps)
91
+ */
92
+ speedRatio: number;
93
+ /**
94
+ * Gets or sets the aimation's play mode.
95
+ */
96
+ playMode: AnimationPlayMode;
97
+ /**
98
+ * Start the animation
99
+ */
100
+ start(): void;
101
+ /**
102
+ * Stop the animation.
103
+ * This will fail silently if the animation group is already stopped.
104
+ */
105
+ stop(): void;
106
+ /**
107
+ * Pause the animation
108
+ * This will fail silently if the animation is not currently playing
109
+ */
110
+ pause(): void;
111
+ /**
112
+ * Reset this animation
113
+ */
114
+ reset(): void;
115
+ /**
116
+ * Restart the animation
117
+ */
118
+ restart(): void;
119
+ /**
120
+ * Go to a specific
121
+ * @param frameNumber the frame number to go to
122
+ */
123
+ goToFrame(frameNumber: number): void;
124
+ /**
125
+ * Dispose this animation
126
+ */
127
+ dispose(): void;
128
+ }
129
+ /**
130
+ * The GroupModelAnimation is an implementation of the IModelAnimation interface using BABYLON's
131
+ * native GroupAnimation class.
132
+ */
133
+ export declare class GroupModelAnimation implements IModelAnimation {
134
+ private _animationGroup;
135
+ private _playMode;
136
+ private _state;
137
+ /**
138
+ * Create a new GroupModelAnimation object using an AnimationGroup object
139
+ * @param _animationGroup The animation group to base the class on
140
+ */
141
+ constructor(_animationGroup: AnimationGroup);
142
+ /**
143
+ * Get the animation's name
144
+ */
145
+ get name(): string;
146
+ /**
147
+ * Get the current animation's state
148
+ */
149
+ get state(): AnimationState;
150
+ /**
151
+ * Gets the speed ratio to use for all animations
152
+ */
153
+ get speedRatio(): number;
154
+ /**
155
+ * Sets the speed ratio to use for all animations
156
+ */
157
+ set speedRatio(value: number);
158
+ /**
159
+ * Get the max numbers of frame available in the animation group
160
+ *
161
+ * In correlation to an array, this would be ".length"
162
+ */
163
+ get frames(): number;
164
+ /**
165
+ * Get the current frame playing right now.
166
+ * This can be used to poll the frame currently playing (and, for example, display a progress bar with the data)
167
+ *
168
+ * In correlation to an array, this would be the current index
169
+ */
170
+ get currentFrame(): number;
171
+ /**
172
+ * Get the FPS value of this animation
173
+ */
174
+ get fps(): number;
175
+ /**
176
+ * What is the animation'S play mode (looping or played once)
177
+ */
178
+ get playMode(): AnimationPlayMode;
179
+ /**
180
+ * Set the play mode.
181
+ * If the animation is played, it will continue playing at least once more, depending on the new play mode set.
182
+ * If the animation is not set, the will be initialized and will wait for the user to start playing it.
183
+ */
184
+ set playMode(value: AnimationPlayMode);
185
+ /**
186
+ * Reset the animation group
187
+ */
188
+ reset(): void;
189
+ /**
190
+ * Restart the animation group
191
+ */
192
+ restart(): void;
193
+ /**
194
+ *
195
+ * @param frameNumber Go to a specific frame in the animation
196
+ */
197
+ goToFrame(frameNumber: number): void;
198
+ /**
199
+ * Start playing the animation.
200
+ */
201
+ start(): void;
202
+ /**
203
+ * Pause the animation
204
+ */
205
+ pause(): void;
206
+ /**
207
+ * Stop the animation.
208
+ * This will fail silently if the animation group is already stopped.
209
+ */
210
+ stop(): void;
211
+ /**
212
+ * Dispose this animation object.
213
+ */
214
+ dispose(): void;
215
+ }