@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
@@ -0,0 +1,1162 @@
1
+ import { o as PrecisionDate, H as HasStencilAspect, C as Constants, A as AbstractEngine, p as IsWindowObjectExist, q as IsDocumentAvailable, E as EngineStore } from './index-Dlf001gP.esm.js';
2
+
3
+ /**
4
+ * Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window
5
+ */
6
+ class PerformanceMonitor {
7
+ /**
8
+ * constructor
9
+ * @param frameSampleSize The number of samples required to saturate the sliding window
10
+ */
11
+ constructor(frameSampleSize = 30) {
12
+ this._enabled = true;
13
+ this._rollingFrameTime = new RollingAverage(frameSampleSize);
14
+ }
15
+ /**
16
+ * Samples current frame
17
+ * @param timeMs A timestamp in milliseconds of the current frame to compare with other frames
18
+ */
19
+ sampleFrame(timeMs = PrecisionDate.Now) {
20
+ if (!this._enabled) {
21
+ return;
22
+ }
23
+ if (this._lastFrameTimeMs != null) {
24
+ const dt = timeMs - this._lastFrameTimeMs;
25
+ this._rollingFrameTime.add(dt);
26
+ }
27
+ this._lastFrameTimeMs = timeMs;
28
+ }
29
+ /**
30
+ * Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
31
+ */
32
+ get averageFrameTime() {
33
+ return this._rollingFrameTime.average;
34
+ }
35
+ /**
36
+ * Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)
37
+ */
38
+ get averageFrameTimeVariance() {
39
+ return this._rollingFrameTime.variance;
40
+ }
41
+ /**
42
+ * Returns the frame time of the most recent frame
43
+ */
44
+ get instantaneousFrameTime() {
45
+ return this._rollingFrameTime.history(0);
46
+ }
47
+ /**
48
+ * Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)
49
+ */
50
+ get averageFPS() {
51
+ return 1000.0 / this._rollingFrameTime.average;
52
+ }
53
+ /**
54
+ * Returns the average framerate in frames per second using the most recent frame time
55
+ */
56
+ get instantaneousFPS() {
57
+ const history = this._rollingFrameTime.history(0);
58
+ if (history === 0) {
59
+ return 0;
60
+ }
61
+ return 1000.0 / history;
62
+ }
63
+ /**
64
+ * Returns true if enough samples have been taken to completely fill the sliding window
65
+ */
66
+ get isSaturated() {
67
+ return this._rollingFrameTime.isSaturated();
68
+ }
69
+ /**
70
+ * Enables contributions to the sliding window sample set
71
+ */
72
+ enable() {
73
+ this._enabled = true;
74
+ }
75
+ /**
76
+ * Disables contributions to the sliding window sample set
77
+ * Samples will not be interpolated over the disabled period
78
+ */
79
+ disable() {
80
+ this._enabled = false;
81
+ //clear last sample to avoid interpolating over the disabled period when next enabled
82
+ this._lastFrameTimeMs = null;
83
+ }
84
+ /**
85
+ * Returns true if sampling is enabled
86
+ */
87
+ get isEnabled() {
88
+ return this._enabled;
89
+ }
90
+ /**
91
+ * Resets performance monitor
92
+ */
93
+ reset() {
94
+ //clear last sample to avoid interpolating over the disabled period when next enabled
95
+ this._lastFrameTimeMs = null;
96
+ //wipe record
97
+ this._rollingFrameTime.reset();
98
+ }
99
+ }
100
+ /**
101
+ * RollingAverage
102
+ *
103
+ * Utility to efficiently compute the rolling average and variance over a sliding window of samples
104
+ */
105
+ class RollingAverage {
106
+ /**
107
+ * constructor
108
+ * @param length The number of samples required to saturate the sliding window
109
+ */
110
+ constructor(length) {
111
+ this._samples = new Array(length);
112
+ this.reset();
113
+ }
114
+ /**
115
+ * Adds a sample to the sample set
116
+ * @param v The sample value
117
+ */
118
+ add(v) {
119
+ //http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
120
+ let delta;
121
+ //we need to check if we've already wrapped round
122
+ if (this.isSaturated()) {
123
+ //remove bottom of stack from mean
124
+ const bottomValue = this._samples[this._pos];
125
+ delta = bottomValue - this.average;
126
+ this.average -= delta / (this._sampleCount - 1);
127
+ this._m2 -= delta * (bottomValue - this.average);
128
+ }
129
+ else {
130
+ this._sampleCount++;
131
+ }
132
+ //add new value to mean
133
+ delta = v - this.average;
134
+ this.average += delta / this._sampleCount;
135
+ this._m2 += delta * (v - this.average);
136
+ //set the new variance
137
+ this.variance = this._m2 / (this._sampleCount - 1);
138
+ this._samples[this._pos] = v;
139
+ this._pos++;
140
+ this._pos %= this._samples.length; //positive wrap around
141
+ }
142
+ /**
143
+ * Returns previously added values or null if outside of history or outside the sliding window domain
144
+ * @param i Index in history. For example, pass 0 for the most recent value and 1 for the value before that
145
+ * @returns Value previously recorded with add() or null if outside of range
146
+ */
147
+ history(i) {
148
+ if (i >= this._sampleCount || i >= this._samples.length) {
149
+ return 0;
150
+ }
151
+ const i0 = this._wrapPosition(this._pos - 1.0);
152
+ return this._samples[this._wrapPosition(i0 - i)];
153
+ }
154
+ /**
155
+ * Returns true if enough samples have been taken to completely fill the sliding window
156
+ * @returns true if sample-set saturated
157
+ */
158
+ isSaturated() {
159
+ return this._sampleCount >= this._samples.length;
160
+ }
161
+ /**
162
+ * Resets the rolling average (equivalent to 0 samples taken so far)
163
+ */
164
+ reset() {
165
+ this.average = 0;
166
+ this.variance = 0;
167
+ this._sampleCount = 0;
168
+ this._pos = 0;
169
+ this._m2 = 0;
170
+ }
171
+ /**
172
+ * Wraps a value around the sample range boundaries
173
+ * @param i Position in sample range, for example if the sample length is 5, and i is -3, then 2 will be returned.
174
+ * @returns Wrapped position in sample range
175
+ */
176
+ _wrapPosition(i) {
177
+ const max = this._samples.length;
178
+ return ((i % max) + max) % max;
179
+ }
180
+ }
181
+
182
+ /**
183
+ * Wrapper around a render target (either single or multi textures)
184
+ */
185
+ class RenderTargetWrapper {
186
+ /**
187
+ * Gets the depth/stencil texture
188
+ */
189
+ get depthStencilTexture() {
190
+ return this._depthStencilTexture;
191
+ }
192
+ /**
193
+ * Sets the depth/stencil texture
194
+ * @param texture The depth/stencil texture to set
195
+ * @param disposeExisting True to dispose the existing depth/stencil texture (if any) before replacing it (default: true)
196
+ */
197
+ setDepthStencilTexture(texture, disposeExisting = true) {
198
+ if (disposeExisting && this._depthStencilTexture) {
199
+ this._depthStencilTexture.dispose();
200
+ }
201
+ this._depthStencilTexture = texture;
202
+ this._generateDepthBuffer = this._generateStencilBuffer = false;
203
+ if (texture) {
204
+ this._generateDepthBuffer = true;
205
+ this._generateStencilBuffer = HasStencilAspect(texture.format);
206
+ }
207
+ }
208
+ /**
209
+ * Indicates if the depth/stencil texture has a stencil aspect
210
+ */
211
+ get depthStencilTextureWithStencil() {
212
+ return this._depthStencilTextureWithStencil;
213
+ }
214
+ /**
215
+ * Defines if the render target wrapper is for a cube texture or if false a 2d texture
216
+ */
217
+ get isCube() {
218
+ return this._isCube;
219
+ }
220
+ /**
221
+ * Defines if the render target wrapper is for a single or multi target render wrapper
222
+ */
223
+ get isMulti() {
224
+ return this._isMulti;
225
+ }
226
+ /**
227
+ * Defines if the render target wrapper is for a single or an array of textures
228
+ */
229
+ get is2DArray() {
230
+ return this.layers > 0;
231
+ }
232
+ /**
233
+ * Defines if the render target wrapper is for a 3D texture
234
+ */
235
+ get is3D() {
236
+ return this.depth > 0;
237
+ }
238
+ /**
239
+ * Gets the size of the render target wrapper (used for cubes, as width=height in this case)
240
+ */
241
+ get size() {
242
+ return this.width;
243
+ }
244
+ /**
245
+ * Gets the width of the render target wrapper
246
+ */
247
+ get width() {
248
+ return this._size.width ?? this._size;
249
+ }
250
+ /**
251
+ * Gets the height of the render target wrapper
252
+ */
253
+ get height() {
254
+ return this._size.height ?? this._size;
255
+ }
256
+ /**
257
+ * Gets the number of layers of the render target wrapper (only used if is2DArray is true and wrapper is not a multi render target)
258
+ */
259
+ get layers() {
260
+ return this._size.layers || 0;
261
+ }
262
+ /**
263
+ * Gets the depth of the render target wrapper (only used if is3D is true and wrapper is not a multi render target)
264
+ */
265
+ get depth() {
266
+ return this._size.depth || 0;
267
+ }
268
+ /**
269
+ * Gets the render texture. If this is a multi render target, gets the first texture
270
+ */
271
+ get texture() {
272
+ return this._textures?.[0] ?? null;
273
+ }
274
+ /**
275
+ * Gets the list of render textures. If we are not in a multi render target, the list will be null (use the texture getter instead)
276
+ */
277
+ get textures() {
278
+ return this._textures;
279
+ }
280
+ /**
281
+ * Gets the face indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null
282
+ */
283
+ get faceIndices() {
284
+ return this._faceIndices;
285
+ }
286
+ /**
287
+ * Gets the layer indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null
288
+ */
289
+ get layerIndices() {
290
+ return this._layerIndices;
291
+ }
292
+ /**
293
+ * Gets the base array layer of a texture in the textures array
294
+ * This is an number that is calculated based on the layer and face indices set for this texture at that index
295
+ * @param index The index of the texture in the textures array to get the base array layer for
296
+ * @returns the base array layer of the texture at the given index
297
+ */
298
+ getBaseArrayLayer(index) {
299
+ if (!this._textures) {
300
+ return -1;
301
+ }
302
+ const texture = this._textures[index];
303
+ const layerIndex = this._layerIndices?.[index] ?? 0;
304
+ const faceIndex = this._faceIndices?.[index] ?? 0;
305
+ return texture.isCube ? layerIndex * 6 + faceIndex : texture.is3D ? 0 : layerIndex;
306
+ }
307
+ /**
308
+ * Gets the sample count of the render target
309
+ */
310
+ get samples() {
311
+ return this._samples;
312
+ }
313
+ /**
314
+ * Sets the sample count of the render target
315
+ * @param value sample count
316
+ * @param initializeBuffers If set to true, the engine will make an initializing call to drawBuffers (only used when isMulti=true).
317
+ * @param force true to force calling the update sample count engine function even if the current sample count is equal to value
318
+ * @returns the sample count that has been set
319
+ */
320
+ setSamples(value, initializeBuffers = true, force = false) {
321
+ if (this.samples === value && !force) {
322
+ return value;
323
+ }
324
+ const result = this._isMulti
325
+ ? this._engine.updateMultipleRenderTargetTextureSampleCount(this, value, initializeBuffers)
326
+ : this._engine.updateRenderTargetTextureSampleCount(this, value);
327
+ this._samples = value;
328
+ return result;
329
+ }
330
+ /**
331
+ * Resolves the MSAA textures into their non-MSAA version.
332
+ * Note that if samples equals 1 (no MSAA), no resolve is performed.
333
+ */
334
+ resolveMSAATextures() {
335
+ if (this.isMulti) {
336
+ this._engine.resolveMultiFramebuffer(this);
337
+ }
338
+ else {
339
+ this._engine.resolveFramebuffer(this);
340
+ }
341
+ }
342
+ /**
343
+ * Generates mipmaps for each texture of the render target
344
+ */
345
+ generateMipMaps() {
346
+ if (this._engine._currentRenderTarget === this) {
347
+ this._engine.unBindFramebuffer(this, true);
348
+ }
349
+ if (this.isMulti) {
350
+ this._engine.generateMipMapsMultiFramebuffer(this);
351
+ }
352
+ else {
353
+ this._engine.generateMipMapsFramebuffer(this);
354
+ }
355
+ }
356
+ /**
357
+ * Initializes the render target wrapper
358
+ * @param isMulti true if the wrapper is a multi render target
359
+ * @param isCube true if the wrapper should render to a cube texture
360
+ * @param size size of the render target (width/height/layers)
361
+ * @param engine engine used to create the render target
362
+ * @param label defines the label to use for the wrapper (for debugging purpose only)
363
+ */
364
+ constructor(isMulti, isCube, size, engine, label) {
365
+ this._textures = null;
366
+ this._faceIndices = null;
367
+ this._layerIndices = null;
368
+ /** @internal */
369
+ this._samples = 1;
370
+ /** @internal */
371
+ this._attachments = null;
372
+ /** @internal */
373
+ this._generateStencilBuffer = false;
374
+ /** @internal */
375
+ this._generateDepthBuffer = false;
376
+ /** @internal */
377
+ this._depthStencilTextureWithStencil = false;
378
+ /**
379
+ * Sets this property to true to disable the automatic MSAA resolve that happens when the render target wrapper is unbound (default is false)
380
+ */
381
+ this.disableAutomaticMSAAResolve = false;
382
+ /**
383
+ * Indicates if MSAA color texture(s) should be resolved when a resolve occur (either automatically by the engine or manually by the user) (default is true)
384
+ * Note that you can trigger a MSAA resolve at any time by calling resolveMSAATextures()
385
+ */
386
+ this.resolveMSAAColors = true;
387
+ /**
388
+ * Indicates if MSAA depth texture should be resolved when a resolve occur (either automatically by the engine or manually by the user) (default is false)
389
+ */
390
+ this.resolveMSAADepth = false;
391
+ /**
392
+ * Indicates if MSAA stencil texture should be resolved when a resolve occur (either automatically by the engine or manually by the user) (default is false)
393
+ */
394
+ this.resolveMSAAStencil = false;
395
+ this._isMulti = isMulti;
396
+ this._isCube = isCube;
397
+ this._size = size;
398
+ this._engine = engine;
399
+ this._depthStencilTexture = null;
400
+ this.label = label;
401
+ }
402
+ /**
403
+ * Sets the render target texture(s)
404
+ * @param textures texture(s) to set
405
+ */
406
+ setTextures(textures) {
407
+ if (Array.isArray(textures)) {
408
+ this._textures = textures;
409
+ }
410
+ else if (textures) {
411
+ this._textures = [textures];
412
+ }
413
+ else {
414
+ this._textures = null;
415
+ }
416
+ }
417
+ /**
418
+ * Set a texture in the textures array
419
+ * @param texture The texture to set
420
+ * @param index The index in the textures array to set
421
+ * @param disposePrevious If this function should dispose the previous texture
422
+ */
423
+ setTexture(texture, index = 0, disposePrevious = true) {
424
+ if (!this._textures) {
425
+ this._textures = [];
426
+ }
427
+ if (this._textures[index] === texture) {
428
+ return;
429
+ }
430
+ if (this._textures[index] && disposePrevious) {
431
+ this._textures[index].dispose();
432
+ }
433
+ this._textures[index] = texture;
434
+ }
435
+ /**
436
+ * Sets the layer and face indices of every render target texture bound to each color attachment
437
+ * @param layers The layers of each texture to be set
438
+ * @param faces The faces of each texture to be set
439
+ */
440
+ setLayerAndFaceIndices(layers, faces) {
441
+ this._layerIndices = layers;
442
+ this._faceIndices = faces;
443
+ }
444
+ /**
445
+ * Sets the layer and face indices of a texture in the textures array that should be bound to each color attachment
446
+ * @param index The index of the texture in the textures array to modify
447
+ * @param layer The layer of the texture to be set
448
+ * @param face The face of the texture to be set
449
+ */
450
+ setLayerAndFaceIndex(index = 0, layer, face) {
451
+ if (!this._layerIndices) {
452
+ this._layerIndices = [];
453
+ }
454
+ if (!this._faceIndices) {
455
+ this._faceIndices = [];
456
+ }
457
+ if (layer !== undefined && layer >= 0) {
458
+ this._layerIndices[index] = layer;
459
+ }
460
+ if (face !== undefined && face >= 0) {
461
+ this._faceIndices[index] = face;
462
+ }
463
+ }
464
+ /**
465
+ * Creates the depth/stencil texture
466
+ * @param comparisonFunction Comparison function to use for the texture
467
+ * @param bilinearFiltering true if bilinear filtering should be used when sampling the texture
468
+ * @param generateStencil Not used anymore. "format" will be used to determine if stencil should be created
469
+ * @param samples sample count to use when creating the texture (default: 1)
470
+ * @param format format of the depth texture (default: Constants.TEXTUREFORMAT_DEPTH32_FLOAT)
471
+ * @param label defines the label to use for the texture (for debugging purpose only)
472
+ * @returns the depth/stencil created texture
473
+ */
474
+ createDepthStencilTexture(comparisonFunction = 0, bilinearFiltering = true, generateStencil = false, samples = 1, format = Constants.TEXTUREFORMAT_DEPTH32_FLOAT, label) {
475
+ this._depthStencilTexture?.dispose();
476
+ this._depthStencilTextureWithStencil = generateStencil;
477
+ this._depthStencilTextureLabel = label;
478
+ this._depthStencilTexture = this._engine.createDepthStencilTexture(this._size, {
479
+ bilinearFiltering,
480
+ comparisonFunction,
481
+ generateStencil,
482
+ isCube: this._isCube,
483
+ samples,
484
+ depthTextureFormat: format,
485
+ label,
486
+ }, this);
487
+ return this._depthStencilTexture;
488
+ }
489
+ /**
490
+ * @deprecated Use shareDepth instead
491
+ * @param renderTarget Destination renderTarget
492
+ */
493
+ _shareDepth(renderTarget) {
494
+ this.shareDepth(renderTarget);
495
+ }
496
+ /**
497
+ * Shares the depth buffer of this render target with another render target.
498
+ * @param renderTarget Destination renderTarget
499
+ */
500
+ shareDepth(renderTarget) {
501
+ if (this._depthStencilTexture) {
502
+ if (renderTarget._depthStencilTexture) {
503
+ renderTarget._depthStencilTexture.dispose();
504
+ }
505
+ renderTarget._depthStencilTexture = this._depthStencilTexture;
506
+ renderTarget._depthStencilTextureWithStencil = this._depthStencilTextureWithStencil;
507
+ this._depthStencilTexture.incrementReferences();
508
+ }
509
+ }
510
+ /**
511
+ * @internal
512
+ */
513
+ _swapAndDie(target) {
514
+ if (this.texture) {
515
+ this.texture._swapAndDie(target);
516
+ }
517
+ this._textures = null;
518
+ this.dispose(true);
519
+ }
520
+ _cloneRenderTargetWrapper() {
521
+ let rtw = null;
522
+ if (this._isMulti) {
523
+ const textureArray = this.textures;
524
+ if (textureArray && textureArray.length > 0) {
525
+ let generateDepthTexture = false;
526
+ let textureCount = textureArray.length;
527
+ let depthTextureFormat = -1;
528
+ const lastTextureSource = textureArray[textureArray.length - 1]._source;
529
+ if (lastTextureSource === 14 /* InternalTextureSource.Depth */ || lastTextureSource === 12 /* InternalTextureSource.DepthStencil */) {
530
+ generateDepthTexture = true;
531
+ depthTextureFormat = textureArray[textureArray.length - 1].format;
532
+ textureCount--;
533
+ }
534
+ const samplingModes = [];
535
+ const types = [];
536
+ const formats = [];
537
+ const targetTypes = [];
538
+ const faceIndex = [];
539
+ const layerIndex = [];
540
+ const layerCounts = [];
541
+ const internalTexture2Index = {};
542
+ for (let i = 0; i < textureCount; ++i) {
543
+ const texture = textureArray[i];
544
+ samplingModes.push(texture.samplingMode);
545
+ types.push(texture.type);
546
+ formats.push(texture.format);
547
+ const index = internalTexture2Index[texture.uniqueId];
548
+ if (index !== undefined) {
549
+ targetTypes.push(-1);
550
+ layerCounts.push(0);
551
+ }
552
+ else {
553
+ internalTexture2Index[texture.uniqueId] = i;
554
+ if (texture.is2DArray) {
555
+ targetTypes.push(Constants.TEXTURE_2D_ARRAY);
556
+ layerCounts.push(texture.depth);
557
+ }
558
+ else if (texture.isCube) {
559
+ targetTypes.push(Constants.TEXTURE_CUBE_MAP);
560
+ layerCounts.push(0);
561
+ } /*else if (texture.isCubeArray) {
562
+ targetTypes.push(Constants.TEXTURE_CUBE_MAP_ARRAY);
563
+ layerCounts.push(texture.depth);
564
+ }*/
565
+ else if (texture.is3D) {
566
+ targetTypes.push(Constants.TEXTURE_3D);
567
+ layerCounts.push(texture.depth);
568
+ }
569
+ else {
570
+ targetTypes.push(Constants.TEXTURE_2D);
571
+ layerCounts.push(0);
572
+ }
573
+ }
574
+ if (this._faceIndices) {
575
+ faceIndex.push(this._faceIndices[i] ?? 0);
576
+ }
577
+ if (this._layerIndices) {
578
+ layerIndex.push(this._layerIndices[i] ?? 0);
579
+ }
580
+ }
581
+ const optionsMRT = {
582
+ samplingModes,
583
+ generateMipMaps: textureArray[0].generateMipMaps,
584
+ generateDepthBuffer: this._generateDepthBuffer,
585
+ generateStencilBuffer: this._generateStencilBuffer,
586
+ generateDepthTexture,
587
+ depthTextureFormat,
588
+ types,
589
+ formats,
590
+ textureCount,
591
+ targetTypes,
592
+ faceIndex,
593
+ layerIndex,
594
+ layerCounts,
595
+ label: this.label,
596
+ };
597
+ const size = {
598
+ width: this.width,
599
+ height: this.height,
600
+ depth: this.depth,
601
+ };
602
+ rtw = this._engine.createMultipleRenderTarget(size, optionsMRT);
603
+ for (let i = 0; i < textureCount; ++i) {
604
+ if (targetTypes[i] !== -1) {
605
+ continue;
606
+ }
607
+ const index = internalTexture2Index[textureArray[i].uniqueId];
608
+ rtw.setTexture(rtw.textures[index], i);
609
+ }
610
+ }
611
+ }
612
+ else {
613
+ const options = {};
614
+ options.generateDepthBuffer = this._generateDepthBuffer;
615
+ options.generateMipMaps = this.texture?.generateMipMaps ?? false;
616
+ options.generateStencilBuffer = this._generateStencilBuffer;
617
+ options.samplingMode = this.texture?.samplingMode;
618
+ options.type = this.texture?.type;
619
+ options.format = this.texture?.format;
620
+ options.noColorAttachment = !this._textures;
621
+ options.label = this.label;
622
+ if (this.isCube) {
623
+ rtw = this._engine.createRenderTargetCubeTexture(this.width, options);
624
+ }
625
+ else {
626
+ const size = {
627
+ width: this.width,
628
+ height: this.height,
629
+ layers: this.is2DArray || this.is3D ? this.texture?.depth : undefined,
630
+ };
631
+ rtw = this._engine.createRenderTargetTexture(size, options);
632
+ }
633
+ if (rtw.texture) {
634
+ rtw.texture.isReady = true;
635
+ }
636
+ }
637
+ return rtw;
638
+ }
639
+ _swapRenderTargetWrapper(target) {
640
+ if (this._textures && target._textures) {
641
+ for (let i = 0; i < this._textures.length; ++i) {
642
+ this._textures[i]._swapAndDie(target._textures[i], false);
643
+ target._textures[i].isReady = true;
644
+ }
645
+ }
646
+ if (this._depthStencilTexture && target._depthStencilTexture) {
647
+ this._depthStencilTexture._swapAndDie(target._depthStencilTexture);
648
+ target._depthStencilTexture.isReady = true;
649
+ }
650
+ this._textures = null;
651
+ this._depthStencilTexture = null;
652
+ }
653
+ /** @internal */
654
+ _rebuild() {
655
+ const rtw = this._cloneRenderTargetWrapper();
656
+ if (!rtw) {
657
+ return;
658
+ }
659
+ if (this._depthStencilTexture) {
660
+ const samplingMode = this._depthStencilTexture.samplingMode;
661
+ const format = this._depthStencilTexture.format;
662
+ const bilinear = samplingMode === Constants.TEXTURE_BILINEAR_SAMPLINGMODE ||
663
+ samplingMode === Constants.TEXTURE_TRILINEAR_SAMPLINGMODE ||
664
+ samplingMode === Constants.TEXTURE_LINEAR_LINEAR_MIPNEAREST;
665
+ rtw.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction, bilinear, this._depthStencilTextureWithStencil, this._depthStencilTexture.samples, format, this._depthStencilTextureLabel);
666
+ }
667
+ if (this.samples > 1) {
668
+ rtw.setSamples(this.samples);
669
+ }
670
+ rtw._swapRenderTargetWrapper(this);
671
+ rtw.dispose();
672
+ }
673
+ /**
674
+ * Releases the internal render textures
675
+ */
676
+ releaseTextures() {
677
+ if (this._textures) {
678
+ for (let i = 0; i < this._textures.length; ++i) {
679
+ this._textures[i].dispose();
680
+ }
681
+ }
682
+ this._textures = null;
683
+ }
684
+ /**
685
+ * Disposes the whole render target wrapper
686
+ * @param disposeOnlyFramebuffers true if only the frame buffers should be released (used for the WebGL engine). If false, all the textures will also be released
687
+ */
688
+ dispose(disposeOnlyFramebuffers = false) {
689
+ if (!disposeOnlyFramebuffers) {
690
+ this._depthStencilTexture?.dispose();
691
+ this._depthStencilTexture = null;
692
+ this.releaseTextures();
693
+ }
694
+ this._engine._releaseRenderTargetWrapper(this);
695
+ }
696
+ }
697
+
698
+ AbstractEngine.prototype.createDepthStencilTexture = function (size, options, rtWrapper) {
699
+ if (options.isCube) {
700
+ const width = size.width || size;
701
+ return this._createDepthStencilCubeTexture(width, options);
702
+ }
703
+ else {
704
+ return this._createDepthStencilTexture(size, options, rtWrapper);
705
+ }
706
+ };
707
+
708
+ AbstractEngine.prototype.displayLoadingUI = function () {
709
+ if (!IsWindowObjectExist()) {
710
+ return;
711
+ }
712
+ const loadingScreen = this.loadingScreen;
713
+ if (loadingScreen) {
714
+ loadingScreen.displayLoadingUI();
715
+ }
716
+ };
717
+ AbstractEngine.prototype.hideLoadingUI = function () {
718
+ if (!IsWindowObjectExist()) {
719
+ return;
720
+ }
721
+ const loadingScreen = this._loadingScreen;
722
+ if (loadingScreen) {
723
+ loadingScreen.hideLoadingUI();
724
+ }
725
+ };
726
+ Object.defineProperty(AbstractEngine.prototype, "loadingScreen", {
727
+ get: function () {
728
+ if (!this._loadingScreen && this._renderingCanvas) {
729
+ this._loadingScreen = AbstractEngine.DefaultLoadingScreenFactory(this._renderingCanvas);
730
+ }
731
+ return this._loadingScreen;
732
+ },
733
+ set: function (value) {
734
+ this._loadingScreen = value;
735
+ },
736
+ enumerable: true,
737
+ configurable: true,
738
+ });
739
+ Object.defineProperty(AbstractEngine.prototype, "loadingUIText", {
740
+ set: function (value) {
741
+ this.loadingScreen.loadingUIText = value;
742
+ },
743
+ enumerable: true,
744
+ configurable: true,
745
+ });
746
+ Object.defineProperty(AbstractEngine.prototype, "loadingUIBackgroundColor", {
747
+ set: function (value) {
748
+ this.loadingScreen.loadingUIBackgroundColor = value;
749
+ },
750
+ enumerable: true,
751
+ configurable: true,
752
+ });
753
+
754
+ AbstractEngine.prototype.getInputElement = function () {
755
+ return this._renderingCanvas;
756
+ };
757
+ AbstractEngine.prototype.getRenderingCanvasClientRect = function () {
758
+ if (!this._renderingCanvas) {
759
+ return null;
760
+ }
761
+ return this._renderingCanvas.getBoundingClientRect();
762
+ };
763
+ AbstractEngine.prototype.getInputElementClientRect = function () {
764
+ if (!this._renderingCanvas) {
765
+ return null;
766
+ }
767
+ return this.getInputElement().getBoundingClientRect();
768
+ };
769
+ AbstractEngine.prototype.getAspectRatio = function (viewportOwner, useScreen = false) {
770
+ const viewport = viewportOwner.viewport;
771
+ return (this.getRenderWidth(useScreen) * viewport.width) / (this.getRenderHeight(useScreen) * viewport.height);
772
+ };
773
+ AbstractEngine.prototype.getScreenAspectRatio = function () {
774
+ return this.getRenderWidth(true) / this.getRenderHeight(true);
775
+ };
776
+ AbstractEngine.prototype._verifyPointerLock = function () {
777
+ this._onPointerLockChange?.();
778
+ };
779
+
780
+ AbstractEngine.prototype.setAlphaEquation = function (equation) {
781
+ if (this._alphaEquation === equation) {
782
+ return;
783
+ }
784
+ switch (equation) {
785
+ case Constants.ALPHA_EQUATION_ADD:
786
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_ADD, Constants.GL_ALPHA_EQUATION_ADD);
787
+ break;
788
+ case Constants.ALPHA_EQUATION_SUBSTRACT:
789
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_SUBTRACT, Constants.GL_ALPHA_EQUATION_SUBTRACT);
790
+ break;
791
+ case Constants.ALPHA_EQUATION_REVERSE_SUBTRACT:
792
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_REVERSE_SUBTRACT, Constants.GL_ALPHA_EQUATION_REVERSE_SUBTRACT);
793
+ break;
794
+ case Constants.ALPHA_EQUATION_MAX:
795
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_MAX, Constants.GL_ALPHA_EQUATION_MAX);
796
+ break;
797
+ case Constants.ALPHA_EQUATION_MIN:
798
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_MIN, Constants.GL_ALPHA_EQUATION_MIN);
799
+ break;
800
+ case Constants.ALPHA_EQUATION_DARKEN:
801
+ this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_MIN, Constants.GL_ALPHA_EQUATION_ADD);
802
+ break;
803
+ }
804
+ this._alphaEquation = equation;
805
+ };
806
+
807
+ AbstractEngine.prototype.getInputElement = function () {
808
+ return this._renderingCanvas;
809
+ };
810
+ AbstractEngine.prototype.getDepthFunction = function () {
811
+ return this._depthCullingState.depthFunc;
812
+ };
813
+ AbstractEngine.prototype.setDepthFunction = function (depthFunc) {
814
+ this._depthCullingState.depthFunc = depthFunc;
815
+ };
816
+ AbstractEngine.prototype.setDepthFunctionToGreater = function () {
817
+ this.setDepthFunction(Constants.GREATER);
818
+ };
819
+ AbstractEngine.prototype.setDepthFunctionToGreaterOrEqual = function () {
820
+ this.setDepthFunction(Constants.GEQUAL);
821
+ };
822
+ AbstractEngine.prototype.setDepthFunctionToLess = function () {
823
+ this.setDepthFunction(Constants.LESS);
824
+ };
825
+ AbstractEngine.prototype.setDepthFunctionToLessOrEqual = function () {
826
+ this.setDepthFunction(Constants.LEQUAL);
827
+ };
828
+ AbstractEngine.prototype.getDepthWrite = function () {
829
+ return this._depthCullingState.depthMask;
830
+ };
831
+ AbstractEngine.prototype.setDepthWrite = function (enable) {
832
+ this._depthCullingState.depthMask = enable;
833
+ };
834
+ AbstractEngine.prototype.getStencilBuffer = function () {
835
+ return this._stencilState.stencilTest;
836
+ };
837
+ AbstractEngine.prototype.setStencilBuffer = function (enable) {
838
+ this._stencilState.stencilTest = enable;
839
+ };
840
+ AbstractEngine.prototype.getStencilMask = function () {
841
+ return this._stencilState.stencilMask;
842
+ };
843
+ AbstractEngine.prototype.setStencilMask = function (mask) {
844
+ this._stencilState.stencilMask = mask;
845
+ };
846
+ AbstractEngine.prototype.getStencilFunction = function () {
847
+ return this._stencilState.stencilFunc;
848
+ };
849
+ AbstractEngine.prototype.getStencilFunctionReference = function () {
850
+ return this._stencilState.stencilFuncRef;
851
+ };
852
+ AbstractEngine.prototype.getStencilFunctionMask = function () {
853
+ return this._stencilState.stencilFuncMask;
854
+ };
855
+ AbstractEngine.prototype.setStencilFunction = function (stencilFunc) {
856
+ this._stencilState.stencilFunc = stencilFunc;
857
+ };
858
+ AbstractEngine.prototype.setStencilFunctionReference = function (reference) {
859
+ this._stencilState.stencilFuncRef = reference;
860
+ };
861
+ AbstractEngine.prototype.setStencilFunctionMask = function (mask) {
862
+ this._stencilState.stencilFuncMask = mask;
863
+ };
864
+ AbstractEngine.prototype.getStencilOperationFail = function () {
865
+ return this._stencilState.stencilOpStencilFail;
866
+ };
867
+ AbstractEngine.prototype.getStencilOperationDepthFail = function () {
868
+ return this._stencilState.stencilOpDepthFail;
869
+ };
870
+ AbstractEngine.prototype.getStencilOperationPass = function () {
871
+ return this._stencilState.stencilOpStencilDepthPass;
872
+ };
873
+ AbstractEngine.prototype.setStencilOperationFail = function (operation) {
874
+ this._stencilState.stencilOpStencilFail = operation;
875
+ };
876
+ AbstractEngine.prototype.setStencilOperationDepthFail = function (operation) {
877
+ this._stencilState.stencilOpDepthFail = operation;
878
+ };
879
+ AbstractEngine.prototype.setStencilOperationPass = function (operation) {
880
+ this._stencilState.stencilOpStencilDepthPass = operation;
881
+ };
882
+ AbstractEngine.prototype.cacheStencilState = function () {
883
+ this._cachedStencilBuffer = this.getStencilBuffer();
884
+ this._cachedStencilFunction = this.getStencilFunction();
885
+ this._cachedStencilMask = this.getStencilMask();
886
+ this._cachedStencilOperationPass = this.getStencilOperationPass();
887
+ this._cachedStencilOperationFail = this.getStencilOperationFail();
888
+ this._cachedStencilOperationDepthFail = this.getStencilOperationDepthFail();
889
+ this._cachedStencilReference = this.getStencilFunctionReference();
890
+ };
891
+ AbstractEngine.prototype.restoreStencilState = function () {
892
+ this.setStencilFunction(this._cachedStencilFunction);
893
+ this.setStencilMask(this._cachedStencilMask);
894
+ this.setStencilBuffer(this._cachedStencilBuffer);
895
+ this.setStencilOperationPass(this._cachedStencilOperationPass);
896
+ this.setStencilOperationFail(this._cachedStencilOperationFail);
897
+ this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail);
898
+ this.setStencilFunctionReference(this._cachedStencilReference);
899
+ };
900
+ AbstractEngine.prototype.setAlphaConstants = function (r, g, b, a) {
901
+ this._alphaState.setAlphaBlendConstants(r, g, b, a);
902
+ };
903
+ AbstractEngine.prototype.getAlphaMode = function () {
904
+ return this._alphaMode;
905
+ };
906
+ AbstractEngine.prototype.getAlphaEquation = function () {
907
+ return this._alphaEquation;
908
+ };
909
+
910
+ AbstractEngine.prototype.getRenderPassNames = function () {
911
+ return this._renderPassNames;
912
+ };
913
+ AbstractEngine.prototype.getCurrentRenderPassName = function () {
914
+ return this._renderPassNames[this.currentRenderPassId];
915
+ };
916
+ AbstractEngine.prototype.createRenderPassId = function (name) {
917
+ // Note: render pass id == 0 is always for the main render pass
918
+ const id = ++AbstractEngine._RenderPassIdCounter;
919
+ this._renderPassNames[id] = name ?? "NONAME";
920
+ return id;
921
+ };
922
+ AbstractEngine.prototype.releaseRenderPassId = function (id) {
923
+ this._renderPassNames[id] = undefined;
924
+ for (let s = 0; s < this.scenes.length; ++s) {
925
+ const scene = this.scenes[s];
926
+ for (let m = 0; m < scene.meshes.length; ++m) {
927
+ const mesh = scene.meshes[m];
928
+ if (mesh.subMeshes) {
929
+ for (let b = 0; b < mesh.subMeshes.length; ++b) {
930
+ const subMesh = mesh.subMeshes[b];
931
+ subMesh._removeDrawWrapper(id);
932
+ }
933
+ }
934
+ }
935
+ }
936
+ };
937
+
938
+ /** @internal */
939
+ function _DisableTouchAction(canvas) {
940
+ if (!canvas || !canvas.setAttribute) {
941
+ return;
942
+ }
943
+ canvas.setAttribute("touch-action", "none");
944
+ canvas.style.touchAction = "none";
945
+ canvas.style.webkitTapHighlightColor = "transparent";
946
+ }
947
+ /** @internal */
948
+ function _CommonInit(commonEngine, canvas, creationOptions) {
949
+ commonEngine._onCanvasFocus = () => {
950
+ commonEngine.onCanvasFocusObservable.notifyObservers(commonEngine);
951
+ };
952
+ commonEngine._onCanvasBlur = () => {
953
+ commonEngine.onCanvasBlurObservable.notifyObservers(commonEngine);
954
+ };
955
+ commonEngine._onCanvasContextMenu = (evt) => {
956
+ if (commonEngine.disableContextMenu) {
957
+ evt.preventDefault();
958
+ }
959
+ };
960
+ canvas.addEventListener("focus", commonEngine._onCanvasFocus);
961
+ canvas.addEventListener("blur", commonEngine._onCanvasBlur);
962
+ canvas.addEventListener("contextmenu", commonEngine._onCanvasContextMenu);
963
+ commonEngine._onBlur = () => {
964
+ if (commonEngine.disablePerformanceMonitorInBackground) {
965
+ commonEngine.performanceMonitor.disable();
966
+ }
967
+ commonEngine._windowIsBackground = true;
968
+ };
969
+ commonEngine._onFocus = () => {
970
+ if (commonEngine.disablePerformanceMonitorInBackground) {
971
+ commonEngine.performanceMonitor.enable();
972
+ }
973
+ commonEngine._windowIsBackground = false;
974
+ };
975
+ commonEngine._onCanvasPointerOut = (ev) => {
976
+ // Check that the element at the point of the pointer out isn't the canvas and if it isn't, notify observers
977
+ // Note: This is a workaround for a bug with Safari
978
+ if (document.elementFromPoint(ev.clientX, ev.clientY) !== canvas) {
979
+ commonEngine.onCanvasPointerOutObservable.notifyObservers(ev);
980
+ }
981
+ };
982
+ const hostWindow = commonEngine.getHostWindow(); // it calls IsWindowObjectExist()
983
+ if (hostWindow && typeof hostWindow.addEventListener === "function") {
984
+ hostWindow.addEventListener("blur", commonEngine._onBlur);
985
+ hostWindow.addEventListener("focus", commonEngine._onFocus);
986
+ }
987
+ canvas.addEventListener("pointerout", commonEngine._onCanvasPointerOut);
988
+ if (!creationOptions.doNotHandleTouchAction) {
989
+ _DisableTouchAction(canvas);
990
+ }
991
+ // Create Audio Engine if needed.
992
+ if (!AbstractEngine.audioEngine && creationOptions.audioEngine && AbstractEngine.AudioEngineFactory) {
993
+ AbstractEngine.audioEngine = AbstractEngine.AudioEngineFactory(commonEngine.getRenderingCanvas(), commonEngine.getAudioContext(), commonEngine.getAudioDestination());
994
+ }
995
+ if (IsDocumentAvailable()) {
996
+ // Fullscreen
997
+ commonEngine._onFullscreenChange = () => {
998
+ commonEngine.isFullscreen = !!document.fullscreenElement;
999
+ // Pointer lock
1000
+ if (commonEngine.isFullscreen && commonEngine._pointerLockRequested && canvas) {
1001
+ RequestPointerlock(canvas);
1002
+ }
1003
+ };
1004
+ document.addEventListener("fullscreenchange", commonEngine._onFullscreenChange, false);
1005
+ document.addEventListener("webkitfullscreenchange", commonEngine._onFullscreenChange, false);
1006
+ // Pointer lock
1007
+ commonEngine._onPointerLockChange = () => {
1008
+ commonEngine.isPointerLock = document.pointerLockElement === canvas;
1009
+ };
1010
+ document.addEventListener("pointerlockchange", commonEngine._onPointerLockChange, false);
1011
+ document.addEventListener("webkitpointerlockchange", commonEngine._onPointerLockChange, false);
1012
+ }
1013
+ commonEngine.enableOfflineSupport = AbstractEngine.OfflineProviderFactory !== undefined;
1014
+ commonEngine._deterministicLockstep = !!creationOptions.deterministicLockstep;
1015
+ commonEngine._lockstepMaxSteps = creationOptions.lockstepMaxSteps || 0;
1016
+ commonEngine._timeStep = creationOptions.timeStep || 1 / 60;
1017
+ }
1018
+ /** @internal */
1019
+ function _CommonDispose(commonEngine, canvas) {
1020
+ // Release audio engine
1021
+ if (EngineStore.Instances.length === 1 && AbstractEngine.audioEngine) {
1022
+ AbstractEngine.audioEngine.dispose();
1023
+ AbstractEngine.audioEngine = null;
1024
+ }
1025
+ // Events
1026
+ const hostWindow = commonEngine.getHostWindow(); // it calls IsWindowObjectExist()
1027
+ if (hostWindow && typeof hostWindow.removeEventListener === "function") {
1028
+ hostWindow.removeEventListener("blur", commonEngine._onBlur);
1029
+ hostWindow.removeEventListener("focus", commonEngine._onFocus);
1030
+ }
1031
+ if (canvas) {
1032
+ canvas.removeEventListener("focus", commonEngine._onCanvasFocus);
1033
+ canvas.removeEventListener("blur", commonEngine._onCanvasBlur);
1034
+ canvas.removeEventListener("pointerout", commonEngine._onCanvasPointerOut);
1035
+ canvas.removeEventListener("contextmenu", commonEngine._onCanvasContextMenu);
1036
+ }
1037
+ if (IsDocumentAvailable()) {
1038
+ document.removeEventListener("fullscreenchange", commonEngine._onFullscreenChange);
1039
+ document.removeEventListener("mozfullscreenchange", commonEngine._onFullscreenChange);
1040
+ document.removeEventListener("webkitfullscreenchange", commonEngine._onFullscreenChange);
1041
+ document.removeEventListener("msfullscreenchange", commonEngine._onFullscreenChange);
1042
+ document.removeEventListener("pointerlockchange", commonEngine._onPointerLockChange);
1043
+ document.removeEventListener("mspointerlockchange", commonEngine._onPointerLockChange);
1044
+ document.removeEventListener("mozpointerlockchange", commonEngine._onPointerLockChange);
1045
+ document.removeEventListener("webkitpointerlockchange", commonEngine._onPointerLockChange);
1046
+ }
1047
+ }
1048
+ /**
1049
+ * Get Font size information
1050
+ * @param font font name
1051
+ * @returns an object containing ascent, height and descent
1052
+ */
1053
+ function GetFontOffset(font) {
1054
+ const text = document.createElement("span");
1055
+ text.textContent = "Hg";
1056
+ text.style.font = font;
1057
+ const block = document.createElement("div");
1058
+ block.style.display = "inline-block";
1059
+ block.style.width = "1px";
1060
+ block.style.height = "0px";
1061
+ block.style.verticalAlign = "bottom";
1062
+ const div = document.createElement("div");
1063
+ div.style.whiteSpace = "nowrap";
1064
+ div.appendChild(text);
1065
+ div.appendChild(block);
1066
+ document.body.appendChild(div);
1067
+ let fontAscent = 0;
1068
+ let fontHeight = 0;
1069
+ try {
1070
+ fontHeight = block.getBoundingClientRect().top - text.getBoundingClientRect().top;
1071
+ block.style.verticalAlign = "baseline";
1072
+ fontAscent = block.getBoundingClientRect().top - text.getBoundingClientRect().top;
1073
+ }
1074
+ finally {
1075
+ document.body.removeChild(div);
1076
+ }
1077
+ return { ascent: fontAscent, height: fontHeight, descent: fontHeight - fontAscent };
1078
+ }
1079
+ /** @internal */
1080
+ function CreateImageBitmapFromSource(engine, imageSource, options) {
1081
+ const promise = new Promise((resolve, reject) => {
1082
+ const image = new Image();
1083
+ image.onload = () => {
1084
+ image.decode().then(() => {
1085
+ engine.createImageBitmap(image, options).then((imageBitmap) => {
1086
+ resolve(imageBitmap);
1087
+ });
1088
+ });
1089
+ };
1090
+ image.onerror = () => {
1091
+ reject(`Error loading image ${image.src}`);
1092
+ };
1093
+ image.src = imageSource;
1094
+ });
1095
+ return promise;
1096
+ }
1097
+ /** @internal */
1098
+ function ResizeImageBitmap(engine, image, bufferWidth, bufferHeight) {
1099
+ const canvas = engine.createCanvas(bufferWidth, bufferHeight);
1100
+ const context = canvas.getContext("2d");
1101
+ if (!context) {
1102
+ throw new Error("Unable to get 2d context for resizeImageBitmap");
1103
+ }
1104
+ context.drawImage(image, 0, 0);
1105
+ // Create VertexData from map data
1106
+ // Cast is due to wrong definition in lib.d.ts from ts 1.3 - https://github.com/Microsoft/TypeScript/issues/949
1107
+ const buffer = context.getImageData(0, 0, bufferWidth, bufferHeight).data;
1108
+ return buffer;
1109
+ }
1110
+ /**
1111
+ * Ask the browser to promote the current element to fullscreen rendering mode
1112
+ * @param element defines the DOM element to promote
1113
+ */
1114
+ function RequestFullscreen(element) {
1115
+ const requestFunction = element.requestFullscreen || element.webkitRequestFullscreen;
1116
+ if (!requestFunction) {
1117
+ return;
1118
+ }
1119
+ requestFunction.call(element);
1120
+ }
1121
+ /**
1122
+ * Asks the browser to exit fullscreen mode
1123
+ */
1124
+ function ExitFullscreen() {
1125
+ const anyDoc = document;
1126
+ if (document.exitFullscreen) {
1127
+ document.exitFullscreen();
1128
+ }
1129
+ else if (anyDoc.webkitCancelFullScreen) {
1130
+ anyDoc.webkitCancelFullScreen();
1131
+ }
1132
+ }
1133
+ /**
1134
+ * Ask the browser to promote the current element to pointerlock mode
1135
+ * @param element defines the DOM element to promote
1136
+ */
1137
+ function RequestPointerlock(element) {
1138
+ if (element.requestPointerLock) {
1139
+ // In some browsers, requestPointerLock returns a promise.
1140
+ // Handle possible rejections to avoid an unhandled top-level exception.
1141
+ const promise = element.requestPointerLock();
1142
+ if (promise instanceof Promise)
1143
+ promise
1144
+ .then(() => {
1145
+ element.focus();
1146
+ })
1147
+ .catch(() => { });
1148
+ else
1149
+ element.focus();
1150
+ }
1151
+ }
1152
+ /**
1153
+ * Asks the browser to exit pointerlock mode
1154
+ */
1155
+ function ExitPointerlock() {
1156
+ if (document.exitPointerLock) {
1157
+ document.exitPointerLock();
1158
+ }
1159
+ }
1160
+
1161
+ export { CreateImageBitmapFromSource as C, ExitFullscreen as E, GetFontOffset as G, PerformanceMonitor as P, RenderTargetWrapper as R, _CommonInit as _, ResizeImageBitmap as a, RequestFullscreen as b, RequestPointerlock as c, ExitPointerlock as d, _CommonDispose as e };
1162
+ //# sourceMappingURL=engine.common-D_DOB0rT.esm.js.map