@babylonjs/viewer 7.41.1-alpha → 7.42.0

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 (619) hide show
  1. package/configuration/configuration.d.ts +107 -0
  2. package/configuration/configuration.js +16 -0
  3. package/configuration/configuration.js.map +1 -0
  4. package/configuration/configurationCompatibility.d.ts +8 -0
  5. package/configuration/configurationCompatibility.js +66 -0
  6. package/configuration/configurationCompatibility.js.map +1 -0
  7. package/configuration/configurationContainer.d.ts +10 -0
  8. package/configuration/configurationContainer.js +10 -0
  9. package/configuration/configurationContainer.js.map +1 -0
  10. package/configuration/globals.d.ts +6 -0
  11. package/configuration/globals.js +18 -0
  12. package/configuration/globals.js.map +1 -0
  13. package/configuration/index.d.ts +2 -0
  14. package/configuration/index.js +4 -0
  15. package/configuration/index.js.map +1 -0
  16. package/configuration/interfaces/cameraConfiguration.d.ts +31 -0
  17. package/configuration/interfaces/cameraConfiguration.js +2 -0
  18. package/configuration/interfaces/cameraConfiguration.js.map +1 -0
  19. package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -0
  20. package/configuration/interfaces/colorGradingConfiguration.js +2 -0
  21. package/configuration/interfaces/colorGradingConfiguration.js.map +1 -0
  22. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -0
  23. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +2 -0
  24. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -0
  25. package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -0
  26. package/configuration/interfaces/environmentMapConfiguration.js +2 -0
  27. package/configuration/interfaces/environmentMapConfiguration.js.map +1 -0
  28. package/configuration/interfaces/groundConfiguration.d.ts +24 -0
  29. package/configuration/interfaces/groundConfiguration.js +2 -0
  30. package/configuration/interfaces/groundConfiguration.js.map +1 -0
  31. package/configuration/interfaces/imageProcessingConfiguration.d.ts +45 -0
  32. package/configuration/interfaces/imageProcessingConfiguration.js +2 -0
  33. package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -0
  34. package/configuration/interfaces/index.d.ts +15 -0
  35. package/configuration/interfaces/index.js +16 -0
  36. package/configuration/interfaces/index.js.map +1 -0
  37. package/configuration/interfaces/lightConfiguration.d.ts +60 -0
  38. package/configuration/interfaces/lightConfiguration.js +2 -0
  39. package/configuration/interfaces/lightConfiguration.js.map +1 -0
  40. package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -0
  41. package/configuration/interfaces/modelAnimationConfiguration.js +2 -0
  42. package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -0
  43. package/configuration/interfaces/modelConfiguration.d.ts +65 -0
  44. package/configuration/interfaces/modelConfiguration.js +2 -0
  45. package/configuration/interfaces/modelConfiguration.js.map +1 -0
  46. package/configuration/interfaces/observersConfiguration.d.ts +5 -0
  47. package/configuration/interfaces/observersConfiguration.js +2 -0
  48. package/configuration/interfaces/observersConfiguration.js.map +1 -0
  49. package/configuration/interfaces/sceneConfiguration.d.ts +48 -0
  50. package/configuration/interfaces/sceneConfiguration.js +2 -0
  51. package/configuration/interfaces/sceneConfiguration.js.map +1 -0
  52. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -0
  53. package/configuration/interfaces/sceneOptimizerConfiguration.js +2 -0
  54. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -0
  55. package/configuration/interfaces/skyboxConfiguration.d.ts +21 -0
  56. package/configuration/interfaces/skyboxConfiguration.js +2 -0
  57. package/configuration/interfaces/skyboxConfiguration.js.map +1 -0
  58. package/configuration/interfaces/templateConfiguration.d.ts +67 -0
  59. package/configuration/interfaces/templateConfiguration.js +2 -0
  60. package/configuration/interfaces/templateConfiguration.js.map +1 -0
  61. package/configuration/interfaces/vrConfiguration.d.ts +16 -0
  62. package/configuration/interfaces/vrConfiguration.js +2 -0
  63. package/configuration/interfaces/vrConfiguration.js.map +1 -0
  64. package/configuration/loader.d.ts +4 -0
  65. package/configuration/loader.js +17 -0
  66. package/configuration/loader.js.map +1 -0
  67. package/configuration/mappers.d.ts +43 -0
  68. package/configuration/mappers.js +193 -0
  69. package/configuration/mappers.js.map +1 -0
  70. package/configuration/renderOnlyLoader.d.ts +33 -0
  71. package/configuration/renderOnlyLoader.js +162 -0
  72. package/configuration/renderOnlyLoader.js.map +1 -0
  73. package/configuration/types/default.d.ts +6 -0
  74. package/configuration/types/default.js +121 -0
  75. package/configuration/types/default.js.map +1 -0
  76. package/configuration/types/environmentMap.d.ts +5 -0
  77. package/configuration/types/environmentMap.js +14 -0
  78. package/configuration/types/environmentMap.js.map +1 -0
  79. package/configuration/types/extended.d.ts +6 -0
  80. package/configuration/types/extended.js +317 -0
  81. package/configuration/types/extended.js.map +1 -0
  82. package/configuration/types/index.d.ts +14 -0
  83. package/configuration/types/index.js +51 -0
  84. package/configuration/types/index.js.map +1 -0
  85. package/configuration/types/minimal.d.ts +6 -0
  86. package/configuration/types/minimal.js +43 -0
  87. package/configuration/types/minimal.js.map +1 -0
  88. package/configuration/types/renderOnlyDefault.d.ts +30 -0
  89. package/configuration/types/renderOnlyDefault.js +31 -0
  90. package/configuration/types/renderOnlyDefault.js.map +1 -0
  91. package/configuration/types/shadowLight.d.ts +9 -0
  92. package/configuration/types/shadowLight.js +64 -0
  93. package/configuration/types/shadowLight.js.map +1 -0
  94. package/helper/index.d.ts +29 -0
  95. package/helper/index.js +66 -0
  96. package/helper/index.js.map +1 -0
  97. package/index.d.ts +30 -0
  98. package/index.js +46 -0
  99. package/index.js.map +1 -0
  100. package/initializer.d.ts +11 -0
  101. package/initializer.js +35 -0
  102. package/initializer.js.map +1 -0
  103. package/interfaces.d.ts +5 -0
  104. package/interfaces.js +7 -0
  105. package/interfaces.js.map +1 -0
  106. package/labs/environmentSerializer.d.ts +126 -0
  107. package/labs/environmentSerializer.js +191 -0
  108. package/labs/environmentSerializer.js.map +1 -0
  109. package/labs/texture.d.ts +183 -0
  110. package/labs/texture.js +351 -0
  111. package/labs/texture.js.map +1 -0
  112. package/labs/viewerLabs.d.ts +51 -0
  113. package/labs/viewerLabs.js +134 -0
  114. package/labs/viewerLabs.js.map +1 -0
  115. package/loader/modelLoader.d.ts +56 -0
  116. package/loader/modelLoader.js +202 -0
  117. package/loader/modelLoader.js.map +1 -0
  118. package/loader/plugins/applyMaterialConfig.d.ts +12 -0
  119. package/loader/plugins/applyMaterialConfig.js +16 -0
  120. package/loader/plugins/applyMaterialConfig.js.map +1 -0
  121. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -0
  122. package/loader/plugins/extendedMaterialLoaderPlugin.js +16 -0
  123. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -0
  124. package/loader/plugins/index.d.ts +19 -0
  125. package/loader/plugins/index.js +44 -0
  126. package/loader/plugins/index.js.map +1 -0
  127. package/loader/plugins/loaderPlugin.d.ts +24 -0
  128. package/loader/plugins/loaderPlugin.js +2 -0
  129. package/loader/plugins/loaderPlugin.js.map +1 -0
  130. package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -0
  131. package/loader/plugins/msftLodLoaderPlugin.js +21 -0
  132. package/loader/plugins/msftLodLoaderPlugin.js.map +1 -0
  133. package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -0
  134. package/loader/plugins/telemetryLoaderPlugin.js +36 -0
  135. package/loader/plugins/telemetryLoaderPlugin.js.map +1 -0
  136. package/managers/observablesManager.d.ts +66 -0
  137. package/managers/observablesManager.js +35 -0
  138. package/managers/observablesManager.js.map +1 -0
  139. package/managers/sceneManager.d.ts +245 -0
  140. package/managers/sceneManager.js +1375 -0
  141. package/managers/sceneManager.js.map +1 -0
  142. package/managers/telemetryManager.d.ts +78 -0
  143. package/managers/telemetryManager.js +117 -0
  144. package/managers/telemetryManager.js.map +1 -0
  145. package/model/modelAnimation.d.ts +215 -0
  146. package/model/modelAnimation.js +237 -0
  147. package/model/modelAnimation.js.map +1 -0
  148. package/model/viewerModel.d.ts +233 -0
  149. package/model/viewerModel.js +673 -0
  150. package/model/viewerModel.js.map +1 -0
  151. package/optimizer/custom/extended.d.ts +13 -0
  152. package/optimizer/custom/extended.js +101 -0
  153. package/optimizer/custom/extended.js.map +1 -0
  154. package/optimizer/custom/index.d.ts +9 -0
  155. package/optimizer/custom/index.js +26 -0
  156. package/optimizer/custom/index.js.map +1 -0
  157. package/package.json +28 -19
  158. package/readme.md +28 -28
  159. package/renderOnlyIndex.d.ts +11 -0
  160. package/renderOnlyIndex.js +18 -0
  161. package/renderOnlyIndex.js.map +1 -0
  162. package/templating/eventManager.d.ts +35 -0
  163. package/templating/eventManager.js +66 -0
  164. package/templating/eventManager.js.map +1 -0
  165. package/templating/plugins/hdButtonPlugin.d.ts +9 -0
  166. package/templating/plugins/hdButtonPlugin.js +22 -0
  167. package/templating/plugins/hdButtonPlugin.js.map +1 -0
  168. package/templating/plugins/printButton.d.ts +9 -0
  169. package/templating/plugins/printButton.js +41 -0
  170. package/templating/plugins/printButton.js.map +1 -0
  171. package/templating/templateManager.d.ts +197 -0
  172. package/templating/templateManager.js +561 -0
  173. package/templating/templateManager.js.map +1 -0
  174. package/templating/viewerTemplatePlugin.d.ts +21 -0
  175. package/templating/viewerTemplatePlugin.js +69 -0
  176. package/templating/viewerTemplatePlugin.js.map +1 -0
  177. package/viewer/defaultViewer.d.ts +130 -0
  178. package/viewer/defaultViewer.js +672 -0
  179. package/viewer/defaultViewer.js.map +1 -0
  180. package/viewer/renderOnlyViewer.d.ts +9 -0
  181. package/viewer/renderOnlyViewer.js +46 -0
  182. package/viewer/renderOnlyViewer.js.map +1 -0
  183. package/viewer/viewer.d.ts +258 -0
  184. package/viewer/viewer.js +783 -0
  185. package/viewer/viewer.js.map +1 -0
  186. package/viewer/viewerManager.d.ts +58 -0
  187. package/viewer/viewerManager.js +91 -0
  188. package/viewer/viewerManager.js.map +1 -0
  189. package/viewer/viewerWithTemplate.d.ts +9 -0
  190. package/viewer/viewerWithTemplate.js +20 -0
  191. package/viewer/viewerWithTemplate.js.map +1 -0
  192. package/assets/photoStudio.env +0 -0
  193. package/dist/babylon-viewer.esm.js +0 -2
  194. package/dist/babylon-viewer.esm.js.map +0 -1
  195. package/dist/babylon-viewer.esm.min.js +0 -2
  196. package/dist/babylon-viewer.esm.min.js.map +0 -1
  197. package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js +0 -2
  198. package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js.map +0 -1
  199. package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js +0 -84
  200. package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js.map +0 -1
  201. package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js +0 -171
  202. package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js.map +0 -1
  203. package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js +0 -2
  204. package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js.map +0 -1
  205. package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js +0 -86
  206. package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js.map +0 -1
  207. package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js +0 -2
  208. package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js.map +0 -1
  209. package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js +0 -134
  210. package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js.map +0 -1
  211. package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js +0 -2
  212. package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js.map +0 -1
  213. package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js +0 -2
  214. package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js.map +0 -1
  215. package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js +0 -44
  216. package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js.map +0 -1
  217. package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js +0 -2
  218. package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js.map +0 -1
  219. package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js +0 -43
  220. package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js.map +0 -1
  221. package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js +0 -64
  222. package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js.map +0 -1
  223. package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js +0 -2
  224. package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js.map +0 -1
  225. package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js +0 -2
  226. package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js.map +0 -1
  227. package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js +0 -352
  228. package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js.map +0 -1
  229. package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js +0 -2
  230. package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js.map +0 -1
  231. package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js +0 -610
  232. package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js.map +0 -1
  233. package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js +0 -2
  234. package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js.map +0 -1
  235. package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js +0 -4033
  236. package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js.map +0 -1
  237. package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js +0 -581
  238. package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js.map +0 -1
  239. package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js +0 -2
  240. package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js.map +0 -1
  241. package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js +0 -65
  242. package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js.map +0 -1
  243. package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js +0 -2
  244. package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js.map +0 -1
  245. package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js +0 -2
  246. package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js.map +0 -1
  247. package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js +0 -96
  248. package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js.map +0 -1
  249. package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js +0 -2
  250. package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js.map +0 -1
  251. package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js +0 -97
  252. package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js.map +0 -1
  253. package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js +0 -62
  254. package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js.map +0 -1
  255. package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js +0 -2
  256. package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js.map +0 -1
  257. package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js +0 -55
  258. package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js.map +0 -1
  259. package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js +0 -2
  260. package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js.map +0 -1
  261. package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js +0 -64
  262. package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js.map +0 -1
  263. package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js +0 -2
  264. package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js.map +0 -1
  265. package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js +0 -72
  266. package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js.map +0 -1
  267. package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js +0 -2
  268. package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js.map +0 -1
  269. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js +0 -2
  270. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js.map +0 -1
  271. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js +0 -81
  272. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js.map +0 -1
  273. package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js +0 -85
  274. package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js.map +0 -1
  275. package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js +0 -2
  276. package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js.map +0 -1
  277. package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js +0 -75
  278. package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js.map +0 -1
  279. package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js +0 -2
  280. package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js.map +0 -1
  281. package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js +0 -2
  282. package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js.map +0 -1
  283. package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js +0 -307
  284. package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js.map +0 -1
  285. package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js +0 -2
  286. package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js.map +0 -1
  287. package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js +0 -74
  288. package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js.map +0 -1
  289. package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js +0 -262
  290. package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js.map +0 -1
  291. package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js +0 -2
  292. package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js.map +0 -1
  293. package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js +0 -2
  294. package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js.map +0 -1
  295. package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js +0 -87
  296. package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js.map +0 -1
  297. package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js +0 -2
  298. package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js.map +0 -1
  299. package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js +0 -26
  300. package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js.map +0 -1
  301. package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js +0 -39
  302. package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js.map +0 -1
  303. package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js +0 -2
  304. package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js.map +0 -1
  305. package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js +0 -2
  306. package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js.map +0 -1
  307. package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js +0 -46
  308. package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js.map +0 -1
  309. package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js +0 -43
  310. package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js.map +0 -1
  311. package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js +0 -2
  312. package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js.map +0 -1
  313. package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js +0 -63
  314. package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js.map +0 -1
  315. package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js +0 -2
  316. package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js.map +0 -1
  317. package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js +0 -51
  318. package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js.map +0 -1
  319. package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js +0 -2
  320. package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js.map +0 -1
  321. package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js +0 -2
  322. package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js.map +0 -1
  323. package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js +0 -2201
  324. package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js.map +0 -1
  325. package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js +0 -337
  326. package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js.map +0 -1
  327. package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js +0 -2
  328. package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js.map +0 -1
  329. package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js +0 -2
  330. package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js.map +0 -1
  331. package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js +0 -46
  332. package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js.map +0 -1
  333. package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js +0 -47
  334. package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js.map +0 -1
  335. package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js +0 -2
  336. package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js.map +0 -1
  337. package/dist/chunks/animationGroup-8TJDgymS.esm.js +0 -2482
  338. package/dist/chunks/animationGroup-8TJDgymS.esm.js.map +0 -1
  339. package/dist/chunks/animationGroup-toXtd3a1.esm.min.js +0 -2
  340. package/dist/chunks/animationGroup-toXtd3a1.esm.min.js.map +0 -1
  341. package/dist/chunks/assetContainer-7pMDUaac.esm.min.js +0 -2
  342. package/dist/chunks/assetContainer-7pMDUaac.esm.min.js.map +0 -1
  343. package/dist/chunks/assetContainer-DYzO0AbX.esm.js +0 -1720
  344. package/dist/chunks/assetContainer-DYzO0AbX.esm.js.map +0 -1
  345. package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js +0 -2
  346. package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js.map +0 -1
  347. package/dist/chunks/audioEngine-peiGqjr6.esm.js +0 -305
  348. package/dist/chunks/audioEngine-peiGqjr6.esm.js.map +0 -1
  349. package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js +0 -2
  350. package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js.map +0 -1
  351. package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js +0 -114
  352. package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js.map +0 -1
  353. package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js +0 -600
  354. package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js.map +0 -1
  355. package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js +0 -2
  356. package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js.map +0 -1
  357. package/dist/chunks/dds-6EdM5O6M.esm.js +0 -540
  358. package/dist/chunks/dds-6EdM5O6M.esm.js.map +0 -1
  359. package/dist/chunks/dds-DVX_K9B3.esm.min.js +0 -2
  360. package/dist/chunks/dds-DVX_K9B3.esm.min.js.map +0 -1
  361. package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js +0 -2
  362. package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js.map +0 -1
  363. package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js +0 -88
  364. package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js.map +0 -1
  365. package/dist/chunks/decalFragment-C_Cews3-.esm.js +0 -18
  366. package/dist/chunks/decalFragment-C_Cews3-.esm.js.map +0 -1
  367. package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js +0 -2
  368. package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js.map +0 -1
  369. package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js +0 -2
  370. package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js.map +0 -1
  371. package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js +0 -2
  372. package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js.map +0 -1
  373. package/dist/chunks/default.fragment-CyFHDykY.esm.js +0 -446
  374. package/dist/chunks/default.fragment-CyFHDykY.esm.js.map +0 -1
  375. package/dist/chunks/default.fragment-ej-2z5tS.esm.js +0 -515
  376. package/dist/chunks/default.fragment-ej-2z5tS.esm.js.map +0 -1
  377. package/dist/chunks/default.vertex-16mVOFgT.esm.js +0 -211
  378. package/dist/chunks/default.vertex-16mVOFgT.esm.js.map +0 -1
  379. package/dist/chunks/default.vertex-D--q2At3.esm.min.js +0 -2
  380. package/dist/chunks/default.vertex-D--q2At3.esm.min.js.map +0 -1
  381. package/dist/chunks/default.vertex-DDlgZTrR.esm.js +0 -190
  382. package/dist/chunks/default.vertex-DDlgZTrR.esm.js.map +0 -1
  383. package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js +0 -2
  384. package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js.map +0 -1
  385. package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js +0 -15
  386. package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js.map +0 -1
  387. package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js +0 -13
  388. package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js.map +0 -1
  389. package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js +0 -2
  390. package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js.map +0 -1
  391. package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js +0 -2
  392. package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js.map +0 -1
  393. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +0 -11
  394. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +0 -1
  395. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +0 -2
  396. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +0 -1
  397. package/dist/chunks/dumpTools-Bhux0wvM.esm.js +0 -200
  398. package/dist/chunks/dumpTools-Bhux0wvM.esm.js.map +0 -1
  399. package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js +0 -2
  400. package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js.map +0 -1
  401. package/dist/chunks/engine-DF_zE4qj.esm.js +0 -2213
  402. package/dist/chunks/engine-DF_zE4qj.esm.js.map +0 -1
  403. package/dist/chunks/engine-DVmdDcyP.esm.min.js +0 -2
  404. package/dist/chunks/engine-DVmdDcyP.esm.min.js.map +0 -1
  405. package/dist/chunks/engine.common-CvOmoKru.esm.js +0 -1162
  406. package/dist/chunks/engine.common-CvOmoKru.esm.js.map +0 -1
  407. package/dist/chunks/engine.common-DpTzktQJ.esm.min.js +0 -2
  408. package/dist/chunks/engine.common-DpTzktQJ.esm.min.js.map +0 -1
  409. package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js +0 -64
  410. package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js.map +0 -1
  411. package/dist/chunks/envTextureLoader-DMQui088.esm.min.js +0 -2
  412. package/dist/chunks/envTextureLoader-DMQui088.esm.min.js.map +0 -1
  413. package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js +0 -2
  414. package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js.map +0 -1
  415. package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js +0 -382
  416. package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js.map +0 -1
  417. package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js +0 -1683
  418. package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js.map +0 -1
  419. package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js +0 -2
  420. package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js.map +0 -1
  421. package/dist/chunks/fogFragment-BrGGFaiu.esm.js +0 -101
  422. package/dist/chunks/fogFragment-BrGGFaiu.esm.js.map +0 -1
  423. package/dist/chunks/fogFragment-ByOwwQur.esm.min.js +0 -2
  424. package/dist/chunks/fogFragment-ByOwwQur.esm.min.js.map +0 -1
  425. package/dist/chunks/fogFragment-Chod24nu.esm.min.js +0 -2
  426. package/dist/chunks/fogFragment-Chod24nu.esm.min.js.map +0 -1
  427. package/dist/chunks/fogFragment-gZfybCpt.esm.js +0 -102
  428. package/dist/chunks/fogFragment-gZfybCpt.esm.js.map +0 -1
  429. package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js +0 -2
  430. package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js.map +0 -1
  431. package/dist/chunks/fresnelFunction-DBlxfmri.esm.js +0 -12
  432. package/dist/chunks/fresnelFunction-DBlxfmri.esm.js.map +0 -1
  433. package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js +0 -2
  434. package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js.map +0 -1
  435. package/dist/chunks/glTFLoader-fUFiWvYb.esm.js +0 -7693
  436. package/dist/chunks/glTFLoader-fUFiWvYb.esm.js.map +0 -1
  437. package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js +0 -2
  438. package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js.map +0 -1
  439. package/dist/chunks/glTFLoaderAnimation-CttmY50U.esm.js +0 -77
  440. package/dist/chunks/glTFLoaderAnimation-CttmY50U.esm.js.map +0 -1
  441. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +0 -2
  442. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +0 -1
  443. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +0 -67
  444. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +0 -1
  445. package/dist/chunks/harmonicsFunctions-B0Rp1hEo.esm.min.js +0 -2
  446. package/dist/chunks/harmonicsFunctions-B0Rp1hEo.esm.min.js.map +0 -1
  447. package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js +0 -34
  448. package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js.map +0 -1
  449. package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js +0 -2
  450. package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js.map +0 -1
  451. package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js +0 -35
  452. package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js.map +0 -1
  453. package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js +0 -253
  454. package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js.map +0 -1
  455. package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js +0 -2
  456. package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js.map +0 -1
  457. package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js +0 -2
  458. package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js.map +0 -1
  459. package/dist/chunks/helperFunctions-C66wRWtu.esm.js +0 -110
  460. package/dist/chunks/helperFunctions-C66wRWtu.esm.js.map +0 -1
  461. package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js +0 -2
  462. package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js.map +0 -1
  463. package/dist/chunks/helperFunctions-gnki_9Kj.esm.js +0 -83
  464. package/dist/chunks/helperFunctions-gnki_9Kj.esm.js.map +0 -1
  465. package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js +0 -189
  466. package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js.map +0 -1
  467. package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js +0 -2
  468. package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js.map +0 -1
  469. package/dist/chunks/index-C6hXZyZb.esm.js +0 -74889
  470. package/dist/chunks/index-C6hXZyZb.esm.js.map +0 -1
  471. package/dist/chunks/index-rZVkfTE6.esm.min.js +0 -57
  472. package/dist/chunks/index-rZVkfTE6.esm.min.js.map +0 -1
  473. package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js +0 -814
  474. package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js.map +0 -1
  475. package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js +0 -2
  476. package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js.map +0 -1
  477. package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js +0 -2
  478. package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js.map +0 -1
  479. package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js +0 -11
  480. package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js.map +0 -1
  481. package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js +0 -2
  482. package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js.map +0 -1
  483. package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js +0 -35
  484. package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js.map +0 -1
  485. package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js +0 -2
  486. package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js.map +0 -1
  487. package/dist/chunks/logDepthVertex-DKPfA10X.esm.js +0 -81
  488. package/dist/chunks/logDepthVertex-DKPfA10X.esm.js.map +0 -1
  489. package/dist/chunks/logDepthVertex-ojTShW5I.esm.js +0 -77
  490. package/dist/chunks/logDepthVertex-ojTShW5I.esm.js.map +0 -1
  491. package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js +0 -2
  492. package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js.map +0 -1
  493. package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js +0 -2
  494. package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js.map +0 -1
  495. package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js +0 -11
  496. package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js.map +0 -1
  497. package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js +0 -2
  498. package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js.map +0 -1
  499. package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.esm.js +0 -11
  500. package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.esm.js.map +0 -1
  501. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +0 -119
  502. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +0 -1
  503. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +0 -2
  504. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +0 -1
  505. package/dist/chunks/meshUboDeclaration-QvH0RgeZ.esm.js +0 -26
  506. package/dist/chunks/meshUboDeclaration-QvH0RgeZ.esm.js.map +0 -1
  507. package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js +0 -2
  508. package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js.map +0 -1
  509. package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js +0 -2
  510. package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js.map +0 -1
  511. package/dist/chunks/objFileLoader-BPwrX8RK.esm.js +0 -1338
  512. package/dist/chunks/objFileLoader-BPwrX8RK.esm.js.map +0 -1
  513. package/dist/chunks/oitFragment-CmcWUhsZ.esm.js +0 -1240
  514. package/dist/chunks/oitFragment-CmcWUhsZ.esm.js.map +0 -1
  515. package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js +0 -1078
  516. package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js.map +0 -1
  517. package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js +0 -2
  518. package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js.map +0 -1
  519. package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js +0 -2
  520. package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js.map +0 -1
  521. package/dist/chunks/pass.fragment--XRaXRhU.esm.js +0 -15
  522. package/dist/chunks/pass.fragment--XRaXRhU.esm.js.map +0 -1
  523. package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js +0 -2
  524. package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js.map +0 -1
  525. package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js +0 -2
  526. package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js.map +0 -1
  527. package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js +0 -15
  528. package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js.map +0 -1
  529. package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js +0 -3269
  530. package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js.map +0 -1
  531. package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js +0 -2
  532. package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js.map +0 -1
  533. package/dist/chunks/pbr.fragment-fky04gH_.esm.js +0 -3222
  534. package/dist/chunks/pbr.fragment-fky04gH_.esm.js.map +0 -1
  535. package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js +0 -2
  536. package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js.map +0 -1
  537. package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js +0 -223
  538. package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js.map +0 -1
  539. package/dist/chunks/pbr.vertex-BXcMYADF.esm.js +0 -348
  540. package/dist/chunks/pbr.vertex-BXcMYADF.esm.js.map +0 -1
  541. package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js +0 -2
  542. package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js.map +0 -1
  543. package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js +0 -2
  544. package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js.map +0 -1
  545. package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js +0 -2
  546. package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js.map +0 -1
  547. package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js +0 -20
  548. package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js.map +0 -1
  549. package/dist/chunks/rawTexture-CWiRIto8.esm.js +0 -191
  550. package/dist/chunks/rawTexture-CWiRIto8.esm.js.map +0 -1
  551. package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js +0 -2
  552. package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js.map +0 -1
  553. package/dist/chunks/ray-ix7SqYNQ.esm.min.js +0 -2
  554. package/dist/chunks/ray-ix7SqYNQ.esm.min.js.map +0 -1
  555. package/dist/chunks/ray-nTZBkOil.esm.js +0 -946
  556. package/dist/chunks/ray-nTZBkOil.esm.js.map +0 -1
  557. package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js +0 -2
  558. package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js.map +0 -1
  559. package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js +0 -13
  560. package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js.map +0 -1
  561. package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js +0 -2
  562. package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js.map +0 -1
  563. package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js +0 -13
  564. package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js.map +0 -1
  565. package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js +0 -13
  566. package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js.map +0 -1
  567. package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js +0 -2
  568. package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js.map +0 -1
  569. package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js +0 -13
  570. package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js.map +0 -1
  571. package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js +0 -2
  572. package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js.map +0 -1
  573. package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js +0 -2
  574. package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js.map +0 -1
  575. package/dist/chunks/splatFileLoader-Dp33YOem.esm.js +0 -3379
  576. package/dist/chunks/splatFileLoader-Dp33YOem.esm.js.map +0 -1
  577. package/dist/chunks/spotLight-C0NmKeem.esm.js +0 -701
  578. package/dist/chunks/spotLight-C0NmKeem.esm.js.map +0 -1
  579. package/dist/chunks/spotLight-CcuCNdES.esm.min.js +0 -2
  580. package/dist/chunks/spotLight-CcuCNdES.esm.min.js.map +0 -1
  581. package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js +0 -2
  582. package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js.map +0 -1
  583. package/dist/chunks/standardMaterial-v_D8QA4q.esm.js +0 -1807
  584. package/dist/chunks/standardMaterial-v_D8QA4q.esm.js.map +0 -1
  585. package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js +0 -2
  586. package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js.map +0 -1
  587. package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js +0 -238
  588. package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js.map +0 -1
  589. package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js +0 -349
  590. package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js.map +0 -1
  591. package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js +0 -2
  592. package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js.map +0 -1
  593. package/dist/chunks/thinEngine-DksimP2U.esm.js +0 -3848
  594. package/dist/chunks/thinEngine-DksimP2U.esm.js.map +0 -1
  595. package/dist/chunks/thinEngine-tsALaFYH.esm.min.js +0 -2
  596. package/dist/chunks/thinEngine-tsALaFYH.esm.min.js.map +0 -1
  597. package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js +0 -314
  598. package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js.map +0 -1
  599. package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js +0 -2
  600. package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js.map +0 -1
  601. package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js +0 -2
  602. package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js.map +0 -1
  603. package/dist/chunks/vertexColorMixing-D9917nJN.esm.js +0 -428
  604. package/dist/chunks/vertexColorMixing-D9917nJN.esm.js.map +0 -1
  605. package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js +0 -2
  606. package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js.map +0 -1
  607. package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js +0 -538
  608. package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js.map +0 -1
  609. package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js +0 -2
  610. package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js.map +0 -1
  611. package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js +0 -11533
  612. package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js.map +0 -1
  613. package/dist/chunks/workerPool-BUOov2K1.esm.js +0 -122
  614. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +0 -1
  615. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +0 -2
  616. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +0 -1
  617. package/lib/index.d.ts +0 -591
  618. package/lib/index.js +0 -2165
  619. package/lib/index.js.map +0 -1
@@ -0,0 +1,193 @@
1
+ import { Tools } from "@babylonjs/core/Misc/tools.js";
2
+ // eslint-disable-next-line import/no-internal-modules
3
+ import { kebabToCamel } from "../helper/index.js";
4
+ /**
5
+ * This is a simple HTML mapper.
6
+ * This mapper parses a single HTML element and returns the configuration from its attributes.
7
+ * it parses numbers and boolean values to the corresponding variable types.
8
+ * The following HTML element:
9
+ * <div test="1" random-flag="true" a.string.object="test"> will result in the following configuration:
10
+ *
11
+ * {
12
+ * test: 1, //a number!
13
+ * randomFlag: boolean, //camelCase and boolean
14
+ * a: {
15
+ * string: {
16
+ * object: "test" //dot-separated object levels
17
+ * }
18
+ * }
19
+ * }
20
+ */
21
+ var HTMLMapper = /** @class */ (function () {
22
+ function HTMLMapper() {
23
+ }
24
+ /**
25
+ * Map a specific element and get configuration from it
26
+ * @param element the HTML element to analyze.
27
+ * @returns a ViewerConfiguration object from the provided HTML Element
28
+ */
29
+ HTMLMapper.prototype.map = function (element) {
30
+ var config = {};
31
+ var _loop_1 = function (attrIdx) {
32
+ var attr = element.attributes.item(attrIdx);
33
+ if (!attr) {
34
+ return "continue";
35
+ }
36
+ // map "object.property" to the right configuration place.
37
+ var split = attr.nodeName.split(".");
38
+ split.reduce(function (currentConfig, key, idx) {
39
+ //convert html-style to json-style
40
+ var camelKey = kebabToCamel(key);
41
+ if (idx === split.length - 1) {
42
+ var val = attr.nodeValue; // firefox warns nodeValue is deprecated, but I found no sign of it anywhere.
43
+ if (val === "true") {
44
+ val = true;
45
+ }
46
+ else if (val === "false") {
47
+ val = false;
48
+ }
49
+ else if (val === "undefined") {
50
+ val = undefined;
51
+ }
52
+ else if (val === "null") {
53
+ val = null;
54
+ }
55
+ else {
56
+ var isnum = !isNaN(parseFloat(val)) && isFinite(val); ///^\d+$/.test(val);
57
+ if (isnum) {
58
+ var number = parseFloat(val);
59
+ if (!isNaN(number)) {
60
+ val = number;
61
+ }
62
+ }
63
+ }
64
+ currentConfig[camelKey] = val;
65
+ }
66
+ else {
67
+ currentConfig[camelKey] = currentConfig[camelKey] || {};
68
+ }
69
+ return currentConfig[camelKey];
70
+ }, config);
71
+ };
72
+ for (var attrIdx = 0; attrIdx < element.attributes.length; ++attrIdx) {
73
+ _loop_1(attrIdx);
74
+ }
75
+ return config;
76
+ };
77
+ return HTMLMapper;
78
+ }());
79
+ /**
80
+ * A simple string-to-JSON mapper.
81
+ * This is the main mapper, used to analyze downloaded JSON-Configuration or JSON payload
82
+ */
83
+ var JSONMapper = /** @class */ (function () {
84
+ function JSONMapper() {
85
+ }
86
+ JSONMapper.prototype.map = function (rawSource) {
87
+ return JSON.parse(rawSource);
88
+ };
89
+ return JSONMapper;
90
+ }());
91
+ /**
92
+ * The DOM Mapper will traverse an entire DOM Tree and will load the configuration from the
93
+ * DOM elements and attributes.
94
+ */
95
+ var DOMMapper = /** @class */ (function () {
96
+ function DOMMapper() {
97
+ }
98
+ /**
99
+ * The mapping function that will convert HTML data to a viewer configuration object
100
+ * @param baseElement the baseElement from which to start traversing
101
+ * @returns a ViewerConfiguration object from the provided HTML Element
102
+ */
103
+ DOMMapper.prototype.map = function (baseElement) {
104
+ var htmlMapper = new HTMLMapper();
105
+ var config = htmlMapper.map(baseElement);
106
+ var traverseChildren = function (element, partConfig) {
107
+ var children = element.children;
108
+ if (children.length) {
109
+ for (var i = 0; i < children.length; ++i) {
110
+ var item = children.item(i);
111
+ // use the HTML Mapper to read configuration from a single element
112
+ var configMapped = htmlMapper.map(item);
113
+ var key = kebabToCamel(item.nodeName.toLowerCase());
114
+ if (item.attributes.getNamedItem("array") && item.attributes.getNamedItem("array").nodeValue === "true") {
115
+ partConfig[key] = [];
116
+ }
117
+ else {
118
+ if (element.attributes.getNamedItem("array") && element.attributes.getNamedItem("array").nodeValue === "true") {
119
+ partConfig.push(configMapped);
120
+ }
121
+ else if (partConfig[key]) {
122
+ //exists already! probably an array
123
+ element.setAttribute("array", "true");
124
+ var oldItem = partConfig[key];
125
+ partConfig = [oldItem, configMapped];
126
+ }
127
+ else {
128
+ partConfig[key] = configMapped;
129
+ }
130
+ }
131
+ traverseChildren(item, partConfig[key] || configMapped);
132
+ }
133
+ }
134
+ return partConfig;
135
+ };
136
+ traverseChildren(baseElement, config);
137
+ return config;
138
+ };
139
+ return DOMMapper;
140
+ }());
141
+ /**
142
+ * The MapperManager manages the different implemented mappers.
143
+ * It allows the user to register new mappers as well and use them to parse their own configuration data
144
+ */
145
+ var MapperManager = /** @class */ (function () {
146
+ function MapperManager() {
147
+ this._mappers = {
148
+ html: new HTMLMapper(),
149
+ json: new JSONMapper(),
150
+ dom: new DOMMapper(),
151
+ };
152
+ }
153
+ /**
154
+ * Get a specific configuration mapper.
155
+ *
156
+ * @param type the name of the mapper to load
157
+ * @returns the mapper
158
+ */
159
+ MapperManager.prototype.getMapper = function (type) {
160
+ if (!this._mappers[type]) {
161
+ Tools.Error("No mapper defined for " + type);
162
+ }
163
+ return this._mappers[type];
164
+ };
165
+ /**
166
+ * Use this function to register your own configuration mapper.
167
+ * After a mapper is registered, it can be used to parse the specific type fo configuration to the standard ViewerConfiguration.
168
+ * @param type the name of the mapper. This will be used to define the configuration type and/or to get the mapper
169
+ * @param mapper The implemented mapper
170
+ */
171
+ MapperManager.prototype.registerMapper = function (type, mapper) {
172
+ this._mappers[type] = mapper;
173
+ };
174
+ /**
175
+ * Dispose the mapper manager and all of its mappers.
176
+ */
177
+ MapperManager.prototype.dispose = function () {
178
+ this._mappers = {};
179
+ };
180
+ /**
181
+ * The default mapper is the JSON mapper.
182
+ */
183
+ MapperManager.DefaultMapper = "json";
184
+ return MapperManager;
185
+ }());
186
+ export { MapperManager };
187
+ /**
188
+ * mapperManager is a singleton of the type MapperManager.
189
+ * The mapperManager can be disposed directly with calling mapperManager.dispose()
190
+ * or indirectly with using BabylonViewer.disposeAll()
191
+ */
192
+ export var mapperManager = new MapperManager();
193
+ //# sourceMappingURL=mappers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,sCAAwB;AAGxC,sDAAsD;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAS/C;;;;;;;;;;;;;;;;GAgBG;AACH;IAAA;IA+CA,CAAC;IA9CG;;;;OAIG;IACH,wBAAG,GAAH,UAAI,OAAoB;QACpB,IAAM,MAAM,GAAG,EAAE,CAAC;gCACT,OAAO;YACZ,IAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC9C,IAAI,CAAC,IAAI,EAAE,CAAC;;YAEZ,CAAC;YACD,0DAA0D;YAC1D,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACvC,KAAK,CAAC,MAAM,CAAC,UAAC,aAAqC,EAAE,GAAG,EAAE,GAAG;gBACzD,kCA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AC/B,CAAC;IAED;;;;;OAKG;IACI,sCAAc,GAArB,UAAsB,IAAY,EAAE,MAAe;QAC/C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,+BAAO,GAAd;QACI,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IAzCD;;OAEG;IACW,2BAAa,GAAG,MAAM,CAAC;IAuCzC,oBAAC;CAAA,AA5CD,IA4CC;SA5CY,aAAa;AA8C1B;;;;GAIG;AACH,MAAM,CAAC,IAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC","sourcesContent":["import { Tools } from \"core/Misc/tools\";\r\nimport type { ViewerConfiguration } from \"./configuration\";\r\n\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { kebabToCamel } from \"../helper/index\";\r\n\r\n/**\r\n * This is the mapper's interface. Implement this function to create your own mapper and register it at the mapper manager\r\n */\r\nexport interface IMapper {\r\n map(rawSource: any): ViewerConfiguration;\r\n}\r\n\r\n/**\r\n * This is a simple HTML mapper.\r\n * This mapper parses a single HTML element and returns the configuration from its attributes.\r\n * it parses numbers and boolean values to the corresponding variable types.\r\n * The following HTML element:\r\n * <div test=\"1\" random-flag=\"true\" a.string.object=\"test\"> will result in the following configuration:\r\n *\r\n * {\r\n * test: 1, //a number!\r\n * randomFlag: boolean, //camelCase and boolean\r\n * a: {\r\n * string: {\r\n * object: \"test\" //dot-separated object levels\r\n * }\r\n * }\r\n * }\r\n */\r\nclass HTMLMapper implements IMapper {\r\n /**\r\n * Map a specific element and get configuration from it\r\n * @param element the HTML element to analyze.\r\n * @returns a ViewerConfiguration object from the provided HTML Element\r\n */\r\n map(element: HTMLElement): ViewerConfiguration {\r\n const config = {};\r\n for (let attrIdx = 0; attrIdx < element.attributes.length; ++attrIdx) {\r\n const attr = element.attributes.item(attrIdx);\r\n if (!attr) {\r\n continue;\r\n }\r\n // map \"object.property\" to the right configuration place.\r\n const split = attr.nodeName.split(\".\");\r\n split.reduce((currentConfig: { [key: string]: any }, key, idx) => {\r\n //convert html-style to json-style\r\n const camelKey = kebabToCamel(key);\r\n if (idx === split.length - 1) {\r\n let val: any = attr!.nodeValue; // firefox warns nodeValue is deprecated, but I found no sign of it anywhere.\r\n if (val === \"true\") {\r\n val = true;\r\n } else if (val === \"false\") {\r\n val = false;\r\n } else if (val === \"undefined\") {\r\n val = undefined;\r\n } else if (val === \"null\") {\r\n val = null;\r\n } else {\r\n const isnum = !isNaN(parseFloat(val)) && isFinite(val); ///^\\d+$/.test(val);\r\n if (isnum) {\r\n const number = parseFloat(val);\r\n if (!isNaN(number)) {\r\n val = number;\r\n }\r\n }\r\n }\r\n currentConfig[camelKey] = val;\r\n } else {\r\n currentConfig[camelKey] = currentConfig[camelKey] || {};\r\n }\r\n return currentConfig[camelKey];\r\n }, config);\r\n }\r\n\r\n return config;\r\n }\r\n}\r\n\r\n/**\r\n * A simple string-to-JSON mapper.\r\n * This is the main mapper, used to analyze downloaded JSON-Configuration or JSON payload\r\n */\r\nclass JSONMapper implements IMapper {\r\n map(rawSource: string) {\r\n return JSON.parse(rawSource);\r\n }\r\n}\r\n\r\n/**\r\n * The DOM Mapper will traverse an entire DOM Tree and will load the configuration from the\r\n * DOM elements and attributes.\r\n */\r\nclass DOMMapper implements IMapper {\r\n /**\r\n * The mapping function that will convert HTML data to a viewer configuration object\r\n * @param baseElement the baseElement from which to start traversing\r\n * @returns a ViewerConfiguration object from the provided HTML Element\r\n */\r\n map(baseElement: HTMLElement): ViewerConfiguration {\r\n const htmlMapper = new HTMLMapper();\r\n const config = htmlMapper.map(baseElement);\r\n\r\n const traverseChildren = function (element: HTMLElement, partConfig: any) {\r\n const children = element.children;\r\n if (children.length) {\r\n for (let i = 0; i < children.length; ++i) {\r\n const item = <HTMLElement>children.item(i);\r\n // use the HTML Mapper to read configuration from a single element\r\n const configMapped = htmlMapper.map(item);\r\n const key = kebabToCamel(item.nodeName.toLowerCase());\r\n if (item.attributes.getNamedItem(\"array\") && item.attributes.getNamedItem(\"array\")!.nodeValue === \"true\") {\r\n partConfig[key] = [];\r\n } else {\r\n if (element.attributes.getNamedItem(\"array\") && element.attributes.getNamedItem(\"array\")!.nodeValue === \"true\") {\r\n partConfig.push(configMapped);\r\n } else if (partConfig[key]) {\r\n //exists already! probably an array\r\n element.setAttribute(\"array\", \"true\");\r\n const oldItem = partConfig[key];\r\n partConfig = [oldItem, configMapped];\r\n } else {\r\n partConfig[key] = configMapped;\r\n }\r\n }\r\n traverseChildren(item, partConfig[key] || configMapped);\r\n }\r\n }\r\n return partConfig;\r\n };\r\n\r\n traverseChildren(baseElement, config);\r\n\r\n return config;\r\n }\r\n}\r\n\r\n/**\r\n * The MapperManager manages the different implemented mappers.\r\n * It allows the user to register new mappers as well and use them to parse their own configuration data\r\n */\r\nexport class MapperManager {\r\n private _mappers: { [key: string]: IMapper };\r\n /**\r\n * The default mapper is the JSON mapper.\r\n */\r\n public static DefaultMapper = \"json\";\r\n\r\n constructor() {\r\n this._mappers = {\r\n html: new HTMLMapper(),\r\n json: new JSONMapper(),\r\n dom: new DOMMapper(),\r\n };\r\n }\r\n\r\n /**\r\n * Get a specific configuration mapper.\r\n *\r\n * @param type the name of the mapper to load\r\n * @returns the mapper\r\n */\r\n public getMapper(type: string) {\r\n if (!this._mappers[type]) {\r\n Tools.Error(\"No mapper defined for \" + type);\r\n }\r\n return this._mappers[type];\r\n }\r\n\r\n /**\r\n * Use this function to register your own configuration mapper.\r\n * After a mapper is registered, it can be used to parse the specific type fo configuration to the standard ViewerConfiguration.\r\n * @param type the name of the mapper. This will be used to define the configuration type and/or to get the mapper\r\n * @param mapper The implemented mapper\r\n */\r\n public registerMapper(type: string, mapper: IMapper) {\r\n this._mappers[type] = mapper;\r\n }\r\n\r\n /**\r\n * Dispose the mapper manager and all of its mappers.\r\n */\r\n public dispose() {\r\n this._mappers = {};\r\n }\r\n}\r\n\r\n/**\r\n * mapperManager is a singleton of the type MapperManager.\r\n * The mapperManager can be disposed directly with calling mapperManager.dispose()\r\n * or indirectly with using BabylonViewer.disposeAll()\r\n */\r\nexport const mapperManager = new MapperManager();\r\n"]}
@@ -0,0 +1,33 @@
1
+ import type { ViewerConfiguration } from "./configuration";
2
+ /**
3
+ * The configuration loader will load the configuration object from any source and will use the defined mapper to
4
+ * parse the object and return a conform ViewerConfiguration.
5
+ * It is a private member of the scene.
6
+ */
7
+ export declare class RenderOnlyConfigurationLoader {
8
+ private _enableCache;
9
+ private _configurationCache;
10
+ private _loadRequests;
11
+ constructor(_enableCache?: boolean);
12
+ private _getConfigurationTypeExcludeTemplate;
13
+ protected getExtendedConfig(type: string | undefined): ViewerConfiguration;
14
+ /**
15
+ * load a configuration object that is defined in the initial configuration provided.
16
+ * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.
17
+ *
18
+ * @param initConfig the initial configuration that has the definitions of further configuration to load.
19
+ * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only
20
+ * @returns A promise that delivers the extended viewer configuration, when done.
21
+ */
22
+ loadConfiguration(initConfig?: ViewerConfiguration, callback?: (config: ViewerConfiguration) => void): Promise<ViewerConfiguration>;
23
+ /**
24
+ * Dispose the configuration loader. This will cancel file requests, if active.
25
+ */
26
+ dispose(): void;
27
+ /**
28
+ * This function will process the initial configuration and make needed changes for the viewer to work.
29
+ * @param config the mutable(!) initial configuration to process
30
+ */
31
+ private _processInitialConfiguration;
32
+ private _loadFile;
33
+ }
@@ -0,0 +1,162 @@
1
+ import { mapperManager } from "./mappers.js";
2
+ import { processConfigurationCompatibility } from "./configurationCompatibility.js";
3
+ // eslint-disable-next-line import/no-internal-modules
4
+ import { deepmerge } from "../helper/index.js";
5
+ import { Tools } from "@babylonjs/core/Misc/tools.js";
6
+ import { extendedConfiguration } from "./types/extended.js";
7
+ import { renderOnlyDefaultConfiguration } from "./types/renderOnlyDefault.js";
8
+ /**
9
+ * The configuration loader will load the configuration object from any source and will use the defined mapper to
10
+ * parse the object and return a conform ViewerConfiguration.
11
+ * It is a private member of the scene.
12
+ */
13
+ var RenderOnlyConfigurationLoader = /** @class */ (function () {
14
+ function RenderOnlyConfigurationLoader(_enableCache) {
15
+ if (_enableCache === void 0) { _enableCache = false; }
16
+ this._enableCache = _enableCache;
17
+ this._configurationCache = {};
18
+ this._loadRequests = [];
19
+ }
20
+ RenderOnlyConfigurationLoader.prototype._getConfigurationTypeExcludeTemplate = function (types) {
21
+ var _this = this;
22
+ var config = {};
23
+ var typesSeparated = types.split(",");
24
+ typesSeparated.forEach(function (type) {
25
+ switch (type.trim()) {
26
+ case "default":
27
+ config = deepmerge(config, renderOnlyDefaultConfiguration);
28
+ break;
29
+ case "none":
30
+ break;
31
+ case "extended":
32
+ default:
33
+ config = deepmerge(config, extendedConfiguration);
34
+ break;
35
+ }
36
+ if (config.extends) {
37
+ config = deepmerge(config, _this._getConfigurationTypeExcludeTemplate(config.extends));
38
+ }
39
+ });
40
+ return config;
41
+ };
42
+ // eslint-disable-next-line @typescript-eslint/naming-convention
43
+ RenderOnlyConfigurationLoader.prototype.getExtendedConfig = function (type) {
44
+ return this._getConfigurationTypeExcludeTemplate(type || "extended");
45
+ };
46
+ /**
47
+ * load a configuration object that is defined in the initial configuration provided.
48
+ * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.
49
+ *
50
+ * @param initConfig the initial configuration that has the definitions of further configuration to load.
51
+ * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only
52
+ * @returns A promise that delivers the extended viewer configuration, when done.
53
+ */
54
+ RenderOnlyConfigurationLoader.prototype.loadConfiguration = function (initConfig, callback) {
55
+ var _this = this;
56
+ if (initConfig === void 0) { initConfig = {}; }
57
+ var loadedConfig = deepmerge({}, initConfig);
58
+ this._processInitialConfiguration(loadedConfig);
59
+ var extendedConfiguration = this.getExtendedConfig(loadedConfig.extends);
60
+ if (loadedConfig.configuration) {
61
+ var mapperType_1 = "json";
62
+ return Promise.resolve()
63
+ .then(function () {
64
+ if (typeof loadedConfig.configuration === "string" || (loadedConfig.configuration && loadedConfig.configuration.url)) {
65
+ // a file to load
66
+ var url = "";
67
+ if (typeof loadedConfig.configuration === "string") {
68
+ url = loadedConfig.configuration;
69
+ }
70
+ // if configuration is an object
71
+ if (typeof loadedConfig.configuration === "object" && loadedConfig.configuration.url) {
72
+ url = loadedConfig.configuration.url;
73
+ var type = loadedConfig.configuration.mapper;
74
+ // empty string?
75
+ if (!type) {
76
+ // load mapper type from filename / url
77
+ type = loadedConfig.configuration.url.split(".").pop();
78
+ }
79
+ mapperType_1 = type || mapperType_1;
80
+ }
81
+ return _this._loadFile(url);
82
+ }
83
+ else {
84
+ if (typeof loadedConfig.configuration === "object") {
85
+ mapperType_1 = loadedConfig.configuration.mapper || mapperType_1;
86
+ return loadedConfig.configuration.payload || {};
87
+ }
88
+ return {};
89
+ }
90
+ })
91
+ .then(function (data) {
92
+ var mapper = mapperManager.getMapper(mapperType_1);
93
+ var parsed = deepmerge(mapper.map(data), loadedConfig);
94
+ var merged = deepmerge(extendedConfiguration, parsed);
95
+ processConfigurationCompatibility(merged);
96
+ if (callback) {
97
+ callback(merged);
98
+ }
99
+ return merged;
100
+ });
101
+ }
102
+ else {
103
+ loadedConfig = deepmerge(extendedConfiguration, loadedConfig);
104
+ processConfigurationCompatibility(loadedConfig);
105
+ if (callback) {
106
+ callback(loadedConfig);
107
+ }
108
+ return Promise.resolve(loadedConfig);
109
+ }
110
+ };
111
+ /**
112
+ * Dispose the configuration loader. This will cancel file requests, if active.
113
+ */
114
+ RenderOnlyConfigurationLoader.prototype.dispose = function () {
115
+ this._loadRequests.forEach(function (request) {
116
+ request.abort();
117
+ });
118
+ this._loadRequests.length = 0;
119
+ };
120
+ /**
121
+ * This function will process the initial configuration and make needed changes for the viewer to work.
122
+ * @param config the mutable(!) initial configuration to process
123
+ */
124
+ RenderOnlyConfigurationLoader.prototype._processInitialConfiguration = function (config) {
125
+ if (config.model) {
126
+ if (typeof config.model === "string") {
127
+ config.model = {
128
+ url: config.model,
129
+ };
130
+ }
131
+ }
132
+ };
133
+ RenderOnlyConfigurationLoader.prototype._loadFile = function (url) {
134
+ var _this = this;
135
+ var cacheReference = this._configurationCache;
136
+ if (this._enableCache && cacheReference[url]) {
137
+ return Promise.resolve(cacheReference[url]);
138
+ }
139
+ return new Promise(function (resolve, reject) {
140
+ var fileRequest = Tools.LoadFile(url, function (result) {
141
+ var idx = _this._loadRequests.indexOf(fileRequest);
142
+ if (idx !== -1) {
143
+ _this._loadRequests.splice(idx, 1);
144
+ }
145
+ if (_this._enableCache) {
146
+ cacheReference[url] = result;
147
+ }
148
+ resolve(result);
149
+ }, undefined, undefined, false, function (request, error) {
150
+ var idx = _this._loadRequests.indexOf(fileRequest);
151
+ if (idx !== -1) {
152
+ _this._loadRequests.splice(idx, 1);
153
+ }
154
+ reject(error);
155
+ });
156
+ _this._loadRequests.push(fileRequest);
157
+ });
158
+ };
159
+ return RenderOnlyConfigurationLoader;
160
+ }());
161
+ export { RenderOnlyConfigurationLoader };
162
+ //# sourceMappingURL=renderOnlyLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderOnlyLoader.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/renderOnlyLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAEjF,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,sCAAwB;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAG3E;;;;GAIG;AACH;IAKI,uCAAoB,YAA6B;QAA7B,6BAAA,EAAA,oBAA6B;QAA7B,iBAAY,GAAZ,YAAY,CAAiB;QAC7C,IAAI,CAAC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appers\";\r\nimport type { ViewerConfiguration } from \"./configuration\";\r\nimport { processConfigurationCompatibility } from \"./configurationCompatibility\";\r\n\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { deepmerge } from \"../helper/index\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { extendedConfiguration } from \"./types/extended\";\r\nimport { renderOnlyDefaultConfiguration } from \"./types/renderOnlyDefault\";\r\nimport type { IFileRequest } from \"core/Misc/fileRequest\";\r\n\r\n/**\r\n * The configuration loader will load the configuration object from any source and will use the defined mapper to\r\n * parse the object and return a conform ViewerConfiguration.\r\n * It is a private member of the scene.\r\n */\r\nexport class RenderOnlyConfigurationLoader {\r\n private _configurationCache: { [url: string]: any };\r\n\r\n private _loadRequests: Array<IFileRequest>;\r\n\r\n constructor(private _enableCache: boolean = false) {\r\n this._configurationCache = {};\r\n this._loadRequests = [];\r\n }\r\n\r\n private _getConfigurationTypeExcludeTemplate(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 \"default\":\r\n config = deepmerge(config, renderOnlyDefaultConfiguration);\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 if (config.extends) {\r\n config = deepmerge(config, this._getConfigurationTypeExcludeTemplate(config.extends));\r\n }\r\n });\r\n return config;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n protected getExtendedConfig(type: string | undefined) {\r\n return this._getConfigurationTypeExcludeTemplate(type || \"extended\");\r\n }\r\n\r\n /**\r\n * load a configuration object that is defined in the initial configuration provided.\r\n * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.\r\n *\r\n * @param initConfig the initial configuration that has the definitions of further configuration to load.\r\n * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only\r\n * @returns A promise that delivers the extended viewer configuration, when done.\r\n */\r\n public loadConfiguration(initConfig: ViewerConfiguration = {}, callback?: (config: ViewerConfiguration) => void): Promise<ViewerConfiguration> {\r\n let loadedConfig: ViewerConfiguration = deepmerge({}, initConfig);\r\n this._processInitialConfiguration(loadedConfig);\r\n\r\n const extendedConfiguration = this.getExtendedConfig(loadedConfig.extends);\r\n\r\n if (loadedConfig.configuration) {\r\n let mapperType = \"json\";\r\n return Promise.resolve()\r\n .then(() => {\r\n if (typeof loadedConfig.configuration === \"string\" || (loadedConfig.configuration && loadedConfig.configuration.url)) {\r\n // a file to load\r\n\r\n let url: string = \"\";\r\n if (typeof loadedConfig.configuration === \"string\") {\r\n url = loadedConfig.configuration;\r\n }\r\n\r\n // if configuration is an object\r\n if (typeof loadedConfig.configuration === \"object\" && loadedConfig.configuration.url) {\r\n url = loadedConfig.configuration.url;\r\n let type = loadedConfig.configuration.mapper;\r\n // empty string?\r\n if (!type) {\r\n // load mapper type from filename / url\r\n type = loadedConfig.configuration.url.split(\".\").pop();\r\n }\r\n mapperType = type || mapperType;\r\n }\r\n return this._loadFile(url);\r\n } else {\r\n if (typeof loadedConfig.configuration === \"object\") {\r\n mapperType = loadedConfig.configuration.mapper || mapperType;\r\n return loadedConfig.configuration.payload || {};\r\n }\r\n return {};\r\n }\r\n })\r\n .then((data: any) => {\r\n const mapper = mapperManager.getMapper(mapperType);\r\n const parsed = deepmerge(mapper.map(data), loadedConfig);\r\n const merged = deepmerge(extendedConfiguration, parsed);\r\n processConfigurationCompatibility(merged);\r\n if (callback) {\r\n callback(merged);\r\n }\r\n return merged;\r\n });\r\n } else {\r\n loadedConfig = deepmerge(extendedConfiguration, loadedConfig);\r\n processConfigurationCompatibility(loadedConfig);\r\n if (callback) {\r\n callback(loadedConfig);\r\n }\r\n return Promise.resolve(loadedConfig);\r\n }\r\n }\r\n\r\n /**\r\n * Dispose the configuration loader. This will cancel file requests, if active.\r\n */\r\n public dispose() {\r\n this._loadRequests.forEach((request) => {\r\n request.abort();\r\n });\r\n this._loadRequests.length = 0;\r\n }\r\n\r\n /**\r\n * This function will process the initial configuration and make needed changes for the viewer to work.\r\n * @param config the mutable(!) initial configuration to process\r\n */\r\n private _processInitialConfiguration(config: ViewerConfiguration) {\r\n if (config.model) {\r\n if (typeof config.model === \"string\") {\r\n config.model = {\r\n url: config.model,\r\n };\r\n }\r\n }\r\n }\r\n\r\n private _loadFile(url: string): Promise<any> {\r\n const cacheReference = this._configurationCache;\r\n if (this._enableCache && cacheReference[url]) {\r\n return Promise.resolve(cacheReference[url]);\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const fileRequest = Tools.LoadFile(\r\n url,\r\n (result) => {\r\n const idx = this._loadRequests.indexOf(fileRequest);\r\n if (idx !== -1) {\r\n this._loadRequests.splice(idx, 1);\r\n }\r\n if (this._enableCache) {\r\n cacheReference[url] = result;\r\n }\r\n resolve(result);\r\n },\r\n undefined,\r\n undefined,\r\n false,\r\n (request, error: any) => {\r\n const idx = this._loadRequests.indexOf(fileRequest);\r\n if (idx !== -1) {\r\n this._loadRequests.splice(idx, 1);\r\n }\r\n reject(error);\r\n }\r\n );\r\n this._loadRequests.push(fileRequest);\r\n });\r\n }\r\n}\r\n"]}
@@ -0,0 +1,6 @@
1
+ import type { ViewerConfiguration } from "../configuration";
2
+ /**
3
+ * The default configuration of the viewer, including templates (canvas, overly, loading screen)
4
+ * This configuration doesn't hold specific parameters, and only defines objects that are needed for the viewer to fully work correctly.
5
+ */
6
+ export declare const defaultConfiguration: ViewerConfiguration;
@@ -0,0 +1,121 @@
1
+ import { babylonFont, defaultTemplate, fillContainer, loadingScreen, defaultViewer, navbar, overlay, help, share, error } from "babylonjs-viewer-assets";
2
+ import * as images from "babylonjs-viewer-assets";
3
+ import { renderOnlyDefaultConfiguration } from "./renderOnlyDefault.js";
4
+ // eslint-disable-next-line import/no-internal-modules
5
+ import { deepmerge } from "../../helper/index.js";
6
+ /**
7
+ * The default configuration of the viewer, including templates (canvas, overly, loading screen)
8
+ * This configuration doesn't hold specific parameters, and only defines objects that are needed for the viewer to fully work correctly.
9
+ */
10
+ export var defaultConfiguration = deepmerge(renderOnlyDefaultConfiguration, {
11
+ version: "3.2.0-alpha4",
12
+ templates: {
13
+ main: {
14
+ html: defaultTemplate,
15
+ params: {
16
+ babylonFont: babylonFont,
17
+ noEscape: true,
18
+ },
19
+ },
20
+ fillContainer: {
21
+ html: fillContainer,
22
+ params: {
23
+ disable: false,
24
+ },
25
+ },
26
+ loadingScreen: {
27
+ html: loadingScreen,
28
+ params: {
29
+ backgroundColor: "#000000",
30
+ loadingImage: images.loading,
31
+ staticLoadingImage: images.staticLoading,
32
+ },
33
+ },
34
+ viewer: {
35
+ html: defaultViewer,
36
+ params: {
37
+ enableDragAndDrop: false,
38
+ },
39
+ },
40
+ navBar: {
41
+ html: navbar,
42
+ params: {
43
+ speedList: {
44
+ "0.5x": "0.5",
45
+ "1.0x": "1.0",
46
+ "1.5x": "1.5",
47
+ "2.0x": "2.0",
48
+ },
49
+ logoImage: images.babylonLogo,
50
+ logoText: "BabylonJS",
51
+ logoLink: "https://babylonjs.com",
52
+ hideHelp: true,
53
+ hideHd: true,
54
+ hideVr: true,
55
+ hidePrint: true,
56
+ disableOnFullscreen: false,
57
+ text: {
58
+ hdButton: "Toggle HD",
59
+ fullscreenButton: "Toggle Fullscreen",
60
+ helpButton: "Help",
61
+ vrButton: "Toggle VR",
62
+ printButton: "3D Print Object",
63
+ },
64
+ },
65
+ events: {
66
+ click: {
67
+ ".navbar-control": true,
68
+ },
69
+ pointerdown: {
70
+ ".help-button": true,
71
+ },
72
+ input: {
73
+ ".progress-wrapper": true,
74
+ },
75
+ pointerup: {
76
+ ".progress-wrapper": true,
77
+ },
78
+ },
79
+ },
80
+ overlay: {
81
+ html: overlay,
82
+ params: {
83
+ closeImage: images.close,
84
+ closeText: "Close",
85
+ },
86
+ },
87
+ help: {
88
+ html: help,
89
+ },
90
+ share: {
91
+ html: share,
92
+ },
93
+ error: {
94
+ html: error,
95
+ },
96
+ },
97
+ camera: {
98
+ behaviors: {
99
+ autoRotate: {
100
+ type: 0,
101
+ },
102
+ framing: {
103
+ type: 2,
104
+ zoomOnBoundingInfo: true,
105
+ zoomStopsAnimation: false,
106
+ },
107
+ bouncing: {
108
+ type: 1,
109
+ },
110
+ },
111
+ },
112
+ skybox: {},
113
+ ground: {
114
+ receiveShadows: true,
115
+ },
116
+ engine: {
117
+ antialiasing: true,
118
+ },
119
+ scene: {},
120
+ });
121
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/default.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACzJ,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAwB,SAAS,CAAC,8BAA8B,EAAE;IAC/F,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE;QACP,IAAI,EAAE;YACF,IAAI,EAAE,eAAe;YACrB,MAAM,EAAE;gBACJ,WAAW,EAAE,WAAW;gBACxB,QAAQ,EAAE,IAAI;aACjB;SACJ;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,MAAM,CAAC,OAAO;gBAC5B,kBAAkB,EAAE,MAAM,CAAC,a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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,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { ViewerConfiguration } from \"../configuration\";\r\nimport { babylonFont, defaultTemplate, fillContainer, loadingScreen, defaultViewer, navbar, overlay, help, share, error } from \"babylonjs-viewer-assets\";\r\nimport * as images from \"babylonjs-viewer-assets\";\r\nimport { renderOnlyDefaultConfiguration } from \"./renderOnlyDefault\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { deepmerge } from \"../../helper/index\";\r\n\r\n/**\r\n * The 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 viewer to fully work correctly.\r\n */\r\nexport const defaultConfiguration: ViewerConfiguration = deepmerge(renderOnlyDefaultConfiguration, {\r\n version: \"3.2.0-alpha4\",\r\n templates: {\r\n main: {\r\n html: defaultTemplate,\r\n params: {\r\n babylonFont: babylonFont,\r\n noEscape: true,\r\n },\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: images.loading,\r\n staticLoadingImage: images.staticLoading,\r\n },\r\n },\r\n viewer: {\r\n html: defaultViewer,\r\n params: {\r\n enableDragAndDrop: false,\r\n },\r\n },\r\n navBar: {\r\n html: navbar,\r\n params: {\r\n speedList: {\r\n \"0.5x\": \"0.5\",\r\n \"1.0x\": \"1.0\",\r\n \"1.5x\": \"1.5\",\r\n \"2.0x\": \"2.0\",\r\n },\r\n logoImage: images.babylonLogo,\r\n logoText: \"BabylonJS\",\r\n logoLink: \"https://babylonjs.com\",\r\n hideHelp: true,\r\n hideHd: true,\r\n hideVr: true,\r\n hidePrint: true,\r\n disableOnFullscreen: false,\r\n text: {\r\n hdButton: \"Toggle HD\",\r\n fullscreenButton: \"Toggle Fullscreen\",\r\n helpButton: \"Help\",\r\n vrButton: \"Toggle VR\",\r\n printButton: \"3D Print Object\",\r\n },\r\n },\r\n events: {\r\n click: {\r\n \".navbar-control\": true,\r\n },\r\n pointerdown: {\r\n \".help-button\": true,\r\n },\r\n input: {\r\n \".progress-wrapper\": true,\r\n },\r\n pointerup: {\r\n \".progress-wrapper\": true,\r\n },\r\n },\r\n },\r\n overlay: {\r\n html: overlay,\r\n params: {\r\n closeImage: images.close,\r\n closeText: \"Close\",\r\n },\r\n },\r\n help: {\r\n html: help,\r\n },\r\n share: {\r\n html: share,\r\n },\r\n error: {\r\n html: error,\r\n },\r\n },\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"]}
@@ -0,0 +1,5 @@
1
+ import type { ViewerConfiguration } from "./../configuration";
2
+ /**
3
+ * Lab-oriented default .env support
4
+ */
5
+ export declare const environmentMapConfiguration: ViewerConfiguration;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Lab-oriented default .env support
3
+ */
4
+ export var environmentMapConfiguration = {
5
+ lab: {
6
+ assetsRootURL: "/assets/environment/",
7
+ environmentMap: {
8
+ texture: "EnvMap_3.0-256.env",
9
+ rotationY: 0,
10
+ tintLevel: 0.4,
11
+ },
12
+ },
13
+ };
14
+ //# sourceMappingURL=environmentMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentMap.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/environmentMap.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAAwB;IAC5D,GAAG,EAAE;QACD,aAAa,EAAE,sBAAsB;QACrC,cAAc,EAAE;YACZ,OAAO,EAAE,oBAAoB;YAC7B,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,GAAG;SACjB;KACJ;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\n\r\n/**\r\n * Lab-oriented default .env support\r\n */\r\nexport const environmentMapConfiguration: ViewerConfiguration = {\r\n lab: {\r\n assetsRootURL: \"/assets/environment/\",\r\n environmentMap: {\r\n texture: \"EnvMap_3.0-256.env\",\r\n rotationY: 0,\r\n tintLevel: 0.4,\r\n },\r\n },\r\n};\r\n"]}
@@ -0,0 +1,6 @@
1
+ import type { ViewerConfiguration } from "./../configuration";
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 declare const extendedConfiguration: ViewerConfiguration;