@babylonjs/viewer 7.41.1 → 7.42.0-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-BHDD74jk.esm.min.js +2 -0
  7. package/dist/chunks/EXT_lights_ies-BHDD74jk.esm.min.js.map +1 -0
  8. package/dist/chunks/EXT_lights_ies-CJfRNbJm.esm.js +84 -0
  9. package/dist/chunks/EXT_lights_ies-CJfRNbJm.esm.js.map +1 -0
  10. package/dist/chunks/EXT_lights_image_based-B460Sv95.esm.min.js +2 -0
  11. package/dist/chunks/EXT_lights_image_based-B460Sv95.esm.min.js.map +1 -0
  12. package/dist/chunks/EXT_lights_image_based-CQ6UCahL.esm.js +171 -0
  13. package/dist/chunks/EXT_lights_image_based-CQ6UCahL.esm.js.map +1 -0
  14. package/dist/chunks/EXT_mesh_gpu_instancing-D77OfiDS.esm.js +86 -0
  15. package/dist/chunks/EXT_mesh_gpu_instancing-D77OfiDS.esm.js.map +1 -0
  16. package/dist/chunks/EXT_mesh_gpu_instancing-GMG29Y9J.esm.min.js +2 -0
  17. package/dist/chunks/EXT_mesh_gpu_instancing-GMG29Y9J.esm.min.js.map +1 -0
  18. package/dist/chunks/EXT_meshopt_compression-CniiOX0a.esm.js +134 -0
  19. package/dist/chunks/EXT_meshopt_compression-CniiOX0a.esm.js.map +1 -0
  20. package/dist/chunks/EXT_meshopt_compression-DCcKdizI.esm.min.js +2 -0
  21. package/dist/chunks/EXT_meshopt_compression-DCcKdizI.esm.min.js.map +1 -0
  22. package/dist/chunks/EXT_texture_avif-By7mk6aS.esm.min.js +2 -0
  23. package/dist/chunks/EXT_texture_avif-By7mk6aS.esm.min.js.map +1 -0
  24. package/dist/chunks/EXT_texture_avif-DnaKno7b.esm.js +44 -0
  25. package/dist/chunks/EXT_texture_avif-DnaKno7b.esm.js.map +1 -0
  26. package/dist/chunks/EXT_texture_webp-Bm29ukIo.esm.js +43 -0
  27. package/dist/chunks/EXT_texture_webp-Bm29ukIo.esm.js.map +1 -0
  28. package/dist/chunks/EXT_texture_webp-DtSWYlAE.esm.min.js +2 -0
  29. package/dist/chunks/EXT_texture_webp-DtSWYlAE.esm.min.js.map +1 -0
  30. package/dist/chunks/ExtrasAsMetadata-BUO8J2zR.esm.js +64 -0
  31. package/dist/chunks/ExtrasAsMetadata-BUO8J2zR.esm.js.map +1 -0
  32. package/dist/chunks/ExtrasAsMetadata-mi3fn9sR.esm.min.js +2 -0
  33. package/dist/chunks/ExtrasAsMetadata-mi3fn9sR.esm.min.js.map +1 -0
  34. package/dist/chunks/KHR_animation_pointer-COeThtQe.esm.min.js +2 -0
  35. package/dist/chunks/KHR_animation_pointer-COeThtQe.esm.min.js.map +1 -0
  36. package/dist/chunks/KHR_animation_pointer-DXqgkZGB.esm.js +352 -0
  37. package/dist/chunks/KHR_animation_pointer-DXqgkZGB.esm.js.map +1 -0
  38. package/dist/chunks/KHR_draco_mesh_compression-Bh9XGNFd.esm.js +610 -0
  39. package/dist/chunks/KHR_draco_mesh_compression-Bh9XGNFd.esm.js.map +1 -0
  40. package/dist/chunks/KHR_draco_mesh_compression-DyU2KIa2.esm.min.js +2 -0
  41. package/dist/chunks/KHR_draco_mesh_compression-DyU2KIa2.esm.min.js.map +1 -0
  42. package/dist/chunks/KHR_interactivity-QP9zFX3U.esm.js +4033 -0
  43. package/dist/chunks/KHR_interactivity-QP9zFX3U.esm.js.map +1 -0
  44. package/dist/chunks/KHR_interactivity-_r7e7vwA.esm.min.js +2 -0
  45. package/dist/chunks/KHR_interactivity-_r7e7vwA.esm.min.js.map +1 -0
  46. package/dist/chunks/KHR_lights_punctual-DWGx9KlE.esm.js +581 -0
  47. package/dist/chunks/KHR_lights_punctual-DWGx9KlE.esm.js.map +1 -0
  48. package/dist/chunks/KHR_lights_punctual-cz3ulMW0.esm.min.js +2 -0
  49. package/dist/chunks/KHR_lights_punctual-cz3ulMW0.esm.min.js.map +1 -0
  50. package/dist/chunks/KHR_materials_anisotropy-BSvZxEnx.esm.js +65 -0
  51. package/dist/chunks/KHR_materials_anisotropy-BSvZxEnx.esm.js.map +1 -0
  52. package/dist/chunks/KHR_materials_anisotropy-CtKPvN_z.esm.min.js +2 -0
  53. package/dist/chunks/KHR_materials_anisotropy-CtKPvN_z.esm.min.js.map +1 -0
  54. package/dist/chunks/KHR_materials_clearcoat-BephgEiM.esm.min.js +2 -0
  55. package/dist/chunks/KHR_materials_clearcoat-BephgEiM.esm.min.js.map +1 -0
  56. package/dist/chunks/KHR_materials_clearcoat-C3QB9HNC.esm.js +96 -0
  57. package/dist/chunks/KHR_materials_clearcoat-C3QB9HNC.esm.js.map +1 -0
  58. package/dist/chunks/KHR_materials_diffuse_transmission-CZvfLdyF.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_diffuse_transmission-CZvfLdyF.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_diffuse_transmission-DuM5GD2L.esm.js +97 -0
  61. package/dist/chunks/KHR_materials_diffuse_transmission-DuM5GD2L.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_dispersion-0FtkqUmS.esm.js +62 -0
  63. package/dist/chunks/KHR_materials_dispersion-0FtkqUmS.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_dispersion-C7mAat5y.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_dispersion-C7mAat5y.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_emissive_strength-Bz2y9OnA.esm.js +55 -0
  67. package/dist/chunks/KHR_materials_emissive_strength-Bz2y9OnA.esm.js.map +1 -0
  68. package/dist/chunks/KHR_materials_emissive_strength-b7ZNj1HF.esm.min.js +2 -0
  69. package/dist/chunks/KHR_materials_emissive_strength-b7ZNj1HF.esm.min.js.map +1 -0
  70. package/dist/chunks/KHR_materials_ior-C5-JiuLs.esm.min.js +2 -0
  71. package/dist/chunks/KHR_materials_ior-C5-JiuLs.esm.min.js.map +1 -0
  72. package/dist/chunks/KHR_materials_ior-D1jjzmsp.esm.js +64 -0
  73. package/dist/chunks/KHR_materials_ior-D1jjzmsp.esm.js.map +1 -0
  74. package/dist/chunks/KHR_materials_iridescence-CChET9-W.esm.js +72 -0
  75. package/dist/chunks/KHR_materials_iridescence-CChET9-W.esm.js.map +1 -0
  76. package/dist/chunks/KHR_materials_iridescence-hATfgETI.esm.min.js +2 -0
  77. package/dist/chunks/KHR_materials_iridescence-hATfgETI.esm.min.js.map +1 -0
  78. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B-HlmeqI.esm.js +81 -0
  79. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B-HlmeqI.esm.js.map +1 -0
  80. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_IaUmSJE.esm.min.js +2 -0
  81. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_IaUmSJE.esm.min.js.map +1 -0
  82. package/dist/chunks/KHR_materials_sheen-D2QD8uSC.esm.js +85 -0
  83. package/dist/chunks/KHR_materials_sheen-D2QD8uSC.esm.js.map +1 -0
  84. package/dist/chunks/KHR_materials_sheen-cqxpRyXD.esm.min.js +2 -0
  85. package/dist/chunks/KHR_materials_sheen-cqxpRyXD.esm.min.js.map +1 -0
  86. package/dist/chunks/KHR_materials_specular-DnHIH9RX.esm.min.js +2 -0
  87. package/dist/chunks/KHR_materials_specular-DnHIH9RX.esm.min.js.map +1 -0
  88. package/dist/chunks/KHR_materials_specular-vwRXhXVF.esm.js +75 -0
  89. package/dist/chunks/KHR_materials_specular-vwRXhXVF.esm.js.map +1 -0
  90. package/dist/chunks/KHR_materials_transmission-D81TRCgt.esm.min.js +2 -0
  91. package/dist/chunks/KHR_materials_transmission-D81TRCgt.esm.min.js.map +1 -0
  92. package/dist/chunks/KHR_materials_transmission-nPX6lno-.esm.js +307 -0
  93. package/dist/chunks/KHR_materials_transmission-nPX6lno-.esm.js.map +1 -0
  94. package/dist/chunks/KHR_materials_unlit-CLSTXPsk.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_unlit-CLSTXPsk.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_unlit-pmQPq5qR.esm.js +74 -0
  97. package/dist/chunks/KHR_materials_unlit-pmQPq5qR.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_variants-C_XVH51a.esm.js +262 -0
  99. package/dist/chunks/KHR_materials_variants-C_XVH51a.esm.js.map +1 -0
  100. package/dist/chunks/KHR_materials_variants-Czo1ZM8r.esm.min.js +2 -0
  101. package/dist/chunks/KHR_materials_variants-Czo1ZM8r.esm.min.js.map +1 -0
  102. package/dist/chunks/KHR_materials_volume-BJVGGE1g.esm.min.js +2 -0
  103. package/dist/chunks/KHR_materials_volume-BJVGGE1g.esm.min.js.map +1 -0
  104. package/dist/chunks/KHR_materials_volume-C4EKOzF-.esm.js +87 -0
  105. package/dist/chunks/KHR_materials_volume-C4EKOzF-.esm.js.map +1 -0
  106. package/dist/chunks/KHR_mesh_quantization-CZIcA8DN.esm.min.js +2 -0
  107. package/dist/chunks/KHR_mesh_quantization-CZIcA8DN.esm.min.js.map +1 -0
  108. package/dist/chunks/KHR_mesh_quantization-DG9WNux6.esm.js +26 -0
  109. package/dist/chunks/KHR_mesh_quantization-DG9WNux6.esm.js.map +1 -0
  110. package/dist/chunks/KHR_node_hoverability-C1YMkQ95.esm.js +39 -0
  111. package/dist/chunks/KHR_node_hoverability-C1YMkQ95.esm.js.map +1 -0
  112. package/dist/chunks/KHR_node_hoverability-HxHiCdR9.esm.min.js +2 -0
  113. package/dist/chunks/KHR_node_hoverability-HxHiCdR9.esm.min.js.map +1 -0
  114. package/dist/chunks/KHR_node_visibility-C5tc6GOc.esm.js +46 -0
  115. package/dist/chunks/KHR_node_visibility-C5tc6GOc.esm.js.map +1 -0
  116. package/dist/chunks/KHR_node_visibility-CSqn8wRd.esm.min.js +2 -0
  117. package/dist/chunks/KHR_node_visibility-CSqn8wRd.esm.min.js.map +1 -0
  118. package/dist/chunks/KHR_texture_basisu-DA2FE-qb.esm.min.js +2 -0
  119. package/dist/chunks/KHR_texture_basisu-DA2FE-qb.esm.min.js.map +1 -0
  120. package/dist/chunks/KHR_texture_basisu-KtQL54P-.esm.js +43 -0
  121. package/dist/chunks/KHR_texture_basisu-KtQL54P-.esm.js.map +1 -0
  122. package/dist/chunks/KHR_texture_transform-Cb6Q41F3.esm.js +63 -0
  123. package/dist/chunks/KHR_texture_transform-Cb6Q41F3.esm.js.map +1 -0
  124. package/dist/chunks/KHR_texture_transform-GdBAq_uW.esm.min.js +2 -0
  125. package/dist/chunks/KHR_texture_transform-GdBAq_uW.esm.min.js.map +1 -0
  126. package/dist/chunks/KHR_xmp_json_ld-CD_mkZDv.esm.min.js +2 -0
  127. package/dist/chunks/KHR_xmp_json_ld-CD_mkZDv.esm.min.js.map +1 -0
  128. package/dist/chunks/KHR_xmp_json_ld-f1rcQfsd.esm.js +51 -0
  129. package/dist/chunks/KHR_xmp_json_ld-f1rcQfsd.esm.js.map +1 -0
  130. package/dist/chunks/MSFT_audio_emitter-BU83EIcP.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_audio_emitter-BU83EIcP.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_audio_emitter-ClwdeJaR.esm.js +2201 -0
  133. package/dist/chunks/MSFT_audio_emitter-ClwdeJaR.esm.js.map +1 -0
  134. package/dist/chunks/MSFT_lod-D3MQWFc3.esm.min.js +2 -0
  135. package/dist/chunks/MSFT_lod-D3MQWFc3.esm.min.js.map +1 -0
  136. package/dist/chunks/MSFT_lod-DkM5iXcm.esm.js +337 -0
  137. package/dist/chunks/MSFT_lod-DkM5iXcm.esm.js.map +1 -0
  138. package/dist/chunks/MSFT_minecraftMesh-CG9JY5Ic.esm.min.js +2 -0
  139. package/dist/chunks/MSFT_minecraftMesh-CG9JY5Ic.esm.min.js.map +1 -0
  140. package/dist/chunks/MSFT_minecraftMesh-Cyjdx_Y_.esm.js +46 -0
  141. package/dist/chunks/MSFT_minecraftMesh-Cyjdx_Y_.esm.js.map +1 -0
  142. package/dist/chunks/MSFT_sRGBFactors-Bm3_fRmt.esm.min.js +2 -0
  143. package/dist/chunks/MSFT_sRGBFactors-Bm3_fRmt.esm.min.js.map +1 -0
  144. package/dist/chunks/MSFT_sRGBFactors-uFdNij-4.esm.js +47 -0
  145. package/dist/chunks/MSFT_sRGBFactors-uFdNij-4.esm.js.map +1 -0
  146. package/dist/chunks/animationGroup-CravGs2P.esm.min.js +2 -0
  147. package/dist/chunks/animationGroup-CravGs2P.esm.min.js.map +1 -0
  148. package/dist/chunks/animationGroup-DqmFa1Nk.esm.js +2482 -0
  149. package/dist/chunks/animationGroup-DqmFa1Nk.esm.js.map +1 -0
  150. package/dist/chunks/assetContainer-0Qu2XIWb.esm.js +1720 -0
  151. package/dist/chunks/assetContainer-0Qu2XIWb.esm.js.map +1 -0
  152. package/dist/chunks/assetContainer-CMuD-n3X.esm.min.js +2 -0
  153. package/dist/chunks/assetContainer-CMuD-n3X.esm.min.js.map +1 -0
  154. package/dist/chunks/audioEngine--EMyAh-L.esm.js +305 -0
  155. package/dist/chunks/audioEngine--EMyAh-L.esm.js.map +1 -0
  156. package/dist/chunks/audioEngine-3doZGQV6.esm.min.js +2 -0
  157. package/dist/chunks/audioEngine-3doZGQV6.esm.min.js.map +1 -0
  158. package/dist/chunks/bakedVertexAnimation-DgMI1D24.esm.min.js +2 -0
  159. package/dist/chunks/bakedVertexAnimation-DgMI1D24.esm.min.js.map +1 -0
  160. package/dist/chunks/bakedVertexAnimation-gQlUctpB.esm.js +114 -0
  161. package/dist/chunks/bakedVertexAnimation-gQlUctpB.esm.js.map +1 -0
  162. package/dist/chunks/basisTextureLoader-B0PY0ILM.esm.js +600 -0
  163. package/dist/chunks/basisTextureLoader-B0PY0ILM.esm.js.map +1 -0
  164. package/dist/chunks/basisTextureLoader-ES0mOtqQ.esm.min.js +2 -0
  165. package/dist/chunks/basisTextureLoader-ES0mOtqQ.esm.min.js.map +1 -0
  166. package/dist/chunks/dds-DEZD6DKL.esm.min.js +2 -0
  167. package/dist/chunks/dds-DEZD6DKL.esm.min.js.map +1 -0
  168. package/dist/chunks/dds-HwVEMga8.esm.js +540 -0
  169. package/dist/chunks/dds-HwVEMga8.esm.js.map +1 -0
  170. package/dist/chunks/ddsTextureLoader-3PDKukdG.esm.js +88 -0
  171. package/dist/chunks/ddsTextureLoader-3PDKukdG.esm.js.map +1 -0
  172. package/dist/chunks/ddsTextureLoader-C62DqYdE.esm.min.js +2 -0
  173. package/dist/chunks/ddsTextureLoader-C62DqYdE.esm.min.js.map +1 -0
  174. package/dist/chunks/decalFragment-B9KsZn_u.esm.min.js +2 -0
  175. package/dist/chunks/decalFragment-B9KsZn_u.esm.min.js.map +1 -0
  176. package/dist/chunks/decalFragment-CNA1EQK9.esm.js +18 -0
  177. package/dist/chunks/decalFragment-CNA1EQK9.esm.js.map +1 -0
  178. package/dist/chunks/default.fragment-BsajFq2Q.esm.js +446 -0
  179. package/dist/chunks/default.fragment-BsajFq2Q.esm.js.map +1 -0
  180. package/dist/chunks/default.fragment-C7O2NjXo.esm.min.js +2 -0
  181. package/dist/chunks/default.fragment-C7O2NjXo.esm.min.js.map +1 -0
  182. package/dist/chunks/default.fragment-CNef5Xlg.esm.min.js +2 -0
  183. package/dist/chunks/default.fragment-CNef5Xlg.esm.min.js.map +1 -0
  184. package/dist/chunks/default.fragment-DAO0SBl-.esm.js +515 -0
  185. package/dist/chunks/default.fragment-DAO0SBl-.esm.js.map +1 -0
  186. package/dist/chunks/default.vertex-Ban5pFUb.esm.js +211 -0
  187. package/dist/chunks/default.vertex-Ban5pFUb.esm.js.map +1 -0
  188. package/dist/chunks/default.vertex-CPjp6YBQ.esm.min.js +2 -0
  189. package/dist/chunks/default.vertex-CPjp6YBQ.esm.min.js.map +1 -0
  190. package/dist/chunks/default.vertex-CemfGK4Y.esm.min.js +2 -0
  191. package/dist/chunks/default.vertex-CemfGK4Y.esm.min.js.map +1 -0
  192. package/dist/chunks/default.vertex-QE4cV7Y2.esm.js +190 -0
  193. package/dist/chunks/default.vertex-QE4cV7Y2.esm.js.map +1 -0
  194. package/dist/chunks/defaultUboDeclaration-B5nIsoCQ.esm.min.js +2 -0
  195. package/dist/chunks/defaultUboDeclaration-B5nIsoCQ.esm.min.js.map +1 -0
  196. package/dist/chunks/defaultUboDeclaration-B8tY8ajW.esm.js +15 -0
  197. package/dist/chunks/defaultUboDeclaration-B8tY8ajW.esm.js.map +1 -0
  198. package/dist/chunks/defaultUboDeclaration-D7yr1BRw.esm.js +13 -0
  199. package/dist/chunks/defaultUboDeclaration-D7yr1BRw.esm.js.map +1 -0
  200. package/dist/chunks/defaultUboDeclaration-Db_EQWlv.esm.min.js +2 -0
  201. package/dist/chunks/defaultUboDeclaration-Db_EQWlv.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-C13JzZr_.esm.min.js +2 -0
  207. package/dist/chunks/dumpTools-C13JzZr_.esm.min.js.map +1 -0
  208. package/dist/chunks/dumpTools-D6BRv6Ws.esm.js +200 -0
  209. package/dist/chunks/dumpTools-D6BRv6Ws.esm.js.map +1 -0
  210. package/dist/chunks/engine-29lBc-mw.esm.min.js +2 -0
  211. package/dist/chunks/engine-29lBc-mw.esm.min.js.map +1 -0
  212. package/dist/chunks/engine-Bk6S663t.esm.js +2213 -0
  213. package/dist/chunks/engine-Bk6S663t.esm.js.map +1 -0
  214. package/dist/chunks/engine.common-D_DOB0rT.esm.js +1162 -0
  215. package/dist/chunks/engine.common-D_DOB0rT.esm.js.map +1 -0
  216. package/dist/chunks/engine.common-OpqDqcE2.esm.min.js +2 -0
  217. package/dist/chunks/engine.common-OpqDqcE2.esm.min.js.map +1 -0
  218. package/dist/chunks/envTextureLoader-DS13pG9w.esm.js +64 -0
  219. package/dist/chunks/envTextureLoader-DS13pG9w.esm.js.map +1 -0
  220. package/dist/chunks/envTextureLoader-Dt6q0XDu.esm.min.js +2 -0
  221. package/dist/chunks/envTextureLoader-Dt6q0XDu.esm.min.js.map +1 -0
  222. package/dist/chunks/environmentTextureTools-DKN-Hd8c.esm.min.js +2 -0
  223. package/dist/chunks/environmentTextureTools-DKN-Hd8c.esm.min.js.map +1 -0
  224. package/dist/chunks/environmentTextureTools-DWkvV21A.esm.js +382 -0
  225. package/dist/chunks/environmentTextureTools-DWkvV21A.esm.js.map +1 -0
  226. package/dist/chunks/exrTextureLoader-6o4jfUaF.esm.js +1683 -0
  227. package/dist/chunks/exrTextureLoader-6o4jfUaF.esm.js.map +1 -0
  228. package/dist/chunks/exrTextureLoader-CXV9O3pZ.esm.min.js +2 -0
  229. package/dist/chunks/exrTextureLoader-CXV9O3pZ.esm.min.js.map +1 -0
  230. package/dist/chunks/fogFragment-BdOtsPe3.esm.js +102 -0
  231. package/dist/chunks/fogFragment-BdOtsPe3.esm.js.map +1 -0
  232. package/dist/chunks/fogFragment-Cv3Bqrrg.esm.js +101 -0
  233. package/dist/chunks/fogFragment-Cv3Bqrrg.esm.js.map +1 -0
  234. package/dist/chunks/fogFragment-D91rqvp0.esm.min.js +2 -0
  235. package/dist/chunks/fogFragment-D91rqvp0.esm.min.js.map +1 -0
  236. package/dist/chunks/fogFragment-qdYpZbGA.esm.min.js +2 -0
  237. package/dist/chunks/fogFragment-qdYpZbGA.esm.min.js.map +1 -0
  238. package/dist/chunks/fresnelFunction-DBMK4K-2.esm.min.js +2 -0
  239. package/dist/chunks/fresnelFunction-DBMK4K-2.esm.min.js.map +1 -0
  240. package/dist/chunks/fresnelFunction-o5ZOc6C0.esm.js +12 -0
  241. package/dist/chunks/fresnelFunction-o5ZOc6C0.esm.js.map +1 -0
  242. package/dist/chunks/glTFLoader-Dj_JCgqJ.esm.min.js +2 -0
  243. package/dist/chunks/glTFLoader-Dj_JCgqJ.esm.min.js.map +1 -0
  244. package/dist/chunks/glTFLoader-DnWHbX53.esm.js +7693 -0
  245. package/dist/chunks/glTFLoader-DnWHbX53.esm.js.map +1 -0
  246. package/dist/chunks/glTFLoaderAnimation-A_WVS-lt.esm.min.js +2 -0
  247. package/dist/chunks/glTFLoaderAnimation-A_WVS-lt.esm.min.js.map +1 -0
  248. package/dist/chunks/glTFLoaderAnimation-C3gHlipY.esm.js +77 -0
  249. package/dist/chunks/glTFLoaderAnimation-C3gHlipY.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-91QStv6v.esm.min.js +2 -0
  255. package/dist/chunks/harmonicsFunctions-91QStv6v.esm.min.js.map +1 -0
  256. package/dist/chunks/harmonicsFunctions-DBJQNoSA.esm.min.js +2 -0
  257. package/dist/chunks/harmonicsFunctions-DBJQNoSA.esm.min.js.map +1 -0
  258. package/dist/chunks/harmonicsFunctions-DXdlMMN6.esm.js +34 -0
  259. package/dist/chunks/harmonicsFunctions-DXdlMMN6.esm.js.map +1 -0
  260. package/dist/chunks/harmonicsFunctions-VtAD6DeX.esm.js +35 -0
  261. package/dist/chunks/harmonicsFunctions-VtAD6DeX.esm.js.map +1 -0
  262. package/dist/chunks/hdrTextureLoader-CYtpPSzs.esm.js +253 -0
  263. package/dist/chunks/hdrTextureLoader-CYtpPSzs.esm.js.map +1 -0
  264. package/dist/chunks/hdrTextureLoader-CzZ1hV7q.esm.min.js +2 -0
  265. package/dist/chunks/hdrTextureLoader-CzZ1hV7q.esm.min.js.map +1 -0
  266. package/dist/chunks/helperFunctions-Bn3a_gzG.esm.js +110 -0
  267. package/dist/chunks/helperFunctions-Bn3a_gzG.esm.js.map +1 -0
  268. package/dist/chunks/helperFunctions-CA_QOVSE.esm.js +83 -0
  269. package/dist/chunks/helperFunctions-CA_QOVSE.esm.js.map +1 -0
  270. package/dist/chunks/helperFunctions-mebe29sq.esm.min.js +2 -0
  271. package/dist/chunks/helperFunctions-mebe29sq.esm.min.js.map +1 -0
  272. package/dist/chunks/helperFunctions-wIdfkMdZ.esm.min.js +2 -0
  273. package/dist/chunks/helperFunctions-wIdfkMdZ.esm.min.js.map +1 -0
  274. package/dist/chunks/iesTextureLoader-D8_bkaCP.esm.min.js +2 -0
  275. package/dist/chunks/iesTextureLoader-D8_bkaCP.esm.min.js.map +1 -0
  276. package/dist/chunks/iesTextureLoader-K1MQUalq.esm.js +189 -0
  277. package/dist/chunks/iesTextureLoader-K1MQUalq.esm.js.map +1 -0
  278. package/dist/chunks/index-Bo5F_mGk.esm.min.js +57 -0
  279. package/dist/chunks/index-Bo5F_mGk.esm.min.js.map +1 -0
  280. package/dist/chunks/index-Dlf001gP.esm.js +74889 -0
  281. package/dist/chunks/index-Dlf001gP.esm.js.map +1 -0
  282. package/dist/chunks/ktxTextureLoader-B6UHYOxL.esm.js +814 -0
  283. package/dist/chunks/ktxTextureLoader-B6UHYOxL.esm.js.map +1 -0
  284. package/dist/chunks/ktxTextureLoader-s_dbtiwN.esm.min.js +2 -0
  285. package/dist/chunks/ktxTextureLoader-s_dbtiwN.esm.min.js.map +1 -0
  286. package/dist/chunks/logDepthDeclaration--xmemf5p.esm.min.js +2 -0
  287. package/dist/chunks/logDepthDeclaration--xmemf5p.esm.min.js.map +1 -0
  288. package/dist/chunks/logDepthDeclaration-Babs-3_m.esm.js +35 -0
  289. package/dist/chunks/logDepthDeclaration-Babs-3_m.esm.js.map +1 -0
  290. package/dist/chunks/logDepthDeclaration-BvoznvSG.esm.min.js +2 -0
  291. package/dist/chunks/logDepthDeclaration-BvoznvSG.esm.min.js.map +1 -0
  292. package/dist/chunks/logDepthDeclaration-_EPT9ybx.esm.js +11 -0
  293. package/dist/chunks/logDepthDeclaration-_EPT9ybx.esm.js.map +1 -0
  294. package/dist/chunks/logDepthVertex-0vve_qKh.esm.js +77 -0
  295. package/dist/chunks/logDepthVertex-0vve_qKh.esm.js.map +1 -0
  296. package/dist/chunks/logDepthVertex-BkGmO8_s.esm.js +81 -0
  297. package/dist/chunks/logDepthVertex-BkGmO8_s.esm.js.map +1 -0
  298. package/dist/chunks/logDepthVertex-CVcNpHQe.esm.min.js +2 -0
  299. package/dist/chunks/logDepthVertex-CVcNpHQe.esm.min.js.map +1 -0
  300. package/dist/chunks/logDepthVertex-DL8eWalk.esm.min.js +2 -0
  301. package/dist/chunks/logDepthVertex-DL8eWalk.esm.min.js.map +1 -0
  302. package/dist/chunks/mainUVVaryingDeclaration-9DUO7sPf.esm.js +11 -0
  303. package/dist/chunks/mainUVVaryingDeclaration-9DUO7sPf.esm.js.map +1 -0
  304. package/dist/chunks/mainUVVaryingDeclaration-DXZGPs7O.esm.js +11 -0
  305. package/dist/chunks/mainUVVaryingDeclaration-DXZGPs7O.esm.js.map +1 -0
  306. package/dist/chunks/mainUVVaryingDeclaration-DaFtbg5X.esm.min.js +2 -0
  307. package/dist/chunks/mainUVVaryingDeclaration-DaFtbg5X.esm.min.js.map +1 -0
  308. package/dist/chunks/mainUVVaryingDeclaration-lKBcMFcP.esm.min.js +2 -0
  309. package/dist/chunks/mainUVVaryingDeclaration-lKBcMFcP.esm.min.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-BN0BlYEZ.esm.js +26 -0
  315. package/dist/chunks/meshUboDeclaration-BN0BlYEZ.esm.js.map +1 -0
  316. package/dist/chunks/meshUboDeclaration-BcQ1P_co.esm.min.js +2 -0
  317. package/dist/chunks/meshUboDeclaration-BcQ1P_co.esm.min.js.map +1 -0
  318. package/dist/chunks/objFileLoader-Lx7JtYFA.esm.min.js +2 -0
  319. package/dist/chunks/objFileLoader-Lx7JtYFA.esm.min.js.map +1 -0
  320. package/dist/chunks/objFileLoader-_nxEPYB4.esm.js +1338 -0
  321. package/dist/chunks/objFileLoader-_nxEPYB4.esm.js.map +1 -0
  322. package/dist/chunks/oitFragment-BPgREULe.esm.js +1240 -0
  323. package/dist/chunks/oitFragment-BPgREULe.esm.js.map +1 -0
  324. package/dist/chunks/oitFragment-CKNxTV0T.esm.min.js +2 -0
  325. package/dist/chunks/oitFragment-CKNxTV0T.esm.min.js.map +1 -0
  326. package/dist/chunks/oitFragment-CT3oWGRL.esm.js +1078 -0
  327. package/dist/chunks/oitFragment-CT3oWGRL.esm.js.map +1 -0
  328. package/dist/chunks/oitFragment-CXrV_64a.esm.min.js +2 -0
  329. package/dist/chunks/oitFragment-CXrV_64a.esm.min.js.map +1 -0
  330. package/dist/chunks/pass.fragment-BugqjVKo.esm.js +15 -0
  331. package/dist/chunks/pass.fragment-BugqjVKo.esm.js.map +1 -0
  332. package/dist/chunks/pass.fragment-X-KK3tOa.esm.min.js +2 -0
  333. package/dist/chunks/pass.fragment-X-KK3tOa.esm.min.js.map +1 -0
  334. package/dist/chunks/pass.fragment-pJ1J3AeO.esm.min.js +2 -0
  335. package/dist/chunks/pass.fragment-pJ1J3AeO.esm.min.js.map +1 -0
  336. package/dist/chunks/pass.fragment-tk9KCmM-.esm.js +15 -0
  337. package/dist/chunks/pass.fragment-tk9KCmM-.esm.js.map +1 -0
  338. package/dist/chunks/pbr.fragment-C4BFWzEP.esm.js +3269 -0
  339. package/dist/chunks/pbr.fragment-C4BFWzEP.esm.js.map +1 -0
  340. package/dist/chunks/pbr.fragment-CTE0zFNb.esm.min.js +2 -0
  341. package/dist/chunks/pbr.fragment-CTE0zFNb.esm.min.js.map +1 -0
  342. package/dist/chunks/pbr.fragment-DZRIiJzv.esm.js +3222 -0
  343. package/dist/chunks/pbr.fragment-DZRIiJzv.esm.js.map +1 -0
  344. package/dist/chunks/pbr.fragment-Dk1kkP87.esm.min.js +2 -0
  345. package/dist/chunks/pbr.fragment-Dk1kkP87.esm.min.js.map +1 -0
  346. package/dist/chunks/pbr.vertex-Ba8BDEep.esm.min.js +2 -0
  347. package/dist/chunks/pbr.vertex-Ba8BDEep.esm.min.js.map +1 -0
  348. package/dist/chunks/pbr.vertex-DM2WONhK.esm.js +223 -0
  349. package/dist/chunks/pbr.vertex-DM2WONhK.esm.js.map +1 -0
  350. package/dist/chunks/pbr.vertex-DVghYyb7.esm.min.js +2 -0
  351. package/dist/chunks/pbr.vertex-DVghYyb7.esm.min.js.map +1 -0
  352. package/dist/chunks/pbr.vertex-DiVjR6Bs.esm.js +348 -0
  353. package/dist/chunks/pbr.vertex-DiVjR6Bs.esm.js.map +1 -0
  354. package/dist/chunks/postprocess.vertex-CtVD6qfW.esm.min.js +2 -0
  355. package/dist/chunks/postprocess.vertex-CtVD6qfW.esm.min.js.map +1 -0
  356. package/dist/chunks/postprocess.vertex-DntzOpKV.esm.js +20 -0
  357. package/dist/chunks/postprocess.vertex-DntzOpKV.esm.js.map +1 -0
  358. package/dist/chunks/rawTexture-BAt5J3G4.esm.min.js +2 -0
  359. package/dist/chunks/rawTexture-BAt5J3G4.esm.min.js.map +1 -0
  360. package/dist/chunks/rawTexture-D0O_yrdQ.esm.js +191 -0
  361. package/dist/chunks/rawTexture-D0O_yrdQ.esm.js.map +1 -0
  362. package/dist/chunks/ray-Bbt37I0I.esm.js +946 -0
  363. package/dist/chunks/ray-Bbt37I0I.esm.js.map +1 -0
  364. package/dist/chunks/ray-OQ0d0a-k.esm.min.js +2 -0
  365. package/dist/chunks/ray-OQ0d0a-k.esm.min.js.map +1 -0
  366. package/dist/chunks/rgbdDecode.fragment-4HjKGwMm.esm.min.js +2 -0
  367. package/dist/chunks/rgbdDecode.fragment-4HjKGwMm.esm.min.js.map +1 -0
  368. package/dist/chunks/rgbdDecode.fragment-CKVGwRZO.esm.js +13 -0
  369. package/dist/chunks/rgbdDecode.fragment-CKVGwRZO.esm.js.map +1 -0
  370. package/dist/chunks/rgbdDecode.fragment-Cn6YVnkB.esm.js +13 -0
  371. package/dist/chunks/rgbdDecode.fragment-Cn6YVnkB.esm.js.map +1 -0
  372. package/dist/chunks/rgbdDecode.fragment-DwcDy8Eo.esm.min.js +2 -0
  373. package/dist/chunks/rgbdDecode.fragment-DwcDy8Eo.esm.min.js.map +1 -0
  374. package/dist/chunks/rgbdEncode.fragment-BUluDIqG.esm.min.js +2 -0
  375. package/dist/chunks/rgbdEncode.fragment-BUluDIqG.esm.min.js.map +1 -0
  376. package/dist/chunks/rgbdEncode.fragment-CEiZq0Qt.esm.js +13 -0
  377. package/dist/chunks/rgbdEncode.fragment-CEiZq0Qt.esm.js.map +1 -0
  378. package/dist/chunks/rgbdEncode.fragment-CY0yYtEl.esm.js +13 -0
  379. package/dist/chunks/rgbdEncode.fragment-CY0yYtEl.esm.js.map +1 -0
  380. package/dist/chunks/rgbdEncode.fragment-DS4_h_Qc.esm.min.js +2 -0
  381. package/dist/chunks/rgbdEncode.fragment-DS4_h_Qc.esm.min.js.map +1 -0
  382. package/dist/chunks/splatFileLoader-C9ykR2nU.esm.js +3387 -0
  383. package/dist/chunks/splatFileLoader-C9ykR2nU.esm.js.map +1 -0
  384. package/dist/chunks/splatFileLoader-fz6lXWf1.esm.min.js +2 -0
  385. package/dist/chunks/splatFileLoader-fz6lXWf1.esm.min.js.map +1 -0
  386. package/dist/chunks/spotLight-BJUVKiS1.esm.min.js +2 -0
  387. package/dist/chunks/spotLight-BJUVKiS1.esm.min.js.map +1 -0
  388. package/dist/chunks/spotLight-DPadbSE2.esm.js +701 -0
  389. package/dist/chunks/spotLight-DPadbSE2.esm.js.map +1 -0
  390. package/dist/chunks/standardMaterial-BFBsF3pv.esm.min.js +2 -0
  391. package/dist/chunks/standardMaterial-BFBsF3pv.esm.min.js.map +1 -0
  392. package/dist/chunks/standardMaterial-eJkfs5dX.esm.js +1807 -0
  393. package/dist/chunks/standardMaterial-eJkfs5dX.esm.js.map +1 -0
  394. package/dist/chunks/stlFileLoader-D-4wZdg7.esm.js +238 -0
  395. package/dist/chunks/stlFileLoader-D-4wZdg7.esm.js.map +1 -0
  396. package/dist/chunks/stlFileLoader-DFdDdaYW.esm.min.js +2 -0
  397. package/dist/chunks/stlFileLoader-DFdDdaYW.esm.min.js.map +1 -0
  398. package/dist/chunks/tgaTextureLoader-84Uwk9uE.esm.min.js +2 -0
  399. package/dist/chunks/tgaTextureLoader-84Uwk9uE.esm.min.js.map +1 -0
  400. package/dist/chunks/tgaTextureLoader-DDAxGDFK.esm.js +349 -0
  401. package/dist/chunks/tgaTextureLoader-DDAxGDFK.esm.js.map +1 -0
  402. package/dist/chunks/thinEngine-CiBi1yBe.esm.min.js +2 -0
  403. package/dist/chunks/thinEngine-CiBi1yBe.esm.min.js.map +1 -0
  404. package/dist/chunks/thinEngine-iDkoF96X.esm.js +3848 -0
  405. package/dist/chunks/thinEngine-iDkoF96X.esm.js.map +1 -0
  406. package/dist/chunks/thinInstanceMesh-DGBYkFXN.esm.js +314 -0
  407. package/dist/chunks/thinInstanceMesh-DGBYkFXN.esm.js.map +1 -0
  408. package/dist/chunks/thinInstanceMesh-MROq1d7v.esm.min.js +2 -0
  409. package/dist/chunks/thinInstanceMesh-MROq1d7v.esm.min.js.map +1 -0
  410. package/dist/chunks/vertexColorMixing-0VXbzCuF.esm.js +428 -0
  411. package/dist/chunks/vertexColorMixing-0VXbzCuF.esm.js.map +1 -0
  412. package/dist/chunks/vertexColorMixing-B3GD6hE2.esm.js +538 -0
  413. package/dist/chunks/vertexColorMixing-B3GD6hE2.esm.js.map +1 -0
  414. package/dist/chunks/vertexColorMixing-ClVYo-h9.esm.min.js +2 -0
  415. package/dist/chunks/vertexColorMixing-ClVYo-h9.esm.min.js.map +1 -0
  416. package/dist/chunks/vertexColorMixing-j0Dix_Wy.esm.min.js +2 -0
  417. package/dist/chunks/vertexColorMixing-j0Dix_Wy.esm.min.js.map +1 -0
  418. package/dist/chunks/webgpuEngine-BLhhEybd.esm.min.js +2 -0
  419. package/dist/chunks/webgpuEngine-BLhhEybd.esm.min.js.map +1 -0
  420. package/dist/chunks/webgpuEngine-Cs5fkngY.esm.js +11533 -0
  421. package/dist/chunks/webgpuEngine-Cs5fkngY.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
@@ -1,1375 +0,0 @@
1
- import { getConfigurationKey } from "../configuration/configuration.js";
2
- import { ModelState } from "../model/viewerModel.js";
3
- import { extendClassWithConfig, deepmerge } from "../helper/index.js";
4
- import { ViewerLabs } from "../labs/viewerLabs.js";
5
- import { getCustomOptimizerByName } from "../optimizer/custom/index.js";
6
- import { Observable } from "@babylonjs/core/Misc/observable.js";
7
- import { SceneOptimizer, SceneOptimizerOptions } from "@babylonjs/core/Misc/sceneOptimizer.js";
8
- import { ArcRotateCamera } from "@babylonjs/core/Cameras/arcRotateCamera.js";
9
- import { Light } from "@babylonjs/core/Lights/light.js";
10
- import { EnvironmentHelper } from "@babylonjs/core/Helpers/environmentHelper.js";
11
- import { Color3, Quaternion, Vector3, Axis, Matrix } from "@babylonjs/core/Maths/math.js";
12
- import { DefaultRenderingPipeline } from "@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js";
13
- import { Animation } from "@babylonjs/core/Animations/index.js";
14
- import { AnimationPropertiesOverride } from "@babylonjs/core/Animations/animationPropertiesOverride.js";
15
- import { RenderTargetTexture } from "@babylonjs/core/Materials/Textures/renderTargetTexture.js";
16
- import { PBRMaterial } from "@babylonjs/core/Materials/PBR/pbrMaterial.js";
17
- import { ShadowLight } from "@babylonjs/core/Lights/shadowLight.js";
18
- import { CubeTexture } from "@babylonjs/core/Materials/Textures/cubeTexture.js";
19
- import { HemisphericLight } from "@babylonjs/core/Lights/hemisphericLight.js";
20
- import { Scalar } from "@babylonjs/core/Maths/math.scalar.js";
21
- import { CreatePlane } from "@babylonjs/core/Meshes/Builders/planeBuilder.js";
22
- import { Tags } from "@babylonjs/core/Misc/tags.js";
23
- import { Scene } from "@babylonjs/core/scene.js";
24
- import { ShadowGenerator } from "@babylonjs/core/Lights/Shadows/shadowGenerator.js";
25
- import { Constants } from "@babylonjs/core/Engines/constants.js";
26
- import "@babylonjs/core/Audio/audioSceneComponent.js";
27
- import "@babylonjs/core/Helpers/sceneHelpers.js";
28
- import "@babylonjs/core/Misc/observable.extensions.js";
29
- var SceneManager = /** @class */ (function () {
30
- function SceneManager(_engine, _configurationContainer, _observablesManager) {
31
- var _this = this;
32
- this._engine = _engine;
33
- this._configurationContainer = _configurationContainer;
34
- this._observablesManager = _observablesManager;
35
- this._white = Color3.White();
36
- this._forceShadowUpdate = false;
37
- this._processShadows = true;
38
- this._groundEnabled = true;
39
- this._groundMirrorEnabled = true;
40
- this._defaultRenderingPipelineEnabled = false;
41
- this._globalConfiguration = {};
42
- this._defaultRenderingPipelineShouldBuild = true;
43
- // default from rendering pipeline
44
- this._bloomEnabled = false;
45
- // default from rendering pipeline
46
- this._fxaaEnabled = false;
47
- this._focusOnModel = function (model) {
48
- var boundingInfo = model.rootMesh.getHierarchyBoundingVectors(true);
49
- var sizeVec = boundingInfo.max.subtract(boundingInfo.min);
50
- var halfSizeVec = sizeVec.scale(0.5);
51
- var center = boundingInfo.min.add(halfSizeVec);
52
- _this.camera.setTarget(center);
53
- _this.camera.alpha = (_this._globalConfiguration.camera && _this._globalConfiguration.camera.alpha) || _this.camera.alpha;
54
- _this.camera.beta = (_this._globalConfiguration.camera && _this._globalConfiguration.camera.beta) || _this.camera.beta;
55
- _this.camera.radius = (_this._globalConfiguration.camera && _this._globalConfiguration.camera.radius) || _this.camera.radius;
56
- var sceneDiagonalLenght = sizeVec.length();
57
- if (isFinite(sceneDiagonalLenght)) {
58
- _this.camera.upperRadiusLimit = sceneDiagonalLenght * 4;
59
- }
60
- if (_this._configurationContainer.configuration) {
61
- _this._configureEnvironment(_this._configurationContainer.configuration.skybox, _this._configurationContainer.configuration.ground);
62
- }
63
- /*this.scene.lights.filter(light => light instanceof ShadowLight).forEach(light => {
64
- // casting ais safe, due to the constraints tested before
65
- (<ShadowLight>light).setDirectionToTarget(center);
66
- });*/
67
- };
68
- this._cameraBehaviorMapping = {};
69
- this.models = [];
70
- this.onCameraConfiguredObservable = new Observable();
71
- this.onLightsConfiguredObservable = new Observable();
72
- this.onModelsConfiguredObservable = new Observable();
73
- this.onSceneConfiguredObservable = new Observable();
74
- this.onSceneInitObservable = new Observable(undefined, true);
75
- this.onSceneOptimizerConfiguredObservable = new Observable();
76
- this.onEnvironmentConfiguredObservable = new Observable();
77
- this.onVRConfiguredObservable = new Observable();
78
- //this._viewer.onEngineInitObservable.add(() => {
79
- this._handleHardwareLimitations();
80
- //});
81
- this.onSceneInitObservable.add(function (scene) {
82
- _this.scene.animationPropertiesOverride = _this.scene.animationPropertiesOverride || new AnimationPropertiesOverride();
83
- _this.labs = new ViewerLabs(scene);
84
- var updateShadows = function () {
85
- for (var _i = 0, _a = _this.scene.lights; _i < _a.length; _i++) {
86
- var light = _a[_i];
87
- var generators = light.getShadowGenerators();
88
- if (generators) {
89
- // Processing shadows if animates
90
- var iterator = generators.values();
91
- for (var key = iterator.next(); key.done !== true; key = iterator.next()) {
92
- var generator = key.value;
93
- var shadowMap = generator.getShadowMap();
94
- if (shadowMap) {
95
- shadowMap.refreshRate = RenderTargetTexture.REFRESHRATE_RENDER_ONCE;
96
- }
97
- }
98
- }
99
- }
100
- };
101
- scene.registerBeforeRender(function () {
102
- if (_this._forceShadowUpdate || (scene.animatables && scene.animatables.length > 0)) {
103
- // make sure all models are loaded
104
- updateShadows();
105
- _this._forceShadowUpdate = false;
106
- }
107
- else if (!_this.models.every(function (model) {
108
- if (!model.shadowsRenderedAfterLoad) {
109
- model.shadowsRenderedAfterLoad = true;
110
- return false;
111
- }
112
- return model.state === ModelState.COMPLETE && !model.currentAnimation;
113
- })) {
114
- updateShadows();
115
- }
116
- });
117
- return _this._observablesManager && _this._observablesManager.onSceneInitObservable.notifyObserversWithPromise(_this.scene);
118
- });
119
- if (this._observablesManager) {
120
- this._observablesManager.onModelLoadedObservable.add(function (model) {
121
- for (var _i = 0, _a = _this.scene.lights; _i < _a.length; _i++) {
122
- var light = _a[_i];
123
- var generators = light.getShadowGenerators();
124
- if (generators) {
125
- // Processing shadows if animates
126
- var iterator = generators.values();
127
- for (var key = iterator.next(); key.done !== true; key = iterator.next()) {
128
- var generator = key.value;
129
- var shadowMap = generator.getShadowMap();
130
- if (shadowMap) {
131
- shadowMap.refreshRate = RenderTargetTexture.REFRESHRATE_RENDER_ONCE;
132
- }
133
- }
134
- }
135
- }
136
- _this._focusOnModel(model);
137
- });
138
- this._observablesManager.onModelAddedObservable.add(function (model) {
139
- _this.models.push(model);
140
- });
141
- this._observablesManager.onModelRemovedObservable.add(function (model) {
142
- _this.models.splice(_this.models.indexOf(model), 1);
143
- });
144
- }
145
- }
146
- Object.defineProperty(SceneManager.prototype, "defaultRenderingPipeline", {
147
- get: function () {
148
- return this._defaultRenderingPipeline;
149
- },
150
- enumerable: false,
151
- configurable: true
152
- });
153
- Object.defineProperty(SceneManager.prototype, "vrHelper", {
154
- get: function () {
155
- return this._vrHelper;
156
- },
157
- enumerable: false,
158
- configurable: true
159
- });
160
- Object.defineProperty(SceneManager.prototype, "isHdrSupported", {
161
- /**
162
- * Returns a boolean representing HDR support
163
- */
164
- get: function () {
165
- return this._hdrSupport;
166
- },
167
- enumerable: false,
168
- configurable: true
169
- });
170
- Object.defineProperty(SceneManager.prototype, "mainColor", {
171
- /**
172
- * Return the main color defined in the configuration.
173
- */
174
- get: function () {
175
- return this._configurationContainer.mainColor;
176
- },
177
- enumerable: false,
178
- configurable: true
179
- });
180
- Object.defineProperty(SceneManager.prototype, "reflectionColor", {
181
- get: function () {
182
- return this._configurationContainer.reflectionColor;
183
- },
184
- enumerable: false,
185
- configurable: true
186
- });
187
- Object.defineProperty(SceneManager.prototype, "animationBlendingEnabled", {
188
- get: function () {
189
- return this.scene && this.scene.animationPropertiesOverride.enableBlending;
190
- },
191
- set: function (value) {
192
- this.scene.animationPropertiesOverride.enableBlending = value;
193
- },
194
- enumerable: false,
195
- configurable: true
196
- });
197
- Object.defineProperty(SceneManager.prototype, "observablesManager", {
198
- get: function () {
199
- return this._observablesManager;
200
- },
201
- enumerable: false,
202
- configurable: true
203
- });
204
- Object.defineProperty(SceneManager.prototype, "processShadows", {
205
- /**
206
- * The flag defining whether shadows are rendered constantly or once.
207
- */
208
- get: function () {
209
- return this._processShadows;
210
- },
211
- /**
212
- * Should shadows be rendered every frame, or only once and stop.
213
- * This can be used to optimize a scene.
214
- *
215
- * Not that the shadows will NOT disapear but will remain in place.
216
- * @param process if true shadows will be updated once every frame. if false they will stop being updated.
217
- */
218
- set: function (process) {
219
- var refreshType = process ? RenderTargetTexture.REFRESHRATE_RENDER_ONEVERYFRAME : RenderTargetTexture.REFRESHRATE_RENDER_ONCE;
220
- for (var _i = 0, _a = this.scene.lights; _i < _a.length; _i++) {
221
- var light = _a[_i];
222
- var generators = light.getShadowGenerators();
223
- if (generators) {
224
- var iterator = generators.values();
225
- for (var key = iterator.next(); key.done !== true; key = iterator.next()) {
226
- var generator = key.value;
227
- var shadowMap = generator.getShadowMap();
228
- if (shadowMap) {
229
- shadowMap.refreshRate = refreshType;
230
- }
231
- }
232
- }
233
- }
234
- this._processShadows = process;
235
- },
236
- enumerable: false,
237
- configurable: true
238
- });
239
- Object.defineProperty(SceneManager.prototype, "groundEnabled", {
240
- get: function () {
241
- return this._groundEnabled;
242
- },
243
- set: function (newValue) {
244
- if (newValue === this._groundEnabled) {
245
- return;
246
- }
247
- this._groundEnabled = newValue;
248
- if (this.environmentHelper && this.environmentHelper.ground) {
249
- this.environmentHelper.ground.setEnabled(this._groundEnabled);
250
- }
251
- },
252
- enumerable: false,
253
- configurable: true
254
- });
255
- Object.defineProperty(SceneManager.prototype, "groundMirrorEnabled", {
256
- /**
257
- * gets whether the reflection is disabled.
258
- */
259
- get: function () {
260
- return this._groundMirrorEnabled;
261
- },
262
- /**
263
- * sets whether the reflection is disabled.
264
- */
265
- set: function (value) {
266
- if (this._groundMirrorEnabled === value) {
267
- return;
268
- }
269
- this._groundMirrorEnabled = value;
270
- if (this.environmentHelper && this.environmentHelper.groundMaterial && this.environmentHelper.groundMirror) {
271
- if (!value) {
272
- this.environmentHelper.groundMaterial.reflectionTexture = null;
273
- }
274
- else {
275
- this.environmentHelper.groundMaterial.reflectionTexture = this.environmentHelper.groundMirror;
276
- }
277
- }
278
- },
279
- enumerable: false,
280
- configurable: true
281
- });
282
- Object.defineProperty(SceneManager.prototype, "defaultRenderingPipelineEnabled", {
283
- get: function () {
284
- return this._defaultRenderingPipelineEnabled;
285
- },
286
- set: function (value) {
287
- if (value === this._defaultRenderingPipelineEnabled) {
288
- return;
289
- }
290
- this._defaultRenderingPipelineEnabled = value;
291
- this._rebuildPostprocesses();
292
- if (this._defaultRenderingPipeline) {
293
- this._defaultRenderingPipelineShouldBuild = false;
294
- this._defaultRenderingPipeline.prepare();
295
- this.scene.imageProcessingConfiguration.applyByPostProcess = true;
296
- }
297
- },
298
- enumerable: false,
299
- configurable: true
300
- });
301
- /**
302
- * Sets the engine flags to unlock all babylon features.
303
- * Can also be configured using the scene.flags configuration object
304
- */
305
- SceneManager.prototype.unlockBabylonFeatures = function () {
306
- this.scene.shadowsEnabled = true;
307
- this.scene.particlesEnabled = true;
308
- this.scene.postProcessesEnabled = true;
309
- this.scene.collisionsEnabled = true;
310
- this.scene.lightsEnabled = true;
311
- this.scene.texturesEnabled = true;
312
- this.scene.lensFlaresEnabled = true;
313
- this.scene.proceduralTexturesEnabled = true;
314
- this.scene.renderTargetsEnabled = true;
315
- this.scene.spritesEnabled = true;
316
- this.scene.skeletonsEnabled = true;
317
- this.scene.audioEnabled = true;
318
- };
319
- /**
320
- * initialize the scene. Calling this function again will dispose the old scene, if exists.
321
- * @param sceneConfiguration the configuration of the scene
322
- * @returns a promise that resolves when the scene is ready
323
- */
324
- SceneManager.prototype.initScene = function (sceneConfiguration) {
325
- if (sceneConfiguration === void 0) { sceneConfiguration = {}; }
326
- // if the scene exists, dispose it.
327
- if (this.scene) {
328
- this.scene.dispose();
329
- }
330
- // create a new scene
331
- this.scene = new Scene(this._engine);
332
- this._configurationContainer.scene = this.scene;
333
- // set a default PBR material
334
- if (!sceneConfiguration.defaultMaterial) {
335
- var defaultMaterial = new PBRMaterial("defaultMaterial", this.scene);
336
- defaultMaterial.reflectivityColor = new Color3(0.1, 0.1, 0.1);
337
- defaultMaterial.microSurface = 0.6;
338
- if (this.scene.defaultMaterial) {
339
- this.scene.defaultMaterial.dispose();
340
- }
341
- this.scene.defaultMaterial = defaultMaterial;
342
- }
343
- this.scene.animationPropertiesOverride = new AnimationPropertiesOverride();
344
- Animation.AllowMatricesInterpolation = true;
345
- /*if (sceneConfiguration.glow) {
346
- let options: Partial<IGlowLayerOptions> = {
347
- mainTextureFixedSize: 512
348
- };
349
- if (typeof sceneConfiguration.glow === 'object') {
350
- options = sceneConfiguration.glow
351
- }
352
- var gl = new GlowLayer("glow", this.scene, options);
353
- }*/
354
- return this.onSceneInitObservable.notifyObserversWithPromise(this.scene);
355
- };
356
- SceneManager.prototype.clearScene = function (clearModels, clearLights) {
357
- if (clearModels === void 0) { clearModels = true; }
358
- if (clearLights === void 0) { clearLights = false; }
359
- if (clearModels) {
360
- this.models.forEach(function (m) { return m.dispose(); });
361
- this.models.length = 0;
362
- }
363
- if (clearLights) {
364
- this.scene.lights.forEach(function (l) { return l.dispose(); });
365
- }
366
- };
367
- /**
368
- * This will update the scene's configuration, including camera, lights, environment.
369
- * @param newConfiguration the delta that should be configured. This includes only the changes
370
- */
371
- SceneManager.prototype.updateConfiguration = function (newConfiguration) {
372
- var _this = this;
373
- if (this._configurationContainer) {
374
- this._globalConfiguration = this._configurationContainer.configuration;
375
- }
376
- else {
377
- this._globalConfiguration = newConfiguration;
378
- }
379
- // update scene configuration
380
- if (newConfiguration.scene) {
381
- this._configureScene(newConfiguration.scene);
382
- }
383
- // optimizer
384
- if (newConfiguration.optimizer !== undefined) {
385
- this._configureOptimizer(newConfiguration.optimizer);
386
- }
387
- // configure model
388
- /*if (newConfiguration.model && typeof newConfiguration.model === 'object') {
389
- this._configureModel(newConfiguration.model);
390
- }*/
391
- // lights
392
- this._configureLights(newConfiguration.lights);
393
- // environment
394
- if (newConfiguration.skybox !== undefined || newConfiguration.ground !== undefined) {
395
- this._configureEnvironment(newConfiguration.skybox, newConfiguration.ground);
396
- }
397
- // camera
398
- this._configureCamera(newConfiguration.camera);
399
- if (newConfiguration.environmentMap !== undefined) {
400
- this._configureEnvironmentMap(newConfiguration.environmentMap);
401
- }
402
- if (newConfiguration.vr !== undefined) {
403
- this._configureVR(newConfiguration.vr);
404
- }
405
- if (newConfiguration.lab) {
406
- // rendering pipelines
407
- if (newConfiguration.lab.defaultRenderingPipelines) {
408
- var pipelineConfig = newConfiguration.lab.defaultRenderingPipelines;
409
- if (typeof pipelineConfig === "boolean") {
410
- this.defaultRenderingPipelineEnabled = pipelineConfig;
411
- }
412
- else {
413
- this.defaultRenderingPipelineEnabled = true;
414
- }
415
- }
416
- if (this.environmentHelper && newConfiguration.lab.environmentMainColor) {
417
- var mainColor = new Color3(newConfiguration.lab.environmentMainColor.r, newConfiguration.lab.environmentMainColor.g, newConfiguration.lab.environmentMainColor.b);
418
- this.environmentHelper.setMainColor(mainColor);
419
- }
420
- if (newConfiguration.lab.globalLightRotation !== undefined) {
421
- // rotate all lights that are shadow lights
422
- this.scene.lights
423
- .filter(function (light) { return light instanceof ShadowLight; })
424
- .forEach(function (light) {
425
- // casting and '!' are safe, due to the constraints tested before
426
- _this.labs.rotateShadowLight(light, newConfiguration.lab.globalLightRotation);
427
- });
428
- this._forceShadowUpdate = true;
429
- }
430
- }
431
- if (this._defaultRenderingPipeline && this._defaultRenderingPipeline.imageProcessing) {
432
- this._defaultRenderingPipeline.imageProcessing.fromLinearSpace = true;
433
- }
434
- if (this._defaultRenderingPipelineShouldBuild && this._defaultRenderingPipeline) {
435
- this._defaultRenderingPipelineShouldBuild = false;
436
- this._defaultRenderingPipeline.prepare();
437
- }
438
- };
439
- SceneManager.prototype._rebuildPostprocesses = function (configuration) {
440
- if (!this._defaultRenderingPipelineEnabled || !getConfigurationKey("scene.imageProcessingConfiguration.isEnabled", this._globalConfiguration)) {
441
- if (this._defaultRenderingPipeline) {
442
- this._defaultRenderingPipeline.dispose();
443
- this._defaultRenderingPipeline = null;
444
- this.scene.autoClearDepthAndStencil = true;
445
- this.scene.autoClear = true;
446
- this.scene.imageProcessingConfiguration.applyByPostProcess = false;
447
- }
448
- return;
449
- }
450
- var pipelineConfig = configuration || (this._globalConfiguration.lab && this._globalConfiguration.lab.defaultRenderingPipelines);
451
- if (pipelineConfig) {
452
- if (!this._defaultRenderingPipeline) {
453
- // Create pipeline in manual mode to avoid triggering multiple shader compilations
454
- this._defaultRenderingPipeline = new DefaultRenderingPipeline("default rendering pipeline", this._hdrSupport, this.scene, [this.camera], false);
455
- }
456
- this.scene.autoClear = false;
457
- this.scene.autoClearDepthAndStencil = false;
458
- this._defaultRenderingPipelineShouldBuild = true;
459
- var bloomEnabled = this._bloomEnabled;
460
- if (typeof pipelineConfig !== "boolean") {
461
- extendClassWithConfig(this._defaultRenderingPipeline, pipelineConfig);
462
- this._bloomEnabled = !!pipelineConfig.bloomEnabled;
463
- this._fxaaEnabled = !!pipelineConfig.fxaaEnabled;
464
- bloomEnabled = this._bloomEnabled && pipelineConfig.bloomWeight !== undefined && pipelineConfig.bloomWeight > 0;
465
- this._defaultRenderingPipeline.bloomWeight = (pipelineConfig.bloomWeight !== undefined && pipelineConfig.bloomWeight) || this._defaultRenderingPipeline.bloomWeight;
466
- }
467
- this._defaultRenderingPipeline.bloomEnabled = bloomEnabled;
468
- this._defaultRenderingPipeline.fxaaEnabled = this.fxaaEnabled;
469
- }
470
- };
471
- Object.defineProperty(SceneManager.prototype, "bloomEnabled", {
472
- get: function () {
473
- return this._bloomEnabled;
474
- },
475
- set: function (value) {
476
- if (this._bloomEnabled === value) {
477
- return;
478
- }
479
- this._bloomEnabled = value;
480
- this._rebuildPostprocesses();
481
- if (this._defaultRenderingPipeline) {
482
- this._defaultRenderingPipelineShouldBuild = false;
483
- this._defaultRenderingPipeline.prepare();
484
- this.scene.imageProcessingConfiguration.applyByPostProcess = true;
485
- }
486
- },
487
- enumerable: false,
488
- configurable: true
489
- });
490
- Object.defineProperty(SceneManager.prototype, "fxaaEnabled", {
491
- get: function () {
492
- return this._fxaaEnabled;
493
- },
494
- set: function (value) {
495
- if (this._fxaaEnabled === value) {
496
- return;
497
- }
498
- this._fxaaEnabled = value;
499
- this._rebuildPostprocesses();
500
- if (this._defaultRenderingPipeline) {
501
- this._defaultRenderingPipelineShouldBuild = false;
502
- this._defaultRenderingPipeline.prepare();
503
- this.scene.imageProcessingConfiguration.applyByPostProcess = true;
504
- }
505
- },
506
- enumerable: false,
507
- configurable: true
508
- });
509
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
510
- SceneManager.prototype.setDefaultMaterial = function (sceneConfig) { };
511
- /**
512
- * internally configure the scene using the provided configuration.
513
- * The scene will not be recreated, but just updated.
514
- * @param sceneConfig the (new) scene configuration
515
- */
516
- SceneManager.prototype._configureScene = function (sceneConfig) {
517
- // sanity check!
518
- if (!this.scene) {
519
- return;
520
- }
521
- var cc = sceneConfig.clearColor;
522
- var oldcc = this.scene.clearColor;
523
- if (cc) {
524
- if (cc.r !== undefined) {
525
- oldcc.r = cc.r;
526
- }
527
- if (cc.g !== undefined) {
528
- oldcc.g = cc.g;
529
- }
530
- if (cc.b !== undefined) {
531
- oldcc.b = cc.b;
532
- }
533
- if (cc.a !== undefined) {
534
- oldcc.a = cc.a;
535
- }
536
- }
537
- if (sceneConfig.assetsRootURL) {
538
- this._assetsRootURL = sceneConfig.assetsRootURL;
539
- }
540
- // image processing configuration - optional.
541
- if (sceneConfig.imageProcessingConfiguration) {
542
- extendClassWithConfig(this.scene.imageProcessingConfiguration, sceneConfig.imageProcessingConfiguration);
543
- }
544
- //animation properties override
545
- if (sceneConfig.animationPropertiesOverride) {
546
- extendClassWithConfig(this.scene.animationPropertiesOverride, sceneConfig.animationPropertiesOverride);
547
- }
548
- if (sceneConfig.environmentTexture) {
549
- if (!(this.scene.environmentTexture && this.scene.environmentTexture.url === sceneConfig.environmentTexture)) {
550
- if (this.scene.environmentTexture && this.scene.environmentTexture.dispose) {
551
- this.scene.environmentTexture.dispose();
552
- }
553
- var environmentTexture = CubeTexture.CreateFromPrefilteredData(sceneConfig.environmentTexture, this.scene);
554
- this.scene.environmentTexture = environmentTexture;
555
- }
556
- }
557
- if (sceneConfig.debug === true) {
558
- this.scene.debugLayer.show();
559
- }
560
- else if (sceneConfig.debug === false) {
561
- if (this.scene.debugLayer.isVisible()) {
562
- this.scene.debugLayer.hide();
563
- }
564
- }
565
- if (sceneConfig.disableHdr) {
566
- this._handleHardwareLimitations(false);
567
- }
568
- else {
569
- this._handleHardwareLimitations(true);
570
- }
571
- if (sceneConfig.renderInBackground !== undefined) {
572
- this._engine.renderEvenInBackground = !!sceneConfig.renderInBackground;
573
- }
574
- var canvas = this._engine.getInputElement();
575
- if (canvas) {
576
- if (this.camera && sceneConfig.disableCameraControl) {
577
- this.camera.detachControl();
578
- }
579
- else if (this.camera && sceneConfig.disableCameraControl === false) {
580
- this.camera.attachControl();
581
- }
582
- }
583
- this.setDefaultMaterial(sceneConfig);
584
- if (sceneConfig.flags) {
585
- extendClassWithConfig(this.scene, sceneConfig.flags);
586
- }
587
- this.onSceneConfiguredObservable.notifyObservers({
588
- sceneManager: this,
589
- object: this.scene,
590
- newConfiguration: sceneConfig,
591
- });
592
- };
593
- /**
594
- * Configure the scene optimizer.
595
- * The existing scene optimizer will be disposed and a new one will be created.
596
- * @param optimizerConfig the (new) optimizer configuration
597
- */
598
- SceneManager.prototype._configureOptimizer = function (optimizerConfig) {
599
- var _this = this;
600
- if (typeof optimizerConfig === "boolean") {
601
- if (this.sceneOptimizer) {
602
- this.sceneOptimizer.stop();
603
- this.sceneOptimizer.dispose();
604
- delete this.sceneOptimizer;
605
- }
606
- if (optimizerConfig) {
607
- this.sceneOptimizer = new SceneOptimizer(this.scene);
608
- this.sceneOptimizer.start();
609
- }
610
- }
611
- else {
612
- var optimizerOptions = new SceneOptimizerOptions(optimizerConfig.targetFrameRate, optimizerConfig.trackerDuration);
613
- // check for degradation
614
- if (optimizerConfig.degradation) {
615
- switch (optimizerConfig.degradation) {
616
- case "low":
617
- optimizerOptions = SceneOptimizerOptions.LowDegradationAllowed(optimizerConfig.targetFrameRate);
618
- break;
619
- case "moderate":
620
- optimizerOptions = SceneOptimizerOptions.ModerateDegradationAllowed(optimizerConfig.targetFrameRate);
621
- break;
622
- case "hight":
623
- optimizerOptions = SceneOptimizerOptions.HighDegradationAllowed(optimizerConfig.targetFrameRate);
624
- break;
625
- }
626
- }
627
- if (this.sceneOptimizer) {
628
- this.sceneOptimizer.stop();
629
- this.sceneOptimizer.dispose();
630
- }
631
- if (optimizerConfig.custom) {
632
- var customOptimizer_1 = getCustomOptimizerByName(optimizerConfig.custom, optimizerConfig.improvementMode);
633
- if (customOptimizer_1) {
634
- optimizerOptions.addCustomOptimization(function () {
635
- return customOptimizer_1(_this);
636
- }, function () {
637
- return "Babylon Viewer ".concat(optimizerConfig.custom, " custom optimization");
638
- });
639
- }
640
- }
641
- this.sceneOptimizer = new SceneOptimizer(this.scene, optimizerOptions, optimizerConfig.autoGeneratePriorities, optimizerConfig.improvementMode);
642
- this.sceneOptimizer.start();
643
- }
644
- this.onSceneOptimizerConfiguredObservable.notifyObservers({
645
- sceneManager: this,
646
- object: this.sceneOptimizer,
647
- newConfiguration: optimizerConfig,
648
- });
649
- };
650
- /**
651
- * configure all models using the configuration.
652
- * @param modelConfiguration the configuration to use to reconfigure the models
653
- */
654
- /*protected _configureModel(modelConfiguration: Partial<IModelConfiguration>) {
655
- this.models.forEach(model => {
656
- model.updateConfiguration(modelConfiguration);
657
- });
658
-
659
- this.onModelsConfiguredObservable.notifyObservers({
660
- sceneManager: this,
661
- object: this.models,
662
- newConfiguration: modelConfiguration
663
- });
664
- }*/
665
- SceneManager.prototype._configureVR = function (vrConfig) {
666
- var _this = this;
667
- if (vrConfig.disabled) {
668
- if (this._vrHelper) {
669
- if (this._vrHelper.isInVRMode) {
670
- this._vrHelper.exitVR();
671
- }
672
- this._vrHelper.dispose();
673
- this._vrHelper = undefined;
674
- }
675
- return;
676
- }
677
- var vrOptions = deepmerge({
678
- useCustomVRButton: true,
679
- createDeviceOrientationCamera: false,
680
- trackPosition: true,
681
- }, vrConfig.vrOptions || {});
682
- this._vrHelper = this.scene.createDefaultVRExperience(vrOptions);
683
- if (!vrConfig.disableInteractions) {
684
- this._vrHelper.enableInteractions();
685
- }
686
- if (!vrConfig.disableTeleportation) {
687
- var floorMeshName = vrConfig.overrideFloorMeshName || "BackgroundPlane";
688
- this._vrHelper.enableTeleportation({
689
- floorMeshName: floorMeshName,
690
- });
691
- }
692
- this._vrHelper.onEnteringVRObservable.add(function () {
693
- if (_this._observablesManager) {
694
- _this._observablesManager.onEnteringVRObservable.notifyObservers(_this);
695
- }
696
- });
697
- this._vrHelper.onExitingVRObservable.add(function () {
698
- if (_this._observablesManager) {
699
- _this._observablesManager.onExitingVRObservable.notifyObservers(_this);
700
- }
701
- });
702
- this.onVRConfiguredObservable.notifyObservers({
703
- sceneManager: this,
704
- object: this._vrHelper,
705
- newConfiguration: vrConfig,
706
- });
707
- };
708
- SceneManager.prototype._configureEnvironmentMap = function (environmentMapConfiguration) {
709
- if (environmentMapConfiguration.texture) {
710
- this.scene.environmentTexture = new CubeTexture(this._getAssetUrl(environmentMapConfiguration.texture), this.scene);
711
- }
712
- //sanity check
713
- if (this.scene.environmentTexture) {
714
- var rotatquatRotationionY = Quaternion.RotationAxis(Axis.Y, environmentMapConfiguration.rotationY || 0);
715
- Matrix.FromQuaternionToRef(rotatquatRotationionY, this.scene.environmentTexture.getReflectionTextureMatrix());
716
- }
717
- // process mainColor changes:
718
- if (environmentMapConfiguration.mainColor) {
719
- this._configurationContainer.mainColor = this.mainColor || Color3.White();
720
- var mc = environmentMapConfiguration.mainColor;
721
- if (mc.r !== undefined) {
722
- this.mainColor.r = mc.r;
723
- }
724
- if (mc.g !== undefined) {
725
- this.mainColor.g = mc.g;
726
- }
727
- if (mc.b !== undefined) {
728
- this.mainColor.b = mc.b;
729
- }
730
- this.reflectionColor.copyFrom(this.mainColor);
731
- var environmentTint = getConfigurationKey("environmentMap.tintLevel", this._globalConfiguration) || 0;
732
- // reflection color
733
- this.reflectionColor.toLinearSpaceToRef(this.reflectionColor);
734
- this.reflectionColor.scaleToRef(1 / this.scene.imageProcessingConfiguration.exposure, this.reflectionColor);
735
- var tmpColor3 = Color3.Lerp(this._white, this.reflectionColor, environmentTint);
736
- this.reflectionColor.copyFrom(tmpColor3);
737
- //update the environment, if exists
738
- if (this.environmentHelper) {
739
- if (this.environmentHelper.groundMaterial) {
740
- this.environmentHelper.groundMaterial._perceptualColor = this.mainColor;
741
- }
742
- if (this.environmentHelper.skyboxMaterial) {
743
- this.environmentHelper.skyboxMaterial._perceptualColor = this.mainColor;
744
- }
745
- }
746
- }
747
- };
748
- /**
749
- * (Re) configure the camera. The camera will only be created once and from this point will only be reconfigured.
750
- * @param cameraConfig the new camera configuration
751
- */
752
- SceneManager.prototype._configureCamera = function (cameraConfig) {
753
- var _this = this;
754
- if (cameraConfig === void 0) { cameraConfig = {}; }
755
- if (!this.scene.activeCamera) {
756
- // Inline scene.createDefaultCamera to reduce file size
757
- // Dispose existing camera in replace mode.
758
- if (this.scene.activeCamera) {
759
- this.scene.activeCamera.dispose();
760
- this.scene.activeCamera = null;
761
- }
762
- // Camera
763
- if (!this.scene.activeCamera) {
764
- var worldExtends = this.scene.getWorldExtends();
765
- var worldSize = worldExtends.max.subtract(worldExtends.min);
766
- var worldCenter = worldExtends.min.add(worldSize.scale(0.5));
767
- var radius = worldSize.length() * 1.5;
768
- // empty scene scenario!
769
- if (!isFinite(radius)) {
770
- radius = 1;
771
- worldCenter.copyFromFloats(0, 0, 0);
772
- }
773
- var arcRotateCamera = new ArcRotateCamera("default camera", -(Math.PI / 2), Math.PI / 2, radius, worldCenter, this.scene);
774
- arcRotateCamera.lowerRadiusLimit = radius * 0.01;
775
- arcRotateCamera.wheelPrecision = 100 / radius;
776
- var camera = arcRotateCamera;
777
- camera.minZ = radius * 0.01;
778
- camera.maxZ = radius * 1000;
779
- camera.speed = radius * 0.2;
780
- this.scene.activeCamera = camera;
781
- }
782
- var canvas = this.scene.getEngine().getInputElement();
783
- if (canvas) {
784
- this.scene.activeCamera.attachControl();
785
- }
786
- this.camera = this.scene.activeCamera;
787
- this.camera.setTarget(Vector3.Zero());
788
- }
789
- if (!this.camera) {
790
- this.camera = this.scene.activeCamera;
791
- }
792
- if (cameraConfig.position) {
793
- var newPosition = this.camera.position.clone();
794
- extendClassWithConfig(newPosition, cameraConfig.position);
795
- this.camera.setPosition(newPosition);
796
- }
797
- if (cameraConfig.target) {
798
- var newTarget = this.camera.target.clone();
799
- extendClassWithConfig(newTarget, cameraConfig.target);
800
- this.camera.setTarget(newTarget);
801
- } /*else if (this.models.length && !cameraConfig.disableAutoFocus) {
802
- this._focusOnModel(this.models[0]);
803
- }*/
804
- if (cameraConfig.rotation) {
805
- this.camera.rotationQuaternion = new Quaternion(cameraConfig.rotation.x || 0, cameraConfig.rotation.y || 0, cameraConfig.rotation.z || 0, cameraConfig.rotation.w || 0);
806
- }
807
- if (cameraConfig.behaviors) {
808
- for (var name_1 in cameraConfig.behaviors) {
809
- if (cameraConfig.behaviors[name_1] !== undefined) {
810
- this._setCameraBehavior(name_1, cameraConfig.behaviors[name_1]);
811
- }
812
- }
813
- }
814
- var sceneExtends = this.scene.getWorldExtends(function (mesh) {
815
- return !_this.environmentHelper || (mesh !== _this.environmentHelper.ground && mesh !== _this.environmentHelper.rootMesh && mesh !== _this.environmentHelper.skybox);
816
- });
817
- var sceneDiagonal = sceneExtends.max.subtract(sceneExtends.min);
818
- var sceneDiagonalLength = sceneDiagonal.length();
819
- if (isFinite(sceneDiagonalLength)) {
820
- this.camera.upperRadiusLimit = sceneDiagonalLength * 4;
821
- }
822
- // sanity check!
823
- if (this.scene.imageProcessingConfiguration) {
824
- this.scene.imageProcessingConfiguration.colorCurvesEnabled = true;
825
- this.scene.imageProcessingConfiguration.vignetteEnabled = true;
826
- this.scene.imageProcessingConfiguration.toneMappingEnabled = !!getConfigurationKey("camera.toneMappingEnabled", this._globalConfiguration);
827
- }
828
- extendClassWithConfig(this.camera, cameraConfig);
829
- this.onCameraConfiguredObservable.notifyObservers({
830
- sceneManager: this,
831
- object: this.camera,
832
- newConfiguration: cameraConfig,
833
- });
834
- };
835
- SceneManager.prototype._configureEnvironment = function (skyboxConifguration, groundConfiguration) {
836
- var _this = this;
837
- if (!skyboxConifguration && !groundConfiguration) {
838
- if (this.environmentHelper) {
839
- this.environmentHelper.dispose();
840
- this.environmentHelper = undefined;
841
- }
842
- }
843
- else {
844
- var options = {
845
- createGround: !!groundConfiguration && this._groundEnabled,
846
- createSkybox: !!skyboxConifguration,
847
- setupImageProcessing: false, // will be done at the scene level!,
848
- };
849
- // will that cause problems with model ground configuration?
850
- /*if (model) {
851
- const boundingInfo = model.rootMesh.getHierarchyBoundingVectors(true);
852
- const sizeVec = boundingInfo.max.subtract(boundingInfo.min);
853
- const halfSizeVec = sizeVec.scale(0.5);
854
- const center = boundingInfo.min.add(halfSizeVec);
855
- options.groundYBias = -center.y;
856
- }*/
857
- if (groundConfiguration) {
858
- var groundConfig_1 = typeof groundConfiguration === "boolean" ? {} : groundConfiguration;
859
- var groundSize = groundConfig_1.size || (typeof skyboxConifguration === "object" && skyboxConifguration.scale);
860
- if (groundSize) {
861
- options.groundSize = groundSize;
862
- }
863
- options.enableGroundShadow = groundConfiguration === true || groundConfig_1.receiveShadows;
864
- if (groundConfig_1.shadowLevel !== undefined) {
865
- options.groundShadowLevel = groundConfig_1.shadowLevel;
866
- }
867
- options.enableGroundMirror = !!groundConfig_1.mirror && this.groundMirrorEnabled;
868
- if (groundConfig_1.texture) {
869
- options.groundTexture = this._getAssetUrl(groundConfig_1.texture);
870
- }
871
- if (groundConfig_1.color) {
872
- options.groundColor = new Color3(groundConfig_1.color.r, groundConfig_1.color.g, groundConfig_1.color.b);
873
- }
874
- if (groundConfig_1.opacity !== undefined) {
875
- options.groundOpacity = groundConfig_1.opacity;
876
- }
877
- if (groundConfig_1.mirror) {
878
- options.enableGroundMirror = true;
879
- // to prevent undefines
880
- if (typeof groundConfig_1.mirror === "object") {
881
- if (groundConfig_1.mirror.amount !== undefined) {
882
- options.groundMirrorAmount = groundConfig_1.mirror.amount;
883
- }
884
- if (groundConfig_1.mirror.sizeRatio !== undefined) {
885
- options.groundMirrorSizeRatio = groundConfig_1.mirror.sizeRatio;
886
- }
887
- if (groundConfig_1.mirror.blurKernel !== undefined) {
888
- options.groundMirrorBlurKernel = groundConfig_1.mirror.blurKernel;
889
- }
890
- if (groundConfig_1.mirror.fresnelWeight !== undefined) {
891
- options.groundMirrorFresnelWeight = groundConfig_1.mirror.fresnelWeight;
892
- }
893
- if (groundConfig_1.mirror.fallOffDistance !== undefined) {
894
- options.groundMirrorFallOffDistance = groundConfig_1.mirror.fallOffDistance;
895
- }
896
- if (this._defaultPipelineTextureType !== undefined) {
897
- options.groundMirrorTextureType = this._defaultPipelineTextureType;
898
- }
899
- }
900
- }
901
- }
902
- var postInitSkyboxMaterial = false;
903
- if (skyboxConifguration) {
904
- var conf = skyboxConifguration === true ? {} : skyboxConifguration;
905
- if (conf.material && conf.material.imageProcessingConfiguration) {
906
- options.setupImageProcessing = false; // will be configured later manually.
907
- }
908
- var skyboxSize = conf.scale;
909
- if (skyboxSize) {
910
- options.skyboxSize = skyboxSize;
911
- }
912
- options.sizeAuto = !options.skyboxSize;
913
- if (conf.color) {
914
- options.skyboxColor = new Color3(conf.color.r, conf.color.g, conf.color.b);
915
- }
916
- if (conf.cubeTexture && conf.cubeTexture.url) {
917
- if (typeof conf.cubeTexture.url === "string") {
918
- options.skyboxTexture = this._getAssetUrl(conf.cubeTexture.url);
919
- }
920
- else {
921
- // init later!
922
- postInitSkyboxMaterial = true;
923
- }
924
- }
925
- if (conf.material) {
926
- postInitSkyboxMaterial = true;
927
- }
928
- }
929
- options.setupImageProcessing = false; // TMP
930
- if (!this.environmentHelper) {
931
- this.environmentHelper = new EnvironmentHelper(options, this.scene);
932
- }
933
- else {
934
- // unlikely, but there might be a new scene! we need to dispose.
935
- // get the scene used by the envHelper
936
- var scene = this.environmentHelper.rootMesh.getScene();
937
- // is it a different scene? Oh no!
938
- if (scene !== this.scene) {
939
- this.environmentHelper.dispose();
940
- this.environmentHelper = new EnvironmentHelper(options, this.scene);
941
- }
942
- else {
943
- // recreate the ground
944
- if (this.environmentHelper.ground) {
945
- this.environmentHelper.ground.dispose();
946
- }
947
- // recreate the skybox
948
- if (this.environmentHelper.skybox) {
949
- this.environmentHelper.skybox.dispose();
950
- }
951
- this.environmentHelper.updateOptions(options);
952
- // update doesn't change the size of the skybox and ground, so we have to recreate!
953
- //this.environmentHelper.dispose();
954
- //this.environmentHelper = new EnvironmentHelper(options, this.scene);
955
- }
956
- }
957
- if (this.environmentHelper.rootMesh && this._globalConfiguration.scene && this._globalConfiguration.scene.environmentRotationY !== undefined) {
958
- this.environmentHelper.rootMesh.rotation.y = this._globalConfiguration.scene.environmentRotationY;
959
- }
960
- var groundConfig = typeof groundConfiguration === "boolean" ? {} : groundConfiguration;
961
- if (this.environmentHelper.groundMaterial && groundConfig) {
962
- this.environmentHelper.groundMaterial._perceptualColor = this.mainColor;
963
- if (groundConfig.material) {
964
- extendClassWithConfig(this.environmentHelper.groundMaterial, groundConfig.material);
965
- }
966
- if (this.environmentHelper.groundMirror) {
967
- var mirrorClearColor = this.environmentHelper.groundMaterial._perceptualColor.toLinearSpace();
968
- // TODO user camera exposure value to set the mirror clear color
969
- var exposure = Math.pow(2.0, -this.scene.imageProcessingConfiguration.exposure) * Math.PI;
970
- mirrorClearColor.scaleToRef(1 / exposure, mirrorClearColor);
971
- this.environmentHelper.groundMirror.clearColor.r = Scalar.Clamp(mirrorClearColor.r);
972
- this.environmentHelper.groundMirror.clearColor.g = Scalar.Clamp(mirrorClearColor.g);
973
- this.environmentHelper.groundMirror.clearColor.b = Scalar.Clamp(mirrorClearColor.b);
974
- this.environmentHelper.groundMirror.clearColor.a = 1;
975
- if (!this.groundMirrorEnabled) {
976
- this.environmentHelper.groundMaterial.reflectionTexture = null;
977
- }
978
- }
979
- }
980
- var skyboxMaterial = this.environmentHelper.skyboxMaterial;
981
- if (skyboxMaterial) {
982
- skyboxMaterial._perceptualColor = this.mainColor;
983
- if (postInitSkyboxMaterial) {
984
- if (typeof skyboxConifguration === "object" && skyboxConifguration.material) {
985
- extendClassWithConfig(skyboxMaterial, skyboxConifguration.material);
986
- }
987
- }
988
- }
989
- }
990
- this._observablesManager &&
991
- this._observablesManager.onModelLoadedObservable.add(function (model) {
992
- _this._updateGroundMirrorRenderList(model);
993
- });
994
- this.onEnvironmentConfiguredObservable.notifyObservers({
995
- sceneManager: this,
996
- object: this.environmentHelper,
997
- newConfiguration: {
998
- skybox: skyboxConifguration,
999
- ground: groundConfiguration,
1000
- },
1001
- });
1002
- };
1003
- /**
1004
- * configure the lights.
1005
- * @param lightsConfiguration the (new) light(s) configuration
1006
- */
1007
- SceneManager.prototype._configureLights = function (lightsConfiguration) {
1008
- var _this = this;
1009
- if (lightsConfiguration === void 0) { lightsConfiguration = {}; }
1010
- // sanity check!
1011
- var lightKeys = Object.keys(lightsConfiguration).filter(function (name) { return name !== "globalRotation"; });
1012
- if (!lightKeys.length) {
1013
- if (!this.scene.lights.length) {
1014
- new HemisphericLight("default light", Vector3.Up(), this.scene);
1015
- }
1016
- }
1017
- else {
1018
- var lightsAvailable_1 = this.scene.lights.map(function (light) { return light.name; });
1019
- // compare to the global (!) configuration object and dispose unneeded:
1020
- var lightsToConfigure_1 = Object.keys(this._globalConfiguration.lights || []);
1021
- if (Object.keys(lightsToConfigure_1).length !== lightsAvailable_1.length) {
1022
- lightsAvailable_1.forEach(function (lName) {
1023
- if (lightsToConfigure_1.indexOf(lName) === -1) {
1024
- _this.scene.getLightByName(lName).dispose();
1025
- }
1026
- });
1027
- }
1028
- lightKeys.forEach(function (name) {
1029
- var lightConfig = { type: 0 };
1030
- if (typeof lightsConfiguration[name] === "object") {
1031
- lightConfig = lightsConfiguration[name];
1032
- }
1033
- if (typeof lightsConfiguration[name] === "number") {
1034
- lightConfig.type = lightsConfiguration[name];
1035
- }
1036
- lightConfig.name = name;
1037
- var light;
1038
- // light is not already available
1039
- if (lightsAvailable_1.indexOf(name) === -1) {
1040
- var constructor = Light.GetConstructorFromName(lightConfig.type, lightConfig.name, _this.scene);
1041
- if (!constructor) {
1042
- return;
1043
- }
1044
- light = constructor();
1045
- }
1046
- else {
1047
- // available? get it from the scene
1048
- light = _this.scene.getLightByName(name);
1049
- if (typeof lightsConfiguration[name] === "boolean") {
1050
- lightConfig.type = light.getTypeID();
1051
- }
1052
- lightsAvailable_1 = lightsAvailable_1.filter(function (ln) { return ln !== name; });
1053
- if (lightConfig.type !== undefined && light.getTypeID() !== lightConfig.type) {
1054
- light.dispose();
1055
- var constructor = Light.GetConstructorFromName(lightConfig.type, lightConfig.name, _this.scene);
1056
- if (!constructor) {
1057
- return;
1058
- }
1059
- light = constructor();
1060
- }
1061
- }
1062
- // if config set the light to false, dispose it.
1063
- if (lightsConfiguration[name] === false) {
1064
- light.dispose();
1065
- return;
1066
- }
1067
- //enabled
1068
- var enabled = lightConfig.enabled !== undefined ? lightConfig.enabled : !lightConfig.disabled;
1069
- light.setEnabled(enabled);
1070
- extendClassWithConfig(light, lightConfig);
1071
- //position. Some lights don't support shadows
1072
- if (light instanceof ShadowLight) {
1073
- // set default values
1074
- light.shadowMinZ = light.shadowMinZ || 0.2;
1075
- light.shadowMaxZ = Math.min(10, light.shadowMaxZ || 10); //large far clips reduce shadow depth precision
1076
- if (lightConfig.target) {
1077
- if (light.setDirectionToTarget) {
1078
- var target = Vector3.Zero().copyFromFloats(lightConfig.target.x, lightConfig.target.y, lightConfig.target.z);
1079
- light.setDirectionToTarget(target);
1080
- }
1081
- }
1082
- else if (lightConfig.direction) {
1083
- var direction = Vector3.Zero().copyFromFloats(lightConfig.direction.x, lightConfig.direction.y, lightConfig.direction.z);
1084
- light.direction = direction;
1085
- }
1086
- var isShadowEnabled = false;
1087
- if (light.getTypeID() === Light.LIGHTTYPEID_DIRECTIONALLIGHT) {
1088
- light.shadowFrustumSize = lightConfig.shadowFrustumSize || 2;
1089
- isShadowEnabled = true;
1090
- }
1091
- else if (light.getTypeID() === Light.LIGHTTYPEID_SPOTLIGHT) {
1092
- var spotLight = light;
1093
- if (lightConfig.spotAngle !== undefined) {
1094
- spotLight.angle = (lightConfig.spotAngle * Math.PI) / 180;
1095
- }
1096
- if (spotLight.angle && lightConfig.shadowFieldOfView) {
1097
- spotLight.shadowAngleScale = lightConfig.shadowFieldOfView / spotLight.angle;
1098
- }
1099
- isShadowEnabled = true;
1100
- }
1101
- else if (light.getTypeID() === Light.LIGHTTYPEID_POINTLIGHT) {
1102
- if (lightConfig.shadowFieldOfView) {
1103
- light.shadowAngle = (lightConfig.shadowFieldOfView * Math.PI) / 180;
1104
- }
1105
- isShadowEnabled = true;
1106
- }
1107
- var shadowGenerator_1 = light.getShadowGenerator();
1108
- if (isShadowEnabled && lightConfig.shadowEnabled && _this._maxShadows) {
1109
- var bufferSize = lightConfig.shadowBufferSize || 256;
1110
- if (!shadowGenerator_1) {
1111
- shadowGenerator_1 = new ShadowGenerator(bufferSize, light);
1112
- }
1113
- var blurKernel = _this.getBlurKernel(light, bufferSize);
1114
- shadowGenerator_1.bias = _this._shadowGeneratorBias;
1115
- shadowGenerator_1.blurKernel = blurKernel;
1116
- //override defaults
1117
- extendClassWithConfig(shadowGenerator_1, lightConfig.shadowConfig || {});
1118
- // add the focus meshes to the shadow list
1119
- _this._observablesManager &&
1120
- _this._observablesManager.onModelLoadedObservable.add(function (model) {
1121
- _this._updateShadowRenderList(shadowGenerator_1, model);
1122
- });
1123
- //if (model) {
1124
- _this._updateShadowRenderList(shadowGenerator_1);
1125
- //}
1126
- }
1127
- else if (shadowGenerator_1) {
1128
- shadowGenerator_1.dispose();
1129
- }
1130
- }
1131
- });
1132
- // render priority
1133
- var globalLightsConfiguration = this._globalConfiguration.lights || {};
1134
- Object.keys(globalLightsConfiguration)
1135
- .sort()
1136
- .forEach(function (name, idx) {
1137
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1138
- // const configuration = globalLightsConfiguration[name];
1139
- var light = _this.scene.getLightByName(name);
1140
- // sanity check
1141
- if (!light) {
1142
- return;
1143
- }
1144
- light.renderPriority = -idx;
1145
- });
1146
- }
1147
- this.onLightsConfiguredObservable.notifyObservers({
1148
- sceneManager: this,
1149
- object: this.scene.lights,
1150
- newConfiguration: lightsConfiguration,
1151
- });
1152
- };
1153
- SceneManager.prototype._updateShadowRenderList = function (shadowGenerator, model, resetList) {
1154
- var focusMeshes = model ? model.meshes : this.scene.meshes;
1155
- // add the focus meshes to the shadow list
1156
- var shadownMap = shadowGenerator.getShadowMap();
1157
- if (!shadownMap) {
1158
- return;
1159
- }
1160
- if (resetList && shadownMap.renderList) {
1161
- shadownMap.renderList.length = 0;
1162
- }
1163
- else {
1164
- shadownMap.renderList = shadownMap.renderList || [];
1165
- }
1166
- for (var index = 0; index < focusMeshes.length; index++) {
1167
- var mesh = focusMeshes[index];
1168
- if (Tags.MatchesQuery(mesh, "castShadow") && shadownMap.renderList.indexOf(mesh) === -1) {
1169
- shadownMap.renderList.push(mesh);
1170
- }
1171
- }
1172
- if (!this._shadowGroundPlane) {
1173
- if (shadowGenerator.useBlurCloseExponentialShadowMap) {
1174
- var shadowGroundPlane = CreatePlane("shadowGroundPlane", { size: 100 }, this.scene);
1175
- shadowGroundPlane.useVertexColors = false;
1176
- //material isn't ever used in rendering, just used to set back face culling
1177
- shadowGroundPlane.material = new PBRMaterial("shadowGroundPlaneMaterial", this.scene);
1178
- shadowGroundPlane.material.backFaceCulling = false;
1179
- shadowGroundPlane.rotation.x = Math.PI * 0.5;
1180
- shadowGroundPlane.freezeWorldMatrix();
1181
- this._shadowGroundPlane = shadowGroundPlane;
1182
- this.scene.removeMesh(shadowGroundPlane);
1183
- }
1184
- }
1185
- else {
1186
- if (!shadowGenerator.useBlurCloseExponentialShadowMap) {
1187
- this._shadowGroundPlane.dispose();
1188
- this._shadowGroundPlane = null;
1189
- }
1190
- }
1191
- if (this._shadowGroundPlane && shadownMap.renderList.indexOf(this._shadowGroundPlane) === -1) {
1192
- shadownMap.renderList.push(this._shadowGroundPlane);
1193
- }
1194
- };
1195
- SceneManager.prototype._updateGroundMirrorRenderList = function (model, resetList) {
1196
- if (this.environmentHelper && this.environmentHelper.groundMirror && this.environmentHelper.groundMirror.renderList) {
1197
- var focusMeshes = model ? model.meshes : this.scene.meshes;
1198
- var renderList = this.environmentHelper.groundMirror.renderList;
1199
- if (resetList) {
1200
- renderList.length = 0;
1201
- }
1202
- for (var index = 0; index < focusMeshes.length; index++) {
1203
- var mesh = focusMeshes[index];
1204
- if (renderList.indexOf(mesh) === -1) {
1205
- renderList.push(mesh);
1206
- }
1207
- }
1208
- }
1209
- };
1210
- /**
1211
- * Gets the shadow map blur kernel according to the light configuration.
1212
- * @param light The light used to generate the shadows
1213
- * @param bufferSize The size of the shadow map
1214
- * @returns the kernel blur size
1215
- */
1216
- SceneManager.prototype.getBlurKernel = function (light, bufferSize) {
1217
- var normalizedBlurKernel = 0.05; // TODO Should come from the config.
1218
- if (light.getTypeID() === Light.LIGHTTYPEID_DIRECTIONALLIGHT) {
1219
- normalizedBlurKernel = normalizedBlurKernel / light.shadowFrustumSize;
1220
- }
1221
- else if (light.getTypeID() === Light.LIGHTTYPEID_POINTLIGHT) {
1222
- normalizedBlurKernel = normalizedBlurKernel / light.shadowAngle;
1223
- }
1224
- else if (light.getTypeID() === Light.LIGHTTYPEID_SPOTLIGHT) {
1225
- normalizedBlurKernel = normalizedBlurKernel / (light.angle * light.shadowAngleScale);
1226
- }
1227
- var minimumBlurKernel = 5 / (bufferSize / 256); //magic number that aims to keep away sawtooth shadows
1228
- var blurKernel = Math.max(bufferSize * normalizedBlurKernel, minimumBlurKernel);
1229
- return blurKernel;
1230
- };
1231
- /**
1232
- * Alters render settings to reduce features based on hardware feature limitations
1233
- * @param enableHDR Allows the viewer to run in HDR mode.
1234
- */
1235
- SceneManager.prototype._handleHardwareLimitations = function (enableHDR) {
1236
- if (enableHDR === void 0) { enableHDR = true; }
1237
- //flip rendering settings switches based on hardware support
1238
- var maxVaryingRows = this._engine.getCaps().maxVaryingVectors;
1239
- var maxFragmentSamplers = this._engine.getCaps().maxTexturesImageUnits;
1240
- //shadows are disabled if there's not enough varyings for a single shadow
1241
- if (maxVaryingRows < 8 || maxFragmentSamplers < 8) {
1242
- this._maxShadows = 0;
1243
- }
1244
- else {
1245
- this._maxShadows = 3;
1246
- }
1247
- //can we render to any >= 16-bit targets (required for HDR)
1248
- var caps = this._engine.getCaps();
1249
- var linearHalfFloatTargets = caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering;
1250
- var linearFloatTargets = caps.textureFloatRender && caps.textureFloatLinearFiltering;
1251
- this._hdrSupport = enableHDR && !!(linearFloatTargets || linearHalfFloatTargets);
1252
- if (linearHalfFloatTargets) {
1253
- this._defaultHighpTextureType = Constants.TEXTURETYPE_HALF_FLOAT;
1254
- this._shadowGeneratorBias = 0.002;
1255
- }
1256
- else if (linearFloatTargets) {
1257
- this._defaultHighpTextureType = Constants.TEXTURETYPE_FLOAT;
1258
- this._shadowGeneratorBias = 0.001;
1259
- }
1260
- else {
1261
- this._defaultHighpTextureType = Constants.TEXTURETYPE_UNSIGNED_BYTE;
1262
- this._shadowGeneratorBias = 0.001;
1263
- }
1264
- this._defaultPipelineTextureType = this._hdrSupport ? this._defaultHighpTextureType : Constants.TEXTURETYPE_UNSIGNED_BYTE;
1265
- };
1266
- /**
1267
- * Dispose the entire viewer including the scene and the engine
1268
- */
1269
- SceneManager.prototype.dispose = function () {
1270
- // this.onCameraConfiguredObservable.clear();
1271
- this.onEnvironmentConfiguredObservable.clear();
1272
- this.onLightsConfiguredObservable.clear();
1273
- this.onModelsConfiguredObservable.clear();
1274
- this.onSceneConfiguredObservable.clear();
1275
- this.onSceneInitObservable.clear();
1276
- this.onSceneOptimizerConfiguredObservable.clear();
1277
- this.onVRConfiguredObservable.clear();
1278
- if (this.sceneOptimizer) {
1279
- this.sceneOptimizer.stop();
1280
- this.sceneOptimizer.dispose();
1281
- }
1282
- if (this.environmentHelper) {
1283
- this.environmentHelper.dispose();
1284
- }
1285
- this.models.forEach(function (model) {
1286
- model.dispose();
1287
- });
1288
- if (this._defaultRenderingPipeline) {
1289
- this._defaultRenderingPipeline.dispose();
1290
- }
1291
- this.models.length = 0;
1292
- if (this.scene) {
1293
- this.scene.dispose();
1294
- }
1295
- };
1296
- /**
1297
- * Get an environment asset url by using the configuration if the path is not absolute.
1298
- * @param url Asset url
1299
- * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.
1300
- */
1301
- SceneManager.prototype._getAssetUrl = function (url) {
1302
- var returnUrl = url;
1303
- if (url && url.toLowerCase().indexOf("//") === -1) {
1304
- if (!this._assetsRootURL) {
1305
- // Tools.Warn("Please, specify the root url of your assets before loading the configuration (labs.environmentAssetsRootURL) or disable the background through the viewer options.");
1306
- return url;
1307
- }
1308
- returnUrl = this._assetsRootURL + returnUrl;
1309
- }
1310
- return returnUrl;
1311
- };
1312
- SceneManager.prototype._setCameraBehavior = function (name, behaviorConfig) {
1313
- var behavior;
1314
- var type;
1315
- if (typeof behaviorConfig === "object") {
1316
- type = behaviorConfig.type;
1317
- }
1318
- else if (typeof behaviorConfig === "number") {
1319
- type = behaviorConfig;
1320
- }
1321
- else {
1322
- type = this._cameraBehaviorMapping[name];
1323
- }
1324
- if (type === undefined) {
1325
- return;
1326
- }
1327
- var config = typeof behaviorConfig === "object" ? behaviorConfig : {};
1328
- var enabled = true;
1329
- if (typeof behaviorConfig === "boolean") {
1330
- enabled = behaviorConfig;
1331
- }
1332
- // constructing behavior
1333
- switch (type) {
1334
- case 0 /* CameraBehavior.AUTOROTATION */:
1335
- this.camera.useAutoRotationBehavior = enabled;
1336
- behavior = this.camera.autoRotationBehavior;
1337
- break;
1338
- case 1 /* CameraBehavior.BOUNCING */:
1339
- this.camera.useBouncingBehavior = enabled;
1340
- behavior = this.camera.bouncingBehavior;
1341
- break;
1342
- case 2 /* CameraBehavior.FRAMING */:
1343
- this.camera.useFramingBehavior = enabled;
1344
- behavior = this.camera.framingBehavior;
1345
- break;
1346
- default:
1347
- behavior = null;
1348
- break;
1349
- }
1350
- if (behavior) {
1351
- this._cameraBehaviorMapping[name] = type;
1352
- if (typeof behaviorConfig === "object") {
1353
- extendClassWithConfig(behavior, behaviorConfig);
1354
- }
1355
- }
1356
- // post attach configuration. Some functionalities require the attached camera.
1357
- switch (type) {
1358
- case 0 /* CameraBehavior.AUTOROTATION */:
1359
- break;
1360
- case 1 /* CameraBehavior.BOUNCING */:
1361
- break;
1362
- case 2 /* CameraBehavior.FRAMING */:
1363
- this._observablesManager &&
1364
- this._observablesManager.onModelLoadedObservable.add(function (model) {
1365
- if (config.zoomOnBoundingInfo) {
1366
- behavior.zoomOnMeshHierarchy(model.rootMesh);
1367
- }
1368
- });
1369
- break;
1370
- }
1371
- };
1372
- return SceneManager;
1373
- }());
1374
- export { SceneManager };
1375
- //# sourceMappingURL=sceneManager.js.map