@babylonjs/viewer 7.42.0 → 7.44.0

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 (607) hide show
  1. package/assets/photoStudio.env +0 -0
  2. package/dist/babylon-viewer.esm.js +2 -0
  3. package/dist/babylon-viewer.esm.js.map +1 -0
  4. package/dist/babylon-viewer.esm.min.js +2 -0
  5. package/dist/babylon-viewer.esm.min.js.map +1 -0
  6. package/dist/chunks/EXT_lights_ies-D-oSSifC.esm.min.js +2 -0
  7. package/dist/chunks/EXT_lights_ies-D-oSSifC.esm.min.js.map +1 -0
  8. package/dist/chunks/EXT_lights_ies-DJJLktlG.esm.js +84 -0
  9. package/dist/chunks/EXT_lights_ies-DJJLktlG.esm.js.map +1 -0
  10. package/dist/chunks/EXT_lights_image_based-Bm1EdHWU.esm.js +171 -0
  11. package/dist/chunks/EXT_lights_image_based-Bm1EdHWU.esm.js.map +1 -0
  12. package/dist/chunks/EXT_lights_image_based-CPP95suP.esm.min.js +2 -0
  13. package/dist/chunks/EXT_lights_image_based-CPP95suP.esm.min.js.map +1 -0
  14. package/dist/chunks/EXT_mesh_gpu_instancing-DuFNjp-b.esm.js +86 -0
  15. package/dist/chunks/EXT_mesh_gpu_instancing-DuFNjp-b.esm.js.map +1 -0
  16. package/dist/chunks/EXT_mesh_gpu_instancing-RXBAS2yg.esm.min.js +2 -0
  17. package/dist/chunks/EXT_mesh_gpu_instancing-RXBAS2yg.esm.min.js.map +1 -0
  18. package/dist/chunks/EXT_meshopt_compression-B_tol2Sa.esm.min.js +2 -0
  19. package/dist/chunks/EXT_meshopt_compression-B_tol2Sa.esm.min.js.map +1 -0
  20. package/dist/chunks/EXT_meshopt_compression-Rai3-_W3.esm.js +134 -0
  21. package/dist/chunks/EXT_meshopt_compression-Rai3-_W3.esm.js.map +1 -0
  22. package/dist/chunks/EXT_texture_avif-D3PbSGsk.esm.js +44 -0
  23. package/dist/chunks/EXT_texture_avif-D3PbSGsk.esm.js.map +1 -0
  24. package/dist/chunks/EXT_texture_avif-DB96e8gK.esm.min.js +2 -0
  25. package/dist/chunks/EXT_texture_avif-DB96e8gK.esm.min.js.map +1 -0
  26. package/dist/chunks/EXT_texture_webp-BrAdNUVI.esm.min.js +2 -0
  27. package/dist/chunks/EXT_texture_webp-BrAdNUVI.esm.min.js.map +1 -0
  28. package/dist/chunks/EXT_texture_webp-BsSdw4hb.esm.js +43 -0
  29. package/dist/chunks/EXT_texture_webp-BsSdw4hb.esm.js.map +1 -0
  30. package/dist/chunks/ExtrasAsMetadata-CvpNkVJm.esm.js +64 -0
  31. package/dist/chunks/ExtrasAsMetadata-CvpNkVJm.esm.js.map +1 -0
  32. package/dist/chunks/ExtrasAsMetadata-CwSGAnId.esm.min.js +2 -0
  33. package/dist/chunks/ExtrasAsMetadata-CwSGAnId.esm.min.js.map +1 -0
  34. package/dist/chunks/KHR_animation_pointer-B29-7REN.esm.js +352 -0
  35. package/dist/chunks/KHR_animation_pointer-B29-7REN.esm.js.map +1 -0
  36. package/dist/chunks/KHR_animation_pointer-DXhkj5r0.esm.min.js +2 -0
  37. package/dist/chunks/KHR_animation_pointer-DXhkj5r0.esm.min.js.map +1 -0
  38. package/dist/chunks/KHR_draco_mesh_compression-4y3oU3vs.esm.js +611 -0
  39. package/dist/chunks/KHR_draco_mesh_compression-4y3oU3vs.esm.js.map +1 -0
  40. package/dist/chunks/KHR_draco_mesh_compression-OUEmCF9O.esm.min.js +2 -0
  41. package/dist/chunks/KHR_draco_mesh_compression-OUEmCF9O.esm.min.js.map +1 -0
  42. package/dist/chunks/KHR_interactivity-DmxwZO-B.esm.min.js +2 -0
  43. package/dist/chunks/KHR_interactivity-DmxwZO-B.esm.min.js.map +1 -0
  44. package/dist/chunks/KHR_interactivity-Nql0vbRS.esm.js +4033 -0
  45. package/dist/chunks/KHR_interactivity-Nql0vbRS.esm.js.map +1 -0
  46. package/dist/chunks/KHR_lights_punctual-BuxTRJTD.esm.min.js +2 -0
  47. package/dist/chunks/KHR_lights_punctual-BuxTRJTD.esm.min.js.map +1 -0
  48. package/dist/chunks/KHR_lights_punctual-DT1Tmy49.esm.js +581 -0
  49. package/dist/chunks/KHR_lights_punctual-DT1Tmy49.esm.js.map +1 -0
  50. package/dist/chunks/KHR_materials_anisotropy-CkyM8JSq.esm.min.js +2 -0
  51. package/dist/chunks/KHR_materials_anisotropy-CkyM8JSq.esm.min.js.map +1 -0
  52. package/dist/chunks/KHR_materials_anisotropy-rMp1ahNa.esm.js +65 -0
  53. package/dist/chunks/KHR_materials_anisotropy-rMp1ahNa.esm.js.map +1 -0
  54. package/dist/chunks/KHR_materials_clearcoat-Dw7bP6zs.esm.js +96 -0
  55. package/dist/chunks/KHR_materials_clearcoat-Dw7bP6zs.esm.js.map +1 -0
  56. package/dist/chunks/KHR_materials_clearcoat-c_8cDReS.esm.min.js +2 -0
  57. package/dist/chunks/KHR_materials_clearcoat-c_8cDReS.esm.min.js.map +1 -0
  58. package/dist/chunks/KHR_materials_diffuse_transmission-CXn0MUer.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_diffuse_transmission-CXn0MUer.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_diffuse_transmission-CsMJW09v.esm.js +97 -0
  61. package/dist/chunks/KHR_materials_diffuse_transmission-CsMJW09v.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_dispersion-BDCbGsPA.esm.js +62 -0
  63. package/dist/chunks/KHR_materials_dispersion-BDCbGsPA.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_dispersion-D2yTJOjM.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_dispersion-D2yTJOjM.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_emissive_strength-Tz0C88U3.esm.min.js +2 -0
  67. package/dist/chunks/KHR_materials_emissive_strength-Tz0C88U3.esm.min.js.map +1 -0
  68. package/dist/chunks/KHR_materials_emissive_strength-jQMxZKq5.esm.js +55 -0
  69. package/dist/chunks/KHR_materials_emissive_strength-jQMxZKq5.esm.js.map +1 -0
  70. package/dist/chunks/KHR_materials_ior-2zUX8jy7.esm.js +64 -0
  71. package/dist/chunks/KHR_materials_ior-2zUX8jy7.esm.js.map +1 -0
  72. package/dist/chunks/KHR_materials_ior-sCAKuvLs.esm.min.js +2 -0
  73. package/dist/chunks/KHR_materials_ior-sCAKuvLs.esm.min.js.map +1 -0
  74. package/dist/chunks/KHR_materials_iridescence-CTk6lY7i.esm.min.js +2 -0
  75. package/dist/chunks/KHR_materials_iridescence-CTk6lY7i.esm.min.js.map +1 -0
  76. package/dist/chunks/KHR_materials_iridescence-DxBAsUzR.esm.js +72 -0
  77. package/dist/chunks/KHR_materials_iridescence-DxBAsUzR.esm.js.map +1 -0
  78. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BgkZXf0x.esm.js +81 -0
  79. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BgkZXf0x.esm.js.map +1 -0
  80. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Dq7WTMdT.esm.min.js +2 -0
  81. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Dq7WTMdT.esm.min.js.map +1 -0
  82. package/dist/chunks/KHR_materials_sheen-35UGLw0C.esm.js +85 -0
  83. package/dist/chunks/KHR_materials_sheen-35UGLw0C.esm.js.map +1 -0
  84. package/dist/chunks/KHR_materials_sheen-DQ6C57Dt.esm.min.js +2 -0
  85. package/dist/chunks/KHR_materials_sheen-DQ6C57Dt.esm.min.js.map +1 -0
  86. package/dist/chunks/KHR_materials_specular-BPk7EQUD.esm.min.js +2 -0
  87. package/dist/chunks/KHR_materials_specular-BPk7EQUD.esm.min.js.map +1 -0
  88. package/dist/chunks/KHR_materials_specular-DrL3M38a.esm.js +75 -0
  89. package/dist/chunks/KHR_materials_specular-DrL3M38a.esm.js.map +1 -0
  90. package/dist/chunks/KHR_materials_transmission-3olkVCcW.esm.min.js +2 -0
  91. package/dist/chunks/KHR_materials_transmission-3olkVCcW.esm.min.js.map +1 -0
  92. package/dist/chunks/KHR_materials_transmission-BpjfU0Rf.esm.js +307 -0
  93. package/dist/chunks/KHR_materials_transmission-BpjfU0Rf.esm.js.map +1 -0
  94. package/dist/chunks/KHR_materials_unlit-BK4Bp8qS.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_unlit-BK4Bp8qS.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_unlit-DqWkeMIs.esm.js +74 -0
  97. package/dist/chunks/KHR_materials_unlit-DqWkeMIs.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_variants-C8EH6z5q.esm.js +262 -0
  99. package/dist/chunks/KHR_materials_variants-C8EH6z5q.esm.js.map +1 -0
  100. package/dist/chunks/KHR_materials_variants-U_7nHGWs.esm.min.js +2 -0
  101. package/dist/chunks/KHR_materials_variants-U_7nHGWs.esm.min.js.map +1 -0
  102. package/dist/chunks/KHR_materials_volume-QCITeTgE.esm.min.js +2 -0
  103. package/dist/chunks/KHR_materials_volume-QCITeTgE.esm.min.js.map +1 -0
  104. package/dist/chunks/KHR_materials_volume-eXcEVVpW.esm.js +87 -0
  105. package/dist/chunks/KHR_materials_volume-eXcEVVpW.esm.js.map +1 -0
  106. package/dist/chunks/KHR_mesh_quantization-BjqgHT7P.esm.js +26 -0
  107. package/dist/chunks/KHR_mesh_quantization-BjqgHT7P.esm.js.map +1 -0
  108. package/dist/chunks/KHR_mesh_quantization-CEo8-_n9.esm.min.js +2 -0
  109. package/dist/chunks/KHR_mesh_quantization-CEo8-_n9.esm.min.js.map +1 -0
  110. package/dist/chunks/KHR_node_hoverability-CLakAM7o.esm.min.js +2 -0
  111. package/dist/chunks/KHR_node_hoverability-CLakAM7o.esm.min.js.map +1 -0
  112. package/dist/chunks/KHR_node_hoverability-XR4H2sEJ.esm.js +39 -0
  113. package/dist/chunks/KHR_node_hoverability-XR4H2sEJ.esm.js.map +1 -0
  114. package/dist/chunks/KHR_node_visibility-D5-Uq040.esm.js +46 -0
  115. package/dist/chunks/KHR_node_visibility-D5-Uq040.esm.js.map +1 -0
  116. package/dist/chunks/KHR_node_visibility-JpHMpDZy.esm.min.js +2 -0
  117. package/dist/chunks/KHR_node_visibility-JpHMpDZy.esm.min.js.map +1 -0
  118. package/dist/chunks/KHR_texture_basisu-CK096eX9.esm.min.js +2 -0
  119. package/dist/chunks/KHR_texture_basisu-CK096eX9.esm.min.js.map +1 -0
  120. package/dist/chunks/KHR_texture_basisu-JvEhdHQJ.esm.js +43 -0
  121. package/dist/chunks/KHR_texture_basisu-JvEhdHQJ.esm.js.map +1 -0
  122. package/dist/chunks/KHR_texture_transform-ASnRyeyf.esm.js +63 -0
  123. package/dist/chunks/KHR_texture_transform-ASnRyeyf.esm.js.map +1 -0
  124. package/dist/chunks/KHR_texture_transform-Ci769L7F.esm.min.js +2 -0
  125. package/dist/chunks/KHR_texture_transform-Ci769L7F.esm.min.js.map +1 -0
  126. package/dist/chunks/KHR_xmp_json_ld-Cf0IphHD.esm.min.js +2 -0
  127. package/dist/chunks/KHR_xmp_json_ld-Cf0IphHD.esm.min.js.map +1 -0
  128. package/dist/chunks/KHR_xmp_json_ld-ZytUWg-l.esm.js +51 -0
  129. package/dist/chunks/KHR_xmp_json_ld-ZytUWg-l.esm.js.map +1 -0
  130. package/dist/chunks/MSFT_audio_emitter-BjoYL7lC.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_audio_emitter-BjoYL7lC.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_audio_emitter-Di8nqSDi.esm.js +2200 -0
  133. package/dist/chunks/MSFT_audio_emitter-Di8nqSDi.esm.js.map +1 -0
  134. package/dist/chunks/MSFT_lod-BMUlo5OU.esm.js +337 -0
  135. package/dist/chunks/MSFT_lod-BMUlo5OU.esm.js.map +1 -0
  136. package/dist/chunks/MSFT_lod-OG5_k4mO.esm.min.js +2 -0
  137. package/dist/chunks/MSFT_lod-OG5_k4mO.esm.min.js.map +1 -0
  138. package/dist/chunks/MSFT_minecraftMesh-CA9_SnEQ.esm.js +46 -0
  139. package/dist/chunks/MSFT_minecraftMesh-CA9_SnEQ.esm.js.map +1 -0
  140. package/dist/chunks/MSFT_minecraftMesh-DA-GfwSb.esm.min.js +2 -0
  141. package/dist/chunks/MSFT_minecraftMesh-DA-GfwSb.esm.min.js.map +1 -0
  142. package/dist/chunks/MSFT_sRGBFactors-BpXptZ3D.esm.js +47 -0
  143. package/dist/chunks/MSFT_sRGBFactors-BpXptZ3D.esm.js.map +1 -0
  144. package/dist/chunks/MSFT_sRGBFactors-COm0y2eh.esm.min.js +2 -0
  145. package/dist/chunks/MSFT_sRGBFactors-COm0y2eh.esm.min.js.map +1 -0
  146. package/dist/chunks/animationGroup-DeyI1KVN.esm.min.js +2 -0
  147. package/dist/chunks/animationGroup-DeyI1KVN.esm.min.js.map +1 -0
  148. package/dist/chunks/animationGroup-DrsZkXQW.esm.js +2482 -0
  149. package/dist/chunks/animationGroup-DrsZkXQW.esm.js.map +1 -0
  150. package/dist/chunks/assetContainer-Cx2Wvxkg.esm.js +1786 -0
  151. package/dist/chunks/assetContainer-Cx2Wvxkg.esm.js.map +1 -0
  152. package/dist/chunks/assetContainer-l3mez3br.esm.min.js +2 -0
  153. package/dist/chunks/assetContainer-l3mez3br.esm.min.js.map +1 -0
  154. package/dist/chunks/bakedVertexAnimation-CwJYQylG.esm.js +114 -0
  155. package/dist/chunks/bakedVertexAnimation-CwJYQylG.esm.js.map +1 -0
  156. package/dist/chunks/bakedVertexAnimation-D5PLG8Vz.esm.min.js +2 -0
  157. package/dist/chunks/bakedVertexAnimation-D5PLG8Vz.esm.min.js.map +1 -0
  158. package/dist/chunks/basisTextureLoader-BNH-2Zvb.esm.min.js +2 -0
  159. package/dist/chunks/basisTextureLoader-BNH-2Zvb.esm.min.js.map +1 -0
  160. package/dist/chunks/basisTextureLoader-JW5tEMV8.esm.js +600 -0
  161. package/dist/chunks/basisTextureLoader-JW5tEMV8.esm.js.map +1 -0
  162. package/dist/chunks/dds-B1kYpKg4.esm.js +540 -0
  163. package/dist/chunks/dds-B1kYpKg4.esm.js.map +1 -0
  164. package/dist/chunks/dds-BIaKvdM8.esm.min.js +2 -0
  165. package/dist/chunks/dds-BIaKvdM8.esm.min.js.map +1 -0
  166. package/dist/chunks/ddsTextureLoader-DHdy4-WN.esm.js +88 -0
  167. package/dist/chunks/ddsTextureLoader-DHdy4-WN.esm.js.map +1 -0
  168. package/dist/chunks/ddsTextureLoader-DQvH8BPG.esm.min.js +2 -0
  169. package/dist/chunks/ddsTextureLoader-DQvH8BPG.esm.min.js.map +1 -0
  170. package/dist/chunks/decalFragment-B07XA08h.esm.min.js +2 -0
  171. package/dist/chunks/decalFragment-B07XA08h.esm.min.js.map +1 -0
  172. package/dist/chunks/decalFragment-ClGzoop1.esm.js +18 -0
  173. package/dist/chunks/decalFragment-ClGzoop1.esm.js.map +1 -0
  174. package/dist/chunks/default.fragment-CAC3-eH5.esm.min.js +2 -0
  175. package/dist/chunks/default.fragment-CAC3-eH5.esm.min.js.map +1 -0
  176. package/dist/chunks/default.fragment-Cr0qnYU0.esm.js +446 -0
  177. package/dist/chunks/default.fragment-Cr0qnYU0.esm.js.map +1 -0
  178. package/dist/chunks/default.fragment-DJgifW8z.esm.min.js +2 -0
  179. package/dist/chunks/default.fragment-DJgifW8z.esm.min.js.map +1 -0
  180. package/dist/chunks/default.fragment-uFTw5k6Z.esm.js +515 -0
  181. package/dist/chunks/default.fragment-uFTw5k6Z.esm.js.map +1 -0
  182. package/dist/chunks/default.vertex-B_u-vpoR.esm.js +211 -0
  183. package/dist/chunks/default.vertex-B_u-vpoR.esm.js.map +1 -0
  184. package/dist/chunks/default.vertex-Bo-YeuPk.esm.min.js +2 -0
  185. package/dist/chunks/default.vertex-Bo-YeuPk.esm.min.js.map +1 -0
  186. package/dist/chunks/default.vertex-C6LMYeLT.esm.min.js +2 -0
  187. package/dist/chunks/default.vertex-C6LMYeLT.esm.min.js.map +1 -0
  188. package/dist/chunks/default.vertex-CzuD5tIE.esm.js +190 -0
  189. package/dist/chunks/default.vertex-CzuD5tIE.esm.js.map +1 -0
  190. package/dist/chunks/defaultUboDeclaration-BSYuerQe.esm.min.js +2 -0
  191. package/dist/chunks/defaultUboDeclaration-BSYuerQe.esm.min.js.map +1 -0
  192. package/dist/chunks/defaultUboDeclaration-CQJaKPLM.esm.min.js +2 -0
  193. package/dist/chunks/defaultUboDeclaration-CQJaKPLM.esm.min.js.map +1 -0
  194. package/dist/chunks/defaultUboDeclaration-DzRt1iTO.esm.js +13 -0
  195. package/dist/chunks/defaultUboDeclaration-DzRt1iTO.esm.js.map +1 -0
  196. package/dist/chunks/defaultUboDeclaration-DzpAmCf1.esm.js +15 -0
  197. package/dist/chunks/defaultUboDeclaration-DzpAmCf1.esm.js.map +1 -0
  198. package/dist/chunks/dumpTools-JfWNUHd1.esm.js +200 -0
  199. package/dist/chunks/dumpTools-JfWNUHd1.esm.js.map +1 -0
  200. package/dist/chunks/dumpTools-MGQM1tV4.esm.min.js +2 -0
  201. package/dist/chunks/dumpTools-MGQM1tV4.esm.min.js.map +1 -0
  202. package/dist/chunks/envTextureLoader-CoD9RkFy.esm.js +64 -0
  203. package/dist/chunks/envTextureLoader-CoD9RkFy.esm.js.map +1 -0
  204. package/dist/chunks/envTextureLoader-_huqF4Iu.esm.min.js +2 -0
  205. package/dist/chunks/envTextureLoader-_huqF4Iu.esm.min.js.map +1 -0
  206. package/dist/chunks/environmentTextureTools-BFBrSyc_.esm.min.js +2 -0
  207. package/dist/chunks/environmentTextureTools-BFBrSyc_.esm.min.js.map +1 -0
  208. package/dist/chunks/environmentTextureTools-DMKf2lIW.esm.js +382 -0
  209. package/dist/chunks/environmentTextureTools-DMKf2lIW.esm.js.map +1 -0
  210. package/dist/chunks/exrTextureLoader-BkuwS0XF.esm.min.js +2 -0
  211. package/dist/chunks/exrTextureLoader-BkuwS0XF.esm.min.js.map +1 -0
  212. package/dist/chunks/exrTextureLoader-DxOSgB3m.esm.js +1683 -0
  213. package/dist/chunks/exrTextureLoader-DxOSgB3m.esm.js.map +1 -0
  214. package/dist/chunks/fogFragment-CdyzhyDy.esm.min.js +2 -0
  215. package/dist/chunks/fogFragment-CdyzhyDy.esm.min.js.map +1 -0
  216. package/dist/chunks/fogFragment-Ct0roave.esm.js +101 -0
  217. package/dist/chunks/fogFragment-Ct0roave.esm.js.map +1 -0
  218. package/dist/chunks/fogFragment-DjORBY8D.esm.min.js +2 -0
  219. package/dist/chunks/fogFragment-DjORBY8D.esm.min.js.map +1 -0
  220. package/dist/chunks/fogFragment-DwdRh83Z.esm.js +102 -0
  221. package/dist/chunks/fogFragment-DwdRh83Z.esm.js.map +1 -0
  222. package/dist/chunks/fresnelFunction-CuDZqiSs.esm.js +12 -0
  223. package/dist/chunks/fresnelFunction-CuDZqiSs.esm.js.map +1 -0
  224. package/dist/chunks/fresnelFunction-zYzL693r.esm.min.js +2 -0
  225. package/dist/chunks/fresnelFunction-zYzL693r.esm.min.js.map +1 -0
  226. package/dist/chunks/glTFLoader-CKBe9bFc.esm.js +7735 -0
  227. package/dist/chunks/glTFLoader-CKBe9bFc.esm.js.map +1 -0
  228. package/dist/chunks/glTFLoader-HrDvovFY.esm.min.js +2 -0
  229. package/dist/chunks/glTFLoader-HrDvovFY.esm.min.js.map +1 -0
  230. package/dist/chunks/glTFLoaderAnimation-D-y1xZvo.esm.min.js +2 -0
  231. package/dist/chunks/glTFLoaderAnimation-D-y1xZvo.esm.min.js.map +1 -0
  232. package/dist/chunks/glTFLoaderAnimation-D57wBZJj.esm.js +77 -0
  233. package/dist/chunks/glTFLoaderAnimation-D57wBZJj.esm.js.map +1 -0
  234. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  235. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  236. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  237. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  238. package/dist/chunks/harmonicsFunctions-8p1AKl3B.esm.js +35 -0
  239. package/dist/chunks/harmonicsFunctions-8p1AKl3B.esm.js.map +1 -0
  240. package/dist/chunks/harmonicsFunctions-C3M4g6jE.esm.min.js +2 -0
  241. package/dist/chunks/harmonicsFunctions-C3M4g6jE.esm.min.js.map +1 -0
  242. package/dist/chunks/harmonicsFunctions-CoiTSsVa.esm.min.js +2 -0
  243. package/dist/chunks/harmonicsFunctions-CoiTSsVa.esm.min.js.map +1 -0
  244. package/dist/chunks/harmonicsFunctions-HT06ZoZl.esm.js +34 -0
  245. package/dist/chunks/harmonicsFunctions-HT06ZoZl.esm.js.map +1 -0
  246. package/dist/chunks/hdrTextureLoader-B0kksMif.esm.js +253 -0
  247. package/dist/chunks/hdrTextureLoader-B0kksMif.esm.js.map +1 -0
  248. package/dist/chunks/hdrTextureLoader-CnTSpduj.esm.min.js +2 -0
  249. package/dist/chunks/hdrTextureLoader-CnTSpduj.esm.min.js.map +1 -0
  250. package/dist/chunks/helperFunctions-Bq5KkNmT.esm.js +83 -0
  251. package/dist/chunks/helperFunctions-Bq5KkNmT.esm.js.map +1 -0
  252. package/dist/chunks/helperFunctions-DauLsm9X.esm.min.js +2 -0
  253. package/dist/chunks/helperFunctions-DauLsm9X.esm.min.js.map +1 -0
  254. package/dist/chunks/helperFunctions-Du6Zsfhy.esm.min.js +2 -0
  255. package/dist/chunks/helperFunctions-Du6Zsfhy.esm.min.js.map +1 -0
  256. package/dist/chunks/helperFunctions-oDSGYqJN.esm.js +110 -0
  257. package/dist/chunks/helperFunctions-oDSGYqJN.esm.js.map +1 -0
  258. package/dist/chunks/iesTextureLoader-DdRr77cj.esm.js +189 -0
  259. package/dist/chunks/iesTextureLoader-DdRr77cj.esm.js.map +1 -0
  260. package/dist/chunks/iesTextureLoader-DkEckxVj.esm.min.js +2 -0
  261. package/dist/chunks/iesTextureLoader-DkEckxVj.esm.min.js.map +1 -0
  262. package/dist/chunks/index-D46Rc8Qa.esm.js +82819 -0
  263. package/dist/chunks/index-D46Rc8Qa.esm.js.map +1 -0
  264. package/dist/chunks/index-r5IGv8fd.esm.min.js +57 -0
  265. package/dist/chunks/index-r5IGv8fd.esm.min.js.map +1 -0
  266. package/dist/chunks/ktxTextureLoader-CImJ68er.esm.min.js +2 -0
  267. package/dist/chunks/ktxTextureLoader-CImJ68er.esm.min.js.map +1 -0
  268. package/dist/chunks/ktxTextureLoader-CvQzBtnz.esm.js +814 -0
  269. package/dist/chunks/ktxTextureLoader-CvQzBtnz.esm.js.map +1 -0
  270. package/dist/chunks/logDepthDeclaration-BNJ_qeEv.esm.min.js +2 -0
  271. package/dist/chunks/logDepthDeclaration-BNJ_qeEv.esm.min.js.map +1 -0
  272. package/dist/chunks/logDepthDeclaration-Co9yKHfe.esm.js +35 -0
  273. package/dist/chunks/logDepthDeclaration-Co9yKHfe.esm.js.map +1 -0
  274. package/dist/chunks/logDepthDeclaration-DP9tYyv7.esm.min.js +2 -0
  275. package/dist/chunks/logDepthDeclaration-DP9tYyv7.esm.min.js.map +1 -0
  276. package/dist/chunks/logDepthDeclaration-KzS73dPG.esm.js +11 -0
  277. package/dist/chunks/logDepthDeclaration-KzS73dPG.esm.js.map +1 -0
  278. package/dist/chunks/logDepthVertex-BBDSLJJg.esm.js +77 -0
  279. package/dist/chunks/logDepthVertex-BBDSLJJg.esm.js.map +1 -0
  280. package/dist/chunks/logDepthVertex-CHXEv8Hm.esm.min.js +2 -0
  281. package/dist/chunks/logDepthVertex-CHXEv8Hm.esm.min.js.map +1 -0
  282. package/dist/chunks/logDepthVertex-CkCG5UAD.esm.min.js +2 -0
  283. package/dist/chunks/logDepthVertex-CkCG5UAD.esm.min.js.map +1 -0
  284. package/dist/chunks/logDepthVertex-DKTOhgu8.esm.js +81 -0
  285. package/dist/chunks/logDepthVertex-DKTOhgu8.esm.js.map +1 -0
  286. package/dist/chunks/mainUVVaryingDeclaration-BxP2qnf1.esm.js +11 -0
  287. package/dist/chunks/mainUVVaryingDeclaration-BxP2qnf1.esm.js.map +1 -0
  288. package/dist/chunks/mainUVVaryingDeclaration-D-YFWEWb.esm.min.js +2 -0
  289. package/dist/chunks/mainUVVaryingDeclaration-D-YFWEWb.esm.min.js.map +1 -0
  290. package/dist/chunks/mainUVVaryingDeclaration-D5LXIN_s.esm.min.js +2 -0
  291. package/dist/chunks/mainUVVaryingDeclaration-D5LXIN_s.esm.min.js.map +1 -0
  292. package/dist/chunks/mainUVVaryingDeclaration-DBd0Ca2K.esm.js +11 -0
  293. package/dist/chunks/mainUVVaryingDeclaration-DBd0Ca2K.esm.js.map +1 -0
  294. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +119 -0
  295. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +1 -0
  296. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +2 -0
  297. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +1 -0
  298. package/dist/chunks/meshUboDeclaration-D7vtpetW.esm.js +26 -0
  299. package/dist/chunks/meshUboDeclaration-D7vtpetW.esm.js.map +1 -0
  300. package/dist/chunks/meshUboDeclaration-tb8T5asG.esm.min.js +2 -0
  301. package/dist/chunks/meshUboDeclaration-tb8T5asG.esm.min.js.map +1 -0
  302. package/dist/chunks/objFileLoader-B0XaXxyr.esm.min.js +2 -0
  303. package/dist/chunks/objFileLoader-B0XaXxyr.esm.min.js.map +1 -0
  304. package/dist/chunks/objFileLoader-B1MaGxQt.esm.js +1338 -0
  305. package/dist/chunks/objFileLoader-B1MaGxQt.esm.js.map +1 -0
  306. package/dist/chunks/oitFragment-BEKFrqPY.esm.js +1078 -0
  307. package/dist/chunks/oitFragment-BEKFrqPY.esm.js.map +1 -0
  308. package/dist/chunks/oitFragment-CJrbQh0i.esm.min.js +2 -0
  309. package/dist/chunks/oitFragment-CJrbQh0i.esm.min.js.map +1 -0
  310. package/dist/chunks/oitFragment-DCxGblwL.esm.js +1240 -0
  311. package/dist/chunks/oitFragment-DCxGblwL.esm.js.map +1 -0
  312. package/dist/chunks/oitFragment-sZA5tkE3.esm.min.js +2 -0
  313. package/dist/chunks/oitFragment-sZA5tkE3.esm.min.js.map +1 -0
  314. package/dist/chunks/pass.fragment-BYDvFFL5.esm.js +15 -0
  315. package/dist/chunks/pass.fragment-BYDvFFL5.esm.js.map +1 -0
  316. package/dist/chunks/pass.fragment-BgXOqRns.esm.js +15 -0
  317. package/dist/chunks/pass.fragment-BgXOqRns.esm.js.map +1 -0
  318. package/dist/chunks/pass.fragment-DgadxzwS.esm.min.js +2 -0
  319. package/dist/chunks/pass.fragment-DgadxzwS.esm.min.js.map +1 -0
  320. package/dist/chunks/pass.fragment-Dqmp3CRB.esm.min.js +2 -0
  321. package/dist/chunks/pass.fragment-Dqmp3CRB.esm.min.js.map +1 -0
  322. package/dist/chunks/passCube.fragment-07CNLnnq.esm.js +34 -0
  323. package/dist/chunks/passCube.fragment-07CNLnnq.esm.js.map +1 -0
  324. package/dist/chunks/passCube.fragment-4R2Z-LXR.esm.min.js +2 -0
  325. package/dist/chunks/passCube.fragment-4R2Z-LXR.esm.min.js.map +1 -0
  326. package/dist/chunks/passCube.fragment-Aq1scRJ9.esm.js +34 -0
  327. package/dist/chunks/passCube.fragment-Aq1scRJ9.esm.js.map +1 -0
  328. package/dist/chunks/passCube.fragment-DiybDNvK.esm.min.js +2 -0
  329. package/dist/chunks/passCube.fragment-DiybDNvK.esm.min.js.map +1 -0
  330. package/dist/chunks/pbr.fragment-CBb8vd51.esm.min.js +2 -0
  331. package/dist/chunks/pbr.fragment-CBb8vd51.esm.min.js.map +1 -0
  332. package/dist/chunks/pbr.fragment-DSUT21Rk.esm.min.js +2 -0
  333. package/dist/chunks/pbr.fragment-DSUT21Rk.esm.min.js.map +1 -0
  334. package/dist/chunks/pbr.fragment-DmP7eqg7.esm.js +3272 -0
  335. package/dist/chunks/pbr.fragment-DmP7eqg7.esm.js.map +1 -0
  336. package/dist/chunks/pbr.fragment-DzIZJg6m.esm.js +3225 -0
  337. package/dist/chunks/pbr.fragment-DzIZJg6m.esm.js.map +1 -0
  338. package/dist/chunks/pbr.vertex--Lj5Uipt.esm.js +223 -0
  339. package/dist/chunks/pbr.vertex--Lj5Uipt.esm.js.map +1 -0
  340. package/dist/chunks/pbr.vertex-BScRF6wh.esm.min.js +2 -0
  341. package/dist/chunks/pbr.vertex-BScRF6wh.esm.min.js.map +1 -0
  342. package/dist/chunks/pbr.vertex-CZSsnbPf.esm.js +348 -0
  343. package/dist/chunks/pbr.vertex-CZSsnbPf.esm.js.map +1 -0
  344. package/dist/chunks/pbr.vertex-Nho2p99M.esm.min.js +2 -0
  345. package/dist/chunks/pbr.vertex-Nho2p99M.esm.min.js.map +1 -0
  346. package/dist/chunks/postprocess.vertex-B_q6GHTK.esm.js +20 -0
  347. package/dist/chunks/postprocess.vertex-B_q6GHTK.esm.js.map +1 -0
  348. package/dist/chunks/postprocess.vertex-C-ocJcje.esm.min.js +2 -0
  349. package/dist/chunks/postprocess.vertex-C-ocJcje.esm.min.js.map +1 -0
  350. package/dist/chunks/rawTexture-DeYN01jd.esm.min.js +2 -0
  351. package/dist/chunks/rawTexture-DeYN01jd.esm.min.js.map +1 -0
  352. package/dist/chunks/rawTexture-Dh4jdTlv.esm.js +191 -0
  353. package/dist/chunks/rawTexture-Dh4jdTlv.esm.js.map +1 -0
  354. package/dist/chunks/ray-DMN9ip7z.esm.min.js +2 -0
  355. package/dist/chunks/ray-DMN9ip7z.esm.min.js.map +1 -0
  356. package/dist/chunks/ray-QR2k6aJd.esm.js +946 -0
  357. package/dist/chunks/ray-QR2k6aJd.esm.js.map +1 -0
  358. package/dist/chunks/rgbdDecode.fragment-C3AkoFAQ.esm.min.js +2 -0
  359. package/dist/chunks/rgbdDecode.fragment-C3AkoFAQ.esm.min.js.map +1 -0
  360. package/dist/chunks/rgbdDecode.fragment-Cok6PVQr.esm.js +13 -0
  361. package/dist/chunks/rgbdDecode.fragment-Cok6PVQr.esm.js.map +1 -0
  362. package/dist/chunks/rgbdDecode.fragment-CqcagT1x.esm.min.js +2 -0
  363. package/dist/chunks/rgbdDecode.fragment-CqcagT1x.esm.min.js.map +1 -0
  364. package/dist/chunks/rgbdDecode.fragment-DRpqF3bE.esm.js +13 -0
  365. package/dist/chunks/rgbdDecode.fragment-DRpqF3bE.esm.js.map +1 -0
  366. package/dist/chunks/rgbdEncode.fragment-BLe7imXf.esm.min.js +2 -0
  367. package/dist/chunks/rgbdEncode.fragment-BLe7imXf.esm.min.js.map +1 -0
  368. package/dist/chunks/rgbdEncode.fragment-Bi6E_oVW.esm.js +13 -0
  369. package/dist/chunks/rgbdEncode.fragment-Bi6E_oVW.esm.js.map +1 -0
  370. package/dist/chunks/rgbdEncode.fragment-C7hBKPem.esm.min.js +2 -0
  371. package/dist/chunks/rgbdEncode.fragment-C7hBKPem.esm.min.js.map +1 -0
  372. package/dist/chunks/rgbdEncode.fragment-C9DicUjD.esm.js +13 -0
  373. package/dist/chunks/rgbdEncode.fragment-C9DicUjD.esm.js.map +1 -0
  374. package/dist/chunks/splatFileLoader-BzfYte-_.esm.min.js +2 -0
  375. package/dist/chunks/splatFileLoader-BzfYte-_.esm.min.js.map +1 -0
  376. package/dist/chunks/splatFileLoader-K9RpjB6c.esm.js +3660 -0
  377. package/dist/chunks/splatFileLoader-K9RpjB6c.esm.js.map +1 -0
  378. package/dist/chunks/spotLight-CJlK-_c5.esm.min.js +2 -0
  379. package/dist/chunks/spotLight-CJlK-_c5.esm.min.js.map +1 -0
  380. package/dist/chunks/spotLight-DxPJdRVZ.esm.js +701 -0
  381. package/dist/chunks/spotLight-DxPJdRVZ.esm.js.map +1 -0
  382. package/dist/chunks/standardMaterial-BRKRGk7c.esm.js +1811 -0
  383. package/dist/chunks/standardMaterial-BRKRGk7c.esm.js.map +1 -0
  384. package/dist/chunks/standardMaterial-Bs9Jda3X.esm.min.js +2 -0
  385. package/dist/chunks/standardMaterial-Bs9Jda3X.esm.min.js.map +1 -0
  386. package/dist/chunks/stlFileLoader-BSGzPo-z.esm.min.js +2 -0
  387. package/dist/chunks/stlFileLoader-BSGzPo-z.esm.min.js.map +1 -0
  388. package/dist/chunks/stlFileLoader-DtPzeNXZ.esm.js +238 -0
  389. package/dist/chunks/stlFileLoader-DtPzeNXZ.esm.js.map +1 -0
  390. package/dist/chunks/tgaTextureLoader-CFjxRPEE.esm.js +349 -0
  391. package/dist/chunks/tgaTextureLoader-CFjxRPEE.esm.js.map +1 -0
  392. package/dist/chunks/tgaTextureLoader-Ch1a2Rcd.esm.min.js +2 -0
  393. package/dist/chunks/tgaTextureLoader-Ch1a2Rcd.esm.min.js.map +1 -0
  394. package/dist/chunks/thinInstanceMesh-CgfQdxDM.esm.min.js +2 -0
  395. package/dist/chunks/thinInstanceMesh-CgfQdxDM.esm.min.js.map +1 -0
  396. package/dist/chunks/thinInstanceMesh-tQGPk8rE.esm.js +314 -0
  397. package/dist/chunks/thinInstanceMesh-tQGPk8rE.esm.js.map +1 -0
  398. package/dist/chunks/vertexColorMixing-BcDvzwMA.esm.js +440 -0
  399. package/dist/chunks/vertexColorMixing-BcDvzwMA.esm.js.map +1 -0
  400. package/dist/chunks/vertexColorMixing-CJeeWCpY.esm.min.js +2 -0
  401. package/dist/chunks/vertexColorMixing-CJeeWCpY.esm.min.js.map +1 -0
  402. package/dist/chunks/vertexColorMixing-DQESmS2T.esm.js +550 -0
  403. package/dist/chunks/vertexColorMixing-DQESmS2T.esm.js.map +1 -0
  404. package/dist/chunks/vertexColorMixing-DlrEyRWJ.esm.min.js +2 -0
  405. package/dist/chunks/vertexColorMixing-DlrEyRWJ.esm.min.js.map +1 -0
  406. package/dist/chunks/webgpuEngine-B8AMUx8i.esm.js +11539 -0
  407. package/dist/chunks/webgpuEngine-B8AMUx8i.esm.js.map +1 -0
  408. package/dist/chunks/webgpuEngine-CxY3O3Qz.esm.min.js +2 -0
  409. package/dist/chunks/webgpuEngine-CxY3O3Qz.esm.min.js.map +1 -0
  410. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  411. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  412. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  413. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  414. package/lib/index.d.ts +637 -0
  415. package/lib/index.js +2257 -0
  416. package/lib/index.js.map +1 -0
  417. package/package.json +38 -24
  418. package/readme.md +28 -28
  419. package/configuration/configuration.d.ts +0 -107
  420. package/configuration/configuration.js +0 -16
  421. package/configuration/configuration.js.map +0 -1
  422. package/configuration/configurationCompatibility.d.ts +0 -8
  423. package/configuration/configurationCompatibility.js +0 -66
  424. package/configuration/configurationCompatibility.js.map +0 -1
  425. package/configuration/configurationContainer.d.ts +0 -10
  426. package/configuration/configurationContainer.js +0 -10
  427. package/configuration/configurationContainer.js.map +0 -1
  428. package/configuration/globals.d.ts +0 -6
  429. package/configuration/globals.js +0 -18
  430. package/configuration/globals.js.map +0 -1
  431. package/configuration/index.d.ts +0 -2
  432. package/configuration/index.js +0 -4
  433. package/configuration/index.js.map +0 -1
  434. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  435. package/configuration/interfaces/cameraConfiguration.js +0 -2
  436. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  437. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  438. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  439. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  440. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  441. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  442. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  443. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  444. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  445. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  446. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  447. package/configuration/interfaces/groundConfiguration.js +0 -2
  448. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  449. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  450. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  451. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  452. package/configuration/interfaces/index.d.ts +0 -15
  453. package/configuration/interfaces/index.js +0 -16
  454. package/configuration/interfaces/index.js.map +0 -1
  455. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  456. package/configuration/interfaces/lightConfiguration.js +0 -2
  457. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  458. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  459. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  460. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  461. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  462. package/configuration/interfaces/modelConfiguration.js +0 -2
  463. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  464. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  465. package/configuration/interfaces/observersConfiguration.js +0 -2
  466. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  467. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  468. package/configuration/interfaces/sceneConfiguration.js +0 -2
  469. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  470. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  471. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  472. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  473. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  474. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  475. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  476. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  477. package/configuration/interfaces/templateConfiguration.js +0 -2
  478. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  479. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  480. package/configuration/interfaces/vrConfiguration.js +0 -2
  481. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  482. package/configuration/loader.d.ts +0 -4
  483. package/configuration/loader.js +0 -17
  484. package/configuration/loader.js.map +0 -1
  485. package/configuration/mappers.d.ts +0 -43
  486. package/configuration/mappers.js +0 -193
  487. package/configuration/mappers.js.map +0 -1
  488. package/configuration/renderOnlyLoader.d.ts +0 -33
  489. package/configuration/renderOnlyLoader.js +0 -162
  490. package/configuration/renderOnlyLoader.js.map +0 -1
  491. package/configuration/types/default.d.ts +0 -6
  492. package/configuration/types/default.js +0 -121
  493. package/configuration/types/default.js.map +0 -1
  494. package/configuration/types/environmentMap.d.ts +0 -5
  495. package/configuration/types/environmentMap.js +0 -14
  496. package/configuration/types/environmentMap.js.map +0 -1
  497. package/configuration/types/extended.d.ts +0 -6
  498. package/configuration/types/extended.js +0 -317
  499. package/configuration/types/extended.js.map +0 -1
  500. package/configuration/types/index.d.ts +0 -14
  501. package/configuration/types/index.js +0 -51
  502. package/configuration/types/index.js.map +0 -1
  503. package/configuration/types/minimal.d.ts +0 -6
  504. package/configuration/types/minimal.js +0 -43
  505. package/configuration/types/minimal.js.map +0 -1
  506. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  507. package/configuration/types/renderOnlyDefault.js +0 -31
  508. package/configuration/types/renderOnlyDefault.js.map +0 -1
  509. package/configuration/types/shadowLight.d.ts +0 -9
  510. package/configuration/types/shadowLight.js +0 -64
  511. package/configuration/types/shadowLight.js.map +0 -1
  512. package/helper/index.d.ts +0 -29
  513. package/helper/index.js +0 -66
  514. package/helper/index.js.map +0 -1
  515. package/index.d.ts +0 -30
  516. package/index.js +0 -46
  517. package/index.js.map +0 -1
  518. package/initializer.d.ts +0 -11
  519. package/initializer.js +0 -35
  520. package/initializer.js.map +0 -1
  521. package/interfaces.d.ts +0 -5
  522. package/interfaces.js +0 -7
  523. package/interfaces.js.map +0 -1
  524. package/labs/environmentSerializer.d.ts +0 -126
  525. package/labs/environmentSerializer.js +0 -191
  526. package/labs/environmentSerializer.js.map +0 -1
  527. package/labs/texture.d.ts +0 -183
  528. package/labs/texture.js +0 -351
  529. package/labs/texture.js.map +0 -1
  530. package/labs/viewerLabs.d.ts +0 -51
  531. package/labs/viewerLabs.js +0 -134
  532. package/labs/viewerLabs.js.map +0 -1
  533. package/loader/modelLoader.d.ts +0 -56
  534. package/loader/modelLoader.js +0 -202
  535. package/loader/modelLoader.js.map +0 -1
  536. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  537. package/loader/plugins/applyMaterialConfig.js +0 -16
  538. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  539. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  540. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  541. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  542. package/loader/plugins/index.d.ts +0 -19
  543. package/loader/plugins/index.js +0 -44
  544. package/loader/plugins/index.js.map +0 -1
  545. package/loader/plugins/loaderPlugin.d.ts +0 -24
  546. package/loader/plugins/loaderPlugin.js +0 -2
  547. package/loader/plugins/loaderPlugin.js.map +0 -1
  548. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  549. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  550. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  551. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  552. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  553. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  554. package/managers/observablesManager.d.ts +0 -66
  555. package/managers/observablesManager.js +0 -35
  556. package/managers/observablesManager.js.map +0 -1
  557. package/managers/sceneManager.d.ts +0 -245
  558. package/managers/sceneManager.js +0 -1375
  559. package/managers/sceneManager.js.map +0 -1
  560. package/managers/telemetryManager.d.ts +0 -78
  561. package/managers/telemetryManager.js +0 -117
  562. package/managers/telemetryManager.js.map +0 -1
  563. package/model/modelAnimation.d.ts +0 -215
  564. package/model/modelAnimation.js +0 -237
  565. package/model/modelAnimation.js.map +0 -1
  566. package/model/viewerModel.d.ts +0 -233
  567. package/model/viewerModel.js +0 -673
  568. package/model/viewerModel.js.map +0 -1
  569. package/optimizer/custom/extended.d.ts +0 -13
  570. package/optimizer/custom/extended.js +0 -101
  571. package/optimizer/custom/extended.js.map +0 -1
  572. package/optimizer/custom/index.d.ts +0 -9
  573. package/optimizer/custom/index.js +0 -26
  574. package/optimizer/custom/index.js.map +0 -1
  575. package/renderOnlyIndex.d.ts +0 -11
  576. package/renderOnlyIndex.js +0 -18
  577. package/renderOnlyIndex.js.map +0 -1
  578. package/templating/eventManager.d.ts +0 -35
  579. package/templating/eventManager.js +0 -66
  580. package/templating/eventManager.js.map +0 -1
  581. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  582. package/templating/plugins/hdButtonPlugin.js +0 -22
  583. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  584. package/templating/plugins/printButton.d.ts +0 -9
  585. package/templating/plugins/printButton.js +0 -41
  586. package/templating/plugins/printButton.js.map +0 -1
  587. package/templating/templateManager.d.ts +0 -197
  588. package/templating/templateManager.js +0 -561
  589. package/templating/templateManager.js.map +0 -1
  590. package/templating/viewerTemplatePlugin.d.ts +0 -21
  591. package/templating/viewerTemplatePlugin.js +0 -69
  592. package/templating/viewerTemplatePlugin.js.map +0 -1
  593. package/viewer/defaultViewer.d.ts +0 -130
  594. package/viewer/defaultViewer.js +0 -672
  595. package/viewer/defaultViewer.js.map +0 -1
  596. package/viewer/renderOnlyViewer.d.ts +0 -9
  597. package/viewer/renderOnlyViewer.js +0 -46
  598. package/viewer/renderOnlyViewer.js.map +0 -1
  599. package/viewer/viewer.d.ts +0 -258
  600. package/viewer/viewer.js +0 -783
  601. package/viewer/viewer.js.map +0 -1
  602. package/viewer/viewerManager.d.ts +0 -58
  603. package/viewer/viewerManager.js +0 -91
  604. package/viewer/viewerManager.js.map +0 -1
  605. package/viewer/viewerWithTemplate.d.ts +0 -9
  606. package/viewer/viewerWithTemplate.js +0 -20
  607. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1,200 @@
1
+ import { br as Clamp, C as Constants, T as Tools, ab as EngineStore, bs as EffectRenderer, bt as EffectWrapper } from './index-D46Rc8Qa.esm.js';
2
+
3
+ let _dumpToolsEngine;
4
+ let _enginePromise = null;
5
+ async function _CreateDumpRenderer() {
6
+ if (!_enginePromise) {
7
+ _enginePromise = new Promise((resolve, reject) => {
8
+ let canvas;
9
+ let engine = null;
10
+ const options = {
11
+ preserveDrawingBuffer: true,
12
+ depth: false,
13
+ stencil: false,
14
+ alpha: true,
15
+ premultipliedAlpha: false,
16
+ antialias: false,
17
+ failIfMajorPerformanceCaveat: false,
18
+ };
19
+ import('./index-D46Rc8Qa.esm.js').then(function (n) { return n.bN; })
20
+ .then(({ ThinEngine: thinEngineClass }) => {
21
+ try {
22
+ canvas = new OffscreenCanvas(100, 100); // will be resized later
23
+ engine = new thinEngineClass(canvas, false, options);
24
+ }
25
+ catch (e) {
26
+ // The browser either does not support OffscreenCanvas or WebGL context in OffscreenCanvas, fallback on a regular canvas
27
+ canvas = document.createElement("canvas");
28
+ engine = new thinEngineClass(canvas, false, options);
29
+ }
30
+ // remove this engine from the list of instances to avoid using it for other purposes
31
+ EngineStore.Instances.pop();
32
+ // However, make sure to dispose it when no other engines are left
33
+ EngineStore.OnEnginesDisposedObservable.add((e) => {
34
+ // guaranteed to run when no other instances are left
35
+ // only dispose if it's not the current engine
36
+ if (engine && e !== engine && !engine.isDisposed && EngineStore.Instances.length === 0) {
37
+ // Dump the engine and the associated resources
38
+ Dispose();
39
+ }
40
+ });
41
+ engine.getCaps().parallelShaderCompile = undefined;
42
+ const renderer = new EffectRenderer(engine);
43
+ import('./pass.fragment-BgXOqRns.esm.js').then(({ passPixelShader }) => {
44
+ if (!engine) {
45
+ reject("Engine is not defined");
46
+ return;
47
+ }
48
+ const wrapper = new EffectWrapper({
49
+ engine,
50
+ name: passPixelShader.name,
51
+ fragmentShader: passPixelShader.shader,
52
+ samplerNames: ["textureSampler"],
53
+ });
54
+ _dumpToolsEngine = {
55
+ canvas,
56
+ engine,
57
+ renderer,
58
+ wrapper,
59
+ };
60
+ resolve(_dumpToolsEngine);
61
+ });
62
+ })
63
+ .catch(reject);
64
+ });
65
+ }
66
+ return await _enginePromise;
67
+ }
68
+ /**
69
+ * Dumps the current bound framebuffer
70
+ * @param width defines the rendering width
71
+ * @param height defines the rendering height
72
+ * @param engine defines the hosting engine
73
+ * @param successCallback defines the callback triggered once the data are available
74
+ * @param mimeType defines the mime type of the result
75
+ * @param fileName defines the filename to download. If present, the result will automatically be downloaded
76
+ * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.
77
+ * @returns a void promise
78
+ */
79
+ async function DumpFramebuffer(width, height, engine, successCallback, mimeType = "image/png", fileName, quality) {
80
+ // Read the contents of the framebuffer
81
+ const bufferView = await engine.readPixels(0, 0, width, height);
82
+ const data = new Uint8Array(bufferView.buffer);
83
+ DumpData(width, height, data, successCallback, mimeType, fileName, true, undefined, quality);
84
+ }
85
+ /**
86
+ * Dumps an array buffer
87
+ * @param width defines the rendering width
88
+ * @param height defines the rendering height
89
+ * @param data the data array
90
+ * @param mimeType defines the mime type of the result
91
+ * @param fileName defines the filename to download. If present, the result will automatically be downloaded
92
+ * @param invertY true to invert the picture in the Y dimension
93
+ * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string
94
+ * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.
95
+ * @returns a promise that resolve to the final data
96
+ */
97
+ function DumpDataAsync(width, height, data, mimeType = "image/png", fileName, invertY = false, toArrayBuffer = false, quality) {
98
+ return new Promise((resolve) => {
99
+ DumpData(width, height, data, (result) => resolve(result), mimeType, fileName, invertY, toArrayBuffer, quality);
100
+ });
101
+ }
102
+ /**
103
+ * Dumps an array buffer
104
+ * @param width defines the rendering width
105
+ * @param height defines the rendering height
106
+ * @param data the data array
107
+ * @param successCallback defines the callback triggered once the data are available
108
+ * @param mimeType defines the mime type of the result
109
+ * @param fileName defines the filename to download. If present, the result will automatically be downloaded
110
+ * @param invertY true to invert the picture in the Y dimension
111
+ * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string
112
+ * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.
113
+ */
114
+ function DumpData(width, height, data, successCallback, mimeType = "image/png", fileName, invertY = false, toArrayBuffer = false, quality) {
115
+ _CreateDumpRenderer().then((renderer) => {
116
+ renderer.engine.setSize(width, height, true);
117
+ // Convert if data are float32
118
+ if (data instanceof Float32Array) {
119
+ const data2 = new Uint8Array(data.length);
120
+ let n = data.length;
121
+ while (n--) {
122
+ const v = data[n];
123
+ data2[n] = Math.round(Clamp(v) * 255);
124
+ }
125
+ data = data2;
126
+ }
127
+ // Create the image
128
+ const texture = renderer.engine.createRawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, false, !invertY, Constants.TEXTURE_NEAREST_NEAREST);
129
+ renderer.renderer.setViewport();
130
+ renderer.renderer.applyEffectWrapper(renderer.wrapper);
131
+ renderer.wrapper.effect._bindTexture("textureSampler", texture);
132
+ renderer.renderer.draw();
133
+ if (toArrayBuffer) {
134
+ Tools.ToBlob(renderer.canvas, (blob) => {
135
+ const fileReader = new FileReader();
136
+ fileReader.onload = (event) => {
137
+ const arrayBuffer = event.target.result;
138
+ if (successCallback) {
139
+ successCallback(arrayBuffer);
140
+ }
141
+ };
142
+ fileReader.readAsArrayBuffer(blob);
143
+ }, mimeType, quality);
144
+ }
145
+ else {
146
+ Tools.EncodeScreenshotCanvasData(renderer.canvas, successCallback, mimeType, fileName, quality);
147
+ }
148
+ texture.dispose();
149
+ });
150
+ }
151
+ /**
152
+ * Dispose the dump tools associated resources
153
+ */
154
+ function Dispose() {
155
+ if (_dumpToolsEngine) {
156
+ _dumpToolsEngine.wrapper.dispose();
157
+ _dumpToolsEngine.renderer.dispose();
158
+ _dumpToolsEngine.engine.dispose();
159
+ }
160
+ else {
161
+ // in cases where the engine is not yet created, we need to wait for it to dispose it
162
+ _enginePromise?.then((dumpToolsEngine) => {
163
+ dumpToolsEngine.wrapper.dispose();
164
+ dumpToolsEngine.renderer.dispose();
165
+ dumpToolsEngine.engine.dispose();
166
+ });
167
+ }
168
+ _enginePromise = null;
169
+ _dumpToolsEngine = null;
170
+ }
171
+ /**
172
+ * Object containing a set of static utilities functions to dump data from a canvas
173
+ * @deprecated use functions
174
+ */
175
+ const DumpTools = {
176
+ // eslint-disable-next-line @typescript-eslint/naming-convention
177
+ DumpData,
178
+ // eslint-disable-next-line @typescript-eslint/naming-convention
179
+ DumpDataAsync,
180
+ // eslint-disable-next-line @typescript-eslint/naming-convention
181
+ DumpFramebuffer,
182
+ // eslint-disable-next-line @typescript-eslint/naming-convention
183
+ Dispose,
184
+ };
185
+ /**
186
+ * This will be executed automatically for UMD and es5.
187
+ * If esm dev wants the side effects to execute they will have to run it manually
188
+ * Once we build native modules those need to be exported.
189
+ * @internal
190
+ */
191
+ const initSideEffects = () => {
192
+ // References the dependencies.
193
+ Tools.DumpData = DumpData;
194
+ Tools.DumpDataAsync = DumpDataAsync;
195
+ Tools.DumpFramebuffer = DumpFramebuffer;
196
+ };
197
+ initSideEffects();
198
+
199
+ export { Dispose, DumpData, DumpDataAsync, DumpFramebuffer, DumpTools };
200
+ //# sourceMappingURL=dumpTools-JfWNUHd1.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dumpTools-JfWNUHd1.esm.js","sources":["../../../../../dev/core/dist/Misc/dumpTools.js"],"sourcesContent":["import { Constants } from \"../Engines/constants\";\nimport { EffectRenderer, EffectWrapper } from \"../Materials/effectRenderer\";\nimport { Tools } from \"./tools\";\nimport { Clamp } from \"../Maths/math.scalar.functions\";\nimport { EngineStore } from \"../Engines/engineStore\";\nlet _dumpToolsEngine;\nlet _enginePromise = null;\nasync function _CreateDumpRenderer() {\n if (!_enginePromise) {\n _enginePromise = new Promise((resolve, reject) => {\n let canvas;\n let engine = null;\n const options = {\n preserveDrawingBuffer: true,\n depth: false,\n stencil: false,\n alpha: true,\n premultipliedAlpha: false,\n antialias: false,\n failIfMajorPerformanceCaveat: false,\n };\n import(\"../Engines/thinEngine\")\n .then(({ ThinEngine: thinEngineClass }) => {\n try {\n canvas = new OffscreenCanvas(100, 100); // will be resized later\n engine = new thinEngineClass(canvas, false, options);\n }\n catch (e) {\n // The browser either does not support OffscreenCanvas or WebGL context in OffscreenCanvas, fallback on a regular canvas\n canvas = document.createElement(\"canvas\");\n engine = new thinEngineClass(canvas, false, options);\n }\n // remove this engine from the list of instances to avoid using it for other purposes\n EngineStore.Instances.pop();\n // However, make sure to dispose it when no other engines are left\n EngineStore.OnEnginesDisposedObservable.add((e) => {\n // guaranteed to run when no other instances are left\n // only dispose if it's not the current engine\n if (engine && e !== engine && !engine.isDisposed && EngineStore.Instances.length === 0) {\n // Dump the engine and the associated resources\n Dispose();\n }\n });\n engine.getCaps().parallelShaderCompile = undefined;\n const renderer = new EffectRenderer(engine);\n import(\"../Shaders/pass.fragment\").then(({ passPixelShader }) => {\n if (!engine) {\n reject(\"Engine is not defined\");\n return;\n }\n const wrapper = new EffectWrapper({\n engine,\n name: passPixelShader.name,\n fragmentShader: passPixelShader.shader,\n samplerNames: [\"textureSampler\"],\n });\n _dumpToolsEngine = {\n canvas,\n engine,\n renderer,\n wrapper,\n };\n resolve(_dumpToolsEngine);\n });\n })\n .catch(reject);\n });\n }\n return await _enginePromise;\n}\n/**\n * Dumps the current bound framebuffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param engine defines the hosting engine\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a void promise\n */\nexport async function DumpFramebuffer(width, height, engine, successCallback, mimeType = \"image/png\", fileName, quality) {\n // Read the contents of the framebuffer\n const bufferView = await engine.readPixels(0, 0, width, height);\n const data = new Uint8Array(bufferView.buffer);\n DumpData(width, height, data, successCallback, mimeType, fileName, true, undefined, quality);\n}\n/**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a promise that resolve to the final data\n */\nexport function DumpDataAsync(width, height, data, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n return new Promise((resolve) => {\n DumpData(width, height, data, (result) => resolve(result), mimeType, fileName, invertY, toArrayBuffer, quality);\n });\n}\n/**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\nexport function DumpData(width, height, data, successCallback, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n _CreateDumpRenderer().then((renderer) => {\n renderer.engine.setSize(width, height, true);\n // Convert if data are float32\n if (data instanceof Float32Array) {\n const data2 = new Uint8Array(data.length);\n let n = data.length;\n while (n--) {\n const v = data[n];\n data2[n] = Math.round(Clamp(v) * 255);\n }\n data = data2;\n }\n // Create the image\n const texture = renderer.engine.createRawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, false, !invertY, Constants.TEXTURE_NEAREST_NEAREST);\n renderer.renderer.setViewport();\n renderer.renderer.applyEffectWrapper(renderer.wrapper);\n renderer.wrapper.effect._bindTexture(\"textureSampler\", texture);\n renderer.renderer.draw();\n if (toArrayBuffer) {\n Tools.ToBlob(renderer.canvas, (blob) => {\n const fileReader = new FileReader();\n fileReader.onload = (event) => {\n const arrayBuffer = event.target.result;\n if (successCallback) {\n successCallback(arrayBuffer);\n }\n };\n fileReader.readAsArrayBuffer(blob);\n }, mimeType, quality);\n }\n else {\n Tools.EncodeScreenshotCanvasData(renderer.canvas, successCallback, mimeType, fileName, quality);\n }\n texture.dispose();\n });\n}\n/**\n * Dispose the dump tools associated resources\n */\nexport function Dispose() {\n if (_dumpToolsEngine) {\n _dumpToolsEngine.wrapper.dispose();\n _dumpToolsEngine.renderer.dispose();\n _dumpToolsEngine.engine.dispose();\n }\n else {\n // in cases where the engine is not yet created, we need to wait for it to dispose it\n _enginePromise?.then((dumpToolsEngine) => {\n dumpToolsEngine.wrapper.dispose();\n dumpToolsEngine.renderer.dispose();\n dumpToolsEngine.engine.dispose();\n });\n }\n _enginePromise = null;\n _dumpToolsEngine = null;\n}\n/**\n * Object containing a set of static utilities functions to dump data from a canvas\n * @deprecated use functions\n */\nexport const DumpTools = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpData,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpDataAsync,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpFramebuffer,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Dispose,\n};\n/**\n * This will be executed automatically for UMD and es5.\n * If esm dev wants the side effects to execute they will have to run it manually\n * Once we build native modules those need to be exported.\n * @internal\n */\nconst initSideEffects = () => {\n // References the dependencies.\n Tools.DumpData = DumpData;\n Tools.DumpDataAsync = DumpDataAsync;\n Tools.DumpFramebuffer = DumpFramebuffer;\n};\ninitSideEffects();\n//# sourceMappingURL=dumpTools.js.map"],"names":[],"mappings":";;AAKA,IAAI,gBAAgB;AACpB,IAAI,cAAc,GAAG,IAAI;AACzB,eAAe,mBAAmB,GAAG;AACrC,IAAI,IAAI,CAAC,cAAc,EAAE;AACzB,QAAQ,cAAc,GAAG,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AAC1D,YAAY,IAAI,MAAM;AACtB,YAAY,IAAI,MAAM,GAAG,IAAI;AAC7B,YAAY,MAAM,OAAO,GAAG;AAC5B,gBAAgB,qBAAqB,EAAE,IAAI;AAC3C,gBAAgB,KAAK,EAAE,KAAK;AAC5B,gBAAgB,OAAO,EAAE,KAAK;AAC9B,gBAAgB,KAAK,EAAE,IAAI;AAC3B,gBAAgB,kBAAkB,EAAE,KAAK;AACzC,gBAAgB,SAAS,EAAE,KAAK;AAChC,gBAAgB,4BAA4B,EAAE,KAAK;AACnD,aAAa;AACb,YAAY,OAAO,yBAAuB;AAC1C,iBAAiB,IAAI,CAAC,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK;AAC3D,gBAAgB,IAAI;AACpB,oBAAoB,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC3D,oBAAoB,MAAM,GAAG,IAAI,eAAe,CAAC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AACA,IAAI,aAAa;AACjB;AACA,IAAI,eAAe;AACnB;AACA,IAAI,OAAO;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe,GAAG,MAAM;AAC9B;AACA,IAAI,KAAK,CAAC,QAAQ,GAAG,QAAQ;AAC7B,IAAI,KAAK,CAAC,aAAa,GAAG,aAAa;AACvC,IAAI,KAAK,CAAC,eAAe,GAAG,eAAe;AAC3C,CAAC;AACD,eAAe,EAAE;;;;"}
@@ -0,0 +1,2 @@
1
+ import{br as e,C as n,T as a,ab as r,bs as s,bt as t}from"./index-r5IGv8fd.esm.min.js";let i,p=null;async function o(e,n,a,r,s="image/png",t,i){const p=await a.readPixels(0,0,e,n);d(e,n,new Uint8Array(p.buffer),r,s,t,!0,void 0,i)}function c(e,n,a,r="image/png",s,t=!1,i=!1,p){return new Promise((o=>{d(e,n,a,(e=>o(e)),r,s,t,i,p)}))}function d(o,c,d,m,f="image/png",u,g=!1,w=!1,h){(async function(){return p||(p=new Promise(((e,n)=>{let a,p=null;const o={preserveDrawingBuffer:!0,depth:!1,stencil:!1,alpha:!0,premultipliedAlpha:!1,antialias:!1,failIfMajorPerformanceCaveat:!1};import("./index-r5IGv8fd.esm.min.js").then((function(e){return e.bN})).then((({ThinEngine:c})=>{try{a=new OffscreenCanvas(100,100),p=new c(a,!1,o)}catch(e){a=document.createElement("canvas"),p=new c(a,!1,o)}r.Instances.pop(),r.OnEnginesDisposedObservable.add((e=>{p&&e!==p&&!p.isDisposed&&0===r.Instances.length&&l()})),p.getCaps().parallelShaderCompile=void 0;const d=new s(p);import("./pass.fragment-Dqmp3CRB.esm.min.js").then((({passPixelShader:r})=>{if(!p)return void n("Engine is not defined");const s=new t({engine:p,name:r.name,fragmentShader:r.shader,samplerNames:["textureSampler"]});i={canvas:a,engine:p,renderer:d,wrapper:s},e(i)}))})).catch(n)}))),await p})().then((r=>{if(r.engine.setSize(o,c,!0),d instanceof Float32Array){const n=new Uint8Array(d.length);let a=d.length;for(;a--;){const r=d[a];n[a]=Math.round(255*e(r))}d=n}const s=r.engine.createRawTexture(d,o,c,n.TEXTUREFORMAT_RGBA,!1,!g,n.TEXTURE_NEAREST_NEAREST);r.renderer.setViewport(),r.renderer.applyEffectWrapper(r.wrapper),r.wrapper.effect._bindTexture("textureSampler",s),r.renderer.draw(),w?a.ToBlob(r.canvas,(e=>{const n=new FileReader;n.onload=e=>{const n=e.target.result;m&&m(n)},n.readAsArrayBuffer(e)}),f,h):a.EncodeScreenshotCanvasData(r.canvas,m,f,u,h),s.dispose()}))}function l(){i?(i.wrapper.dispose(),i.renderer.dispose(),i.engine.dispose()):p?.then((e=>{e.wrapper.dispose(),e.renderer.dispose(),e.engine.dispose()})),p=null,i=null}const m={DumpData:d,DumpDataAsync:c,DumpFramebuffer:o,Dispose:l};a.DumpData=d,a.DumpDataAsync=c,a.DumpFramebuffer=o;export{l as Dispose,d as DumpData,c as DumpDataAsync,o as DumpFramebuffer,m as DumpTools};
2
+ //# sourceMappingURL=dumpTools-MGQM1tV4.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dumpTools-MGQM1tV4.esm.min.js","sources":["../../../../../dev/core/dist/Misc/dumpTools.js"],"sourcesContent":["import { Constants } from \"../Engines/constants\";\nimport { EffectRenderer, EffectWrapper } from \"../Materials/effectRenderer\";\nimport { Tools } from \"./tools\";\nimport { Clamp } from \"../Maths/math.scalar.functions\";\nimport { EngineStore } from \"../Engines/engineStore\";\nlet _dumpToolsEngine;\nlet _enginePromise = null;\nasync function _CreateDumpRenderer() {\n if (!_enginePromise) {\n _enginePromise = new Promise((resolve, reject) => {\n let canvas;\n let engine = null;\n const options = {\n preserveDrawingBuffer: true,\n depth: false,\n stencil: false,\n alpha: true,\n premultipliedAlpha: false,\n antialias: false,\n failIfMajorPerformanceCaveat: false,\n };\n import(\"../Engines/thinEngine\")\n .then(({ ThinEngine: thinEngineClass }) => {\n try {\n canvas = new OffscreenCanvas(100, 100); // will be resized later\n engine = new thinEngineClass(canvas, false, options);\n }\n catch (e) {\n // The browser either does not support OffscreenCanvas or WebGL context in OffscreenCanvas, fallback on a regular canvas\n canvas = document.createElement(\"canvas\");\n engine = new thinEngineClass(canvas, false, options);\n }\n // remove this engine from the list of instances to avoid using it for other purposes\n EngineStore.Instances.pop();\n // However, make sure to dispose it when no other engines are left\n EngineStore.OnEnginesDisposedObservable.add((e) => {\n // guaranteed to run when no other instances are left\n // only dispose if it's not the current engine\n if (engine && e !== engine && !engine.isDisposed && EngineStore.Instances.length === 0) {\n // Dump the engine and the associated resources\n Dispose();\n }\n });\n engine.getCaps().parallelShaderCompile = undefined;\n const renderer = new EffectRenderer(engine);\n import(\"../Shaders/pass.fragment\").then(({ passPixelShader }) => {\n if (!engine) {\n reject(\"Engine is not defined\");\n return;\n }\n const wrapper = new EffectWrapper({\n engine,\n name: passPixelShader.name,\n fragmentShader: passPixelShader.shader,\n samplerNames: [\"textureSampler\"],\n });\n _dumpToolsEngine = {\n canvas,\n engine,\n renderer,\n wrapper,\n };\n resolve(_dumpToolsEngine);\n });\n })\n .catch(reject);\n });\n }\n return await _enginePromise;\n}\n/**\n * Dumps the current bound framebuffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param engine defines the hosting engine\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a void promise\n */\nexport async function DumpFramebuffer(width, height, engine, successCallback, mimeType = \"image/png\", fileName, quality) {\n // Read the contents of the framebuffer\n const bufferView = await engine.readPixels(0, 0, width, height);\n const data = new Uint8Array(bufferView.buffer);\n DumpData(width, height, data, successCallback, mimeType, fileName, true, undefined, quality);\n}\n/**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a promise that resolve to the final data\n */\nexport function DumpDataAsync(width, height, data, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n return new Promise((resolve) => {\n DumpData(width, height, data, (result) => resolve(result), mimeType, fileName, invertY, toArrayBuffer, quality);\n });\n}\n/**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\nexport function DumpData(width, height, data, successCallback, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n _CreateDumpRenderer().then((renderer) => {\n renderer.engine.setSize(width, height, true);\n // Convert if data are float32\n if (data instanceof Float32Array) {\n const data2 = new Uint8Array(data.length);\n let n = data.length;\n while (n--) {\n const v = data[n];\n data2[n] = Math.round(Clamp(v) * 255);\n }\n data = data2;\n }\n // Create the image\n const texture = renderer.engine.createRawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, false, !invertY, Constants.TEXTURE_NEAREST_NEAREST);\n renderer.renderer.setViewport();\n renderer.renderer.applyEffectWrapper(renderer.wrapper);\n renderer.wrapper.effect._bindTexture(\"textureSampler\", texture);\n renderer.renderer.draw();\n if (toArrayBuffer) {\n Tools.ToBlob(renderer.canvas, (blob) => {\n const fileReader = new FileReader();\n fileReader.onload = (event) => {\n const arrayBuffer = event.target.result;\n if (successCallback) {\n successCallback(arrayBuffer);\n }\n };\n fileReader.readAsArrayBuffer(blob);\n }, mimeType, quality);\n }\n else {\n Tools.EncodeScreenshotCanvasData(renderer.canvas, successCallback, mimeType, fileName, quality);\n }\n texture.dispose();\n });\n}\n/**\n * Dispose the dump tools associated resources\n */\nexport function Dispose() {\n if (_dumpToolsEngine) {\n _dumpToolsEngine.wrapper.dispose();\n _dumpToolsEngine.renderer.dispose();\n _dumpToolsEngine.engine.dispose();\n }\n else {\n // in cases where the engine is not yet created, we need to wait for it to dispose it\n _enginePromise?.then((dumpToolsEngine) => {\n dumpToolsEngine.wrapper.dispose();\n dumpToolsEngine.renderer.dispose();\n dumpToolsEngine.engine.dispose();\n });\n }\n _enginePromise = null;\n _dumpToolsEngine = null;\n}\n/**\n * Object containing a set of static utilities functions to dump data from a canvas\n * @deprecated use functions\n */\nexport const DumpTools = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpData,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpDataAsync,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpFramebuffer,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Dispose,\n};\n/**\n * This will be executed automatically for UMD and es5.\n * If esm dev wants the side effects to execute they will have to run it manually\n * Once we build native modules those need to be exported.\n * @internal\n */\nconst initSideEffects = () => {\n // References the dependencies.\n Tools.DumpData = DumpData;\n Tools.DumpDataAsync = DumpDataAsync;\n Tools.DumpFramebuffer = DumpFramebuffer;\n};\ninitSideEffects();\n//# sourceMappingURL=dumpTools.js.map"],"names":["_dumpToolsEngine","_enginePromise","async","DumpFramebuffer","width","height","engine","successCallback","mimeType","fileName","quality","bufferView","readPixels","DumpData","Uint8Array","buffer","undefined","DumpDataAsync","data","invertY","toArrayBuffer","Promise","resolve","result","reject","canvas","options","preserveDrawingBuffer","depth","stencil","alpha","premultipliedAlpha","antialias","failIfMajorPerformanceCaveat","import","then","n","bN","ThinEngine","thinEngineClass","OffscreenCanvas","e","document","createElement","EngineStore","Instances","pop","OnEnginesDisposedObservable","add","isDisposed","length","Dispose","getCaps","parallelShaderCompile","renderer","EffectRenderer","passPixelShader","wrapper","EffectWrapper","name","fragmentShader","shader","samplerNames","catch","_CreateDumpRenderer","setSize","Float32Array","data2","v","Math","round","Clamp","texture","createRawTexture","Constants","TEXTUREFORMAT_RGBA","TEXTURE_NEAREST_NEAREST","setViewport","applyEffectWrapper","effect","_bindTexture","draw","Tools","ToBlob","blob","fileReader","FileReader","onload","event","arrayBuffer","target","readAsArrayBuffer","EncodeScreenshotCanvasData","dispose","dumpToolsEngine","DumpTools"],"mappings":"uFAKA,IAAIA,EACAC,EAAiB,KA2EdC,eAAeC,EAAgBC,EAAOC,EAAQC,EAAQC,EAAiBC,EAAW,YAAaC,EAAUC,GAE5G,MAAMC,QAAmBL,EAAOM,WAAW,EAAG,EAAGR,EAAOC,GAExDQ,EAAST,EAAOC,EADH,IAAIS,WAAWH,EAAWI,QACTR,EAAiBC,EAAUC,GAAU,OAAMO,EAAWN,EACxF,CAaO,SAASO,EAAcb,EAAOC,EAAQa,EAAMV,EAAW,YAAaC,EAAUU,GAAU,EAAOC,GAAgB,EAAOV,GACzH,OAAO,IAAIW,SAASC,IAChBT,EAAST,EAAOC,EAAQa,GAAOK,GAAWD,EAAQC,IAASf,EAAUC,EAAUU,EAASC,EAAeV,EAAQ,GAEvH,CAaO,SAASG,EAAST,EAAOC,EAAQa,EAAMX,EAAiBC,EAAW,YAAaC,EAAUU,GAAU,EAAOC,GAAgB,EAAOV,IA7GzIR,iBA6DI,OA5DKD,IACDA,EAAiB,IAAIoB,SAAQ,CAACC,EAASE,KACnC,IAAIC,EACAnB,EAAS,KACb,MAAMoB,EAAU,C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vD,EAAMd,EAAOC,EAAQqE,EAAUC,oBAAoB,GAAQxD,EAASuD,EAAUE,yBAC/HtB,EAASA,SAASuB,cAClBvB,EAASA,SAASwB,mBAAmBxB,EAASG,SAC9CH,EAASG,QAAQsB,OAAOC,aAAa,iBAAkBR,GACvDlB,EAASA,SAAS2B,OACd7D,EACA8D,EAAMC,OAAO7B,EAAS7B,QAAS2D,IAC3B,MAAMC,EAAa,IAAIC,WACvBD,EAAWE,OAAUC,IACjB,MAAMC,EAAcD,EAAME,OAAOnE,OAC7BhB,GACAA,EAAgBkF,EACxC,EAEgBJ,EAAWM,kBAAkBP,EAAK,GACnC5E,EAAUE,GAGbwE,EAAMU,2BAA2BtC,EAAS7B,OAAQlB,EAAiBC,EAAUC,EAAUC,GAE3F8D,EAAQqB,SAAS,GAEzB,CAIO,SAAS1C,IACRnD,GACAA,EAAiByD,QAAQoC,UACzB7F,EAAiBsD,SAASuC,UAC1B7F,EAAiBM,OAAOuF,WAIxB5F,GAAgBkC,MAAM2D,IAClBA,EAAgBrC,QAAQoC,UACxBC,EAAgBxC,SAASuC,UACzBC,EAAgBxF,OAAOuF,SAAS,IAGxC5F,EAAiB,KACjBD,EAAmB,IACvB,CAKY,MAAC+F,EAAY,CAErBlF,WAEAI,gBAEAd,kBAEAgD,WAUA+B,EAAMrE,SAAWA,EACjBqE,EAAMjE,cAAgBA,EACtBiE,EAAM/E,gBAAkBA"}
@@ -0,0 +1,64 @@
1
+ import { G as GetEnvInfo, U as UploadEnvSpherical, a as UploadEnvLevelsAsync } from './environmentTextureTools-DMKf2lIW.esm.js';
2
+ import './index-D46Rc8Qa.esm.js';
3
+ import './dumpTools-JfWNUHd1.esm.js';
4
+
5
+ /**
6
+ * Implementation of the ENV Texture Loader.
7
+ * @internal
8
+ */
9
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
+ class _ENVTextureLoader {
11
+ constructor() {
12
+ /**
13
+ * Defines whether the loader supports cascade loading the different faces.
14
+ */
15
+ this.supportCascades = false;
16
+ }
17
+ /**
18
+ * Uploads the cube texture data to the WebGL texture. It has already been bound.
19
+ * @param data contains the texture data
20
+ * @param texture defines the BabylonJS internal texture
21
+ * @param createPolynomials will be true if polynomials have been requested
22
+ * @param onLoad defines the callback to trigger once the texture is ready
23
+ * @param onError defines the callback to trigger in case of error
24
+ */
25
+ loadCubeData(data, texture, createPolynomials, onLoad, onError) {
26
+ if (Array.isArray(data)) {
27
+ return;
28
+ }
29
+ const info = GetEnvInfo(data);
30
+ if (info) {
31
+ texture.width = info.width;
32
+ texture.height = info.width;
33
+ try {
34
+ UploadEnvSpherical(texture, info);
35
+ UploadEnvLevelsAsync(texture, data, info).then(() => {
36
+ texture.isReady = true;
37
+ texture.onLoadedObservable.notifyObservers(texture);
38
+ texture.onLoadedObservable.clear();
39
+ if (onLoad) {
40
+ onLoad();
41
+ }
42
+ }, (reason) => {
43
+ onError?.("Can not upload environment levels", reason);
44
+ });
45
+ }
46
+ catch (e) {
47
+ onError?.("Can not upload environment file", e);
48
+ }
49
+ }
50
+ else if (onError) {
51
+ onError("Can not parse the environment file", null);
52
+ }
53
+ }
54
+ /**
55
+ * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.
56
+ */
57
+ loadData() {
58
+ // eslint-disable-next-line no-throw-literal
59
+ throw ".env not supported in 2d.";
60
+ }
61
+ }
62
+
63
+ export { _ENVTextureLoader };
64
+ //# sourceMappingURL=envTextureLoader-CoD9RkFy.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envTextureLoader-CoD9RkFy.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,GAAG,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE;AACpE,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AACjC,YAAY;AACZ;AACA,QAAQ,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;AACrC,QAAQ,IAAI,IAAI,EAAE;AAClB,YAAY,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK;AACtC,YAAY,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK;AACvC,YAAY,IAAI;AAChB,gBAAgB,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC;AACjD,gBAAgB,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM;AACrE,oBAAoB,OAAO,CAAC,OAAO,GAAG,IAAI;AAC1C,oBAAoB,OAAO,CAAC,kBAAkB,CAAC,eAAe,CAAC,OAAO,CAAC;AACvE,oBAAoB,OAAO,CAAC,kBAAkB,CAAC,KAAK,EAAE;AACtD,oBAAoB,IAAI,MAAM,EAAE;AAChC,wBAAwB,MAAM,EAAE;AAChC;AACA,iBAAiB,EAAE,CAAC,MAAM,KAAK;AAC/B,oBAAoB,OAAO,GAAG,mCAAmC,EAAE,MAAM,CAAC;AAC1E,iBAAiB,CAAC;AAClB;AACA,YAAY,OAAO,CAAC,EAAE;AACtB,gBAAgB,OAAO,GAAG,iCAAiC,EAAE,CAAC,CAAC;AAC/D;AACA;AACA,aAAa,IAAI,OAAO,EAAE;AAC1B,YAAY,OAAO,CAAC,oCAAoC,EAAE,IAAI,CAAC;AAC/D;AACA;AACA;AACA;AACA;AACA,IAAI,QAAQ,GAAG;AACf;AACA,QAAQ,MAAM,2BAA2B;AACzC;AACA;;;;"}
@@ -0,0 +1,2 @@
1
+ import{G as e,U as n,a as o}from"./environmentTextureTools-BFBrSyc_.esm.min.js";import"./index-r5IGv8fd.esm.min.js";import"./dumpTools-MGQM1tV4.esm.min.js";class t{constructor(){this.supportCascades=!1}loadCubeData(t,s,a,r,i){if(Array.isArray(t))return;const d=e(t);if(d){s.width=d.width,s.height=d.width;try{n(s,d),o(s,t,d).then((()=>{s.isReady=!0,s.onLoadedObservable.notifyObservers(s),s.onLoadedObservable.clear(),r&&r()}),(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{t as _ENVTextureLoader};
2
+ //# sourceMappingURL=envTextureLoader-_huqF4Iu.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envTextureLoader-_huqF4Iu.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":"4JAMO,MAAMA,EACT,WAAAC,GAIIC,KAAKC,iBAAkB,CAC/B,CASI,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,GACxB,IACoBe,IACAd,IAAU,oCAAqCc,EAAO,GAE1E,CACY,MAAOC,GACHf,IAAU,kCAAmCe,EAC7D,CACA,MACiBf,GACLA,EAAQ,qCAAsC,KAE1D,CAII,QAAAgB,GAEI,KAAM,2BACd"}
@@ -0,0 +1,2 @@
1
+ import{L as e,T as t,I as r,C as n,bq as o,f as a,aj as i,u as s,y as l}from"./index-r5IGv8fd.esm.min.js";import"./dumpTools-MGQM1tV4.esm.min.js";const u="image/png",p=[134,22,135,150,246,214,150,54];function c(t){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);let n=0;for(let t=0;t<p.length;t++)if(r.getUint8(n++)!==p[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=T(i),i.specular&&(i.specular.specularDataPosition=n,i.specular.lodGenerationScale=i.specular.lodGenerationScale||.8),i}function T(e){if(e.version>2)throw new Error(`Unsupported babylon environment map version "${e.version}". Latest supported version is "2".`);return 2===e.version?e:e={...e,version:2,imageType:u}}function d(e,t,r){const n=(r=T(r)).specular;if(!n)return Promise.resolve();e._lodGenerationScale=n.lodGenerationScale;const o=function(e,t){const r=(t=T(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 m(e,o,r.imageType)}function f(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 m(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,m=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-CqcagT1x.esm.min.js")):await import("./rgbdDecode.fragment-C3AkoFAQ.esm.min.js"),m=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=>f(n,c,T,m,a,r,t,d,y,_,e)));else{const n=new Image;n.src=a,i=new Promise(((o,i)=>{n.onload=()=>{f(n,c,T,m,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)),m&&m.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 _(e,t){const r=(t=T(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 y(e,t,r,n,o){const a=m(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,m(e,t).then((()=>(e.isReady=!0,e)))}export{c as G,_ as U,y as _,d as a};
2
+ //# sourceMappingURL=environmentTextureTools-BFBrSyc_.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environmentTextureTools-BFBrSyc_.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 \"../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_BYTE &&\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","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","_bufferViewArrayArray"],"mappings":"kJAaA,MAAMA,EAAqC,YAKrCC,EAAa,CAAC,IAAM,GAAM,IAAM,IAAM,IAAM,IAAM,IAAM,IAMvD,SAASC,EAAWC,GACvB,MAAMC,EAAW,IAAIC,SAASF,EAAKG,OAAQH,EAAKI,WAAYJ,EAAKK,YACjE,IAAIC,EAAM,EACV,IAAK,IAAIC,EAAI,EAAGA,EAAIT,EAAWU,OAAQD,IACnC,GAAIN,EAASQ,SAASH,OAAWR,EAAWS,GAExC,OADAG,EAAOC,MAAM,iCACN,KAIf,IAAIC,EAAiB,GACjBC,EAAW,EACf,KAAQA,EAAWZ,EAASQ,SAASH,MACjCM,GAAkBE,OAAOC,aAAaF,GAE1C,IAAIG,EAAWC,KAAKC,MAAMN,GAQ1B,OAPAI,EAAWG,EAAiBH,GACxBA,EAASI,WAETJ,EAASI,SAASC,qBAAuBf,EAEzCU,EAASI,SAASE,mBAAqBN,EAASI,SAASE,oBAAsB,IAE5EN,CACX,CAOO,SAASG,EAAiBI,GAC7B,GAAIA,EAAKC,QA1CU,EA2Cf,MAAM,IAAIb,MAAM,gDAAgDY,EAAKC,8CAEzE,OAAqB,IAAjBD,EAAKC,QACED,EAGXA,EAAO,IAAKA,EAAMC,QAAS,EAAGC,U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