@combeenation/3d-viewer 7.1.3 → 8.1.0-alpha1

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