@combeenation/3d-viewer 5.2.0-alpha5 → 6.1.0-beta1

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 (191) hide show
  1. package/README.md +111 -111
  2. package/dist/lib-cjs/api/classes/animationInterface.d.ts +8 -8
  3. package/dist/lib-cjs/api/classes/animationInterface.js +2 -2
  4. package/dist/lib-cjs/api/classes/dottedPath.d.ts +79 -79
  5. package/dist/lib-cjs/api/classes/dottedPath.js +166 -166
  6. package/dist/lib-cjs/api/classes/element.d.ts +149 -149
  7. package/dist/lib-cjs/api/classes/element.js +669 -669
  8. package/dist/lib-cjs/api/classes/element.js.map +1 -1
  9. package/dist/lib-cjs/api/classes/event.d.ts +342 -326
  10. package/dist/lib-cjs/api/classes/event.js +365 -349
  11. package/dist/lib-cjs/api/classes/event.js.map +1 -1
  12. package/dist/lib-cjs/api/classes/eventBroadcaster.d.ts +26 -26
  13. package/dist/lib-cjs/api/classes/eventBroadcaster.js +49 -49
  14. package/dist/lib-cjs/api/classes/parameter.d.ts +339 -339
  15. package/dist/lib-cjs/api/classes/parameter.js +464 -464
  16. package/dist/lib-cjs/api/classes/parameterObservable.d.ts +36 -36
  17. package/dist/lib-cjs/api/classes/parameterObservable.js +97 -97
  18. package/dist/lib-cjs/api/classes/parameterizable.d.ts +15 -15
  19. package/dist/lib-cjs/api/classes/parameterizable.js +102 -102
  20. package/dist/lib-cjs/api/classes/placementAnimation.d.ts +45 -45
  21. package/dist/lib-cjs/api/classes/placementAnimation.js +176 -176
  22. package/dist/lib-cjs/api/classes/variant.d.ts +234 -234
  23. package/dist/lib-cjs/api/classes/variant.js +836 -836
  24. package/dist/lib-cjs/api/classes/variant.js.map +1 -1
  25. package/dist/lib-cjs/api/classes/variantInstance.d.ts +44 -44
  26. package/dist/lib-cjs/api/classes/variantInstance.js +105 -105
  27. package/dist/lib-cjs/api/classes/variantParameterizable.d.ts +17 -17
  28. package/dist/lib-cjs/api/classes/variantParameterizable.js +88 -88
  29. package/dist/lib-cjs/api/classes/viewer.d.ts +187 -189
  30. package/dist/lib-cjs/api/classes/viewer.js +594 -594
  31. package/dist/lib-cjs/api/classes/viewer.js.map +1 -1
  32. package/dist/lib-cjs/api/classes/viewerLight.d.ts +66 -66
  33. package/dist/lib-cjs/api/classes/viewerLight.js +348 -348
  34. package/dist/lib-cjs/api/internal/lensRendering.d.ts +8 -8
  35. package/dist/lib-cjs/api/internal/lensRendering.js +11 -11
  36. package/dist/lib-cjs/api/internal/sceneSetup.d.ts +13 -13
  37. package/dist/lib-cjs/api/internal/sceneSetup.js +226 -226
  38. package/dist/lib-cjs/api/manager/animationManager.d.ts +30 -30
  39. package/dist/lib-cjs/api/manager/animationManager.js +126 -126
  40. package/dist/lib-cjs/api/manager/gltfExportManager.d.ts +78 -65
  41. package/dist/lib-cjs/api/manager/gltfExportManager.js +241 -197
  42. package/dist/lib-cjs/api/manager/gltfExportManager.js.map +1 -1
  43. package/dist/lib-cjs/api/manager/sceneManager.d.ts +33 -31
  44. package/dist/lib-cjs/api/manager/sceneManager.js +130 -127
  45. package/dist/lib-cjs/api/manager/sceneManager.js.map +1 -1
  46. package/dist/lib-cjs/api/manager/textureLoadManager.d.ts +22 -0
  47. package/dist/lib-cjs/api/manager/textureLoadManager.js +98 -0
  48. package/dist/lib-cjs/api/manager/textureLoadManager.js.map +1 -0
  49. package/dist/lib-cjs/api/manager/variantInstanceManager.d.ts +92 -92
  50. package/dist/lib-cjs/api/manager/variantInstanceManager.js +260 -260
  51. package/dist/lib-cjs/api/store/specStorage.d.ts +24 -24
  52. package/dist/lib-cjs/api/store/specStorage.js +50 -50
  53. package/dist/lib-cjs/api/util/babylonHelper.d.ts +183 -174
  54. package/dist/lib-cjs/api/util/babylonHelper.js +596 -585
  55. package/dist/lib-cjs/api/util/babylonHelper.js.map +1 -1
  56. package/dist/lib-cjs/api/util/globalTypes.d.ts +383 -370
  57. package/dist/lib-cjs/api/util/globalTypes.js +1 -1
  58. package/dist/lib-cjs/api/util/resourceHelper.d.ts +58 -58
  59. package/dist/lib-cjs/api/util/resourceHelper.js +203 -203
  60. package/dist/lib-cjs/api/util/sceneLoaderHelper.d.ts +42 -35
  61. package/dist/lib-cjs/api/util/sceneLoaderHelper.js +139 -139
  62. package/dist/lib-cjs/api/util/sceneLoaderHelper.js.map +1 -1
  63. package/dist/lib-cjs/api/util/stringHelper.d.ts +9 -9
  64. package/dist/lib-cjs/api/util/stringHelper.js +25 -25
  65. package/dist/lib-cjs/api/util/structureHelper.d.ts +9 -9
  66. package/dist/lib-cjs/api/util/structureHelper.js +48 -48
  67. package/dist/lib-cjs/buildinfo.json +3 -3
  68. package/dist/lib-cjs/commonjs.tsconfig.tsbuildinfo +1 -1
  69. package/dist/lib-cjs/index.d.ts +51 -51
  70. package/dist/lib-cjs/index.js +110 -110
  71. package/dist/webpack-stats.json +0 -0
  72. package/package.json +79 -79
  73. package/src/api/classes/animationInterface.ts +10 -10
  74. package/src/api/classes/dottedPath.ts +181 -181
  75. package/src/api/classes/element.ts +717 -717
  76. package/src/api/classes/event.ts +385 -367
  77. package/src/api/classes/eventBroadcaster.ts +52 -52
  78. package/src/api/classes/parameter.ts +497 -497
  79. package/src/api/classes/parameterObservable.ts +100 -100
  80. package/src/api/classes/parameterizable.ts +87 -87
  81. package/src/api/classes/placementAnimation.ts +162 -162
  82. package/src/api/classes/variant.ts +904 -904
  83. package/src/api/classes/variantInstance.ts +97 -97
  84. package/src/api/classes/variantParameterizable.ts +85 -85
  85. package/src/api/classes/viewer.ts +672 -670
  86. package/src/api/classes/viewerLight.ts +339 -339
  87. package/src/api/internal/debugViewer.ts +90 -90
  88. package/src/api/internal/lensRendering.ts +9 -9
  89. package/src/api/internal/sceneSetup.ts +205 -205
  90. package/src/api/manager/animationManager.ts +143 -143
  91. package/src/api/manager/gltfExportManager.ts +236 -192
  92. package/src/api/manager/sceneManager.ts +132 -127
  93. package/src/api/manager/textureLoadManager.ts +95 -0
  94. package/src/api/manager/variantInstanceManager.ts +265 -265
  95. package/src/api/store/specStorage.ts +51 -51
  96. package/src/api/util/babylonHelper.ts +658 -645
  97. package/src/api/util/globalTypes.ts +432 -417
  98. package/src/api/util/resourceHelper.ts +191 -191
  99. package/src/api/util/sceneLoaderHelper.ts +137 -144
  100. package/src/api/util/stringHelper.ts +23 -23
  101. package/src/api/util/structureHelper.ts +49 -49
  102. package/src/buildinfo.json +3 -3
  103. package/src/dev.ts +61 -61
  104. package/src/index.ts +96 -96
  105. package/src/types.d.ts +28 -28
  106. package/dist/lib-es6/api/classes/animationInterface.d.ts +0 -8
  107. package/dist/lib-es6/api/classes/animationInterface.js +0 -2
  108. package/dist/lib-es6/api/classes/animationInterface.js.map +0 -1
  109. package/dist/lib-es6/api/classes/dottedPath.d.ts +0 -79
  110. package/dist/lib-es6/api/classes/dottedPath.js +0 -163
  111. package/dist/lib-es6/api/classes/dottedPath.js.map +0 -1
  112. package/dist/lib-es6/api/classes/element.d.ts +0 -149
  113. package/dist/lib-es6/api/classes/element.js +0 -666
  114. package/dist/lib-es6/api/classes/element.js.map +0 -1
  115. package/dist/lib-es6/api/classes/event.d.ts +0 -326
  116. package/dist/lib-es6/api/classes/event.js +0 -346
  117. package/dist/lib-es6/api/classes/event.js.map +0 -1
  118. package/dist/lib-es6/api/classes/eventBroadcaster.d.ts +0 -26
  119. package/dist/lib-es6/api/classes/eventBroadcaster.js +0 -43
  120. package/dist/lib-es6/api/classes/eventBroadcaster.js.map +0 -1
  121. package/dist/lib-es6/api/classes/parameter.d.ts +0 -339
  122. package/dist/lib-es6/api/classes/parameter.js +0 -461
  123. package/dist/lib-es6/api/classes/parameter.js.map +0 -1
  124. package/dist/lib-es6/api/classes/parameterObservable.d.ts +0 -36
  125. package/dist/lib-es6/api/classes/parameterObservable.js +0 -94
  126. package/dist/lib-es6/api/classes/parameterObservable.js.map +0 -1
  127. package/dist/lib-es6/api/classes/parameterizable.d.ts +0 -15
  128. package/dist/lib-es6/api/classes/parameterizable.js +0 -99
  129. package/dist/lib-es6/api/classes/parameterizable.js.map +0 -1
  130. package/dist/lib-es6/api/classes/placementAnimation.d.ts +0 -45
  131. package/dist/lib-es6/api/classes/placementAnimation.js +0 -173
  132. package/dist/lib-es6/api/classes/placementAnimation.js.map +0 -1
  133. package/dist/lib-es6/api/classes/variant.d.ts +0 -234
  134. package/dist/lib-es6/api/classes/variant.js +0 -833
  135. package/dist/lib-es6/api/classes/variant.js.map +0 -1
  136. package/dist/lib-es6/api/classes/variantInstance.d.ts +0 -44
  137. package/dist/lib-es6/api/classes/variantInstance.js +0 -102
  138. package/dist/lib-es6/api/classes/variantInstance.js.map +0 -1
  139. package/dist/lib-es6/api/classes/variantParameterizable.d.ts +0 -17
  140. package/dist/lib-es6/api/classes/variantParameterizable.js +0 -85
  141. package/dist/lib-es6/api/classes/variantParameterizable.js.map +0 -1
  142. package/dist/lib-es6/api/classes/viewer.d.ts +0 -189
  143. package/dist/lib-es6/api/classes/viewer.js +0 -588
  144. package/dist/lib-es6/api/classes/viewer.js.map +0 -1
  145. package/dist/lib-es6/api/classes/viewerLight.d.ts +0 -66
  146. package/dist/lib-es6/api/classes/viewerLight.js +0 -322
  147. package/dist/lib-es6/api/classes/viewerLight.js.map +0 -1
  148. package/dist/lib-es6/api/internal/lensRendering.d.ts +0 -8
  149. package/dist/lib-es6/api/internal/lensRendering.js +0 -9
  150. package/dist/lib-es6/api/internal/lensRendering.js.map +0 -1
  151. package/dist/lib-es6/api/internal/sceneSetup.d.ts +0 -13
  152. package/dist/lib-es6/api/internal/sceneSetup.js +0 -199
  153. package/dist/lib-es6/api/internal/sceneSetup.js.map +0 -1
  154. package/dist/lib-es6/api/manager/animationManager.d.ts +0 -30
  155. package/dist/lib-es6/api/manager/animationManager.js +0 -123
  156. package/dist/lib-es6/api/manager/animationManager.js.map +0 -1
  157. package/dist/lib-es6/api/manager/gltfExportManager.d.ts +0 -65
  158. package/dist/lib-es6/api/manager/gltfExportManager.js +0 -194
  159. package/dist/lib-es6/api/manager/gltfExportManager.js.map +0 -1
  160. package/dist/lib-es6/api/manager/sceneManager.d.ts +0 -31
  161. package/dist/lib-es6/api/manager/sceneManager.js +0 -124
  162. package/dist/lib-es6/api/manager/sceneManager.js.map +0 -1
  163. package/dist/lib-es6/api/manager/variantInstanceManager.d.ts +0 -92
  164. package/dist/lib-es6/api/manager/variantInstanceManager.js +0 -257
  165. package/dist/lib-es6/api/manager/variantInstanceManager.js.map +0 -1
  166. package/dist/lib-es6/api/store/specStorage.d.ts +0 -24
  167. package/dist/lib-es6/api/store/specStorage.js +0 -47
  168. package/dist/lib-es6/api/store/specStorage.js.map +0 -1
  169. package/dist/lib-es6/api/util/babylonHelper.d.ts +0 -174
  170. package/dist/lib-es6/api/util/babylonHelper.js +0 -556
  171. package/dist/lib-es6/api/util/babylonHelper.js.map +0 -1
  172. package/dist/lib-es6/api/util/globalTypes.d.ts +0 -370
  173. package/dist/lib-es6/api/util/globalTypes.js +0 -2
  174. package/dist/lib-es6/api/util/globalTypes.js.map +0 -1
  175. package/dist/lib-es6/api/util/resourceHelper.d.ts +0 -58
  176. package/dist/lib-es6/api/util/resourceHelper.js +0 -194
  177. package/dist/lib-es6/api/util/resourceHelper.js.map +0 -1
  178. package/dist/lib-es6/api/util/sceneLoaderHelper.d.ts +0 -35
  179. package/dist/lib-es6/api/util/sceneLoaderHelper.js +0 -130
  180. package/dist/lib-es6/api/util/sceneLoaderHelper.js.map +0 -1
  181. package/dist/lib-es6/api/util/stringHelper.d.ts +0 -9
  182. package/dist/lib-es6/api/util/stringHelper.js +0 -22
  183. package/dist/lib-es6/api/util/stringHelper.js.map +0 -1
  184. package/dist/lib-es6/api/util/structureHelper.d.ts +0 -9
  185. package/dist/lib-es6/api/util/structureHelper.js +0 -46
  186. package/dist/lib-es6/api/util/structureHelper.js.map +0 -1
  187. package/dist/lib-es6/buildinfo.json +0 -3
  188. package/dist/lib-es6/es6.tsconfig.tsbuildinfo +0 -1
  189. package/dist/lib-es6/index.d.ts +0 -51
  190. package/dist/lib-es6/index.js +0 -49
  191. package/dist/lib-es6/index.js.map +0 -1
@@ -1,417 +1,432 @@
1
- // global accessible types imported from 3d-viewer
2
- type Viewer = import('../classes/viewer').Viewer;
3
- type Variant = import('../classes/variant').Variant;
4
- type VariantInstance = import('../classes/variantInstance').VariantInstance;
5
- /**
6
- * Alias for {@link Element} which can be used to prevent name clashes with the web APIs
7
- * [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) class
8
- */
9
- type VariantElement = import('../classes/element').Element;
10
- type DottedPath = import('../classes/dottedPath').DottedPath;
11
- type ViewerLight = import('../classes/viewerLight').ViewerLight;
12
- type SceneManager = import('../manager/sceneManager').SceneManager;
13
-
14
- // global accessible types imported from BabylonJS
15
- type Scene = import('@babylonjs/core/scene').Scene;
16
- type Vector3 = import('@babylonjs/core/Maths/math.vector').Vector3;
17
- type Color3 = import('@babylonjs/core/Maths/math.color').Color3;
18
- type Color4 = import('@babylonjs/core/Maths/math.color').Color4;
19
- type Material = import('@babylonjs/core/Materials/material').Material;
20
- type PBRMaterial = import('@babylonjs/core/Materials/PBR/pbrMaterial').PBRMaterial;
21
- type StandardMaterial = import('@babylonjs/core/Materials/standardMaterial').StandardMaterial;
22
- type DynamicTexture = import('@babylonjs/core/Materials/Textures/dynamicTexture').DynamicTexture;
23
- type Mesh = import('@babylonjs/core/Meshes/mesh').Mesh;
24
- type AbstractMesh = import('@babylonjs/core/Meshes/abstractMesh').AbstractMesh;
25
- type InstancedMesh = import('@babylonjs/core/Meshes/instancedMesh').InstancedMesh;
26
- type TransformNode = import('@babylonjs/core/Meshes/transformNode').TransformNode;
27
- type Engine = import('@babylonjs/core/Engines/engine').Engine;
28
- type EngineOptions = import('@babylonjs/core/Engines/thinEngine').EngineOptions;
29
- type ArcRotateCamera = import('@babylonjs/core/Cameras/arcRotateCamera').ArcRotateCamera;
30
- type IScreenshotSize = import('@babylonjs/core/Misc/interfaces/screenshotSize').IScreenshotSize;
31
- type BabylonAnimation = import('@babylonjs/core/Animations/animation').Animation;
32
- type CubeTexture = import('@babylonjs/core/Materials/Textures/cubeTexture').CubeTexture;
33
- type MeshBuilder = typeof import('@babylonjs/core/Meshes/meshBuilder').MeshBuilder;
34
- type Texture = import('@babylonjs/core/Materials/Textures/texture').Texture;
35
- type HemisphericLight = import('@babylonjs/core/Lights/hemisphericLight').HemisphericLight;
36
- type DirectionalLight = import('@babylonjs/core/Lights/directionalLight').DirectionalLight;
37
- type IInspectorOptions = import('@babylonjs/core/Debug').IInspectorOptions;
38
- // Node is already defined in lib.dom.d.ts, so it can't be declared that way
39
- // type Node = import("@babylonjs/core/node").Node;
40
-
41
- type EventEmitter = import('eventemitter3');
42
-
43
- // some more global accessible types
44
- type PathDefinitions = {
45
- include: string[];
46
- exclude?: string[];
47
- };
48
-
49
- type TraceableDefinition = {
50
- path: string;
51
- };
52
-
53
- type TraceableDefinitions = {
54
- [name: string]: TraceableDefinition;
55
- };
56
-
57
- type PaintableDefinition = {
58
- path: string;
59
- textureOptions:
60
- | {
61
- width: number;
62
- height: number;
63
- }
64
- | number;
65
- };
66
-
67
- type PaintableDefinitions = {
68
- [name: string]: PaintableDefinition;
69
- };
70
-
71
- type Asset = {
72
- rootUrl: string;
73
- fileName: string | undefined;
74
- };
75
-
76
- type ElementDefinitions = {
77
- [name: string]: ElementDefinition | string[];
78
- };
79
-
80
- type ElementDefinition = {
81
- paths: PathDefinitions;
82
- traceables?: TraceableDefinitions;
83
- paintables?: PaintableDefinitions;
84
- };
85
-
86
- type TransformationDefinition = {
87
- scaling: Vector3;
88
- position: Vector3;
89
- rotation: Vector3;
90
- };
91
-
92
- type EnvironmentDefinition = {
93
- environmentColor?: Color3;
94
- environmentIntensity?: number;
95
- environment?: string;
96
- environmentBackground?: string;
97
- environmentRotation?: number;
98
- environmentUseDefault?: boolean;
99
- };
100
-
101
- type StructureJson = {
102
- /**
103
- * `scene` describes the visualisation of the Babylon `scene` such as the incidence of light and camera position. If a
104
- * string is given, the {@link Viewer} will resolve the URL or path and pass the parsed JSON to this property.
105
- */
106
- scene?: string | SceneJson;
107
- /**
108
- * `setup` is a kind of construction plan for the {@link Viewer}. You can pass a {@link SetupJson} or a string, which
109
- * must represent a valid URL or path. If a string is given, the {@link Viewer} will resolve the URL or path and pass
110
- * the parsed JSON to this property. The {@link SetupJson} is responsible for managing a list of
111
- * {@link VariantInstanceDefinition}s. These definitions define the instances that should be instantiated during the
112
- * bootstrapping process. Each instance has a name and a reference to it's {@link Variant}.
113
- */
114
- setup?: string | SetupJson;
115
- file?: string;
116
- glTF?: Asset | string;
117
- parameterDeclaration?: ParameterDeclarations;
118
- parameters?: ParameterBag;
119
- elements?: ElementDefinitions;
120
- lights?: LightDefinitions;
121
- grounds?: GroundDefinitions;
122
- /**
123
- * `variants` is a declarative description of 3D-model variations in the configurator. Each variant itself is a
124
- * {@link StructureJson} which must at least define a `name` in the key of the list and the properties `glTF` and
125
- * `elements` in the value. FYI: BabylonJS's sandbox can show you the path of the 3D-model to properly define the
126
- * `paths`.
127
- *
128
- * Example Code
129
- * ```js
130
- * variants: {
131
- * 'My Pretty Variant' {
132
- * glTF: {
133
- * rootUrl: 'https:/my.awesome.domain/path/to/my/project/',
134
- * fileName: 'my_3d_model_file.glb',
135
- * },
136
- * elements: {
137
- * 'My Little Element': {
138
- * paths: {
139
- * includes: ['__root__.MeshName']
140
- * }
141
- * }
142
- * }
143
- * }
144
- * }
145
- * ```
146
- * `MeshName` has to be identical to the path in the glb-file of the 3D-model.
147
- */
148
- variants?: {
149
- [id: string]: StructureJson;
150
- };
151
- };
152
-
153
- type SceneJson = {
154
- parameterDeclaration?: ParameterDeclarations;
155
- parameters?: ParameterBag;
156
- meshPicking?: boolean;
157
- /**
158
- * Information about [EngineOptions](https://doc.babylonjs.com/typedoc/interfaces/babylon.engineoptions).
159
- */
160
- engine?: {
161
- antialiasing?: boolean;
162
- options?: EngineOptions;
163
- };
164
- scene: SceneDefinition;
165
- animations?: AnimationDefinitions;
166
- placements?: PlacementDefinitions;
167
- /**
168
- * Information about [material cloning](pages/Release%20Notes/releases/4-3-0.html#material-cloning-on-mutation)
169
- */
170
- cloneMaterialsOnMutation?: boolean;
171
- };
172
-
173
- type SceneDefinition = {
174
- globals: SceneGlobals;
175
- cameras?: CameraDefinitions;
176
- };
177
-
178
- type SceneGlobals = {
179
- 'shadows'?: {
180
- enabled: boolean;
181
- type: 'contact';
182
- settings: [];
183
- generator: [];
184
- receiver: [];
185
- };
186
- /**
187
- * `aa` or anti aliasing is not needed if hard edges are desired.\
188
- * FYI: aa smooths edges and avoids stairs-effects.
189
- */
190
- 'aa'?: 'fxaa';
191
- 'tone-mapping'?: boolean;
192
- /**
193
- * @bloom is widely known as glow. There you can define it’s size (Specifies the size of the bloom blur kernel,
194
- * relative to the final output size) and threshold (The luminance threshold to find bright areas of the image to
195
- * bloom).
196
- * Further Information under [BloomEffect](https://doc.babylonjs.com/typedoc/classes/babylon.bloomeffect).
197
- *
198
- * @dof short for "depth-of-field" defines the focus in the view. Parameters in settings are listed in [Depth of Field and Other Lens Effects link](https://doc.babylonjs.com/divingDeeper/postProcesses/dofLenseEffects).
199
- * @exposure specifies the intensity of the lightning of the view (not 3D-Model).
200
- * @sharpen´s parameter `settings` are listed in [Default Rendering Pipeline Sharpening link](https://doc.babylonjs.com/divingDeeper/postProcesses/defaultRenderingPipeline#sharpening).
201
- */
202
- 'camera-settings'?: {
203
- contrast: number;
204
- exposure: number;
205
- bloom?: {
206
- enabled: boolean;
207
- size?: number;
208
- threshold?: number;
209
- };
210
- dof?: {
211
- enabled: boolean;
212
- settings: {};
213
- };
214
- sharpen?: {
215
- enabled: boolean;
216
- settings: {};
217
- };
218
- };
219
- };
220
-
221
- /**
222
- * {@link Viewer.screenshot} internally uses Babylons [ScreenshotTools.CreateScreenshotUsingRenderTarget](https://doc.babylonjs.com/typedoc/classes/babylon.screenshottools#createscreenshotusingrendertarget). \
223
- * See this link for additional info about the properties.
224
- */
225
- type ScreenshotSettings = {
226
- /** Defaults to canvas width & height */
227
- size?: IScreenshotSize;
228
- /**
229
- * Default `image/png`
230
- *
231
- * **Info regarding JPEG:** \
232
- * Use mimeType `image/jpeg` (**not** `image/jpg`) when creating jpeg's. \
233
- * Also ensure that {@link Scene.clearColor | viewer.scene.clearColor} has an alpha value of `1` as jpeg's don't
234
- * support transparency. Otherwise background will always be black for jpeg's.
235
- */
236
- mimeType?: string;
237
- /** Default `1` */
238
- samples?: number;
239
- /** Default `false` */
240
- antialiasing?: boolean;
241
- /** Default `screenshot.png` */
242
- fileName?: string;
243
- /** Default `false` */
244
- renderSprites?: boolean;
245
- };
246
-
247
- /**
248
- * Use this to define geometry to be excluded from autofocus, GLB export, etc.
249
- */
250
- type ExcludedGeometry = Mesh | AbstractMesh | VariantInstance | Variant | VariantElement | Node;
251
- type ExcludedGeometryList = ExcludedGeometry[];
252
-
253
- type AutofocusSettings = {
254
- /**
255
- * Can be used to customize the margins shown around the 3d model when calling {@link Viewer.autofocusActiveCamera}.\
256
- * Defaults to 1.5 when not set explicitly.
257
- */
258
- radiusFactor?: number;
259
- adjustWheelPrecision?: boolean;
260
- adjustPanningSensibility?: boolean;
261
- adjustPinchPrecision?: boolean;
262
- /** Desired horizontal camera angle, this won't be overwritten by the autofocus function */
263
- alpha?: number;
264
- /** Desired vertical camera angle, this won't be overwritten by the autofocus function */
265
- beta?: number;
266
- /** Optional animation for the focusing camera movement */
267
- animation?: string | AnimationDefinition;
268
- /** Optional list of geometry to be excluded from consideration */
269
- exclude?: ExcludedGeometryList;
270
- };
271
-
272
- type LightDefinitions = {
273
- [name: string]: LightDefinition | string;
274
- };
275
-
276
- type LightDefinition = {
277
- type: 'baked' | 'hemispheric' | 'point' | 'directional' | 'spot';
278
- path?: string;
279
- shadowGenerator?: ShadowGeneratorDefinition;
280
- };
281
-
282
- type ShadowGeneratorDefinition = {
283
- mapSize: number;
284
- [others: string]: any;
285
- /**
286
- * Further properties like `usePoissonSampling` are set directly on the ShadowGenerator object.
287
- * [Shadows](https://doc.babylonjs.com/divingDeeper/lights/shadows)
288
- */
289
- };
290
-
291
- type GroundDefinitions = {
292
- [ground: string]: GroundDefinition;
293
- };
294
-
295
- type GroundDefinition = {
296
- type: 'baked' | 'ground' | 'heightmap';
297
- meshId?: string;
298
- url?: string;
299
- width?: number;
300
- height?: number;
301
- subdivisions?: number;
302
- receiveShadows?: boolean;
303
- minHeight?: number;
304
- maxHeight?: number;
305
- alphaFilter?: number;
306
- onReady?: any;
307
- };
308
-
309
- type CameraDefinitions = {
310
- [camera: string]: CameraDefinition;
311
- };
312
-
313
- type CameraDefinition = {
314
- /**
315
- * `fov` or "Field Of View" defines as it says the view of the scene. Further information about its [theory](https://en.wikipedia.org/wiki/Field_of_view) and [implementation](https://doc.babylonjs.com/typedoc/classes/babylon.camera#fov).
316
- */
317
- fov?: number;
318
- active?: boolean;
319
- /**
320
- * `arc` is a default camera position where the 3D-model is the center and the camera rotates around the 3D-model.
321
- * More Information about `arc` in [ArcRotateCamera](https://doc.babylonjs.com/typedoc/classes/babylon.arcrotatecamera).
322
- *
323
- * NOTE: While "baked" camera definitions from a GLB or babylon file can currently not be instatiated within the
324
- * `Specification`, it's still possible to use them in the viewer.\
325
- * For the moment all camera definitions inside these files are automatically added to the scene and can be actived
326
- * using the {@link Viewer.switchCamera} function.\
327
- * The `newCamera` input has to match the name of the camera node inside the GLB/babylon file.
328
- */
329
- type: 'arc';
330
- /**
331
- * `target` overrides `arc`´s position and repositions the camera. The string has the syntax (x?: number, y?: number, z?: number) like [Vector3](https://doc.babylonjs.com/typedoc/classes/babylon.vector3).
332
- */
333
- target?: string;
334
- };
335
-
336
- type VariantInstanceDefinition = {
337
- name?: string;
338
- variant: DottedPathArgument;
339
- parameters?: ParameterBag;
340
- lazy?: boolean;
341
- };
342
-
343
- type SetupJson = {
344
- instances: VariantInstanceDefinition[];
345
- };
346
-
347
- type ParameterDeclarations = {
348
- [name: string]: ParameterDeclaration;
349
- };
350
-
351
- type ParameterDeclaration = {
352
- type: 'string' | 'boolean' | 'number' | 'color' | 'select' | 'vector' | 'csl';
353
- parser?: any;
354
- options?: ParameterValue[];
355
- };
356
-
357
- type ParameterValue = string | number | boolean;
358
-
359
- type ParameterBag = {
360
- [name: string]: ParameterValue;
361
- };
362
-
363
- type ParsedParameterBag = {
364
- [name: string]: any;
365
- };
366
-
367
- type DottedPathArgument = string | string[] | DottedPath;
368
-
369
- type ParameterObserver = (object: any, oldValue: ParameterValue, newValue: ParameterValue) => void;
370
-
371
- type PlacementDefinitions = {
372
- [name: string]: PlacementDefinition;
373
- };
374
-
375
- type PlacementDefinition = {
376
- position?: string | Vector3;
377
- alpha?: number;
378
- beta?: number;
379
- radius?: number;
380
- target?: string | Vector3;
381
- };
382
-
383
- type AnimationDefinitions = {
384
- [name: string]: AnimationDefinition;
385
- };
386
-
387
- /**
388
- * See [GSAP API Docs](https://greensock.com/docs/v3/GSAP/Tween/vars) for description of `GSAPTWeenVars`.
389
- *
390
- * You can use the [GreenSock Ease Visualizer](https://greensock.com/ease-visualizer/) to create an animation of your
391
- * liking and simply copy the `ease` function shown at the bottom of the visualizer into the `ease` property of your
392
- * {@link AnimationDefinition}.
393
- *
394
- * The `GSAPTWeenVars` are extended by the `shortestWay` property.\
395
- * This property defines if the camera should move to the target position within the shortest possible distance.\
396
- * If `shortestWay` is `false`, the camera moves the whole difference between the current camera position and the target
397
- * position and that could be > 360, which can appear very unconvenient to the operator.\
398
- * The default value of this flag is `true`.
399
- *
400
- * Example usage in {@link SceneJson | SceneJson.animations}:
401
- *
402
- * ```js
403
- * // ...
404
- * scene: {
405
- * // ...
406
- * animations: {
407
- * DefaultCameraAnimation: {
408
- * ease: 'Power3.easeInOut',
409
- * duration: 0.8,
410
- * },
411
- * },
412
- * // ...
413
- * }
414
- * // ...
415
- * ```
416
- */
417
- type AnimationDefinition = GSAPTweenVars & { shortestWay?: boolean };
1
+ // global accessible types imported from 3d-viewer
2
+ type Viewer = import('../classes/viewer').Viewer;
3
+ type Variant = import('../classes/variant').Variant;
4
+ type VariantInstance = import('../classes/variantInstance').VariantInstance;
5
+ /**
6
+ * Alias for {@link Element} which can be used to prevent name clashes with the web APIs
7
+ * [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) class
8
+ */
9
+ type VariantElement = import('../classes/element').Element;
10
+ type DottedPath = import('../classes/dottedPath').DottedPath;
11
+ type ViewerLight = import('../classes/viewerLight').ViewerLight;
12
+ type SceneManager = import('../manager/sceneManager').SceneManager;
13
+
14
+ // global accessible types imported from BabylonJS
15
+ type Scene = import('@babylonjs/core/scene').Scene;
16
+ type Vector3 = import('@babylonjs/core/Maths/math.vector').Vector3;
17
+ type Color3 = import('@babylonjs/core/Maths/math.color').Color3;
18
+ type Color4 = import('@babylonjs/core/Maths/math.color').Color4;
19
+ type Material = import('@babylonjs/core/Materials/material').Material;
20
+ type PBRMaterial = import('@babylonjs/core/Materials/PBR/pbrMaterial').PBRMaterial;
21
+ type StandardMaterial = import('@babylonjs/core/Materials/standardMaterial').StandardMaterial;
22
+ type DynamicTexture = import('@babylonjs/core/Materials/Textures/dynamicTexture').DynamicTexture;
23
+ type Mesh = import('@babylonjs/core/Meshes/mesh').Mesh;
24
+ type AbstractMesh = import('@babylonjs/core/Meshes/abstractMesh').AbstractMesh;
25
+ type InstancedMesh = import('@babylonjs/core/Meshes/instancedMesh').InstancedMesh;
26
+ type TransformNode = import('@babylonjs/core/Meshes/transformNode').TransformNode;
27
+ type Engine = import('@babylonjs/core/Engines/engine').Engine;
28
+ type EngineOptions = import('@babylonjs/core/Engines/thinEngine').EngineOptions;
29
+ type ArcRotateCamera = import('@babylonjs/core/Cameras/arcRotateCamera').ArcRotateCamera;
30
+ type IScreenshotSize = import('@babylonjs/core/Misc/interfaces/screenshotSize').IScreenshotSize;
31
+ type BabylonAnimation = import('@babylonjs/core/Animations/animation').Animation;
32
+ type CubeTexture = import('@babylonjs/core/Materials/Textures/cubeTexture').CubeTexture;
33
+ type MeshBuilder = typeof import('@babylonjs/core/Meshes/meshBuilder').MeshBuilder;
34
+ type Texture = import('@babylonjs/core/Materials/Textures/texture').Texture;
35
+ type HemisphericLight = import('@babylonjs/core/Lights/hemisphericLight').HemisphericLight;
36
+ type DirectionalLight = import('@babylonjs/core/Lights/directionalLight').DirectionalLight;
37
+ type IInspectorOptions = import('@babylonjs/core/Debug').IInspectorOptions;
38
+ // Node is already defined in lib.dom.d.ts, so it can't be declared that way
39
+ // type Node = import("@babylonjs/core/node").Node;
40
+
41
+ type IExportOptions = import('@babylonjs/serializers/glTF/2.0').IExportOptions;
42
+
43
+ type EventEmitter = import('eventemitter3');
44
+
45
+ // some more global accessible types
46
+ type PathDefinitions = {
47
+ include: string[];
48
+ exclude?: string[];
49
+ };
50
+
51
+ type TraceableDefinition = {
52
+ path: string;
53
+ };
54
+
55
+ type TraceableDefinitions = {
56
+ [name: string]: TraceableDefinition;
57
+ };
58
+
59
+ type PaintableDefinition = {
60
+ path: string;
61
+ textureOptions:
62
+ | {
63
+ width: number;
64
+ height: number;
65
+ }
66
+ | number;
67
+ };
68
+
69
+ type PaintableDefinitions = {
70
+ [name: string]: PaintableDefinition;
71
+ };
72
+
73
+ type Asset = {
74
+ rootUrl: string;
75
+ fileName: string | undefined;
76
+ };
77
+
78
+ type ElementDefinitions = {
79
+ [name: string]: ElementDefinition | string[];
80
+ };
81
+
82
+ type ElementDefinition = {
83
+ paths: PathDefinitions;
84
+ traceables?: TraceableDefinitions;
85
+ paintables?: PaintableDefinitions;
86
+ };
87
+
88
+ type TransformationDefinition = {
89
+ scaling: Vector3;
90
+ position: Vector3;
91
+ rotation: Vector3;
92
+ };
93
+
94
+ type EnvironmentDefinition = {
95
+ environmentColor?: Color3;
96
+ environmentIntensity?: number;
97
+ environment?: string;
98
+ environmentBackground?: string;
99
+ environmentRotation?: number;
100
+ environmentUseDefault?: boolean;
101
+ };
102
+
103
+ type StructureJson = {
104
+ /**
105
+ * `scene` describes the visualisation of the Babylon `scene` such as the incidence of light and camera position. If a
106
+ * string is given, the {@link Viewer} will resolve the URL or path and pass the parsed JSON to this property.
107
+ */
108
+ scene?: string | SceneJson;
109
+ /**
110
+ * `setup` is a kind of construction plan for the {@link Viewer}. You can pass a {@link SetupJson} or a string, which
111
+ * must represent a valid URL or path. If a string is given, the {@link Viewer} will resolve the URL or path and pass
112
+ * the parsed JSON to this property. The {@link SetupJson} is responsible for managing a list of
113
+ * {@link VariantInstanceDefinition}s. These definitions define the instances that should be instantiated during the
114
+ * bootstrapping process. Each instance has a name and a reference to it's {@link Variant}.
115
+ */
116
+ setup?: string | SetupJson;
117
+ file?: string;
118
+ glTF?: Asset | string;
119
+ parameterDeclaration?: ParameterDeclarations;
120
+ parameters?: ParameterBag;
121
+ elements?: ElementDefinitions;
122
+ lights?: LightDefinitions;
123
+ grounds?: GroundDefinitions;
124
+ /**
125
+ * `variants` is a declarative description of 3D-model variations in the configurator. Each variant itself is a
126
+ * {@link StructureJson} which must at least define a `name` in the key of the list and the properties `glTF` and
127
+ * `elements` in the value. FYI: BabylonJS's sandbox can show you the path of the 3D-model to properly define the
128
+ * `paths`.
129
+ *
130
+ * Example Code
131
+ * ```js
132
+ * variants: {
133
+ * 'My Pretty Variant' {
134
+ * glTF: {
135
+ * rootUrl: 'https:/my.awesome.domain/path/to/my/project/',
136
+ * fileName: 'my_3d_model_file.glb',
137
+ * },
138
+ * elements: {
139
+ * 'My Little Element': {
140
+ * paths: {
141
+ * includes: ['__root__.MeshName']
142
+ * }
143
+ * }
144
+ * }
145
+ * }
146
+ * }
147
+ * ```
148
+ * `MeshName` has to be identical to the path in the glb-file of the 3D-model.
149
+ */
150
+ variants?: {
151
+ [id: string]: StructureJson;
152
+ };
153
+ };
154
+
155
+ type SceneJson = {
156
+ parameterDeclaration?: ParameterDeclarations;
157
+ parameters?: ParameterBag;
158
+ meshPicking?: boolean;
159
+ /**
160
+ * Information about [EngineOptions](https://doc.babylonjs.com/typedoc/interfaces/babylon.engineoptions).
161
+ */
162
+ engine?: {
163
+ antialiasing?: boolean;
164
+ options?: EngineOptions;
165
+ };
166
+ scene: SceneDefinition;
167
+ animations?: AnimationDefinitions;
168
+ placements?: PlacementDefinitions;
169
+ /**
170
+ * Information about [material cloning](pages/Release%20Notes/releases/4-3-0.html#material-cloning-on-mutation)
171
+ */
172
+ cloneMaterialsOnMutation?: boolean;
173
+ };
174
+
175
+ type SceneDefinition = {
176
+ globals: SceneGlobals;
177
+ cameras?: CameraDefinitions;
178
+ };
179
+
180
+ type SceneGlobals = {
181
+ 'shadows'?: {
182
+ enabled: boolean;
183
+ type: 'contact';
184
+ settings: [];
185
+ generator: [];
186
+ receiver: [];
187
+ };
188
+ /**
189
+ * `aa` or anti aliasing is not needed if hard edges are desired.\
190
+ * FYI: aa smooths edges and avoids stairs-effects.
191
+ */
192
+ 'aa'?: 'fxaa';
193
+ 'tone-mapping'?: boolean;
194
+ /**
195
+ * @bloom is widely known as glow. There you can define it’s size (Specifies the size of the bloom blur kernel,
196
+ * relative to the final output size) and threshold (The luminance threshold to find bright areas of the image to
197
+ * bloom).
198
+ * Further Information under [BloomEffect](https://doc.babylonjs.com/typedoc/classes/babylon.bloomeffect).
199
+ *
200
+ * @dof short for "depth-of-field" defines the focus in the view. Parameters in settings are listed in [Depth of Field and Other Lens Effects link](https://doc.babylonjs.com/divingDeeper/postProcesses/dofLenseEffects).
201
+ * @exposure specifies the intensity of the lightning of the view (not 3D-Model).
202
+ * @sharpen´s parameter `settings` are listed in [Default Rendering Pipeline Sharpening link](https://doc.babylonjs.com/divingDeeper/postProcesses/defaultRenderingPipeline#sharpening).
203
+ */
204
+ 'camera-settings'?: {
205
+ contrast: number;
206
+ exposure: number;
207
+ bloom?: {
208
+ enabled: boolean;
209
+ size?: number;
210
+ threshold?: number;
211
+ };
212
+ dof?: {
213
+ enabled: boolean;
214
+ settings: {};
215
+ };
216
+ sharpen?: {
217
+ enabled: boolean;
218
+ settings: {};
219
+ };
220
+ };
221
+ };
222
+
223
+ /**
224
+ * {@link Viewer.screenshot} internally uses Babylons [ScreenshotTools.CreateScreenshotUsingRenderTarget](https://doc.babylonjs.com/typedoc/classes/babylon.screenshottools#createscreenshotusingrendertarget). \
225
+ * See this link for additional info about the properties.
226
+ */
227
+ type ScreenshotSettings = {
228
+ /** Defaults to canvas width & height */
229
+ size?: IScreenshotSize;
230
+ /**
231
+ * Default `image/png`
232
+ *
233
+ * **Info regarding JPEG:** \
234
+ * Use mimeType `image/jpeg` (**not** `image/jpg`) when creating jpeg's. \
235
+ * Also ensure that {@link Scene.clearColor | viewer.scene.clearColor} has an alpha value of `1` as jpeg's don't
236
+ * support transparency. Otherwise background will always be black for jpeg's.
237
+ */
238
+ mimeType?: string;
239
+ /** Default `1` */
240
+ samples?: number;
241
+ /** Default `false` */
242
+ antialiasing?: boolean;
243
+ /** Default `screenshot.png` */
244
+ fileName?: string;
245
+ /** Default `false` */
246
+ renderSprites?: boolean;
247
+ };
248
+
249
+ /**
250
+ * Use this to define geometry to be excluded from autofocus, GLB export, etc.
251
+ */
252
+ type ExcludedGeometry = Mesh | AbstractMesh | VariantInstance | Variant | VariantElement | Node;
253
+ type ExcludedGeometryList = ExcludedGeometry[];
254
+
255
+ type AutofocusSettings = {
256
+ /**
257
+ * Can be used to customize the margins shown around the 3d model when calling {@link Viewer.autofocusActiveCamera}.\
258
+ * Defaults to 1.5 when not set explicitly.
259
+ */
260
+ radiusFactor?: number;
261
+ adjustWheelPrecision?: boolean;
262
+ adjustPanningSensibility?: boolean;
263
+ adjustPinchPrecision?: boolean;
264
+ /** Desired horizontal camera angle, this won't be overwritten by the autofocus function */
265
+ alpha?: number;
266
+ /** Desired vertical camera angle, this won't be overwritten by the autofocus function */
267
+ beta?: number;
268
+ /** Optional animation for the focusing camera movement */
269
+ animation?: string | AnimationDefinition;
270
+ /** Optional list of geometry to be excluded from consideration */
271
+ exclude?: ExcludedGeometryList;
272
+ };
273
+
274
+ type LightDefinitions = {
275
+ [name: string]: LightDefinition | string;
276
+ };
277
+
278
+ type LightDefinition = {
279
+ type: 'baked' | 'hemispheric' | 'point' | 'directional' | 'spot';
280
+ path?: string;
281
+ shadowGenerator?: ShadowGeneratorDefinition;
282
+ };
283
+
284
+ type ShadowGeneratorDefinition = {
285
+ mapSize: number;
286
+ [others: string]: any;
287
+ /**
288
+ * Further properties like `usePoissonSampling` are set directly on the ShadowGenerator object.
289
+ * [Shadows](https://doc.babylonjs.com/divingDeeper/lights/shadows)
290
+ */
291
+ };
292
+
293
+ type GroundDefinitions = {
294
+ [ground: string]: GroundDefinition;
295
+ };
296
+
297
+ type GroundDefinition = {
298
+ type: 'baked' | 'ground' | 'heightmap';
299
+ meshId?: string;
300
+ url?: string;
301
+ width?: number;
302
+ height?: number;
303
+ subdivisions?: number;
304
+ receiveShadows?: boolean;
305
+ minHeight?: number;
306
+ maxHeight?: number;
307
+ alphaFilter?: number;
308
+ onReady?: any;
309
+ };
310
+
311
+ type CameraDefinitions = {
312
+ [camera: string]: CameraDefinition;
313
+ };
314
+
315
+ type CameraDefinition = {
316
+ /**
317
+ * `fov` or "Field Of View" defines as it says the view of the scene. Further information about its [theory](https://en.wikipedia.org/wiki/Field_of_view) and [implementation](https://doc.babylonjs.com/typedoc/classes/babylon.camera#fov).
318
+ */
319
+ fov?: number;
320
+ active?: boolean;
321
+ /**
322
+ * `arc` is a default camera position where the 3D-model is the center and the camera rotates around the 3D-model.
323
+ * More Information about `arc` in [ArcRotateCamera](https://doc.babylonjs.com/typedoc/classes/babylon.arcrotatecamera).
324
+ *
325
+ * NOTE: While "baked" camera definitions from a GLB or babylon file can currently not be instatiated within the
326
+ * `Specification`, it's still possible to use them in the viewer.\
327
+ * For the moment all camera definitions inside these files are automatically added to the scene and can be actived
328
+ * using the {@link Viewer.switchCamera} function.\
329
+ * The `newCamera` input has to match the name of the camera node inside the GLB/babylon file.
330
+ */
331
+ type: 'arc';
332
+ /**
333
+ * `target` overrides `arc`´s position and repositions the camera. The string has the syntax (x?: number, y?: number, z?: number) like [Vector3](https://doc.babylonjs.com/typedoc/classes/babylon.vector3).
334
+ */
335
+ target?: string;
336
+ };
337
+
338
+ type VariantInstanceDefinition = {
339
+ name?: string;
340
+ variant: DottedPathArgument;
341
+ parameters?: ParameterBag;
342
+ lazy?: boolean;
343
+ };
344
+
345
+ type SetupJson = {
346
+ instances: VariantInstanceDefinition[];
347
+ };
348
+
349
+ type ParameterDeclarations = {
350
+ [name: string]: ParameterDeclaration;
351
+ };
352
+
353
+ type ParameterDeclaration = {
354
+ type: 'string' | 'boolean' | 'number' | 'color' | 'select' | 'vector' | 'csl';
355
+ parser?: any;
356
+ options?: ParameterValue[];
357
+ };
358
+
359
+ type ParameterValue = string | number | boolean;
360
+
361
+ type ParameterBag = {
362
+ [name: string]: ParameterValue;
363
+ };
364
+
365
+ type ParsedParameterBag = {
366
+ [name: string]: any;
367
+ };
368
+
369
+ type DottedPathArgument = string | string[] | DottedPath;
370
+
371
+ type ParameterObserver = (object: any, oldValue: ParameterValue, newValue: ParameterValue) => void;
372
+
373
+ type PlacementDefinitions = {
374
+ [name: string]: PlacementDefinition;
375
+ };
376
+
377
+ type PlacementDefinition = {
378
+ position?: string | Vector3;
379
+ alpha?: number;
380
+ beta?: number;
381
+ radius?: number;
382
+ target?: string | Vector3;
383
+ };
384
+
385
+ type AnimationDefinitions = {
386
+ [name: string]: AnimationDefinition;
387
+ };
388
+
389
+ /**
390
+ * See [GSAP API Docs](https://greensock.com/docs/v3/GSAP/Tween/vars) for description of `GSAPTWeenVars`.
391
+ *
392
+ * You can use the [GreenSock Ease Visualizer](https://greensock.com/ease-visualizer/) to create an animation of your
393
+ * liking and simply copy the `ease` function shown at the bottom of the visualizer into the `ease` property of your
394
+ * {@link AnimationDefinition}.
395
+ *
396
+ * The `GSAPTWeenVars` are extended by the `shortestWay` property.\
397
+ * This property defines if the camera should move to the target position within the shortest possible distance.\
398
+ * If `shortestWay` is `false`, the camera moves the whole difference between the current camera position and the target
399
+ * position and that could be > 360, which can appear very unconvenient to the operator.\
400
+ * The default value of this flag is `true`.
401
+ *
402
+ * Example usage in {@link SceneJson | SceneJson.animations}:
403
+ *
404
+ * ```js
405
+ * // ...
406
+ * scene: {
407
+ * // ...
408
+ * animations: {
409
+ * DefaultCameraAnimation: {
410
+ * ease: 'Power3.easeInOut',
411
+ * duration: 0.8,
412
+ * },
413
+ * },
414
+ * // ...
415
+ * }
416
+ * // ...
417
+ * ```
418
+ */
419
+ type AnimationDefinition = GSAPTweenVars & { shortestWay?: boolean };
420
+
421
+ /**
422
+ * Extends Babylon JSs {@link IExportOptions} by some viewer specific settings
423
+ */
424
+ interface IExportOptionsExtended extends IExportOptions {
425
+ /**
426
+ * In certain situations multiple meshes in the viewer scene have the same name (e.g. when cloning instances).\
427
+ * If this option is set, the exporter adjusts all mesh names before export to have a unique name.\
428
+ * This is required e.g. if the exported file is used to show an AR scene with the model viewer which requires all
429
+ * meshes to have unique names.
430
+ */
431
+ createUniqueMeshNames?: boolean;
432
+ }