@babylonjs/viewer 7.26.3-alpha → 7.26.3

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 (578) 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 +192 -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 +350 -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 +199 -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 +27 -17
  158. package/readme.md +21 -35
  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 +21 -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 +40 -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 +675 -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/dist/babylon-viewer.esm.js +0 -2
  193. package/dist/babylon-viewer.esm.js.map +0 -1
  194. package/dist/babylon-viewer.esm.min.js +0 -2
  195. package/dist/babylon-viewer.esm.min.js.map +0 -1
  196. package/dist/chunks/EXT_lights_image_based-CX9xWDUc.esm.min.js +0 -2
  197. package/dist/chunks/EXT_lights_image_based-CX9xWDUc.esm.min.js.map +0 -1
  198. package/dist/chunks/EXT_lights_image_based-D2376Rhk.esm.js +0 -171
  199. package/dist/chunks/EXT_lights_image_based-D2376Rhk.esm.js.map +0 -1
  200. package/dist/chunks/EXT_mesh_gpu_instancing-COx3jzFo.esm.js +0 -86
  201. package/dist/chunks/EXT_mesh_gpu_instancing-COx3jzFo.esm.js.map +0 -1
  202. package/dist/chunks/EXT_mesh_gpu_instancing-DucZlyik.esm.min.js +0 -2
  203. package/dist/chunks/EXT_mesh_gpu_instancing-DucZlyik.esm.min.js.map +0 -1
  204. package/dist/chunks/EXT_meshopt_compression-CYrBmER6.esm.js +0 -134
  205. package/dist/chunks/EXT_meshopt_compression-CYrBmER6.esm.js.map +0 -1
  206. package/dist/chunks/EXT_meshopt_compression-RcQCBtJG.esm.min.js +0 -2
  207. package/dist/chunks/EXT_meshopt_compression-RcQCBtJG.esm.min.js.map +0 -1
  208. package/dist/chunks/EXT_texture_avif-BhIxh8Y2.esm.min.js +0 -2
  209. package/dist/chunks/EXT_texture_avif-BhIxh8Y2.esm.min.js.map +0 -1
  210. package/dist/chunks/EXT_texture_avif-Ca5z5sd4.esm.js +0 -44
  211. package/dist/chunks/EXT_texture_avif-Ca5z5sd4.esm.js.map +0 -1
  212. package/dist/chunks/EXT_texture_webp-BqckITjY.esm.js +0 -43
  213. package/dist/chunks/EXT_texture_webp-BqckITjY.esm.js.map +0 -1
  214. package/dist/chunks/EXT_texture_webp-CkyuNFGt.esm.min.js +0 -2
  215. package/dist/chunks/EXT_texture_webp-CkyuNFGt.esm.min.js.map +0 -1
  216. package/dist/chunks/ExtrasAsMetadata-B5tcWWcU.esm.js +0 -64
  217. package/dist/chunks/ExtrasAsMetadata-B5tcWWcU.esm.js.map +0 -1
  218. package/dist/chunks/ExtrasAsMetadata-DXurtCTq.esm.min.js +0 -2
  219. package/dist/chunks/ExtrasAsMetadata-DXurtCTq.esm.min.js.map +0 -1
  220. package/dist/chunks/KHR_animation_pointer--IiYfSMj.esm.min.js +0 -2
  221. package/dist/chunks/KHR_animation_pointer--IiYfSMj.esm.min.js.map +0 -1
  222. package/dist/chunks/KHR_animation_pointer-DfN1Ew0i.esm.js +0 -343
  223. package/dist/chunks/KHR_animation_pointer-DfN1Ew0i.esm.js.map +0 -1
  224. package/dist/chunks/KHR_draco_mesh_compression-CRrH0RjE.esm.js +0 -610
  225. package/dist/chunks/KHR_draco_mesh_compression-CRrH0RjE.esm.js.map +0 -1
  226. package/dist/chunks/KHR_draco_mesh_compression-Dx3wBJzh.esm.min.js +0 -2
  227. package/dist/chunks/KHR_draco_mesh_compression-Dx3wBJzh.esm.min.js.map +0 -1
  228. package/dist/chunks/KHR_interactivity-BhxUQ3Nl.esm.min.js +0 -2
  229. package/dist/chunks/KHR_interactivity-BhxUQ3Nl.esm.min.js.map +0 -1
  230. package/dist/chunks/KHR_interactivity-DHimeDac.esm.js +0 -4033
  231. package/dist/chunks/KHR_interactivity-DHimeDac.esm.js.map +0 -1
  232. package/dist/chunks/KHR_lights_punctual-CKLPiVPx.esm.js +0 -1253
  233. package/dist/chunks/KHR_lights_punctual-CKLPiVPx.esm.js.map +0 -1
  234. package/dist/chunks/KHR_lights_punctual-Dl3Xt0qH.esm.min.js +0 -2
  235. package/dist/chunks/KHR_lights_punctual-Dl3Xt0qH.esm.min.js.map +0 -1
  236. package/dist/chunks/KHR_materials_anisotropy-BlKga02r.esm.min.js +0 -2
  237. package/dist/chunks/KHR_materials_anisotropy-BlKga02r.esm.min.js.map +0 -1
  238. package/dist/chunks/KHR_materials_anisotropy-D_vFuzc0.esm.js +0 -64
  239. package/dist/chunks/KHR_materials_anisotropy-D_vFuzc0.esm.js.map +0 -1
  240. package/dist/chunks/KHR_materials_clearcoat-2P7-x3fR.esm.js +0 -96
  241. package/dist/chunks/KHR_materials_clearcoat-2P7-x3fR.esm.js.map +0 -1
  242. package/dist/chunks/KHR_materials_clearcoat-JLop7Kfg.esm.min.js +0 -2
  243. package/dist/chunks/KHR_materials_clearcoat-JLop7Kfg.esm.min.js.map +0 -1
  244. package/dist/chunks/KHR_materials_diffuse_transmission-BJY5giTc.esm.min.js +0 -2
  245. package/dist/chunks/KHR_materials_diffuse_transmission-BJY5giTc.esm.min.js.map +0 -1
  246. package/dist/chunks/KHR_materials_diffuse_transmission-DwFIB9fg.esm.js +0 -97
  247. package/dist/chunks/KHR_materials_diffuse_transmission-DwFIB9fg.esm.js.map +0 -1
  248. package/dist/chunks/KHR_materials_dispersion-5ELsBp34.esm.min.js +0 -2
  249. package/dist/chunks/KHR_materials_dispersion-5ELsBp34.esm.min.js.map +0 -1
  250. package/dist/chunks/KHR_materials_dispersion-CFS1T2yw.esm.js +0 -62
  251. package/dist/chunks/KHR_materials_dispersion-CFS1T2yw.esm.js.map +0 -1
  252. package/dist/chunks/KHR_materials_emissive_strength-BjBRYGm9.esm.js +0 -55
  253. package/dist/chunks/KHR_materials_emissive_strength-BjBRYGm9.esm.js.map +0 -1
  254. package/dist/chunks/KHR_materials_emissive_strength-CPQefGT0.esm.min.js +0 -2
  255. package/dist/chunks/KHR_materials_emissive_strength-CPQefGT0.esm.min.js.map +0 -1
  256. package/dist/chunks/KHR_materials_ior-COc1f40R.esm.min.js +0 -2
  257. package/dist/chunks/KHR_materials_ior-COc1f40R.esm.min.js.map +0 -1
  258. package/dist/chunks/KHR_materials_ior-DA7pWw9x.esm.js +0 -64
  259. package/dist/chunks/KHR_materials_ior-DA7pWw9x.esm.js.map +0 -1
  260. package/dist/chunks/KHR_materials_iridescence-C5zkC2Qa.esm.min.js +0 -2
  261. package/dist/chunks/KHR_materials_iridescence-C5zkC2Qa.esm.min.js.map +0 -1
  262. package/dist/chunks/KHR_materials_iridescence-CmvJW1oh.esm.js +0 -72
  263. package/dist/chunks/KHR_materials_iridescence-CmvJW1oh.esm.js.map +0 -1
  264. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-7VdedH19.esm.js +0 -81
  265. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-7VdedH19.esm.js.map +0 -1
  266. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CDCzt8M3.esm.min.js +0 -2
  267. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CDCzt8M3.esm.min.js.map +0 -1
  268. package/dist/chunks/KHR_materials_sheen-BFHRryyJ.esm.js +0 -85
  269. package/dist/chunks/KHR_materials_sheen-BFHRryyJ.esm.js.map +0 -1
  270. package/dist/chunks/KHR_materials_sheen-Dr_bKj0V.esm.min.js +0 -2
  271. package/dist/chunks/KHR_materials_sheen-Dr_bKj0V.esm.min.js.map +0 -1
  272. package/dist/chunks/KHR_materials_specular-CMp7dQ3N.esm.js +0 -75
  273. package/dist/chunks/KHR_materials_specular-CMp7dQ3N.esm.js.map +0 -1
  274. package/dist/chunks/KHR_materials_specular-Do-bJ9Tz.esm.min.js +0 -2
  275. package/dist/chunks/KHR_materials_specular-Do-bJ9Tz.esm.min.js.map +0 -1
  276. package/dist/chunks/KHR_materials_transmission-C8Na2aOr.esm.min.js +0 -2
  277. package/dist/chunks/KHR_materials_transmission-C8Na2aOr.esm.min.js.map +0 -1
  278. package/dist/chunks/KHR_materials_transmission-DiAYQhUP.esm.js +0 -307
  279. package/dist/chunks/KHR_materials_transmission-DiAYQhUP.esm.js.map +0 -1
  280. package/dist/chunks/KHR_materials_unlit-AqTZLxcL.esm.min.js +0 -2
  281. package/dist/chunks/KHR_materials_unlit-AqTZLxcL.esm.min.js.map +0 -1
  282. package/dist/chunks/KHR_materials_unlit-CwaIOdG_.esm.js +0 -74
  283. package/dist/chunks/KHR_materials_unlit-CwaIOdG_.esm.js.map +0 -1
  284. package/dist/chunks/KHR_materials_variants--8JMISBO.esm.js +0 -238
  285. package/dist/chunks/KHR_materials_variants--8JMISBO.esm.js.map +0 -1
  286. package/dist/chunks/KHR_materials_variants-CY2ksNW8.esm.min.js +0 -2
  287. package/dist/chunks/KHR_materials_variants-CY2ksNW8.esm.min.js.map +0 -1
  288. package/dist/chunks/KHR_materials_volume-16xOP2pG.esm.js +0 -87
  289. package/dist/chunks/KHR_materials_volume-16xOP2pG.esm.js.map +0 -1
  290. package/dist/chunks/KHR_materials_volume-eVBmT7Py.esm.min.js +0 -2
  291. package/dist/chunks/KHR_materials_volume-eVBmT7Py.esm.min.js.map +0 -1
  292. package/dist/chunks/KHR_mesh_quantization-CzxT4LfP.esm.min.js +0 -2
  293. package/dist/chunks/KHR_mesh_quantization-CzxT4LfP.esm.min.js.map +0 -1
  294. package/dist/chunks/KHR_mesh_quantization-DXlvMjPl.esm.js +0 -26
  295. package/dist/chunks/KHR_mesh_quantization-DXlvMjPl.esm.js.map +0 -1
  296. package/dist/chunks/KHR_texture_basisu-DwyvsvjH.esm.js +0 -43
  297. package/dist/chunks/KHR_texture_basisu-DwyvsvjH.esm.js.map +0 -1
  298. package/dist/chunks/KHR_texture_basisu-_W9Br-Jl.esm.min.js +0 -2
  299. package/dist/chunks/KHR_texture_basisu-_W9Br-Jl.esm.min.js.map +0 -1
  300. package/dist/chunks/KHR_texture_transform-BrggkZGk.esm.min.js +0 -2
  301. package/dist/chunks/KHR_texture_transform-BrggkZGk.esm.min.js.map +0 -1
  302. package/dist/chunks/KHR_texture_transform-C86eLMga.esm.js +0 -63
  303. package/dist/chunks/KHR_texture_transform-C86eLMga.esm.js.map +0 -1
  304. package/dist/chunks/KHR_xmp_json_ld-B4kyQRbU.esm.js +0 -51
  305. package/dist/chunks/KHR_xmp_json_ld-B4kyQRbU.esm.js.map +0 -1
  306. package/dist/chunks/KHR_xmp_json_ld-C3CU_p-l.esm.min.js +0 -2
  307. package/dist/chunks/KHR_xmp_json_ld-C3CU_p-l.esm.min.js.map +0 -1
  308. package/dist/chunks/MSFT_audio_emitter-B3Ta8qMN.esm.min.js +0 -2
  309. package/dist/chunks/MSFT_audio_emitter-B3Ta8qMN.esm.min.js.map +0 -1
  310. package/dist/chunks/MSFT_audio_emitter-D8nIcuBy.esm.js +0 -2236
  311. package/dist/chunks/MSFT_audio_emitter-D8nIcuBy.esm.js.map +0 -1
  312. package/dist/chunks/MSFT_lod-CEIzxRis.esm.js +0 -337
  313. package/dist/chunks/MSFT_lod-CEIzxRis.esm.js.map +0 -1
  314. package/dist/chunks/MSFT_lod-DZOikD8t.esm.min.js +0 -2
  315. package/dist/chunks/MSFT_lod-DZOikD8t.esm.min.js.map +0 -1
  316. package/dist/chunks/MSFT_minecraftMesh-B7vBtMTM.esm.js +0 -46
  317. package/dist/chunks/MSFT_minecraftMesh-B7vBtMTM.esm.js.map +0 -1
  318. package/dist/chunks/MSFT_minecraftMesh-DQCCOSGW.esm.min.js +0 -2
  319. package/dist/chunks/MSFT_minecraftMesh-DQCCOSGW.esm.min.js.map +0 -1
  320. package/dist/chunks/MSFT_sRGBFactors-ApBMqY9Y.esm.min.js +0 -2
  321. package/dist/chunks/MSFT_sRGBFactors-ApBMqY9Y.esm.min.js.map +0 -1
  322. package/dist/chunks/MSFT_sRGBFactors-DCyPuGAW.esm.js +0 -47
  323. package/dist/chunks/MSFT_sRGBFactors-DCyPuGAW.esm.js.map +0 -1
  324. package/dist/chunks/assetContainer-4Y8qxrkP.esm.min.js +0 -2
  325. package/dist/chunks/assetContainer-4Y8qxrkP.esm.min.js.map +0 -1
  326. package/dist/chunks/assetContainer-yduDDAg5.esm.js +0 -1598
  327. package/dist/chunks/assetContainer-yduDDAg5.esm.js.map +0 -1
  328. package/dist/chunks/audioEngine-B2lVczv1.esm.js +0 -305
  329. package/dist/chunks/audioEngine-B2lVczv1.esm.js.map +0 -1
  330. package/dist/chunks/audioEngine-BdTR6pZz.esm.min.js +0 -2
  331. package/dist/chunks/audioEngine-BdTR6pZz.esm.min.js.map +0 -1
  332. package/dist/chunks/bakedVertexAnimation-DVAdtwv1.esm.min.js +0 -2
  333. package/dist/chunks/bakedVertexAnimation-DVAdtwv1.esm.min.js.map +0 -1
  334. package/dist/chunks/bakedVertexAnimation-DeNM3h2Z.esm.js +0 -119
  335. package/dist/chunks/bakedVertexAnimation-DeNM3h2Z.esm.js.map +0 -1
  336. package/dist/chunks/basisTextureLoader-B0x2JhtN.esm.min.js +0 -2
  337. package/dist/chunks/basisTextureLoader-B0x2JhtN.esm.min.js.map +0 -1
  338. package/dist/chunks/basisTextureLoader-kG8CWoCn.esm.js +0 -600
  339. package/dist/chunks/basisTextureLoader-kG8CWoCn.esm.js.map +0 -1
  340. package/dist/chunks/dds-B4XmtkSp.esm.js +0 -540
  341. package/dist/chunks/dds-B4XmtkSp.esm.js.map +0 -1
  342. package/dist/chunks/dds-DeNz8hS-.esm.min.js +0 -2
  343. package/dist/chunks/dds-DeNz8hS-.esm.min.js.map +0 -1
  344. package/dist/chunks/ddsTextureLoader-BjLEbHHS.esm.js +0 -88
  345. package/dist/chunks/ddsTextureLoader-BjLEbHHS.esm.js.map +0 -1
  346. package/dist/chunks/ddsTextureLoader-D9FHqe-R.esm.min.js +0 -2
  347. package/dist/chunks/ddsTextureLoader-D9FHqe-R.esm.min.js.map +0 -1
  348. package/dist/chunks/decalFragment-BRIy9zMn.esm.min.js +0 -2
  349. package/dist/chunks/decalFragment-BRIy9zMn.esm.min.js.map +0 -1
  350. package/dist/chunks/decalFragment-DjXy6GUY.esm.js +0 -18
  351. package/dist/chunks/decalFragment-DjXy6GUY.esm.js.map +0 -1
  352. package/dist/chunks/default.fragment-BaBj8oN2.esm.js +0 -515
  353. package/dist/chunks/default.fragment-BaBj8oN2.esm.js.map +0 -1
  354. package/dist/chunks/default.fragment-C77QNDVC.esm.js +0 -449
  355. package/dist/chunks/default.fragment-C77QNDVC.esm.js.map +0 -1
  356. package/dist/chunks/default.fragment-CzYoM-ST.esm.min.js +0 -2
  357. package/dist/chunks/default.fragment-CzYoM-ST.esm.min.js.map +0 -1
  358. package/dist/chunks/default.fragment-D2M5EU_o.esm.min.js +0 -2
  359. package/dist/chunks/default.fragment-D2M5EU_o.esm.min.js.map +0 -1
  360. package/dist/chunks/default.vertex-BMMLYJyE.esm.min.js +0 -2
  361. package/dist/chunks/default.vertex-BMMLYJyE.esm.min.js.map +0 -1
  362. package/dist/chunks/default.vertex-CI6v3Y74.esm.js +0 -199
  363. package/dist/chunks/default.vertex-CI6v3Y74.esm.js.map +0 -1
  364. package/dist/chunks/default.vertex-DS3Btklm.esm.js +0 -180
  365. package/dist/chunks/default.vertex-DS3Btklm.esm.js.map +0 -1
  366. package/dist/chunks/default.vertex-sG6vJK6V.esm.min.js +0 -2
  367. package/dist/chunks/default.vertex-sG6vJK6V.esm.min.js.map +0 -1
  368. package/dist/chunks/defaultUboDeclaration-CfEdjUu2.esm.js +0 -15
  369. package/dist/chunks/defaultUboDeclaration-CfEdjUu2.esm.js.map +0 -1
  370. package/dist/chunks/defaultUboDeclaration-EXGQjmeR.esm.min.js +0 -2
  371. package/dist/chunks/defaultUboDeclaration-EXGQjmeR.esm.min.js.map +0 -1
  372. package/dist/chunks/defaultUboDeclaration-Qio0jGUO.esm.min.js +0 -2
  373. package/dist/chunks/defaultUboDeclaration-Qio0jGUO.esm.min.js.map +0 -1
  374. package/dist/chunks/defaultUboDeclaration-tUtq3goK.esm.js +0 -13
  375. package/dist/chunks/defaultUboDeclaration-tUtq3goK.esm.js.map +0 -1
  376. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +0 -11
  377. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +0 -1
  378. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +0 -2
  379. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +0 -1
  380. package/dist/chunks/dumpTools-BxY8w25M.esm.js +0 -400
  381. package/dist/chunks/dumpTools-BxY8w25M.esm.js.map +0 -1
  382. package/dist/chunks/dumpTools-Che-gwG7.esm.min.js +0 -2
  383. package/dist/chunks/dumpTools-Che-gwG7.esm.min.js.map +0 -1
  384. package/dist/chunks/engine-06Wd-_3h.esm.min.js +0 -2
  385. package/dist/chunks/engine-06Wd-_3h.esm.min.js.map +0 -1
  386. package/dist/chunks/engine-wEbS27-R.esm.js +0 -2174
  387. package/dist/chunks/engine-wEbS27-R.esm.js.map +0 -1
  388. package/dist/chunks/engine.common-BxiwlBr3.esm.min.js +0 -2
  389. package/dist/chunks/engine.common-BxiwlBr3.esm.min.js.map +0 -1
  390. package/dist/chunks/engine.common-DRFOWS2A.esm.js +0 -1088
  391. package/dist/chunks/engine.common-DRFOWS2A.esm.js.map +0 -1
  392. package/dist/chunks/envTextureLoader-Deb8hyWv.esm.js +0 -64
  393. package/dist/chunks/envTextureLoader-Deb8hyWv.esm.js.map +0 -1
  394. package/dist/chunks/envTextureLoader-nt7RB7jF.esm.min.js +0 -2
  395. package/dist/chunks/envTextureLoader-nt7RB7jF.esm.min.js.map +0 -1
  396. package/dist/chunks/environmentTextureTools-CnU6sdsm.esm.js +0 -382
  397. package/dist/chunks/environmentTextureTools-CnU6sdsm.esm.js.map +0 -1
  398. package/dist/chunks/environmentTextureTools-CqxQLfVS.esm.min.js +0 -2
  399. package/dist/chunks/environmentTextureTools-CqxQLfVS.esm.min.js.map +0 -1
  400. package/dist/chunks/exrTextureLoader-DgqYue7c.esm.min.js +0 -2
  401. package/dist/chunks/exrTextureLoader-DgqYue7c.esm.min.js.map +0 -1
  402. package/dist/chunks/exrTextureLoader-au_729k4.esm.js +0 -1682
  403. package/dist/chunks/exrTextureLoader-au_729k4.esm.js.map +0 -1
  404. package/dist/chunks/fogFragment-8tEI-kPW.esm.min.js +0 -2
  405. package/dist/chunks/fogFragment-8tEI-kPW.esm.min.js.map +0 -1
  406. package/dist/chunks/fogFragment-CULs-7PE.esm.js +0 -102
  407. package/dist/chunks/fogFragment-CULs-7PE.esm.js.map +0 -1
  408. package/dist/chunks/fresnelFunction-B4KI4E8h.esm.js +0 -12
  409. package/dist/chunks/fresnelFunction-B4KI4E8h.esm.js.map +0 -1
  410. package/dist/chunks/fresnelFunction-CeLpSg7g.esm.min.js +0 -2
  411. package/dist/chunks/fresnelFunction-CeLpSg7g.esm.min.js.map +0 -1
  412. package/dist/chunks/glTFLoader-BSsxhX_B.esm.js +0 -7552
  413. package/dist/chunks/glTFLoader-BSsxhX_B.esm.js.map +0 -1
  414. package/dist/chunks/glTFLoader-Cdf6EEh4.esm.min.js +0 -2
  415. package/dist/chunks/glTFLoader-Cdf6EEh4.esm.min.js.map +0 -1
  416. package/dist/chunks/glTFLoaderAnimation-KvPgN70Y.esm.min.js +0 -2
  417. package/dist/chunks/glTFLoaderAnimation-KvPgN70Y.esm.min.js.map +0 -1
  418. package/dist/chunks/glTFLoaderAnimation-vK1xPOOh.esm.js +0 -77
  419. package/dist/chunks/glTFLoaderAnimation-vK1xPOOh.esm.js.map +0 -1
  420. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +0 -2
  421. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +0 -1
  422. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +0 -67
  423. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +0 -1
  424. package/dist/chunks/harmonicsFunctions-CnvdxOXs.esm.min.js +0 -2
  425. package/dist/chunks/harmonicsFunctions-CnvdxOXs.esm.min.js.map +0 -1
  426. package/dist/chunks/harmonicsFunctions-CwZrA_es.esm.js +0 -34
  427. package/dist/chunks/harmonicsFunctions-CwZrA_es.esm.js.map +0 -1
  428. package/dist/chunks/harmonicsFunctions-D23NP4_R.esm.min.js +0 -2
  429. package/dist/chunks/harmonicsFunctions-D23NP4_R.esm.min.js.map +0 -1
  430. package/dist/chunks/harmonicsFunctions-DWAunDBq.esm.js +0 -35
  431. package/dist/chunks/harmonicsFunctions-DWAunDBq.esm.js.map +0 -1
  432. package/dist/chunks/hdrTextureLoader-BBszpiSE.esm.js +0 -252
  433. package/dist/chunks/hdrTextureLoader-BBszpiSE.esm.js.map +0 -1
  434. package/dist/chunks/hdrTextureLoader-DlqeGac5.esm.min.js +0 -2
  435. package/dist/chunks/hdrTextureLoader-DlqeGac5.esm.min.js.map +0 -1
  436. package/dist/chunks/helperFunctions-B-IxnCCi.esm.js +0 -108
  437. package/dist/chunks/helperFunctions-B-IxnCCi.esm.js.map +0 -1
  438. package/dist/chunks/helperFunctions-BJn_zA2T.esm.js +0 -80
  439. package/dist/chunks/helperFunctions-BJn_zA2T.esm.js.map +0 -1
  440. package/dist/chunks/helperFunctions-CdXvdI3d.esm.min.js +0 -2
  441. package/dist/chunks/helperFunctions-CdXvdI3d.esm.min.js.map +0 -1
  442. package/dist/chunks/helperFunctions-Cz2oFjJD.esm.min.js +0 -2
  443. package/dist/chunks/helperFunctions-Cz2oFjJD.esm.min.js.map +0 -1
  444. package/dist/chunks/index-DEZD8qGB.esm.min.js +0 -57
  445. package/dist/chunks/index-DEZD8qGB.esm.min.js.map +0 -1
  446. package/dist/chunks/index-rM42Fwtd.esm.js +0 -73922
  447. package/dist/chunks/index-rM42Fwtd.esm.js.map +0 -1
  448. package/dist/chunks/ktxTextureLoader-5XE4saqV.esm.min.js +0 -2
  449. package/dist/chunks/ktxTextureLoader-5XE4saqV.esm.min.js.map +0 -1
  450. package/dist/chunks/ktxTextureLoader-CzOXMl46.esm.js +0 -814
  451. package/dist/chunks/ktxTextureLoader-CzOXMl46.esm.js.map +0 -1
  452. package/dist/chunks/logDepthDeclaration-C1e5P6MP.esm.min.js +0 -2
  453. package/dist/chunks/logDepthDeclaration-C1e5P6MP.esm.min.js.map +0 -1
  454. package/dist/chunks/logDepthDeclaration-CP73F-Ht.esm.min.js +0 -2
  455. package/dist/chunks/logDepthDeclaration-CP73F-Ht.esm.min.js.map +0 -1
  456. package/dist/chunks/logDepthDeclaration-Cpcs5duV.esm.js +0 -20
  457. package/dist/chunks/logDepthDeclaration-Cpcs5duV.esm.js.map +0 -1
  458. package/dist/chunks/logDepthDeclaration-tZj2QrWI.esm.js +0 -35
  459. package/dist/chunks/logDepthDeclaration-tZj2QrWI.esm.js.map +0 -1
  460. package/dist/chunks/logDepthVertex-BHds0cL7.esm.min.js +0 -2
  461. package/dist/chunks/logDepthVertex-BHds0cL7.esm.min.js.map +0 -1
  462. package/dist/chunks/logDepthVertex-C77H-mUN.esm.js +0 -77
  463. package/dist/chunks/logDepthVertex-C77H-mUN.esm.js.map +0 -1
  464. package/dist/chunks/logDepthVertex-CRCv55t1.esm.min.js +0 -2
  465. package/dist/chunks/logDepthVertex-CRCv55t1.esm.min.js.map +0 -1
  466. package/dist/chunks/logDepthVertex-D71T3PUi.esm.js +0 -488
  467. package/dist/chunks/logDepthVertex-D71T3PUi.esm.js.map +0 -1
  468. package/dist/chunks/mainUVVaryingDeclaration-DH5Gw79d.esm.min.js +0 -2
  469. package/dist/chunks/mainUVVaryingDeclaration-DH5Gw79d.esm.min.js.map +0 -1
  470. package/dist/chunks/mainUVVaryingDeclaration-DjaUAU9d.esm.js +0 -11
  471. package/dist/chunks/mainUVVaryingDeclaration-DjaUAU9d.esm.js.map +0 -1
  472. package/dist/chunks/meshUboDeclaration-Dfhjtzfu.esm.js +0 -24
  473. package/dist/chunks/meshUboDeclaration-Dfhjtzfu.esm.js.map +0 -1
  474. package/dist/chunks/meshUboDeclaration-JuXAHT9v.esm.min.js +0 -2
  475. package/dist/chunks/meshUboDeclaration-JuXAHT9v.esm.min.js.map +0 -1
  476. package/dist/chunks/objFileLoader-7U6Dolv_.esm.js +0 -1280
  477. package/dist/chunks/objFileLoader-7U6Dolv_.esm.js.map +0 -1
  478. package/dist/chunks/objFileLoader-_Uh3sl5M.esm.min.js +0 -2
  479. package/dist/chunks/objFileLoader-_Uh3sl5M.esm.min.js.map +0 -1
  480. package/dist/chunks/oitFragment-B761cGSz.esm.js +0 -1150
  481. package/dist/chunks/oitFragment-B761cGSz.esm.js.map +0 -1
  482. package/dist/chunks/oitFragment-BEyzdlIX.esm.min.js +0 -2
  483. package/dist/chunks/oitFragment-BEyzdlIX.esm.min.js.map +0 -1
  484. package/dist/chunks/oitFragment-BJxddGxd.esm.min.js +0 -2
  485. package/dist/chunks/oitFragment-BJxddGxd.esm.min.js.map +0 -1
  486. package/dist/chunks/oitFragment-DxRU43Qk.esm.js +0 -1210
  487. package/dist/chunks/oitFragment-DxRU43Qk.esm.js.map +0 -1
  488. package/dist/chunks/pass.fragment-BezLFEaR.esm.min.js +0 -2
  489. package/dist/chunks/pass.fragment-BezLFEaR.esm.min.js.map +0 -1
  490. package/dist/chunks/pass.fragment-CI0Hbebv.esm.min.js +0 -2
  491. package/dist/chunks/pass.fragment-CI0Hbebv.esm.min.js.map +0 -1
  492. package/dist/chunks/pass.fragment-CKuTIGRc.esm.js +0 -15
  493. package/dist/chunks/pass.fragment-CKuTIGRc.esm.js.map +0 -1
  494. package/dist/chunks/pass.fragment-M4VAGwSP.esm.js +0 -15
  495. package/dist/chunks/pass.fragment-M4VAGwSP.esm.js.map +0 -1
  496. package/dist/chunks/pbr.fragment-BnTARhOZ.esm.js +0 -3165
  497. package/dist/chunks/pbr.fragment-BnTARhOZ.esm.js.map +0 -1
  498. package/dist/chunks/pbr.fragment-CFwXu2ZW.esm.min.js +0 -2
  499. package/dist/chunks/pbr.fragment-CFwXu2ZW.esm.min.js.map +0 -1
  500. package/dist/chunks/pbr.fragment-CZH3Z6Fz.esm.min.js +0 -2
  501. package/dist/chunks/pbr.fragment-CZH3Z6Fz.esm.min.js.map +0 -1
  502. package/dist/chunks/pbr.fragment-DXb2YUXa.esm.js +0 -3219
  503. package/dist/chunks/pbr.fragment-DXb2YUXa.esm.js.map +0 -1
  504. package/dist/chunks/pbr.vertex-B0UjdSCd.esm.min.js +0 -2
  505. package/dist/chunks/pbr.vertex-B0UjdSCd.esm.min.js.map +0 -1
  506. package/dist/chunks/pbr.vertex-BK-SOy7u.esm.js +0 -210
  507. package/dist/chunks/pbr.vertex-BK-SOy7u.esm.js.map +0 -1
  508. package/dist/chunks/pbr.vertex-BU96l1oL.esm.js +0 -335
  509. package/dist/chunks/pbr.vertex-BU96l1oL.esm.js.map +0 -1
  510. package/dist/chunks/pbr.vertex-BqZLjnyL.esm.min.js +0 -2
  511. package/dist/chunks/pbr.vertex-BqZLjnyL.esm.min.js.map +0 -1
  512. package/dist/chunks/postprocess.vertex-BXwgd-7B.esm.min.js +0 -2
  513. package/dist/chunks/postprocess.vertex-BXwgd-7B.esm.min.js.map +0 -1
  514. package/dist/chunks/postprocess.vertex-BbvDeWLH.esm.min.js +0 -2
  515. package/dist/chunks/postprocess.vertex-BbvDeWLH.esm.min.js.map +0 -1
  516. package/dist/chunks/postprocess.vertex-Ck5Z_51x.esm.js +0 -20
  517. package/dist/chunks/postprocess.vertex-Ck5Z_51x.esm.js.map +0 -1
  518. package/dist/chunks/postprocess.vertex-pT9f0tdJ.esm.js +0 -18
  519. package/dist/chunks/postprocess.vertex-pT9f0tdJ.esm.js.map +0 -1
  520. package/dist/chunks/rawTexture-1Rq8qsxm.esm.min.js +0 -2
  521. package/dist/chunks/rawTexture-1Rq8qsxm.esm.min.js.map +0 -1
  522. package/dist/chunks/rawTexture-D_BRK-o8.esm.js +0 -191
  523. package/dist/chunks/rawTexture-D_BRK-o8.esm.js.map +0 -1
  524. package/dist/chunks/rgbdDecode.fragment-BGF4g1hZ.esm.js +0 -17
  525. package/dist/chunks/rgbdDecode.fragment-BGF4g1hZ.esm.js.map +0 -1
  526. package/dist/chunks/rgbdDecode.fragment-C2vWUMvk.esm.js +0 -17
  527. package/dist/chunks/rgbdDecode.fragment-C2vWUMvk.esm.js.map +0 -1
  528. package/dist/chunks/rgbdDecode.fragment-Cf7oe5zh.esm.min.js +0 -2
  529. package/dist/chunks/rgbdDecode.fragment-Cf7oe5zh.esm.min.js.map +0 -1
  530. package/dist/chunks/rgbdDecode.fragment-CkuXLnPU.esm.min.js +0 -2
  531. package/dist/chunks/rgbdDecode.fragment-CkuXLnPU.esm.min.js.map +0 -1
  532. package/dist/chunks/rgbdEncode.fragment-D1q7KpIB.esm.min.js +0 -2
  533. package/dist/chunks/rgbdEncode.fragment-D1q7KpIB.esm.min.js.map +0 -1
  534. package/dist/chunks/rgbdEncode.fragment-DziyA8SH.esm.js +0 -17
  535. package/dist/chunks/rgbdEncode.fragment-DziyA8SH.esm.js.map +0 -1
  536. package/dist/chunks/rgbdEncode.fragment-EbVo_OS3.esm.min.js +0 -2
  537. package/dist/chunks/rgbdEncode.fragment-EbVo_OS3.esm.min.js.map +0 -1
  538. package/dist/chunks/rgbdEncode.fragment-O0WkfdaA.esm.js +0 -17
  539. package/dist/chunks/rgbdEncode.fragment-O0WkfdaA.esm.js.map +0 -1
  540. package/dist/chunks/splatFileLoader-Civo1vlZ.esm.min.js +0 -2
  541. package/dist/chunks/splatFileLoader-Civo1vlZ.esm.min.js.map +0 -1
  542. package/dist/chunks/splatFileLoader-D3Gb0TOq.esm.js +0 -3202
  543. package/dist/chunks/splatFileLoader-D3Gb0TOq.esm.js.map +0 -1
  544. package/dist/chunks/standardMaterial-C4ytj3UV.esm.min.js +0 -2
  545. package/dist/chunks/standardMaterial-C4ytj3UV.esm.min.js.map +0 -1
  546. package/dist/chunks/standardMaterial-Ds152YtF.esm.js +0 -1809
  547. package/dist/chunks/standardMaterial-Ds152YtF.esm.js.map +0 -1
  548. package/dist/chunks/stlFileLoader-DEyXKGGV.esm.js +0 -237
  549. package/dist/chunks/stlFileLoader-DEyXKGGV.esm.js.map +0 -1
  550. package/dist/chunks/stlFileLoader-O0L9MhOP.esm.min.js +0 -2
  551. package/dist/chunks/stlFileLoader-O0L9MhOP.esm.min.js.map +0 -1
  552. package/dist/chunks/tgaTextureLoader-2LzCuq-y.esm.min.js +0 -2
  553. package/dist/chunks/tgaTextureLoader-2LzCuq-y.esm.min.js.map +0 -1
  554. package/dist/chunks/tgaTextureLoader-C1ZPR3Z6.esm.js +0 -349
  555. package/dist/chunks/tgaTextureLoader-C1ZPR3Z6.esm.js.map +0 -1
  556. package/dist/chunks/thinEngine-DMsfsUJl.esm.min.js +0 -2
  557. package/dist/chunks/thinEngine-DMsfsUJl.esm.min.js.map +0 -1
  558. package/dist/chunks/thinEngine-Ka7-uzzY.esm.js +0 -3721
  559. package/dist/chunks/thinEngine-Ka7-uzzY.esm.js.map +0 -1
  560. package/dist/chunks/thinInstanceMesh-CnqlNkHp.esm.js +0 -314
  561. package/dist/chunks/thinInstanceMesh-CnqlNkHp.esm.js.map +0 -1
  562. package/dist/chunks/thinInstanceMesh-DvDlskuJ.esm.min.js +0 -2
  563. package/dist/chunks/thinInstanceMesh-DvDlskuJ.esm.min.js.map +0 -1
  564. package/dist/chunks/vertexColorMixing-6-uBAQ55.esm.js +0 -528
  565. package/dist/chunks/vertexColorMixing-6-uBAQ55.esm.js.map +0 -1
  566. package/dist/chunks/vertexColorMixing-BCQLn981.esm.min.js +0 -2
  567. package/dist/chunks/vertexColorMixing-BCQLn981.esm.min.js.map +0 -1
  568. package/dist/chunks/webgpuEngine-DWUcPn9n.esm.min.js +0 -2
  569. package/dist/chunks/webgpuEngine-DWUcPn9n.esm.min.js.map +0 -1
  570. package/dist/chunks/webgpuEngine-_VOc_CYS.esm.js +0 -11170
  571. package/dist/chunks/webgpuEngine-_VOc_CYS.esm.js.map +0 -1
  572. package/dist/chunks/workerPool-BUOov2K1.esm.js +0 -122
  573. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +0 -1
  574. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +0 -2
  575. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +0 -1
  576. package/lib/index.d.ts +0 -281
  577. package/lib/index.js +0 -965
  578. package/lib/index.js.map +0 -1
package/lib/index.js DELETED
@@ -1,965 +0,0 @@
1
- import { ArcRotateCamera } from '@babylonjs/core/Cameras/arcRotateCamera.js';
2
- import { HemisphericLight } from '@babylonjs/core/Lights/hemisphericLight.js';
3
- import { loadAssetContainerAsync } from '@babylonjs/core/Loading/sceneLoader.js';
4
- import { PBRMaterial } from '@babylonjs/core/Materials/PBR/pbrMaterial.js';
5
- import { CubeTexture } from '@babylonjs/core/Materials/Textures/cubeTexture.js';
6
- import { Texture } from '@babylonjs/core/Materials/Textures/texture.js';
7
- import { Color4 } from '@babylonjs/core/Maths/math.color.js';
8
- import { Scalar } from '@babylonjs/core/Maths/math.scalar.js';
9
- import { Vector3 } from '@babylonjs/core/Maths/math.vector.js';
10
- import { CreateBox } from '@babylonjs/core/Meshes/Builders/boxBuilder.js';
11
- import { AsyncLock } from '@babylonjs/core/Misc/asyncLock.js';
12
- import { Observable } from '@babylonjs/core/Misc/observable.js';
13
- import { Scene } from '@babylonjs/core/scene.js';
14
- import { registerBuiltInLoaders } from '@babylonjs/loaders/dynamic.js';
15
- import '@babylonjs/core/Animations/animatable.js';
16
- import { __decorate } from '@babylonjs/core/tslib.es6.js';
17
- import { css, LitElement, html } from 'lit';
18
- import { property, state, query, customElement } from 'lit/decorators.js';
19
- import { Logger } from '@babylonjs/core/Misc/logger.js';
20
-
21
- function createSkybox(scene, camera, environmentTexture, blur) {
22
- const hdrSkybox = CreateBox("hdrSkyBox", undefined, scene);
23
- const hdrSkyboxMaterial = new PBRMaterial("skyBox", scene);
24
- hdrSkyboxMaterial.backFaceCulling = false;
25
- hdrSkyboxMaterial.reflectionTexture = environmentTexture.clone();
26
- if (hdrSkyboxMaterial.reflectionTexture) {
27
- hdrSkyboxMaterial.reflectionTexture.coordinatesMode = Texture.SKYBOX_MODE;
28
- }
29
- hdrSkyboxMaterial.microSurface = 1.0 - blur;
30
- hdrSkyboxMaterial.disableLighting = true;
31
- hdrSkyboxMaterial.twoSidedLighting = true;
32
- hdrSkybox.material = hdrSkyboxMaterial;
33
- hdrSkybox.isPickable = false;
34
- hdrSkybox.infiniteDistance = true;
35
- hdrSkybox.ignoreCameraMaxZ = true;
36
- updateSkybox(hdrSkybox, camera);
37
- return hdrSkybox;
38
- }
39
- function updateSkybox(skybox, camera) {
40
- skybox?.scaling.setAll((camera.maxZ - camera.minZ) / 2);
41
- }
42
- const defaultViewerOptions = {
43
- backgroundColor: new Color4(0.1, 0.1, 0.2, 1.0),
44
- };
45
- /**
46
- * Provides an experience for viewing a single 3D model.
47
- * @remarks
48
- * The Viewer is not tied to a specific UI framework and can be used with Babylon.js in a browser or with Babylon Native.
49
- * Includes (or will include) support for common model viewing requirements such as:
50
- * - Loading different model formats.
51
- * - Setting up a camera and providing default behaviors like auto orbit and pose interpolation.
52
- * - Framing the loaded model in the camera's view.
53
- * - Setting up the environment, lighting, and tone mapping.
54
- * - Enumerating and playing (or auto playing) animations.
55
- * - Enumerating and switching between material variants.
56
- * - Full screen and XR modes.
57
- */
58
- class Viewer {
59
- constructor(_engine, options) {
60
- this._engine = _engine;
61
- /**
62
- * Fired when the environment has changed.
63
- */
64
- this.onEnvironmentChanged = new Observable();
65
- /**
66
- * Fired when an error occurs while loading the environment.
67
- */
68
- this.onEnvironmentError = new Observable();
69
- /**
70
- * Fired when a model is loaded into the viewer (or unloaded from the viewer).
71
- */
72
- this.onModelChanged = new Observable();
73
- /**
74
- * Fired when an error occurs while loading a model.
75
- */
76
- this.onModelError = new Observable();
77
- /**
78
- * Fired when the selected animation changes.
79
- */
80
- this.onSelectedAnimationChanged = new Observable();
81
- /**
82
- * Fired when the animation speed changes.
83
- */
84
- this.onAnimationSpeedChanged = new Observable();
85
- /**
86
- * Fired when the selected animation is playing or paused.
87
- */
88
- this.onIsAnimationPlayingChanged = new Observable();
89
- /**
90
- * Fired when the current point on the selected animation timeline changes.
91
- */
92
- this.onAnimationProgressChanged = new Observable();
93
- this._skybox = null;
94
- this._isDisposed = false;
95
- this._loadModelLock = new AsyncLock();
96
- this._loadModelAbortController = null;
97
- this._loadEnvironmentLock = new AsyncLock();
98
- this._environment = null;
99
- this._loadEnvironmentAbortController = null;
100
- this._selectedAnimation = -1;
101
- this._activeAnimationObservers = [];
102
- this._animationSpeed = 1;
103
- const finalOptions = { ...defaultViewerOptions, ...options };
104
- this._details = {
105
- viewer: this,
106
- scene: new Scene(this._engine),
107
- model: null,
108
- };
109
- this._details.scene.clearColor = finalOptions.backgroundColor;
110
- this._camera = new ArcRotateCamera("camera1", 0, 0, 1, Vector3.Zero(), this._details.scene);
111
- this._camera.attachControl();
112
- this._updateCamera(); // set default camera values
113
- this._autoRotationBehavior = this._camera.getBehaviorByName("AutoRotation");
114
- // Load a default light, but ignore errors as the user might be immediately loading their own environment.
115
- this.resetEnvironmentAsync().catch(() => { });
116
- // TODO: render at least back ground. Maybe we can only run renderloop when a mesh is loaded. What to render until then?
117
- const render = () => {
118
- const scene = this._details.scene;
119
- const engine = scene.getEngine();
120
- engine.beginFrame();
121
- scene.render();
122
- engine.endFrame();
123
- if (this.isAnimationPlaying) {
124
- this.onAnimationProgressChanged.notifyObservers();
125
- this._autoRotationBehavior.resetLastInteractionTime();
126
- }
127
- };
128
- this._engine.runRenderLoop(render);
129
- this._renderLoopController = {
130
- dispose: () => this._engine.stopRenderLoop(render),
131
- };
132
- options?.onInitialized?.(this._details);
133
- }
134
- /**
135
- * The list of animation names for the currently loaded model.
136
- */
137
- get animations() {
138
- return this._details.model?.animationGroups.map((group) => group.name) ?? [];
139
- }
140
- /**
141
- * The currently selected animation index.
142
- */
143
- get selectedAnimation() {
144
- return this._selectedAnimation;
145
- }
146
- set selectedAnimation(value) {
147
- value = Math.round(Scalar.Clamp(value, -1, this.animations.length - 1));
148
- if (value !== this._selectedAnimation) {
149
- const startAnimation = this.isAnimationPlaying;
150
- if (this._activeAnimation) {
151
- this._activeAnimation.goToFrame(0);
152
- this._activeAnimation.stop();
153
- this._activeAnimationObservers.forEach((observer) => observer.remove());
154
- this._activeAnimationObservers = [];
155
- }
156
- this._selectedAnimation = value;
157
- if (this._activeAnimation) {
158
- this._activeAnimationObservers = [
159
- this._activeAnimation.onAnimationGroupPlayObservable.add(() => {
160
- this.onIsAnimationPlayingChanged.notifyObservers();
161
- }),
162
- this._activeAnimation.onAnimationGroupPauseObservable.add(() => {
163
- this.onIsAnimationPlayingChanged.notifyObservers();
164
- }),
165
- this._activeAnimation.onAnimationGroupEndObservable.add(() => {
166
- this.onIsAnimationPlayingChanged.notifyObservers();
167
- this.onAnimationProgressChanged.notifyObservers();
168
- }),
169
- ];
170
- this._activeAnimation.start(true, this._animationSpeed);
171
- if (!startAnimation) {
172
- this.pauseAnimation();
173
- }
174
- }
175
- this.onSelectedAnimationChanged.notifyObservers();
176
- }
177
- }
178
- /**
179
- * True if an animation is currently playing.
180
- */
181
- get isAnimationPlaying() {
182
- return this._activeAnimation?.isPlaying ?? false;
183
- }
184
- /**
185
- * The speed scale at which animations are played.
186
- */
187
- get animationSpeed() {
188
- return this._animationSpeed;
189
- }
190
- set animationSpeed(value) {
191
- this._animationSpeed = value;
192
- this._applyAnimationSpeed();
193
- this.onAnimationSpeedChanged.notifyObservers();
194
- }
195
- /**
196
- * The current point on the selected animation timeline, normalized between 0 and 1.
197
- */
198
- get animationProgress() {
199
- if (this._activeAnimation) {
200
- return this._activeAnimation.getCurrentFrame() / (this._activeAnimation.to - this._activeAnimation.from);
201
- }
202
- return 0;
203
- }
204
- set animationProgress(value) {
205
- if (this._activeAnimation) {
206
- this._activeAnimation.goToFrame(value * (this._activeAnimation.to - this._activeAnimation.from));
207
- this.onAnimationProgressChanged.notifyObservers();
208
- this._autoRotationBehavior.resetLastInteractionTime();
209
- }
210
- }
211
- get _activeAnimation() {
212
- return this._details.model?.animationGroups[this._selectedAnimation] ?? null;
213
- }
214
- /**
215
- * Loads a 3D model from the specified URL.
216
- * @remarks
217
- * If a model is already loaded, it will be unloaded before loading the new model.
218
- * @param source A url or File or ArrayBufferView that points to the model to load.
219
- * @param options The options to use when loading the model.
220
- * @param abortSignal An optional signal that can be used to abort the loading process.
221
- */
222
- async loadModelAsync(source, options, abortSignal) {
223
- await this._updateModelAsync(source, options, abortSignal);
224
- }
225
- /**
226
- * Resets the model to an empty scene.
227
- * @param abortSignal An optional signal that can be used to abort the reset.
228
- */
229
- async resetModelAsync(abortSignal) {
230
- await this._updateModelAsync(undefined, undefined, abortSignal);
231
- }
232
- async _updateModelAsync(source, options, abortSignal) {
233
- this._throwIfDisposedOrAborted(abortSignal);
234
- this._loadModelAbortController?.abort("New model is being loaded before previous model finished loading.");
235
- const abortController = (this._loadModelAbortController = new AbortController());
236
- await this._loadModelLock.lockAsync(async () => {
237
- this._throwIfDisposedOrAborted(abortSignal, abortController.signal);
238
- this._details.model?.dispose();
239
- this.selectedAnimation = -1;
240
- try {
241
- this._details.model = null;
242
- if (source) {
243
- this._details.model = await loadAssetContainerAsync(source, this._details.scene, options);
244
- this._details.model.animationGroups.forEach((group) => group.stop());
245
- this.selectedAnimation = 0;
246
- this._details.model.addAllToScene();
247
- }
248
- this._updateCamera();
249
- this._applyAnimationSpeed();
250
- this.onModelChanged.notifyObservers();
251
- }
252
- catch (e) {
253
- this.onModelError.notifyObservers(e);
254
- throw e;
255
- }
256
- });
257
- }
258
- /**
259
- * Loads an environment texture from the specified url and sets up a corresponding skybox.
260
- * @remarks
261
- * If an environment is already loaded, it will be unloaded before loading the new environment.
262
- * @param url The url of the environment texture to load.
263
- * @param options The options to use when loading the environment.
264
- * @param abortSignal An optional signal that can be used to abort the loading process.
265
- */
266
- async loadEnvironmentAsync(url, options, abortSignal) {
267
- await this._updateEnvironmentAsync(url, options, abortSignal);
268
- }
269
- /**
270
- * Resets the environment to a simple hemispheric light.
271
- * @param abortSignal An optional signal that can be used to abort the reset.
272
- */
273
- async resetEnvironmentAsync(abortSignal) {
274
- await this._updateEnvironmentAsync(undefined, undefined, abortSignal);
275
- }
276
- async _updateEnvironmentAsync(url, options, abortSignal) {
277
- this._throwIfDisposedOrAborted(abortSignal);
278
- this._loadEnvironmentAbortController?.abort("New environment is being loaded before previous environment finished loading.");
279
- const abortController = (this._loadEnvironmentAbortController = new AbortController());
280
- await this._loadEnvironmentLock.lockAsync(async () => {
281
- this._throwIfDisposedOrAborted(abortSignal, abortController.signal);
282
- this._environment?.dispose();
283
- try {
284
- this._environment = await new Promise((resolve, reject) => {
285
- if (!url) {
286
- const light = new HemisphericLight("hemilight", Vector3.Up(), this._details.scene);
287
- this._details.scene.autoClear = true;
288
- resolve(light);
289
- }
290
- else {
291
- const cubeTexture = CubeTexture.CreateFromPrefilteredData(url, this._details.scene);
292
- this._details.scene.environmentTexture = cubeTexture;
293
- const skybox = createSkybox(this._details.scene, this._camera, cubeTexture, 0.3);
294
- this._skybox = skybox;
295
- this._details.scene.autoClear = false;
296
- const dispose = () => {
297
- cubeTexture.dispose();
298
- skybox.dispose();
299
- this._skybox = null;
300
- };
301
- const successObserver = cubeTexture.onLoadObservable.addOnce(() => {
302
- successObserver.remove();
303
- errorObserver.remove();
304
- resolve({
305
- dispose,
306
- });
307
- });
308
- const errorObserver = Texture.OnTextureLoadErrorObservable.add((texture) => {
309
- if (texture === cubeTexture) {
310
- successObserver.remove();
311
- errorObserver.remove();
312
- dispose();
313
- reject(new Error("Failed to load environment texture."));
314
- }
315
- });
316
- }
317
- this.onEnvironmentChanged.notifyObservers();
318
- });
319
- }
320
- catch (e) {
321
- this.onEnvironmentError.notifyObservers(e);
322
- throw e;
323
- }
324
- });
325
- }
326
- /**
327
- * Toggles the play/pause animation state if there is a selected animation.
328
- */
329
- toggleAnimation() {
330
- if (this.isAnimationPlaying) {
331
- this.pauseAnimation();
332
- }
333
- else {
334
- this.playAnimation();
335
- }
336
- }
337
- /**
338
- * Plays the selected animation if there is one.
339
- */
340
- playAnimation() {
341
- this._activeAnimation?.play(true);
342
- }
343
- /**
344
- * Pauses the selected animation if there is one.
345
- */
346
- async pauseAnimation() {
347
- this._activeAnimation?.pause();
348
- }
349
- /**
350
- * Disposes of the resources held by the Viewer.
351
- */
352
- dispose() {
353
- this.selectedAnimation = -1;
354
- this.animationProgress = 0;
355
- this._renderLoopController.dispose();
356
- this._details.scene.dispose();
357
- this.onEnvironmentChanged.clear();
358
- this.onEnvironmentError.clear();
359
- this.onModelChanged.clear();
360
- this.onModelError.clear();
361
- this.onSelectedAnimationChanged.clear();
362
- this.onAnimationSpeedChanged.clear();
363
- this.onIsAnimationPlayingChanged.clear();
364
- this.onAnimationProgressChanged.clear();
365
- this._isDisposed = true;
366
- }
367
- // copy/paste from sandbox and scene helpers
368
- _updateCamera() {
369
- // Enable camera's behaviors
370
- this._camera.useFramingBehavior = true;
371
- const framingBehavior = this._camera.getBehaviorByName("Framing");
372
- framingBehavior.framingTime = 0;
373
- framingBehavior.elevationReturnTime = -1;
374
- let radius = 1;
375
- if (this._details.scene.meshes.length) {
376
- // get bounds and prepare framing/camera radius from its values
377
- this._camera.lowerRadiusLimit = null;
378
- const worldExtends = this._details.scene.getWorldExtends((mesh) => {
379
- return mesh.isVisible && mesh.isEnabled();
380
- });
381
- framingBehavior.zoomOnBoundingInfo(worldExtends.min, worldExtends.max);
382
- const worldSize = worldExtends.max.subtract(worldExtends.min);
383
- const worldCenter = worldExtends.min.add(worldSize.scale(0.5));
384
- radius = worldSize.length() * 1.2;
385
- if (!isFinite(radius)) {
386
- radius = 1;
387
- worldCenter.copyFromFloats(0, 0, 0);
388
- }
389
- this._camera.setTarget(worldCenter);
390
- }
391
- this._camera.lowerRadiusLimit = radius * 0.01;
392
- this._camera.wheelPrecision = 100 / radius;
393
- this._camera.alpha = Math.PI / 2;
394
- this._camera.beta = Math.PI / 2;
395
- this._camera.radius = radius;
396
- this._camera.minZ = radius * 0.01;
397
- this._camera.maxZ = radius * 1000;
398
- this._camera.speed = radius * 0.2;
399
- this._camera.useAutoRotationBehavior = true;
400
- this._camera.pinchPrecision = 200 / this._camera.radius;
401
- this._camera.upperRadiusLimit = 5 * this._camera.radius;
402
- this._camera.wheelDeltaPercentage = 0.01;
403
- this._camera.pinchDeltaPercentage = 0.01;
404
- this._camera.restoreStateInterpolationFactor = 0.1;
405
- updateSkybox(this._skybox, this._camera);
406
- }
407
- _applyAnimationSpeed() {
408
- this._details.model?.animationGroups.forEach((group) => (group.speedRatio = this._animationSpeed));
409
- }
410
- /**
411
- * Check for disposed or aborted state (basically everything that can interrupt an async operation).
412
- * @param abortSignals A set of optional AbortSignals to also check.
413
- */
414
- _throwIfDisposedOrAborted(...abortSignals) {
415
- if (this._isDisposed) {
416
- throw new Error("Viewer is disposed.");
417
- }
418
- for (const signal of abortSignals) {
419
- signal?.throwIfAborted();
420
- }
421
- }
422
- }
423
- (() => {
424
- registerBuiltInLoaders();
425
- })();
426
-
427
- const defaultCanvasViewerOptions = {};
428
- /**
429
- * Chooses a default engine for the current browser environment.
430
- * @returns The default engine to use.
431
- */
432
- function getDefaultEngine() {
433
- // TODO: When WebGPU is fully production ready, we may want to prefer it if it is supported by the browser.
434
- return "WebGL";
435
- }
436
- /**
437
- * Creates a Viewer instance that is bound to an HTML canvas.
438
- * @remarks
439
- * This function can be shared across multiple UI integrations (e.g. Web Components, React, etc.).
440
- * @param canvas The canvas element to bind the Viewer to.
441
- * @param options The options to use when creating the Viewer and binding it to the specified canvas.
442
- * @returns A Viewer instance that is bound to the specified canvas.
443
- */
444
- async function createViewerForCanvas(canvas, options) {
445
- const finalOptions = { ...defaultCanvasViewerOptions, ...options };
446
- const disposeActions = [];
447
- // If the canvas is resized, note that the engine needs a resize, but don't resize it here as it will result in flickering.
448
- let needsResize = false;
449
- const resizeObserver = new ResizeObserver(() => (needsResize = true));
450
- resizeObserver.observe(canvas);
451
- disposeActions.push(() => resizeObserver.disconnect());
452
- // Create an engine instance.
453
- let engine;
454
- switch (finalOptions.engine ?? getDefaultEngine()) {
455
- case "WebGL": {
456
- // eslint-disable-next-line @typescript-eslint/naming-convention, no-case-declarations
457
- const { Engine } = await import('@babylonjs/core/Engines/engine.js');
458
- engine = new Engine(canvas, undefined, options);
459
- break;
460
- }
461
- case "WebGPU": {
462
- // eslint-disable-next-line @typescript-eslint/naming-convention, no-case-declarations
463
- const { WebGPUEngine } = await import('@babylonjs/core/Engines/webgpuEngine.js');
464
- const webGPUEngine = new WebGPUEngine(canvas, options);
465
- await webGPUEngine.initAsync();
466
- engine = webGPUEngine;
467
- break;
468
- }
469
- }
470
- // Override the onInitialized callback to add in some specific behavior.
471
- const onInitialized = finalOptions.onInitialized;
472
- finalOptions.onInitialized = (details) => {
473
- // Resize if needed right before rendering the Viewer scene to avoid any flickering.
474
- const beforeRenderObserver = details.scene.onBeforeRenderObservable.add(() => {
475
- if (needsResize) {
476
- engine.resize();
477
- needsResize = false;
478
- }
479
- });
480
- disposeActions.push(() => beforeRenderObserver.remove());
481
- // Call the original onInitialized callback, if one was provided.
482
- onInitialized?.(details);
483
- };
484
- // Instantiate the Viewer with the engine and options.
485
- const viewer = new Viewer(engine, finalOptions);
486
- disposeActions.push(viewer.dispose.bind(viewer));
487
- disposeActions.push(() => engine.dispose());
488
- // Override the Viewer's dispose method to add in additional cleanup.
489
- viewer.dispose = () => disposeActions.forEach((dispose) => dispose());
490
- return viewer;
491
- }
492
-
493
- // Icon SVG is pulled from https://fluentuipr.z22.web.core.windows.net/heads/master/public-docsite-v9/storybook/iframe.html?id=icons-catalog--page&viewMode=story
494
- const playFilledIcon = "M17.22 8.68a1.5 1.5 0 0 1 0 2.63l-10 5.5A1.5 1.5 0 0 1 5 15.5v-11A1.5 1.5 0 0 1 7.22 3.2l10 5.5Z";
495
- const pauseFilledIcon = "M5 2a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H5Zm8 0a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-2Z";
496
- const allowedAnimationSpeeds = [0.5, 1, 1.5, 2];
497
- /**
498
- * Represents a custom element that displays a 3D model using the Babylon.js Viewer.
499
- */
500
- let HTML3DElement = class HTML3DElement extends LitElement {
501
- constructor() {
502
- super(...arguments);
503
- this._viewerLock = new AsyncLock();
504
- /**
505
- * The engine to use for rendering.
506
- */
507
- this.engine = getDefaultEngine();
508
- /**
509
- * The speed scale at which animations are played.
510
- */
511
- this.animationSpeed = 1;
512
- /**
513
- * The current point on the selected animation timeline, normalized between 0 and 1.
514
- */
515
- this.animationProgress = 0;
516
- this._animations = [];
517
- this._selectedAnimation = -1;
518
- this._isAnimationPlaying = false;
519
- }
520
- /**
521
- * The list of animation names for the currently loaded model.
522
- */
523
- get animations() {
524
- return this._animations;
525
- }
526
- /**
527
- * The currently selected animation index.
528
- */
529
- get selectedAnimation() {
530
- return this._selectedAnimation;
531
- }
532
- /**
533
- * True if an animation is currently playing.
534
- */
535
- get isAnimationPlaying() {
536
- return this._isAnimationPlaying;
537
- }
538
- /**
539
- * Toggles the play/pause animation state if there is a selected animation.
540
- */
541
- toggleAnimation() {
542
- this._viewer?.toggleAnimation();
543
- }
544
- // eslint-disable-next-line babylonjs/available
545
- connectedCallback() {
546
- super.connectedCallback();
547
- this._setupViewer();
548
- }
549
- // eslint-disable-next-line babylonjs/available
550
- disconnectedCallback() {
551
- super.disconnectedCallback();
552
- this._tearDownViewer();
553
- }
554
- // eslint-disable-next-line babylonjs/available
555
- update(changedProperties) {
556
- super.update(changedProperties);
557
- if (changedProperties.get("engine")) {
558
- this._tearDownViewer();
559
- this._setupViewer();
560
- }
561
- else {
562
- if (changedProperties.has("animationSpeed")) {
563
- this._updateAnimationSpeed();
564
- }
565
- if (changedProperties.has("_selectedAnimation")) {
566
- this._updateSelectedAnimation();
567
- }
568
- if (changedProperties.has("src")) {
569
- this._updateModel();
570
- }
571
- if (changedProperties.has("env")) {
572
- this._updateEnv();
573
- }
574
- }
575
- }
576
- // eslint-disable-next-line babylonjs/available
577
- render() {
578
- return html `
579
- <div class="full-size">
580
- <div id="canvasContainer" class="full-size"></div>
581
- ${this.animations.length === 0
582
- ? ""
583
- : html `
584
- <slot name="tool-bar">
585
- <div part="tool-bar" class="tool-bar">
586
- <div class="progress-control">
587
- <button aria-label="${this.isAnimationPlaying ? "Pause" : "Play"}" @click="${this.toggleAnimation}">
588
- ${!this.isAnimationPlaying
589
- ? html `<svg viewBox="0 0 20 20">
590
- <path d="${playFilledIcon}" fill="currentColor"></path>
591
- </svg>`
592
- : html `<svg viewBox="-3 -2 24 24">
593
- <path d="${pauseFilledIcon}" fill="currentColor"></path>
594
- </svg>`}
595
- </button>
596
- <input
597
- aria-label="Animation Progress"
598
- class="progress-wrapper"
599
- type="range"
600
- min="0"
601
- max="1"
602
- step="0.0001"
603
- .value="${this.animationProgress}"
604
- @input="${this._onProgressChanged}"
605
- @pointerdown="${this._onProgressPointerDown}"
606
- />
607
- </div>
608
- <select aria-label="Select Animation Speed" @change="${this._onAnimationSpeedChanged}">
609
- ${allowedAnimationSpeeds.map((speed) => html `<option value="${speed}" .selected="${this.animationSpeed === speed}">${speed}x</option>`)}
610
- </select>
611
- ${this.animations.length > 1
612
- ? html `<select aria-label="Select Animation" @change="${this._onSelectedAnimationChanged}">
613
- ${this.animations.map((name, index) => html `<option value="${index}" .selected="${this.selectedAnimation == index}">${name}</option>`)}
614
- </select>`
615
- : ""}
616
- </div>
617
- </slot>
618
- `}
619
- </div>
620
- `;
621
- }
622
- addEventListener(type, listener, options) {
623
- super.addEventListener(type, listener, options);
624
- }
625
- _dispatchCustomEvent(...args) {
626
- const [type, details] = args;
627
- this.dispatchEvent(details ? new CustomEvent(type, { detail: details }) : new Event(type));
628
- }
629
- _onSelectedAnimationChanged(event) {
630
- const selectElement = event.target;
631
- this._selectedAnimation = Number(selectElement.value);
632
- }
633
- _onAnimationSpeedChanged(event) {
634
- const selectElement = event.target;
635
- this.animationSpeed = Number(selectElement.value);
636
- }
637
- _onProgressChanged(event) {
638
- if (this._viewer) {
639
- const input = event.target;
640
- const value = Number(input.value);
641
- if (value !== this.animationProgress) {
642
- this._viewer.animationProgress = value;
643
- }
644
- }
645
- }
646
- _onProgressPointerDown(event) {
647
- if (this._viewer?.isAnimationPlaying) {
648
- this._viewer.pauseAnimation();
649
- const input = event.target;
650
- input.addEventListener("pointerup", () => this._viewer?.playAnimation(), { once: true });
651
- }
652
- }
653
- async _setupViewer() {
654
- await this._viewerLock.lockAsync(async () => {
655
- // The first time the element is connected, the canvas container may not be available yet.
656
- // Wait for the first update if needed.
657
- if (!this._canvasContainer) {
658
- await this.updateComplete;
659
- }
660
- if (this._canvasContainer && !this._viewer) {
661
- const canvas = document.createElement("canvas");
662
- canvas.className = "full-size";
663
- canvas.setAttribute("touch-action", "none");
664
- this._canvasContainer.appendChild(canvas);
665
- await createViewerForCanvas(canvas, {
666
- engine: this.engine,
667
- onInitialized: (details) => {
668
- this._viewer = details.viewer;
669
- details.viewer.onEnvironmentChanged.add(() => {
670
- this._dispatchCustomEvent("environmentchange");
671
- });
672
- details.viewer.onEnvironmentError.add(() => {
673
- this._dispatchCustomEvent("environmenterror");
674
- });
675
- details.viewer.onModelChanged.add(() => {
676
- this._animations = [...(this._viewer?.animations ?? [])];
677
- this._dispatchCustomEvent("modelchange");
678
- });
679
- details.viewer.onModelError.add(() => {
680
- this._dispatchCustomEvent("modelerror");
681
- });
682
- details.viewer.onSelectedAnimationChanged.add(() => {
683
- this._selectedAnimation = this._viewer?.selectedAnimation ?? -1;
684
- this._dispatchCustomEvent("selectedanimationchange");
685
- });
686
- details.viewer.onAnimationSpeedChanged.add(() => {
687
- let speed = this._viewer?.animationSpeed ?? 1;
688
- speed = allowedAnimationSpeeds.reduce((prev, curr) => (Math.abs(curr - speed) < Math.abs(prev - speed) ? curr : prev));
689
- this.animationSpeed = speed;
690
- this._dispatchCustomEvent("animationspeedchange");
691
- });
692
- details.viewer.onIsAnimationPlayingChanged.add(() => {
693
- this._isAnimationPlaying = this._viewer?.isAnimationPlaying ?? false;
694
- this._dispatchCustomEvent("animationplayingchange");
695
- });
696
- details.viewer.onAnimationProgressChanged.add(() => {
697
- this.animationProgress = this._viewer?.animationProgress ?? 0;
698
- this._dispatchCustomEvent("animationprogresschange");
699
- });
700
- this._updateSelectedAnimation();
701
- this._updateAnimationSpeed();
702
- this._updateModel();
703
- this._updateEnv();
704
- this._dispatchCustomEvent("viewerready", details);
705
- },
706
- });
707
- }
708
- });
709
- }
710
- async _tearDownViewer() {
711
- await this._viewerLock.lockAsync(async () => {
712
- if (this._viewer) {
713
- this._viewer.dispose();
714
- this._viewer = undefined;
715
- }
716
- // We want to replace the canvas for two reasons:
717
- // 1. When the viewer element is reconnected to the DOM, we don't want to briefly see the last frame of the previous model.
718
- // 2. If we are changing engines (e.g. WebGL to WebGPU), we need to create a new canvas for the new engine.
719
- if (this._canvasContainer && this._canvasContainer.firstElementChild) {
720
- this._canvasContainer.removeChild(this._canvasContainer.firstElementChild);
721
- }
722
- });
723
- }
724
- _updateAnimationSpeed() {
725
- if (this._viewer) {
726
- this._viewer.animationSpeed = this.animationSpeed;
727
- }
728
- }
729
- _updateSelectedAnimation() {
730
- if (this._viewer) {
731
- this._viewer.selectedAnimation = this._selectedAnimation;
732
- }
733
- }
734
- async _updateModel() {
735
- try {
736
- if (this.src) {
737
- await this._viewer?.loadModelAsync(this.src, { pluginExtension: this.extension });
738
- }
739
- else {
740
- await this._viewer?.resetModelAsync();
741
- }
742
- }
743
- catch (error) {
744
- Logger.Log(error);
745
- }
746
- }
747
- async _updateEnv() {
748
- try {
749
- if (this.env) {
750
- await this._viewer?.loadEnvironmentAsync(this.env);
751
- }
752
- else {
753
- await this._viewer?.resetEnvironmentAsync();
754
- }
755
- }
756
- catch (error) {
757
- Logger.Log(error);
758
- }
759
- }
760
- };
761
- // eslint-disable-next-line @typescript-eslint/naming-convention, jsdoc/require-jsdoc
762
- HTML3DElement.styles = css `
763
- :host {
764
- --ui-foreground-color: white;
765
- --ui-background-hue: 233;
766
- --ui-background-saturation: 8%;
767
- --ui-background-lightness: 39%;
768
- --ui-background-opacity: 0.75;
769
- --ui-background-color: hsla(var(--ui-background-hue), var(--ui-background-saturation), var(--ui-background-lightness), var(--ui-background-opacity));
770
- --ui-background-color-hover: hsla(
771
- var(--ui-background-hue),
772
- var(--ui-background-saturation),
773
- calc(var(--ui-background-lightness) - 10%),
774
- calc(var(--ui-background-opacity) - 0.1)
775
- );
776
- }
777
-
778
- * {
779
- box-sizing: border-box;
780
- }
781
-
782
- .full-size {
783
- display: block;
784
- width: 100%;
785
- height: 100%;
786
- }
787
-
788
- .tool-bar {
789
- position: absolute;
790
- display: flex;
791
- flex-direction: row;
792
- border-radius: 12px;
793
- border-color: var(--ui-foreground-color);
794
- height: 48px;
795
- width: calc(100% - 24px);
796
- min-width: 150px;
797
- max-width: 1280px;
798
- bottom: 12px;
799
- left: 50%;
800
- transform: translateX(-50%);
801
- background-color: var(--ui-background-color);
802
- color: var(--ui-foreground-color);
803
- -webkit-tap-highlight-color: transparent;
804
- }
805
-
806
- .tool-bar * {
807
- height: 100%;
808
- min-width: 48px;
809
- }
810
-
811
- .tool-bar select {
812
- background: none;
813
- min-width: 52px;
814
- max-width: 128px;
815
- border: 1px solid transparent;
816
- border-radius: inherit;
817
- color: inherit;
818
- font-size: 14px;
819
- padding: 12px;
820
- cursor: pointer;
821
- outline: none;
822
- appearance: none; /* Remove default styling */
823
- -webkit-appearance: none; /* Remove default styling for Safari */
824
- -moz-appearance: none; /* Remove default styling for Firefox */
825
- }
826
-
827
- .tool-bar select:hover,
828
- .tool-bar select:focus {
829
- background-color: var(--ui-background-color-hover);
830
- }
831
-
832
- .tool-bar select option {
833
- background-color: var(--ui-background-color);
834
- color: var(--ui-foreground-color);
835
- }
836
-
837
- .tool-bar select:focus-visible {
838
- border-color: inherit;
839
- }
840
-
841
- .tool-bar button {
842
- background: none;
843
- border: 1px solid transparent;
844
- border-radius: inherit;
845
- color: inherit;
846
- padding: 0;
847
- cursor: pointer;
848
- outline: none;
849
- }
850
-
851
- .tool-bar button:hover {
852
- background-color: var(--ui-background-color-hover);
853
- }
854
-
855
- .tool-bar button:focus-visible {
856
- border-color: inherit;
857
- }
858
-
859
- .tool-bar button svg {
860
- width: 32px;
861
- height: 32px;
862
- }
863
-
864
- .progress-control {
865
- display: flex;
866
- flex: 1;
867
- position: relative;
868
- overflow: hidden;
869
- cursor: pointer;
870
- align-items: center;
871
- border-radius: inherit;
872
- border-color: inherit;
873
- }
874
-
875
- .progress-wrapper {
876
- -webkit-appearance: none;
877
- cursor: pointer;
878
- width: 100%;
879
- height: 100%;
880
- outline: none;
881
- border: 1px solid transparent;
882
- border-radius: inherit;
883
- padding: 0 12px;
884
- background-color: transparent;
885
- }
886
-
887
- .progress-wrapper:focus-visible {
888
- border-color: inherit;
889
- }
890
-
891
- /*Chrome -webkit */
892
-
893
- .progress-wrapper::-webkit-slider-thumb {
894
- -webkit-appearance: none;
895
- width: 20px;
896
- height: 20px;
897
- border: 2px solid;
898
- color: var(--ui-foreground-color);
899
- border-radius: 50%;
900
- background: hsla(var(--ui-background-hue), var(--ui-background-saturation), var(--ui-background-lightness), 1);
901
- margin-top: -10px;
902
- }
903
-
904
- .progress-wrapper::-webkit-slider-runnable-track {
905
- height: 2px;
906
- -webkit-appearance: none;
907
- background-color: var(--ui-foreground-color);
908
- }
909
-
910
- /** FireFox -moz */
911
-
912
- .progress-wrapper::-moz-range-progress {
913
- height: 2px;
914
- background-color: var(--ui-foreground-color);
915
- }
916
-
917
- .progress-wrapper::-moz-range-thumb {
918
- width: 16px;
919
- height: 16px;
920
- border: 2px solid var(--ui-foreground-color);
921
- border-radius: 50%;
922
- background: hsla(var(--ui-background-hue), var(--ui-background-saturation), var(--ui-background-lightness), 1);
923
- }
924
-
925
- .progress-wrapper::-moz-range-track {
926
- height: 2px;
927
- background: var(--ui-foreground-color);
928
- }
929
- `;
930
- __decorate([
931
- property({ reflect: true })
932
- ], HTML3DElement.prototype, "engine", void 0);
933
- __decorate([
934
- property({ reflect: true })
935
- ], HTML3DElement.prototype, "src", void 0);
936
- __decorate([
937
- property({ reflect: true })
938
- ], HTML3DElement.prototype, "extension", void 0);
939
- __decorate([
940
- property({ reflect: true })
941
- ], HTML3DElement.prototype, "env", void 0);
942
- __decorate([
943
- property({ attribute: "animation-speed", reflect: true })
944
- ], HTML3DElement.prototype, "animationSpeed", void 0);
945
- __decorate([
946
- property({ attribute: false })
947
- ], HTML3DElement.prototype, "animationProgress", void 0);
948
- __decorate([
949
- state()
950
- ], HTML3DElement.prototype, "_animations", void 0);
951
- __decorate([
952
- state()
953
- ], HTML3DElement.prototype, "_selectedAnimation", void 0);
954
- __decorate([
955
- state()
956
- ], HTML3DElement.prototype, "_isAnimationPlaying", void 0);
957
- __decorate([
958
- query("#canvasContainer")
959
- ], HTML3DElement.prototype, "_canvasContainer", void 0);
960
- HTML3DElement = __decorate([
961
- customElement("babylon-viewer")
962
- ], HTML3DElement);
963
-
964
- export { HTML3DElement, Viewer, createViewerForCanvas, getDefaultEngine };
965
- //# sourceMappingURL=index.js.map