@babylonjs/viewer 7.25.1 → 7.25.2-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 (530) hide show
  1. package/dist/babylon-viewer.esm.js +2 -0
  2. package/dist/babylon-viewer.esm.js.map +1 -0
  3. package/dist/babylon-viewer.esm.min.js +2 -0
  4. package/dist/babylon-viewer.esm.min.js.map +1 -0
  5. package/dist/chunks/EXT_lights_image_based-BH3hZg5O.esm.min.js +2 -0
  6. package/dist/chunks/EXT_lights_image_based-BH3hZg5O.esm.min.js.map +1 -0
  7. package/dist/chunks/EXT_lights_image_based-DzfllwXH.esm.js +170 -0
  8. package/dist/chunks/EXT_lights_image_based-DzfllwXH.esm.js.map +1 -0
  9. package/dist/chunks/EXT_mesh_gpu_instancing-C9OEhnvW.esm.js +86 -0
  10. package/dist/chunks/EXT_mesh_gpu_instancing-C9OEhnvW.esm.js.map +1 -0
  11. package/dist/chunks/EXT_mesh_gpu_instancing-CXIBSaqJ.esm.min.js +2 -0
  12. package/dist/chunks/EXT_mesh_gpu_instancing-CXIBSaqJ.esm.min.js.map +1 -0
  13. package/dist/chunks/EXT_meshopt_compression-FHhysyRP.esm.min.js +2 -0
  14. package/dist/chunks/EXT_meshopt_compression-FHhysyRP.esm.min.js.map +1 -0
  15. package/dist/chunks/EXT_meshopt_compression-MDnzeuix.esm.js +134 -0
  16. package/dist/chunks/EXT_meshopt_compression-MDnzeuix.esm.js.map +1 -0
  17. package/dist/chunks/EXT_texture_avif-DYg5PN0r.esm.js +44 -0
  18. package/dist/chunks/EXT_texture_avif-DYg5PN0r.esm.js.map +1 -0
  19. package/dist/chunks/EXT_texture_avif-aYOG80m1.esm.min.js +2 -0
  20. package/dist/chunks/EXT_texture_avif-aYOG80m1.esm.min.js.map +1 -0
  21. package/dist/chunks/EXT_texture_webp-C4SoS8oM.esm.min.js +2 -0
  22. package/dist/chunks/EXT_texture_webp-C4SoS8oM.esm.min.js.map +1 -0
  23. package/dist/chunks/EXT_texture_webp-CFXwdFPL.esm.js +43 -0
  24. package/dist/chunks/EXT_texture_webp-CFXwdFPL.esm.js.map +1 -0
  25. package/dist/chunks/ExtrasAsMetadata-0irOjN40.esm.min.js +2 -0
  26. package/dist/chunks/ExtrasAsMetadata-0irOjN40.esm.min.js.map +1 -0
  27. package/dist/chunks/ExtrasAsMetadata-CMMGMmGq.esm.js +64 -0
  28. package/dist/chunks/ExtrasAsMetadata-CMMGMmGq.esm.js.map +1 -0
  29. package/dist/chunks/KHR_animation_pointer-BP1GTrPy.esm.js +343 -0
  30. package/dist/chunks/KHR_animation_pointer-BP1GTrPy.esm.js.map +1 -0
  31. package/dist/chunks/KHR_animation_pointer-DYUHlqMb.esm.min.js +2 -0
  32. package/dist/chunks/KHR_animation_pointer-DYUHlqMb.esm.min.js.map +1 -0
  33. package/dist/chunks/KHR_draco_mesh_compression-1__XqV2v.esm.js +610 -0
  34. package/dist/chunks/KHR_draco_mesh_compression-1__XqV2v.esm.js.map +1 -0
  35. package/dist/chunks/KHR_draco_mesh_compression-DugkDX1-.esm.min.js +2 -0
  36. package/dist/chunks/KHR_draco_mesh_compression-DugkDX1-.esm.min.js.map +1 -0
  37. package/dist/chunks/KHR_interactivity-CG9wdbbE.esm.js +4033 -0
  38. package/dist/chunks/KHR_interactivity-CG9wdbbE.esm.js.map +1 -0
  39. package/dist/chunks/KHR_interactivity-DTEAfXZw.esm.min.js +2 -0
  40. package/dist/chunks/KHR_interactivity-DTEAfXZw.esm.min.js.map +1 -0
  41. package/dist/chunks/KHR_lights_punctual-BJoC3s-k.esm.js +1253 -0
  42. package/dist/chunks/KHR_lights_punctual-BJoC3s-k.esm.js.map +1 -0
  43. package/dist/chunks/KHR_lights_punctual-CJ8IXFIN.esm.min.js +2 -0
  44. package/dist/chunks/KHR_lights_punctual-CJ8IXFIN.esm.min.js.map +1 -0
  45. package/dist/chunks/KHR_materials_anisotropy-D-JkJqtx.esm.min.js +2 -0
  46. package/dist/chunks/KHR_materials_anisotropy-D-JkJqtx.esm.min.js.map +1 -0
  47. package/dist/chunks/KHR_materials_anisotropy-vQUJOfyf.esm.js +64 -0
  48. package/dist/chunks/KHR_materials_anisotropy-vQUJOfyf.esm.js.map +1 -0
  49. package/dist/chunks/KHR_materials_clearcoat-DGkjpld9.esm.js +96 -0
  50. package/dist/chunks/KHR_materials_clearcoat-DGkjpld9.esm.js.map +1 -0
  51. package/dist/chunks/KHR_materials_clearcoat-D_sScrmJ.esm.min.js +2 -0
  52. package/dist/chunks/KHR_materials_clearcoat-D_sScrmJ.esm.min.js.map +1 -0
  53. package/dist/chunks/KHR_materials_diffuse_transmission-B-AVMVdy.esm.js +97 -0
  54. package/dist/chunks/KHR_materials_diffuse_transmission-B-AVMVdy.esm.js.map +1 -0
  55. package/dist/chunks/KHR_materials_diffuse_transmission-D89RzboR.esm.min.js +2 -0
  56. package/dist/chunks/KHR_materials_diffuse_transmission-D89RzboR.esm.min.js.map +1 -0
  57. package/dist/chunks/KHR_materials_dispersion-B8b6MXDS.esm.min.js +2 -0
  58. package/dist/chunks/KHR_materials_dispersion-B8b6MXDS.esm.min.js.map +1 -0
  59. package/dist/chunks/KHR_materials_dispersion-Biijd7CZ.esm.js +62 -0
  60. package/dist/chunks/KHR_materials_dispersion-Biijd7CZ.esm.js.map +1 -0
  61. package/dist/chunks/KHR_materials_emissive_strength-CphmP7Mx.esm.min.js +2 -0
  62. package/dist/chunks/KHR_materials_emissive_strength-CphmP7Mx.esm.min.js.map +1 -0
  63. package/dist/chunks/KHR_materials_emissive_strength-HYht21Ls.esm.js +55 -0
  64. package/dist/chunks/KHR_materials_emissive_strength-HYht21Ls.esm.js.map +1 -0
  65. package/dist/chunks/KHR_materials_ior-CMHiVWXF.esm.js +64 -0
  66. package/dist/chunks/KHR_materials_ior-CMHiVWXF.esm.js.map +1 -0
  67. package/dist/chunks/KHR_materials_ior-Dtd5Uruf.esm.min.js +2 -0
  68. package/dist/chunks/KHR_materials_ior-Dtd5Uruf.esm.min.js.map +1 -0
  69. package/dist/chunks/KHR_materials_iridescence-BPYqwadf.esm.min.js +2 -0
  70. package/dist/chunks/KHR_materials_iridescence-BPYqwadf.esm.min.js.map +1 -0
  71. package/dist/chunks/KHR_materials_iridescence-uiK5wAia.esm.js +72 -0
  72. package/dist/chunks/KHR_materials_iridescence-uiK5wAia.esm.js.map +1 -0
  73. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-At-foveb.esm.js +81 -0
  74. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-At-foveb.esm.js.map +1 -0
  75. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D-0vzv_p.esm.min.js +2 -0
  76. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D-0vzv_p.esm.min.js.map +1 -0
  77. package/dist/chunks/KHR_materials_sheen-D9QlTIrL.esm.min.js +2 -0
  78. package/dist/chunks/KHR_materials_sheen-D9QlTIrL.esm.min.js.map +1 -0
  79. package/dist/chunks/KHR_materials_sheen-D_dNVJOm.esm.js +85 -0
  80. package/dist/chunks/KHR_materials_sheen-D_dNVJOm.esm.js.map +1 -0
  81. package/dist/chunks/KHR_materials_specular-BoPxT-Mo.esm.min.js +2 -0
  82. package/dist/chunks/KHR_materials_specular-BoPxT-Mo.esm.min.js.map +1 -0
  83. package/dist/chunks/KHR_materials_specular-DQxjj2Cx.esm.js +75 -0
  84. package/dist/chunks/KHR_materials_specular-DQxjj2Cx.esm.js.map +1 -0
  85. package/dist/chunks/KHR_materials_transmission-BFM7Cmhe.esm.js +307 -0
  86. package/dist/chunks/KHR_materials_transmission-BFM7Cmhe.esm.js.map +1 -0
  87. package/dist/chunks/KHR_materials_transmission-Cmv46WbD.esm.min.js +2 -0
  88. package/dist/chunks/KHR_materials_transmission-Cmv46WbD.esm.min.js.map +1 -0
  89. package/dist/chunks/KHR_materials_unlit-5NSHSTuh.esm.js +74 -0
  90. package/dist/chunks/KHR_materials_unlit-5NSHSTuh.esm.js.map +1 -0
  91. package/dist/chunks/KHR_materials_unlit-D0eVH4Om.esm.min.js +2 -0
  92. package/dist/chunks/KHR_materials_unlit-D0eVH4Om.esm.min.js.map +1 -0
  93. package/dist/chunks/KHR_materials_variants-DV9kQ9N0.esm.js +238 -0
  94. package/dist/chunks/KHR_materials_variants-DV9kQ9N0.esm.js.map +1 -0
  95. package/dist/chunks/KHR_materials_variants-q_OSyG78.esm.min.js +2 -0
  96. package/dist/chunks/KHR_materials_variants-q_OSyG78.esm.min.js.map +1 -0
  97. package/dist/chunks/KHR_materials_volume-B-2guGwk.esm.min.js +2 -0
  98. package/dist/chunks/KHR_materials_volume-B-2guGwk.esm.min.js.map +1 -0
  99. package/dist/chunks/KHR_materials_volume-ByNJMyHb.esm.js +87 -0
  100. package/dist/chunks/KHR_materials_volume-ByNJMyHb.esm.js.map +1 -0
  101. package/dist/chunks/KHR_mesh_quantization-B-dDY2nG.esm.min.js +2 -0
  102. package/dist/chunks/KHR_mesh_quantization-B-dDY2nG.esm.min.js.map +1 -0
  103. package/dist/chunks/KHR_mesh_quantization-CtRIMI9n.esm.js +26 -0
  104. package/dist/chunks/KHR_mesh_quantization-CtRIMI9n.esm.js.map +1 -0
  105. package/dist/chunks/KHR_texture_basisu-Bpv_M6W8.esm.js +43 -0
  106. package/dist/chunks/KHR_texture_basisu-Bpv_M6W8.esm.js.map +1 -0
  107. package/dist/chunks/KHR_texture_basisu-CDZ_8ojt.esm.min.js +2 -0
  108. package/dist/chunks/KHR_texture_basisu-CDZ_8ojt.esm.min.js.map +1 -0
  109. package/dist/chunks/KHR_texture_transform-DR04vBMi.esm.js +63 -0
  110. package/dist/chunks/KHR_texture_transform-DR04vBMi.esm.js.map +1 -0
  111. package/dist/chunks/KHR_texture_transform-Dxlw1ALx.esm.min.js +2 -0
  112. package/dist/chunks/KHR_texture_transform-Dxlw1ALx.esm.min.js.map +1 -0
  113. package/dist/chunks/KHR_xmp_json_ld-BE7tnUAA.esm.js +51 -0
  114. package/dist/chunks/KHR_xmp_json_ld-BE7tnUAA.esm.js.map +1 -0
  115. package/dist/chunks/KHR_xmp_json_ld-Cba_e7FN.esm.min.js +2 -0
  116. package/dist/chunks/KHR_xmp_json_ld-Cba_e7FN.esm.min.js.map +1 -0
  117. package/dist/chunks/MSFT_audio_emitter-C7N149TS.esm.min.js +2 -0
  118. package/dist/chunks/MSFT_audio_emitter-C7N149TS.esm.min.js.map +1 -0
  119. package/dist/chunks/MSFT_audio_emitter-Dli0UATE.esm.js +2236 -0
  120. package/dist/chunks/MSFT_audio_emitter-Dli0UATE.esm.js.map +1 -0
  121. package/dist/chunks/MSFT_lod-B_XcOQr8.esm.min.js +2 -0
  122. package/dist/chunks/MSFT_lod-B_XcOQr8.esm.min.js.map +1 -0
  123. package/dist/chunks/MSFT_lod-Ce-KRZp9.esm.js +337 -0
  124. package/dist/chunks/MSFT_lod-Ce-KRZp9.esm.js.map +1 -0
  125. package/dist/chunks/MSFT_minecraftMesh-C1iLB8-L.esm.min.js +2 -0
  126. package/dist/chunks/MSFT_minecraftMesh-C1iLB8-L.esm.min.js.map +1 -0
  127. package/dist/chunks/MSFT_minecraftMesh-D7vFOPNh.esm.js +46 -0
  128. package/dist/chunks/MSFT_minecraftMesh-D7vFOPNh.esm.js.map +1 -0
  129. package/dist/chunks/MSFT_sRGBFactors-DCJApvhI.esm.js +47 -0
  130. package/dist/chunks/MSFT_sRGBFactors-DCJApvhI.esm.js.map +1 -0
  131. package/dist/chunks/MSFT_sRGBFactors-IRTTNK8h.esm.min.js +2 -0
  132. package/dist/chunks/MSFT_sRGBFactors-IRTTNK8h.esm.min.js.map +1 -0
  133. package/dist/chunks/assetContainer-9BV4w6Ec.esm.js +1598 -0
  134. package/dist/chunks/assetContainer-9BV4w6Ec.esm.js.map +1 -0
  135. package/dist/chunks/assetContainer-Cu6LKJHz.esm.min.js +2 -0
  136. package/dist/chunks/assetContainer-Cu6LKJHz.esm.min.js.map +1 -0
  137. package/dist/chunks/audioEngine-Bh-HZCai.esm.min.js +2 -0
  138. package/dist/chunks/audioEngine-Bh-HZCai.esm.min.js.map +1 -0
  139. package/dist/chunks/audioEngine-pydGAEd8.esm.js +305 -0
  140. package/dist/chunks/audioEngine-pydGAEd8.esm.js.map +1 -0
  141. package/dist/chunks/basisTextureLoader-BD8_wqQL.esm.min.js +2 -0
  142. package/dist/chunks/basisTextureLoader-BD8_wqQL.esm.min.js.map +1 -0
  143. package/dist/chunks/basisTextureLoader-JmRg1Sfn.esm.js +600 -0
  144. package/dist/chunks/basisTextureLoader-JmRg1Sfn.esm.js.map +1 -0
  145. package/dist/chunks/ddsTextureLoader-Bpjp8qSf.esm.js +87 -0
  146. package/dist/chunks/ddsTextureLoader-Bpjp8qSf.esm.js.map +1 -0
  147. package/dist/chunks/ddsTextureLoader-CEyJTB3O.esm.min.js +2 -0
  148. package/dist/chunks/ddsTextureLoader-CEyJTB3O.esm.min.js.map +1 -0
  149. package/dist/chunks/default.fragment-B11bdnrB.esm.min.js +2 -0
  150. package/dist/chunks/default.fragment-B11bdnrB.esm.min.js.map +1 -0
  151. package/dist/chunks/default.fragment-Bawtijue.esm.min.js +2 -0
  152. package/dist/chunks/default.fragment-Bawtijue.esm.min.js.map +1 -0
  153. package/dist/chunks/default.fragment-D3k4gvNV.esm.js +456 -0
  154. package/dist/chunks/default.fragment-D3k4gvNV.esm.js.map +1 -0
  155. package/dist/chunks/default.fragment-DL3qA9UG.esm.js +515 -0
  156. package/dist/chunks/default.fragment-DL3qA9UG.esm.js.map +1 -0
  157. package/dist/chunks/default.vertex-B7OOfc9A.esm.js +178 -0
  158. package/dist/chunks/default.vertex-B7OOfc9A.esm.js.map +1 -0
  159. package/dist/chunks/default.vertex-BKC2A0e0.esm.js +199 -0
  160. package/dist/chunks/default.vertex-BKC2A0e0.esm.js.map +1 -0
  161. package/dist/chunks/default.vertex-BRncvhAx.esm.min.js +2 -0
  162. package/dist/chunks/default.vertex-BRncvhAx.esm.min.js.map +1 -0
  163. package/dist/chunks/default.vertex-sJaJV_6d.esm.min.js +2 -0
  164. package/dist/chunks/default.vertex-sJaJV_6d.esm.min.js.map +1 -0
  165. package/dist/chunks/defaultUboDeclaration-C1JdSocs.esm.min.js +2 -0
  166. package/dist/chunks/defaultUboDeclaration-C1JdSocs.esm.min.js.map +1 -0
  167. package/dist/chunks/defaultUboDeclaration-Cszg1EQW.esm.js +13 -0
  168. package/dist/chunks/defaultUboDeclaration-Cszg1EQW.esm.js.map +1 -0
  169. package/dist/chunks/defaultUboDeclaration-DB7zHENU.esm.js +15 -0
  170. package/dist/chunks/defaultUboDeclaration-DB7zHENU.esm.js.map +1 -0
  171. package/dist/chunks/defaultUboDeclaration-XHlan1gc.esm.min.js +2 -0
  172. package/dist/chunks/defaultUboDeclaration-XHlan1gc.esm.min.js.map +1 -0
  173. package/dist/chunks/engine-DZrewcWP.esm.js +1613 -0
  174. package/dist/chunks/engine-DZrewcWP.esm.js.map +1 -0
  175. package/dist/chunks/engine-sFOTJhn4.esm.min.js +2 -0
  176. package/dist/chunks/engine-sFOTJhn4.esm.min.js.map +1 -0
  177. package/dist/chunks/envTextureLoader-DLAJXIl8.esm.min.js +2 -0
  178. package/dist/chunks/envTextureLoader-DLAJXIl8.esm.min.js.map +1 -0
  179. package/dist/chunks/envTextureLoader-DpLIoFjS.esm.js +63 -0
  180. package/dist/chunks/envTextureLoader-DpLIoFjS.esm.js.map +1 -0
  181. package/dist/chunks/environmentTextureTools-CiyJLBbf.esm.min.js +2 -0
  182. package/dist/chunks/environmentTextureTools-CiyJLBbf.esm.min.js.map +1 -0
  183. package/dist/chunks/environmentTextureTools-bPqq81in.esm.js +381 -0
  184. package/dist/chunks/environmentTextureTools-bPqq81in.esm.js.map +1 -0
  185. package/dist/chunks/exrTextureLoader-DJ7PbPlF.esm.min.js +2 -0
  186. package/dist/chunks/exrTextureLoader-DJ7PbPlF.esm.min.js.map +1 -0
  187. package/dist/chunks/exrTextureLoader-DYsBnFky.esm.js +1682 -0
  188. package/dist/chunks/exrTextureLoader-DYsBnFky.esm.js.map +1 -0
  189. package/dist/chunks/fogFragment-BLvD2fqs.esm.min.js +2 -0
  190. package/dist/chunks/fogFragment-BLvD2fqs.esm.min.js.map +1 -0
  191. package/dist/chunks/fogFragment-b0NlRwYe.esm.js +102 -0
  192. package/dist/chunks/fogFragment-b0NlRwYe.esm.js.map +1 -0
  193. package/dist/chunks/glTFLoader-BikrhFtn.esm.js +7552 -0
  194. package/dist/chunks/glTFLoader-BikrhFtn.esm.js.map +1 -0
  195. package/dist/chunks/glTFLoader-mZPFBYSM.esm.min.js +2 -0
  196. package/dist/chunks/glTFLoader-mZPFBYSM.esm.min.js.map +1 -0
  197. package/dist/chunks/glTFLoaderAnimation-BdwTR5Nl.esm.js +77 -0
  198. package/dist/chunks/glTFLoaderAnimation-BdwTR5Nl.esm.js.map +1 -0
  199. package/dist/chunks/glTFLoaderAnimation-CiKBDKnk.esm.min.js +2 -0
  200. package/dist/chunks/glTFLoaderAnimation-CiKBDKnk.esm.min.js.map +1 -0
  201. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  202. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  203. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  204. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  205. package/dist/chunks/harmonicsFunctions-C12V8Ng1.esm.js +35 -0
  206. package/dist/chunks/harmonicsFunctions-C12V8Ng1.esm.js.map +1 -0
  207. package/dist/chunks/harmonicsFunctions-CRoab7mv.esm.min.js +2 -0
  208. package/dist/chunks/harmonicsFunctions-CRoab7mv.esm.min.js.map +1 -0
  209. package/dist/chunks/harmonicsFunctions-CZi4YSE7.esm.js +34 -0
  210. package/dist/chunks/harmonicsFunctions-CZi4YSE7.esm.js.map +1 -0
  211. package/dist/chunks/harmonicsFunctions-GFzLo9xW.esm.min.js +2 -0
  212. package/dist/chunks/harmonicsFunctions-GFzLo9xW.esm.min.js.map +1 -0
  213. package/dist/chunks/hdrTextureLoader-CsWJNnG5.esm.js +252 -0
  214. package/dist/chunks/hdrTextureLoader-CsWJNnG5.esm.js.map +1 -0
  215. package/dist/chunks/hdrTextureLoader-Cwi3SM4o.esm.min.js +2 -0
  216. package/dist/chunks/hdrTextureLoader-Cwi3SM4o.esm.min.js.map +1 -0
  217. package/dist/chunks/helperFunctions-21b9-yGo.esm.min.js +2 -0
  218. package/dist/chunks/helperFunctions-21b9-yGo.esm.min.js.map +1 -0
  219. package/dist/chunks/helperFunctions-COVDWwPu.esm.js +80 -0
  220. package/dist/chunks/helperFunctions-COVDWwPu.esm.js.map +1 -0
  221. package/dist/chunks/helperFunctions-CQzJ5T38.esm.min.js +2 -0
  222. package/dist/chunks/helperFunctions-CQzJ5T38.esm.min.js.map +1 -0
  223. package/dist/chunks/helperFunctions-CUKI67ax.esm.js +108 -0
  224. package/dist/chunks/helperFunctions-CUKI67ax.esm.js.map +1 -0
  225. package/dist/chunks/index-5EaMDaGg.esm.js +79820 -0
  226. package/dist/chunks/index-5EaMDaGg.esm.js.map +1 -0
  227. package/dist/chunks/index-RwQCgcf4.esm.min.js +57 -0
  228. package/dist/chunks/index-RwQCgcf4.esm.min.js.map +1 -0
  229. package/dist/chunks/ktxTextureLoader-34pzZN2D.esm.js +814 -0
  230. package/dist/chunks/ktxTextureLoader-34pzZN2D.esm.js.map +1 -0
  231. package/dist/chunks/ktxTextureLoader-Dj2b7tTw.esm.min.js +2 -0
  232. package/dist/chunks/ktxTextureLoader-Dj2b7tTw.esm.min.js.map +1 -0
  233. package/dist/chunks/logDepthDeclaration-BTOfKIR5.esm.min.js +2 -0
  234. package/dist/chunks/logDepthDeclaration-BTOfKIR5.esm.min.js.map +1 -0
  235. package/dist/chunks/logDepthDeclaration-Boz5U8vN.esm.min.js +2 -0
  236. package/dist/chunks/logDepthDeclaration-Boz5U8vN.esm.min.js.map +1 -0
  237. package/dist/chunks/logDepthDeclaration-Dc0_n0rX.esm.js +42 -0
  238. package/dist/chunks/logDepthDeclaration-Dc0_n0rX.esm.js.map +1 -0
  239. package/dist/chunks/logDepthDeclaration-cImBekwl.esm.js +35 -0
  240. package/dist/chunks/logDepthDeclaration-cImBekwl.esm.js.map +1 -0
  241. package/dist/chunks/logDepthVertex-ABvK0V0R.esm.js +77 -0
  242. package/dist/chunks/logDepthVertex-ABvK0V0R.esm.js.map +1 -0
  243. package/dist/chunks/logDepthVertex-BA4bq6Km.esm.min.js +2 -0
  244. package/dist/chunks/logDepthVertex-BA4bq6Km.esm.min.js.map +1 -0
  245. package/dist/chunks/logDepthVertex-C7FgfYJH.esm.js +605 -0
  246. package/dist/chunks/logDepthVertex-C7FgfYJH.esm.js.map +1 -0
  247. package/dist/chunks/logDepthVertex-Da8gAKX-.esm.min.js +2 -0
  248. package/dist/chunks/logDepthVertex-Da8gAKX-.esm.min.js.map +1 -0
  249. package/dist/chunks/mainUVVaryingDeclaration-B-9VKUsa.esm.js +11 -0
  250. package/dist/chunks/mainUVVaryingDeclaration-B-9VKUsa.esm.js.map +1 -0
  251. package/dist/chunks/mainUVVaryingDeclaration-CNcp6TRG.esm.min.js +2 -0
  252. package/dist/chunks/mainUVVaryingDeclaration-CNcp6TRG.esm.min.js.map +1 -0
  253. package/dist/chunks/objFileLoader-3iAEdRPX.esm.js +1280 -0
  254. package/dist/chunks/objFileLoader-3iAEdRPX.esm.js.map +1 -0
  255. package/dist/chunks/objFileLoader-Cr90DdHJ.esm.min.js +2 -0
  256. package/dist/chunks/objFileLoader-Cr90DdHJ.esm.min.js.map +1 -0
  257. package/dist/chunks/oitFragment-BxefW3dP.esm.min.js +2 -0
  258. package/dist/chunks/oitFragment-BxefW3dP.esm.min.js.map +1 -0
  259. package/dist/chunks/oitFragment-DNM4M_TM.esm.js +1166 -0
  260. package/dist/chunks/oitFragment-DNM4M_TM.esm.js.map +1 -0
  261. package/dist/chunks/oitFragment-QOO-2oNY.esm.min.js +2 -0
  262. package/dist/chunks/oitFragment-QOO-2oNY.esm.min.js.map +1 -0
  263. package/dist/chunks/oitFragment-c8QTGncf.esm.js +1210 -0
  264. package/dist/chunks/oitFragment-c8QTGncf.esm.js.map +1 -0
  265. package/dist/chunks/pass.fragment-54wWMjH0.esm.js +15 -0
  266. package/dist/chunks/pass.fragment-54wWMjH0.esm.js.map +1 -0
  267. package/dist/chunks/pass.fragment-C2zJ2wfh.esm.min.js +2 -0
  268. package/dist/chunks/pass.fragment-C2zJ2wfh.esm.min.js.map +1 -0
  269. package/dist/chunks/pbr.fragment-B2LdxiLY.esm.js +3163 -0
  270. package/dist/chunks/pbr.fragment-B2LdxiLY.esm.js.map +1 -0
  271. package/dist/chunks/pbr.fragment-BdB3ttR4.esm.min.js +2 -0
  272. package/dist/chunks/pbr.fragment-BdB3ttR4.esm.min.js.map +1 -0
  273. package/dist/chunks/pbr.fragment-BweiXotT.esm.js +3219 -0
  274. package/dist/chunks/pbr.fragment-BweiXotT.esm.js.map +1 -0
  275. package/dist/chunks/pbr.fragment-DO84e7Qh.esm.min.js +2 -0
  276. package/dist/chunks/pbr.fragment-DO84e7Qh.esm.min.js.map +1 -0
  277. package/dist/chunks/pbr.vertex-BXRa8Hxv.esm.js +335 -0
  278. package/dist/chunks/pbr.vertex-BXRa8Hxv.esm.js.map +1 -0
  279. package/dist/chunks/pbr.vertex-CF2Ccw8q.esm.min.js +2 -0
  280. package/dist/chunks/pbr.vertex-CF2Ccw8q.esm.min.js.map +1 -0
  281. package/dist/chunks/pbr.vertex-Dp1NB2h0.esm.min.js +2 -0
  282. package/dist/chunks/pbr.vertex-Dp1NB2h0.esm.min.js.map +1 -0
  283. package/dist/chunks/pbr.vertex-ou_Fcm2v.esm.js +208 -0
  284. package/dist/chunks/pbr.vertex-ou_Fcm2v.esm.js.map +1 -0
  285. package/dist/chunks/postprocess.vertex-C12ptRTz.esm.js +20 -0
  286. package/dist/chunks/postprocess.vertex-C12ptRTz.esm.js.map +1 -0
  287. package/dist/chunks/postprocess.vertex-D9PCzQ_C.esm.min.js +2 -0
  288. package/dist/chunks/postprocess.vertex-D9PCzQ_C.esm.min.js.map +1 -0
  289. package/dist/chunks/rawTexture-BTLHgkBf.esm.js +562 -0
  290. package/dist/chunks/rawTexture-BTLHgkBf.esm.js.map +1 -0
  291. package/dist/chunks/rawTexture-Cb8Vzv3y.esm.min.js +2 -0
  292. package/dist/chunks/rawTexture-Cb8Vzv3y.esm.min.js.map +1 -0
  293. package/dist/chunks/rgbdDecode.fragment-4VUd_LZa.esm.js +17 -0
  294. package/dist/chunks/rgbdDecode.fragment-4VUd_LZa.esm.js.map +1 -0
  295. package/dist/chunks/rgbdDecode.fragment-B97s0YHK.esm.min.js +2 -0
  296. package/dist/chunks/rgbdDecode.fragment-B97s0YHK.esm.min.js.map +1 -0
  297. package/dist/chunks/rgbdDecode.fragment-CgqRZDLm.esm.js +17 -0
  298. package/dist/chunks/rgbdDecode.fragment-CgqRZDLm.esm.js.map +1 -0
  299. package/dist/chunks/rgbdDecode.fragment-DSa_xyAA.esm.min.js +2 -0
  300. package/dist/chunks/rgbdDecode.fragment-DSa_xyAA.esm.min.js.map +1 -0
  301. package/dist/chunks/rgbdEncode.fragment-C3-vIdKY.esm.js +17 -0
  302. package/dist/chunks/rgbdEncode.fragment-C3-vIdKY.esm.js.map +1 -0
  303. package/dist/chunks/rgbdEncode.fragment-CZ7DFmJC.esm.min.js +2 -0
  304. package/dist/chunks/rgbdEncode.fragment-CZ7DFmJC.esm.min.js.map +1 -0
  305. package/dist/chunks/rgbdEncode.fragment-CnIc0eyH.esm.min.js +2 -0
  306. package/dist/chunks/rgbdEncode.fragment-CnIc0eyH.esm.min.js.map +1 -0
  307. package/dist/chunks/rgbdEncode.fragment-DA8KkHQU.esm.js +17 -0
  308. package/dist/chunks/rgbdEncode.fragment-DA8KkHQU.esm.js.map +1 -0
  309. package/dist/chunks/splatFileLoader-BiXQ9pqp.esm.min.js +2 -0
  310. package/dist/chunks/splatFileLoader-BiXQ9pqp.esm.min.js.map +1 -0
  311. package/dist/chunks/splatFileLoader-D17axd4l.esm.js +3179 -0
  312. package/dist/chunks/splatFileLoader-D17axd4l.esm.js.map +1 -0
  313. package/dist/chunks/standardMaterial-CYafMW8c.esm.js +1809 -0
  314. package/dist/chunks/standardMaterial-CYafMW8c.esm.js.map +1 -0
  315. package/dist/chunks/standardMaterial-xLALVwqX.esm.min.js +2 -0
  316. package/dist/chunks/standardMaterial-xLALVwqX.esm.min.js.map +1 -0
  317. package/dist/chunks/stlFileLoader-BIeNnvqG.esm.js +237 -0
  318. package/dist/chunks/stlFileLoader-BIeNnvqG.esm.js.map +1 -0
  319. package/dist/chunks/stlFileLoader-CqtYJIkJ.esm.min.js +2 -0
  320. package/dist/chunks/stlFileLoader-CqtYJIkJ.esm.min.js.map +1 -0
  321. package/dist/chunks/tgaTextureLoader-CDefV-xQ.esm.min.js +2 -0
  322. package/dist/chunks/tgaTextureLoader-CDefV-xQ.esm.min.js.map +1 -0
  323. package/dist/chunks/tgaTextureLoader-CerR7twj.esm.js +349 -0
  324. package/dist/chunks/tgaTextureLoader-CerR7twj.esm.js.map +1 -0
  325. package/dist/chunks/thinInstanceMesh-InKoMs06.esm.js +314 -0
  326. package/dist/chunks/thinInstanceMesh-InKoMs06.esm.js.map +1 -0
  327. package/dist/chunks/thinInstanceMesh-XV_b72vY.esm.min.js +2 -0
  328. package/dist/chunks/thinInstanceMesh-XV_b72vY.esm.min.js.map +1 -0
  329. package/dist/chunks/vertexColorMixing-Dm0jnWj1.esm.js +528 -0
  330. package/dist/chunks/vertexColorMixing-Dm0jnWj1.esm.js.map +1 -0
  331. package/dist/chunks/vertexColorMixing-N0v0Ism3.esm.min.js +2 -0
  332. package/dist/chunks/vertexColorMixing-N0v0Ism3.esm.min.js.map +1 -0
  333. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  334. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  335. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  336. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  337. package/lib/index.d.ts +275 -0
  338. package/lib/index.js +942 -0
  339. package/lib/index.js.map +1 -0
  340. package/package.json +17 -27
  341. package/readme.md +35 -21
  342. package/configuration/configuration.d.ts +0 -107
  343. package/configuration/configuration.js +0 -16
  344. package/configuration/configuration.js.map +0 -1
  345. package/configuration/configurationCompatibility.d.ts +0 -8
  346. package/configuration/configurationCompatibility.js +0 -66
  347. package/configuration/configurationCompatibility.js.map +0 -1
  348. package/configuration/configurationContainer.d.ts +0 -10
  349. package/configuration/configurationContainer.js +0 -10
  350. package/configuration/configurationContainer.js.map +0 -1
  351. package/configuration/globals.d.ts +0 -6
  352. package/configuration/globals.js +0 -18
  353. package/configuration/globals.js.map +0 -1
  354. package/configuration/index.d.ts +0 -2
  355. package/configuration/index.js +0 -4
  356. package/configuration/index.js.map +0 -1
  357. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  358. package/configuration/interfaces/cameraConfiguration.js +0 -2
  359. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  360. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  361. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  362. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  363. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  364. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  365. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  366. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  367. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  368. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  369. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  370. package/configuration/interfaces/groundConfiguration.js +0 -2
  371. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  372. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  373. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  374. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  375. package/configuration/interfaces/index.d.ts +0 -15
  376. package/configuration/interfaces/index.js +0 -16
  377. package/configuration/interfaces/index.js.map +0 -1
  378. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  379. package/configuration/interfaces/lightConfiguration.js +0 -2
  380. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  381. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  382. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  383. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  384. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  385. package/configuration/interfaces/modelConfiguration.js +0 -2
  386. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  387. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  388. package/configuration/interfaces/observersConfiguration.js +0 -2
  389. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  390. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  391. package/configuration/interfaces/sceneConfiguration.js +0 -2
  392. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  393. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  394. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  395. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  396. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  397. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  398. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  399. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  400. package/configuration/interfaces/templateConfiguration.js +0 -2
  401. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  402. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  403. package/configuration/interfaces/vrConfiguration.js +0 -2
  404. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  405. package/configuration/loader.d.ts +0 -4
  406. package/configuration/loader.js +0 -17
  407. package/configuration/loader.js.map +0 -1
  408. package/configuration/mappers.d.ts +0 -43
  409. package/configuration/mappers.js +0 -192
  410. package/configuration/mappers.js.map +0 -1
  411. package/configuration/renderOnlyLoader.d.ts +0 -33
  412. package/configuration/renderOnlyLoader.js +0 -162
  413. package/configuration/renderOnlyLoader.js.map +0 -1
  414. package/configuration/types/default.d.ts +0 -6
  415. package/configuration/types/default.js +0 -121
  416. package/configuration/types/default.js.map +0 -1
  417. package/configuration/types/environmentMap.d.ts +0 -5
  418. package/configuration/types/environmentMap.js +0 -14
  419. package/configuration/types/environmentMap.js.map +0 -1
  420. package/configuration/types/extended.d.ts +0 -6
  421. package/configuration/types/extended.js +0 -317
  422. package/configuration/types/extended.js.map +0 -1
  423. package/configuration/types/index.d.ts +0 -14
  424. package/configuration/types/index.js +0 -51
  425. package/configuration/types/index.js.map +0 -1
  426. package/configuration/types/minimal.d.ts +0 -6
  427. package/configuration/types/minimal.js +0 -43
  428. package/configuration/types/minimal.js.map +0 -1
  429. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  430. package/configuration/types/renderOnlyDefault.js +0 -31
  431. package/configuration/types/renderOnlyDefault.js.map +0 -1
  432. package/configuration/types/shadowLight.d.ts +0 -9
  433. package/configuration/types/shadowLight.js +0 -64
  434. package/configuration/types/shadowLight.js.map +0 -1
  435. package/helper/index.d.ts +0 -29
  436. package/helper/index.js +0 -66
  437. package/helper/index.js.map +0 -1
  438. package/index.d.ts +0 -30
  439. package/index.js +0 -46
  440. package/index.js.map +0 -1
  441. package/initializer.d.ts +0 -11
  442. package/initializer.js +0 -35
  443. package/initializer.js.map +0 -1
  444. package/interfaces.d.ts +0 -5
  445. package/interfaces.js +0 -7
  446. package/interfaces.js.map +0 -1
  447. package/labs/environmentSerializer.d.ts +0 -126
  448. package/labs/environmentSerializer.js +0 -191
  449. package/labs/environmentSerializer.js.map +0 -1
  450. package/labs/texture.d.ts +0 -183
  451. package/labs/texture.js +0 -350
  452. package/labs/texture.js.map +0 -1
  453. package/labs/viewerLabs.d.ts +0 -51
  454. package/labs/viewerLabs.js +0 -134
  455. package/labs/viewerLabs.js.map +0 -1
  456. package/loader/modelLoader.d.ts +0 -56
  457. package/loader/modelLoader.js +0 -199
  458. package/loader/modelLoader.js.map +0 -1
  459. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  460. package/loader/plugins/applyMaterialConfig.js +0 -16
  461. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  462. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  463. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  464. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  465. package/loader/plugins/index.d.ts +0 -19
  466. package/loader/plugins/index.js +0 -44
  467. package/loader/plugins/index.js.map +0 -1
  468. package/loader/plugins/loaderPlugin.d.ts +0 -24
  469. package/loader/plugins/loaderPlugin.js +0 -2
  470. package/loader/plugins/loaderPlugin.js.map +0 -1
  471. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  472. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  473. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  474. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  475. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  476. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  477. package/managers/observablesManager.d.ts +0 -66
  478. package/managers/observablesManager.js +0 -35
  479. package/managers/observablesManager.js.map +0 -1
  480. package/managers/sceneManager.d.ts +0 -245
  481. package/managers/sceneManager.js +0 -1375
  482. package/managers/sceneManager.js.map +0 -1
  483. package/managers/telemetryManager.d.ts +0 -78
  484. package/managers/telemetryManager.js +0 -117
  485. package/managers/telemetryManager.js.map +0 -1
  486. package/model/modelAnimation.d.ts +0 -215
  487. package/model/modelAnimation.js +0 -237
  488. package/model/modelAnimation.js.map +0 -1
  489. package/model/viewerModel.d.ts +0 -233
  490. package/model/viewerModel.js +0 -673
  491. package/model/viewerModel.js.map +0 -1
  492. package/optimizer/custom/extended.d.ts +0 -13
  493. package/optimizer/custom/extended.js +0 -101
  494. package/optimizer/custom/extended.js.map +0 -1
  495. package/optimizer/custom/index.d.ts +0 -9
  496. package/optimizer/custom/index.js +0 -26
  497. package/optimizer/custom/index.js.map +0 -1
  498. package/renderOnlyIndex.d.ts +0 -11
  499. package/renderOnlyIndex.js +0 -18
  500. package/renderOnlyIndex.js.map +0 -1
  501. package/templating/eventManager.d.ts +0 -35
  502. package/templating/eventManager.js +0 -66
  503. package/templating/eventManager.js.map +0 -1
  504. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  505. package/templating/plugins/hdButtonPlugin.js +0 -21
  506. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  507. package/templating/plugins/printButton.d.ts +0 -9
  508. package/templating/plugins/printButton.js +0 -40
  509. package/templating/plugins/printButton.js.map +0 -1
  510. package/templating/templateManager.d.ts +0 -197
  511. package/templating/templateManager.js +0 -561
  512. package/templating/templateManager.js.map +0 -1
  513. package/templating/viewerTemplatePlugin.d.ts +0 -21
  514. package/templating/viewerTemplatePlugin.js +0 -69
  515. package/templating/viewerTemplatePlugin.js.map +0 -1
  516. package/viewer/defaultViewer.d.ts +0 -130
  517. package/viewer/defaultViewer.js +0 -675
  518. package/viewer/defaultViewer.js.map +0 -1
  519. package/viewer/renderOnlyViewer.d.ts +0 -9
  520. package/viewer/renderOnlyViewer.js +0 -46
  521. package/viewer/renderOnlyViewer.js.map +0 -1
  522. package/viewer/viewer.d.ts +0 -258
  523. package/viewer/viewer.js +0 -783
  524. package/viewer/viewer.js.map +0 -1
  525. package/viewer/viewerManager.d.ts +0 -58
  526. package/viewer/viewerManager.js +0 -91
  527. package/viewer/viewerManager.js.map +0 -1
  528. package/viewer/viewerWithTemplate.d.ts +0 -9
  529. package/viewer/viewerWithTemplate.js +0 -20
  530. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-sFOTJhn4.esm.min.js","sources":["../../../../../dev/core/dist/Misc/performanceMonitor.js","../../../../../dev/core/dist/Engines/engine.common.js","../../../../../dev/core/dist/Engines/Extensions/engine.alpha.js","../../../../../dev/core/dist/Engines/Extensions/engine.dynamicBuffer.js","../../../../../dev/core/dist/Engines/AbstractEngine/abstractEngine.loadingScreen.js","../../../../../dev/core/dist/Engines/AbstractEngine/abstractEngine.dom.js","../../../../../dev/core/dist/Engines/AbstractEngine/abstractEngine.alpha.js","../../../../../dev/core/dist/Engines/AbstractEngine/abstractEngine.states.js","../../../../../dev/core/dist/Engines/AbstractEngine/abstractEngine.renderPass.js","../../../../../dev/core/dist/Engines/engine.js"],"sourcesContent":["import { PrecisionDate } from \"./precisionDate\";\n/**\n * Performance monitor tracks rolling average frame-time and frame-time variance over a user defined sliding-window\n */\nexport class PerformanceMonitor {\n /**\n * constructor\n * @param frameSampleSize The number of samples required to saturate the sliding window\n */\n constructor(frameSampleSize = 30) {\n this._enabled = true;\n this._rollingFrameTime = new RollingAverage(frameSampleSize);\n }\n /**\n * Samples current frame\n * @param timeMs A timestamp in milliseconds of the current frame to compare with other frames\n */\n sampleFrame(timeMs = PrecisionDate.Now) {\n if (!this._enabled) {\n return;\n }\n if (this._lastFrameTimeMs != null) {\n const dt = timeMs - this._lastFrameTimeMs;\n this._rollingFrameTime.add(dt);\n }\n this._lastFrameTimeMs = timeMs;\n }\n /**\n * Returns the average frame time in milliseconds over the sliding window (or the subset of frames sampled so far)\n */\n get averageFrameTime() {\n return this._rollingFrameTime.average;\n }\n /**\n * Returns the variance frame time in milliseconds over the sliding window (or the subset of frames sampled so far)\n */\n get averageFrameTimeVariance() {\n return this._rollingFrameTime.variance;\n }\n /**\n * Returns the frame time of the most recent frame\n */\n get instantaneousFrameTime() {\n return this._rollingFrameTime.history(0);\n }\n /**\n * Returns the average framerate in frames per second over the sliding window (or the subset of frames sampled so far)\n */\n get averageFPS() {\n return 1000.0 / this._rollingFrameTime.average;\n }\n /**\n * Returns the average framerate in frames per second using the most recent frame time\n */\n get instantaneousFPS() {\n const history = this._rollingFrameTime.history(0);\n if (history === 0) {\n return 0;\n }\n return 1000.0 / history;\n }\n /**\n * Returns true if enough samples have been taken to completely fill the sliding window\n */\n get isSaturated() {\n return this._rollingFrameTime.isSaturated();\n }\n /**\n * Enables contributions to the sliding window sample set\n */\n enable() {\n this._enabled = true;\n }\n /**\n * Disables contributions to the sliding window sample set\n * Samples will not be interpolated over the disabled period\n */\n disable() {\n this._enabled = false;\n //clear last sample to avoid interpolating over the disabled period when next enabled\n this._lastFrameTimeMs = null;\n }\n /**\n * Returns true if sampling is enabled\n */\n get isEnabled() {\n return this._enabled;\n }\n /**\n * Resets performance monitor\n */\n reset() {\n //clear last sample to avoid interpolating over the disabled period when next enabled\n this._lastFrameTimeMs = null;\n //wipe record\n this._rollingFrameTime.reset();\n }\n}\n/**\n * RollingAverage\n *\n * Utility to efficiently compute the rolling average and variance over a sliding window of samples\n */\nexport class RollingAverage {\n /**\n * constructor\n * @param length The number of samples required to saturate the sliding window\n */\n constructor(length) {\n this._samples = new Array(length);\n this.reset();\n }\n /**\n * Adds a sample to the sample set\n * @param v The sample value\n */\n add(v) {\n //http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance\n let delta;\n //we need to check if we've already wrapped round\n if (this.isSaturated()) {\n //remove bottom of stack from mean\n const bottomValue = this._samples[this._pos];\n delta = bottomValue - this.average;\n this.average -= delta / (this._sampleCount - 1);\n this._m2 -= delta * (bottomValue - this.average);\n }\n else {\n this._sampleCount++;\n }\n //add new value to mean\n delta = v - this.average;\n this.average += delta / this._sampleCount;\n this._m2 += delta * (v - this.average);\n //set the new variance\n this.variance = this._m2 / (this._sampleCount - 1);\n this._samples[this._pos] = v;\n this._pos++;\n this._pos %= this._samples.length; //positive wrap around\n }\n /**\n * Returns previously added values or null if outside of history or outside the sliding window domain\n * @param i Index in history. For example, pass 0 for the most recent value and 1 for the value before that\n * @returns Value previously recorded with add() or null if outside of range\n */\n history(i) {\n if (i >= this._sampleCount || i >= this._samples.length) {\n return 0;\n }\n const i0 = this._wrapPosition(this._pos - 1.0);\n return this._samples[this._wrapPosition(i0 - i)];\n }\n /**\n * Returns true if enough samples have been taken to completely fill the sliding window\n * @returns true if sample-set saturated\n */\n isSaturated() {\n return this._sampleCount >= this._samples.length;\n }\n /**\n * Resets the rolling average (equivalent to 0 samples taken so far)\n */\n reset() {\n this.average = 0;\n this.variance = 0;\n this._sampleCount = 0;\n this._pos = 0;\n this._m2 = 0;\n }\n /**\n * Wraps a value around the sample range boundaries\n * @param i Position in sample range, for example if the sample length is 5, and i is -3, then 2 will be returned.\n * @returns Wrapped position in sample range\n */\n _wrapPosition(i) {\n const max = this._samples.length;\n return ((i % max) + max) % max;\n }\n}\n//# sourceMappingURL=performanceMonitor.js.map","import { IsDocumentAvailable } from \"../Misc/domManagement\";\nimport { AbstractEngine } from \"./abstractEngine\";\nimport { EngineStore } from \"./engineStore\";\n/** @internal */\nfunction _DisableTouchAction(canvas) {\n if (!canvas || !canvas.setAttribute) {\n return;\n }\n canvas.setAttribute(\"touch-action\", \"none\");\n canvas.style.touchAction = \"none\";\n canvas.style.webkitTapHighlightColor = \"transparent\";\n}\n/** @internal */\nexport function _CommonInit(commonEngine, canvas, creationOptions) {\n commonEngine._onCanvasFocus = () => {\n commonEngine.onCanvasFocusObservable.notifyObservers(commonEngine);\n };\n commonEngine._onCanvasBlur = () => {\n commonEngine.onCanvasBlurObservable.notifyObservers(commonEngine);\n };\n commonEngine._onCanvasContextMenu = (evt) => {\n if (commonEngine.disableContextMenu) {\n evt.preventDefault();\n }\n };\n canvas.addEventListener(\"focus\", commonEngine._onCanvasFocus);\n canvas.addEventListener(\"blur\", commonEngine._onCanvasBlur);\n canvas.addEventListener(\"contextmenu\", commonEngine._onCanvasContextMenu);\n commonEngine._onBlur = () => {\n if (commonEngine.disablePerformanceMonitorInBackground) {\n commonEngine.performanceMonitor.disable();\n }\n commonEngine._windowIsBackground = true;\n };\n commonEngine._onFocus = () => {\n if (commonEngine.disablePerformanceMonitorInBackground) {\n commonEngine.performanceMonitor.enable();\n }\n commonEngine._windowIsBackground = false;\n };\n commonEngine._onCanvasPointerOut = (ev) => {\n // Check that the element at the point of the pointer out isn't the canvas and if it isn't, notify observers\n // Note: This is a workaround for a bug with Safari\n if (document.elementFromPoint(ev.clientX, ev.clientY) !== canvas) {\n commonEngine.onCanvasPointerOutObservable.notifyObservers(ev);\n }\n };\n const hostWindow = commonEngine.getHostWindow(); // it calls IsWindowObjectExist()\n if (hostWindow && typeof hostWindow.addEventListener === \"function\") {\n hostWindow.addEventListener(\"blur\", commonEngine._onBlur);\n hostWindow.addEventListener(\"focus\", commonEngine._onFocus);\n }\n canvas.addEventListener(\"pointerout\", commonEngine._onCanvasPointerOut);\n if (!creationOptions.doNotHandleTouchAction) {\n _DisableTouchAction(canvas);\n }\n // Create Audio Engine if needed.\n if (!AbstractEngine.audioEngine && creationOptions.audioEngine && AbstractEngine.AudioEngineFactory) {\n AbstractEngine.audioEngine = AbstractEngine.AudioEngineFactory(commonEngine.getRenderingCanvas(), commonEngine.getAudioContext(), commonEngine.getAudioDestination());\n }\n if (IsDocumentAvailable()) {\n // Fullscreen\n commonEngine._onFullscreenChange = () => {\n commonEngine.isFullscreen = !!document.fullscreenElement;\n // Pointer lock\n if (commonEngine.isFullscreen && commonEngine._pointerLockRequested && canvas) {\n RequestPointerlock(canvas);\n }\n };\n document.addEventListener(\"fullscreenchange\", commonEngine._onFullscreenChange, false);\n document.addEventListener(\"webkitfullscreenchange\", commonEngine._onFullscreenChange, false);\n // Pointer lock\n commonEngine._onPointerLockChange = () => {\n commonEngine.isPointerLock = document.pointerLockElement === canvas;\n };\n document.addEventListener(\"pointerlockchange\", commonEngine._onPointerLockChange, false);\n document.addEventListener(\"webkitpointerlockchange\", commonEngine._onPointerLockChange, false);\n }\n commonEngine.enableOfflineSupport = AbstractEngine.OfflineProviderFactory !== undefined;\n commonEngine._deterministicLockstep = !!creationOptions.deterministicLockstep;\n commonEngine._lockstepMaxSteps = creationOptions.lockstepMaxSteps || 0;\n commonEngine._timeStep = creationOptions.timeStep || 1 / 60;\n}\n/** @internal */\nexport function _CommonDispose(commonEngine, canvas) {\n // Release audio engine\n if (EngineStore.Instances.length === 1 && AbstractEngine.audioEngine) {\n AbstractEngine.audioEngine.dispose();\n AbstractEngine.audioEngine = null;\n }\n // Events\n const hostWindow = commonEngine.getHostWindow(); // it calls IsWindowObjectExist()\n if (hostWindow && typeof hostWindow.removeEventListener === \"function\") {\n hostWindow.removeEventListener(\"blur\", commonEngine._onBlur);\n hostWindow.removeEventListener(\"focus\", commonEngine._onFocus);\n }\n if (canvas) {\n canvas.removeEventListener(\"focus\", commonEngine._onCanvasFocus);\n canvas.removeEventListener(\"blur\", commonEngine._onCanvasBlur);\n canvas.removeEventListener(\"pointerout\", commonEngine._onCanvasPointerOut);\n canvas.removeEventListener(\"contextmenu\", commonEngine._onCanvasContextMenu);\n }\n if (IsDocumentAvailable()) {\n document.removeEventListener(\"fullscreenchange\", commonEngine._onFullscreenChange);\n document.removeEventListener(\"mozfullscreenchange\", commonEngine._onFullscreenChange);\n document.removeEventListener(\"webkitfullscreenchange\", commonEngine._onFullscreenChange);\n document.removeEventListener(\"msfullscreenchange\", commonEngine._onFullscreenChange);\n document.removeEventListener(\"pointerlockchange\", commonEngine._onPointerLockChange);\n document.removeEventListener(\"mspointerlockchange\", commonEngine._onPointerLockChange);\n document.removeEventListener(\"mozpointerlockchange\", commonEngine._onPointerLockChange);\n document.removeEventListener(\"webkitpointerlockchange\", commonEngine._onPointerLockChange);\n }\n}\n/**\n * Get Font size information\n * @param font font name\n * @returns an object containing ascent, height and descent\n */\nexport function GetFontOffset(font) {\n const text = document.createElement(\"span\");\n text.textContent = \"Hg\";\n text.style.font = font;\n const block = document.createElement(\"div\");\n block.style.display = \"inline-block\";\n block.style.width = \"1px\";\n block.style.height = \"0px\";\n block.style.verticalAlign = \"bottom\";\n const div = document.createElement(\"div\");\n div.style.whiteSpace = \"nowrap\";\n div.appendChild(text);\n div.appendChild(block);\n document.body.appendChild(div);\n let fontAscent = 0;\n let fontHeight = 0;\n try {\n fontHeight = block.getBoundingClientRect().top - text.getBoundingClientRect().top;\n block.style.verticalAlign = \"baseline\";\n fontAscent = block.getBoundingClientRect().top - text.getBoundingClientRect().top;\n }\n finally {\n document.body.removeChild(div);\n }\n return { ascent: fontAscent, height: fontHeight, descent: fontHeight - fontAscent };\n}\n/** @internal */\nexport function CreateImageBitmapFromSource(engine, imageSource, options) {\n const promise = new Promise((resolve, reject) => {\n const image = new Image();\n image.onload = () => {\n image.decode().then(() => {\n engine.createImageBitmap(image, options).then((imageBitmap) => {\n resolve(imageBitmap);\n });\n });\n };\n image.onerror = () => {\n reject(`Error loading image ${image.src}`);\n };\n image.src = imageSource;\n });\n return promise;\n}\n/** @internal */\nexport function ResizeImageBitmap(engine, image, bufferWidth, bufferHeight) {\n const canvas = engine.createCanvas(bufferWidth, bufferHeight);\n const context = canvas.getContext(\"2d\");\n if (!context) {\n throw new Error(\"Unable to get 2d context for resizeImageBitmap\");\n }\n context.drawImage(image, 0, 0);\n // Create VertexData from map data\n // Cast is due to wrong definition in lib.d.ts from ts 1.3 - https://github.com/Microsoft/TypeScript/issues/949\n const buffer = context.getImageData(0, 0, bufferWidth, bufferHeight).data;\n return buffer;\n}\n/**\n * Ask the browser to promote the current element to fullscreen rendering mode\n * @param element defines the DOM element to promote\n */\nexport function RequestFullscreen(element) {\n const requestFunction = element.requestFullscreen || element.webkitRequestFullscreen;\n if (!requestFunction) {\n return;\n }\n requestFunction.call(element);\n}\n/**\n * Asks the browser to exit fullscreen mode\n */\nexport function ExitFullscreen() {\n const anyDoc = document;\n if (document.exitFullscreen) {\n document.exitFullscreen();\n }\n else if (anyDoc.webkitCancelFullScreen) {\n anyDoc.webkitCancelFullScreen();\n }\n}\n/**\n * Ask the browser to promote the current element to pointerlock mode\n * @param element defines the DOM element to promote\n */\nexport function RequestPointerlock(element) {\n if (element.requestPointerLock) {\n // In some browsers, requestPointerLock returns a promise.\n // Handle possible rejections to avoid an unhandled top-level exception.\n const promise = element.requestPointerLock();\n if (promise instanceof Promise)\n promise\n .then(() => {\n element.focus();\n })\n .catch(() => { });\n else\n element.focus();\n }\n}\n/**\n * Asks the browser to exit pointerlock mode\n */\nexport function ExitPointerlock() {\n if (document.exitPointerLock) {\n document.exitPointerLock();\n }\n}\n//# sourceMappingURL=engine.common.js.map","import { ThinEngine } from \"../../Engines/thinEngine\";\nimport { Constants } from \"../constants\";\nThinEngine.prototype.setAlphaMode = function (mode, noDepthWriteChange = false) {\n if (this._alphaMode === mode) {\n if (!noDepthWriteChange) {\n // Make sure we still have the correct depth mask according to the alpha mode (a transparent material could have forced writting to the depth buffer, for instance)\n const depthMask = mode === Constants.ALPHA_DISABLE;\n if (this.depthCullingState.depthMask !== depthMask) {\n this.depthCullingState.depthMask = depthMask;\n }\n }\n return;\n }\n switch (mode) {\n case Constants.ALPHA_DISABLE:\n this._alphaState.alphaBlend = false;\n break;\n case Constants.ALPHA_PREMULTIPLIED:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_PREMULTIPLIED_PORTERDUFF:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_COMBINE:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_ONEONE:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ZERO, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_ADD:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE, this._gl.ZERO, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_SUBTRACT:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_MULTIPLY:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR, this._gl.ZERO, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_MAXIMIZED:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_INTERPOLATE:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR, this._gl.ONE_MINUS_CONSTANT_COLOR, this._gl.CONSTANT_ALPHA, this._gl.ONE_MINUS_CONSTANT_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_SCREENMODE:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_ONEONE_ONEONE:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ONE, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_ALPHATOCOLOR:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_ALPHA, this._gl.ONE, this._gl.ZERO, this._gl.ZERO);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_REVERSEONEMINUS:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ONE_MINUS_DST_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_SRC_DSTONEMINUSSRCALPHA:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_ONEONE_ONEZERO:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE, this._gl.ONE, this._gl.ZERO);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_EXCLUSION:\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE_MINUS_DST_COLOR, this._gl.ONE_MINUS_SRC_COLOR, this._gl.ZERO, this._gl.ONE);\n this._alphaState.alphaBlend = true;\n break;\n case Constants.ALPHA_LAYER_ACCUMULATE:\n // Same as ALPHA_COMBINE but accumulates (1 - alpha) values in the alpha channel for a later readout in order independant transparency\n this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA);\n this._alphaState.alphaBlend = true;\n break;\n }\n if (!noDepthWriteChange) {\n this.depthCullingState.depthMask = mode === Constants.ALPHA_DISABLE;\n }\n this._alphaMode = mode;\n};\n//# sourceMappingURL=engine.alpha.js.map","import { ThinEngine } from \"../../Engines/thinEngine\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nThinEngine.prototype.updateDynamicIndexBuffer = function (indexBuffer, indices, offset = 0) {\n // Force cache update\n this._currentBoundBuffer[this._gl.ELEMENT_ARRAY_BUFFER] = null;\n this.bindIndexBuffer(indexBuffer);\n let view;\n if (indexBuffer.is32Bits) {\n // anything else than Uint32Array needs to be converted to Uint32Array\n view = indices instanceof Uint32Array ? indices : new Uint32Array(indices);\n }\n else {\n // anything else than Uint16Array needs to be converted to Uint16Array\n view = indices instanceof Uint16Array ? indices : new Uint16Array(indices);\n }\n this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, view, this._gl.DYNAMIC_DRAW);\n this._resetIndexBufferBinding();\n};\nThinEngine.prototype.updateDynamicVertexBuffer = function (vertexBuffer, data, byteOffset, byteLength) {\n this.bindArrayBuffer(vertexBuffer);\n if (byteOffset === undefined) {\n byteOffset = 0;\n }\n const dataLength = data.byteLength || data.length;\n if (byteLength === undefined || (byteLength >= dataLength && byteOffset === 0)) {\n if (data instanceof Array) {\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, new Float32Array(data));\n }\n else {\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, byteOffset, data);\n }\n }\n else {\n if (data instanceof Array) {\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, new Float32Array(data).subarray(byteOffset, byteOffset + byteLength));\n }\n else {\n if (data instanceof ArrayBuffer) {\n data = new Uint8Array(data, byteOffset, byteLength);\n }\n else {\n data = new Uint8Array(data.buffer, data.byteOffset + byteOffset, byteLength);\n }\n this._gl.bufferSubData(this._gl.ARRAY_BUFFER, 0, data);\n }\n }\n this._resetVertexBufferBinding();\n};\n//# sourceMappingURL=engine.dynamicBuffer.js.map","import { IsWindowObjectExist } from \"../../Misc/domManagement\";\nimport { AbstractEngine } from \"../abstractEngine\";\nAbstractEngine.prototype.displayLoadingUI = function () {\n if (!IsWindowObjectExist()) {\n return;\n }\n const loadingScreen = this.loadingScreen;\n if (loadingScreen) {\n loadingScreen.displayLoadingUI();\n }\n};\nAbstractEngine.prototype.hideLoadingUI = function () {\n if (!IsWindowObjectExist()) {\n return;\n }\n const loadingScreen = this._loadingScreen;\n if (loadingScreen) {\n loadingScreen.hideLoadingUI();\n }\n};\nObject.defineProperty(AbstractEngine.prototype, \"loadingScreen\", {\n get: function () {\n if (!this._loadingScreen && this._renderingCanvas) {\n this._loadingScreen = AbstractEngine.DefaultLoadingScreenFactory(this._renderingCanvas);\n }\n return this._loadingScreen;\n },\n set: function (value) {\n this._loadingScreen = value;\n },\n enumerable: true,\n configurable: true,\n});\nObject.defineProperty(AbstractEngine.prototype, \"loadingUIText\", {\n set: function (value) {\n this.loadingScreen.loadingUIText = value;\n },\n enumerable: true,\n configurable: true,\n});\nObject.defineProperty(AbstractEngine.prototype, \"loadingUIBackgroundColor\", {\n set: function (value) {\n this.loadingScreen.loadingUIBackgroundColor = value;\n },\n enumerable: true,\n configurable: true,\n});\n//# sourceMappingURL=abstractEngine.loadingScreen.js.map","import { AbstractEngine } from \"../abstractEngine\";\nAbstractEngine.prototype.getInputElement = function () {\n return this._renderingCanvas;\n};\nAbstractEngine.prototype.getRenderingCanvasClientRect = function () {\n if (!this._renderingCanvas) {\n return null;\n }\n return this._renderingCanvas.getBoundingClientRect();\n};\nAbstractEngine.prototype.getInputElementClientRect = function () {\n if (!this._renderingCanvas) {\n return null;\n }\n return this.getInputElement().getBoundingClientRect();\n};\nAbstractEngine.prototype.getAspectRatio = function (viewportOwner, useScreen = false) {\n const viewport = viewportOwner.viewport;\n return (this.getRenderWidth(useScreen) * viewport.width) / (this.getRenderHeight(useScreen) * viewport.height);\n};\nAbstractEngine.prototype.getScreenAspectRatio = function () {\n return this.getRenderWidth(true) / this.getRenderHeight(true);\n};\nAbstractEngine.prototype._verifyPointerLock = function () {\n this._onPointerLockChange?.();\n};\n//# sourceMappingURL=abstractEngine.dom.js.map","import { AbstractEngine } from \"../abstractEngine\";\nimport { Constants } from \"../constants\";\nAbstractEngine.prototype.setAlphaEquation = function (equation) {\n if (this._alphaEquation === equation) {\n return;\n }\n switch (equation) {\n case Constants.ALPHA_EQUATION_ADD:\n this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_ADD, Constants.GL_ALPHA_EQUATION_ADD);\n break;\n case Constants.ALPHA_EQUATION_SUBSTRACT:\n this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_SUBTRACT, Constants.GL_ALPHA_EQUATION_SUBTRACT);\n break;\n case Constants.ALPHA_EQUATION_REVERSE_SUBTRACT:\n this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_REVERSE_SUBTRACT, Constants.GL_ALPHA_EQUATION_REVERSE_SUBTRACT);\n break;\n case Constants.ALPHA_EQUATION_MAX:\n this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_MAX, Constants.GL_ALPHA_EQUATION_MAX);\n break;\n case Constants.ALPHA_EQUATION_MIN:\n this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_MIN, Constants.GL_ALPHA_EQUATION_MIN);\n break;\n case Constants.ALPHA_EQUATION_DARKEN:\n this._alphaState.setAlphaEquationParameters(Constants.GL_ALPHA_EQUATION_MIN, Constants.GL_ALPHA_EQUATION_ADD);\n break;\n }\n this._alphaEquation = equation;\n};\n//# sourceMappingURL=abstractEngine.alpha.js.map","import { AbstractEngine } from \"../abstractEngine\";\nimport { Constants } from \"../constants\";\nimport \"./abstractEngine.alpha\";\nAbstractEngine.prototype.getInputElement = function () {\n return this._renderingCanvas;\n};\nAbstractEngine.prototype.getDepthFunction = function () {\n return this._depthCullingState.depthFunc;\n};\nAbstractEngine.prototype.setDepthFunction = function (depthFunc) {\n this._depthCullingState.depthFunc = depthFunc;\n};\nAbstractEngine.prototype.setDepthFunctionToGreater = function () {\n this.setDepthFunction(Constants.GREATER);\n};\nAbstractEngine.prototype.setDepthFunctionToGreaterOrEqual = function () {\n this.setDepthFunction(Constants.GEQUAL);\n};\nAbstractEngine.prototype.setDepthFunctionToLess = function () {\n this.setDepthFunction(Constants.LESS);\n};\nAbstractEngine.prototype.setDepthFunctionToLessOrEqual = function () {\n this.setDepthFunction(Constants.LEQUAL);\n};\nAbstractEngine.prototype.getDepthWrite = function () {\n return this._depthCullingState.depthMask;\n};\nAbstractEngine.prototype.setDepthWrite = function (enable) {\n this._depthCullingState.depthMask = enable;\n};\nAbstractEngine.prototype.getStencilBuffer = function () {\n return this._stencilState.stencilTest;\n};\nAbstractEngine.prototype.setStencilBuffer = function (enable) {\n this._stencilState.stencilTest = enable;\n};\nAbstractEngine.prototype.getStencilMask = function () {\n return this._stencilState.stencilMask;\n};\nAbstractEngine.prototype.setStencilMask = function (mask) {\n this._stencilState.stencilMask = mask;\n};\nAbstractEngine.prototype.getStencilFunction = function () {\n return this._stencilState.stencilFunc;\n};\nAbstractEngine.prototype.getStencilFunctionReference = function () {\n return this._stencilState.stencilFuncRef;\n};\nAbstractEngine.prototype.getStencilFunctionMask = function () {\n return this._stencilState.stencilFuncMask;\n};\nAbstractEngine.prototype.setStencilFunction = function (stencilFunc) {\n this._stencilState.stencilFunc = stencilFunc;\n};\nAbstractEngine.prototype.setStencilFunctionReference = function (reference) {\n this._stencilState.stencilFuncRef = reference;\n};\nAbstractEngine.prototype.setStencilFunctionMask = function (mask) {\n this._stencilState.stencilFuncMask = mask;\n};\nAbstractEngine.prototype.getStencilOperationFail = function () {\n return this._stencilState.stencilOpStencilFail;\n};\nAbstractEngine.prototype.getStencilOperationDepthFail = function () {\n return this._stencilState.stencilOpDepthFail;\n};\nAbstractEngine.prototype.getStencilOperationPass = function () {\n return this._stencilState.stencilOpStencilDepthPass;\n};\nAbstractEngine.prototype.setStencilOperationFail = function (operation) {\n this._stencilState.stencilOpStencilFail = operation;\n};\nAbstractEngine.prototype.setStencilOperationDepthFail = function (operation) {\n this._stencilState.stencilOpDepthFail = operation;\n};\nAbstractEngine.prototype.setStencilOperationPass = function (operation) {\n this._stencilState.stencilOpStencilDepthPass = operation;\n};\nAbstractEngine.prototype.cacheStencilState = function () {\n this._cachedStencilBuffer = this.getStencilBuffer();\n this._cachedStencilFunction = this.getStencilFunction();\n this._cachedStencilMask = this.getStencilMask();\n this._cachedStencilOperationPass = this.getStencilOperationPass();\n this._cachedStencilOperationFail = this.getStencilOperationFail();\n this._cachedStencilOperationDepthFail = this.getStencilOperationDepthFail();\n this._cachedStencilReference = this.getStencilFunctionReference();\n};\nAbstractEngine.prototype.restoreStencilState = function () {\n this.setStencilFunction(this._cachedStencilFunction);\n this.setStencilMask(this._cachedStencilMask);\n this.setStencilBuffer(this._cachedStencilBuffer);\n this.setStencilOperationPass(this._cachedStencilOperationPass);\n this.setStencilOperationFail(this._cachedStencilOperationFail);\n this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail);\n this.setStencilFunctionReference(this._cachedStencilReference);\n};\nAbstractEngine.prototype.setAlphaConstants = function (r, g, b, a) {\n this._alphaState.setAlphaBlendConstants(r, g, b, a);\n};\nAbstractEngine.prototype.getAlphaMode = function () {\n return this._alphaMode;\n};\nAbstractEngine.prototype.getAlphaEquation = function () {\n return this._alphaEquation;\n};\n//# sourceMappingURL=abstractEngine.states.js.map","import { AbstractEngine } from \"../abstractEngine\";\nAbstractEngine.prototype.getRenderPassNames = function () {\n return this._renderPassNames;\n};\nAbstractEngine.prototype.getCurrentRenderPassName = function () {\n return this._renderPassNames[this.currentRenderPassId];\n};\nAbstractEngine.prototype.createRenderPassId = function (name) {\n // Note: render pass id == 0 is always for the main render pass\n const id = ++AbstractEngine._RenderPassIdCounter;\n this._renderPassNames[id] = name ?? \"NONAME\";\n return id;\n};\nAbstractEngine.prototype.releaseRenderPassId = function (id) {\n this._renderPassNames[id] = undefined;\n for (let s = 0; s < this.scenes.length; ++s) {\n const scene = this.scenes[s];\n for (let m = 0; m < scene.meshes.length; ++m) {\n const mesh = scene.meshes[m];\n if (mesh.subMeshes) {\n for (let b = 0; b < mesh.subMeshes.length; ++b) {\n const subMesh = mesh.subMeshes[b];\n subMesh._removeDrawWrapper(id);\n }\n }\n }\n }\n};\n//# sourceMappingURL=abstractEngine.renderPass.js.map","import { InternalTexture } from \"../Materials/Textures/internalTexture\";\nimport { EngineStore } from \"./engineStore\";\nimport { ThinEngine } from \"./thinEngine\";\nimport { Constants } from \"./constants\";\nimport { PerformanceMonitor } from \"../Misc/performanceMonitor\";\nimport { WebGLDataBuffer } from \"../Meshes/WebGL/webGLDataBuffer\";\nimport { Logger } from \"../Misc/logger\";\nimport { WebGLHardwareTexture } from \"./WebGL/webGLHardwareTexture\";\nimport \"./Extensions/engine.alpha\";\nimport \"./Extensions/engine.readTexture\";\nimport \"./Extensions/engine.dynamicBuffer\";\nimport \"./AbstractEngine/abstractEngine.loadingScreen\";\nimport \"./AbstractEngine/abstractEngine.dom\";\nimport \"./AbstractEngine/abstractEngine.states\";\nimport \"./AbstractEngine/abstractEngine.renderPass\";\nimport \"./AbstractEngine/abstractEngine.texture\";\nimport { AbstractEngine } from \"./abstractEngine\";\nimport { CreateImageBitmapFromSource, ExitFullscreen, ExitPointerlock, GetFontOffset, RequestFullscreen, RequestPointerlock, ResizeImageBitmap, _CommonDispose, _CommonInit, } from \"./engine.common\";\nimport { PerfCounter } from \"../Misc/perfCounter\";\nimport \"../Audio/audioEngine\";\n/**\n * The engine class is responsible for interfacing with all lower-level APIs such as WebGL and Audio\n */\nexport class Engine extends ThinEngine {\n /**\n * Returns the current npm package of the sdk\n */\n // Not mixed with Version for tooling purpose.\n static get NpmPackage() {\n return AbstractEngine.NpmPackage;\n }\n /**\n * Returns the current version of the framework\n */\n static get Version() {\n return AbstractEngine.Version;\n }\n /** Gets the list of created engines */\n static get Instances() {\n return EngineStore.Instances;\n }\n /**\n * Gets the latest created engine\n */\n static get LastCreatedEngine() {\n return EngineStore.LastCreatedEngine;\n }\n /**\n * Gets the latest created scene\n */\n static get LastCreatedScene() {\n return EngineStore.LastCreatedScene;\n }\n /** @internal */\n // eslint-disable-next-line jsdoc/require-returns-check\n /**\n * Method called to create the default loading screen.\n * This can be overridden in your own app.\n * @param canvas The rendering canvas element\n * @returns The loading screen\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n static DefaultLoadingScreenFactory(canvas) {\n return AbstractEngine.DefaultLoadingScreenFactory(canvas);\n }\n get _supportsHardwareTextureRescaling() {\n return !!Engine._RescalePostProcessFactory;\n }\n _measureFps() {\n this._performanceMonitor.sampleFrame();\n this._fps = this._performanceMonitor.averageFPS;\n this._deltaTime = this._performanceMonitor.instantaneousFrameTime || 0;\n }\n /**\n * Gets the performance monitor attached to this engine\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#engineinstrumentation\n */\n get performanceMonitor() {\n return this._performanceMonitor;\n }\n // Events\n /**\n * Creates a new engine\n * @param canvasOrContext defines the canvas or WebGL context to use for rendering. If you provide a WebGL context, Babylon.js will not hook events on the canvas (like pointers, keyboards, etc...) so no event observables will be available. This is mostly used when Babylon.js is used as a plugin on a system which already used the WebGL context\n * @param antialias defines enable antialiasing (default: false)\n * @param options defines further options to be sent to the getContext() function\n * @param adaptToDeviceRatio defines whether to adapt to the device's viewport characteristics (default: false)\n */\n constructor(canvasOrContext, antialias, options, adaptToDeviceRatio = false) {\n super(canvasOrContext, antialias, options, adaptToDeviceRatio);\n // Members\n /**\n * If set, will be used to request the next animation frame for the render loop\n */\n this.customAnimationFrameRequester = null;\n this._performanceMonitor = new PerformanceMonitor();\n this._drawCalls = new PerfCounter();\n if (!canvasOrContext) {\n return;\n }\n this._features.supportRenderPasses = true;\n options = this._creationOptions;\n if (canvasOrContext.getContext) {\n const canvas = canvasOrContext;\n this._sharedInit(canvas);\n }\n }\n _initGLContext() {\n super._initGLContext();\n this._rescalePostProcess = null;\n }\n /**\n * Shared initialization across engines types.\n * @param canvas The canvas associated with this instance of the engine.\n */\n _sharedInit(canvas) {\n super._sharedInit(canvas);\n _CommonInit(this, canvas, this._creationOptions);\n }\n /**\n * Resize an image and returns the image data as an uint8array\n * @param image image to resize\n * @param bufferWidth destination buffer width\n * @param bufferHeight destination buffer height\n * @returns an uint8array containing RGBA values of bufferWidth * bufferHeight size\n */\n resizeImageBitmap(image, bufferWidth, bufferHeight) {\n return ResizeImageBitmap(this, image, bufferWidth, bufferHeight);\n }\n /**\n * Engine abstraction for loading and creating an image bitmap from a given source string.\n * @param imageSource source to load the image from.\n * @param options An object that sets options for the image's extraction.\n * @returns ImageBitmap\n */\n _createImageBitmapFromSource(imageSource, options) {\n return CreateImageBitmapFromSource(this, imageSource, options);\n }\n /**\n * Toggle full screen mode\n * @param requestPointerLock defines if a pointer lock should be requested from the user\n */\n switchFullscreen(requestPointerLock) {\n if (this.isFullscreen) {\n this.exitFullscreen();\n }\n else {\n this.enterFullscreen(requestPointerLock);\n }\n }\n /**\n * Enters full screen mode\n * @param requestPointerLock defines if a pointer lock should be requested from the user\n */\n enterFullscreen(requestPointerLock) {\n if (!this.isFullscreen) {\n this._pointerLockRequested = requestPointerLock;\n if (this._renderingCanvas) {\n RequestFullscreen(this._renderingCanvas);\n }\n }\n }\n /**\n * Exits full screen mode\n */\n exitFullscreen() {\n if (this.isFullscreen) {\n ExitFullscreen();\n }\n }\n /** States */\n /**\n * Sets a boolean indicating if the dithering state is enabled or disabled\n * @param value defines the dithering state\n */\n setDitheringState(value) {\n if (value) {\n this._gl.enable(this._gl.DITHER);\n }\n else {\n this._gl.disable(this._gl.DITHER);\n }\n }\n /**\n * Sets a boolean indicating if the rasterizer state is enabled or disabled\n * @param value defines the rasterizer state\n */\n setRasterizerState(value) {\n if (value) {\n this._gl.disable(this._gl.RASTERIZER_DISCARD);\n }\n else {\n this._gl.enable(this._gl.RASTERIZER_DISCARD);\n }\n }\n /**\n * Directly set the WebGL Viewport\n * @param x defines the x coordinate of the viewport (in screen space)\n * @param y defines the y coordinate of the viewport (in screen space)\n * @param width defines the width of the viewport (in screen space)\n * @param height defines the height of the viewport (in screen space)\n * @returns the current viewport Object (if any) that is being replaced by this call. You can restore this viewport later on to go back to the original state\n */\n setDirectViewport(x, y, width, height) {\n const currentViewport = this._cachedViewport;\n this._cachedViewport = null;\n this._viewport(x, y, width, height);\n return currentViewport;\n }\n /**\n * Executes a scissor clear (ie. a clear on a specific portion of the screen)\n * @param x defines the x-coordinate of the bottom left corner of the clear rectangle\n * @param y defines the y-coordinate of the corner of the clear rectangle\n * @param width defines the width of the clear rectangle\n * @param height defines the height of the clear rectangle\n * @param clearColor defines the clear color\n */\n scissorClear(x, y, width, height, clearColor) {\n this.enableScissor(x, y, width, height);\n this.clear(clearColor, true, true, true);\n this.disableScissor();\n }\n /**\n * Enable scissor test on a specific rectangle (ie. render will only be executed on a specific portion of the screen)\n * @param x defines the x-coordinate of the bottom left corner of the clear rectangle\n * @param y defines the y-coordinate of the corner of the clear rectangle\n * @param width defines the width of the clear rectangle\n * @param height defines the height of the clear rectangle\n */\n enableScissor(x, y, width, height) {\n const gl = this._gl;\n // Change state\n gl.enable(gl.SCISSOR_TEST);\n gl.scissor(x, y, width, height);\n }\n /**\n * Disable previously set scissor test rectangle\n */\n disableScissor() {\n const gl = this._gl;\n gl.disable(gl.SCISSOR_TEST);\n }\n /**\n * @internal\n */\n _loadFileAsync(url, offlineProvider, useArrayBuffer) {\n return new Promise((resolve, reject) => {\n this._loadFile(url, (data) => {\n resolve(data);\n }, undefined, offlineProvider, useArrayBuffer, (request, exception) => {\n reject(exception);\n });\n });\n }\n /**\n * Gets the source code of the vertex shader associated with a specific webGL program\n * @param program defines the program to use\n * @returns a string containing the source code of the vertex shader associated with the program\n */\n getVertexShaderSource(program) {\n const shaders = this._gl.getAttachedShaders(program);\n if (!shaders) {\n return null;\n }\n return this._gl.getShaderSource(shaders[0]);\n }\n /**\n * Gets the source code of the fragment shader associated with a specific webGL program\n * @param program defines the program to use\n * @returns a string containing the source code of the fragment shader associated with the program\n */\n getFragmentShaderSource(program) {\n const shaders = this._gl.getAttachedShaders(program);\n if (!shaders) {\n return null;\n }\n return this._gl.getShaderSource(shaders[1]);\n }\n /**\n * sets the object from which width and height will be taken from when getting render width and height\n * Will fallback to the gl object\n * @param dimensions the framebuffer width and height that will be used.\n */\n set framebufferDimensionsObject(dimensions) {\n this._framebufferDimensionsObject = dimensions;\n if (this._framebufferDimensionsObject) {\n this.onResizeObservable.notifyObservers(this);\n }\n }\n _rebuildBuffers() {\n // Index / Vertex\n for (const scene of this.scenes) {\n scene.resetCachedMaterial();\n scene._rebuildGeometries();\n }\n for (const scene of this._virtualScenes) {\n scene.resetCachedMaterial();\n scene._rebuildGeometries();\n }\n super._rebuildBuffers();\n }\n /**\n * Get Font size information\n * @param font font name\n * @returns an object containing ascent, height and descent\n */\n getFontOffset(font) {\n return GetFontOffset(font);\n }\n _cancelFrame() {\n if (this.customAnimationFrameRequester) {\n if (this._frameHandler !== 0) {\n this._frameHandler = 0;\n const { cancelAnimationFrame } = this.customAnimationFrameRequester;\n if (cancelAnimationFrame) {\n cancelAnimationFrame(this.customAnimationFrameRequester.requestID);\n }\n }\n }\n else {\n super._cancelFrame();\n }\n }\n _renderLoop() {\n // Reset the frame handler before rendering a frame to determine if a new frame has been queued.\n this._frameHandler = 0;\n if (!this._contextWasLost) {\n let shouldRender = true;\n if (this.isDisposed || (!this.renderEvenInBackground && this._windowIsBackground)) {\n shouldRender = false;\n }\n if (shouldRender) {\n // Start new frame\n this.beginFrame();\n // Child canvases\n if (!this._renderViews()) {\n // Main frame\n this._renderFrame();\n }\n // Present\n this.endFrame();\n }\n }\n // The first condition prevents queuing another frame if we no longer have active render loops (e.g., if\n // `stopRenderLoop` is called mid frame). The second condition prevents queuing another frame if one has\n // already been queued (e.g., if `stopRenderLoop` and `runRenderLoop` is called mid frame).\n if (this._activeRenderLoops.length > 0 && this._frameHandler === 0) {\n if (this.customAnimationFrameRequester) {\n this.customAnimationFrameRequester.requestID = this._queueNewFrame(this.customAnimationFrameRequester.renderFunction || this._boundRenderFunction, this.customAnimationFrameRequester);\n this._frameHandler = this.customAnimationFrameRequester.requestID;\n }\n else {\n this._frameHandler = this._queueNewFrame(this._boundRenderFunction, this.getHostWindow());\n }\n }\n }\n /**\n * Enters Pointerlock mode\n */\n enterPointerlock() {\n if (this._renderingCanvas) {\n RequestPointerlock(this._renderingCanvas);\n }\n }\n /**\n * Exits Pointerlock mode\n */\n exitPointerlock() {\n ExitPointerlock();\n }\n /**\n * Begin a new frame\n */\n beginFrame() {\n this._measureFps();\n super.beginFrame();\n }\n _deletePipelineContext(pipelineContext) {\n const webGLPipelineContext = pipelineContext;\n if (webGLPipelineContext && webGLPipelineContext.program) {\n if (webGLPipelineContext.transformFeedback) {\n this.deleteTransformFeedback(webGLPipelineContext.transformFeedback);\n webGLPipelineContext.transformFeedback = null;\n }\n }\n super._deletePipelineContext(pipelineContext);\n }\n createShaderProgram(pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings = null) {\n context = context || this._gl;\n this.onBeforeShaderCompilationObservable.notifyObservers(this);\n const program = super.createShaderProgram(pipelineContext, vertexCode, fragmentCode, defines, context, transformFeedbackVaryings);\n this.onAfterShaderCompilationObservable.notifyObservers(this);\n return program;\n }\n _createShaderProgram(pipelineContext, vertexShader, fragmentShader, context, transformFeedbackVaryings = null) {\n const shaderProgram = context.createProgram();\n pipelineContext.program = shaderProgram;\n if (!shaderProgram) {\n throw new Error(\"Unable to create program\");\n }\n context.attachShader(shaderProgram, vertexShader);\n context.attachShader(shaderProgram, fragmentShader);\n if (this.webGLVersion > 1 && transformFeedbackVaryings) {\n const transformFeedback = this.createTransformFeedback();\n this.bindTransformFeedback(transformFeedback);\n this.setTranformFeedbackVaryings(shaderProgram, transformFeedbackVaryings);\n pipelineContext.transformFeedback = transformFeedback;\n }\n context.linkProgram(shaderProgram);\n if (this.webGLVersion > 1 && transformFeedbackVaryings) {\n this.bindTransformFeedback(null);\n }\n pipelineContext.context = context;\n pipelineContext.vertexShader = vertexShader;\n pipelineContext.fragmentShader = fragmentShader;\n if (!pipelineContext.isParallelCompiled) {\n this._finalizePipelineContext(pipelineContext);\n }\n return shaderProgram;\n }\n /**\n * @internal\n */\n _releaseTexture(texture) {\n super._releaseTexture(texture);\n }\n /**\n * @internal\n */\n _releaseRenderTargetWrapper(rtWrapper) {\n super._releaseRenderTargetWrapper(rtWrapper);\n // Set output texture of post process to null if the framebuffer has been released/disposed\n this.scenes.forEach((scene) => {\n scene.postProcesses.forEach((postProcess) => {\n if (postProcess._outputTexture === rtWrapper) {\n postProcess._outputTexture = null;\n }\n });\n scene.cameras.forEach((camera) => {\n camera._postProcesses.forEach((postProcess) => {\n if (postProcess) {\n if (postProcess._outputTexture === rtWrapper) {\n postProcess._outputTexture = null;\n }\n }\n });\n });\n });\n }\n /**\n * @internal\n * Rescales a texture\n * @param source input texture\n * @param destination destination texture\n * @param scene scene to use to render the resize\n * @param internalFormat format to use when resizing\n * @param onComplete callback to be called when resize has completed\n */\n _rescaleTexture(source, destination, scene, internalFormat, onComplete) {\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, this._gl.LINEAR);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, this._gl.LINEAR);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S, this._gl.CLAMP_TO_EDGE);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, this._gl.CLAMP_TO_EDGE);\n const rtt = this.createRenderTargetTexture({\n width: destination.width,\n height: destination.height,\n }, {\n generateMipMaps: false,\n type: Constants.TEXTURETYPE_UNSIGNED_INT,\n samplingMode: Constants.TEXTURE_BILINEAR_SAMPLINGMODE,\n generateDepthBuffer: false,\n generateStencilBuffer: false,\n });\n if (!this._rescalePostProcess && Engine._RescalePostProcessFactory) {\n this._rescalePostProcess = Engine._RescalePostProcessFactory(this);\n }\n if (this._rescalePostProcess) {\n this._rescalePostProcess.externalTextureSamplerBinding = true;\n const onCompiled = () => {\n this._rescalePostProcess.onApply = function (effect) {\n effect._bindTexture(\"textureSampler\", source);\n };\n let hostingScene = scene;\n if (!hostingScene) {\n hostingScene = this.scenes[this.scenes.length - 1];\n }\n hostingScene.postProcessManager.directRender([this._rescalePostProcess], rtt, true);\n this._bindTextureDirectly(this._gl.TEXTURE_2D, destination, true);\n this._gl.copyTexImage2D(this._gl.TEXTURE_2D, 0, internalFormat, 0, 0, destination.width, destination.height, 0);\n this.unBindFramebuffer(rtt);\n rtt.dispose();\n if (onComplete) {\n onComplete();\n }\n };\n const effect = this._rescalePostProcess.getEffect();\n if (effect) {\n effect.executeWhenCompiled(onCompiled);\n }\n else {\n this._rescalePostProcess.onEffectCreatedObservable.addOnce((effect) => {\n effect.executeWhenCompiled(onCompiled);\n });\n }\n }\n }\n /**\n * Wraps an external web gl texture in a Babylon texture.\n * @param texture defines the external texture\n * @param hasMipMaps defines whether the external texture has mip maps (default: false)\n * @param samplingMode defines the sampling mode for the external texture (default: Constants.TEXTURE_TRILINEAR_SAMPLINGMODE)\n * @param width defines the width for the external texture (default: 0)\n * @param height defines the height for the external texture (default: 0)\n * @returns the babylon internal texture\n */\n wrapWebGLTexture(texture, hasMipMaps = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, width = 0, height = 0) {\n const hardwareTexture = new WebGLHardwareTexture(texture, this._gl);\n const internalTexture = new InternalTexture(this, 0 /* InternalTextureSource.Unknown */, true);\n internalTexture._hardwareTexture = hardwareTexture;\n internalTexture.baseWidth = width;\n internalTexture.baseHeight = height;\n internalTexture.width = width;\n internalTexture.height = height;\n internalTexture.isReady = true;\n internalTexture.useMipMaps = hasMipMaps;\n this.updateTextureSamplingMode(samplingMode, internalTexture);\n return internalTexture;\n }\n /**\n * @internal\n */\n _uploadImageToTexture(texture, image, faceIndex = 0, lod = 0) {\n const gl = this._gl;\n const textureType = this._getWebGLTextureType(texture.type);\n const format = this._getInternalFormat(texture.format);\n const internalFormat = this._getRGBABufferInternalSizedFormat(texture.type, format);\n const bindTarget = texture.isCube ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;\n this._bindTextureDirectly(bindTarget, texture, true);\n this._unpackFlipY(texture.invertY);\n let target = gl.TEXTURE_2D;\n if (texture.isCube) {\n target = gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex;\n }\n gl.texImage2D(target, lod, internalFormat, format, textureType, image);\n this._bindTextureDirectly(bindTarget, null, true);\n }\n /**\n * Updates a depth texture Comparison Mode and Function.\n * If the comparison Function is equal to 0, the mode will be set to none.\n * Otherwise, this only works in webgl 2 and requires a shadow sampler in the shader.\n * @param texture The texture to set the comparison function for\n * @param comparisonFunction The comparison function to set, 0 if no comparison required\n */\n updateTextureComparisonFunction(texture, comparisonFunction) {\n if (this.webGLVersion === 1) {\n Logger.Error(\"WebGL 1 does not support texture comparison.\");\n return;\n }\n const gl = this._gl;\n if (texture.isCube) {\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, texture, true);\n if (comparisonFunction === 0) {\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_FUNC, Constants.LEQUAL);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_MODE, gl.NONE);\n }\n else {\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n }\n else {\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\n if (comparisonFunction === 0) {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_FUNC, Constants.LEQUAL);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE, gl.NONE);\n }\n else {\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_FUNC, comparisonFunction);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n }\n texture._comparisonFunction = comparisonFunction;\n }\n /**\n * Creates a webGL buffer to use with instantiation\n * @param capacity defines the size of the buffer\n * @returns the webGL buffer\n */\n createInstancesBuffer(capacity) {\n const buffer = this._gl.createBuffer();\n if (!buffer) {\n throw new Error(\"Unable to create instance buffer\");\n }\n const result = new WebGLDataBuffer(buffer);\n result.capacity = capacity;\n this.bindArrayBuffer(result);\n this._gl.bufferData(this._gl.ARRAY_BUFFER, capacity, this._gl.DYNAMIC_DRAW);\n result.references = 1;\n return result;\n }\n /**\n * Delete a webGL buffer used with instantiation\n * @param buffer defines the webGL buffer to delete\n */\n deleteInstancesBuffer(buffer) {\n this._gl.deleteBuffer(buffer);\n }\n _clientWaitAsync(sync, flags = 0, intervalms = 10) {\n const gl = this._gl;\n return new Promise((resolve, reject) => {\n const check = () => {\n const res = gl.clientWaitSync(sync, flags, 0);\n if (res == gl.WAIT_FAILED) {\n reject();\n return;\n }\n if (res == gl.TIMEOUT_EXPIRED) {\n setTimeout(check, intervalms);\n return;\n }\n resolve();\n };\n check();\n });\n }\n /**\n * @internal\n */\n _readPixelsAsync(x, y, w, h, format, type, outputBuffer) {\n if (this._webGLVersion < 2) {\n throw new Error(\"_readPixelsAsync only work on WebGL2+\");\n }\n const gl = this._gl;\n const buf = gl.createBuffer();\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, buf);\n gl.bufferData(gl.PIXEL_PACK_BUFFER, outputBuffer.byteLength, gl.STREAM_READ);\n gl.readPixels(x, y, w, h, format, type, 0);\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, null);\n const sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0);\n if (!sync) {\n return null;\n }\n gl.flush();\n return this._clientWaitAsync(sync, 0, 10).then(() => {\n gl.deleteSync(sync);\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, buf);\n gl.getBufferSubData(gl.PIXEL_PACK_BUFFER, 0, outputBuffer);\n gl.bindBuffer(gl.PIXEL_PACK_BUFFER, null);\n gl.deleteBuffer(buf);\n return outputBuffer;\n });\n }\n dispose() {\n this.hideLoadingUI();\n // Rescale PP\n if (this._rescalePostProcess) {\n this._rescalePostProcess.dispose();\n }\n _CommonDispose(this, this._renderingCanvas);\n super.dispose();\n }\n}\n// Const statics\n/** Defines that alpha blending is disabled */\nEngine.ALPHA_DISABLE = Constants.ALPHA_DISABLE;\n/** Defines that alpha blending to SRC ALPHA * SRC + DEST */\nEngine.ALPHA_ADD = Constants.ALPHA_ADD;\n/** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */\nEngine.ALPHA_COMBINE = Constants.ALPHA_COMBINE;\n/** Defines that alpha blending to DEST - SRC * DEST */\nEngine.ALPHA_SUBTRACT = Constants.ALPHA_SUBTRACT;\n/** Defines that alpha blending to SRC * DEST */\nEngine.ALPHA_MULTIPLY = Constants.ALPHA_MULTIPLY;\n/** Defines that alpha blending to SRC ALPHA * SRC + (1 - SRC) * DEST */\nEngine.ALPHA_MAXIMIZED = Constants.ALPHA_MAXIMIZED;\n/** Defines that alpha blending to SRC + DEST */\nEngine.ALPHA_ONEONE = Constants.ALPHA_ONEONE;\n/** Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST */\nEngine.ALPHA_PREMULTIPLIED = Constants.ALPHA_PREMULTIPLIED;\n/**\n * Defines that alpha blending to SRC + (1 - SRC ALPHA) * DEST\n * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA\n */\nEngine.ALPHA_PREMULTIPLIED_PORTERDUFF = Constants.ALPHA_PREMULTIPLIED_PORTERDUFF;\n/** Defines that alpha blending to CST * SRC + (1 - CST) * DEST */\nEngine.ALPHA_INTERPOLATE = Constants.ALPHA_INTERPOLATE;\n/**\n * Defines that alpha blending to SRC + (1 - SRC) * DEST\n * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA\n */\nEngine.ALPHA_SCREENMODE = Constants.ALPHA_SCREENMODE;\n/** Defines that the resource is not delayed*/\nEngine.DELAYLOADSTATE_NONE = Constants.DELAYLOADSTATE_NONE;\n/** Defines that the resource was successfully delay loaded */\nEngine.DELAYLOADSTATE_LOADED = Constants.DELAYLOADSTATE_LOADED;\n/** Defines that the resource is currently delay loading */\nEngine.DELAYLOADSTATE_LOADING = Constants.DELAYLOADSTATE_LOADING;\n/** Defines that the resource is delayed and has not started loading */\nEngine.DELAYLOADSTATE_NOTLOADED = Constants.DELAYLOADSTATE_NOTLOADED;\n// Depht or Stencil test Constants.\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */\nEngine.NEVER = Constants.NEVER;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */\nEngine.ALWAYS = Constants.ALWAYS;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */\nEngine.LESS = Constants.LESS;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */\nEngine.EQUAL = Constants.EQUAL;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */\nEngine.LEQUAL = Constants.LEQUAL;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */\nEngine.GREATER = Constants.GREATER;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */\nEngine.GEQUAL = Constants.GEQUAL;\n/** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */\nEngine.NOTEQUAL = Constants.NOTEQUAL;\n// Stencil Actions Constants.\n/** Passed to stencilOperation to specify that stencil value must be kept */\nEngine.KEEP = Constants.KEEP;\n/** Passed to stencilOperation to specify that stencil value must be replaced */\nEngine.REPLACE = Constants.REPLACE;\n/** Passed to stencilOperation to specify that stencil value must be incremented */\nEngine.INCR = Constants.INCR;\n/** Passed to stencilOperation to specify that stencil value must be decremented */\nEngine.DECR = Constants.DECR;\n/** Passed to stencilOperation to specify that stencil value must be inverted */\nEngine.INVERT = Constants.INVERT;\n/** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */\nEngine.INCR_WRAP = Constants.INCR_WRAP;\n/** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */\nEngine.DECR_WRAP = Constants.DECR_WRAP;\n/** Texture is not repeating outside of 0..1 UVs */\nEngine.TEXTURE_CLAMP_ADDRESSMODE = Constants.TEXTURE_CLAMP_ADDRESSMODE;\n/** Texture is repeating outside of 0..1 UVs */\nEngine.TEXTURE_WRAP_ADDRESSMODE = Constants.TEXTURE_WRAP_ADDRESSMODE;\n/** Texture is repeating and mirrored */\nEngine.TEXTURE_MIRROR_ADDRESSMODE = Constants.TEXTURE_MIRROR_ADDRESSMODE;\n/** ALPHA */\nEngine.TEXTUREFORMAT_ALPHA = Constants.TEXTUREFORMAT_ALPHA;\n/** LUMINANCE */\nEngine.TEXTUREFORMAT_LUMINANCE = Constants.TEXTUREFORMAT_LUMINANCE;\n/** LUMINANCE_ALPHA */\nEngine.TEXTUREFORMAT_LUMINANCE_ALPHA = Constants.TEXTUREFORMAT_LUMINANCE_ALPHA;\n/** RGB */\nEngine.TEXTUREFORMAT_RGB = Constants.TEXTUREFORMAT_RGB;\n/** RGBA */\nEngine.TEXTUREFORMAT_RGBA = Constants.TEXTUREFORMAT_RGBA;\n/** RED */\nEngine.TEXTUREFORMAT_RED = Constants.TEXTUREFORMAT_RED;\n/** RED (2nd reference) */\nEngine.TEXTUREFORMAT_R = Constants.TEXTUREFORMAT_R;\n/** RG */\nEngine.TEXTUREFORMAT_RG = Constants.TEXTUREFORMAT_RG;\n/** RED_INTEGER */\nEngine.TEXTUREFORMAT_RED_INTEGER = Constants.TEXTUREFORMAT_RED_INTEGER;\n/** RED_INTEGER (2nd reference) */\nEngine.TEXTUREFORMAT_R_INTEGER = Constants.TEXTUREFORMAT_R_INTEGER;\n/** RG_INTEGER */\nEngine.TEXTUREFORMAT_RG_INTEGER = Constants.TEXTUREFORMAT_RG_INTEGER;\n/** RGB_INTEGER */\nEngine.TEXTUREFORMAT_RGB_INTEGER = Constants.TEXTUREFORMAT_RGB_INTEGER;\n/** RGBA_INTEGER */\nEngine.TEXTUREFORMAT_RGBA_INTEGER = Constants.TEXTUREFORMAT_RGBA_INTEGER;\n/** UNSIGNED_BYTE */\nEngine.TEXTURETYPE_UNSIGNED_BYTE = Constants.TEXTURETYPE_UNSIGNED_BYTE;\n/** UNSIGNED_BYTE (2nd reference) */\nEngine.TEXTURETYPE_UNSIGNED_INT = Constants.TEXTURETYPE_UNSIGNED_INT;\n/** FLOAT */\nEngine.TEXTURETYPE_FLOAT = Constants.TEXTURETYPE_FLOAT;\n/** HALF_FLOAT */\nEngine.TEXTURETYPE_HALF_FLOAT = Constants.TEXTURETYPE_HALF_FLOAT;\n/** BYTE */\nEngine.TEXTURETYPE_BYTE = Constants.TEXTURETYPE_BYTE;\n/** SHORT */\nEngine.TEXTURETYPE_SHORT = Constants.TEXTURETYPE_SHORT;\n/** UNSIGNED_SHORT */\nEngine.TEXTURETYPE_UNSIGNED_SHORT = Constants.TEXTURETYPE_UNSIGNED_SHORT;\n/** INT */\nEngine.TEXTURETYPE_INT = Constants.TEXTURETYPE_INT;\n/** UNSIGNED_INT */\nEngine.TEXTURETYPE_UNSIGNED_INTEGER = Constants.TEXTURETYPE_UNSIGNED_INTEGER;\n/** UNSIGNED_SHORT_4_4_4_4 */\nEngine.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 = Constants.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4;\n/** UNSIGNED_SHORT_5_5_5_1 */\nEngine.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 = Constants.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1;\n/** UNSIGNED_SHORT_5_6_5 */\nEngine.TEXTURETYPE_UNSIGNED_SHORT_5_6_5 = Constants.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;\n/** UNSIGNED_INT_2_10_10_10_REV */\nEngine.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV = Constants.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV;\n/** UNSIGNED_INT_24_8 */\nEngine.TEXTURETYPE_UNSIGNED_INT_24_8 = Constants.TEXTURETYPE_UNSIGNED_INT_24_8;\n/** UNSIGNED_INT_10F_11F_11F_REV */\nEngine.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV = Constants.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV;\n/** UNSIGNED_INT_5_9_9_9_REV */\nEngine.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV = Constants.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV;\n/** FLOAT_32_UNSIGNED_INT_24_8_REV */\nEngine.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV = Constants.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV;\n/** nearest is mag = nearest and min = nearest and mip = none */\nEngine.TEXTURE_NEAREST_SAMPLINGMODE = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n/** Bilinear is mag = linear and min = linear and mip = nearest */\nEngine.TEXTURE_BILINEAR_SAMPLINGMODE = Constants.TEXTURE_BILINEAR_SAMPLINGMODE;\n/** Trilinear is mag = linear and min = linear and mip = linear */\nEngine.TEXTURE_TRILINEAR_SAMPLINGMODE = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE;\n/** nearest is mag = nearest and min = nearest and mip = linear */\nEngine.TEXTURE_NEAREST_NEAREST_MIPLINEAR = Constants.TEXTURE_NEAREST_NEAREST_MIPLINEAR;\n/** Bilinear is mag = linear and min = linear and mip = nearest */\nEngine.TEXTURE_LINEAR_LINEAR_MIPNEAREST = Constants.TEXTURE_LINEAR_LINEAR_MIPNEAREST;\n/** Trilinear is mag = linear and min = linear and mip = linear */\nEngine.TEXTURE_LINEAR_LINEAR_MIPLINEAR = Constants.TEXTURE_LINEAR_LINEAR_MIPLINEAR;\n/** mag = nearest and min = nearest and mip = nearest */\nEngine.TEXTURE_NEAREST_NEAREST_MIPNEAREST = Constants.TEXTURE_NEAREST_NEAREST_MIPNEAREST;\n/** mag = nearest and min = linear and mip = nearest */\nEngine.TEXTURE_NEAREST_LINEAR_MIPNEAREST = Constants.TEXTURE_NEAREST_LINEAR_MIPNEAREST;\n/** mag = nearest and min = linear and mip = linear */\nEngine.TEXTURE_NEAREST_LINEAR_MIPLINEAR = Constants.TEXTURE_NEAREST_LINEAR_MIPLINEAR;\n/** mag = nearest and min = linear and mip = none */\nEngine.TEXTURE_NEAREST_LINEAR = Constants.TEXTURE_NEAREST_LINEAR;\n/** mag = nearest and min = nearest and mip = none */\nEngine.TEXTURE_NEAREST_NEAREST = Constants.TEXTURE_NEAREST_NEAREST;\n/** mag = linear and min = nearest and mip = nearest */\nEngine.TEXTURE_LINEAR_NEAREST_MIPNEAREST = Constants.TEXTURE_LINEAR_NEAREST_MIPNEAREST;\n/** mag = linear and min = nearest and mip = linear */\nEngine.TEXTURE_LINEAR_NEAREST_MIPLINEAR = Constants.TEXTURE_LINEAR_NEAREST_MIPLINEAR;\n/** mag = linear and min = linear and mip = none */\nEngine.TEXTURE_LINEAR_LINEAR = Constants.TEXTURE_LINEAR_LINEAR;\n/** mag = linear and min = nearest and mip = none */\nEngine.TEXTURE_LINEAR_NEAREST = Constants.TEXTURE_LINEAR_NEAREST;\n/** Explicit coordinates mode */\nEngine.TEXTURE_EXPLICIT_MODE = Constants.TEXTURE_EXPLICIT_MODE;\n/** Spherical coordinates mode */\nEngine.TEXTURE_SPHERICAL_MODE = Constants.TEXTURE_SPHERICAL_MODE;\n/** Planar coordinates mode */\nEngine.TEXTURE_PLANAR_MODE = Constants.TEXTURE_PLANAR_MODE;\n/** Cubic coordinates mode */\nEngine.TEXTURE_CUBIC_MODE = Constants.TEXTURE_CUBIC_MODE;\n/** Projection coordinates mode */\nEngine.TEXTURE_PROJECTION_MODE = Constants.TEXTURE_PROJECTION_MODE;\n/** Skybox coordinates mode */\nEngine.TEXTURE_SKYBOX_MODE = Constants.TEXTURE_SKYBOX_MODE;\n/** Inverse Cubic coordinates mode */\nEngine.TEXTURE_INVCUBIC_MODE = Constants.TEXTURE_INVCUBIC_MODE;\n/** Equirectangular coordinates mode */\nEngine.TEXTURE_EQUIRECTANGULAR_MODE = Constants.TEXTURE_EQUIRECTANGULAR_MODE;\n/** Equirectangular Fixed coordinates mode */\nEngine.TEXTURE_FIXED_EQUIRECTANGULAR_MODE = Constants.TEXTURE_FIXED_EQUIRECTANGULAR_MODE;\n/** Equirectangular Fixed Mirrored coordinates mode */\nEngine.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = Constants.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE;\n// Texture rescaling mode\n/** Defines that texture rescaling will use a floor to find the closer power of 2 size */\nEngine.SCALEMODE_FLOOR = Constants.SCALEMODE_FLOOR;\n/** Defines that texture rescaling will look for the nearest power of 2 size */\nEngine.SCALEMODE_NEAREST = Constants.SCALEMODE_NEAREST;\n/** Defines that texture rescaling will use a ceil to find the closer power of 2 size */\nEngine.SCALEMODE_CEILING = Constants.SCALEMODE_CEILING;\n//# sourceMappingURL=engine.js.map"],"names":["PerformanceMonitor","constructor","frameSampleSize","this","_enabled","_rollingFrameTime","RollingAverage","sampleFrame","timeMs","PrecisionDate","Now","_lastFrameTimeMs","dt","add","averageFrameTime","average","averageFrameTimeVariance","variance","instantaneousFrameTime","history","averageFPS","instantaneousFPS","isSaturated","enable","disable","isEnabled","reset","length","_samples","Array","v","delta","bottomValue","_pos","_sampleCount","_m2","i","i0","_wrapPosition","max","RequestPointerlock","element","requestPointerLock","promise","Promise","then","focus","catch","ThinEngine","prototype","setAlphaMode","mode","noDepthWriteChange","_alphaMode","Constants","ALPHA_DISABLE","_alphaState","alphaBlend","ALPHA_PREMULTIPLIED","setAlphaBlendFunctionParameters","_gl","ONE","ONE_MINUS_SRC_ALPHA","ALPHA_PREMULTIPLIED_PORTERDUFF","ALPHA_COMBINE","SRC_ALPHA","ALPHA_ONEONE","ZERO","ALPHA_ADD","ALPHA_SUBTRACT","ONE_MINUS_SRC_COLOR","ALPHA_MULTIPLY","DST_COLOR","ALPHA_MAXIMIZED","ALPHA_INTERPOLATE","CONSTANT_COLOR","ONE_MINUS_CONSTANT_COLOR","CONSTANT_ALPHA","ONE_MINUS_CONSTANT_ALPHA","ALPHA_SCREENMODE","ALPHA_ONEONE_ONEONE","ALPHA_ALPHATOCOLOR","DST_ALPHA","ALPHA_REVERSEONEMINUS","ONE_MINUS_DST_COLOR","ONE_MINUS_DST_ALPHA","ALPHA_SRC_DSTONEMINUSSRCALPHA","ALPHA_ONEONE_ONEZERO","ALPHA_EXCLUSION","ALPHA_LAYER_ACCUMULATE","depthCullingState","depthMask","updateDynamicIndexBuffer","indexBuffer","indices","offset","view","_currentBoundBuffer","ELEMENT_ARRAY_BUFFER","bindIndexBuffer","is32Bits","Uint32Array","Uint16Array","bufferData","DYNAMIC_DRAW","_resetIndexBufferBinding","updateDynamicVertexBuffer","vertexBuffer","data","byteOffset","byteLength","bindArrayBuffer","undefined","dataLength","bufferSubData","ARRAY_BUFFER","Float32Array","subarray","ArrayBuffer","Uint8Array","buffer","_resetVertexBufferBinding","AbstractEngine","displayLoadingUI","IsWindowObjectExist","loadingScreen","hideLoadingUI","_loadingScreen","Object","defineProperty","get","_renderingCanvas","DefaultLoadingScreenFactory","set","value","enumerable","configurable","loadingUIText","loadingUIBackgroundColor","getInputElement","getRenderingCanvasClientRect","getBoundingClientRect","getInputElementClientRect","getAspectRatio","viewportOwner","useScreen","viewport","getRenderWidth","width","getRenderHeight","height","getScreenAspectRatio","_verifyPointerLock","_onPointerLockChange","setAlphaEquation","equation","_alphaEquation","ALPHA_EQUATION_ADD","setAlphaEquationParameters","GL_ALPHA_EQUATION_ADD","ALPHA_EQUATION_SUBSTRACT","GL_ALPHA_EQUATION_SUBTRACT","ALPHA_EQUATION_REVERSE_SUBTRACT","GL_ALPHA_EQUATION_REVERSE_SUBTRACT","ALPHA_EQUATION_MAX","GL_ALPHA_EQUATION_MAX","ALPHA_EQUATION_MIN","GL_ALPHA_EQUATION_MIN","ALPHA_EQUATION_DARKEN","getDepthFunction","_depthCullingState","depthFunc","setDepthFunction","setDepthFunctionToGreater","GREATER","setDepthFunctionToGreaterOrEqual","GEQUAL","setDepthFunctionToLess","LESS","setDepthFunctionToLessOrEqual","LEQUAL","getDepthWrite","setDepthWrite","getStencilBuffer","_stencilState","stencilTest","setStencilBuffer","getStencilMask","stencilMask","setStencilMask","mask","getStencilFunction","stencilFunc","getStencilFunctionReference","stencilFuncRef","getStencilFunctionMask","stencilFuncMask","setStencilFunction","setStencilFunctionReference","reference","setStencilFunctionMask","getStencilOperationFail","stencilOpStencilFail","getStencilOperationDepthFail","stencilOpDepthFail","getStencilOperationPass","stencilOpStencilDepthPass","setStencilOperationFail","operation","setStencilOperationDepthFail","setStencilOperationPass","cacheStencilState","_cachedStencilBuffer","_cachedStencilFunction","_cachedStencilMask","_cachedStencilOperationPass","_cachedStencilOperationFail","_cachedStencilOperationDepthFail","_cachedStencilReference","restoreStencilState","setAlphaConstants","r","g","b","a","setAlphaBlendConstants","getAlphaMode","getAlphaEquation","getRenderPassNames","_renderPassNames","getCurrentRenderPassName","currentRenderPassId","createRenderPassId","name","id","_RenderPassIdCounter","releaseRenderPassId","s","scenes","scene","m","meshes","mesh","subMeshes","_removeDrawWrapper","Engine","NpmPackage","Version","Instances","EngineStore","LastCreatedEngine","LastCreatedScene","canvas","_supportsHardwareTextureRescaling","_RescalePostProcessFactory","_measureFps","_performanceMonitor","_fps","_deltaTime","performanceMonitor","canvasOrContext","antialias","options","adaptToDeviceRatio","super","customAnimationFrameRequester","_drawCalls","PerfCounter","_features","supportRenderPasses","_creationOptions","getContext","_sharedInit","_initGLContext","_rescalePostProcess","commonEngine","creationOptions","_onCanvasFocus","onCanvasFocusObservable","notifyObservers","_onCanvasBlur","onCanvasBlurObservable","_onCanvasContextMenu","evt","disableContextMenu","preventDefault","addEventListener","_onBlur","disablePerformanceMonitorInBackground","_windowIsBackground","_onFocus","_onCanvasPointerOut","ev","document","elementFromPoint","clientX","clientY","onCanvasPointerOutObservable","hostWindow","getHostWindow","doNotHandleTouchAction","setAttribute","style","touchAction","webkitTapHighlightColor","_DisableTouchAction","audioEngine","AudioEngineFactory","getRenderingCanvas","getAudioContext","getAudioDestination","IsDocumentAvailable","_onFullscreenChange","isFullscreen","fullscreenElement","_pointerLockRequested","isPointerLock","pointerLockElement","enableOfflineSupport","OfflineProviderFactory","_deterministicLockstep","deterministicLockstep","_lockstepMaxSteps","lockstepMaxSteps","_timeStep","timeStep","_CommonInit","resizeImageBitmap","image","bufferWidth","bufferHeight","engine","context","createCanvas","Error","drawImage","getImageData","ResizeImageBitmap","_createImageBitmapFromSource","imageSource","resolve","reject","Image","onload","decode","createImageBitmap","imageBitmap","onerror","src","CreateImageBitmapFromSource","switchFullscreen","exitFullscreen","enterFullscreen","requestFunction","requestFullscreen","webkitRequestFullscreen","call","RequestFullscreen","anyDoc","webkitCancelFullScreen","ExitFullscreen","setDitheringState","DITHER","setRasterizerState","RASTERIZER_DISCARD","setDirectViewport","x","y","currentViewport","_cachedViewport","_viewport","scissorClear","clearColor","enableScissor","clear","disableScissor","gl","SCISSOR_TEST","scissor","_loadFileAsync","url","offlineProvider","useArrayBuffer","_loadFile","request","exception","getVertexShaderSource","program","shaders","getAttachedShaders","getShaderSource","getFragmentShaderSource","framebufferDimensionsObject","dimensions","_framebufferDimensionsObject","onResizeObservable","_rebuildBuffers","resetCachedMaterial","_rebuildGeometries","_virtualScenes","getFontOffset","font","text","createElement","textContent","block","display","verticalAlign","div","whiteSpace","appendChild","body","fontAscent","fontHeight","top","removeChild","ascent","descent","GetFontOffset","_cancelFrame","_frameHandler","cancelAnimationFrame","requestID","_renderLoop","_contextWasLost","shouldRender","isDisposed","renderEvenInBackground","beginFrame","_renderViews","_renderFrame","endFrame","_activeRenderLoops","_queueNewFrame","renderFunction","_boundRenderFunction","enterPointerlock","exitPointerlock","exitPointerLock","_deletePipelineContext","pipelineContext","webGLPipelineContext","transformFeedback","deleteTransformFeedback","createShaderProgram","vertexCode","fragmentCode","defines","transformFeedbackVaryings","onBeforeShaderCompilationObservable","onAfterShaderCompilationObservable","_createShaderProgram","vertexShader","fragmentShader","shaderProgram","createProgram","attachShader","webGLVersion","createTransformFeedback","bindTransformFeedback","setTranformFeedbackVaryings","linkProgram","isParallelCompiled","_finalizePipelineContext","_releaseTexture","texture","_releaseRenderTargetWrapper","rtWrapper","forEach","postProcesses","postProcess","_outputTexture","cameras","camera","_postProcesses","_rescaleTexture","source","destination","internalFormat","onComplete","texParameteri","TEXTURE_2D","TEXTURE_MAG_FILTER","LINEAR","TEXTURE_MIN_FILTER","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","rtt","createRenderTargetTexture","generateMipMaps","type","TEXTURETYPE_UNSIGNED_INT","samplingMode","TEXTURE_BILINEAR_SAMPLINGMODE","generateDepthBuffer","generateStencilBuffer","externalTextureSamplerBinding","onCompiled","onApply","effect","_bindTexture","hostingScene","postProcessManager","directRender","_bindTextureDirectly","copyTexImage2D","unBindFramebuffer","dispose","getEffect","executeWhenCompiled","onEffectCreatedObservable","addOnce","wrapWebGLTexture","hasMipMaps","TEXTURE_TRILINEAR_SAMPLINGMODE","hardwareTexture","WebGLHardwareTexture","internalTexture","InternalTexture","_hardwareTexture","baseWidth","baseHeight","isReady","useMipMaps","updateTextureSamplingMode","_uploadImageToTexture","faceIndex","lod","textureType","_getWebGLTextureType","format","_getInternalFormat","_getRGBABufferInternalSizedFormat","bindTarget","isCube","TEXTURE_CUBE_MAP","_unpackFlipY","invertY","target","TEXTURE_CUBE_MAP_POSITIVE_X","texImage2D","updateTextureComparisonFunction","comparisonFunction","Logger","TEXTURE_COMPARE_FUNC","TEXTURE_COMPARE_MODE","NONE","COMPARE_REF_TO_TEXTURE","_comparisonFunction","createInstancesBuffer","capacity","createBuffer","result","WebGLDataBuffer","references","deleteInstancesBuffer","deleteBuffer","_clientWaitAsync","sync","flags","intervalms","check","res","clientWaitSync","WAIT_FAILED","TIMEOUT_EXPIRED","setTimeout","_readPixelsAsync","w","h","outputBuffer","_webGLVersion","buf","bindBuffer","PIXEL_PACK_BUFFER","STREAM_READ","readPixels","fenceSync","SYNC_GPU_COMMANDS_COMPLETE","flush","deleteSync","getBufferSubData","removeEventListener","_CommonDispose","DELAYLOADSTATE_NONE","DELAYLOADSTATE_LOADED","DELAYLOADSTATE_LOADING","DELAYLOADSTATE_NOTLOADED","NEVER","ALWAYS","EQUAL","NOTEQUAL","KEEP","REPLACE","INCR","DECR","INVERT","INCR_WRAP","DECR_WRAP","TEXTURE_CLAMP_ADDRESSMODE","TEXTURE_WRAP_ADDRESSMODE","TEXTURE_MIRROR_ADDRESSMODE","TEXTUREFORMAT_ALPHA","TEXTUREFORMAT_LUMINANCE","TEXTUREFORMAT_LUMINANCE_ALPHA","TEXTUREFORMAT_RGB","TEXTUREFORMAT_RGBA","TEXTUREFORMAT_RED","TEXTUREFORMAT_R","TEXTUREFORMAT_RG","TEXTUREFORMAT_RED_INTEGER","TEXTUREFORMAT_R_INTEGER","TEXTUREFORMAT_RG_INTEGER","TEXTUREFORMAT_RGB_INTEGER","TEXTUREFORMAT_RGBA_INTEGER","TEXTURETYPE_UNSIGNED_BYTE","TEXTURETYPE_FLOAT","TEXTURETYPE_HALF_FLOAT","TEXTURETYPE_BYTE","TEXTURETYPE_SHORT","TEXTURETYPE_UNSIGNED_SHORT","TEXTURETYPE_INT","TEXTURETYPE_UNSIGNED_INTEGER","TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4","TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1","TEXTURETYPE_UNSIGNED_SHORT_5_6_5","TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV","TEXTURETYPE_UNSIGNED_INT_24_8","TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV","TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV","TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV","TEXTURE_NEAREST_SAMPLINGMODE","TEXTURE_NEAREST_NEAREST_MIPLINEAR","TEXTURE_LINEAR_LINEAR_MIPNEAREST","TEXTURE_LINEAR_LINEAR_MIPLINEAR","TEXTURE_NEAREST_NEAREST_MIPNEAREST","TEXTURE_NEAREST_LINEAR_MIPNEAREST","TEXTURE_NEAREST_LINEAR_MIPLINEAR","TEXTURE_NEAREST_LINEAR","TEXTURE_NEAREST_NEAREST","TEXTURE_LINEAR_NEAREST_MIPNEAREST","TEXTURE_LINEAR_NEAREST_MIPLINEAR","TEXTURE_LINEAR_LINEAR","TEXTURE_LINEAR_NEAREST","TEXTURE_EXPLICIT_MODE","TEXTURE_SPHERICAL_MODE","TEXTURE_PLANAR_MODE","TEXTURE_CUBIC_MODE","TEXTURE_PROJECTION_MODE","TEXTURE_SKYBOX_MODE","TEXTURE_INVCUBIC_MODE","TEXTURE_EQUIRECTANGULAR_MODE","TEXTURE_FIXED_EQUIRECTANGULAR_MODE","TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE","SCALEMODE_FLOOR","SCALEMODE_NEAREST","SCALEMODE_CEILING"],"mappings":"kKAIO,MAAMA,EAKT,WAAAC,CAAYC,EAAkB,IAC1BC,KAAKC,UAAW,EAChBD,KAAKE,kBAAoB,IAAIC,EAAeJ,EAC/C,CAKD,WAAAK,CAAYC,EAASC,EAAcC,KAC/B,GAAKP,KAAKC,SAAV,CAGA,GAA6B,MAAzBD,KAAKQ,iBAA0B,CAC/B,MAAMC,EAAKJ,EAASL,KAAKQ,iBACzBR,KAAKE,kBAAkBQ,IAAID,EAC9B,CACDT,KAAKQ,iBAAmBH,CALvB,CAMJ,CAID,oBAAIM,GACA,OAAOX,KAAKE,kBAAkBU,OACjC,CAID,4BAAIC,GACA,OAAOb,KAAKE,kBAAkBY,QACjC,CAID,0BAAIC,GACA,OAAOf,KAAKE,kBAAkBc,QAAQ,EACzC,CAID,cAAIC,GACA,OAAO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oBAEvCrZ,EAAOsZ,sBAAwBrlB,EAAUqlB,sBAEzCtZ,EAAOuZ,6BAA+BtlB,EAAUslB,6BAEhDvZ,EAAOwZ,mCAAqCvlB,EAAUulB,mCAEtDxZ,EAAOyZ,4CAA8CxlB,EAAUwlB,4CAG/DzZ,EAAO0Z,gBAAkBzlB,EAAUylB,gBAEnC1Z,EAAO2Z,kBAAoB1lB,EAAU0lB,kBAErC3Z,EAAO4Z,kBAAoB3lB,EAAU2lB"}
@@ -0,0 +1,2 @@
1
+ import{G as e,U as n,a as t}from"./environmentTextureTools-CiyJLBbf.esm.min.js";import"./index-RwQCgcf4.esm.min.js";class o{constructor(){this.supportCascades=!1}loadCubeData(o,a,r,s,i){if(Array.isArray(o))return;const d=e(o);if(d){a.width=d.width,a.height=d.width;try{n(a,d),t(a,o,d).then((()=>{a.isReady=!0,a.onLoadedObservable.notifyObservers(a),a.onLoadedObservable.clear(),s&&s()}),(e=>{i?.("Can not upload environment levels",e)}))}catch(e){i?.("Can not upload environment file",e)}}else i&&i("Can not parse the environment file",null)}loadData(){throw".env not supported in 2d."}}export{o as _ENVTextureLoader};
2
+ //# sourceMappingURL=envTextureLoader-DLAJXIl8.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envTextureLoader-DLAJXIl8.esm.min.js","sources":["../../../../../dev/core/dist/Materials/Textures/Loaders/envTextureLoader.js"],"sourcesContent":["import { GetEnvInfo, UploadEnvLevelsAsync, UploadEnvSpherical } from \"../../../Misc/environmentTextureTools\";\n/**\n * Implementation of the ENV Texture Loader.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _ENVTextureLoader {\n constructor() {\n /**\n * Defines whether the loader supports cascade loading the different faces.\n */\n this.supportCascades = false;\n }\n /**\n * Uploads the cube texture data to the WebGL texture. It has already been bound.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param createPolynomials will be true if polynomials have been requested\n * @param onLoad defines the callback to trigger once the texture is ready\n * @param onError defines the callback to trigger in case of error\n */\n loadCubeData(data, texture, createPolynomials, onLoad, onError) {\n if (Array.isArray(data)) {\n return;\n }\n const info = GetEnvInfo(data);\n if (info) {\n texture.width = info.width;\n texture.height = info.width;\n try {\n UploadEnvSpherical(texture, info);\n UploadEnvLevelsAsync(texture, data, info).then(() => {\n texture.isReady = true;\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (onLoad) {\n onLoad();\n }\n }, (reason) => {\n onError?.(\"Can not upload environment levels\", reason);\n });\n }\n catch (e) {\n onError?.(\"Can not upload environment file\", e);\n }\n }\n else if (onError) {\n onError(\"Can not parse the environment file\", null);\n }\n }\n /**\n * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.\n */\n loadData() {\n // eslint-disable-next-line no-throw-literal\n throw \".env not supported in 2d.\";\n }\n}\n//# sourceMappingURL=envTextureLoader.js.map"],"names":["_ENVTextureLoader","constructor","this","supportCascades","loadCubeData","data","texture","createPolynomials","onLoad","onError","Array","isArray","info","GetEnvInfo","width","height","UploadEnvSpherical","UploadEnvLevelsAsync","then","isReady","onLoadedObservable","notifyObservers","clear","reason","e","loadData"],"mappings":"oHAMO,MAAMA,EACT,WAAAC,GAIIC,KAAKC,iBAAkB,CAC1B,CASD,YAAAC,CAAaC,EAAMC,EAASC,EAAmBC,EAAQC,GACnD,GAAIC,MAAMC,QAAQN,GACd,OAEJ,MAAMO,EAAOC,EAAWR,GACxB,GAAIO,EAAM,CACNN,EAAQQ,MAAQF,EAAKE,MACrBR,EAAQS,OAASH,EAAKE,MACtB,IACIE,EAAmBV,EAASM,GAC5BK,EAAqBX,EAASD,EAAMO,GAAMM,MAAK,KAC3CZ,EAAQa,SAAU,EAClBb,EAAQc,mBAAmBC,gBAAgBf,GAC3CA,EAAQc,mBAAmBE,QACvBd,GACAA,GACH,IACDe,IACAd,IAAU,oCAAqCc,EAAO,GAE7D,CACD,MAAOC,GACHf,IAAU,kCAAmCe,EAChD,CACJ,MACQf,GACLA,EAAQ,qCAAsC,KAErD,CAID,QAAAgB,GAEI,KAAM,2BACT"}
@@ -0,0 +1,63 @@
1
+ import { G as GetEnvInfo, U as UploadEnvSpherical, a as UploadEnvLevelsAsync } from './environmentTextureTools-bPqq81in.esm.js';
2
+ import './index-5EaMDaGg.esm.js';
3
+
4
+ /**
5
+ * Implementation of the ENV Texture Loader.
6
+ * @internal
7
+ */
8
+ // eslint-disable-next-line @typescript-eslint/naming-convention
9
+ class _ENVTextureLoader {
10
+ constructor() {
11
+ /**
12
+ * Defines whether the loader supports cascade loading the different faces.
13
+ */
14
+ this.supportCascades = false;
15
+ }
16
+ /**
17
+ * Uploads the cube texture data to the WebGL texture. It has already been bound.
18
+ * @param data contains the texture data
19
+ * @param texture defines the BabylonJS internal texture
20
+ * @param createPolynomials will be true if polynomials have been requested
21
+ * @param onLoad defines the callback to trigger once the texture is ready
22
+ * @param onError defines the callback to trigger in case of error
23
+ */
24
+ loadCubeData(data, texture, createPolynomials, onLoad, onError) {
25
+ if (Array.isArray(data)) {
26
+ return;
27
+ }
28
+ const info = GetEnvInfo(data);
29
+ if (info) {
30
+ texture.width = info.width;
31
+ texture.height = info.width;
32
+ try {
33
+ UploadEnvSpherical(texture, info);
34
+ UploadEnvLevelsAsync(texture, data, info).then(() => {
35
+ texture.isReady = true;
36
+ texture.onLoadedObservable.notifyObservers(texture);
37
+ texture.onLoadedObservable.clear();
38
+ if (onLoad) {
39
+ onLoad();
40
+ }
41
+ }, (reason) => {
42
+ onError?.("Can not upload environment levels", reason);
43
+ });
44
+ }
45
+ catch (e) {
46
+ onError?.("Can not upload environment file", e);
47
+ }
48
+ }
49
+ else if (onError) {
50
+ onError("Can not parse the environment file", null);
51
+ }
52
+ }
53
+ /**
54
+ * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.
55
+ */
56
+ loadData() {
57
+ // eslint-disable-next-line no-throw-literal
58
+ throw ".env not supported in 2d.";
59
+ }
60
+ }
61
+
62
+ export { _ENVTextureLoader };
63
+ //# sourceMappingURL=envTextureLoader-DpLIoFjS.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envTextureLoader-DpLIoFjS.esm.js","sources":["../../../../../dev/core/dist/Materials/Textures/Loaders/envTextureLoader.js"],"sourcesContent":["import { GetEnvInfo, UploadEnvLevelsAsync, UploadEnvSpherical } from \"../../../Misc/environmentTextureTools\";\n/**\n * Implementation of the ENV Texture Loader.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _ENVTextureLoader {\n constructor() {\n /**\n * Defines whether the loader supports cascade loading the different faces.\n */\n this.supportCascades = false;\n }\n /**\n * Uploads the cube texture data to the WebGL texture. It has already been bound.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param createPolynomials will be true if polynomials have been requested\n * @param onLoad defines the callback to trigger once the texture is ready\n * @param onError defines the callback to trigger in case of error\n */\n loadCubeData(data, texture, createPolynomials, onLoad, onError) {\n if (Array.isArray(data)) {\n return;\n }\n const info = GetEnvInfo(data);\n if (info) {\n texture.width = info.width;\n texture.height = info.width;\n try {\n UploadEnvSpherical(texture, info);\n UploadEnvLevelsAsync(texture, data, info).then(() => {\n texture.isReady = true;\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (onLoad) {\n onLoad();\n }\n }, (reason) => {\n onError?.(\"Can not upload environment levels\", reason);\n });\n }\n catch (e) {\n onError?.(\"Can not upload environment file\", e);\n }\n }\n else if (onError) {\n onError(\"Can not parse the environment file\", null);\n }\n }\n /**\n * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.\n */\n loadData() {\n // eslint-disable-next-line no-throw-literal\n throw \".env not supported in 2d.\";\n }\n}\n//# sourceMappingURL=envTextureLoader.js.map"],"names":[],"mappings":";;;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,iBAAiB,CAAC;AAC/B,IAAI,WAAW,GAAG;AAClB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,eAAe,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AACT,KAAK;AACL;AACA;AACA;AACA,IAAI,QAAQ,GAAG;AACf;AACA,QAAQ,MAAM,2BAA2B,CAAC;AAC1C,KAAK;AACL;;;;"}
@@ -0,0 +1,2 @@
1
+ import{L as e,k as t,b3 as r,C as n,b4 as o,c as a,Y as i,as as s,h as l}from"./index-RwQCgcf4.esm.min.js";const u="image/png",p=2,c=[134,22,135,150,246,214,150,54];function T(t){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);let n=0;for(let t=0;t<c.length;t++)if(r.getUint8(n++)!==c[t])return e.Error("Not a babylon environment map"),null;let o="",a=0;for(;a=r.getUint8(n++);)o+=String.fromCharCode(a);let i=JSON.parse(o);return i=d(i),i.specular&&(i.specular.specularDataPosition=n,i.specular.lodGenerationScale=i.specular.lodGenerationScale||.8),i}function d(e){if(e.version>p)throw new Error(`Unsupported babylon environment map version "${e.version}". Latest supported version is "${p}".`);return 2===e.version?e:e={...e,version:2,imageType:u}}function f(e,t,r){const n=(r=d(r)).specular;if(!n)return Promise.resolve();e._lodGenerationScale=n.lodGenerationScale;const o=function(e,t){const r=(t=d(t)).specular;let n=Math.log2(t.width);if(n=Math.round(n)+1,r.mipmaps.length!==6*n)throw new Error(`Unsupported specular mipmaps number "${r.mipmaps.length}"`);const o=new Array(n);for(let t=0;t<n;t++){o[t]=new Array(6);for(let n=0;n<6;n++){const a=r.mipmaps[6*t+n];o[t][n]=new Uint8Array(e.buffer,e.byteOffset+r.specularDataPosition+a.position,a.length)}}return o}(t,r);return _(e,o,r.imageType)}function m(e,t,r,o,a,i,s,l,u,p,c){return new Promise(((T,d)=>{if(r){const r=t.createTexture(null,!0,!0,null,n.TEXTURE_NEAREST_SAMPLINGMODE,null,(e=>{d(e)}),e);o?.onEffectCreatedObservable.addOnce((n=>{n.executeWhenCompiled((()=>{o.externalTextureSamplerBinding=!0,o.onApply=n=>{n._bindTexture("textureSampler",r),n.setFloat2("scale",1,t._features.needsInvertingBitmap&&e instanceof ImageBitmap?-1:1)},t.scenes.length&&(t.scenes[0].postProcessManager.directRender([o],p,!0,i,s),t.restoreDefaultFramebuffer(),r.dispose(),URL.revokeObjectURL(a),T())}))}))}else{if(t._uploadImageToTexture(c,e,i,s),l){const r=u[s];r&&t._uploadImageToTexture(r._texture,e,i,0)}T()}}))}async function _(e,s,l=u){if(!t.IsExponentOfTwo(e.width))throw new Error("Texture size must be a power of two");const p=r(e.width)+1,c=e.getEngine();let T=!1,d=!1,f=null,_=null,y=null;const g=c.getCaps();e.format=n.TEXTUREFORMAT_RGBA,e.type=n.TEXTURETYPE_UNSIGNED_INT,e.generateMipMaps=!0,e._cachedAnisotropicFilteringLevel=null,c.updateTextureSamplingMode(n.TEXTURE_TRILINEAR_SAMPLINGMODE,e),g.textureLOD?c._features.supportRenderAndCopyToLodForFloatTextures?g.textureHalfFloatRender&&g.textureHalfFloatLinearFiltering?(T=!0,e.type=n.TEXTURETYPE_HALF_FLOAT):g.textureFloatRender&&g.textureFloatLinearFiltering&&(T=!0,e.type=n.TEXTURETYPE_FLOAT):T=!1:(T=!1,d=!0,y={});let x=0;if(T)c.isWebGPU?(x=1,await import("./rgbdDecode.fragment-DSa_xyAA.esm.min.js")):await import("./rgbdDecode.fragment-B97s0YHK.esm.min.js"),f=new o("rgbdDecode","rgbdDecode",null,null,1,null,n.TEXTURE_TRILINEAR_SAMPLINGMODE,c,!1,void 0,e.type,void 0,null,!1,void 0,x),e._isRGBD=!1,e.invertY=!1,_=c.createRenderTargetCubeTexture(e.width,{generateDepthBuffer:!1,generateMipMaps:!0,generateStencilBuffer:!1,samplingMode:n.TEXTURE_TRILINEAR_SAMPLINGMODE,type:e.type,format:n.TEXTUREFORMAT_RGBA});else if(e._isRGBD=!0,e.invertY=!0,d){const t=3,r=e._lodGenerationScale,o=e._lodGenerationOffset;for(let s=0;s<t;s++){const l=(p-1)*r+o,u=o+(l-o)*(1-s/(t-1)),T=Math.round(Math.min(Math.max(u,0),l)),d=new a(c,2);d.isCube=!0,d.invertY=!0,d.generateMipMaps=!1,c.updateTextureSamplingMode(n.TEXTURE_LINEAR_LINEAR,d);const f=new i(null);switch(f._isCube=!0,f._texture=d,y[T]=f,s){case 0:e._lodTextureLow=f;break;case 1:e._lodTextureMid=f;break;case 2:e._lodTextureHigh=f}}}const E=[];for(let t=0;t<s.length;t++)for(let r=0;r<6;r++){const n=s[t][r],o=new Blob([n],{type:l}),a=URL.createObjectURL(o);let i;if(c._features.forceBitmapOverHTMLImageElement)i=c.createImageBitmap(o,{premultiplyAlpha:"none"}).then((n=>m(n,c,T,f,a,r,t,d,y,_,e)));else{const n=new Image;n.src=a,i=new Promise(((o,i)=>{n.onload=()=>{m(n,c,T,f,a,r,t,d,y,_,e).then((()=>o())).catch((e=>{i(e)}))},n.onerror=e=>{i(e)}}))}E.push(i)}if(s.length<p){let t;const r=Math.pow(2,p-1-s.length),o=r*r*4;switch(e.type){case n.TEXTURETYPE_UNSIGNED_INT:t=new Uint8Array(o);break;case n.TEXTURETYPE_HALF_FLOAT:t=new Uint16Array(o);break;case n.TEXTURETYPE_FLOAT:t=new Float32Array(o)}for(let r=s.length;r<p;r++)for(let n=0;n<6;n++)c._uploadArrayBufferViewToTexture(e,t,n,r)}return Promise.all(E).then((()=>{_&&(c._releaseTexture(e),_._swapAndDie(e)),f&&f.dispose(),d&&(e._lodTextureHigh&&e._lodTextureHigh._texture&&(e._lodTextureHigh._texture.isReady=!0),e._lodTextureMid&&e._lodTextureMid._texture&&(e._lodTextureMid._texture.isReady=!0),e._lodTextureLow&&e._lodTextureLow._texture&&(e._lodTextureLow._texture.isReady=!0))}))}function y(e,t){const r=(t=d(t)).irradiance;if(!r)return;const n=new s;l.FromArrayToRef(r.x,0,n.x),l.FromArrayToRef(r.y,0,n.y),l.FromArrayToRef(r.z,0,n.z),l.FromArrayToRef(r.xx,0,n.xx),l.FromArrayToRef(r.yy,0,n.yy),l.FromArrayToRef(r.zz,0,n.zz),l.FromArrayToRef(r.yz,0,n.yz),l.FromArrayToRef(r.zx,0,n.zx),l.FromArrayToRef(r.xy,0,n.xy),e._sphericalPolynomial=n}function g(e,t,r,n,o){const a=_(e.getEngine().createRawCubeTexture(null,e.width,e.format,e.type,e.generateMipMaps,e.invertY,e.samplingMode,e._compression),t).then((()=>e));return e.onRebuildCallback=e=>({proxy:a,isReady:!0,isAsync:!0}),e._source=13,e._bufferViewArrayArray=t,e._lodGenerationScale=n,e._lodGenerationOffset=o,e._sphericalPolynomial=r,_(e,t).then((()=>(e.isReady=!0,e)))}export{T as G,y as U,g as _,f as a};
2
+ //# sourceMappingURL=environmentTextureTools-CiyJLBbf.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentTextureTools-CiyJLBbf.esm.min.js","sources":["../../../../../dev/core/dist/Misc/environmentTextureTools.js"],"sourcesContent":["import { Tools } from \"./tools\";\nimport { Vector3 } from \"../Maths/math.vector\";\nimport { ILog2 } from \"../Maths/math.scalar.functions\";\nimport { SphericalPolynomial } from \"../Maths/sphericalPolynomial\";\nimport { InternalTexture } from \"../Materials/Textures/internalTexture\";\nimport { BaseTexture } from \"../Materials/Textures/baseTexture\";\nimport { Constants } from \"../Engines/constants\";\nimport { Scene } from \"../scene\";\nimport { PostProcess } from \"../PostProcesses/postProcess\";\nimport { Logger } from \"../Misc/logger\";\nimport { RGBDTextureTools } from \"./rgbdTextureTools\";\nimport \"../Engines/Extensions/engine.renderTargetCube\";\nimport \"../Engines/Extensions/engine.readTexture\";\nimport \"../Materials/Textures/baseTexture.polynomial\";\nimport { DumpDataAsync } from \"../Misc/dumpTools\";\nconst DefaultEnvironmentTextureImageType = \"image/png\";\nconst CurrentVersion = 2;\n/**\n * Magic number identifying the env file.\n */\nconst MagicBytes = [0x86, 0x16, 0x87, 0x96, 0xf6, 0xd6, 0x96, 0x36];\n/**\n * Gets the environment info from an env file.\n * @param data The array buffer containing the .env bytes.\n * @returns the environment file info (the json header) if successfully parsed, normalized to the latest supported version.\n */\nexport function GetEnvInfo(data) {\n const dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);\n let pos = 0;\n for (let i = 0; i < MagicBytes.length; i++) {\n if (dataView.getUint8(pos++) !== MagicBytes[i]) {\n Logger.Error(\"Not a babylon environment map\");\n return null;\n }\n }\n // Read json manifest - collect characters up to null terminator\n let manifestString = \"\";\n let charCode = 0x00;\n while ((charCode = dataView.getUint8(pos++))) {\n manifestString += String.fromCharCode(charCode);\n }\n let manifest = JSON.parse(manifestString);\n manifest = normalizeEnvInfo(manifest);\n if (manifest.specular) {\n // Extend the header with the position of the payload.\n manifest.specular.specularDataPosition = pos;\n // Fallback to 0.8 exactly if lodGenerationScale is not defined for backward compatibility.\n manifest.specular.lodGenerationScale = manifest.specular.lodGenerationScale || 0.8;\n }\n return manifest;\n}\n/**\n * Normalizes any supported version of the environment file info to the latest version\n * @param info environment file info on any supported version\n * @returns environment file info in the latest supported version\n * @private\n */\nexport function normalizeEnvInfo(info) {\n if (info.version > CurrentVersion) {\n throw new Error(`Unsupported babylon environment map version \"${info.version}\". Latest supported version is \"${CurrentVersion}\".`);\n }\n if (info.version === 2) {\n return info;\n }\n // Migrate a v1 info to v2\n info = { ...info, version: 2, imageType: DefaultEnvironmentTextureImageType };\n return info;\n}\n/**\n * Creates an environment texture from a loaded cube texture.\n * @param texture defines the cube texture to convert in env file\n * @param options options for the conversion process\n * @param options.imageType the mime type for the encoded images, with support for \"image/png\" (default) and \"image/webp\"\n * @param options.imageQuality the image quality of encoded WebP images.\n * @returns a promise containing the environment data if successful.\n */\nexport async function CreateEnvTextureAsync(texture, options = {}) {\n const internalTexture = texture.getInternalTexture();\n if (!internalTexture) {\n return Promise.reject(\"The cube texture is invalid.\");\n }\n const imageType = options.imageType ?? DefaultEnvironmentTextureImageType;\n const engine = internalTexture.getEngine();\n if (texture.textureType !== Constants.TEXTURETYPE_HALF_FLOAT &&\n texture.textureType !== Constants.TEXTURETYPE_FLOAT &&\n texture.textureType !== Constants.TEXTURETYPE_UNSIGNED_BYTE &&\n texture.textureType !== Constants.TEXTURETYPE_UNSIGNED_INT &&\n texture.textureType !== Constants.TEXTURETYPE_UNSIGNED_INTEGER &&\n texture.textureType !== -1) {\n return Promise.reject(\"The cube texture should allow HDR (Full Float or Half Float).\");\n }\n let textureType = Constants.TEXTURETYPE_FLOAT;\n if (!engine.getCaps().textureFloatRender) {\n textureType = Constants.TEXTURETYPE_HALF_FLOAT;\n if (!engine.getCaps().textureHalfFloatRender) {\n return Promise.reject(\"Env texture can only be created when the browser supports half float or full float rendering.\");\n }\n }\n // sphericalPolynomial is lazy loaded so simply accessing it should trigger the computation.\n texture.sphericalPolynomial;\n // Lets keep track of the polynomial promise so we can wait for it to be ready before generating the pixels.\n const sphericalPolynomialPromise = texture.getInternalTexture()?._sphericalPolynomialPromise;\n const cubeWidth = internalTexture.width;\n const hostingScene = new Scene(engine);\n const specularTextures = {};\n // As we are going to readPixels the faces of the cube, make sure the drawing/update commands for the cube texture are fully sent to the GPU in case it is drawn for the first time in this very frame!\n engine.flushFramebuffer();\n // Read and collect all mipmaps data from the cube.\n const mipmapsCount = ILog2(internalTexture.width);\n for (let i = 0; i <= mipmapsCount; i++) {\n const faceWidth = Math.pow(2, mipmapsCount - i);\n // All faces of the cube.\n for (let face = 0; face < 6; face++) {\n let faceData = await texture.readPixels(face, i, undefined, false);\n if (faceData && faceData.byteLength === faceData.length) {\n const faceDataFloat = new Float32Array(faceData.byteLength * 4);\n for (let i = 0; i < faceData.byteLength; i++) {\n faceDataFloat[i] = faceData[i] / 255;\n // Gamma to linear\n faceDataFloat[i] = Math.pow(faceDataFloat[i], 2.2);\n }\n faceData = faceDataFloat;\n }\n else if (faceData && texture.gammaSpace) {\n const floatData = faceData;\n for (let i = 0; i < floatData.length; i++) {\n // Gamma to linear\n floatData[i] = Math.pow(floatData[i], 2.2);\n }\n }\n const tempTexture = engine.createRawTexture(faceData, faceWidth, faceWidth, Constants.TEXTUREFORMAT_RGBA, false, true, Constants.TEXTURE_NEAREST_SAMPLINGMODE, null, textureType);\n await RGBDTextureTools.EncodeTextureToRGBD(tempTexture, hostingScene, textureType);\n const rgbdEncodedData = await engine._readTexturePixels(tempTexture, faceWidth, faceWidth);\n const imageEncodedData = await DumpDataAsync(faceWidth, faceWidth, rgbdEncodedData, imageType, undefined, false, true, options.imageQuality);\n specularTextures[i * 6 + face] = imageEncodedData;\n tempTexture.dispose();\n }\n }\n // We can delete the hosting scene keeping track of all the creation objects\n hostingScene.dispose();\n // Ensure completion of the polynomial creation promise.\n if (sphericalPolynomialPromise) {\n await sphericalPolynomialPromise;\n }\n // Creates the json header for the env texture\n const info = {\n version: CurrentVersion,\n width: cubeWidth,\n imageType,\n irradiance: _CreateEnvTextureIrradiance(texture),\n specular: {\n mipmaps: [],\n lodGenerationScale: texture.lodGenerationScale,\n },\n };\n // Sets the specular image data information\n let position = 0;\n for (let i = 0; i <= mipmapsCount; i++) {\n for (let face = 0; face < 6; face++) {\n const byteLength = specularTextures[i * 6 + face].byteLength;\n info.specular.mipmaps.push({\n length: byteLength,\n position: position,\n });\n position += byteLength;\n }\n }\n // Encode the JSON as an array buffer\n const infoString = JSON.stringify(info);\n const infoBuffer = new ArrayBuffer(infoString.length + 1);\n const infoView = new Uint8Array(infoBuffer); // Limited to ascii subset matching unicode.\n for (let i = 0, strLen = infoString.length; i < strLen; i++) {\n infoView[i] = infoString.charCodeAt(i);\n }\n // Ends up with a null terminator for easier parsing\n infoView[infoString.length] = 0x00;\n // Computes the final required size and creates the storage\n const totalSize = MagicBytes.length + position + infoBuffer.byteLength;\n const finalBuffer = new ArrayBuffer(totalSize);\n const finalBufferView = new Uint8Array(finalBuffer);\n const dataView = new DataView(finalBuffer);\n // Copy the magic bytes identifying the file in\n let pos = 0;\n for (let i = 0; i < MagicBytes.length; i++) {\n dataView.setUint8(pos++, MagicBytes[i]);\n }\n // Add the json info\n finalBufferView.set(new Uint8Array(infoBuffer), pos);\n pos += infoBuffer.byteLength;\n // Finally inserts the texture data\n for (let i = 0; i <= mipmapsCount; i++) {\n for (let face = 0; face < 6; face++) {\n const dataBuffer = specularTextures[i * 6 + face];\n finalBufferView.set(new Uint8Array(dataBuffer), pos);\n pos += dataBuffer.byteLength;\n }\n }\n // Voila\n return finalBuffer;\n}\n/**\n * Creates a JSON representation of the spherical data.\n * @param texture defines the texture containing the polynomials\n * @returns the JSON representation of the spherical info\n */\nfunction _CreateEnvTextureIrradiance(texture) {\n const polynmials = texture.sphericalPolynomial;\n if (polynmials == null) {\n return null;\n }\n return {\n x: [polynmials.x.x, polynmials.x.y, polynmials.x.z],\n y: [polynmials.y.x, polynmials.y.y, polynmials.y.z],\n z: [polynmials.z.x, polynmials.z.y, polynmials.z.z],\n xx: [polynmials.xx.x, polynmials.xx.y, polynmials.xx.z],\n yy: [polynmials.yy.x, polynmials.yy.y, polynmials.yy.z],\n zz: [polynmials.zz.x, polynmials.zz.y, polynmials.zz.z],\n yz: [polynmials.yz.x, polynmials.yz.y, polynmials.yz.z],\n zx: [polynmials.zx.x, polynmials.zx.y, polynmials.zx.z],\n xy: [polynmials.xy.x, polynmials.xy.y, polynmials.xy.z],\n };\n}\n/**\n * Creates the ArrayBufferViews used for initializing environment texture image data.\n * @param data the image data\n * @param info parameters that determine what views will be created for accessing the underlying buffer\n * @returns the views described by info providing access to the underlying buffer\n */\nexport function CreateImageDataArrayBufferViews(data, info) {\n info = normalizeEnvInfo(info);\n const specularInfo = info.specular;\n // Double checks the enclosed info\n let mipmapsCount = Math.log2(info.width);\n mipmapsCount = Math.round(mipmapsCount) + 1;\n if (specularInfo.mipmaps.length !== 6 * mipmapsCount) {\n throw new Error(`Unsupported specular mipmaps number \"${specularInfo.mipmaps.length}\"`);\n }\n const imageData = new Array(mipmapsCount);\n for (let i = 0; i < mipmapsCount; i++) {\n imageData[i] = new Array(6);\n for (let face = 0; face < 6; face++) {\n const imageInfo = specularInfo.mipmaps[i * 6 + face];\n imageData[i][face] = new Uint8Array(data.buffer, data.byteOffset + specularInfo.specularDataPosition + imageInfo.position, imageInfo.length);\n }\n }\n return imageData;\n}\n/**\n * Uploads the texture info contained in the env file to the GPU.\n * @param texture defines the internal texture to upload to\n * @param data defines the data to load\n * @param info defines the texture info retrieved through the GetEnvInfo method\n * @returns a promise\n */\nexport function UploadEnvLevelsAsync(texture, data, info) {\n info = normalizeEnvInfo(info);\n const specularInfo = info.specular;\n if (!specularInfo) {\n // Nothing else parsed so far\n return Promise.resolve();\n }\n texture._lodGenerationScale = specularInfo.lodGenerationScale;\n const imageData = CreateImageDataArrayBufferViews(data, info);\n return UploadLevelsAsync(texture, imageData, info.imageType);\n}\nfunction _OnImageReadyAsync(image, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture) {\n return new Promise((resolve, reject) => {\n if (expandTexture) {\n const tempTexture = engine.createTexture(null, true, true, null, Constants.TEXTURE_NEAREST_SAMPLINGMODE, null, (message) => {\n reject(message);\n }, image);\n rgbdPostProcess?.onEffectCreatedObservable.addOnce((effect) => {\n effect.executeWhenCompiled(() => {\n // Uncompress the data to a RTT\n rgbdPostProcess.externalTextureSamplerBinding = true;\n rgbdPostProcess.onApply = (effect) => {\n effect._bindTexture(\"textureSampler\", tempTexture);\n effect.setFloat2(\"scale\", 1, engine._features.needsInvertingBitmap && image instanceof ImageBitmap ? -1 : 1);\n };\n if (!engine.scenes.length) {\n return;\n }\n engine.scenes[0].postProcessManager.directRender([rgbdPostProcess], cubeRtt, true, face, i);\n // Cleanup\n engine.restoreDefaultFramebuffer();\n tempTexture.dispose();\n URL.revokeObjectURL(url);\n resolve();\n });\n });\n }\n else {\n engine._uploadImageToTexture(texture, image, face, i);\n // Upload the face to the non lod texture support\n if (generateNonLODTextures) {\n const lodTexture = lodTextures[i];\n if (lodTexture) {\n engine._uploadImageToTexture(lodTexture._texture, image, face, 0);\n }\n }\n resolve();\n }\n });\n}\n/**\n * Uploads the levels of image data to the GPU.\n * @param texture defines the internal texture to upload to\n * @param imageData defines the array buffer views of image data [mipmap][face]\n * @param imageType the mime type of the image data\n * @returns a promise\n */\nexport async function UploadLevelsAsync(texture, imageData, imageType = DefaultEnvironmentTextureImageType) {\n if (!Tools.IsExponentOfTwo(texture.width)) {\n throw new Error(\"Texture size must be a power of two\");\n }\n const mipmapsCount = ILog2(texture.width) + 1;\n // Gets everything ready.\n const engine = texture.getEngine();\n let expandTexture = false;\n let generateNonLODTextures = false;\n let rgbdPostProcess = null;\n let cubeRtt = null;\n let lodTextures = null;\n const caps = engine.getCaps();\n texture.format = Constants.TEXTUREFORMAT_RGBA;\n texture.type = Constants.TEXTURETYPE_UNSIGNED_INT;\n texture.generateMipMaps = true;\n texture._cachedAnisotropicFilteringLevel = null;\n engine.updateTextureSamplingMode(Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, texture);\n // Add extra process if texture lod is not supported\n if (!caps.textureLOD) {\n expandTexture = false;\n generateNonLODTextures = true;\n lodTextures = {};\n }\n // in webgl 1 there are no ways to either render or copy lod level information for float textures.\n else if (!engine._features.supportRenderAndCopyToLodForFloatTextures) {\n expandTexture = false;\n }\n // If half float available we can uncompress the texture\n else if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {\n expandTexture = true;\n texture.type = Constants.TEXTURETYPE_HALF_FLOAT;\n }\n // If full float available we can uncompress the texture\n else if (caps.textureFloatRender && caps.textureFloatLinearFiltering) {\n expandTexture = true;\n texture.type = Constants.TEXTURETYPE_FLOAT;\n }\n // Expand the texture if possible\n let shaderLanguage = 0 /* ShaderLanguage.GLSL */;\n if (expandTexture) {\n if (engine.isWebGPU) {\n shaderLanguage = 1 /* ShaderLanguage.WGSL */;\n await import(\"../ShadersWGSL/rgbdDecode.fragment\");\n }\n else {\n await import(\"../Shaders/rgbdDecode.fragment\");\n }\n // Simply run through the decode PP\n rgbdPostProcess = new PostProcess(\"rgbdDecode\", \"rgbdDecode\", null, null, 1, null, Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, engine, false, undefined, texture.type, undefined, null, false, undefined, shaderLanguage);\n texture._isRGBD = false;\n texture.invertY = false;\n cubeRtt = engine.createRenderTargetCubeTexture(texture.width, {\n generateDepthBuffer: false,\n generateMipMaps: true,\n generateStencilBuffer: false,\n samplingMode: Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,\n type: texture.type,\n format: Constants.TEXTUREFORMAT_RGBA,\n });\n }\n else {\n texture._isRGBD = true;\n texture.invertY = true;\n // In case of missing support, applies the same patch than DDS files.\n if (generateNonLODTextures) {\n const mipSlices = 3;\n const scale = texture._lodGenerationScale;\n const offset = texture._lodGenerationOffset;\n for (let i = 0; i < mipSlices; i++) {\n //compute LOD from even spacing in smoothness (matching shader calculation)\n const smoothness = i / (mipSlices - 1);\n const roughness = 1 - smoothness;\n const minLODIndex = offset; // roughness = 0\n const maxLODIndex = (mipmapsCount - 1) * scale + offset; // roughness = 1 (mipmaps start from 0)\n const lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;\n const mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));\n const glTextureFromLod = new InternalTexture(engine, 2 /* InternalTextureSource.Temp */);\n glTextureFromLod.isCube = true;\n glTextureFromLod.invertY = true;\n glTextureFromLod.generateMipMaps = false;\n engine.updateTextureSamplingMode(Constants.TEXTURE_LINEAR_LINEAR, glTextureFromLod);\n // Wrap in a base texture for easy binding.\n const lodTexture = new BaseTexture(null);\n lodTexture._isCube = true;\n lodTexture._texture = glTextureFromLod;\n lodTextures[mipmapIndex] = lodTexture;\n switch (i) {\n case 0:\n texture._lodTextureLow = lodTexture;\n break;\n case 1:\n texture._lodTextureMid = lodTexture;\n break;\n case 2:\n texture._lodTextureHigh = lodTexture;\n break;\n }\n }\n }\n }\n const promises = [];\n // All mipmaps up to provided number of images\n for (let i = 0; i < imageData.length; i++) {\n // All faces\n for (let face = 0; face < 6; face++) {\n // Constructs an image element from image data\n const bytes = imageData[i][face];\n const blob = new Blob([bytes], { type: imageType });\n const url = URL.createObjectURL(blob);\n let promise;\n if (engine._features.forceBitmapOverHTMLImageElement) {\n promise = engine.createImageBitmap(blob, { premultiplyAlpha: \"none\" }).then((img) => {\n return _OnImageReadyAsync(img, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture);\n });\n }\n else {\n const image = new Image();\n image.src = url;\n // Enqueue promise to upload to the texture.\n promise = new Promise((resolve, reject) => {\n image.onload = () => {\n _OnImageReadyAsync(image, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture)\n .then(() => resolve())\n .catch((reason) => {\n reject(reason);\n });\n };\n image.onerror = (error) => {\n reject(error);\n };\n });\n }\n promises.push(promise);\n }\n }\n // Fill remaining mipmaps with black textures.\n if (imageData.length < mipmapsCount) {\n let data;\n const size = Math.pow(2, mipmapsCount - 1 - imageData.length);\n const dataLength = size * size * 4;\n switch (texture.type) {\n case Constants.TEXTURETYPE_UNSIGNED_INT: {\n data = new Uint8Array(dataLength);\n break;\n }\n case Constants.TEXTURETYPE_HALF_FLOAT: {\n data = new Uint16Array(dataLength);\n break;\n }\n case Constants.TEXTURETYPE_FLOAT: {\n data = new Float32Array(dataLength);\n break;\n }\n }\n for (let i = imageData.length; i < mipmapsCount; i++) {\n for (let face = 0; face < 6; face++) {\n engine._uploadArrayBufferViewToTexture(texture, data, face, i);\n }\n }\n }\n // Once all done, finishes the cleanup and return\n return Promise.all(promises).then(() => {\n // Release temp RTT.\n if (cubeRtt) {\n engine._releaseTexture(texture);\n cubeRtt._swapAndDie(texture);\n }\n // Release temp Post Process.\n if (rgbdPostProcess) {\n rgbdPostProcess.dispose();\n }\n // Flag internal texture as ready in case they are in use.\n if (generateNonLODTextures) {\n if (texture._lodTextureHigh && texture._lodTextureHigh._texture) {\n texture._lodTextureHigh._texture.isReady = true;\n }\n if (texture._lodTextureMid && texture._lodTextureMid._texture) {\n texture._lodTextureMid._texture.isReady = true;\n }\n if (texture._lodTextureLow && texture._lodTextureLow._texture) {\n texture._lodTextureLow._texture.isReady = true;\n }\n }\n });\n}\n/**\n * Uploads spherical polynomials information to the texture.\n * @param texture defines the texture we are trying to upload the information to\n * @param info defines the environment texture info retrieved through the GetEnvInfo method\n */\nexport function UploadEnvSpherical(texture, info) {\n info = normalizeEnvInfo(info);\n const irradianceInfo = info.irradiance;\n if (!irradianceInfo) {\n return;\n }\n const sp = new SphericalPolynomial();\n Vector3.FromArrayToRef(irradianceInfo.x, 0, sp.x);\n Vector3.FromArrayToRef(irradianceInfo.y, 0, sp.y);\n Vector3.FromArrayToRef(irradianceInfo.z, 0, sp.z);\n Vector3.FromArrayToRef(irradianceInfo.xx, 0, sp.xx);\n Vector3.FromArrayToRef(irradianceInfo.yy, 0, sp.yy);\n Vector3.FromArrayToRef(irradianceInfo.zz, 0, sp.zz);\n Vector3.FromArrayToRef(irradianceInfo.yz, 0, sp.yz);\n Vector3.FromArrayToRef(irradianceInfo.zx, 0, sp.zx);\n Vector3.FromArrayToRef(irradianceInfo.xy, 0, sp.xy);\n texture._sphericalPolynomial = sp;\n}\n/**\n * @internal\n */\nexport function _UpdateRGBDAsync(internalTexture, data, sphericalPolynomial, lodScale, lodOffset) {\n const proxy = internalTexture\n .getEngine()\n .createRawCubeTexture(null, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);\n const proxyPromise = UploadLevelsAsync(proxy, data).then(() => internalTexture);\n internalTexture.onRebuildCallback = (_internalTexture) => {\n return {\n proxy: proxyPromise,\n isReady: true,\n isAsync: true,\n };\n };\n internalTexture._source = 13 /* InternalTextureSource.CubeRawRGBD */;\n internalTexture._bufferViewArrayArray = data;\n internalTexture._lodGenerationScale = lodScale;\n internalTexture._lodGenerationOffset = lodOffset;\n internalTexture._sphericalPolynomial = sphericalPolynomial;\n return UploadLevelsAsync(internalTexture, data).then(() => {\n internalTexture.isReady = true;\n return internalTexture;\n });\n}\n/**\n * Sets of helpers addressing the serialization and deserialization of environment texture\n * stored in a BabylonJS env file.\n * Those files are usually stored as .env files.\n */\nexport const EnvironmentTextureTools = {\n /**\n * Gets the environment info from an env file.\n * @param data The array buffer containing the .env bytes.\n * @returns the environment file info (the json header) if successfully parsed, normalized to the latest supported version.\n */\n GetEnvInfo,\n /**\n * Creates an environment texture from a loaded cube texture.\n * @param texture defines the cube texture to convert in env file\n * @param options options for the conversion process\n * @param options.imageType the mime type for the encoded images, with support for \"image/png\" (default) and \"image/webp\"\n * @param options.imageQuality the image quality of encoded WebP images.\n * @returns a promise containing the environment data if successful.\n */\n CreateEnvTextureAsync,\n /**\n * Creates the ArrayBufferViews used for initializing environment texture image data.\n * @param data the image data\n * @param info parameters that determine what views will be created for accessing the underlying buffer\n * @returns the views described by info providing access to the underlying buffer\n */\n CreateImageDataArrayBufferViews,\n /**\n * Uploads the texture info contained in the env file to the GPU.\n * @param texture defines the internal texture to upload to\n * @param data defines the data to load\n * @param info defines the texture info retrieved through the GetEnvInfo method\n * @returns a promise\n */\n UploadEnvLevelsAsync,\n /**\n * Uploads the levels of image data to the GPU.\n * @param texture defines the internal texture to upload to\n * @param imageData defines the array buffer views of image data [mipmap][face]\n * @param imageType the mime type of the image data\n * @returns a promise\n */\n UploadLevelsAsync,\n /**\n * Uploads spherical polynomials information to the texture.\n * @param texture defines the texture we are trying to upload the information to\n * @param info defines the environment texture info retrieved through the GetEnvInfo method\n */\n UploadEnvSpherical,\n};\n//# sourceMappingURL=environmentTextureTools.js.map"],"names":["DefaultEnvironmentTextureImageType","CurrentVersion","MagicBytes","GetEnvInfo","data","dataView","DataView","buffer","byteOffset","byteLength","pos","i","length","getUint8","Logger","Error","manifestString","charCode","String","fromCharCode","manifest","JSON","parse","normalizeEnvInfo","specular","specularDataPosition","lodGenerationScale","info","version","imageType","UploadEnvLevelsAsync","texture","specularInfo","Promise","resolve","_lodGenerationScale","imageData","mipmapsCount","Math","log2","width","round","mipmaps","Array","face","imageInfo","Uint8Array","position","CreateImageDataArrayBufferViews","UploadLevelsAsync","_OnImageReadyAsync","image","engine","expandTexture","rgbdPostProcess","url","generateNonLODTextures","lodTextures","cubeRtt","reject","tempTexture","createTexture","Constants","TEXTURE_NEAREST_SAMPLINGMODE","message","onEffectCreatedObservable","addOnce","effect","executeWhenCompiled","externalTextureSamplerBinding","onApply","_bindTexture","setFloat2","_features","needsInvertingBitmap","ImageBitmap","scenes","postProcessManager","directRender","restoreDefaultFramebuffer","dispose","URL","revokeObjectURL","_uploadImageToTexture","lodTexture","_texture","async","Tools","IsExponentOfTwo","ILog2","getEngine","caps","getCaps","format","TEXTUREFORMAT_RGBA","type","TEXTURETYPE_UNSIGNED_INT","generateMipMaps","_cachedAnisotropicFilteringLevel","updateTextureSamplingMode","TEXTURE_TRILINEAR_SAMPLINGMODE","textureLOD","supportRenderAndCopyToLodForFloatTextures","textureHalfFloatRender","textureHalfFloatLinearFiltering","TEXTURETYPE_HALF_FLOAT","textureFloatRender","textureFloatLinearFiltering","TEXTURETYPE_FLOAT","shaderLanguage","isWebGPU","import","PostProcess","undefined","_isRGBD","invertY","createRenderTargetCubeTexture","generateDepthBuffer","generateStencilBuffer","samplingMode","mipSlices","scale","offset","_lodGenerationOffset","maxLODIndex","lodIndex","mipmapIndex","min","max","glTextureFromLod","InternalTexture","isCube","TEXTURE_LINEAR_LINEAR","BaseTexture","_isCube","_lodTextureLow","_lodTextureMid","_lodTextureHigh","promises","bytes","blob","Blob","createObjectURL","promise","forceBitmapOverHTMLImageElement","createImageBitmap","premultiplyAlpha","then","img","Image","src","onload","catch","reason","onerror","error","push","size","pow","dataLength","Uint16Array","Float32Array","_uploadArrayBufferViewToTexture","all","_releaseTexture","_swapAndDie","isReady","UploadEnvSpherical","irradianceInfo","irradiance","sp","SphericalPolynomial","Vector3","FromArrayToRef","x","y","z","xx","yy","zz","yz","zx","xy","_sphericalPolynomial","_UpdateRGBDAsync","internalTexture","sphericalPolynomial","lodScale","lodOffset","proxyPromise","createRawCubeTexture","_compression","onRebuildCallback","_internalTexture","proxy","isAsync","_source","_bufferVi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