@combeenation/3d-viewer 4.0.0-beta3 → 4.0.0-beta4

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 (92) hide show
  1. package/README.md +112 -112
  2. package/dist/lib-cjs/api/classes/animationInterface.d.ts +8 -8
  3. package/dist/lib-cjs/api/classes/animationInterface.js +1 -1
  4. package/dist/lib-cjs/api/classes/dottedPath.d.ts +79 -79
  5. package/dist/lib-cjs/api/classes/dottedPath.js +190 -190
  6. package/dist/lib-cjs/api/classes/element.d.ts +125 -125
  7. package/dist/lib-cjs/api/classes/element.js +682 -682
  8. package/dist/lib-cjs/api/classes/elementParameterizable.d.ts +14 -14
  9. package/dist/lib-cjs/api/classes/elementParameterizable.js +134 -134
  10. package/dist/lib-cjs/api/classes/event.d.ts +312 -312
  11. package/dist/lib-cjs/api/classes/event.js +357 -357
  12. package/dist/lib-cjs/api/classes/eventBroadcaster.d.ts +26 -26
  13. package/dist/lib-cjs/api/classes/eventBroadcaster.js +53 -53
  14. package/dist/lib-cjs/api/classes/parameter.d.ts +165 -165
  15. package/dist/lib-cjs/api/classes/parameter.js +267 -267
  16. package/dist/lib-cjs/api/classes/parameterObservable.d.ts +36 -36
  17. package/dist/lib-cjs/api/classes/parameterObservable.js +126 -126
  18. package/dist/lib-cjs/api/classes/parameterizable.d.ts +15 -15
  19. package/dist/lib-cjs/api/classes/parameterizable.js +149 -149
  20. package/dist/lib-cjs/api/classes/placementAnimation.d.ts +38 -38
  21. package/dist/lib-cjs/api/classes/placementAnimation.js +138 -138
  22. package/dist/lib-cjs/api/classes/variant.d.ts +190 -190
  23. package/dist/lib-cjs/api/classes/variant.js +873 -873
  24. package/dist/lib-cjs/api/classes/variantInstance.d.ts +41 -41
  25. package/dist/lib-cjs/api/classes/variantInstance.js +98 -98
  26. package/dist/lib-cjs/api/classes/variantParameterizable.d.ts +17 -17
  27. package/dist/lib-cjs/api/classes/variantParameterizable.js +92 -92
  28. package/dist/lib-cjs/api/classes/viewer.d.ts +128 -128
  29. package/dist/lib-cjs/api/classes/viewer.js +486 -486
  30. package/dist/lib-cjs/api/classes/viewerLight.d.ts +65 -66
  31. package/dist/lib-cjs/api/classes/viewerLight.js +322 -389
  32. package/dist/lib-cjs/api/classes/viewerLight.js.map +1 -1
  33. package/dist/lib-cjs/api/internal/debugViewer.d.ts +13 -13
  34. package/dist/lib-cjs/api/internal/debugViewer.js +87 -87
  35. package/dist/lib-cjs/api/internal/lensRendering.d.ts +8 -8
  36. package/dist/lib-cjs/api/internal/lensRendering.js +11 -11
  37. package/dist/lib-cjs/api/internal/sceneSetup.d.ts +6 -6
  38. package/dist/lib-cjs/api/internal/sceneSetup.js +227 -227
  39. package/dist/lib-cjs/api/manager/animationManager.d.ts +29 -29
  40. package/dist/lib-cjs/api/manager/animationManager.js +121 -121
  41. package/dist/lib-cjs/api/manager/sceneManager.d.ts +32 -32
  42. package/dist/lib-cjs/api/manager/sceneManager.js +132 -132
  43. package/dist/lib-cjs/api/manager/variantInstanceManager.d.ts +90 -90
  44. package/dist/lib-cjs/api/manager/variantInstanceManager.js +321 -321
  45. package/dist/lib-cjs/api/store/specStorage.d.ts +24 -24
  46. package/dist/lib-cjs/api/store/specStorage.js +51 -51
  47. package/dist/lib-cjs/api/util/babylonHelper.d.ts +125 -125
  48. package/dist/lib-cjs/api/util/babylonHelper.js +368 -368
  49. package/dist/lib-cjs/api/util/globalTypes.d.ts +279 -279
  50. package/dist/lib-cjs/api/util/globalTypes.js +1 -1
  51. package/dist/lib-cjs/api/util/resourceHelper.d.ts +51 -48
  52. package/dist/lib-cjs/api/util/resourceHelper.js +243 -240
  53. package/dist/lib-cjs/api/util/resourceHelper.js.map +1 -1
  54. package/dist/lib-cjs/api/util/stringHelper.d.ts +9 -9
  55. package/dist/lib-cjs/api/util/stringHelper.js +25 -25
  56. package/dist/lib-cjs/buildinfo.json +3 -3
  57. package/dist/lib-cjs/index.d.ts +46 -46
  58. package/dist/lib-cjs/index.js +82 -82
  59. package/dist/webpack-stats.json +0 -0
  60. package/package.json +83 -83
  61. package/src/api/classes/animationInterface.ts +11 -11
  62. package/src/api/classes/dottedPath.ts +189 -189
  63. package/src/api/classes/element.ts +617 -617
  64. package/src/api/classes/elementParameterizable.ts +78 -78
  65. package/src/api/classes/event.ts +355 -355
  66. package/src/api/classes/eventBroadcaster.ts +54 -54
  67. package/src/api/classes/parameter.ts +277 -277
  68. package/src/api/classes/parameterObservable.ts +121 -121
  69. package/src/api/classes/placementAnimation.ts +133 -133
  70. package/src/api/classes/variant.ts +670 -670
  71. package/src/api/classes/variantInstance.ts +81 -81
  72. package/src/api/classes/viewer.ts +421 -421
  73. package/src/api/internal/debugViewer.ts +81 -81
  74. package/src/api/internal/lensRendering.ts +10 -10
  75. package/src/api/internal/sceneSetup.ts +203 -203
  76. package/src/api/manager/animationManager.ts +116 -116
  77. package/src/api/manager/sceneManager.ts +105 -105
  78. package/src/api/manager/variantInstanceManager.ts +236 -236
  79. package/src/api/store/specStorage.ts +53 -53
  80. package/src/api/util/babylonHelper.ts +392 -392
  81. package/src/api/util/globalTypes.ts +318 -318
  82. package/src/api/util/resourceHelper.ts +187 -184
  83. package/src/buildinfo.json +2 -2
  84. package/src/commonjs.tsconfig.json +13 -13
  85. package/src/declaration.tsconfig.json +10 -10
  86. package/src/dev.ts +46 -46
  87. package/src/es6.tsconfig.json +13 -13
  88. package/src/index.ts +87 -87
  89. package/src/pagesconfig.json +57 -57
  90. package/src/tsconfig.json +43 -43
  91. package/src/tsconfig.types.json +9 -9
  92. package/src/types.d.ts +4 -4
@@ -1,279 +1,279 @@
1
- declare type Viewer = import("../classes/viewer").Viewer;
2
- declare type Variant = import("../classes/variant").Variant;
3
- declare type VariantInstance = import("../classes/variantInstance").VariantInstance;
4
- /**
5
- * Alias for {@link Element} which can be used to prevent name clashes with the web APIs
6
- * [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) class
7
- */
8
- declare type VariantElement = import("../classes/element").Element;
9
- declare type DottedPath = import("../classes/dottedPath").DottedPath;
10
- declare type Scene = import("@babylonjs/core/scene").Scene;
11
- declare type Vector3 = import("@babylonjs/core/Maths/math.vector").Vector3;
12
- declare type Color3 = import("@babylonjs/core/Maths/math.color").Color3;
13
- declare type Color4 = import("@babylonjs/core/Maths/math.color").Color4;
14
- declare type Material = import("@babylonjs/core/Materials/material").Material;
15
- declare type PBRMaterial = import("@babylonjs/core/Materials/PBR/pbrMaterial").PBRMaterial;
16
- declare type StandardMaterial = import("@babylonjs/core/Materials/standardMaterial").StandardMaterial;
17
- declare type DynamicTexture = import("@babylonjs/core/Materials/Textures/dynamicTexture").DynamicTexture;
18
- declare type Mesh = import("@babylonjs/core/Meshes/mesh").Mesh;
19
- declare type AbstractMesh = import("@babylonjs/core/Meshes/abstractMesh").AbstractMesh;
20
- declare type InstancedMesh = import("@babylonjs/core/Meshes/instancedMesh").InstancedMesh;
21
- declare type TransformNode = import("@babylonjs/core/Meshes/transformNode").TransformNode;
22
- declare type Engine = import("@babylonjs/core/Engines/engine").Engine;
23
- declare type EngineOptions = import("@babylonjs/core/Engines/thinEngine").EngineOptions;
24
- declare type ArcRotateCamera = import("@babylonjs/core/Cameras/arcRotateCamera").ArcRotateCamera;
25
- declare type IScreenshotSize = import("@babylonjs/core/Misc/interfaces/screenshotSize").IScreenshotSize;
26
- declare type BabylonAnimation = import('@babylonjs/core/Animations/animation').Animation;
27
- declare type CubeTexture = import('@babylonjs/core/Materials/Textures/cubeTexture').CubeTexture;
28
- declare type MeshBuilder = import('@babylonjs/core/Meshes/meshBuilder').MeshBuilder;
29
- declare type Texture = import('@babylonjs/core/Materials/Textures/texture').Texture;
30
- declare type HemisphericLight = import('@babylonjs/core/Lights/hemisphericLight').HemisphericLight;
31
- declare type DirectionalLight = import('@babylonjs/core/Lights/directionalLight').DirectionalLight;
32
- declare type EventEmitter = import('eventemitter3');
33
- declare type PathDefinitions = {
34
- include: string[];
35
- exclude?: string[];
36
- };
37
- declare type TraceableDefinition = {
38
- path: string;
39
- };
40
- declare type TraceableDefinitions = {
41
- [name: string]: TraceableDefinition;
42
- };
43
- declare type PaintableDefinition = {
44
- path: string;
45
- textureOptions: {
46
- width: number;
47
- height: number;
48
- } | number;
49
- };
50
- declare type PaintableDefinitions = {
51
- [name: string]: PaintableDefinition;
52
- };
53
- declare type Asset = {
54
- rootUrl: string;
55
- fileName: string | undefined;
56
- };
57
- declare type ElementDefinition = {
58
- paths: PathDefinitions;
59
- traceables?: TraceableDefinitions;
60
- paintables?: PaintableDefinitions;
61
- };
62
- declare type StructureJson = {
63
- /**
64
- * `scene` describes the visualisation of the Babylon `scene` such as the incidence of light and camera position. If a
65
- * string is given, the {@link Viewer} will resolve the URL or path and pass the parsed JSON to this property.
66
- */
67
- scene?: string | SceneJson;
68
- /**
69
- * `setup` is a kind of construction plan for the {@link Viewer}. You can pass a {@link SetupJson} or a string, which
70
- * must represent a valid URL or path. If a string is given, the {@link Viewer} will resolve the URL or path and pass
71
- * the parsed JSON to this property. The {@link SetupJson} is responsible for managing a list of
72
- * {@link VariantInstanceDefinition}s. These definitions define the instances that should be instantiated during the
73
- * bootstrapping process. Each instance has a name and a reference to it's {@link Variant}.
74
- */
75
- setup?: string | SetupJson;
76
- file?: string;
77
- glTF?: Asset | string;
78
- parameterDeclaration?: ParameterDeclarations;
79
- parameters?: ParameterBag;
80
- elements?: {
81
- [name: string]: ElementDefinition | string[];
82
- };
83
- /**
84
- * `variants` is a declarative description of 3D-model variations in the configurator. Each variant itself is a
85
- * {@link StructureJson} which must at least define a `name` in the key of the list and the properties `glTF` and
86
- * `elements` in the value. FYI: BabylonJS's sandbox can show you the path of the 3D-model to properly define the
87
- * `paths`.
88
- *
89
- * Example Code
90
- * ```js
91
- * variants: {
92
- * 'My Pretty Variant' {
93
- * glTF: {
94
- * rootUrl: 'https:/my.awesome.domain/path/to/my/project/',
95
- * fileName: 'my_3d_model_file.glb',
96
- * },
97
- * elements: {
98
- * 'My Little Element': {
99
- * paths: {
100
- * includes: ['__root__.MeshName']
101
- * }
102
- * }
103
- * }
104
- * }
105
- * }
106
- * ```
107
- * `MeshName` has to be identical to the path in the glb-file of the 3D-model.
108
- */
109
- variants?: {
110
- [id: string]: StructureJson;
111
- };
112
- };
113
- declare type SceneJson = {
114
- parameterDeclaration?: ParameterDeclarations;
115
- parameters?: ParameterBag;
116
- meshPicking?: boolean;
117
- /**
118
- * Information about [EngineOptions](https://doc.babylonjs.com/typedoc/interfaces/babylon.engineoptions).
119
- */
120
- engine?: {
121
- antialiasing?: boolean;
122
- options?: EngineOptions;
123
- };
124
- scene: SceneDefinition;
125
- animations?: AnimationDefinitions;
126
- placements?: PlacementDefinitions;
127
- };
128
- declare type SceneDefinition = {
129
- globals: SceneGlobals;
130
- lights?: LightDefinitions;
131
- cameras?: CameraDefinitions;
132
- };
133
- declare type SceneGlobals = {
134
- shadows?: {
135
- enabled: boolean;
136
- type: 'contact';
137
- settings: [];
138
- generator: [];
139
- receiver: [];
140
- };
141
- /**
142
- * `aa` or anti aliasing is not needed if hard edges are desired.\
143
- * FYI: aa smooths edges and avoids stairs-effects.
144
- */
145
- aa?: 'fxaa';
146
- 'tone-mapping'?: boolean;
147
- /**
148
- * @bloom is widely known as glow. There you can define it’s size (Specifies the size of the bloom blur kernel, relative to the final output size) and threshold (The luminance threshold to find bright areas of the image to bloom).
149
- * Further Information under [BloomEffect](https://doc.babylonjs.com/typedoc/classes/babylon.bloomeffect).
150
- *
151
- * @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).
152
- * @exposure specifies the intensity of the lightning of the view (not 3D-Model).
153
- * @sharpen´s parameter `settings` are listed in [Default Rendering Pipeline Sharpening link](https://doc.babylonjs.com/divingDeeper/postProcesses/defaultRenderingPipeline#sharpening).
154
- */
155
- 'camera-settings'?: {
156
- contrast: number;
157
- exposure: number;
158
- bloom?: {
159
- enabled: boolean;
160
- size?: number;
161
- threshold?: number;
162
- };
163
- dof?: {
164
- enabled: boolean;
165
- settings: {};
166
- };
167
- sharpen?: {
168
- enabled: boolean;
169
- settings: {};
170
- };
171
- };
172
- };
173
- declare type ScreenshotSettings = {
174
- size?: IScreenshotSize;
175
- mimeType?: string;
176
- samples?: number;
177
- antialiasing?: boolean;
178
- fileName?: string;
179
- renderSprites?: boolean;
180
- };
181
- declare type AutofocusSettings = {
182
- /**
183
- * Can be used to customize the margins shown around the 3d model when calling {@link autofocusActiveCamera}.\
184
- * Defaults to 1.5 when not set explicitly.
185
- */
186
- radiusFactor?: number;
187
- adjustWheelPrecision?: boolean;
188
- adjustPanningSensibility?: boolean;
189
- adjustPinchPrecision?: boolean;
190
- };
191
- declare type LightDefinitions = {
192
- [light: string]: LightDefinition;
193
- };
194
- declare type LightDefinition = {
195
- type: 'hemispheric' | 'point';
196
- };
197
- declare type CameraDefinitions = {
198
- [camera: string]: CameraDefinition;
199
- };
200
- declare type CameraDefinition = {
201
- /**
202
- * `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).
203
- */
204
- fov?: number;
205
- active?: boolean;
206
- /**
207
- * `arc` is a default camera position where the 3D-model is the center and the camera rotates around the 3D-model.
208
- * More Information about `arc` in [ArcRotateCamera](https://doc.babylonjs.com/typedoc/classes/babylon.arcrotatecamera).
209
- *
210
- * NOTE: While "baked" camera definitions from a GLB or babylon file can currently not be instatiated within the `Specification`, it's still possible to use them in the viewer.\
211
- * For the moment all camera definitions inside these files are automatically added to the scene and can be actived using the {@link switchCamera} function.\
212
- * The `newCamera` input has to match the name of the camera node inside the GLB/babylon file.
213
- */
214
- type: 'arc';
215
- /**
216
- * `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).
217
- */
218
- target?: string;
219
- };
220
- declare type VariantInstanceDefinition = {
221
- name?: string;
222
- variant: DottedPathArgument;
223
- parameters?: ParameterBag;
224
- lazy?: boolean;
225
- };
226
- declare type SetupJson = {
227
- instances: VariantInstanceDefinition[];
228
- };
229
- declare type ParameterDeclarations = {
230
- [name: string]: ParameterDeclaration;
231
- };
232
- declare type ParameterDeclaration = {
233
- type: 'string' | 'boolean' | 'number' | 'color' | 'select' | 'vector';
234
- options?: ParameterValue[];
235
- };
236
- declare type ParameterValue = string | number | boolean;
237
- declare type ParameterBag = {
238
- [name: string]: ParameterValue;
239
- };
240
- declare type DottedPathArgument = string | string[] | DottedPath;
241
- declare type ParameterObserver = (object: any, oldValue: ParameterValue, newValue: ParameterValue) => void;
242
- declare type PlacementDefinitions = {
243
- [name: string]: PlacementDefinition;
244
- };
245
- declare type PlacementDefinition = {
246
- position?: string | Vector3;
247
- alpha?: number;
248
- beta?: number;
249
- radius?: number;
250
- target?: string | Vector3;
251
- };
252
- declare type AnimationDefinitions = {
253
- [name: string]: AnimationDefinition;
254
- };
255
- /**
256
- * See [GSAP API Docs](https://greensock.com/docs/v3/GSAP/Tween/vars) for description of `GSAPTWeenVars`.
257
- *
258
- * You can use the [GreenSock Ease Visualizer](https://greensock.com/ease-visualizer/) to create an animation of your
259
- * liking and simply copy the `ease` function shown at the bottom of the visualizer into the `ease` property of your
260
- * {@link AnimationDefinition}.
261
- *
262
- * Example usage in {@link SceneJson | SceneJson.animations}:
263
- *
264
- * ```js
265
- * // ...
266
- * scene: {
267
- * // ...
268
- * animations: {
269
- * DefaultCameraAnimation: {
270
- * ease: 'Power3.easeInOut',
271
- * duration: 0.8,
272
- * },
273
- * },
274
- * // ...
275
- * }
276
- * // ...
277
- * ```
278
- */
279
- declare type AnimationDefinition = GSAPTweenVars;
1
+ declare type Viewer = import("../classes/viewer").Viewer;
2
+ declare type Variant = import("../classes/variant").Variant;
3
+ declare type VariantInstance = import("../classes/variantInstance").VariantInstance;
4
+ /**
5
+ * Alias for {@link Element} which can be used to prevent name clashes with the web APIs
6
+ * [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) class
7
+ */
8
+ declare type VariantElement = import("../classes/element").Element;
9
+ declare type DottedPath = import("../classes/dottedPath").DottedPath;
10
+ declare type Scene = import("@babylonjs/core/scene").Scene;
11
+ declare type Vector3 = import("@babylonjs/core/Maths/math.vector").Vector3;
12
+ declare type Color3 = import("@babylonjs/core/Maths/math.color").Color3;
13
+ declare type Color4 = import("@babylonjs/core/Maths/math.color").Color4;
14
+ declare type Material = import("@babylonjs/core/Materials/material").Material;
15
+ declare type PBRMaterial = import("@babylonjs/core/Materials/PBR/pbrMaterial").PBRMaterial;
16
+ declare type StandardMaterial = import("@babylonjs/core/Materials/standardMaterial").StandardMaterial;
17
+ declare type DynamicTexture = import("@babylonjs/core/Materials/Textures/dynamicTexture").DynamicTexture;
18
+ declare type Mesh = import("@babylonjs/core/Meshes/mesh").Mesh;
19
+ declare type AbstractMesh = import("@babylonjs/core/Meshes/abstractMesh").AbstractMesh;
20
+ declare type InstancedMesh = import("@babylonjs/core/Meshes/instancedMesh").InstancedMesh;
21
+ declare type TransformNode = import("@babylonjs/core/Meshes/transformNode").TransformNode;
22
+ declare type Engine = import("@babylonjs/core/Engines/engine").Engine;
23
+ declare type EngineOptions = import("@babylonjs/core/Engines/thinEngine").EngineOptions;
24
+ declare type ArcRotateCamera = import("@babylonjs/core/Cameras/arcRotateCamera").ArcRotateCamera;
25
+ declare type IScreenshotSize = import("@babylonjs/core/Misc/interfaces/screenshotSize").IScreenshotSize;
26
+ declare type BabylonAnimation = import('@babylonjs/core/Animations/animation').Animation;
27
+ declare type CubeTexture = import('@babylonjs/core/Materials/Textures/cubeTexture').CubeTexture;
28
+ declare type MeshBuilder = import('@babylonjs/core/Meshes/meshBuilder').MeshBuilder;
29
+ declare type Texture = import('@babylonjs/core/Materials/Textures/texture').Texture;
30
+ declare type HemisphericLight = import('@babylonjs/core/Lights/hemisphericLight').HemisphericLight;
31
+ declare type DirectionalLight = import('@babylonjs/core/Lights/directionalLight').DirectionalLight;
32
+ declare type EventEmitter = import('eventemitter3');
33
+ declare type PathDefinitions = {
34
+ include: string[];
35
+ exclude?: string[];
36
+ };
37
+ declare type TraceableDefinition = {
38
+ path: string;
39
+ };
40
+ declare type TraceableDefinitions = {
41
+ [name: string]: TraceableDefinition;
42
+ };
43
+ declare type PaintableDefinition = {
44
+ path: string;
45
+ textureOptions: {
46
+ width: number;
47
+ height: number;
48
+ } | number;
49
+ };
50
+ declare type PaintableDefinitions = {
51
+ [name: string]: PaintableDefinition;
52
+ };
53
+ declare type Asset = {
54
+ rootUrl: string;
55
+ fileName: string | undefined;
56
+ };
57
+ declare type ElementDefinition = {
58
+ paths: PathDefinitions;
59
+ traceables?: TraceableDefinitions;
60
+ paintables?: PaintableDefinitions;
61
+ };
62
+ declare type StructureJson = {
63
+ /**
64
+ * `scene` describes the visualisation of the Babylon `scene` such as the incidence of light and camera position. If a
65
+ * string is given, the {@link Viewer} will resolve the URL or path and pass the parsed JSON to this property.
66
+ */
67
+ scene?: string | SceneJson;
68
+ /**
69
+ * `setup` is a kind of construction plan for the {@link Viewer}. You can pass a {@link SetupJson} or a string, which
70
+ * must represent a valid URL or path. If a string is given, the {@link Viewer} will resolve the URL or path and pass
71
+ * the parsed JSON to this property. The {@link SetupJson} is responsible for managing a list of
72
+ * {@link VariantInstanceDefinition}s. These definitions define the instances that should be instantiated during the
73
+ * bootstrapping process. Each instance has a name and a reference to it's {@link Variant}.
74
+ */
75
+ setup?: string | SetupJson;
76
+ file?: string;
77
+ glTF?: Asset | string;
78
+ parameterDeclaration?: ParameterDeclarations;
79
+ parameters?: ParameterBag;
80
+ elements?: {
81
+ [name: string]: ElementDefinition | string[];
82
+ };
83
+ /**
84
+ * `variants` is a declarative description of 3D-model variations in the configurator. Each variant itself is a
85
+ * {@link StructureJson} which must at least define a `name` in the key of the list and the properties `glTF` and
86
+ * `elements` in the value. FYI: BabylonJS's sandbox can show you the path of the 3D-model to properly define the
87
+ * `paths`.
88
+ *
89
+ * Example Code
90
+ * ```js
91
+ * variants: {
92
+ * 'My Pretty Variant' {
93
+ * glTF: {
94
+ * rootUrl: 'https:/my.awesome.domain/path/to/my/project/',
95
+ * fileName: 'my_3d_model_file.glb',
96
+ * },
97
+ * elements: {
98
+ * 'My Little Element': {
99
+ * paths: {
100
+ * includes: ['__root__.MeshName']
101
+ * }
102
+ * }
103
+ * }
104
+ * }
105
+ * }
106
+ * ```
107
+ * `MeshName` has to be identical to the path in the glb-file of the 3D-model.
108
+ */
109
+ variants?: {
110
+ [id: string]: StructureJson;
111
+ };
112
+ };
113
+ declare type SceneJson = {
114
+ parameterDeclaration?: ParameterDeclarations;
115
+ parameters?: ParameterBag;
116
+ meshPicking?: boolean;
117
+ /**
118
+ * Information about [EngineOptions](https://doc.babylonjs.com/typedoc/interfaces/babylon.engineoptions).
119
+ */
120
+ engine?: {
121
+ antialiasing?: boolean;
122
+ options?: EngineOptions;
123
+ };
124
+ scene: SceneDefinition;
125
+ animations?: AnimationDefinitions;
126
+ placements?: PlacementDefinitions;
127
+ };
128
+ declare type SceneDefinition = {
129
+ globals: SceneGlobals;
130
+ lights?: LightDefinitions;
131
+ cameras?: CameraDefinitions;
132
+ };
133
+ declare type SceneGlobals = {
134
+ shadows?: {
135
+ enabled: boolean;
136
+ type: 'contact';
137
+ settings: [];
138
+ generator: [];
139
+ receiver: [];
140
+ };
141
+ /**
142
+ * `aa` or anti aliasing is not needed if hard edges are desired.\
143
+ * FYI: aa smooths edges and avoids stairs-effects.
144
+ */
145
+ aa?: 'fxaa';
146
+ 'tone-mapping'?: boolean;
147
+ /**
148
+ * @bloom is widely known as glow. There you can define it’s size (Specifies the size of the bloom blur kernel, relative to the final output size) and threshold (The luminance threshold to find bright areas of the image to bloom).
149
+ * Further Information under [BloomEffect](https://doc.babylonjs.com/typedoc/classes/babylon.bloomeffect).
150
+ *
151
+ * @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).
152
+ * @exposure specifies the intensity of the lightning of the view (not 3D-Model).
153
+ * @sharpen´s parameter `settings` are listed in [Default Rendering Pipeline Sharpening link](https://doc.babylonjs.com/divingDeeper/postProcesses/defaultRenderingPipeline#sharpening).
154
+ */
155
+ 'camera-settings'?: {
156
+ contrast: number;
157
+ exposure: number;
158
+ bloom?: {
159
+ enabled: boolean;
160
+ size?: number;
161
+ threshold?: number;
162
+ };
163
+ dof?: {
164
+ enabled: boolean;
165
+ settings: {};
166
+ };
167
+ sharpen?: {
168
+ enabled: boolean;
169
+ settings: {};
170
+ };
171
+ };
172
+ };
173
+ declare type ScreenshotSettings = {
174
+ size?: IScreenshotSize;
175
+ mimeType?: string;
176
+ samples?: number;
177
+ antialiasing?: boolean;
178
+ fileName?: string;
179
+ renderSprites?: boolean;
180
+ };
181
+ declare type AutofocusSettings = {
182
+ /**
183
+ * Can be used to customize the margins shown around the 3d model when calling {@link autofocusActiveCamera}.\
184
+ * Defaults to 1.5 when not set explicitly.
185
+ */
186
+ radiusFactor?: number;
187
+ adjustWheelPrecision?: boolean;
188
+ adjustPanningSensibility?: boolean;
189
+ adjustPinchPrecision?: boolean;
190
+ };
191
+ declare type LightDefinitions = {
192
+ [light: string]: LightDefinition;
193
+ };
194
+ declare type LightDefinition = {
195
+ type: 'hemispheric' | 'point';
196
+ };
197
+ declare type CameraDefinitions = {
198
+ [camera: string]: CameraDefinition;
199
+ };
200
+ declare type CameraDefinition = {
201
+ /**
202
+ * `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).
203
+ */
204
+ fov?: number;
205
+ active?: boolean;
206
+ /**
207
+ * `arc` is a default camera position where the 3D-model is the center and the camera rotates around the 3D-model.
208
+ * More Information about `arc` in [ArcRotateCamera](https://doc.babylonjs.com/typedoc/classes/babylon.arcrotatecamera).
209
+ *
210
+ * NOTE: While "baked" camera definitions from a GLB or babylon file can currently not be instatiated within the `Specification`, it's still possible to use them in the viewer.\
211
+ * For the moment all camera definitions inside these files are automatically added to the scene and can be actived using the {@link switchCamera} function.\
212
+ * The `newCamera` input has to match the name of the camera node inside the GLB/babylon file.
213
+ */
214
+ type: 'arc';
215
+ /**
216
+ * `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).
217
+ */
218
+ target?: string;
219
+ };
220
+ declare type VariantInstanceDefinition = {
221
+ name?: string;
222
+ variant: DottedPathArgument;
223
+ parameters?: ParameterBag;
224
+ lazy?: boolean;
225
+ };
226
+ declare type SetupJson = {
227
+ instances: VariantInstanceDefinition[];
228
+ };
229
+ declare type ParameterDeclarations = {
230
+ [name: string]: ParameterDeclaration;
231
+ };
232
+ declare type ParameterDeclaration = {
233
+ type: 'string' | 'boolean' | 'number' | 'color' | 'select' | 'vector';
234
+ options?: ParameterValue[];
235
+ };
236
+ declare type ParameterValue = string | number | boolean;
237
+ declare type ParameterBag = {
238
+ [name: string]: ParameterValue;
239
+ };
240
+ declare type DottedPathArgument = string | string[] | DottedPath;
241
+ declare type ParameterObserver = (object: any, oldValue: ParameterValue, newValue: ParameterValue) => void;
242
+ declare type PlacementDefinitions = {
243
+ [name: string]: PlacementDefinition;
244
+ };
245
+ declare type PlacementDefinition = {
246
+ position?: string | Vector3;
247
+ alpha?: number;
248
+ beta?: number;
249
+ radius?: number;
250
+ target?: string | Vector3;
251
+ };
252
+ declare type AnimationDefinitions = {
253
+ [name: string]: AnimationDefinition;
254
+ };
255
+ /**
256
+ * See [GSAP API Docs](https://greensock.com/docs/v3/GSAP/Tween/vars) for description of `GSAPTWeenVars`.
257
+ *
258
+ * You can use the [GreenSock Ease Visualizer](https://greensock.com/ease-visualizer/) to create an animation of your
259
+ * liking and simply copy the `ease` function shown at the bottom of the visualizer into the `ease` property of your
260
+ * {@link AnimationDefinition}.
261
+ *
262
+ * Example usage in {@link SceneJson | SceneJson.animations}:
263
+ *
264
+ * ```js
265
+ * // ...
266
+ * scene: {
267
+ * // ...
268
+ * animations: {
269
+ * DefaultCameraAnimation: {
270
+ * ease: 'Power3.easeInOut',
271
+ * duration: 0.8,
272
+ * },
273
+ * },
274
+ * // ...
275
+ * }
276
+ * // ...
277
+ * ```
278
+ */
279
+ declare type AnimationDefinition = GSAPTweenVars;
@@ -1,2 +1,2 @@
1
- "use strict";
1
+ "use strict";
2
2
  //# sourceMappingURL=globalTypes.js.map