@babylonjs/viewer 7.41.0 → 7.41.1-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (619) hide show
  1. package/assets/photoStudio.env +0 -0
  2. package/dist/babylon-viewer.esm.js +2 -0
  3. package/dist/babylon-viewer.esm.js.map +1 -0
  4. package/dist/babylon-viewer.esm.min.js +2 -0
  5. package/dist/babylon-viewer.esm.min.js.map +1 -0
  6. package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js +2 -0
  7. package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js.map +1 -0
  8. package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js +84 -0
  9. package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js.map +1 -0
  10. package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js +171 -0
  11. package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js.map +1 -0
  12. package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js +2 -0
  13. package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js.map +1 -0
  14. package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js +86 -0
  15. package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js.map +1 -0
  16. package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js +2 -0
  17. package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js.map +1 -0
  18. package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js +134 -0
  19. package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js.map +1 -0
  20. package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js +2 -0
  21. package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js.map +1 -0
  22. package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js +2 -0
  23. package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js.map +1 -0
  24. package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js +44 -0
  25. package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js.map +1 -0
  26. package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js +2 -0
  27. package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js.map +1 -0
  28. package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js +43 -0
  29. package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js.map +1 -0
  30. package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js +64 -0
  31. package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js.map +1 -0
  32. package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js +2 -0
  33. package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js.map +1 -0
  34. package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js +2 -0
  35. package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js.map +1 -0
  36. package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js +352 -0
  37. package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js.map +1 -0
  38. package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js +2 -0
  39. package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js.map +1 -0
  40. package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js +610 -0
  41. package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js.map +1 -0
  42. package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js +2 -0
  43. package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js.map +1 -0
  44. package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js +4033 -0
  45. package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js.map +1 -0
  46. package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js +581 -0
  47. package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js.map +1 -0
  48. package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js +2 -0
  49. package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js.map +1 -0
  50. package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js +65 -0
  51. package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js.map +1 -0
  52. package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js +2 -0
  53. package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js.map +1 -0
  54. package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js +2 -0
  55. package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js.map +1 -0
  56. package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js +96 -0
  57. package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js.map +1 -0
  58. package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js +97 -0
  61. package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js +62 -0
  63. package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js +55 -0
  67. package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js.map +1 -0
  68. package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js +2 -0
  69. package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js.map +1 -0
  70. package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js +64 -0
  71. package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js.map +1 -0
  72. package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js +2 -0
  73. package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js.map +1 -0
  74. package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js +72 -0
  75. package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js.map +1 -0
  76. package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js +2 -0
  77. package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js.map +1 -0
  78. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js +2 -0
  79. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js.map +1 -0
  80. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js +81 -0
  81. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js.map +1 -0
  82. package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js +85 -0
  83. package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js.map +1 -0
  84. package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js +2 -0
  85. package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js.map +1 -0
  86. package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js +75 -0
  87. package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js.map +1 -0
  88. package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js +2 -0
  89. package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js.map +1 -0
  90. package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js +2 -0
  91. package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js.map +1 -0
  92. package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js +307 -0
  93. package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js.map +1 -0
  94. package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js +74 -0
  97. package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js +262 -0
  99. package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js.map +1 -0
  100. package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js +2 -0
  101. package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js.map +1 -0
  102. package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js +2 -0
  103. package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js.map +1 -0
  104. package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js +87 -0
  105. package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js.map +1 -0
  106. package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js +2 -0
  107. package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js.map +1 -0
  108. package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js +26 -0
  109. package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js.map +1 -0
  110. package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js +39 -0
  111. package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js.map +1 -0
  112. package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js +2 -0
  113. package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js.map +1 -0
  114. package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js +2 -0
  115. package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js.map +1 -0
  116. package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js +46 -0
  117. package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js.map +1 -0
  118. package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js +43 -0
  119. package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js.map +1 -0
  120. package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js +2 -0
  121. package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js.map +1 -0
  122. package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js +63 -0
  123. package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js.map +1 -0
  124. package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js +2 -0
  125. package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js.map +1 -0
  126. package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js +51 -0
  127. package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js.map +1 -0
  128. package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js +2 -0
  129. package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js.map +1 -0
  130. package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js +2201 -0
  133. package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js.map +1 -0
  134. package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js +337 -0
  135. package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js.map +1 -0
  136. package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js +2 -0
  137. package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js.map +1 -0
  138. package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js +2 -0
  139. package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js.map +1 -0
  140. package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js +46 -0
  141. package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js.map +1 -0
  142. package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js +47 -0
  143. package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js.map +1 -0
  144. package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js +2 -0
  145. package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js.map +1 -0
  146. package/dist/chunks/animationGroup-8TJDgymS.esm.js +2482 -0
  147. package/dist/chunks/animationGroup-8TJDgymS.esm.js.map +1 -0
  148. package/dist/chunks/animationGroup-toXtd3a1.esm.min.js +2 -0
  149. package/dist/chunks/animationGroup-toXtd3a1.esm.min.js.map +1 -0
  150. package/dist/chunks/assetContainer-7pMDUaac.esm.min.js +2 -0
  151. package/dist/chunks/assetContainer-7pMDUaac.esm.min.js.map +1 -0
  152. package/dist/chunks/assetContainer-DYzO0AbX.esm.js +1720 -0
  153. package/dist/chunks/assetContainer-DYzO0AbX.esm.js.map +1 -0
  154. package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js +2 -0
  155. package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js.map +1 -0
  156. package/dist/chunks/audioEngine-peiGqjr6.esm.js +305 -0
  157. package/dist/chunks/audioEngine-peiGqjr6.esm.js.map +1 -0
  158. package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js +2 -0
  159. package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js.map +1 -0
  160. package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js +114 -0
  161. package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js.map +1 -0
  162. package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js +600 -0
  163. package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js.map +1 -0
  164. package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js +2 -0
  165. package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js.map +1 -0
  166. package/dist/chunks/dds-6EdM5O6M.esm.js +540 -0
  167. package/dist/chunks/dds-6EdM5O6M.esm.js.map +1 -0
  168. package/dist/chunks/dds-DVX_K9B3.esm.min.js +2 -0
  169. package/dist/chunks/dds-DVX_K9B3.esm.min.js.map +1 -0
  170. package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js +2 -0
  171. package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js.map +1 -0
  172. package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js +88 -0
  173. package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js.map +1 -0
  174. package/dist/chunks/decalFragment-C_Cews3-.esm.js +18 -0
  175. package/dist/chunks/decalFragment-C_Cews3-.esm.js.map +1 -0
  176. package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js +2 -0
  177. package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js.map +1 -0
  178. package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js +2 -0
  179. package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js.map +1 -0
  180. package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js +2 -0
  181. package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js.map +1 -0
  182. package/dist/chunks/default.fragment-CyFHDykY.esm.js +446 -0
  183. package/dist/chunks/default.fragment-CyFHDykY.esm.js.map +1 -0
  184. package/dist/chunks/default.fragment-ej-2z5tS.esm.js +515 -0
  185. package/dist/chunks/default.fragment-ej-2z5tS.esm.js.map +1 -0
  186. package/dist/chunks/default.vertex-16mVOFgT.esm.js +211 -0
  187. package/dist/chunks/default.vertex-16mVOFgT.esm.js.map +1 -0
  188. package/dist/chunks/default.vertex-D--q2At3.esm.min.js +2 -0
  189. package/dist/chunks/default.vertex-D--q2At3.esm.min.js.map +1 -0
  190. package/dist/chunks/default.vertex-DDlgZTrR.esm.js +190 -0
  191. package/dist/chunks/default.vertex-DDlgZTrR.esm.js.map +1 -0
  192. package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js +2 -0
  193. package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js.map +1 -0
  194. package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js +15 -0
  195. package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js.map +1 -0
  196. package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js +13 -0
  197. package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js.map +1 -0
  198. package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js +2 -0
  199. package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js.map +1 -0
  200. package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js +2 -0
  201. package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js.map +1 -0
  202. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
  203. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
  204. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
  205. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
  206. package/dist/chunks/dumpTools-Bhux0wvM.esm.js +200 -0
  207. package/dist/chunks/dumpTools-Bhux0wvM.esm.js.map +1 -0
  208. package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js +2 -0
  209. package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js.map +1 -0
  210. package/dist/chunks/engine-DF_zE4qj.esm.js +2213 -0
  211. package/dist/chunks/engine-DF_zE4qj.esm.js.map +1 -0
  212. package/dist/chunks/engine-DVmdDcyP.esm.min.js +2 -0
  213. package/dist/chunks/engine-DVmdDcyP.esm.min.js.map +1 -0
  214. package/dist/chunks/engine.common-CvOmoKru.esm.js +1162 -0
  215. package/dist/chunks/engine.common-CvOmoKru.esm.js.map +1 -0
  216. package/dist/chunks/engine.common-DpTzktQJ.esm.min.js +2 -0
  217. package/dist/chunks/engine.common-DpTzktQJ.esm.min.js.map +1 -0
  218. package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js +64 -0
  219. package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js.map +1 -0
  220. package/dist/chunks/envTextureLoader-DMQui088.esm.min.js +2 -0
  221. package/dist/chunks/envTextureLoader-DMQui088.esm.min.js.map +1 -0
  222. package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js +2 -0
  223. package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js.map +1 -0
  224. package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js +382 -0
  225. package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js.map +1 -0
  226. package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js +1683 -0
  227. package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js.map +1 -0
  228. package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js +2 -0
  229. package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js.map +1 -0
  230. package/dist/chunks/fogFragment-BrGGFaiu.esm.js +101 -0
  231. package/dist/chunks/fogFragment-BrGGFaiu.esm.js.map +1 -0
  232. package/dist/chunks/fogFragment-ByOwwQur.esm.min.js +2 -0
  233. package/dist/chunks/fogFragment-ByOwwQur.esm.min.js.map +1 -0
  234. package/dist/chunks/fogFragment-Chod24nu.esm.min.js +2 -0
  235. package/dist/chunks/fogFragment-Chod24nu.esm.min.js.map +1 -0
  236. package/dist/chunks/fogFragment-gZfybCpt.esm.js +102 -0
  237. package/dist/chunks/fogFragment-gZfybCpt.esm.js.map +1 -0
  238. package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js +2 -0
  239. package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js.map +1 -0
  240. package/dist/chunks/fresnelFunction-DBlxfmri.esm.js +12 -0
  241. package/dist/chunks/fresnelFunction-DBlxfmri.esm.js.map +1 -0
  242. package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js +2 -0
  243. package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js.map +1 -0
  244. package/dist/chunks/glTFLoader-fUFiWvYb.esm.js +7693 -0
  245. package/dist/chunks/glTFLoader-fUFiWvYb.esm.js.map +1 -0
  246. package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js +2 -0
  247. package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js.map +1 -0
  248. package/dist/chunks/glTFLoaderAnimation-CttmY50U.esm.js +77 -0
  249. package/dist/chunks/glTFLoaderAnimation-CttmY50U.esm.js.map +1 -0
  250. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  251. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  252. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  253. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  254. package/dist/chunks/harmonicsFunctions-B0Rp1hEo.esm.min.js +2 -0
  255. package/dist/chunks/harmonicsFunctions-B0Rp1hEo.esm.min.js.map +1 -0
  256. package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js +34 -0
  257. package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js.map +1 -0
  258. package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js +2 -0
  259. package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js.map +1 -0
  260. package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js +35 -0
  261. package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js.map +1 -0
  262. package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js +253 -0
  263. package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js.map +1 -0
  264. package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js +2 -0
  265. package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js.map +1 -0
  266. package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js +2 -0
  267. package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js.map +1 -0
  268. package/dist/chunks/helperFunctions-C66wRWtu.esm.js +110 -0
  269. package/dist/chunks/helperFunctions-C66wRWtu.esm.js.map +1 -0
  270. package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js +2 -0
  271. package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js.map +1 -0
  272. package/dist/chunks/helperFunctions-gnki_9Kj.esm.js +83 -0
  273. package/dist/chunks/helperFunctions-gnki_9Kj.esm.js.map +1 -0
  274. package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js +189 -0
  275. package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js.map +1 -0
  276. package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js +2 -0
  277. package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js.map +1 -0
  278. package/dist/chunks/index-C6hXZyZb.esm.js +74889 -0
  279. package/dist/chunks/index-C6hXZyZb.esm.js.map +1 -0
  280. package/dist/chunks/index-rZVkfTE6.esm.min.js +57 -0
  281. package/dist/chunks/index-rZVkfTE6.esm.min.js.map +1 -0
  282. package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js +814 -0
  283. package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js.map +1 -0
  284. package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js +2 -0
  285. package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js.map +1 -0
  286. package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js +2 -0
  287. package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js.map +1 -0
  288. package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js +11 -0
  289. package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js.map +1 -0
  290. package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js +2 -0
  291. package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js.map +1 -0
  292. package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js +35 -0
  293. package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js.map +1 -0
  294. package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js +2 -0
  295. package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js.map +1 -0
  296. package/dist/chunks/logDepthVertex-DKPfA10X.esm.js +81 -0
  297. package/dist/chunks/logDepthVertex-DKPfA10X.esm.js.map +1 -0
  298. package/dist/chunks/logDepthVertex-ojTShW5I.esm.js +77 -0
  299. package/dist/chunks/logDepthVertex-ojTShW5I.esm.js.map +1 -0
  300. package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js +2 -0
  301. package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js.map +1 -0
  302. package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js +2 -0
  303. package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js.map +1 -0
  304. package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js +11 -0
  305. package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js.map +1 -0
  306. package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js +2 -0
  307. package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js.map +1 -0
  308. package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.esm.js +11 -0
  309. package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.esm.js.map +1 -0
  310. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +119 -0
  311. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +1 -0
  312. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +2 -0
  313. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +1 -0
  314. package/dist/chunks/meshUboDeclaration-QvH0RgeZ.esm.js +26 -0
  315. package/dist/chunks/meshUboDeclaration-QvH0RgeZ.esm.js.map +1 -0
  316. package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js +2 -0
  317. package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js.map +1 -0
  318. package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js +2 -0
  319. package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js.map +1 -0
  320. package/dist/chunks/objFileLoader-BPwrX8RK.esm.js +1338 -0
  321. package/dist/chunks/objFileLoader-BPwrX8RK.esm.js.map +1 -0
  322. package/dist/chunks/oitFragment-CmcWUhsZ.esm.js +1240 -0
  323. package/dist/chunks/oitFragment-CmcWUhsZ.esm.js.map +1 -0
  324. package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js +1078 -0
  325. package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js.map +1 -0
  326. package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js +2 -0
  327. package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js.map +1 -0
  328. package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js +2 -0
  329. package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js.map +1 -0
  330. package/dist/chunks/pass.fragment--XRaXRhU.esm.js +15 -0
  331. package/dist/chunks/pass.fragment--XRaXRhU.esm.js.map +1 -0
  332. package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js +2 -0
  333. package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js.map +1 -0
  334. package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js +2 -0
  335. package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js.map +1 -0
  336. package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js +15 -0
  337. package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js.map +1 -0
  338. package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js +3269 -0
  339. package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js.map +1 -0
  340. package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js +2 -0
  341. package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js.map +1 -0
  342. package/dist/chunks/pbr.fragment-fky04gH_.esm.js +3222 -0
  343. package/dist/chunks/pbr.fragment-fky04gH_.esm.js.map +1 -0
  344. package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js +2 -0
  345. package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js.map +1 -0
  346. package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js +223 -0
  347. package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js.map +1 -0
  348. package/dist/chunks/pbr.vertex-BXcMYADF.esm.js +348 -0
  349. package/dist/chunks/pbr.vertex-BXcMYADF.esm.js.map +1 -0
  350. package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js +2 -0
  351. package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js.map +1 -0
  352. package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js +2 -0
  353. package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js.map +1 -0
  354. package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js +2 -0
  355. package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js.map +1 -0
  356. package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js +20 -0
  357. package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js.map +1 -0
  358. package/dist/chunks/rawTexture-CWiRIto8.esm.js +191 -0
  359. package/dist/chunks/rawTexture-CWiRIto8.esm.js.map +1 -0
  360. package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js +2 -0
  361. package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js.map +1 -0
  362. package/dist/chunks/ray-ix7SqYNQ.esm.min.js +2 -0
  363. package/dist/chunks/ray-ix7SqYNQ.esm.min.js.map +1 -0
  364. package/dist/chunks/ray-nTZBkOil.esm.js +946 -0
  365. package/dist/chunks/ray-nTZBkOil.esm.js.map +1 -0
  366. package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js +2 -0
  367. package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js.map +1 -0
  368. package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js +13 -0
  369. package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js.map +1 -0
  370. package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js +2 -0
  371. package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js.map +1 -0
  372. package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js +13 -0
  373. package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js.map +1 -0
  374. package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js +13 -0
  375. package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js.map +1 -0
  376. package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js +2 -0
  377. package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js.map +1 -0
  378. package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js +13 -0
  379. package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js.map +1 -0
  380. package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js +2 -0
  381. package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js.map +1 -0
  382. package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js +2 -0
  383. package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js.map +1 -0
  384. package/dist/chunks/splatFileLoader-Dp33YOem.esm.js +3379 -0
  385. package/dist/chunks/splatFileLoader-Dp33YOem.esm.js.map +1 -0
  386. package/dist/chunks/spotLight-C0NmKeem.esm.js +701 -0
  387. package/dist/chunks/spotLight-C0NmKeem.esm.js.map +1 -0
  388. package/dist/chunks/spotLight-CcuCNdES.esm.min.js +2 -0
  389. package/dist/chunks/spotLight-CcuCNdES.esm.min.js.map +1 -0
  390. package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js +2 -0
  391. package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js.map +1 -0
  392. package/dist/chunks/standardMaterial-v_D8QA4q.esm.js +1807 -0
  393. package/dist/chunks/standardMaterial-v_D8QA4q.esm.js.map +1 -0
  394. package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js +2 -0
  395. package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js.map +1 -0
  396. package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js +238 -0
  397. package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js.map +1 -0
  398. package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js +349 -0
  399. package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js.map +1 -0
  400. package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js +2 -0
  401. package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js.map +1 -0
  402. package/dist/chunks/thinEngine-DksimP2U.esm.js +3848 -0
  403. package/dist/chunks/thinEngine-DksimP2U.esm.js.map +1 -0
  404. package/dist/chunks/thinEngine-tsALaFYH.esm.min.js +2 -0
  405. package/dist/chunks/thinEngine-tsALaFYH.esm.min.js.map +1 -0
  406. package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js +314 -0
  407. package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js.map +1 -0
  408. package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js +2 -0
  409. package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js.map +1 -0
  410. package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js +2 -0
  411. package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js.map +1 -0
  412. package/dist/chunks/vertexColorMixing-D9917nJN.esm.js +428 -0
  413. package/dist/chunks/vertexColorMixing-D9917nJN.esm.js.map +1 -0
  414. package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js +2 -0
  415. package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js.map +1 -0
  416. package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js +538 -0
  417. package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js.map +1 -0
  418. package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js +2 -0
  419. package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js.map +1 -0
  420. package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js +11533 -0
  421. package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js.map +1 -0
  422. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  423. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  424. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  425. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  426. package/lib/index.d.ts +591 -0
  427. package/lib/index.js +2165 -0
  428. package/lib/index.js.map +1 -0
  429. package/package.json +19 -28
  430. package/readme.md +28 -28
  431. package/configuration/configuration.d.ts +0 -107
  432. package/configuration/configuration.js +0 -16
  433. package/configuration/configuration.js.map +0 -1
  434. package/configuration/configurationCompatibility.d.ts +0 -8
  435. package/configuration/configurationCompatibility.js +0 -66
  436. package/configuration/configurationCompatibility.js.map +0 -1
  437. package/configuration/configurationContainer.d.ts +0 -10
  438. package/configuration/configurationContainer.js +0 -10
  439. package/configuration/configurationContainer.js.map +0 -1
  440. package/configuration/globals.d.ts +0 -6
  441. package/configuration/globals.js +0 -18
  442. package/configuration/globals.js.map +0 -1
  443. package/configuration/index.d.ts +0 -2
  444. package/configuration/index.js +0 -4
  445. package/configuration/index.js.map +0 -1
  446. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  447. package/configuration/interfaces/cameraConfiguration.js +0 -2
  448. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  449. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  450. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  451. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  452. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  453. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  454. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  455. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  456. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  457. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  458. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  459. package/configuration/interfaces/groundConfiguration.js +0 -2
  460. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  461. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  462. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  463. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  464. package/configuration/interfaces/index.d.ts +0 -15
  465. package/configuration/interfaces/index.js +0 -16
  466. package/configuration/interfaces/index.js.map +0 -1
  467. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  468. package/configuration/interfaces/lightConfiguration.js +0 -2
  469. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  470. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  471. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  472. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  473. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  474. package/configuration/interfaces/modelConfiguration.js +0 -2
  475. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  476. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  477. package/configuration/interfaces/observersConfiguration.js +0 -2
  478. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  479. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  480. package/configuration/interfaces/sceneConfiguration.js +0 -2
  481. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  482. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  483. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  484. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  485. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  486. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  487. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  488. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  489. package/configuration/interfaces/templateConfiguration.js +0 -2
  490. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  491. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  492. package/configuration/interfaces/vrConfiguration.js +0 -2
  493. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  494. package/configuration/loader.d.ts +0 -4
  495. package/configuration/loader.js +0 -17
  496. package/configuration/loader.js.map +0 -1
  497. package/configuration/mappers.d.ts +0 -43
  498. package/configuration/mappers.js +0 -193
  499. package/configuration/mappers.js.map +0 -1
  500. package/configuration/renderOnlyLoader.d.ts +0 -33
  501. package/configuration/renderOnlyLoader.js +0 -162
  502. package/configuration/renderOnlyLoader.js.map +0 -1
  503. package/configuration/types/default.d.ts +0 -6
  504. package/configuration/types/default.js +0 -121
  505. package/configuration/types/default.js.map +0 -1
  506. package/configuration/types/environmentMap.d.ts +0 -5
  507. package/configuration/types/environmentMap.js +0 -14
  508. package/configuration/types/environmentMap.js.map +0 -1
  509. package/configuration/types/extended.d.ts +0 -6
  510. package/configuration/types/extended.js +0 -317
  511. package/configuration/types/extended.js.map +0 -1
  512. package/configuration/types/index.d.ts +0 -14
  513. package/configuration/types/index.js +0 -51
  514. package/configuration/types/index.js.map +0 -1
  515. package/configuration/types/minimal.d.ts +0 -6
  516. package/configuration/types/minimal.js +0 -43
  517. package/configuration/types/minimal.js.map +0 -1
  518. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  519. package/configuration/types/renderOnlyDefault.js +0 -31
  520. package/configuration/types/renderOnlyDefault.js.map +0 -1
  521. package/configuration/types/shadowLight.d.ts +0 -9
  522. package/configuration/types/shadowLight.js +0 -64
  523. package/configuration/types/shadowLight.js.map +0 -1
  524. package/helper/index.d.ts +0 -29
  525. package/helper/index.js +0 -66
  526. package/helper/index.js.map +0 -1
  527. package/index.d.ts +0 -30
  528. package/index.js +0 -46
  529. package/index.js.map +0 -1
  530. package/initializer.d.ts +0 -11
  531. package/initializer.js +0 -35
  532. package/initializer.js.map +0 -1
  533. package/interfaces.d.ts +0 -5
  534. package/interfaces.js +0 -7
  535. package/interfaces.js.map +0 -1
  536. package/labs/environmentSerializer.d.ts +0 -126
  537. package/labs/environmentSerializer.js +0 -191
  538. package/labs/environmentSerializer.js.map +0 -1
  539. package/labs/texture.d.ts +0 -183
  540. package/labs/texture.js +0 -351
  541. package/labs/texture.js.map +0 -1
  542. package/labs/viewerLabs.d.ts +0 -51
  543. package/labs/viewerLabs.js +0 -134
  544. package/labs/viewerLabs.js.map +0 -1
  545. package/loader/modelLoader.d.ts +0 -56
  546. package/loader/modelLoader.js +0 -202
  547. package/loader/modelLoader.js.map +0 -1
  548. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  549. package/loader/plugins/applyMaterialConfig.js +0 -16
  550. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  551. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  552. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  553. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  554. package/loader/plugins/index.d.ts +0 -19
  555. package/loader/plugins/index.js +0 -44
  556. package/loader/plugins/index.js.map +0 -1
  557. package/loader/plugins/loaderPlugin.d.ts +0 -24
  558. package/loader/plugins/loaderPlugin.js +0 -2
  559. package/loader/plugins/loaderPlugin.js.map +0 -1
  560. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  561. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  562. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  563. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  564. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  565. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  566. package/managers/observablesManager.d.ts +0 -66
  567. package/managers/observablesManager.js +0 -35
  568. package/managers/observablesManager.js.map +0 -1
  569. package/managers/sceneManager.d.ts +0 -245
  570. package/managers/sceneManager.js +0 -1375
  571. package/managers/sceneManager.js.map +0 -1
  572. package/managers/telemetryManager.d.ts +0 -78
  573. package/managers/telemetryManager.js +0 -117
  574. package/managers/telemetryManager.js.map +0 -1
  575. package/model/modelAnimation.d.ts +0 -215
  576. package/model/modelAnimation.js +0 -237
  577. package/model/modelAnimation.js.map +0 -1
  578. package/model/viewerModel.d.ts +0 -233
  579. package/model/viewerModel.js +0 -673
  580. package/model/viewerModel.js.map +0 -1
  581. package/optimizer/custom/extended.d.ts +0 -13
  582. package/optimizer/custom/extended.js +0 -101
  583. package/optimizer/custom/extended.js.map +0 -1
  584. package/optimizer/custom/index.d.ts +0 -9
  585. package/optimizer/custom/index.js +0 -26
  586. package/optimizer/custom/index.js.map +0 -1
  587. package/renderOnlyIndex.d.ts +0 -11
  588. package/renderOnlyIndex.js +0 -18
  589. package/renderOnlyIndex.js.map +0 -1
  590. package/templating/eventManager.d.ts +0 -35
  591. package/templating/eventManager.js +0 -66
  592. package/templating/eventManager.js.map +0 -1
  593. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  594. package/templating/plugins/hdButtonPlugin.js +0 -22
  595. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  596. package/templating/plugins/printButton.d.ts +0 -9
  597. package/templating/plugins/printButton.js +0 -41
  598. package/templating/plugins/printButton.js.map +0 -1
  599. package/templating/templateManager.d.ts +0 -197
  600. package/templating/templateManager.js +0 -561
  601. package/templating/templateManager.js.map +0 -1
  602. package/templating/viewerTemplatePlugin.d.ts +0 -21
  603. package/templating/viewerTemplatePlugin.js +0 -69
  604. package/templating/viewerTemplatePlugin.js.map +0 -1
  605. package/viewer/defaultViewer.d.ts +0 -130
  606. package/viewer/defaultViewer.js +0 -672
  607. package/viewer/defaultViewer.js.map +0 -1
  608. package/viewer/renderOnlyViewer.d.ts +0 -9
  609. package/viewer/renderOnlyViewer.js +0 -46
  610. package/viewer/renderOnlyViewer.js.map +0 -1
  611. package/viewer/viewer.d.ts +0 -258
  612. package/viewer/viewer.js +0 -783
  613. package/viewer/viewer.js.map +0 -1
  614. package/viewer/viewerManager.d.ts +0 -58
  615. package/viewer/viewerManager.js +0 -91
  616. package/viewer/viewerManager.js.map +0 -1
  617. package/viewer/viewerWithTemplate.d.ts +0 -9
  618. package/viewer/viewerWithTemplate.js +0 -20
  619. package/viewer/viewerWithTemplate.js.map +0 -1
package/viewer/viewer.js DELETED
@@ -1,783 +0,0 @@
1
- import { Engine } from "@babylonjs/core/Engines/engine.js";
2
- import { SceneLoader } from "@babylonjs/core/Loading/sceneLoader.js";
3
- import { RenderingManager } from "@babylonjs/core/Rendering/renderingManager.js";
4
- import { Tools } from "@babylonjs/core/Misc/tools.js";
5
- import { Effect } from "@babylonjs/core/Materials/effect.js";
6
- import { processConfigurationCompatibility } from "../configuration/configurationCompatibility.js";
7
- import { ConfigurationContainer } from "../configuration/configurationContainer.js";
8
- import { viewerGlobals } from "../configuration/globals.js";
9
- import { RenderOnlyConfigurationLoader } from "../configuration/renderOnlyLoader.js";
10
- // eslint-disable-next-line import/no-internal-modules
11
- import { deepmerge } from "../helper/index.js";
12
- import { ModelLoader } from "../loader/modelLoader.js";
13
- import { ObservablesManager } from "../managers/observablesManager.js";
14
- import { SceneManager } from "../managers/sceneManager.js";
15
- import { telemetryManager } from "../managers/telemetryManager.js";
16
- import { viewerManager } from "./viewerManager.js";
17
- import "@babylonjs/core/Misc/observable.extensions.js";
18
- import { Logger } from "@babylonjs/core/Misc/logger.js";
19
- /**
20
- * The AbstractViewer is the center of Babylon's viewer.
21
- * It is the basic implementation of the default viewer and is responsible of loading and showing the model and the templates
22
- */
23
- var AbstractViewer = /** @class */ (function () {
24
- function AbstractViewer(containerElement, initialConfiguration) {
25
- if (initialConfiguration === void 0) { initialConfiguration = {}; }
26
- var _this = this;
27
- this.containerElement = containerElement;
28
- /**
29
- * A flag that controls whether or not the render loop should be executed
30
- */
31
- this.runRenderLoop = true;
32
- /**
33
- * is this viewer disposed?
34
- */
35
- this._isDisposed = false;
36
- this._hdToggled = false;
37
- this._vrToggled = false;
38
- this._vrModelRepositioning = 0;
39
- this._vrScale = 1;
40
- this._vrInit = false;
41
- /**
42
- * The resize function that will be registered with the window object
43
- */
44
- this._resize = function () {
45
- // Only resize if Canvas is in the DOM
46
- if (!_this.isCanvasInDOM()) {
47
- return;
48
- }
49
- if (_this.canvas.clientWidth <= 0 || _this.canvas.clientHeight <= 0) {
50
- return;
51
- }
52
- if (_this.configuration.engine && _this.configuration.engine.disableResize) {
53
- return;
54
- }
55
- _this.engine.resize();
56
- };
57
- /**
58
- * render loop that will be executed by the engine
59
- * @param force
60
- */
61
- this._render = function (force) {
62
- if (force === void 0) { force = false; }
63
- if (force || (_this.sceneManager.scene && _this.sceneManager.scene.activeCamera)) {
64
- if (_this.runRenderLoop || force) {
65
- _this.engine.performanceMonitor.enable();
66
- _this.sceneManager.scene.render();
67
- _this.onFrameRenderedObservable.notifyObservers(_this);
68
- }
69
- else {
70
- _this.engine.performanceMonitor.disable();
71
- // update camera instead of rendering
72
- _this.sceneManager.scene.activeCamera && _this.sceneManager.scene.activeCamera.update();
73
- }
74
- }
75
- };
76
- // if exists, use the container id. otherwise, generate a random string.
77
- if (containerElement.id) {
78
- this.baseId = containerElement.id;
79
- }
80
- else {
81
- this.baseId = containerElement.id = "bjs" + Math.random().toString(32).substring(2, 10);
82
- }
83
- this._registeredOnBeforeRenderFunctions = [];
84
- this._configurationContainer = new ConfigurationContainer();
85
- this.observablesManager = new ObservablesManager();
86
- this.modelLoader = new ModelLoader(this.observablesManager, this._configurationContainer);
87
- RenderingManager.AUTOCLEAR = false;
88
- // extend the configuration
89
- this._configurationLoader = this.getConfigurationLoader();
90
- this._configurationLoader.loadConfiguration(initialConfiguration, function (configuration) {
91
- _this._onConfigurationLoaded(configuration);
92
- });
93
- this.onSceneInitObservable.add(function () {
94
- _this.updateConfiguration();
95
- });
96
- this.onInitDoneObservable.add(function () {
97
- _this._isInit = true;
98
- _this.engine.runRenderLoop(_this._render);
99
- });
100
- this._prepareContainerElement();
101
- // add this viewer to the viewer manager
102
- viewerManager.addViewer(this);
103
- }
104
- Object.defineProperty(AbstractViewer.prototype, "onSceneInitObservable", {
105
- // observables
106
- /**
107
- * Will notify when the scene was initialized
108
- */
109
- get: function () {
110
- return this.observablesManager.onSceneInitObservable;
111
- },
112
- enumerable: false,
113
- configurable: true
114
- });
115
- Object.defineProperty(AbstractViewer.prototype, "onEngineInitObservable", {
116
- /**
117
- * will notify when the engine was initialized
118
- */
119
- get: function () {
120
- return this.observablesManager.onEngineInitObservable;
121
- },
122
- enumerable: false,
123
- configurable: true
124
- });
125
- Object.defineProperty(AbstractViewer.prototype, "onModelAddedObservable", {
126
- /**
127
- * Will notify when a new model was added to the scene.
128
- * Note that added does not necessarily mean loaded!
129
- */
130
- get: function () {
131
- return this.observablesManager.onModelAddedObservable;
132
- },
133
- enumerable: false,
134
- configurable: true
135
- });
136
- Object.defineProperty(AbstractViewer.prototype, "onModelLoadedObservable", {
137
- /**
138
- * will notify after every model load
139
- */
140
- get: function () {
141
- return this.observablesManager.onModelLoadedObservable;
142
- },
143
- enumerable: false,
144
- configurable: true
145
- });
146
- Object.defineProperty(AbstractViewer.prototype, "onModelLoadProgressObservable", {
147
- /**
148
- * will notify when any model notify of progress
149
- */
150
- get: function () {
151
- return this.observablesManager.onModelLoadProgressObservable;
152
- },
153
- enumerable: false,
154
- configurable: true
155
- });
156
- Object.defineProperty(AbstractViewer.prototype, "onModelLoadErrorObservable", {
157
- /**
158
- * will notify when any model load failed.
159
- */
160
- get: function () {
161
- return this.observablesManager.onModelLoadErrorObservable;
162
- },
163
- enumerable: false,
164
- configurable: true
165
- });
166
- Object.defineProperty(AbstractViewer.prototype, "onModelRemovedObservable", {
167
- /**
168
- * Will notify when a model was removed from the scene;
169
- */
170
- get: function () {
171
- return this.observablesManager.onModelRemovedObservable;
172
- },
173
- enumerable: false,
174
- configurable: true
175
- });
176
- Object.defineProperty(AbstractViewer.prototype, "onLoaderInitObservable", {
177
- /**
178
- * will notify when a new loader was initialized.
179
- * Used mainly to know when a model starts loading.
180
- */
181
- get: function () {
182
- return this.observablesManager.onLoaderInitObservable;
183
- },
184
- enumerable: false,
185
- configurable: true
186
- });
187
- Object.defineProperty(AbstractViewer.prototype, "onInitDoneObservable", {
188
- /**
189
- * Observers registered here will be executed when the entire load process has finished.
190
- */
191
- get: function () {
192
- return this.observablesManager.onViewerInitDoneObservable;
193
- },
194
- enumerable: false,
195
- configurable: true
196
- });
197
- Object.defineProperty(AbstractViewer.prototype, "onFrameRenderedObservable", {
198
- /**
199
- * Functions added to this observable will be executed on each frame rendered.
200
- */
201
- get: function () {
202
- return this.observablesManager.onFrameRenderedObservable;
203
- },
204
- enumerable: false,
205
- configurable: true
206
- });
207
- Object.defineProperty(AbstractViewer.prototype, "onEnteringVRObservable", {
208
- /**
209
- * Observers registered here will be executed when VR more is entered.
210
- */
211
- get: function () {
212
- return this.observablesManager.onEnteringVRObservable;
213
- },
214
- enumerable: false,
215
- configurable: true
216
- });
217
- Object.defineProperty(AbstractViewer.prototype, "onExitingVRObservable", {
218
- /**
219
- * Observers registered here will be executed when VR mode is exited.
220
- */
221
- get: function () {
222
- return this.observablesManager.onExitingVRObservable;
223
- },
224
- enumerable: false,
225
- configurable: true
226
- });
227
- Object.defineProperty(AbstractViewer.prototype, "canvas", {
228
- /**
229
- * The (single) canvas of this viewer
230
- */
231
- get: function () {
232
- return this._canvas;
233
- },
234
- enumerable: false,
235
- configurable: true
236
- });
237
- Object.defineProperty(AbstractViewer.prototype, "configurationContainer", {
238
- get: function () {
239
- return this._configurationContainer;
240
- },
241
- enumerable: false,
242
- configurable: true
243
- });
244
- // eslint-disable-next-line @typescript-eslint/naming-convention
245
- AbstractViewer.prototype.getConfigurationLoader = function () {
246
- return new RenderOnlyConfigurationLoader();
247
- };
248
- /**
249
- * get the baseId of this viewer
250
- * @returns the baseId of this viewer
251
- */
252
- AbstractViewer.prototype.getBaseId = function () {
253
- return this.baseId;
254
- };
255
- /**
256
- * Do we have a canvas to render on, and is it a part of the scene
257
- * @returns true if the canvas is in the DOM
258
- */
259
- AbstractViewer.prototype.isCanvasInDOM = function () {
260
- return !!this._canvas && !!this._canvas.parentElement;
261
- };
262
- Object.defineProperty(AbstractViewer.prototype, "renderInBackground", {
263
- /**
264
- * Is the engine currently set to render even when the page is in background
265
- */
266
- get: function () {
267
- return this.engine && this.engine.renderEvenInBackground;
268
- },
269
- /**
270
- * Set the viewer's background rendering flag.
271
- */
272
- set: function (value) {
273
- if (this.engine) {
274
- this.engine.renderEvenInBackground = value;
275
- }
276
- },
277
- enumerable: false,
278
- configurable: true
279
- });
280
- Object.defineProperty(AbstractViewer.prototype, "configuration", {
281
- /**
282
- * Get the configuration object. This is a reference only.
283
- * The configuration can ONLY be updated using the updateConfiguration function.
284
- * changing this object will have no direct effect on the scene.
285
- */
286
- get: function () {
287
- return this._configurationContainer.configuration;
288
- },
289
- enumerable: false,
290
- configurable: true
291
- });
292
- /**
293
- * force resizing the engine.
294
- */
295
- AbstractViewer.prototype.forceResize = function () {
296
- this._resize();
297
- };
298
- AbstractViewer.prototype.toggleHD = function () {
299
- this._hdToggled = !this._hdToggled;
300
- var scale = this._hdToggled ? Math.max(0.5, 1 / (window.devicePixelRatio || 2)) : 1;
301
- this.engine.setHardwareScalingLevel(scale);
302
- };
303
- AbstractViewer.prototype.toggleVR = function () {
304
- if (!this._vrInit) {
305
- this._initVR();
306
- }
307
- if (this.sceneManager.vrHelper && !this.sceneManager.vrHelper.isInVRMode) {
308
- // make sure the floor is set
309
- if (this.sceneManager.environmentHelper && this.sceneManager.environmentHelper.ground) {
310
- this.sceneManager.vrHelper.addFloorMesh(this.sceneManager.environmentHelper.ground);
311
- }
312
- this._vrToggled = true;
313
- this.sceneManager.vrHelper.enterVR();
314
- // position the vr camera to be in front of the object or wherever the user has configured it to be
315
- if (this.sceneManager.vrHelper.currentVRCamera && this.sceneManager.vrHelper.currentVRCamera !== this.sceneManager.camera) {
316
- if (this.configuration.vr && this.configuration.vr.cameraPosition !== undefined) {
317
- this.sceneManager.vrHelper.currentVRCamera.position.copyFromFloats(this.configuration.vr.cameraPosition.x, this.configuration.vr.cameraPosition.y, this.configuration.vr.cameraPosition.z);
318
- }
319
- else {
320
- this.sceneManager.vrHelper.currentVRCamera.position.copyFromFloats(0, this.sceneManager.vrHelper.currentVRCamera.position.y, -1);
321
- }
322
- this.sceneManager.vrHelper.currentVRCamera.rotationQuaternion &&
323
- this.sceneManager.vrHelper.currentVRCamera.rotationQuaternion.copyFromFloats(0, 0, 0, 1);
324
- // set the height of the model to be what the user has configured, or floating by default
325
- if (this.configuration.vr && this.configuration.vr.modelHeightCorrection !== undefined) {
326
- if (typeof this.configuration.vr.modelHeightCorrection === "number") {
327
- this._vrModelRepositioning = this.configuration.vr.modelHeightCorrection;
328
- }
329
- else if (this.configuration.vr.modelHeightCorrection) {
330
- this._vrModelRepositioning = this.sceneManager.vrHelper.currentVRCamera.position.y / 2;
331
- }
332
- else {
333
- this._vrModelRepositioning = 0;
334
- }
335
- }
336
- // scale the model
337
- if (this.sceneManager.models.length) {
338
- var boundingVectors = this.sceneManager.models[0].rootMesh.getHierarchyBoundingVectors();
339
- var sizeVec = boundingVectors.max.subtract(boundingVectors.min);
340
- var maxDimension = Math.max(sizeVec.x, sizeVec.y, sizeVec.z);
341
- this._vrScale = 1 / maxDimension;
342
- if (this.configuration.vr && this.configuration.vr.objectScaleFactor) {
343
- this._vrScale *= this.configuration.vr.objectScaleFactor;
344
- }
345
- this.sceneManager.models[0].rootMesh.scaling.scaleInPlace(this._vrScale);
346
- // reposition the object to "float" in front of the user
347
- this.sceneManager.models[0].rootMesh.position.y += this._vrModelRepositioning;
348
- this.sceneManager.models[0].rootMesh.rotationQuaternion = null;
349
- }
350
- // scale the environment to match the model
351
- if (this.sceneManager.environmentHelper) {
352
- this.sceneManager.environmentHelper.ground && this.sceneManager.environmentHelper.ground.scaling.scaleInPlace(this._vrScale);
353
- this.sceneManager.environmentHelper.skybox && this.sceneManager.environmentHelper.skybox.scaling.scaleInPlace(this._vrScale);
354
- }
355
- // post processing
356
- if (this.sceneManager.defaultRenderingPipelineEnabled && this.sceneManager.defaultRenderingPipeline) {
357
- this.sceneManager.defaultRenderingPipeline.imageProcessingEnabled = false;
358
- this.sceneManager.defaultRenderingPipeline.prepare();
359
- }
360
- }
361
- else {
362
- this._vrModelRepositioning = 0;
363
- }
364
- }
365
- else {
366
- if (this.sceneManager.vrHelper) {
367
- this.sceneManager.vrHelper.exitVR();
368
- }
369
- }
370
- };
371
- AbstractViewer.prototype._initVR = function () {
372
- var _this = this;
373
- if (this.sceneManager.vrHelper) {
374
- this.observablesManager.onExitingVRObservable.add(function () {
375
- if (_this._vrToggled) {
376
- _this._vrToggled = false;
377
- // undo the scaling of the model
378
- if (_this.sceneManager.models.length) {
379
- _this.sceneManager.models[0].rootMesh.scaling.scaleInPlace(1 / _this._vrScale);
380
- _this.sceneManager.models[0].rootMesh.position.y -= _this._vrModelRepositioning;
381
- }
382
- // undo the scaling of the environment
383
- if (_this.sceneManager.environmentHelper) {
384
- _this.sceneManager.environmentHelper.ground && _this.sceneManager.environmentHelper.ground.scaling.scaleInPlace(1 / _this._vrScale);
385
- _this.sceneManager.environmentHelper.skybox && _this.sceneManager.environmentHelper.skybox.scaling.scaleInPlace(1 / _this._vrScale);
386
- }
387
- // post processing
388
- if (_this.sceneManager.defaultRenderingPipelineEnabled && _this.sceneManager.defaultRenderingPipeline) {
389
- _this.sceneManager.defaultRenderingPipeline.imageProcessingEnabled = true;
390
- _this.sceneManager.defaultRenderingPipeline.prepare();
391
- }
392
- // clear set height and width
393
- _this.canvas.removeAttribute("height");
394
- _this.canvas.removeAttribute("width");
395
- _this.engine.resize();
396
- }
397
- });
398
- }
399
- this._vrInit = true;
400
- };
401
- AbstractViewer.prototype._onConfigurationLoaded = function (configuration) {
402
- var _this = this;
403
- this._configurationContainer.configuration = deepmerge(this.configuration || {}, configuration);
404
- if (this.configuration.observers) {
405
- this._configureObservers(this.configuration.observers);
406
- }
407
- // TODO remove this after testing, as this is done in the updateConfiguration as well.
408
- if (this.configuration.loaderPlugins) {
409
- Object.keys(this.configuration.loaderPlugins).forEach(function (name) {
410
- if (_this.configuration.loaderPlugins && _this.configuration.loaderPlugins[name]) {
411
- _this.modelLoader.addPlugin(name);
412
- }
413
- });
414
- }
415
- this.observablesManager.onViewerInitStartedObservable.notifyObservers(this);
416
- };
417
- /**
418
- * Force a single render loop execution.
419
- */
420
- AbstractViewer.prototype.forceRender = function () {
421
- this._render(true);
422
- };
423
- /**
424
- * Takes a screenshot of the scene and returns it as a base64 encoded png.
425
- * @param callback optional callback that will be triggered when screenshot is done.
426
- * @param width Optional screenshot width (default to 512).
427
- * @param height Optional screenshot height (default to 512).
428
- * @returns a promise with the screenshot data
429
- */
430
- AbstractViewer.prototype.takeScreenshot = function (callback, width, height) {
431
- var _this = this;
432
- if (width === void 0) { width = 0; }
433
- if (height === void 0) { height = 0; }
434
- width = width || this.canvas.clientWidth;
435
- height = height || this.canvas.clientHeight;
436
- // Create the screenshot
437
- return new Promise(function (resolve, reject) {
438
- try {
439
- Tools.CreateScreenshot(_this.engine, _this.sceneManager.camera, { width: width, height: height }, function (data) {
440
- if (callback) {
441
- callback(data);
442
- }
443
- resolve(data);
444
- });
445
- }
446
- catch (e) {
447
- reject(e);
448
- }
449
- });
450
- };
451
- /**
452
- * Update the current viewer configuration with new values.
453
- * Only provided information will be updated, old configuration values will be kept.
454
- * If this.configuration was manually changed, you can trigger this function with no parameters,
455
- * and the entire configuration will be updated.
456
- * @param newConfiguration the partial configuration to update or a URL to a JSON holding the updated configuration
457
- *
458
- */
459
- AbstractViewer.prototype.updateConfiguration = function (newConfiguration) {
460
- var _this = this;
461
- if (newConfiguration === void 0) { newConfiguration = this.configuration; }
462
- if (typeof newConfiguration === "string") {
463
- Tools.LoadFile(newConfiguration, function (data) {
464
- try {
465
- var newData = JSON.parse(data.toString());
466
- return _this.updateConfiguration(newData);
467
- }
468
- catch (e) {
469
- Logger.Log("Error parsing file " + newConfiguration);
470
- }
471
- }, undefined, undefined, undefined, function (error) {
472
- Logger.Log(["Error parsing file " + newConfiguration, error]);
473
- });
474
- }
475
- else {
476
- //backcompat
477
- processConfigurationCompatibility(newConfiguration);
478
- // update this.configuration with the new data
479
- this._configurationContainer.configuration = deepmerge(this.configuration || {}, newConfiguration);
480
- this.sceneManager.updateConfiguration(newConfiguration);
481
- // observers in configuration
482
- if (newConfiguration.observers) {
483
- this._configureObservers(newConfiguration.observers);
484
- }
485
- if (newConfiguration.loaderPlugins) {
486
- Object.keys(newConfiguration.loaderPlugins).forEach(function (name) {
487
- if (newConfiguration.loaderPlugins && newConfiguration.loaderPlugins[name]) {
488
- _this.modelLoader.addPlugin(name);
489
- }
490
- });
491
- }
492
- }
493
- };
494
- /**
495
- * this is used to register native functions using the configuration object.
496
- * This will configure the observers.
497
- * @param observersConfiguration observers configuration
498
- */
499
- AbstractViewer.prototype._configureObservers = function (observersConfiguration) {
500
- if (observersConfiguration.onEngineInit) {
501
- this.onEngineInitObservable.add(window[observersConfiguration.onEngineInit]);
502
- }
503
- else {
504
- if (observersConfiguration.onEngineInit === "" && this.configuration.observers && this.configuration.observers.onEngineInit) {
505
- this.onEngineInitObservable.removeCallback(window[this.configuration.observers.onEngineInit]);
506
- }
507
- }
508
- if (observersConfiguration.onSceneInit) {
509
- this.onSceneInitObservable.add(window[observersConfiguration.onSceneInit]);
510
- }
511
- else {
512
- if (observersConfiguration.onSceneInit === "" && this.configuration.observers && this.configuration.observers.onSceneInit) {
513
- this.onSceneInitObservable.removeCallback(window[this.configuration.observers.onSceneInit]);
514
- }
515
- }
516
- if (observersConfiguration.onModelLoaded) {
517
- this.onModelLoadedObservable.add(window[observersConfiguration.onModelLoaded]);
518
- }
519
- else {
520
- if (observersConfiguration.onModelLoaded === "" && this.configuration.observers && this.configuration.observers.onModelLoaded) {
521
- this.onModelLoadedObservable.removeCallback(window[this.configuration.observers.onModelLoaded]);
522
- }
523
- }
524
- };
525
- /**
526
- * Dispose the entire viewer including the scene and the engine
527
- */
528
- AbstractViewer.prototype.dispose = function () {
529
- if (this._isDisposed) {
530
- return;
531
- }
532
- window.removeEventListener("resize", this._resize);
533
- if (this.sceneManager) {
534
- if (this.sceneManager.scene && this.sceneManager.scene.activeCamera) {
535
- this.sceneManager.scene.activeCamera.detachControl();
536
- }
537
- this.sceneManager.dispose();
538
- }
539
- this._fpsTimeoutInterval && clearInterval(this._fpsTimeoutInterval);
540
- this.observablesManager.dispose();
541
- this.modelLoader.dispose();
542
- if (this.engine) {
543
- this.engine.dispose();
544
- }
545
- viewerManager.removeViewer(this);
546
- this._isDisposed = true;
547
- };
548
- /**
549
- * This function will execute when the HTML templates finished initializing.
550
- * It should initialize the engine and continue execution.
551
- *
552
- * @returns The viewer object will be returned after the object was loaded.
553
- */
554
- AbstractViewer.prototype._onTemplatesLoaded = function () {
555
- return Promise.resolve(this);
556
- };
557
- /**
558
- * This will force the creation of an engine and a scene.
559
- * It will also load a model if preconfigured.
560
- * But first - it will load the extendible onTemplateLoaded()!
561
- * @returns A promise that will resolve when the template was loaded
562
- */
563
- AbstractViewer.prototype._onTemplateLoaded = function () {
564
- var _this = this;
565
- // check if viewer was disposed right after created
566
- if (this._isDisposed) {
567
- return Promise.reject("viewer was disposed");
568
- }
569
- return this._onTemplatesLoaded().then(function () {
570
- var autoLoad = typeof _this.configuration.model === "string" || (_this.configuration.model && _this.configuration.model.url);
571
- return _this._initEngine()
572
- .then(function (engine) {
573
- return _this.onEngineInitObservable.notifyObserversWithPromise(engine);
574
- })
575
- .then(function () {
576
- _this._initTelemetryEvents();
577
- if (autoLoad) {
578
- return _this.loadModel(_this.configuration.model)
579
- .catch(function () { })
580
- .then(function () {
581
- return _this.sceneManager.scene;
582
- });
583
- }
584
- else {
585
- return _this.sceneManager.scene || _this.sceneManager.initScene(_this.configuration.scene);
586
- }
587
- })
588
- .then(function () {
589
- return _this.onInitDoneObservable.notifyObserversWithPromise(_this);
590
- })
591
- .catch(function (e) {
592
- Tools.Warn(e.toString());
593
- return _this;
594
- });
595
- });
596
- };
597
- /**
598
- * Initialize the engine. Returns a promise in case async calls are needed.
599
- *
600
- * @protected
601
- * @returns {Promise<Engine>}
602
- * @memberof Viewer
603
- */
604
- AbstractViewer.prototype._initEngine = function () {
605
- // init custom shaders
606
- this._injectCustomShaders();
607
- //let canvasElement = this.templateManager.getCanvas();
608
- if (!this.canvas) {
609
- return Promise.reject("Canvas element not found!");
610
- }
611
- var config = this.configuration.engine || {};
612
- // TDO enable further configuration
613
- // check for webgl2 support, force-disable if needed.
614
- if (viewerGlobals.disableWebGL2Support) {
615
- config.engineOptions = config.engineOptions || {};
616
- config.engineOptions.disableWebGL2Support = true;
617
- }
618
- if (this.configuration["3dCommerceCertified"]) {
619
- config.engineOptions = config.engineOptions || {};
620
- config.engineOptions.forceSRGBBufferSupportState = true;
621
- var loader = SceneLoader.GetPluginForExtension(".gltf");
622
- if (loader) {
623
- loader.transparencyAsCoverage = true;
624
- }
625
- SceneLoader.OnPluginActivatedObservable.add(function (plugin) {
626
- if (plugin.name === "gltf") {
627
- var loader_1 = plugin;
628
- loader_1.transparencyAsCoverage = true;
629
- }
630
- });
631
- }
632
- this.engine = new Engine(this.canvas, !!config.antialiasing, config.engineOptions);
633
- if (!config.disableResize) {
634
- window.addEventListener("resize", this._resize);
635
- }
636
- if (this.configuration.engine) {
637
- if (this.configuration.engine.adaptiveQuality) {
638
- var scale = Math.max(0.5, 1 / (window.devicePixelRatio || 2));
639
- this.engine.setHardwareScalingLevel(scale);
640
- }
641
- if (this.configuration.engine.hdEnabled) {
642
- this.toggleHD();
643
- }
644
- }
645
- // create a new template manager for this viewer
646
- this.sceneManager = new SceneManager(this.engine, this._configurationContainer, this.observablesManager);
647
- return Promise.resolve(this.engine);
648
- };
649
- /**
650
- * Initialize a model loading. The returned object (a ViewerModel object) will be loaded in the background.
651
- * The difference between this and loadModel is that loadModel will fulfill the promise when the model finished loading.
652
- *
653
- * @param modelConfig model configuration to use when loading the model.
654
- * @param clearScene should the scene be cleared before loading this model
655
- * @returns a ViewerModel object that is not yet fully loaded.
656
- */
657
- AbstractViewer.prototype.initModel = function (modelConfig, clearScene) {
658
- var _this = this;
659
- if (clearScene === void 0) { clearScene = true; }
660
- var configuration;
661
- if (typeof modelConfig === "string") {
662
- configuration = {
663
- url: modelConfig,
664
- };
665
- }
666
- else if (modelConfig instanceof File) {
667
- configuration = {
668
- file: modelConfig,
669
- root: "file:",
670
- };
671
- }
672
- else {
673
- configuration = modelConfig;
674
- }
675
- if (!configuration.url && !configuration.file) {
676
- throw new Error("no model provided");
677
- }
678
- if (clearScene) {
679
- this.sceneManager.clearScene(true, false);
680
- }
681
- //merge the configuration for future models:
682
- if (this.configuration.model && typeof this.configuration.model === "object") {
683
- var globalConfig = deepmerge({}, this.configuration.model);
684
- configuration = deepmerge(globalConfig, configuration);
685
- if (modelConfig instanceof File) {
686
- configuration.file = modelConfig;
687
- }
688
- }
689
- else {
690
- this.configuration.model = configuration;
691
- }
692
- this._isLoading = true;
693
- var model = this.modelLoader.load(configuration);
694
- this.lastUsedLoader = model.loader;
695
- model.onLoadErrorObservable.add(function (errorObject) {
696
- _this.onModelLoadErrorObservable.notifyObserversWithPromise(errorObject);
697
- });
698
- model.onLoadProgressObservable.add(function (progressEvent) {
699
- _this.onModelLoadProgressObservable.notifyObserversWithPromise(progressEvent);
700
- });
701
- this.onLoaderInitObservable.notifyObserversWithPromise(this.lastUsedLoader);
702
- model.onLoadedObservable.add(function () {
703
- _this._isLoading = false;
704
- });
705
- return model;
706
- };
707
- /**
708
- * load a model using the provided configuration.
709
- * This function, as opposed to initModel, will return a promise that resolves when the model is loaded, and rejects with error.
710
- * If you want to attach to the observables of the model, use initModel instead.
711
- *
712
- * @param modelConfig the model configuration or URL to load.
713
- * @param clearScene Should the scene be cleared before loading the model
714
- * @returns a Promise the fulfills when the model finished loading successfully.
715
- */
716
- AbstractViewer.prototype.loadModel = function (modelConfig, clearScene) {
717
- var _this = this;
718
- if (clearScene === void 0) { clearScene = true; }
719
- if (this._isLoading) {
720
- // We can decide here whether or not to cancel the lst load, but the developer can do that.
721
- return Promise.reject("another model is curently being loaded.");
722
- }
723
- return Promise.resolve(this.sceneManager.scene)
724
- .then(function (scene) {
725
- if (!scene) {
726
- return _this.sceneManager.initScene(_this.configuration.scene);
727
- }
728
- return scene;
729
- })
730
- .then(function () {
731
- var model = _this.initModel(modelConfig, clearScene);
732
- return new Promise(function (resolve, reject) {
733
- // at this point, configuration.model is an object, not a string
734
- model.onLoadedObservable.add(function () {
735
- resolve(model);
736
- });
737
- model.onLoadErrorObservable.add(function (error) {
738
- reject(error);
739
- });
740
- });
741
- });
742
- };
743
- AbstractViewer.prototype._initTelemetryEvents = function () {
744
- var _this = this;
745
- telemetryManager.broadcast("Engine Capabilities", this.baseId, this.engine.getCaps());
746
- telemetryManager.broadcast("Platform Details", this.baseId, {
747
- userAgent: navigator.userAgent,
748
- platform: navigator.platform,
749
- });
750
- telemetryManager.flushWebGLErrors(this.engine, this.baseId);
751
- var trackFPS = function () {
752
- telemetryManager.broadcast("Current FPS", _this.baseId, { fps: _this.engine.getFps() });
753
- };
754
- trackFPS();
755
- // Track the FPS again after 60 seconds
756
- this._fpsTimeoutInterval = window.setInterval(trackFPS, 60 * 1000);
757
- };
758
- /**
759
- * Injects all the spectre shader in the babylon shader store
760
- */
761
- AbstractViewer.prototype._injectCustomShaders = function () {
762
- var customShaders = this.configuration.customShaders;
763
- // Inject all the spectre shader in the babylon shader store.
764
- if (!customShaders) {
765
- return;
766
- }
767
- if (customShaders.shaders) {
768
- Object.keys(customShaders.shaders).forEach(function (key) {
769
- // typescript considers a callback "unsafe", so... '!'
770
- Effect.ShadersStore[key] = customShaders.shaders[key];
771
- });
772
- }
773
- if (customShaders.includes) {
774
- Object.keys(customShaders.includes).forEach(function (key) {
775
- // typescript considers a callback "unsafe", so... '!'
776
- Effect.IncludesShadersStore[key] = customShaders.includes[key];
777
- });
778
- }
779
- };
780
- return AbstractViewer;
781
- }());
782
- export { AbstractViewer };
783
- //# sourceMappingURL=viewer.js.map