@babylonjs/viewer 7.13.1 → 7.13.3-alpha

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 (194) hide show
  1. package/lib/index.d.ts +114 -0
  2. package/lib/index.js +317 -0
  3. package/lib/index.js.map +1 -0
  4. package/package.json +14 -29
  5. package/readme.md +22 -23
  6. package/configuration/configuration.d.ts +0 -107
  7. package/configuration/configuration.js +0 -16
  8. package/configuration/configuration.js.map +0 -1
  9. package/configuration/configurationCompatibility.d.ts +0 -8
  10. package/configuration/configurationCompatibility.js +0 -66
  11. package/configuration/configurationCompatibility.js.map +0 -1
  12. package/configuration/configurationContainer.d.ts +0 -10
  13. package/configuration/configurationContainer.js +0 -10
  14. package/configuration/configurationContainer.js.map +0 -1
  15. package/configuration/globals.d.ts +0 -6
  16. package/configuration/globals.js +0 -18
  17. package/configuration/globals.js.map +0 -1
  18. package/configuration/index.d.ts +0 -2
  19. package/configuration/index.js +0 -4
  20. package/configuration/index.js.map +0 -1
  21. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  22. package/configuration/interfaces/cameraConfiguration.js +0 -2
  23. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  24. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  25. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  26. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  27. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  28. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  29. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  30. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  31. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  32. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  33. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  34. package/configuration/interfaces/groundConfiguration.js +0 -2
  35. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  36. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  37. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  38. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  39. package/configuration/interfaces/index.d.ts +0 -15
  40. package/configuration/interfaces/index.js +0 -16
  41. package/configuration/interfaces/index.js.map +0 -1
  42. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  43. package/configuration/interfaces/lightConfiguration.js +0 -2
  44. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  45. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  46. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  47. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  48. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  49. package/configuration/interfaces/modelConfiguration.js +0 -2
  50. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  51. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  52. package/configuration/interfaces/observersConfiguration.js +0 -2
  53. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  54. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  55. package/configuration/interfaces/sceneConfiguration.js +0 -2
  56. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  57. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  58. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  59. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  60. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  61. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  62. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  63. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  64. package/configuration/interfaces/templateConfiguration.js +0 -2
  65. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  66. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  67. package/configuration/interfaces/vrConfiguration.js +0 -2
  68. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  69. package/configuration/loader.d.ts +0 -4
  70. package/configuration/loader.js +0 -17
  71. package/configuration/loader.js.map +0 -1
  72. package/configuration/mappers.d.ts +0 -43
  73. package/configuration/mappers.js +0 -192
  74. package/configuration/mappers.js.map +0 -1
  75. package/configuration/renderOnlyLoader.d.ts +0 -33
  76. package/configuration/renderOnlyLoader.js +0 -162
  77. package/configuration/renderOnlyLoader.js.map +0 -1
  78. package/configuration/types/default.d.ts +0 -6
  79. package/configuration/types/default.js +0 -121
  80. package/configuration/types/default.js.map +0 -1
  81. package/configuration/types/environmentMap.d.ts +0 -5
  82. package/configuration/types/environmentMap.js +0 -14
  83. package/configuration/types/environmentMap.js.map +0 -1
  84. package/configuration/types/extended.d.ts +0 -6
  85. package/configuration/types/extended.js +0 -317
  86. package/configuration/types/extended.js.map +0 -1
  87. package/configuration/types/index.d.ts +0 -14
  88. package/configuration/types/index.js +0 -51
  89. package/configuration/types/index.js.map +0 -1
  90. package/configuration/types/minimal.d.ts +0 -6
  91. package/configuration/types/minimal.js +0 -43
  92. package/configuration/types/minimal.js.map +0 -1
  93. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  94. package/configuration/types/renderOnlyDefault.js +0 -31
  95. package/configuration/types/renderOnlyDefault.js.map +0 -1
  96. package/configuration/types/shadowLight.d.ts +0 -9
  97. package/configuration/types/shadowLight.js +0 -64
  98. package/configuration/types/shadowLight.js.map +0 -1
  99. package/helper/index.d.ts +0 -29
  100. package/helper/index.js +0 -66
  101. package/helper/index.js.map +0 -1
  102. package/index.d.ts +0 -30
  103. package/index.js +0 -46
  104. package/index.js.map +0 -1
  105. package/initializer.d.ts +0 -11
  106. package/initializer.js +0 -35
  107. package/initializer.js.map +0 -1
  108. package/interfaces.d.ts +0 -5
  109. package/interfaces.js +0 -7
  110. package/interfaces.js.map +0 -1
  111. package/labs/environmentSerializer.d.ts +0 -126
  112. package/labs/environmentSerializer.js +0 -191
  113. package/labs/environmentSerializer.js.map +0 -1
  114. package/labs/texture.d.ts +0 -183
  115. package/labs/texture.js +0 -351
  116. package/labs/texture.js.map +0 -1
  117. package/labs/viewerLabs.d.ts +0 -51
  118. package/labs/viewerLabs.js +0 -134
  119. package/labs/viewerLabs.js.map +0 -1
  120. package/loader/modelLoader.d.ts +0 -56
  121. package/loader/modelLoader.js +0 -199
  122. package/loader/modelLoader.js.map +0 -1
  123. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  124. package/loader/plugins/applyMaterialConfig.js +0 -16
  125. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  126. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  127. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  128. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  129. package/loader/plugins/index.d.ts +0 -19
  130. package/loader/plugins/index.js +0 -44
  131. package/loader/plugins/index.js.map +0 -1
  132. package/loader/plugins/loaderPlugin.d.ts +0 -24
  133. package/loader/plugins/loaderPlugin.js +0 -2
  134. package/loader/plugins/loaderPlugin.js.map +0 -1
  135. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  136. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  137. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  138. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  139. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  140. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  141. package/managers/observablesManager.d.ts +0 -66
  142. package/managers/observablesManager.js +0 -35
  143. package/managers/observablesManager.js.map +0 -1
  144. package/managers/sceneManager.d.ts +0 -245
  145. package/managers/sceneManager.js +0 -1375
  146. package/managers/sceneManager.js.map +0 -1
  147. package/managers/telemetryManager.d.ts +0 -78
  148. package/managers/telemetryManager.js +0 -117
  149. package/managers/telemetryManager.js.map +0 -1
  150. package/model/modelAnimation.d.ts +0 -215
  151. package/model/modelAnimation.js +0 -237
  152. package/model/modelAnimation.js.map +0 -1
  153. package/model/viewerModel.d.ts +0 -233
  154. package/model/viewerModel.js +0 -673
  155. package/model/viewerModel.js.map +0 -1
  156. package/optimizer/custom/extended.d.ts +0 -13
  157. package/optimizer/custom/extended.js +0 -101
  158. package/optimizer/custom/extended.js.map +0 -1
  159. package/optimizer/custom/index.d.ts +0 -9
  160. package/optimizer/custom/index.js +0 -26
  161. package/optimizer/custom/index.js.map +0 -1
  162. package/renderOnlyIndex.d.ts +0 -11
  163. package/renderOnlyIndex.js +0 -18
  164. package/renderOnlyIndex.js.map +0 -1
  165. package/templating/eventManager.d.ts +0 -35
  166. package/templating/eventManager.js +0 -66
  167. package/templating/eventManager.js.map +0 -1
  168. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  169. package/templating/plugins/hdButtonPlugin.js +0 -21
  170. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  171. package/templating/plugins/printButton.d.ts +0 -9
  172. package/templating/plugins/printButton.js +0 -40
  173. package/templating/plugins/printButton.js.map +0 -1
  174. package/templating/templateManager.d.ts +0 -197
  175. package/templating/templateManager.js +0 -561
  176. package/templating/templateManager.js.map +0 -1
  177. package/templating/viewerTemplatePlugin.d.ts +0 -21
  178. package/templating/viewerTemplatePlugin.js +0 -69
  179. package/templating/viewerTemplatePlugin.js.map +0 -1
  180. package/viewer/defaultViewer.d.ts +0 -130
  181. package/viewer/defaultViewer.js +0 -675
  182. package/viewer/defaultViewer.js.map +0 -1
  183. package/viewer/renderOnlyViewer.d.ts +0 -9
  184. package/viewer/renderOnlyViewer.js +0 -46
  185. package/viewer/renderOnlyViewer.js.map +0 -1
  186. package/viewer/viewer.d.ts +0 -258
  187. package/viewer/viewer.js +0 -783
  188. package/viewer/viewer.js.map +0 -1
  189. package/viewer/viewerManager.d.ts +0 -58
  190. package/viewer/viewerManager.js +0 -91
  191. package/viewer/viewerManager.js.map +0 -1
  192. package/viewer/viewerWithTemplate.d.ts +0 -9
  193. package/viewer/viewerWithTemplate.js +0 -20
  194. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -1,317 +0,0 @@
1
- import { Tools } from "@babylonjs/core/Misc/tools.js";
2
- /**
3
- * The viewer's "extended" configuration.
4
- * This configuration defines specific objects and parameters that we think make any model look good.
5
- */
6
- export var extendedConfiguration = {
7
- version: "3.2.0",
8
- extends: "default",
9
- camera: {
10
- exposure: 3.034578,
11
- fov: 0.7853981633974483,
12
- contrast: 1.6,
13
- toneMappingEnabled: true,
14
- upperBetaLimit: 1.3962634015954636 + Math.PI / 2,
15
- lowerBetaLimit: -1.4835298641951802 + Math.PI / 2,
16
- behaviors: {
17
- framing: {
18
- type: 2,
19
- mode: 0,
20
- positionScale: 0.5,
21
- defaultElevation: 0.2617993877991494,
22
- elevationReturnWaitTime: 3000,
23
- elevationReturnTime: 2000,
24
- framingTime: 500,
25
- zoomStopsAnimation: false,
26
- radiusScale: 0.866,
27
- },
28
- autoRotate: {
29
- type: 0,
30
- idleRotationWaitTime: 4000,
31
- idleRotationSpeed: 0.17453292519943295,
32
- idleRotationSpinupTime: 2500,
33
- zoomStopsAnimation: false,
34
- },
35
- bouncing: {
36
- type: 1,
37
- lowerRadiusTransitionRange: 0.05,
38
- upperRadiusTransitionRange: -0.2,
39
- },
40
- },
41
- upperRadiusLimit: 5,
42
- lowerRadiusLimit: 0.5,
43
- frameOnModelLoad: true,
44
- framingElevation: 0.2617993877991494,
45
- framingRotation: 1.5707963267948966,
46
- radius: 2,
47
- alpha: 1.5708,
48
- beta: Math.PI * 0.5 - 0.2618,
49
- wheelPrecision: 300,
50
- minZ: 0.1,
51
- maxZ: 50,
52
- fovMode: 0,
53
- pinchPrecision: 1500,
54
- panningSensibility: 3000,
55
- },
56
- lights: {
57
- light0: {
58
- type: 0,
59
- frustumEdgeFalloff: 0,
60
- intensity: 7,
61
- intensityMode: 0,
62
- radius: 0.6,
63
- range: 4.4,
64
- spotAngle: 60,
65
- diffuse: {
66
- r: 1,
67
- g: 1,
68
- b: 1,
69
- },
70
- position: {
71
- x: -2,
72
- y: 2.5,
73
- z: 2,
74
- },
75
- target: {
76
- x: 0,
77
- y: 0,
78
- z: 0,
79
- },
80
- enabled: true,
81
- shadowEnabled: true,
82
- shadowBufferSize: 512,
83
- shadowMinZ: 1,
84
- shadowMaxZ: 10,
85
- shadowFieldOfView: 60,
86
- shadowFrustumSize: 2,
87
- shadowConfig: {
88
- useBlurCloseExponentialShadowMap: true,
89
- useKernelBlur: true,
90
- blurScale: 1.0,
91
- bias: 0.001,
92
- depthScale: 50 * (10 - 1),
93
- frustumEdgeFalloff: 0,
94
- },
95
- },
96
- light1: {
97
- type: 0,
98
- frustumEdgeFalloff: 0,
99
- intensity: 7,
100
- intensityMode: 0,
101
- radius: 0.4,
102
- range: 5.8,
103
- spotAngle: 57,
104
- diffuse: {
105
- r: 1,
106
- g: 1,
107
- b: 1,
108
- },
109
- position: {
110
- x: 4,
111
- y: 3,
112
- z: -0.5,
113
- },
114
- target: {
115
- x: 0,
116
- y: 0,
117
- z: 0,
118
- },
119
- enabled: true,
120
- shadowEnabled: false,
121
- shadowBufferSize: 512,
122
- shadowMinZ: 0.2,
123
- shadowMaxZ: 10,
124
- shadowFieldOfView: 28,
125
- shadowFrustumSize: 2,
126
- },
127
- light2: {
128
- type: 0,
129
- frustumEdgeFalloff: 0,
130
- intensity: 1,
131
- intensityMode: 0,
132
- radius: 0.5,
133
- range: 6,
134
- spotAngle: 42.85,
135
- diffuse: {
136
- r: 0.8,
137
- g: 0.8,
138
- b: 0.8,
139
- },
140
- position: {
141
- x: -1,
142
- y: 3,
143
- z: -3,
144
- },
145
- target: {
146
- x: 0,
147
- y: 0,
148
- z: 0,
149
- },
150
- enabled: true,
151
- shadowEnabled: false,
152
- shadowBufferSize: 512,
153
- shadowMinZ: 0.2,
154
- shadowMaxZ: 10,
155
- shadowFieldOfView: 45,
156
- shadowFrustumSize: 2,
157
- },
158
- },
159
- ground: {
160
- shadowLevel: 0.9,
161
- texture: "Ground_2.0-1024.png",
162
- material: {
163
- primaryColorHighlightLevel: 0.035,
164
- primaryColorShadowLevel: 0,
165
- enableNoise: true,
166
- useRGBColor: false,
167
- maxSimultaneousLights: 1,
168
- diffuseTexture: {
169
- gammaSpace: true,
170
- },
171
- },
172
- opacity: 1,
173
- mirror: false,
174
- receiveShadows: true,
175
- size: 5,
176
- },
177
- skybox: {
178
- scale: 11,
179
- cubeTexture: {
180
- url: "Skybox_2.0-256.dds",
181
- },
182
- material: {
183
- primaryColorHighlightLevel: 0.03,
184
- primaryColorShadowLevel: 0.03,
185
- enableNoise: true,
186
- useRGBColor: false,
187
- reflectionTexture: {
188
- gammaSpace: true,
189
- },
190
- },
191
- },
192
- engine: {
193
- renderInBackground: true,
194
- },
195
- scene: {
196
- flags: {
197
- shadowsEnabled: true,
198
- particlesEnabled: false,
199
- collisionsEnabled: false,
200
- lightsEnabled: true,
201
- texturesEnabled: true,
202
- lensFlaresEnabled: false,
203
- proceduralTexturesEnabled: false,
204
- renderTargetsEnabled: true,
205
- spritesEnabled: false,
206
- skeletonsEnabled: true,
207
- audioEnabled: false,
208
- },
209
- defaultMaterial: {
210
- materialType: "pbr",
211
- reflectivityColor: {
212
- r: 0.1,
213
- g: 0.1,
214
- b: 0.1,
215
- },
216
- microSurface: 0.6,
217
- },
218
- clearColor: {
219
- r: 0.9,
220
- g: 0.9,
221
- b: 0.9,
222
- a: 1.0,
223
- },
224
- imageProcessingConfiguration: {
225
- vignetteCenterX: 0,
226
- vignetteCenterY: 0,
227
- vignetteColor: {
228
- r: 0.086,
229
- g: 0.184,
230
- b: 0.259,
231
- a: 1,
232
- },
233
- vignetteWeight: 0.855,
234
- vignetteStretch: 0.5,
235
- vignetteBlendMode: 0,
236
- vignetteCameraFov: 0.7853981633974483,
237
- isEnabled: true,
238
- colorCurves: {
239
- shadowsHue: 0,
240
- shadowsDensity: 0,
241
- shadowsSaturation: 0,
242
- shadowsExposure: 0,
243
- midtonesHue: 0,
244
- midtonesDensity: 0,
245
- midtonesExposure: 0,
246
- midtonesSaturation: 0,
247
- highlightsHue: 0,
248
- highlightsDensity: 0,
249
- highlightsExposure: 0,
250
- highlightsSaturation: 0,
251
- },
252
- },
253
- assetsRootURL: "https://viewer.babylonjs.com/assets/environment/",
254
- },
255
- loaderPlugins: {
256
- extendedMaterial: true,
257
- applyMaterialConfig: true,
258
- msftLod: true,
259
- telemetry: true,
260
- },
261
- model: {
262
- rotationOffsetAxis: {
263
- x: 0,
264
- y: -1,
265
- z: 0,
266
- },
267
- rotationOffsetAngle: Tools.ToRadians(210),
268
- material: {
269
- directEnabled: true,
270
- directIntensity: 0.884,
271
- emissiveIntensity: 1.04,
272
- environmentIntensity: 0.6,
273
- },
274
- entryAnimation: {
275
- scaling: {
276
- x: 0,
277
- y: 0,
278
- z: 0,
279
- },
280
- time: 0.5,
281
- easingFunction: 4,
282
- easingMode: 1,
283
- },
284
- exitAnimation: {
285
- scaling: {
286
- x: 0,
287
- y: 0,
288
- z: 0,
289
- },
290
- time: 0.5,
291
- easingFunction: 4,
292
- easingMode: 1,
293
- },
294
- normalize: true,
295
- castShadow: true,
296
- receiveShadows: true,
297
- },
298
- environmentMap: {
299
- texture: "EnvMap_3.0-256.env",
300
- rotationY: 3,
301
- tintLevel: 0.4,
302
- mainColor: {
303
- r: 0.8823529411764706,
304
- g: 0.8823529411764706,
305
- b: 0.8823529411764706,
306
- },
307
- },
308
- lab: {
309
- defaultRenderingPipelines: {
310
- bloomEnabled: true,
311
- bloomThreshold: 1.0,
312
- fxaaEnabled: true,
313
- bloomWeight: 0.05,
314
- },
315
- },
316
- };
317
- //# sourceMappingURL=extended.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extended.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/extended.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,sCAAwB;AAExC;;;GAGG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAwB;IACtD,OAAO,EAAE,OAAO;IA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T,cAAc,EAAE,CAAC;YACjB,UAAU,EAAE,CAAC;SAChB;QACD,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,IAAI;KACvB;IACD,cAAc,EAAE;QACZ,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,GAAG;QACd,SAAS,EAAE;YACP,CAAC,EAAE,kBAAkB;YACrB,CAAC,EAAE,kBAAkB;YACrB,CAAC,EAAE,kBAAkB;SACxB;KACJ;IACD,GAAG,EAAE;QACD,yBAAyB,EAAE;YACvB,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,GAAG;YACnB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,IAAI;SACpB;KACJ;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\nimport { Tools } from \"core/Misc/tools\";\r\n\r\n/**\r\n * The viewer's \"extended\" configuration.\r\n * This configuration defines specific objects and parameters that we think make any model look good.\r\n */\r\nexport const extendedConfiguration: ViewerConfiguration = {\r\n version: \"3.2.0\",\r\n extends: \"default\",\r\n camera: {\r\n exposure: 3.034578,\r\n fov: 0.7853981633974483,\r\n contrast: 1.6,\r\n toneMappingEnabled: true,\r\n upperBetaLimit: 1.3962634015954636 + Math.PI / 2,\r\n lowerBetaLimit: -1.4835298641951802 + Math.PI / 2,\r\n behaviors: {\r\n framing: {\r\n type: 2,\r\n mode: 0,\r\n positionScale: 0.5,\r\n defaultElevation: 0.2617993877991494,\r\n elevationReturnWaitTime: 3000,\r\n elevationReturnTime: 2000,\r\n framingTime: 500,\r\n zoomStopsAnimation: false,\r\n radiusScale: 0.866,\r\n },\r\n autoRotate: {\r\n type: 0,\r\n idleRotationWaitTime: 4000,\r\n idleRotationSpeed: 0.17453292519943295,\r\n idleRotationSpinupTime: 2500,\r\n zoomStopsAnimation: false,\r\n },\r\n bouncing: {\r\n type: 1,\r\n lowerRadiusTransitionRange: 0.05,\r\n upperRadiusTransitionRange: -0.2,\r\n },\r\n },\r\n upperRadiusLimit: 5,\r\n lowerRadiusLimit: 0.5,\r\n frameOnModelLoad: true,\r\n framingElevation: 0.2617993877991494,\r\n framingRotation: 1.5707963267948966,\r\n radius: 2,\r\n alpha: 1.5708,\r\n beta: Math.PI * 0.5 - 0.2618,\r\n wheelPrecision: 300,\r\n minZ: 0.1,\r\n maxZ: 50,\r\n fovMode: 0,\r\n pinchPrecision: 1500,\r\n panningSensibility: 3000,\r\n },\r\n lights: {\r\n light0: {\r\n type: 0,\r\n frustumEdgeFalloff: 0,\r\n intensity: 7,\r\n intensityMode: 0,\r\n radius: 0.6,\r\n range: 4.4,\r\n spotAngle: 60,\r\n diffuse: {\r\n r: 1,\r\n g: 1,\r\n b: 1,\r\n },\r\n position: {\r\n x: -2,\r\n y: 2.5,\r\n z: 2,\r\n },\r\n target: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n enabled: true,\r\n shadowEnabled: true,\r\n shadowBufferSize: 512,\r\n shadowMinZ: 1,\r\n shadowMaxZ: 10,\r\n shadowFieldOfView: 60,\r\n shadowFrustumSize: 2,\r\n shadowConfig: {\r\n useBlurCloseExponentialShadowMap: true,\r\n useKernelBlur: true,\r\n blurScale: 1.0,\r\n bias: 0.001,\r\n depthScale: 50 * (10 - 1),\r\n frustumEdgeFalloff: 0,\r\n },\r\n },\r\n light1: {\r\n type: 0,\r\n frustumEdgeFalloff: 0,\r\n intensity: 7,\r\n intensityMode: 0,\r\n radius: 0.4,\r\n range: 5.8,\r\n spotAngle: 57,\r\n diffuse: {\r\n r: 1,\r\n g: 1,\r\n b: 1,\r\n },\r\n position: {\r\n x: 4,\r\n y: 3,\r\n z: -0.5,\r\n },\r\n target: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n enabled: true,\r\n shadowEnabled: false,\r\n shadowBufferSize: 512,\r\n shadowMinZ: 0.2,\r\n shadowMaxZ: 10,\r\n shadowFieldOfView: 28,\r\n shadowFrustumSize: 2,\r\n },\r\n light2: {\r\n type: 0,\r\n frustumEdgeFalloff: 0,\r\n intensity: 1,\r\n intensityMode: 0,\r\n radius: 0.5,\r\n range: 6,\r\n spotAngle: 42.85,\r\n diffuse: {\r\n r: 0.8,\r\n g: 0.8,\r\n b: 0.8,\r\n },\r\n position: {\r\n x: -1,\r\n y: 3,\r\n z: -3,\r\n },\r\n target: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n enabled: true,\r\n shadowEnabled: false,\r\n shadowBufferSize: 512,\r\n shadowMinZ: 0.2,\r\n shadowMaxZ: 10,\r\n shadowFieldOfView: 45,\r\n shadowFrustumSize: 2,\r\n },\r\n },\r\n ground: {\r\n shadowLevel: 0.9,\r\n texture: \"Ground_2.0-1024.png\",\r\n material: {\r\n primaryColorHighlightLevel: 0.035,\r\n primaryColorShadowLevel: 0,\r\n enableNoise: true,\r\n useRGBColor: false,\r\n maxSimultaneousLights: 1,\r\n diffuseTexture: {\r\n gammaSpace: true,\r\n },\r\n },\r\n opacity: 1,\r\n mirror: false,\r\n receiveShadows: true,\r\n size: 5,\r\n },\r\n skybox: {\r\n scale: 11,\r\n cubeTexture: {\r\n url: \"Skybox_2.0-256.dds\",\r\n },\r\n material: {\r\n primaryColorHighlightLevel: 0.03,\r\n primaryColorShadowLevel: 0.03,\r\n enableNoise: true,\r\n useRGBColor: false,\r\n reflectionTexture: {\r\n gammaSpace: true,\r\n },\r\n },\r\n },\r\n engine: {\r\n renderInBackground: true,\r\n },\r\n scene: {\r\n flags: {\r\n shadowsEnabled: true,\r\n particlesEnabled: false,\r\n collisionsEnabled: false,\r\n lightsEnabled: true,\r\n texturesEnabled: true,\r\n lensFlaresEnabled: false,\r\n proceduralTexturesEnabled: false,\r\n renderTargetsEnabled: true,\r\n spritesEnabled: false,\r\n skeletonsEnabled: true,\r\n audioEnabled: false,\r\n },\r\n defaultMaterial: {\r\n materialType: \"pbr\",\r\n reflectivityColor: {\r\n r: 0.1,\r\n g: 0.1,\r\n b: 0.1,\r\n },\r\n microSurface: 0.6,\r\n },\r\n clearColor: {\r\n r: 0.9,\r\n g: 0.9,\r\n b: 0.9,\r\n a: 1.0,\r\n },\r\n imageProcessingConfiguration: {\r\n vignetteCenterX: 0,\r\n vignetteCenterY: 0,\r\n vignetteColor: {\r\n r: 0.086,\r\n g: 0.184,\r\n b: 0.259,\r\n a: 1,\r\n },\r\n vignetteWeight: 0.855,\r\n vignetteStretch: 0.5,\r\n vignetteBlendMode: 0,\r\n vignetteCameraFov: 0.7853981633974483,\r\n isEnabled: true,\r\n colorCurves: {\r\n shadowsHue: 0,\r\n shadowsDensity: 0,\r\n shadowsSaturation: 0,\r\n shadowsExposure: 0,\r\n midtonesHue: 0,\r\n midtonesDensity: 0,\r\n midtonesExposure: 0,\r\n midtonesSaturation: 0,\r\n highlightsHue: 0,\r\n highlightsDensity: 0,\r\n highlightsExposure: 0,\r\n highlightsSaturation: 0,\r\n },\r\n },\r\n assetsRootURL: \"https://viewer.babylonjs.com/assets/environment/\",\r\n },\r\n loaderPlugins: {\r\n extendedMaterial: true,\r\n applyMaterialConfig: true,\r\n msftLod: true,\r\n telemetry: true,\r\n },\r\n model: {\r\n rotationOffsetAxis: {\r\n x: 0,\r\n y: -1,\r\n z: 0,\r\n },\r\n rotationOffsetAngle: Tools.ToRadians(210),\r\n material: {\r\n directEnabled: true,\r\n directIntensity: 0.884,\r\n emissiveIntensity: 1.04,\r\n environmentIntensity: 0.6,\r\n },\r\n entryAnimation: {\r\n scaling: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n time: 0.5,\r\n easingFunction: 4,\r\n easingMode: 1,\r\n },\r\n exitAnimation: {\r\n scaling: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n time: 0.5,\r\n easingFunction: 4,\r\n easingMode: 1,\r\n },\r\n normalize: true,\r\n castShadow: true,\r\n receiveShadows: true,\r\n },\r\n environmentMap: {\r\n texture: \"EnvMap_3.0-256.env\",\r\n rotationY: 3,\r\n tintLevel: 0.4,\r\n mainColor: {\r\n r: 0.8823529411764706,\r\n g: 0.8823529411764706,\r\n b: 0.8823529411764706,\r\n },\r\n },\r\n lab: {\r\n defaultRenderingPipelines: {\r\n bloomEnabled: true,\r\n bloomThreshold: 1.0,\r\n fxaaEnabled: true,\r\n bloomWeight: 0.05,\r\n },\r\n },\r\n};\r\n"]}
@@ -1,14 +0,0 @@
1
- import { minimalConfiguration } from "./minimal";
2
- import { defaultConfiguration } from "./default";
3
- import type { ViewerConfiguration } from "../configuration";
4
- /**
5
- * Get the configuration type you need to use as the base for your viewer.
6
- * The types can either be a single string, or comma separated types that will extend each other. for example:
7
- *
8
- * "default, environmentMap" will first load the default configuration and will extend it using the environmentMap configuration.
9
- *
10
- * @param types a comma-separated string of the type(s) or configuration to load.
11
- * @returns the configuration object
12
- */
13
- declare const getConfigurationType: (types: string) => ViewerConfiguration;
14
- export { getConfigurationType, defaultConfiguration, minimalConfiguration };
@@ -1,51 +0,0 @@
1
- import { minimalConfiguration } from "./minimal.js";
2
- import { defaultConfiguration } from "./default.js";
3
- import { extendedConfiguration } from "./extended.js";
4
- import { shadowDirectionalLightConfiguration, shadowSpotlLightConfiguration } from "./shadowLight.js";
5
- import { environmentMapConfiguration } from "./environmentMap.js";
6
- // eslint-disable-next-line import/no-internal-modules
7
- import { deepmerge } from "../../helper/index.js";
8
- /**
9
- * Get the configuration type you need to use as the base for your viewer.
10
- * The types can either be a single string, or comma separated types that will extend each other. for example:
11
- *
12
- * "default, environmentMap" will first load the default configuration and will extend it using the environmentMap configuration.
13
- *
14
- * @param types a comma-separated string of the type(s) or configuration to load.
15
- * @returns the configuration object
16
- */
17
- var getConfigurationType = function (types) {
18
- var config = {};
19
- var typesSeparated = types.split(",");
20
- typesSeparated.forEach(function (type) {
21
- switch (type.trim()) {
22
- case "environmentMap":
23
- config = deepmerge(config, environmentMapConfiguration);
24
- break;
25
- case "shadowDirectionalLight":
26
- config = deepmerge(config, shadowDirectionalLightConfiguration);
27
- break;
28
- case "shadowSpotLight":
29
- config = deepmerge(config, shadowSpotlLightConfiguration);
30
- break;
31
- case "default":
32
- config = deepmerge(config, defaultConfiguration);
33
- break;
34
- case "minimal":
35
- config = deepmerge(config, minimalConfiguration);
36
- break;
37
- case "none":
38
- break;
39
- case "extended":
40
- default:
41
- config = deepmerge(config, extendedConfiguration);
42
- break;
43
- }
44
- if (config.extends) {
45
- config = deepmerge(config, getConfigurationType(config.extends));
46
- }
47
- });
48
- return config;
49
- };
50
- export { getConfigurationType, defaultConfiguration, minimalConfiguration };
51
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,mCAAmC,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;;;GAQG;AACH,IAAM,oBAAoB,GAAG,UAAU,KAAa;IAChD,IAAI,MAAM,GAAwB,EAAE,CAAC;IACrC,IAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,cAAc,CAAC,OAAO,CAAC,UAAC,IAAI;QACxB,QAAQ,IAAI,CAAC,IAAI,EAAE,EAAE;YACjB,KAAK,gBAAgB;gBACjB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;gBACxD,MAAM;YACV,KAAK,wBAAwB;gBACzB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,mCAAmC,CAAC,CAAC;gBAChE,MAAM;YACV,KAAK,iBAAiB;gBAClB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;gBAC1D,MAAM;YACV,KAAK,SAAS;gBACV,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;gBACjD,MAAM;YACV,KAAK,SAAS;gBACV,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;gBACjD,MAAM;YACV,KAAK,MAAM;gBACP,MAAM;YACV,KAAK,UAAU,CAAC;YAChB;gBACI,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;gBAClD,MAAM;SACb;QAED,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;SACpE;IACL,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["import { minimalConfiguration } from \"./minimal\";\r\nimport { defaultConfiguration } from \"./default\";\r\nimport { extendedConfiguration } from \"./extended\";\r\nimport type { ViewerConfiguration } from \"../configuration\";\r\nimport { shadowDirectionalLightConfiguration, shadowSpotlLightConfiguration } from \"./shadowLight\";\r\nimport { environmentMapConfiguration } from \"./environmentMap\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { deepmerge } from \"../../helper/index\";\r\n\r\n/**\r\n * Get the configuration type you need to use as the base for your viewer.\r\n * The types can either be a single string, or comma separated types that will extend each other. for example:\r\n *\r\n * \"default, environmentMap\" will first load the default configuration and will extend it using the environmentMap configuration.\r\n *\r\n * @param types a comma-separated string of the type(s) or configuration to load.\r\n * @returns the configuration object\r\n */\r\nconst getConfigurationType = function (types: string): ViewerConfiguration {\r\n let config: ViewerConfiguration = {};\r\n const typesSeparated = types.split(\",\");\r\n typesSeparated.forEach((type) => {\r\n switch (type.trim()) {\r\n case \"environmentMap\":\r\n config = deepmerge(config, environmentMapConfiguration);\r\n break;\r\n case \"shadowDirectionalLight\":\r\n config = deepmerge(config, shadowDirectionalLightConfiguration);\r\n break;\r\n case \"shadowSpotLight\":\r\n config = deepmerge(config, shadowSpotlLightConfiguration);\r\n break;\r\n case \"default\":\r\n config = deepmerge(config, defaultConfiguration);\r\n break;\r\n case \"minimal\":\r\n config = deepmerge(config, minimalConfiguration);\r\n break;\r\n case \"none\":\r\n break;\r\n case \"extended\":\r\n default:\r\n config = deepmerge(config, extendedConfiguration);\r\n break;\r\n }\r\n\r\n if (config.extends) {\r\n config = deepmerge(config, getConfigurationType(config.extends));\r\n }\r\n });\r\n return config;\r\n};\r\n\r\nexport { getConfigurationType, defaultConfiguration, minimalConfiguration };\r\n"]}
@@ -1,6 +0,0 @@
1
- import type { ViewerConfiguration } from "./../configuration";
2
- /**
3
- * The minimal configuration needed to make the viewer work.
4
- * Some functionalities might not work correctly (like fill-screen)
5
- */
6
- export declare const minimalConfiguration: ViewerConfiguration;
@@ -1,43 +0,0 @@
1
- import { defaultTemplate, fillContainer, loadingScreen, defaultViewer, overlay, error, loading, close } from "babylonjs-viewer-assets";
2
- /**
3
- * The minimal configuration needed to make the viewer work.
4
- * Some functionalities might not work correctly (like fill-screen)
5
- */
6
- export var minimalConfiguration = {
7
- version: "0.1",
8
- templates: {
9
- main: {
10
- html: defaultTemplate,
11
- },
12
- fillContainer: {
13
- html: fillContainer,
14
- params: {
15
- disable: false,
16
- },
17
- },
18
- loadingScreen: {
19
- html: loadingScreen,
20
- params: {
21
- backgroundColor: "#000000",
22
- loadingImage: loading,
23
- },
24
- },
25
- viewer: {
26
- html: defaultViewer,
27
- },
28
- overlay: {
29
- html: overlay,
30
- params: {
31
- closeImage: close,
32
- closeText: "Close",
33
- },
34
- },
35
- error: {
36
- html: error,
37
- },
38
- },
39
- engine: {
40
- antialiasing: true,
41
- },
42
- };
43
- //# sourceMappingURL=minimal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"minimal.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/minimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEvI;;;GAGG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAwB;IACrD,OAAO,EAAE,KAAK;IACd,SAAS,EAAE;QACP,IAAI,EAAE;YACF,IAAI,EAAE,eAAe;SACxB;QACD,aAAa,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,OAAO,EAAE,KAAK;aACjB;SACJ;QACD,aAAa,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,eAAe,EAAE,SAAS;gBAC1B,YAAY,EAAE,OAAO;aACxB;SACJ;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,aAAa;SACtB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,OAAO;YACb,MAAM,EAAE;gBACJ,UAAU,EAAE,KAAK;gBACjB,SAAS,EAAE,OAAO;aACrB;SACJ;QACD,KAAK,EAAE;YACH,IAAI,EAAE,KAAK;SACd;KACJ;IACD,MAAM,EAAE;QACJ,YAAY,EAAE,IAAI;KACrB;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\nimport { defaultTemplate, fillContainer, loadingScreen, defaultViewer, overlay, error, loading, close } from \"babylonjs-viewer-assets\";\r\n\r\n/**\r\n * The minimal configuration needed to make the viewer work.\r\n * Some functionalities might not work correctly (like fill-screen)\r\n */\r\nexport const minimalConfiguration: ViewerConfiguration = {\r\n version: \"0.1\",\r\n templates: {\r\n main: {\r\n html: defaultTemplate,\r\n },\r\n fillContainer: {\r\n html: fillContainer,\r\n params: {\r\n disable: false,\r\n },\r\n },\r\n loadingScreen: {\r\n html: loadingScreen,\r\n params: {\r\n backgroundColor: \"#000000\",\r\n loadingImage: loading,\r\n },\r\n },\r\n viewer: {\r\n html: defaultViewer,\r\n },\r\n overlay: {\r\n html: overlay,\r\n params: {\r\n closeImage: close,\r\n closeText: \"Close\",\r\n },\r\n },\r\n error: {\r\n html: error,\r\n },\r\n },\r\n engine: {\r\n antialiasing: true,\r\n },\r\n};\r\n"]}
@@ -1,30 +0,0 @@
1
- /**
2
- * The render only default configuration of the viewer, including templates (canvas, overly, loading screen)
3
- * This configuration doesn't hold specific parameters, and only defines objects that are needed for the render only viewer viewer to fully work correctly.
4
- */
5
- export declare const renderOnlyDefaultConfiguration: {
6
- version: string;
7
- camera: {
8
- behaviors: {
9
- autoRotate: {
10
- type: number;
11
- };
12
- framing: {
13
- type: number;
14
- zoomOnBoundingInfo: boolean;
15
- zoomStopsAnimation: boolean;
16
- };
17
- bouncing: {
18
- type: number;
19
- };
20
- };
21
- };
22
- skybox: {};
23
- ground: {
24
- receiveShadows: boolean;
25
- };
26
- engine: {
27
- antialiasing: boolean;
28
- };
29
- scene: {};
30
- };
@@ -1,31 +0,0 @@
1
- /**
2
- * The render only default configuration of the viewer, including templates (canvas, overly, loading screen)
3
- * This configuration doesn't hold specific parameters, and only defines objects that are needed for the render only viewer viewer to fully work correctly.
4
- */
5
- export var renderOnlyDefaultConfiguration = {
6
- version: "3.2.0-alpha4",
7
- camera: {
8
- behaviors: {
9
- autoRotate: {
10
- type: 0,
11
- },
12
- framing: {
13
- type: 2,
14
- zoomOnBoundingInfo: true,
15
- zoomStopsAnimation: false,
16
- },
17
- bouncing: {
18
- type: 1,
19
- },
20
- },
21
- },
22
- skybox: {},
23
- ground: {
24
- receiveShadows: true,
25
- },
26
- engine: {
27
- antialiasing: true,
28
- },
29
- scene: {},
30
- };
31
- //# sourceMappingURL=renderOnlyDefault.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderOnlyDefault.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/renderOnlyDefault.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,IAAM,8BAA8B,GAAG;IAC1C,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE;QACJ,SAAS,EAAE;YACP,UAAU,EAAE;gBACR,IAAI,EAAE,CAAC;aACV;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,CAAC;gBACP,kBAAkB,EAAE,IAAI;gBACxB,kBAAkB,EAAE,KAAK;aAC5B;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,CAAC;aACV;SACJ;KACJ;IACD,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;QACJ,cAAc,EAAE,IAAI;KACvB;IACD,MAAM,EAAE;QACJ,YAAY,EAAE,IAAI;KACrB;IACD,KAAK,EAAE,EAAE;CACZ,CAAC","sourcesContent":["/**\r\n * The render only default configuration of the viewer, including templates (canvas, overly, loading screen)\r\n * This configuration doesn't hold specific parameters, and only defines objects that are needed for the render only viewer viewer to fully work correctly.\r\n */\r\nexport const renderOnlyDefaultConfiguration = {\r\n version: \"3.2.0-alpha4\",\r\n camera: {\r\n behaviors: {\r\n autoRotate: {\r\n type: 0,\r\n },\r\n framing: {\r\n type: 2,\r\n zoomOnBoundingInfo: true,\r\n zoomStopsAnimation: false,\r\n },\r\n bouncing: {\r\n type: 1,\r\n },\r\n },\r\n },\r\n skybox: {},\r\n ground: {\r\n receiveShadows: true,\r\n },\r\n engine: {\r\n antialiasing: true,\r\n },\r\n scene: {},\r\n};\r\n"]}
@@ -1,9 +0,0 @@
1
- import type { ViewerConfiguration } from "./../configuration";
2
- /**
3
- * Defines a default directional shadow light for normalized objects (!)
4
- */
5
- export declare const shadowDirectionalLightConfiguration: ViewerConfiguration;
6
- /**
7
- * Defines a default shadow-enabled spot light for normalized objects.
8
- */
9
- export declare const shadowSpotlLightConfiguration: ViewerConfiguration;
@@ -1,64 +0,0 @@
1
- /**
2
- * Defines a default directional shadow light for normalized objects (!)
3
- */
4
- export var shadowDirectionalLightConfiguration = {
5
- model: {
6
- receiveShadows: true,
7
- castShadow: true,
8
- },
9
- ground: {
10
- receiveShadows: true,
11
- },
12
- lights: {
13
- shadowDirectionalLight: {
14
- type: 1,
15
- shadowEnabled: true,
16
- target: { x: 0, y: 0, z: 0.5 },
17
- position: { x: 1.49, y: 2.39, z: -1.33 },
18
- diffuse: { r: 0.867, g: 0.816, b: 0.788 },
19
- intensity: 4.887,
20
- intensityMode: 0,
21
- shadowBufferSize: 1024,
22
- shadowFrustumSize: 6.0,
23
- shadowFieldOfView: 50.977,
24
- shadowMinZ: 0.1,
25
- shadowMaxZ: 10.0,
26
- shadowConfig: {
27
- blurKernel: 32,
28
- useBlurCloseExponentialShadowMap: true,
29
- },
30
- },
31
- },
32
- };
33
- /**
34
- * Defines a default shadow-enabled spot light for normalized objects.
35
- */
36
- export var shadowSpotlLightConfiguration = {
37
- model: {
38
- receiveShadows: true,
39
- castShadow: true,
40
- },
41
- ground: {
42
- receiveShadows: true,
43
- },
44
- lights: {
45
- shadowSpotLight: {
46
- type: 2,
47
- intensity: 2,
48
- shadowEnabled: true,
49
- target: { x: 0, y: 0, z: 0.5 },
50
- position: { x: 0, y: 3.5, z: 3.7 },
51
- angle: 1,
52
- shadowOrthoScale: 0.5,
53
- shadowBufferSize: 1024,
54
- shadowMinZ: 0.1,
55
- shadowMaxZ: 50.0,
56
- shadowConfig: {
57
- frustumEdgeFalloff: 0.5,
58
- blurKernel: 32,
59
- useBlurExponentialShadowMap: true,
60
- },
61
- },
62
- },
63
- };
64
- //# sourceMappingURL=shadowLight.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shadowLight.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/shadowLight.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,IAAM,mCAAmC,GAAwB;IACpE,KAAK,EAAE;QACH,cAAc,EAAE,IAAI;QACpB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B,EAAE,GAAG;YACrB,gBAAgB,EAAE,IAAI;YACtB,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE;gBACV,kBAAkB,EAAE,GAAG;gBACvB,UAAU,EAAE,EAAE;gBACd,2BAA2B,EAAE,IAAI;aACpC;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\n\r\n/**\r\n * Defines a default directional shadow light for normalized objects (!)\r\n */\r\nexport const shadowDirectionalLightConfiguration: ViewerConfiguration = {\r\n model: {\r\n receiveShadows: true,\r\n castShadow: true,\r\n },\r\n ground: {\r\n receiveShadows: true,\r\n },\r\n lights: {\r\n shadowDirectionalLight: {\r\n type: 1,\r\n shadowEnabled: true,\r\n target: { x: 0, y: 0, z: 0.5 },\r\n position: { x: 1.49, y: 2.39, z: -1.33 },\r\n diffuse: { r: 0.867, g: 0.816, b: 0.788 },\r\n intensity: 4.887,\r\n intensityMode: 0,\r\n shadowBufferSize: 1024,\r\n shadowFrustumSize: 6.0,\r\n shadowFieldOfView: 50.977,\r\n shadowMinZ: 0.1,\r\n shadowMaxZ: 10.0,\r\n shadowConfig: {\r\n blurKernel: 32,\r\n useBlurCloseExponentialShadowMap: true,\r\n },\r\n },\r\n },\r\n};\r\n\r\n/**\r\n * Defines a default shadow-enabled spot light for normalized objects.\r\n */\r\nexport const shadowSpotlLightConfiguration: ViewerConfiguration = {\r\n model: {\r\n receiveShadows: true,\r\n castShadow: true,\r\n },\r\n ground: {\r\n receiveShadows: true,\r\n },\r\n lights: {\r\n shadowSpotLight: {\r\n type: 2,\r\n intensity: 2,\r\n shadowEnabled: true,\r\n target: { x: 0, y: 0, z: 0.5 },\r\n position: { x: 0, y: 3.5, z: 3.7 },\r\n angle: 1,\r\n shadowOrthoScale: 0.5,\r\n shadowBufferSize: 1024,\r\n shadowMinZ: 0.1,\r\n shadowMaxZ: 50.0,\r\n shadowConfig: {\r\n frustumEdgeFalloff: 0.5,\r\n blurKernel: 32,\r\n useBlurExponentialShadowMap: true,\r\n },\r\n },\r\n },\r\n};\r\n"]}
package/helper/index.d.ts DELETED
@@ -1,29 +0,0 @@
1
- declare const expDm: Ideepmerge;
2
- export { expDm as deepmerge };
3
- /**
4
- * Is the provided string a URL?
5
- *
6
- * @param urlToCheck the url to inspect
7
- * @returns true if the string is a URL
8
- */
9
- export declare function isUrl(urlToCheck: string): boolean;
10
- /**
11
- * Convert a string from kebab-case to camelCase
12
- * @param s string to convert
13
- * @returns the converted string
14
- */
15
- export declare function kebabToCamel(s: string): string;
16
- /**
17
- * Convert a string from camelCase to kebab-case
18
- * @param str string to convert
19
- * @returns the converted string
20
- */
21
- export declare function camelToKebab(str: string): string | null;
22
- /**
23
- * This will extend an object with configuration values.
24
- * What it practically does it take the keys from the configuration and set them on the object.
25
- * If the configuration is a tree, it will traverse into the tree.
26
- * @param object the object to extend
27
- * @param config the configuration object that will extend the object
28
- */
29
- export declare function extendClassWithConfig(object: any, config: any): void;