@babylonjs/viewer 7.25.2 → 7.26.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (554) hide show
  1. package/dist/babylon-viewer.esm.js +2 -0
  2. package/dist/babylon-viewer.esm.js.map +1 -0
  3. package/dist/babylon-viewer.esm.min.js +2 -0
  4. package/dist/babylon-viewer.esm.min.js.map +1 -0
  5. package/dist/chunks/EXT_lights_image_based-BAAAren3.esm.min.js +2 -0
  6. package/dist/chunks/EXT_lights_image_based-BAAAren3.esm.min.js.map +1 -0
  7. package/dist/chunks/EXT_lights_image_based-CLRxjLYR.esm.js +170 -0
  8. package/dist/chunks/EXT_lights_image_based-CLRxjLYR.esm.js.map +1 -0
  9. package/dist/chunks/EXT_mesh_gpu_instancing-g_z4hICR.esm.min.js +2 -0
  10. package/dist/chunks/EXT_mesh_gpu_instancing-g_z4hICR.esm.min.js.map +1 -0
  11. package/dist/chunks/EXT_mesh_gpu_instancing-xdiHrPE-.esm.js +86 -0
  12. package/dist/chunks/EXT_mesh_gpu_instancing-xdiHrPE-.esm.js.map +1 -0
  13. package/dist/chunks/EXT_meshopt_compression-DtR1iauf.esm.js +134 -0
  14. package/dist/chunks/EXT_meshopt_compression-DtR1iauf.esm.js.map +1 -0
  15. package/dist/chunks/EXT_meshopt_compression-SJRA4qRp.esm.min.js +2 -0
  16. package/dist/chunks/EXT_meshopt_compression-SJRA4qRp.esm.min.js.map +1 -0
  17. package/dist/chunks/EXT_texture_avif-DyYYGGQy.esm.js +44 -0
  18. package/dist/chunks/EXT_texture_avif-DyYYGGQy.esm.js.map +1 -0
  19. package/dist/chunks/EXT_texture_avif-Qcsk_kvk.esm.min.js +2 -0
  20. package/dist/chunks/EXT_texture_avif-Qcsk_kvk.esm.min.js.map +1 -0
  21. package/dist/chunks/EXT_texture_webp-CLgPX9Kq.esm.min.js +2 -0
  22. package/dist/chunks/EXT_texture_webp-CLgPX9Kq.esm.min.js.map +1 -0
  23. package/dist/chunks/EXT_texture_webp-X7MNkN3t.esm.js +43 -0
  24. package/dist/chunks/EXT_texture_webp-X7MNkN3t.esm.js.map +1 -0
  25. package/dist/chunks/ExtrasAsMetadata-DDzM1udc.esm.min.js +2 -0
  26. package/dist/chunks/ExtrasAsMetadata-DDzM1udc.esm.min.js.map +1 -0
  27. package/dist/chunks/ExtrasAsMetadata-_A4ue-yg.esm.js +64 -0
  28. package/dist/chunks/ExtrasAsMetadata-_A4ue-yg.esm.js.map +1 -0
  29. package/dist/chunks/KHR_animation_pointer-C_uSLVMY.esm.min.js +2 -0
  30. package/dist/chunks/KHR_animation_pointer-C_uSLVMY.esm.min.js.map +1 -0
  31. package/dist/chunks/KHR_animation_pointer-DOLmQrF0.esm.js +343 -0
  32. package/dist/chunks/KHR_animation_pointer-DOLmQrF0.esm.js.map +1 -0
  33. package/dist/chunks/KHR_draco_mesh_compression-Dc2dj10X.esm.js +610 -0
  34. package/dist/chunks/KHR_draco_mesh_compression-Dc2dj10X.esm.js.map +1 -0
  35. package/dist/chunks/KHR_draco_mesh_compression-Qjbd-cV8.esm.min.js +2 -0
  36. package/dist/chunks/KHR_draco_mesh_compression-Qjbd-cV8.esm.min.js.map +1 -0
  37. package/dist/chunks/KHR_interactivity-BMxQ78NS.esm.js +4033 -0
  38. package/dist/chunks/KHR_interactivity-BMxQ78NS.esm.js.map +1 -0
  39. package/dist/chunks/KHR_interactivity-Dyhotcuc.esm.min.js +2 -0
  40. package/dist/chunks/KHR_interactivity-Dyhotcuc.esm.min.js.map +1 -0
  41. package/dist/chunks/KHR_lights_punctual-BQxBGi0_.esm.js +1253 -0
  42. package/dist/chunks/KHR_lights_punctual-BQxBGi0_.esm.js.map +1 -0
  43. package/dist/chunks/KHR_lights_punctual-CP6yK7gB.esm.min.js +2 -0
  44. package/dist/chunks/KHR_lights_punctual-CP6yK7gB.esm.min.js.map +1 -0
  45. package/dist/chunks/KHR_materials_anisotropy-B-brojEG.esm.js +64 -0
  46. package/dist/chunks/KHR_materials_anisotropy-B-brojEG.esm.js.map +1 -0
  47. package/dist/chunks/KHR_materials_anisotropy-C_kRwfha.esm.min.js +2 -0
  48. package/dist/chunks/KHR_materials_anisotropy-C_kRwfha.esm.min.js.map +1 -0
  49. package/dist/chunks/KHR_materials_clearcoat-CRp8HOuT.esm.min.js +2 -0
  50. package/dist/chunks/KHR_materials_clearcoat-CRp8HOuT.esm.min.js.map +1 -0
  51. package/dist/chunks/KHR_materials_clearcoat-Dtwqzkls.esm.js +96 -0
  52. package/dist/chunks/KHR_materials_clearcoat-Dtwqzkls.esm.js.map +1 -0
  53. package/dist/chunks/KHR_materials_diffuse_transmission-BrvDWQjW.esm.js +97 -0
  54. package/dist/chunks/KHR_materials_diffuse_transmission-BrvDWQjW.esm.js.map +1 -0
  55. package/dist/chunks/KHR_materials_diffuse_transmission-CNCBiTRi.esm.min.js +2 -0
  56. package/dist/chunks/KHR_materials_diffuse_transmission-CNCBiTRi.esm.min.js.map +1 -0
  57. package/dist/chunks/KHR_materials_dispersion-Bx9AztVQ.esm.js +62 -0
  58. package/dist/chunks/KHR_materials_dispersion-Bx9AztVQ.esm.js.map +1 -0
  59. package/dist/chunks/KHR_materials_dispersion-C0wotXxO.esm.min.js +2 -0
  60. package/dist/chunks/KHR_materials_dispersion-C0wotXxO.esm.min.js.map +1 -0
  61. package/dist/chunks/KHR_materials_emissive_strength-CsJjVgTW.esm.js +55 -0
  62. package/dist/chunks/KHR_materials_emissive_strength-CsJjVgTW.esm.js.map +1 -0
  63. package/dist/chunks/KHR_materials_emissive_strength-DQk1VN_2.esm.min.js +2 -0
  64. package/dist/chunks/KHR_materials_emissive_strength-DQk1VN_2.esm.min.js.map +1 -0
  65. package/dist/chunks/KHR_materials_ior-B-Bz-ZTi.esm.js +64 -0
  66. package/dist/chunks/KHR_materials_ior-B-Bz-ZTi.esm.js.map +1 -0
  67. package/dist/chunks/KHR_materials_ior-DcRJZA_s.esm.min.js +2 -0
  68. package/dist/chunks/KHR_materials_ior-DcRJZA_s.esm.min.js.map +1 -0
  69. package/dist/chunks/KHR_materials_iridescence-B9mn3E_m.esm.js +72 -0
  70. package/dist/chunks/KHR_materials_iridescence-B9mn3E_m.esm.js.map +1 -0
  71. package/dist/chunks/KHR_materials_iridescence-BVq13lbk.esm.min.js +2 -0
  72. package/dist/chunks/KHR_materials_iridescence-BVq13lbk.esm.min.js.map +1 -0
  73. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D81096Xs.esm.min.js +2 -0
  74. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D81096Xs.esm.min.js.map +1 -0
  75. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DbXQeIqw.esm.js +81 -0
  76. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DbXQeIqw.esm.js.map +1 -0
  77. package/dist/chunks/KHR_materials_sheen-CJALPuj4.esm.js +85 -0
  78. package/dist/chunks/KHR_materials_sheen-CJALPuj4.esm.js.map +1 -0
  79. package/dist/chunks/KHR_materials_sheen-D6gJV14Q.esm.min.js +2 -0
  80. package/dist/chunks/KHR_materials_sheen-D6gJV14Q.esm.min.js.map +1 -0
  81. package/dist/chunks/KHR_materials_specular-8J6t7IWW.esm.js +75 -0
  82. package/dist/chunks/KHR_materials_specular-8J6t7IWW.esm.js.map +1 -0
  83. package/dist/chunks/KHR_materials_specular-CLkfKuYs.esm.min.js +2 -0
  84. package/dist/chunks/KHR_materials_specular-CLkfKuYs.esm.min.js.map +1 -0
  85. package/dist/chunks/KHR_materials_transmission-CtmncfNu.esm.js +307 -0
  86. package/dist/chunks/KHR_materials_transmission-CtmncfNu.esm.js.map +1 -0
  87. package/dist/chunks/KHR_materials_transmission-Ds1e4Rgi.esm.min.js +2 -0
  88. package/dist/chunks/KHR_materials_transmission-Ds1e4Rgi.esm.min.js.map +1 -0
  89. package/dist/chunks/KHR_materials_unlit-CjwtrKka.esm.min.js +2 -0
  90. package/dist/chunks/KHR_materials_unlit-CjwtrKka.esm.min.js.map +1 -0
  91. package/dist/chunks/KHR_materials_unlit-D7RRssK9.esm.js +74 -0
  92. package/dist/chunks/KHR_materials_unlit-D7RRssK9.esm.js.map +1 -0
  93. package/dist/chunks/KHR_materials_variants-B16YKuMe.esm.min.js +2 -0
  94. package/dist/chunks/KHR_materials_variants-B16YKuMe.esm.min.js.map +1 -0
  95. package/dist/chunks/KHR_materials_variants-C6mz0mzG.esm.js +238 -0
  96. package/dist/chunks/KHR_materials_variants-C6mz0mzG.esm.js.map +1 -0
  97. package/dist/chunks/KHR_materials_volume-CocxcaC_.esm.min.js +2 -0
  98. package/dist/chunks/KHR_materials_volume-CocxcaC_.esm.min.js.map +1 -0
  99. package/dist/chunks/KHR_materials_volume-kX43-sr-.esm.js +87 -0
  100. package/dist/chunks/KHR_materials_volume-kX43-sr-.esm.js.map +1 -0
  101. package/dist/chunks/KHR_mesh_quantization-B2Y3kC9D.esm.js +26 -0
  102. package/dist/chunks/KHR_mesh_quantization-B2Y3kC9D.esm.js.map +1 -0
  103. package/dist/chunks/KHR_mesh_quantization-BfMxe7Z-.esm.min.js +2 -0
  104. package/dist/chunks/KHR_mesh_quantization-BfMxe7Z-.esm.min.js.map +1 -0
  105. package/dist/chunks/KHR_texture_basisu-DS4eOc5v.esm.js +43 -0
  106. package/dist/chunks/KHR_texture_basisu-DS4eOc5v.esm.js.map +1 -0
  107. package/dist/chunks/KHR_texture_basisu-ghZqGH67.esm.min.js +2 -0
  108. package/dist/chunks/KHR_texture_basisu-ghZqGH67.esm.min.js.map +1 -0
  109. package/dist/chunks/KHR_texture_transform-6nYo8mzH.esm.min.js +2 -0
  110. package/dist/chunks/KHR_texture_transform-6nYo8mzH.esm.min.js.map +1 -0
  111. package/dist/chunks/KHR_texture_transform-B-qDuvbI.esm.js +63 -0
  112. package/dist/chunks/KHR_texture_transform-B-qDuvbI.esm.js.map +1 -0
  113. package/dist/chunks/KHR_xmp_json_ld-CKv9gfXs.esm.min.js +2 -0
  114. package/dist/chunks/KHR_xmp_json_ld-CKv9gfXs.esm.min.js.map +1 -0
  115. package/dist/chunks/KHR_xmp_json_ld-CXjOnFmU.esm.js +51 -0
  116. package/dist/chunks/KHR_xmp_json_ld-CXjOnFmU.esm.js.map +1 -0
  117. package/dist/chunks/MSFT_audio_emitter-1StuTv-Z.esm.js +2236 -0
  118. package/dist/chunks/MSFT_audio_emitter-1StuTv-Z.esm.js.map +1 -0
  119. package/dist/chunks/MSFT_audio_emitter-BfKy7LEd.esm.min.js +2 -0
  120. package/dist/chunks/MSFT_audio_emitter-BfKy7LEd.esm.min.js.map +1 -0
  121. package/dist/chunks/MSFT_lod-DA4UA4La.esm.js +337 -0
  122. package/dist/chunks/MSFT_lod-DA4UA4La.esm.js.map +1 -0
  123. package/dist/chunks/MSFT_lod-wcOn3D2V.esm.min.js +2 -0
  124. package/dist/chunks/MSFT_lod-wcOn3D2V.esm.min.js.map +1 -0
  125. package/dist/chunks/MSFT_minecraftMesh-afhS3NlZ.esm.js +46 -0
  126. package/dist/chunks/MSFT_minecraftMesh-afhS3NlZ.esm.js.map +1 -0
  127. package/dist/chunks/MSFT_minecraftMesh-x417idfJ.esm.min.js +2 -0
  128. package/dist/chunks/MSFT_minecraftMesh-x417idfJ.esm.min.js.map +1 -0
  129. package/dist/chunks/MSFT_sRGBFactors-BjLfK8v1.esm.min.js +2 -0
  130. package/dist/chunks/MSFT_sRGBFactors-BjLfK8v1.esm.min.js.map +1 -0
  131. package/dist/chunks/MSFT_sRGBFactors-fA6kZabo.esm.js +47 -0
  132. package/dist/chunks/MSFT_sRGBFactors-fA6kZabo.esm.js.map +1 -0
  133. package/dist/chunks/assetContainer-BWyT-iC8.esm.min.js +2 -0
  134. package/dist/chunks/assetContainer-BWyT-iC8.esm.min.js.map +1 -0
  135. package/dist/chunks/assetContainer-C9nOA325.esm.js +1598 -0
  136. package/dist/chunks/assetContainer-C9nOA325.esm.js.map +1 -0
  137. package/dist/chunks/audioEngine-Bi_JHe07.esm.js +305 -0
  138. package/dist/chunks/audioEngine-Bi_JHe07.esm.js.map +1 -0
  139. package/dist/chunks/audioEngine-DyaETd2M.esm.min.js +2 -0
  140. package/dist/chunks/audioEngine-DyaETd2M.esm.min.js.map +1 -0
  141. package/dist/chunks/bakedVertexAnimation-Bw1dcogG.esm.min.js +2 -0
  142. package/dist/chunks/bakedVertexAnimation-Bw1dcogG.esm.min.js.map +1 -0
  143. package/dist/chunks/bakedVertexAnimation-D2t3QFFy.esm.js +119 -0
  144. package/dist/chunks/bakedVertexAnimation-D2t3QFFy.esm.js.map +1 -0
  145. package/dist/chunks/basisTextureLoader-DEikcMs0.esm.js +600 -0
  146. package/dist/chunks/basisTextureLoader-DEikcMs0.esm.js.map +1 -0
  147. package/dist/chunks/basisTextureLoader-DnU1aFLP.esm.min.js +2 -0
  148. package/dist/chunks/basisTextureLoader-DnU1aFLP.esm.min.js.map +1 -0
  149. package/dist/chunks/ddsTextureLoader-DBWTHVjj.esm.min.js +2 -0
  150. package/dist/chunks/ddsTextureLoader-DBWTHVjj.esm.min.js.map +1 -0
  151. package/dist/chunks/ddsTextureLoader-ilOloJ4p.esm.js +87 -0
  152. package/dist/chunks/ddsTextureLoader-ilOloJ4p.esm.js.map +1 -0
  153. package/dist/chunks/decalFragment-CMHxc7Hr.esm.min.js +2 -0
  154. package/dist/chunks/decalFragment-CMHxc7Hr.esm.min.js.map +1 -0
  155. package/dist/chunks/decalFragment-CzgxOzQf.esm.js +18 -0
  156. package/dist/chunks/decalFragment-CzgxOzQf.esm.js.map +1 -0
  157. package/dist/chunks/default.fragment-BOotE87x.esm.min.js +2 -0
  158. package/dist/chunks/default.fragment-BOotE87x.esm.min.js.map +1 -0
  159. package/dist/chunks/default.fragment-C8I2FMK1.esm.js +515 -0
  160. package/dist/chunks/default.fragment-C8I2FMK1.esm.js.map +1 -0
  161. package/dist/chunks/default.fragment-CMyZ0Um2.esm.js +449 -0
  162. package/dist/chunks/default.fragment-CMyZ0Um2.esm.js.map +1 -0
  163. package/dist/chunks/default.fragment-dyXo8ZoT.esm.min.js +2 -0
  164. package/dist/chunks/default.fragment-dyXo8ZoT.esm.min.js.map +1 -0
  165. package/dist/chunks/default.vertex-BgameJri.esm.js +199 -0
  166. package/dist/chunks/default.vertex-BgameJri.esm.js.map +1 -0
  167. package/dist/chunks/default.vertex-CI-1zFCv.esm.min.js +2 -0
  168. package/dist/chunks/default.vertex-CI-1zFCv.esm.min.js.map +1 -0
  169. package/dist/chunks/default.vertex-CtvM7XrD.esm.js +180 -0
  170. package/dist/chunks/default.vertex-CtvM7XrD.esm.js.map +1 -0
  171. package/dist/chunks/default.vertex-DVEypQOv.esm.min.js +2 -0
  172. package/dist/chunks/default.vertex-DVEypQOv.esm.min.js.map +1 -0
  173. package/dist/chunks/defaultUboDeclaration-2dituFIw.esm.js +15 -0
  174. package/dist/chunks/defaultUboDeclaration-2dituFIw.esm.js.map +1 -0
  175. package/dist/chunks/defaultUboDeclaration-BCFc39NJ.esm.js +13 -0
  176. package/dist/chunks/defaultUboDeclaration-BCFc39NJ.esm.js.map +1 -0
  177. package/dist/chunks/defaultUboDeclaration-Be_Tm0i8.esm.min.js +2 -0
  178. package/dist/chunks/defaultUboDeclaration-Be_Tm0i8.esm.min.js.map +1 -0
  179. package/dist/chunks/defaultUboDeclaration-CjpL7xej.esm.min.js +2 -0
  180. package/dist/chunks/defaultUboDeclaration-CjpL7xej.esm.min.js.map +1 -0
  181. package/dist/chunks/engine-2EdX14bK.esm.js +1970 -0
  182. package/dist/chunks/engine-2EdX14bK.esm.js.map +1 -0
  183. package/dist/chunks/engine-CTtwkexh.esm.min.js +2 -0
  184. package/dist/chunks/engine-CTtwkexh.esm.min.js.map +1 -0
  185. package/dist/chunks/engine.common-BrXEBOzm.esm.js +1213 -0
  186. package/dist/chunks/engine.common-BrXEBOzm.esm.js.map +1 -0
  187. package/dist/chunks/engine.common-Dn_GE8cx.esm.min.js +2 -0
  188. package/dist/chunks/engine.common-Dn_GE8cx.esm.min.js.map +1 -0
  189. package/dist/chunks/envTextureLoader-9mljxKnB.esm.min.js +2 -0
  190. package/dist/chunks/envTextureLoader-9mljxKnB.esm.min.js.map +1 -0
  191. package/dist/chunks/envTextureLoader-cuBGdyEX.esm.js +63 -0
  192. package/dist/chunks/envTextureLoader-cuBGdyEX.esm.js.map +1 -0
  193. package/dist/chunks/environmentTextureTools-2JiPh6sF.esm.min.js +2 -0
  194. package/dist/chunks/environmentTextureTools-2JiPh6sF.esm.min.js.map +1 -0
  195. package/dist/chunks/environmentTextureTools-CaOOVUg4.esm.js +381 -0
  196. package/dist/chunks/environmentTextureTools-CaOOVUg4.esm.js.map +1 -0
  197. package/dist/chunks/exrTextureLoader-C2yRfZW0.esm.min.js +2 -0
  198. package/dist/chunks/exrTextureLoader-C2yRfZW0.esm.min.js.map +1 -0
  199. package/dist/chunks/exrTextureLoader-DPvYdRIY.esm.js +1682 -0
  200. package/dist/chunks/exrTextureLoader-DPvYdRIY.esm.js.map +1 -0
  201. package/dist/chunks/fogFragment-CerDBxh8.esm.min.js +2 -0
  202. package/dist/chunks/fogFragment-CerDBxh8.esm.min.js.map +1 -0
  203. package/dist/chunks/fogFragment-SpVyZY46.esm.js +102 -0
  204. package/dist/chunks/fogFragment-SpVyZY46.esm.js.map +1 -0
  205. package/dist/chunks/fresnelFunction-Cfc0PCuM.esm.min.js +2 -0
  206. package/dist/chunks/fresnelFunction-Cfc0PCuM.esm.min.js.map +1 -0
  207. package/dist/chunks/fresnelFunction-DYc_QORg.esm.js +12 -0
  208. package/dist/chunks/fresnelFunction-DYc_QORg.esm.js.map +1 -0
  209. package/dist/chunks/glTFLoader-CX847JwZ.esm.min.js +2 -0
  210. package/dist/chunks/glTFLoader-CX847JwZ.esm.min.js.map +1 -0
  211. package/dist/chunks/glTFLoader-FnbdTR40.esm.js +7552 -0
  212. package/dist/chunks/glTFLoader-FnbdTR40.esm.js.map +1 -0
  213. package/dist/chunks/glTFLoaderAnimation-DLprnT2e.esm.js +77 -0
  214. package/dist/chunks/glTFLoaderAnimation-DLprnT2e.esm.js.map +1 -0
  215. package/dist/chunks/glTFLoaderAnimation-YVA5W-1q.esm.min.js +2 -0
  216. package/dist/chunks/glTFLoaderAnimation-YVA5W-1q.esm.min.js.map +1 -0
  217. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  218. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  219. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  220. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  221. package/dist/chunks/harmonicsFunctions-BglL8EAc.esm.min.js +2 -0
  222. package/dist/chunks/harmonicsFunctions-BglL8EAc.esm.min.js.map +1 -0
  223. package/dist/chunks/harmonicsFunctions-BjhkFrPF.esm.min.js +2 -0
  224. package/dist/chunks/harmonicsFunctions-BjhkFrPF.esm.min.js.map +1 -0
  225. package/dist/chunks/harmonicsFunctions-D0kGurRz.esm.js +34 -0
  226. package/dist/chunks/harmonicsFunctions-D0kGurRz.esm.js.map +1 -0
  227. package/dist/chunks/harmonicsFunctions-f0TDZMjd.esm.js +35 -0
  228. package/dist/chunks/harmonicsFunctions-f0TDZMjd.esm.js.map +1 -0
  229. package/dist/chunks/hdrTextureLoader-BYv589K1.esm.min.js +2 -0
  230. package/dist/chunks/hdrTextureLoader-BYv589K1.esm.min.js.map +1 -0
  231. package/dist/chunks/hdrTextureLoader-Cia6kLvR.esm.js +252 -0
  232. package/dist/chunks/hdrTextureLoader-Cia6kLvR.esm.js.map +1 -0
  233. package/dist/chunks/helperFunctions-B6L2NvuR.esm.min.js +2 -0
  234. package/dist/chunks/helperFunctions-B6L2NvuR.esm.min.js.map +1 -0
  235. package/dist/chunks/helperFunctions-CTmvPMOb.esm.js +108 -0
  236. package/dist/chunks/helperFunctions-CTmvPMOb.esm.js.map +1 -0
  237. package/dist/chunks/helperFunctions-Dx_bhcnf.esm.js +80 -0
  238. package/dist/chunks/helperFunctions-Dx_bhcnf.esm.js.map +1 -0
  239. package/dist/chunks/helperFunctions-lfyjwIAq.esm.min.js +2 -0
  240. package/dist/chunks/helperFunctions-lfyjwIAq.esm.min.js.map +1 -0
  241. package/dist/chunks/index-H9RbNFln.esm.js +78669 -0
  242. package/dist/chunks/index-H9RbNFln.esm.js.map +1 -0
  243. package/dist/chunks/index-NKQY07Ai.esm.min.js +57 -0
  244. package/dist/chunks/index-NKQY07Ai.esm.min.js.map +1 -0
  245. package/dist/chunks/ktxTextureLoader-C8P1HmKw.esm.min.js +2 -0
  246. package/dist/chunks/ktxTextureLoader-C8P1HmKw.esm.min.js.map +1 -0
  247. package/dist/chunks/ktxTextureLoader-CGZaZgF4.esm.js +814 -0
  248. package/dist/chunks/ktxTextureLoader-CGZaZgF4.esm.js.map +1 -0
  249. package/dist/chunks/logDepthDeclaration-BtAGVG3-.esm.min.js +2 -0
  250. package/dist/chunks/logDepthDeclaration-BtAGVG3-.esm.min.js.map +1 -0
  251. package/dist/chunks/logDepthDeclaration-BvAgEnZm.esm.min.js +2 -0
  252. package/dist/chunks/logDepthDeclaration-BvAgEnZm.esm.min.js.map +1 -0
  253. package/dist/chunks/logDepthDeclaration-DD208S_2.esm.js +35 -0
  254. package/dist/chunks/logDepthDeclaration-DD208S_2.esm.js.map +1 -0
  255. package/dist/chunks/logDepthDeclaration-T3brxHqo.esm.js +20 -0
  256. package/dist/chunks/logDepthDeclaration-T3brxHqo.esm.js.map +1 -0
  257. package/dist/chunks/logDepthVertex-0P4Fk3ej.esm.js +77 -0
  258. package/dist/chunks/logDepthVertex-0P4Fk3ej.esm.js.map +1 -0
  259. package/dist/chunks/logDepthVertex-Bo4jbfP3.esm.min.js +2 -0
  260. package/dist/chunks/logDepthVertex-Bo4jbfP3.esm.min.js.map +1 -0
  261. package/dist/chunks/logDepthVertex-DhlJdt6n.esm.min.js +2 -0
  262. package/dist/chunks/logDepthVertex-DhlJdt6n.esm.min.js.map +1 -0
  263. package/dist/chunks/logDepthVertex-bCxA8jHH.esm.js +488 -0
  264. package/dist/chunks/logDepthVertex-bCxA8jHH.esm.js.map +1 -0
  265. package/dist/chunks/mainUVVaryingDeclaration-CkGDoJLo.esm.js +11 -0
  266. package/dist/chunks/mainUVVaryingDeclaration-CkGDoJLo.esm.js.map +1 -0
  267. package/dist/chunks/mainUVVaryingDeclaration-DAb0JqU5.esm.min.js +2 -0
  268. package/dist/chunks/mainUVVaryingDeclaration-DAb0JqU5.esm.min.js.map +1 -0
  269. package/dist/chunks/meshUboDeclaration-BEpwR1Md.esm.min.js +2 -0
  270. package/dist/chunks/meshUboDeclaration-BEpwR1Md.esm.min.js.map +1 -0
  271. package/dist/chunks/meshUboDeclaration-wwoFcdXg.esm.js +24 -0
  272. package/dist/chunks/meshUboDeclaration-wwoFcdXg.esm.js.map +1 -0
  273. package/dist/chunks/objFileLoader-9VII_MH6.esm.min.js +2 -0
  274. package/dist/chunks/objFileLoader-9VII_MH6.esm.min.js.map +1 -0
  275. package/dist/chunks/objFileLoader-sy2KqRzD.esm.js +1280 -0
  276. package/dist/chunks/objFileLoader-sy2KqRzD.esm.js.map +1 -0
  277. package/dist/chunks/oitFragment-BKhyL_Ma.esm.min.js +2 -0
  278. package/dist/chunks/oitFragment-BKhyL_Ma.esm.min.js.map +1 -0
  279. package/dist/chunks/oitFragment-BqtunGU7.esm.min.js +2 -0
  280. package/dist/chunks/oitFragment-BqtunGU7.esm.min.js.map +1 -0
  281. package/dist/chunks/oitFragment-CGo4SX0U.esm.js +1150 -0
  282. package/dist/chunks/oitFragment-CGo4SX0U.esm.js.map +1 -0
  283. package/dist/chunks/oitFragment-akBosjiV.esm.js +1210 -0
  284. package/dist/chunks/oitFragment-akBosjiV.esm.js.map +1 -0
  285. package/dist/chunks/pass.fragment-CMK3Cirh.esm.js +15 -0
  286. package/dist/chunks/pass.fragment-CMK3Cirh.esm.js.map +1 -0
  287. package/dist/chunks/pass.fragment-NgBFYMH2.esm.min.js +2 -0
  288. package/dist/chunks/pass.fragment-NgBFYMH2.esm.min.js.map +1 -0
  289. package/dist/chunks/pbr.fragment-BxeirEXF.esm.min.js +2 -0
  290. package/dist/chunks/pbr.fragment-BxeirEXF.esm.min.js.map +1 -0
  291. package/dist/chunks/pbr.fragment-C9P-kot0.esm.min.js +2 -0
  292. package/dist/chunks/pbr.fragment-C9P-kot0.esm.min.js.map +1 -0
  293. package/dist/chunks/pbr.fragment-CmciAvUf.esm.js +3219 -0
  294. package/dist/chunks/pbr.fragment-CmciAvUf.esm.js.map +1 -0
  295. package/dist/chunks/pbr.fragment-DptkOGvm.esm.js +3165 -0
  296. package/dist/chunks/pbr.fragment-DptkOGvm.esm.js.map +1 -0
  297. package/dist/chunks/pbr.vertex-BGYxmiED.esm.min.js +2 -0
  298. package/dist/chunks/pbr.vertex-BGYxmiED.esm.min.js.map +1 -0
  299. package/dist/chunks/pbr.vertex-BKYxq0u4.esm.min.js +2 -0
  300. package/dist/chunks/pbr.vertex-BKYxq0u4.esm.min.js.map +1 -0
  301. package/dist/chunks/pbr.vertex-BW_cBtTy.esm.js +210 -0
  302. package/dist/chunks/pbr.vertex-BW_cBtTy.esm.js.map +1 -0
  303. package/dist/chunks/pbr.vertex-D5_YtZ3F.esm.js +335 -0
  304. package/dist/chunks/pbr.vertex-D5_YtZ3F.esm.js.map +1 -0
  305. package/dist/chunks/postprocess.vertex-BIHPwYtc.esm.min.js +2 -0
  306. package/dist/chunks/postprocess.vertex-BIHPwYtc.esm.min.js.map +1 -0
  307. package/dist/chunks/postprocess.vertex-DQbuHlSL.esm.js +20 -0
  308. package/dist/chunks/postprocess.vertex-DQbuHlSL.esm.js.map +1 -0
  309. package/dist/chunks/rawTexture-BBFBylYg.esm.js +191 -0
  310. package/dist/chunks/rawTexture-BBFBylYg.esm.js.map +1 -0
  311. package/dist/chunks/rawTexture-DtTw1SfK.esm.min.js +2 -0
  312. package/dist/chunks/rawTexture-DtTw1SfK.esm.min.js.map +1 -0
  313. package/dist/chunks/rgbdDecode.fragment-B8vtIeR2.esm.min.js +2 -0
  314. package/dist/chunks/rgbdDecode.fragment-B8vtIeR2.esm.min.js.map +1 -0
  315. package/dist/chunks/rgbdDecode.fragment-BAERNvTB.esm.js +17 -0
  316. package/dist/chunks/rgbdDecode.fragment-BAERNvTB.esm.js.map +1 -0
  317. package/dist/chunks/rgbdDecode.fragment-CUCNLBNb.esm.js +17 -0
  318. package/dist/chunks/rgbdDecode.fragment-CUCNLBNb.esm.js.map +1 -0
  319. package/dist/chunks/rgbdDecode.fragment-DE974oq3.esm.min.js +2 -0
  320. package/dist/chunks/rgbdDecode.fragment-DE974oq3.esm.min.js.map +1 -0
  321. package/dist/chunks/rgbdEncode.fragment-12Ga6DPf.esm.min.js +2 -0
  322. package/dist/chunks/rgbdEncode.fragment-12Ga6DPf.esm.min.js.map +1 -0
  323. package/dist/chunks/rgbdEncode.fragment-C_8FK6je.esm.min.js +2 -0
  324. package/dist/chunks/rgbdEncode.fragment-C_8FK6je.esm.min.js.map +1 -0
  325. package/dist/chunks/rgbdEncode.fragment-DLGZ9Ew-.esm.js +17 -0
  326. package/dist/chunks/rgbdEncode.fragment-DLGZ9Ew-.esm.js.map +1 -0
  327. package/dist/chunks/rgbdEncode.fragment-vtqqWXMx.esm.js +17 -0
  328. package/dist/chunks/rgbdEncode.fragment-vtqqWXMx.esm.js.map +1 -0
  329. package/dist/chunks/splatFileLoader-BvGLmrOU.esm.js +3179 -0
  330. package/dist/chunks/splatFileLoader-BvGLmrOU.esm.js.map +1 -0
  331. package/dist/chunks/splatFileLoader-Du-_lAWj.esm.min.js +2 -0
  332. package/dist/chunks/splatFileLoader-Du-_lAWj.esm.min.js.map +1 -0
  333. package/dist/chunks/standardMaterial-CTqOZPWo.esm.min.js +2 -0
  334. package/dist/chunks/standardMaterial-CTqOZPWo.esm.min.js.map +1 -0
  335. package/dist/chunks/standardMaterial-Nso7Fcun.esm.js +1809 -0
  336. package/dist/chunks/standardMaterial-Nso7Fcun.esm.js.map +1 -0
  337. package/dist/chunks/stlFileLoader-C0UsVNIc.esm.js +237 -0
  338. package/dist/chunks/stlFileLoader-C0UsVNIc.esm.js.map +1 -0
  339. package/dist/chunks/stlFileLoader-Du9QZoAm.esm.min.js +2 -0
  340. package/dist/chunks/stlFileLoader-Du9QZoAm.esm.min.js.map +1 -0
  341. package/dist/chunks/tgaTextureLoader-BNBS-X4Q.esm.min.js +2 -0
  342. package/dist/chunks/tgaTextureLoader-BNBS-X4Q.esm.min.js.map +1 -0
  343. package/dist/chunks/tgaTextureLoader-D46YCUQ_.esm.js +349 -0
  344. package/dist/chunks/tgaTextureLoader-D46YCUQ_.esm.js.map +1 -0
  345. package/dist/chunks/thinInstanceMesh-DCh8MOoj.esm.min.js +2 -0
  346. package/dist/chunks/thinInstanceMesh-DCh8MOoj.esm.min.js.map +1 -0
  347. package/dist/chunks/thinInstanceMesh-DzFmk7SW.esm.js +314 -0
  348. package/dist/chunks/thinInstanceMesh-DzFmk7SW.esm.js.map +1 -0
  349. package/dist/chunks/vertexColorMixing-Bt0lYFpZ.esm.min.js +2 -0
  350. package/dist/chunks/vertexColorMixing-Bt0lYFpZ.esm.min.js.map +1 -0
  351. package/dist/chunks/vertexColorMixing-Ds7u6owR.esm.js +528 -0
  352. package/dist/chunks/vertexColorMixing-Ds7u6owR.esm.js.map +1 -0
  353. package/dist/chunks/webgpuEngine--HWPU_ZX.esm.js +11169 -0
  354. package/dist/chunks/webgpuEngine--HWPU_ZX.esm.js.map +1 -0
  355. package/dist/chunks/webgpuEngine-BwnxF0Zq.esm.min.js +2 -0
  356. package/dist/chunks/webgpuEngine-BwnxF0Zq.esm.min.js.map +1 -0
  357. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  358. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  359. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  360. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  361. package/lib/index.d.ts +281 -0
  362. package/lib/index.js +965 -0
  363. package/lib/index.js.map +1 -0
  364. package/package.json +17 -27
  365. package/readme.md +35 -21
  366. package/configuration/configuration.d.ts +0 -107
  367. package/configuration/configuration.js +0 -16
  368. package/configuration/configuration.js.map +0 -1
  369. package/configuration/configurationCompatibility.d.ts +0 -8
  370. package/configuration/configurationCompatibility.js +0 -66
  371. package/configuration/configurationCompatibility.js.map +0 -1
  372. package/configuration/configurationContainer.d.ts +0 -10
  373. package/configuration/configurationContainer.js +0 -10
  374. package/configuration/configurationContainer.js.map +0 -1
  375. package/configuration/globals.d.ts +0 -6
  376. package/configuration/globals.js +0 -18
  377. package/configuration/globals.js.map +0 -1
  378. package/configuration/index.d.ts +0 -2
  379. package/configuration/index.js +0 -4
  380. package/configuration/index.js.map +0 -1
  381. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  382. package/configuration/interfaces/cameraConfiguration.js +0 -2
  383. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  384. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  385. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  386. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  387. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  388. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  389. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  390. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  391. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  392. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  393. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  394. package/configuration/interfaces/groundConfiguration.js +0 -2
  395. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  396. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  397. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  398. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  399. package/configuration/interfaces/index.d.ts +0 -15
  400. package/configuration/interfaces/index.js +0 -16
  401. package/configuration/interfaces/index.js.map +0 -1
  402. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  403. package/configuration/interfaces/lightConfiguration.js +0 -2
  404. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  405. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  406. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  407. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  408. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  409. package/configuration/interfaces/modelConfiguration.js +0 -2
  410. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  411. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  412. package/configuration/interfaces/observersConfiguration.js +0 -2
  413. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  414. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  415. package/configuration/interfaces/sceneConfiguration.js +0 -2
  416. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  417. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  418. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  419. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  420. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  421. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  422. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  423. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  424. package/configuration/interfaces/templateConfiguration.js +0 -2
  425. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  426. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  427. package/configuration/interfaces/vrConfiguration.js +0 -2
  428. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  429. package/configuration/loader.d.ts +0 -4
  430. package/configuration/loader.js +0 -17
  431. package/configuration/loader.js.map +0 -1
  432. package/configuration/mappers.d.ts +0 -43
  433. package/configuration/mappers.js +0 -192
  434. package/configuration/mappers.js.map +0 -1
  435. package/configuration/renderOnlyLoader.d.ts +0 -33
  436. package/configuration/renderOnlyLoader.js +0 -162
  437. package/configuration/renderOnlyLoader.js.map +0 -1
  438. package/configuration/types/default.d.ts +0 -6
  439. package/configuration/types/default.js +0 -121
  440. package/configuration/types/default.js.map +0 -1
  441. package/configuration/types/environmentMap.d.ts +0 -5
  442. package/configuration/types/environmentMap.js +0 -14
  443. package/configuration/types/environmentMap.js.map +0 -1
  444. package/configuration/types/extended.d.ts +0 -6
  445. package/configuration/types/extended.js +0 -317
  446. package/configuration/types/extended.js.map +0 -1
  447. package/configuration/types/index.d.ts +0 -14
  448. package/configuration/types/index.js +0 -51
  449. package/configuration/types/index.js.map +0 -1
  450. package/configuration/types/minimal.d.ts +0 -6
  451. package/configuration/types/minimal.js +0 -43
  452. package/configuration/types/minimal.js.map +0 -1
  453. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  454. package/configuration/types/renderOnlyDefault.js +0 -31
  455. package/configuration/types/renderOnlyDefault.js.map +0 -1
  456. package/configuration/types/shadowLight.d.ts +0 -9
  457. package/configuration/types/shadowLight.js +0 -64
  458. package/configuration/types/shadowLight.js.map +0 -1
  459. package/helper/index.d.ts +0 -29
  460. package/helper/index.js +0 -66
  461. package/helper/index.js.map +0 -1
  462. package/index.d.ts +0 -30
  463. package/index.js +0 -46
  464. package/index.js.map +0 -1
  465. package/initializer.d.ts +0 -11
  466. package/initializer.js +0 -35
  467. package/initializer.js.map +0 -1
  468. package/interfaces.d.ts +0 -5
  469. package/interfaces.js +0 -7
  470. package/interfaces.js.map +0 -1
  471. package/labs/environmentSerializer.d.ts +0 -126
  472. package/labs/environmentSerializer.js +0 -191
  473. package/labs/environmentSerializer.js.map +0 -1
  474. package/labs/texture.d.ts +0 -183
  475. package/labs/texture.js +0 -350
  476. package/labs/texture.js.map +0 -1
  477. package/labs/viewerLabs.d.ts +0 -51
  478. package/labs/viewerLabs.js +0 -134
  479. package/labs/viewerLabs.js.map +0 -1
  480. package/loader/modelLoader.d.ts +0 -56
  481. package/loader/modelLoader.js +0 -199
  482. package/loader/modelLoader.js.map +0 -1
  483. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  484. package/loader/plugins/applyMaterialConfig.js +0 -16
  485. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  486. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  487. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  488. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  489. package/loader/plugins/index.d.ts +0 -19
  490. package/loader/plugins/index.js +0 -44
  491. package/loader/plugins/index.js.map +0 -1
  492. package/loader/plugins/loaderPlugin.d.ts +0 -24
  493. package/loader/plugins/loaderPlugin.js +0 -2
  494. package/loader/plugins/loaderPlugin.js.map +0 -1
  495. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  496. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  497. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  498. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  499. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  500. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  501. package/managers/observablesManager.d.ts +0 -66
  502. package/managers/observablesManager.js +0 -35
  503. package/managers/observablesManager.js.map +0 -1
  504. package/managers/sceneManager.d.ts +0 -245
  505. package/managers/sceneManager.js +0 -1375
  506. package/managers/sceneManager.js.map +0 -1
  507. package/managers/telemetryManager.d.ts +0 -78
  508. package/managers/telemetryManager.js +0 -117
  509. package/managers/telemetryManager.js.map +0 -1
  510. package/model/modelAnimation.d.ts +0 -215
  511. package/model/modelAnimation.js +0 -237
  512. package/model/modelAnimation.js.map +0 -1
  513. package/model/viewerModel.d.ts +0 -233
  514. package/model/viewerModel.js +0 -673
  515. package/model/viewerModel.js.map +0 -1
  516. package/optimizer/custom/extended.d.ts +0 -13
  517. package/optimizer/custom/extended.js +0 -101
  518. package/optimizer/custom/extended.js.map +0 -1
  519. package/optimizer/custom/index.d.ts +0 -9
  520. package/optimizer/custom/index.js +0 -26
  521. package/optimizer/custom/index.js.map +0 -1
  522. package/renderOnlyIndex.d.ts +0 -11
  523. package/renderOnlyIndex.js +0 -18
  524. package/renderOnlyIndex.js.map +0 -1
  525. package/templating/eventManager.d.ts +0 -35
  526. package/templating/eventManager.js +0 -66
  527. package/templating/eventManager.js.map +0 -1
  528. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  529. package/templating/plugins/hdButtonPlugin.js +0 -21
  530. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  531. package/templating/plugins/printButton.d.ts +0 -9
  532. package/templating/plugins/printButton.js +0 -40
  533. package/templating/plugins/printButton.js.map +0 -1
  534. package/templating/templateManager.d.ts +0 -197
  535. package/templating/templateManager.js +0 -561
  536. package/templating/templateManager.js.map +0 -1
  537. package/templating/viewerTemplatePlugin.d.ts +0 -21
  538. package/templating/viewerTemplatePlugin.js +0 -69
  539. package/templating/viewerTemplatePlugin.js.map +0 -1
  540. package/viewer/defaultViewer.d.ts +0 -130
  541. package/viewer/defaultViewer.js +0 -675
  542. package/viewer/defaultViewer.js.map +0 -1
  543. package/viewer/renderOnlyViewer.d.ts +0 -9
  544. package/viewer/renderOnlyViewer.js +0 -46
  545. package/viewer/renderOnlyViewer.js.map +0 -1
  546. package/viewer/viewer.d.ts +0 -258
  547. package/viewer/viewer.js +0 -783
  548. package/viewer/viewer.js.map +0 -1
  549. package/viewer/viewerManager.d.ts +0 -58
  550. package/viewer/viewerManager.js +0 -91
  551. package/viewer/viewerManager.js.map +0 -1
  552. package/viewer/viewerWithTemplate.d.ts +0 -9
  553. package/viewer/viewerWithTemplate.js +0 -20
  554. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ export { bl as HTML3DElement, bk as Viewer, bn as createViewerForCanvas, bm as getDefaultEngine } from './chunks/index-H9RbNFln.esm.js';
2
+ //# sourceMappingURL=babylon-viewer.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babylon-viewer.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export{bl as HTML3DElement,bk as Viewer,bn as createViewerForCanvas,bm as getDefaultEngine}from"./chunks/index-NKQY07Ai.esm.min.js";
2
+ //# sourceMappingURL=babylon-viewer.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babylon-viewer.esm.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{aF as e,C as t,$ as n,a4 as s,a1 as a,aG as r,m as i,aH as o,aI as l}from"./index-NKQY07Ai.esm.min.js";import{_ as h}from"./environmentTextureTools-2JiPh6sF.esm.min.js";import{GLTFLoader as c,ArrayItem as m}from"./glTFLoader-CX847JwZ.esm.min.js";import"./rawTexture-DtTw1SfK.esm.min.js";import"./assetContainer-BWyT-iC8.esm.min.js";import"./glTFLoaderAnimation-YVA5W-1q.esm.min.js";class d extends e{constructor(e,n,s,a=t.TEXTUREFORMAT_RGBA,r=t.TEXTURETYPE_UNSIGNED_INT,i=!1,o=!1,l=t.TEXTURE_TRILINEAR_SAMPLINGMODE,h=null){super("",e),this._texture=e.getEngine().createRawCubeTexture(n,s,a,r,i,o,l,h)}update(e,t,n,s,a=null){this._texture.getEngine().updateRawCubeTexture(this._texture,e,t,n,s,a)}updateRGBDAsync(e,t=null,n=.8,s=0){return h(this._texture,e,t,n,s).then((()=>{}))}clone(){return n.Clone((()=>{const e=this.getScene(),t=this._texture,n=new d(e,t._bufferViewArray,t.width,t.format,t.type,t.generateMipMaps,t.invertY,t.samplingMode,t._compression);return 13===t.source&&n.updateRGBDAsync(t._bufferViewArrayArray,t._sphericalPolynomial,t._lodGenerationScale,t._lodGenerationOffset),n}),this)}}const u="EXT_lights_image_based";class g{constructor(e){this.name=u,this._loader=e,this.enabled=this._loader.isExtensionUsed(u)}dispose(){this._loader=null,delete this._lights}onLoading(){const e=this._loader.gltf.extensions;if(e&&e[this.name]){const t=e[this.name];this._lights=t.lights}}loadSceneAsync(e,t){return c.LoadExtensionAsync(e,t,this.name,((n,s)=>{this._loader._allMaterialsDirtyRequired=!0;const a=new Array;a.push(this._loader.loadSceneAsync(e,t)),this._loader.logOpen(`${n}`);const r=m.Get(`${n}/light`,this._lights,s.light);return a.push(this._loadLightAsync(`/extensions/${this.name}/lights/${s.light}`,r).then((e=>{this._loader.babylonScene.environmentTexture=e}))),this._loader.logClose(),Promise.all(a).then((()=>{}))}))}_loadLightAsync(e,t){if(!t._loaded){const n=new Array;this._loader.logOpen(`${e}`);const o=new Array(t.specularImages.length);for(let s=0;s<t.specularImages.length;s++){const a=t.specularImages[s];o[s]=new Array(a.length);for(let t=0;t<a.length;t++){const r=`${e}/specularImages/${s}/${t}`;this._loader.logOpen(`${r}`);const i=a[t],l=m.Get(r,this._loader.gltf.images,i);n.push(this._loader.loadImageAsync(`/images/${i}`,l).then((e=>{o[s][t]=e}))),this._loader.logClose()}}this._loader.logClose(),t._loaded=Promise.all(n).then((()=>{const n=new d(this._loader.babylonScene,null,t.specularImageSize);if(n.name=t.name||"environment",t._babylonTexture=n,null!=t.intensity&&(n.level=t.intensity),t.rotation){let e=s.FromArray(t.rotation);this._loader.babylonScene.useRightHandedSystem||(e=s.Inverse(e)),a.FromQuaternionToRef(e,n.getReflectionTextureMatrix())}if(!t.irradianceCoefficients)throw new Error(`${e}: Irradiance coefficients are missing`);const l=r.FromArray(t.irradianceCoefficients);l.scaleInPlace(t.intensity),l.convertIrradianceToLambertianRadiance();const h=i.FromHarmonics(l),c=(o.length-1)/Math.log2(t.specularImageSize);return n.updateRGBDAsync(o,h,c)}))}return t._loaded.then((()=>t._babylonTexture))}}o(u),l(u,!0,(e=>new g(e)));export{g as EXT_lights_image_based};
2
+ //# sourceMappingURL=EXT_lights_image_based-BAAAren3.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EXT_lights_image_based-BAAAren3.esm.min.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawCubeTexture.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_lights_image_based.js"],"sourcesContent":["import { SerializationHelper } from \"../../Misc/decorators.serialization\";\nimport { _UpdateRGBDAsync as UpdateRGBDAsyncEnvTools } from \"../../Misc/environmentTextureTools\";\nimport { CubeTexture } from \"./cubeTexture\";\nimport { Constants } from \"../../Engines/constants\";\n/**\n * Raw cube texture where the raw buffers are passed in\n */\nexport class RawCubeTexture extends CubeTexture {\n /**\n * Creates a cube texture where the raw buffers are passed in.\n * @param scene defines the scene the texture is attached to\n * @param data defines the array of data to use to create each face\n * @param size defines the size of the textures\n * @param format defines the format of the data\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\n * @param generateMipMaps defines if the engine should generate the mip levels\n * @param invertY defines if data must be stored with Y axis inverted\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\n * @param compression defines the compression used (null by default)\n */\n constructor(scene, data, size, format = Constants.TEXTUREFORMAT_RGBA, type = Constants.TEXTURETYPE_UNSIGNED_INT, generateMipMaps = false, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, compression = null) {\n super(\"\", scene);\n this._texture = scene.getEngine().createRawCubeTexture(data, size, format, type, generateMipMaps, invertY, samplingMode, compression);\n }\n /**\n * Updates the raw cube texture.\n * @param data defines the data to store\n * @param format defines the data format\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\n * @param invertY defines if data must be stored with Y axis inverted\n * @param compression defines the compression used (null by default)\n */\n update(data, format, type, invertY, compression = null) {\n this._texture.getEngine().updateRawCubeTexture(this._texture, data, format, type, invertY, compression);\n }\n /**\n * Updates a raw cube texture with RGBD encoded data.\n * @param data defines the array of data [mipmap][face] to use to create each face\n * @param sphericalPolynomial defines the spherical polynomial for irradiance\n * @param lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness\n * @param lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness\n * @returns a promise that resolves when the operation is complete\n */\n updateRGBDAsync(data, sphericalPolynomial = null, lodScale = 0.8, lodOffset = 0) {\n return UpdateRGBDAsyncEnvTools(this._texture, data, sphericalPolynomial, lodScale, lodOffset).then(() => { });\n }\n /**\n * Clones the raw cube texture.\n * @returns a new cube texture\n */\n clone() {\n return SerializationHelper.Clone(() => {\n const scene = this.getScene();\n const internalTexture = this._texture;\n const texture = new RawCubeTexture(scene, internalTexture._bufferViewArray, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);\n if (internalTexture.source === 13 /* InternalTextureSource.CubeRawRGBD */) {\n texture.updateRGBDAsync(internalTexture._bufferViewArrayArray, internalTexture._sphericalPolynomial, internalTexture._lodGenerationScale, internalTexture._lodGenerationOffset);\n }\n return texture;\n }, this);\n }\n}\n//# sourceMappingURL=rawCubeTexture.js.map","import { SphericalHarmonics, SphericalPolynomial } from \"core/Maths/sphericalPolynomial\";\nimport { Quaternion, Matrix } from \"core/Maths/math.vector\";\nimport { RawCubeTexture } from \"core/Materials/Textures/rawCubeTexture\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"EXT_lights_image_based\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_lights_image_based/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_lights_image_based {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n delete this._lights;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._lights = extension.lights;\n }\n }\n /**\n * @internal\n */\n loadSceneAsync(context, scene) {\n return GLTFLoader.LoadExtensionAsync(context, scene, this.name, (extensionContext, extension) => {\n this._loader._allMaterialsDirtyRequired = true;\n const promises = new Array();\n promises.push(this._loader.loadSceneAsync(context, scene));\n this._loader.logOpen(`${extensionContext}`);\n const light = ArrayItem.Get(`${extensionContext}/light`, this._lights, extension.light);\n promises.push(this._loadLightAsync(`/extensions/${this.name}/lights/${extension.light}`, light).then((texture) => {\n this._loader.babylonScene.environmentTexture = texture;\n }));\n this._loader.logClose();\n return Promise.all(promises).then(() => { });\n });\n }\n _loadLightAsync(context, light) {\n if (!light._loaded) {\n const promises = new Array();\n this._loader.logOpen(`${context}`);\n const imageData = new Array(light.specularImages.length);\n for (let mipmap = 0; mipmap < light.specularImages.length; mipmap++) {\n const faces = light.specularImages[mipmap];\n imageData[mipmap] = new Array(faces.length);\n for (let face = 0; face < faces.length; face++) {\n const specularImageContext = `${context}/specularImages/${mipmap}/${face}`;\n this._loader.logOpen(`${specularImageContext}`);\n const index = faces[face];\n const image = ArrayItem.Get(specularImageContext, this._loader.gltf.images, index);\n promises.push(this._loader.loadImageAsync(`/images/${index}`, image).then((data) => {\n imageData[mipmap][face] = data;\n }));\n this._loader.logClose();\n }\n }\n this._loader.logClose();\n light._loaded = Promise.all(promises).then(() => {\n const babylonTexture = new RawCubeTexture(this._loader.babylonScene, null, light.specularImageSize);\n babylonTexture.name = light.name || \"environment\";\n light._babylonTexture = babylonTexture;\n if (light.intensity != undefined) {\n babylonTexture.level = light.intensity;\n }\n if (light.rotation) {\n let rotation = Quaternion.FromArray(light.rotation);\n // Invert the rotation so that positive rotation is counter-clockwise.\n if (!this._loader.babylonScene.useRightHandedSystem) {\n rotation = Quaternion.Inverse(rotation);\n }\n Matrix.FromQuaternionToRef(rotation, babylonTexture.getReflectionTextureMatrix());\n }\n if (!light.irradianceCoefficients) {\n throw new Error(`${context}: Irradiance coefficients are missing`);\n }\n const sphericalHarmonics = SphericalHarmonics.FromArray(light.irradianceCoefficients);\n sphericalHarmonics.scaleInPlace(light.intensity);\n sphericalHarmonics.convertIrradianceToLambertianRadiance();\n const sphericalPolynomial = SphericalPolynomial.FromHarmonics(sphericalHarmonics);\n // Compute the lod generation scale to fit exactly to the number of levels available.\n const lodGenerationScale = (imageData.length - 1) / Math.log2(light.specularImageSize);\n return babylonTexture.updateRGBDAsync(imageData, sphericalPolynomial, lodGenerationScale);\n });\n }\n return light._loaded.then(() => {\n return light._babylonTexture;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_lights_image_based(loader));\n//# sourceMappingURL=EXT_lights_image_based.js.map"],"names":["RawCubeTexture","CubeTexture","constructor","scene","data","size","format","Constants","TEXTUREFORMAT_RGBA","type","TEXTURETYPE_UNSIGNED_INT","generateMipMaps","invertY","samplingMode","TEXTURE_TRILINEAR_SAMPLINGMODE","compression","super","this","_texture","getEngine","createRawCubeTexture","update","updateRawCubeTexture","updateRGBDAsync","sphericalPolynomial","lodScale","lodOffset","UpdateRGBDAsyncEnvTools","then","clone","SerializationHelper","Clone","getScene","internalTexture","texture","_bufferViewArray","width","_compression","source","_bufferViewArrayArray","_sphericalPolynomial","_lodGenerationScale","_lodGenerationOffset","NAME","EXT_lights_image_based","loader","name","_loader","enabled","isExtensionUsed","dispose","_lights","onLoading","extensions","gltf","extension","lights","loadSceneAsync","context","GLTFLoader","LoadExtensionAsync","extensionContext","_allMaterialsDirtyRequired","promises","Array","push","logOpen","light","ArrayItem","Get","_loadLightAsync","babylonScene","environmentTexture","logClose","Promise","all","_loaded","imageData","specularImages","length","mipmap","faces","face","specularImageContext","index","image","images","loadImageAsync","babylonTexture","specularImageSize","_babylonTexture","undefined","intensity","level","rotation","Quaternion","FromArray","useRightHandedSystem","Inverse","Matrix","FromQuaternionToRef","getReflectionTextureMatrix","irradianceCoefficients","Error","sphericalHarmonics","SphericalHarmonics","scaleInPlace","convertIrradianceToLambertianRadiance","SphericalPolynomial","FromHarmonics","lodGenerationScale","Math","log2","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"qYAOO,MAAMA,UAAuBC,EAahC,WAAAC,CAAYC,EAAOC,EAAMC,EAAMC,EAASC,EAAUC,mBAAoBC,EAAOF,EAAUG,yBAA0BC,GAAkB,EAAOC,GAAU,EAAOC,EAAeN,EAAUO,+BAAgCC,EAAc,MAC9NC,MAAM,GAAIb,GACVc,KAAKC,SAAWf,EAAMgB,YAAYC,qBAAqBhB,EAAMC,EAAMC,EAAQG,EAAME,EAAiBC,EAASC,EAAcE,EAC5H,CASD,MAAAM,CAAOjB,EAAME,EAAQG,EAAMG,EAASG,EAAc,MAC9CE,KAAKC,SAASC,YAAYG,qBAAqBL,KAAKC,SAAUd,EAAME,EAAQG,EAAMG,EAASG,EAC9F,CASD,eAAAQ,CAAgBnB,EAAMoB,EAAsB,KAAMC,EAAW,GAAKC,EAAY,GAC1E,OAAOC,EAAwBV,KAAKC,SAAUd,EAAMoB,EAAqBC,EAAUC,GAAWE,MAAK,QACtG,CAKD,KAAAC,GACI,OAAOC,EAAoBC,OAAM,KAC7B,MAAM5B,EAAQc,KAAKe,WACbC,EAAkBhB,KAAKC,SACvBgB,EAAU,IAAIlC,EAAeG,EAAO8B,EAAgBE,iBAAkBF,EAAgBG,MAAOH,EAAgB3B,OAAQ2B,EAAgBxB,KAAMwB,EAAgBtB,gBAAiBsB,EAAgBrB,QAASqB,EAAgBpB,aAAcoB,EAAgBI,cAIzP,OAH+B,KAA3BJ,EAAgBK,QAChBJ,EAAQX,gBAAgBU,EAAgBM,sBAAuBN,EAAgBO,qBAAsBP,EAAgBQ,oBAAqBR,EAAgBS,sBAEvJR,CAAO,GACfjB,KACN,ECvDL,MAAM0B,EAAO,yBAKN,MAAMC,EAIT,WAAA1C,CAAY2C,GAIR5B,KAAK6B,KAAOH,EACZ1B,KAAK8B,QAAUF,EACf5B,K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
@@ -0,0 +1,170 @@
1
+ import { aF as CubeTexture, C as Constants, $ as SerializationHelper, a4 as Quaternion, a1 as Matrix, aG as SphericalHarmonics, m as SphericalPolynomial, aH as unregisterGLTFExtension, aI as registerGLTFExtension } from './index-H9RbNFln.esm.js';
2
+ import { _ as _UpdateRGBDAsync } from './environmentTextureTools-CaOOVUg4.esm.js';
3
+ import { GLTFLoader, ArrayItem } from './glTFLoader-FnbdTR40.esm.js';
4
+ import './rawTexture-BBFBylYg.esm.js';
5
+ import './assetContainer-C9nOA325.esm.js';
6
+ import './glTFLoaderAnimation-DLprnT2e.esm.js';
7
+
8
+ /**
9
+ * Raw cube texture where the raw buffers are passed in
10
+ */
11
+ class RawCubeTexture extends CubeTexture {
12
+ /**
13
+ * Creates a cube texture where the raw buffers are passed in.
14
+ * @param scene defines the scene the texture is attached to
15
+ * @param data defines the array of data to use to create each face
16
+ * @param size defines the size of the textures
17
+ * @param format defines the format of the data
18
+ * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)
19
+ * @param generateMipMaps defines if the engine should generate the mip levels
20
+ * @param invertY defines if data must be stored with Y axis inverted
21
+ * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
22
+ * @param compression defines the compression used (null by default)
23
+ */
24
+ constructor(scene, data, size, format = Constants.TEXTUREFORMAT_RGBA, type = Constants.TEXTURETYPE_UNSIGNED_INT, generateMipMaps = false, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, compression = null) {
25
+ super("", scene);
26
+ this._texture = scene.getEngine().createRawCubeTexture(data, size, format, type, generateMipMaps, invertY, samplingMode, compression);
27
+ }
28
+ /**
29
+ * Updates the raw cube texture.
30
+ * @param data defines the data to store
31
+ * @param format defines the data format
32
+ * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
33
+ * @param invertY defines if data must be stored with Y axis inverted
34
+ * @param compression defines the compression used (null by default)
35
+ */
36
+ update(data, format, type, invertY, compression = null) {
37
+ this._texture.getEngine().updateRawCubeTexture(this._texture, data, format, type, invertY, compression);
38
+ }
39
+ /**
40
+ * Updates a raw cube texture with RGBD encoded data.
41
+ * @param data defines the array of data [mipmap][face] to use to create each face
42
+ * @param sphericalPolynomial defines the spherical polynomial for irradiance
43
+ * @param lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness
44
+ * @param lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness
45
+ * @returns a promise that resolves when the operation is complete
46
+ */
47
+ updateRGBDAsync(data, sphericalPolynomial = null, lodScale = 0.8, lodOffset = 0) {
48
+ return _UpdateRGBDAsync(this._texture, data, sphericalPolynomial, lodScale, lodOffset).then(() => { });
49
+ }
50
+ /**
51
+ * Clones the raw cube texture.
52
+ * @returns a new cube texture
53
+ */
54
+ clone() {
55
+ return SerializationHelper.Clone(() => {
56
+ const scene = this.getScene();
57
+ const internalTexture = this._texture;
58
+ const texture = new RawCubeTexture(scene, internalTexture._bufferViewArray, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);
59
+ if (internalTexture.source === 13 /* InternalTextureSource.CubeRawRGBD */) {
60
+ texture.updateRGBDAsync(internalTexture._bufferViewArrayArray, internalTexture._sphericalPolynomial, internalTexture._lodGenerationScale, internalTexture._lodGenerationOffset);
61
+ }
62
+ return texture;
63
+ }, this);
64
+ }
65
+ }
66
+
67
+ const NAME = "EXT_lights_image_based";
68
+ /**
69
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_lights_image_based/README.md)
70
+ */
71
+ // eslint-disable-next-line @typescript-eslint/naming-convention
72
+ class EXT_lights_image_based {
73
+ /**
74
+ * @internal
75
+ */
76
+ constructor(loader) {
77
+ /**
78
+ * The name of this extension.
79
+ */
80
+ this.name = NAME;
81
+ this._loader = loader;
82
+ this.enabled = this._loader.isExtensionUsed(NAME);
83
+ }
84
+ /** @internal */
85
+ dispose() {
86
+ this._loader = null;
87
+ delete this._lights;
88
+ }
89
+ /** @internal */
90
+ onLoading() {
91
+ const extensions = this._loader.gltf.extensions;
92
+ if (extensions && extensions[this.name]) {
93
+ const extension = extensions[this.name];
94
+ this._lights = extension.lights;
95
+ }
96
+ }
97
+ /**
98
+ * @internal
99
+ */
100
+ loadSceneAsync(context, scene) {
101
+ return GLTFLoader.LoadExtensionAsync(context, scene, this.name, (extensionContext, extension) => {
102
+ this._loader._allMaterialsDirtyRequired = true;
103
+ const promises = new Array();
104
+ promises.push(this._loader.loadSceneAsync(context, scene));
105
+ this._loader.logOpen(`${extensionContext}`);
106
+ const light = ArrayItem.Get(`${extensionContext}/light`, this._lights, extension.light);
107
+ promises.push(this._loadLightAsync(`/extensions/${this.name}/lights/${extension.light}`, light).then((texture) => {
108
+ this._loader.babylonScene.environmentTexture = texture;
109
+ }));
110
+ this._loader.logClose();
111
+ return Promise.all(promises).then(() => { });
112
+ });
113
+ }
114
+ _loadLightAsync(context, light) {
115
+ if (!light._loaded) {
116
+ const promises = new Array();
117
+ this._loader.logOpen(`${context}`);
118
+ const imageData = new Array(light.specularImages.length);
119
+ for (let mipmap = 0; mipmap < light.specularImages.length; mipmap++) {
120
+ const faces = light.specularImages[mipmap];
121
+ imageData[mipmap] = new Array(faces.length);
122
+ for (let face = 0; face < faces.length; face++) {
123
+ const specularImageContext = `${context}/specularImages/${mipmap}/${face}`;
124
+ this._loader.logOpen(`${specularImageContext}`);
125
+ const index = faces[face];
126
+ const image = ArrayItem.Get(specularImageContext, this._loader.gltf.images, index);
127
+ promises.push(this._loader.loadImageAsync(`/images/${index}`, image).then((data) => {
128
+ imageData[mipmap][face] = data;
129
+ }));
130
+ this._loader.logClose();
131
+ }
132
+ }
133
+ this._loader.logClose();
134
+ light._loaded = Promise.all(promises).then(() => {
135
+ const babylonTexture = new RawCubeTexture(this._loader.babylonScene, null, light.specularImageSize);
136
+ babylonTexture.name = light.name || "environment";
137
+ light._babylonTexture = babylonTexture;
138
+ if (light.intensity != undefined) {
139
+ babylonTexture.level = light.intensity;
140
+ }
141
+ if (light.rotation) {
142
+ let rotation = Quaternion.FromArray(light.rotation);
143
+ // Invert the rotation so that positive rotation is counter-clockwise.
144
+ if (!this._loader.babylonScene.useRightHandedSystem) {
145
+ rotation = Quaternion.Inverse(rotation);
146
+ }
147
+ Matrix.FromQuaternionToRef(rotation, babylonTexture.getReflectionTextureMatrix());
148
+ }
149
+ if (!light.irradianceCoefficients) {
150
+ throw new Error(`${context}: Irradiance coefficients are missing`);
151
+ }
152
+ const sphericalHarmonics = SphericalHarmonics.FromArray(light.irradianceCoefficients);
153
+ sphericalHarmonics.scaleInPlace(light.intensity);
154
+ sphericalHarmonics.convertIrradianceToLambertianRadiance();
155
+ const sphericalPolynomial = SphericalPolynomial.FromHarmonics(sphericalHarmonics);
156
+ // Compute the lod generation scale to fit exactly to the number of levels available.
157
+ const lodGenerationScale = (imageData.length - 1) / Math.log2(light.specularImageSize);
158
+ return babylonTexture.updateRGBDAsync(imageData, sphericalPolynomial, lodGenerationScale);
159
+ });
160
+ }
161
+ return light._loaded.then(() => {
162
+ return light._babylonTexture;
163
+ });
164
+ }
165
+ }
166
+ unregisterGLTFExtension(NAME);
167
+ registerGLTFExtension(NAME, true, (loader) => new EXT_lights_image_based(loader));
168
+
169
+ export { EXT_lights_image_based };
170
+ //# sourceMappingURL=EXT_lights_image_based-CLRxjLYR.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EXT_lights_image_based-CLRxjLYR.esm.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawCubeTexture.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_lights_image_based.js"],"sourcesContent":["import { SerializationHelper } from \"../../Misc/decorators.serialization\";\nimport { _UpdateRGBDAsync as UpdateRGBDAsyncEnvTools } from \"../../Misc/environmentTextureTools\";\nimport { CubeTexture } from \"./cubeTexture\";\nimport { Constants } from \"../../Engines/constants\";\n/**\n * Raw cube texture where the raw buffers are passed in\n */\nexport class RawCubeTexture extends CubeTexture {\n /**\n * Creates a cube texture where the raw buffers are passed in.\n * @param scene defines the scene the texture is attached to\n * @param data defines the array of data to use to create each face\n * @param size defines the size of the textures\n * @param format defines the format of the data\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)\n * @param generateMipMaps defines if the engine should generate the mip levels\n * @param invertY defines if data must be stored with Y axis inverted\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\n * @param compression defines the compression used (null by default)\n */\n constructor(scene, data, size, format = Constants.TEXTUREFORMAT_RGBA, type = Constants.TEXTURETYPE_UNSIGNED_INT, generateMipMaps = false, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, compression = null) {\n super(\"\", scene);\n this._texture = scene.getEngine().createRawCubeTexture(data, size, format, type, generateMipMaps, invertY, samplingMode, compression);\n }\n /**\n * Updates the raw cube texture.\n * @param data defines the data to store\n * @param format defines the data format\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)\n * @param invertY defines if data must be stored with Y axis inverted\n * @param compression defines the compression used (null by default)\n */\n update(data, format, type, invertY, compression = null) {\n this._texture.getEngine().updateRawCubeTexture(this._texture, data, format, type, invertY, compression);\n }\n /**\n * Updates a raw cube texture with RGBD encoded data.\n * @param data defines the array of data [mipmap][face] to use to create each face\n * @param sphericalPolynomial defines the spherical polynomial for irradiance\n * @param lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness\n * @param lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness\n * @returns a promise that resolves when the operation is complete\n */\n updateRGBDAsync(data, sphericalPolynomial = null, lodScale = 0.8, lodOffset = 0) {\n return UpdateRGBDAsyncEnvTools(this._texture, data, sphericalPolynomial, lodScale, lodOffset).then(() => { });\n }\n /**\n * Clones the raw cube texture.\n * @returns a new cube texture\n */\n clone() {\n return SerializationHelper.Clone(() => {\n const scene = this.getScene();\n const internalTexture = this._texture;\n const texture = new RawCubeTexture(scene, internalTexture._bufferViewArray, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);\n if (internalTexture.source === 13 /* InternalTextureSource.CubeRawRGBD */) {\n texture.updateRGBDAsync(internalTexture._bufferViewArrayArray, internalTexture._sphericalPolynomial, internalTexture._lodGenerationScale, internalTexture._lodGenerationOffset);\n }\n return texture;\n }, this);\n }\n}\n//# sourceMappingURL=rawCubeTexture.js.map","import { SphericalHarmonics, SphericalPolynomial } from \"core/Maths/sphericalPolynomial\";\nimport { Quaternion, Matrix } from \"core/Maths/math.vector\";\nimport { RawCubeTexture } from \"core/Materials/Textures/rawCubeTexture\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"EXT_lights_image_based\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_lights_image_based/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_lights_image_based {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n delete this._lights;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._lights = extension.lights;\n }\n }\n /**\n * @internal\n */\n loadSceneAsync(context, scene) {\n return GLTFLoader.LoadExtensionAsync(context, scene, this.name, (extensionContext, extension) => {\n this._loader._allMaterialsDirtyRequired = true;\n const promises = new Array();\n promises.push(this._loader.loadSceneAsync(context, scene));\n this._loader.logOpen(`${extensionContext}`);\n const light = ArrayItem.Get(`${extensionContext}/light`, this._lights, extension.light);\n promises.push(this._loadLightAsync(`/extensions/${this.name}/lights/${extension.light}`, light).then((texture) => {\n this._loader.babylonScene.environmentTexture = texture;\n }));\n this._loader.logClose();\n return Promise.all(promises).then(() => { });\n });\n }\n _loadLightAsync(context, light) {\n if (!light._loaded) {\n const promises = new Array();\n this._loader.logOpen(`${context}`);\n const imageData = new Array(light.specularImages.length);\n for (let mipmap = 0; mipmap < light.specularImages.length; mipmap++) {\n const faces = light.specularImages[mipmap];\n imageData[mipmap] = new Array(faces.length);\n for (let face = 0; face < faces.length; face++) {\n const specularImageContext = `${context}/specularImages/${mipmap}/${face}`;\n this._loader.logOpen(`${specularImageContext}`);\n const index = faces[face];\n const image = ArrayItem.Get(specularImageContext, this._loader.gltf.images, index);\n promises.push(this._loader.loadImageAsync(`/images/${index}`, image).then((data) => {\n imageData[mipmap][face] = data;\n }));\n this._loader.logClose();\n }\n }\n this._loader.logClose();\n light._loaded = Promise.all(promises).then(() => {\n const babylonTexture = new RawCubeTexture(this._loader.babylonScene, null, light.specularImageSize);\n babylonTexture.name = light.name || \"environment\";\n light._babylonTexture = babylonTexture;\n if (light.intensity != undefined) {\n babylonTexture.level = light.intensity;\n }\n if (light.rotation) {\n let rotation = Quaternion.FromArray(light.rotation);\n // Invert the rotation so that positive rotation is counter-clockwise.\n if (!this._loader.babylonScene.useRightHandedSystem) {\n rotation = Quaternion.Inverse(rotation);\n }\n Matrix.FromQuaternionToRef(rotation, babylonTexture.getReflectionTextureMatrix());\n }\n if (!light.irradianceCoefficients) {\n throw new Error(`${context}: Irradiance coefficients are missing`);\n }\n const sphericalHarmonics = SphericalHarmonics.FromArray(light.irradianceCoefficients);\n sphericalHarmonics.scaleInPlace(light.intensity);\n sphericalHarmonics.convertIrradianceToLambertianRadiance();\n const sphericalPolynomial = SphericalPolynomial.FromHarmonics(sphericalHarmonics);\n // Compute the lod generation scale to fit exactly to the number of levels available.\n const lodGenerationScale = (imageData.length - 1) / Math.log2(light.specularImageSize);\n return babylonTexture.updateRGBDAsync(imageData, sphericalPolynomial, lodGenerationScale);\n });\n }\n return light._loaded.then(() => {\n return light._babylonTexture;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_lights_image_based(loader));\n//# sourceMappingURL=EXT_lights_image_based.js.map"],"names":["UpdateRGBDAsyncEnvTools"],"mappings":";;;;;;;AAIA;AACA;AACA;AACO,MAAM,cAAc,SAAS,WAAW,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,kBAAkB,EAAE,IAAI,GAAG,SAAS,CAAC,wBAAwB,EAAE,eAAe,GAAG,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,YAAY,GAAG,SAAS,CAAC,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAAE;AAC5O,QAAQ,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACzB,QAAQ,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;AAC9I,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,EAAE;AAC5D,QAAQ,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AAChH,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,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,QAAQ,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM;AACxC,YAAY,OAAO,KAAK,CAAC,eAAe,CAAC;AACzC,SAAS,CAAC,CAAC;AACX,KAAK;AACL,CAAC;AACD,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ import{a3 as e,u as s,a4 as o,a1 as t,aH as r,aI as n}from"./index-NKQY07Ai.esm.min.js";import{GLTFLoader as a,ArrayItem as i}from"./glTFLoader-CX847JwZ.esm.min.js";import"./thinInstanceMesh-DCh8MOoj.esm.min.js";import"./rawTexture-DtTw1SfK.esm.min.js";import"./assetContainer-BWyT-iC8.esm.min.js";import"./glTFLoaderAnimation-YVA5W-1q.esm.min.js";const c="EXT_mesh_gpu_instancing";class l{constructor(e){this.name=c,this._loader=e,this.enabled=this._loader.isExtensionUsed(c)}dispose(){this._loader=null}loadNodeAsync(r,n,c){return a.LoadExtensionAsync(r,n,this.name,((r,a)=>{this._loader._disableInstancedMesh++;const l=this._loader.loadNodeAsync(`/nodes/${n.index}`,n,c);if(this._loader._disableInstancedMesh--,!n._primitiveBabylonMeshes)return l;const m=new Array;let d=0;const u=e=>{if(null==a.attributes[e])return void m.push(Promise.resolve(null));const s=i.Get(`${r}/attributes/${e}`,this._loader.gltf.accessors,a.attributes[e]);if(m.push(this._loader._loadFloatAccessorAsync(`/accessors/${s.bufferView}`,s)),0===d)d=s.count;else if(d!==s.count)throw new Error(`${r}/attributes: Instance buffer accessors do not have the same count.`)};return u("TRANSLATION"),u("ROTATION"),u("SCALE"),l.then((r=>Promise.all(m).then((([a,i,c])=>{const l=new Float32Array(16*d);e.Vector3[0].copyFromFloats(0,0,0),e.Quaternion[0].copyFromFloats(0,0,0,1),e.Vector3[1].copyFromFloats(1,1,1);for(let r=0;r<d;++r)a&&s.FromArrayToRef(a,3*r,e.Vector3[0]),i&&o.FromArrayToRef(i,4*r,e.Quaternion[0]),c&&s.FromArrayToRef(c,3*r,e.Vector3[1]),t.ComposeToRef(e.Vector3[1],e.Quaternion[0],e.Vector3[0],e.Matrix[0]),e.Matrix[0].copyToArray(l,16*r);for(const e of n._primitiveBabylonMeshes)e.thinInstanceSetBuffer("matrix",l,16,!0);return r}))))}))}}r(c),n(c,!0,(e=>new l(e)));export{l as EXT_mesh_gpu_instancing};
2
+ //# sourceMappingURL=EXT_mesh_gpu_instancing-g_z4hICR.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EXT_mesh_gpu_instancing-g_z4hICR.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js"],"sourcesContent":["import { Vector3, Quaternion, Matrix, TmpVectors } from \"core/Maths/math.vector\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nimport \"core/Meshes/thinInstanceMesh\";\nconst NAME = \"EXT_mesh_gpu_instancing\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md)\n * [Playground Sample](https://playground.babylonjs.com/#QFIGLW#9)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_mesh_gpu_instancing {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n this._loader._disableInstancedMesh++;\n const promise = this._loader.loadNodeAsync(`/nodes/${node.index}`, node, assign);\n this._loader._disableInstancedMesh--;\n if (!node._primitiveBabylonMeshes) {\n return promise;\n }\n const promises = new Array();\n let instanceCount = 0;\n const loadAttribute = (attribute) => {\n if (extension.attributes[attribute] == undefined) {\n promises.push(Promise.resolve(null));\n return;\n }\n const accessor = ArrayItem.Get(`${extensionContext}/attributes/${attribute}`, this._loader.gltf.accessors, extension.attributes[attribute]);\n promises.push(this._loader._loadFloatAccessorAsync(`/accessors/${accessor.bufferView}`, accessor));\n if (instanceCount === 0) {\n instanceCount = accessor.count;\n }\n else if (instanceCount !== accessor.count) {\n throw new Error(`${extensionContext}/attributes: Instance buffer accessors do not have the same count.`);\n }\n };\n loadAttribute(\"TRANSLATION\");\n loadAttribute(\"ROTATION\");\n loadAttribute(\"SCALE\");\n return promise.then((babylonTransformNode) => {\n return Promise.all(promises).then(([translationBuffer, rotationBuffer, scaleBuffer]) => {\n const matrices = new Float32Array(instanceCount * 16);\n TmpVectors.Vector3[0].copyFromFloats(0, 0, 0); // translation\n TmpVectors.Quaternion[0].copyFromFloats(0, 0, 0, 1); // rotation\n TmpVectors.Vector3[1].copyFromFloats(1, 1, 1); // scale\n for (let i = 0; i < instanceCount; ++i) {\n translationBuffer && Vector3.FromArrayToRef(translationBuffer, i * 3, TmpVectors.Vector3[0]);\n rotationBuffer && Quaternion.FromArrayToRef(rotationBuffer, i * 4, TmpVectors.Quaternion[0]);\n scaleBuffer && Vector3.FromArrayToRef(scaleBuffer, i * 3, TmpVectors.Vector3[1]);\n Matrix.ComposeToRef(TmpVectors.Vector3[1], TmpVectors.Quaternion[0], TmpVectors.Vector3[0], TmpVectors.Matrix[0]);\n TmpVectors.Matrix[0].copyToArray(matrices, i * 16);\n }\n for (const babylonMesh of node._primitiveBabylonMeshes) {\n babylonMesh.thinInstanceSetBuffer(\"matrix\", matrices, 16, true);\n }\n return babylonTransformNode;\n });\n });\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_mesh_gpu_instancing(loader));\n//# sourceMappingURL=EXT_mesh_gpu_instancing.js.map"],"names":["NAME","EXT_mesh_gpu_instancing","constructor","loader","this","name","_loader","enabled","isExtensionUsed","dispose","loadNodeAsync","context","node","assign","GLTFLoader","LoadExtensionAsync","extensionContext","extension","_disableInstancedMesh","promise","index","_primitiveBabylonMeshes","promises","Array","instanceCount","loadAttribute","attribute","undefined","attributes","push","Promise","resolve","accessor","ArrayItem","Get","gltf","accessors","_loadFloatAccessorAsync","bufferView","count","Error","then","babylonTransformNode","all","translationBuffer","rotationBuffer","scaleBuffer","matrices","Float32Array","TmpVectors","Vector3","copyFromFloats","Quaternion","i","FromArrayToRef","Matrix","ComposeToRef","copyToArray","babylonMesh","thinInstanceSetBuffer","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"4VAIA,MAAMA,EAAO,0BAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EACZI,KAAKE,QAAUH,EACfC,KAAKG,QAAUH,KAAKE,QAAQE,gBAAgBR,EAC/C,CAED,OAAAS,GACIL,KAAKE,QAAU,IAClB,CAID,aAAAI,CAAcC,EAASC,EAAMC,GACzB,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAMR,KAAKC,MAAM,CAACW,EAAkBC,KAC9Eb,KAAKE,QAAQY,wBACb,MAAMC,EAAUf,KAAKE,QAAQI,cAAc,UAAUE,EAAKQ,QAASR,EAAMC,GAEzE,GADAT,KAAKE,QAAQY,yBACRN,EAAKS,wBACN,OAAOF,EAEX,MAAMG,EAAW,IAAIC,MACrB,IAAIC,EAAgB,EACpB,MAAMC,EAAiBC,IACnB,GAAuCC,MAAnCV,EAAUW,WAAWF,GAErB,YADAJ,EAASO,KAAKC,QAAQC,QAAQ,OAGlC,MAAMC,EAAWC,EAAUC,IAAI,GAAGlB,gBAA+BU,IAAatB,KAAKE,QAAQ6B,KAAKC,UAAWnB,EAAUW,WAAWF,IAEhI,GADAJ,EAASO,KAAKzB,KAAKE,QAAQ+B,wBAAwB,cAAcL,EAASM,aAAcN,IAClE,IAAlBR,EACAA,EAAgBQ,EAASO,WAExB,GAAIf,IAAkBQ,EAASO,MAChC,MAAM,IAAIC,MAAM,GAAGxB,sEACtB,EAKL,OAHAS,EAAc,eACdA,EAAc,YACdA,EAAc,SACPN,EAAQsB,MAAMC,GACVZ,QAAQa,IAAIrB,GAAUmB,MAAK,EAAEG,EAAmBC,EAAgBC,MACnE,MAAMC,EAAW,IAAIC,aAA6B,GAAhBxB,GAClCyB,EAAWC,QAAQ,GAAGC,eAAe,EAAG,EAAG,GAC3CF,EAAWG,WAAW,GAAGD,eAAe,EAAG,EAAG,EAAG,GACjDF,EAAWC,QAAQ,GAAGC,eAAe,EAAG,EAAG,GAC3C,IAAK,IAAIE,EAAI,EAAGA,EAAI7B,IAAiB6B,EACjCT,GAAqBM,EAAQI,eAAeV,EAAuB,EAAJS,EAAOJ,EAAWC,QAAQ,IACzFL,GAAkBO,EAAWE,eAAeT,EAAoB,EAAJQ,EAAOJ,EAAWG,WAAW,IACzFN,GAAeI,EAAQI,eAAeR,EAAiB,EAAJO,EAAOJ,EAAWC,QAAQ,IAC7EK,EAAOC,aAAaP,EAAWC,QAAQ,GAAID,EAAWG,WAAW,GAAIH,EAAWC,QAAQ,GAAID,EAAWM,OAAO,IAC9GN,EAAWM,OAAO,GAAGE,YAAYV,EAAc,GAAJM,GAE/C,IAAK,MAAMK,KAAe9C,EAAKS,wBAC3BqC,EAAYC,sBAAsB,SAAUZ,EAAU,IAAI,GAE9D,OAAOL,CAAoB,KAEjC,GAET,EAELkB,EAAwB5D,GACxB6D,EAAsB7D,GAAM,GAAOG,GAAW,IAAIF,EAAwBE"}
@@ -0,0 +1,86 @@
1
+ import { a3 as TmpVectors, u as Vector3, a4 as Quaternion, a1 as Matrix, aH as unregisterGLTFExtension, aI as registerGLTFExtension } from './index-H9RbNFln.esm.js';
2
+ import { GLTFLoader, ArrayItem } from './glTFLoader-FnbdTR40.esm.js';
3
+ import './thinInstanceMesh-DzFmk7SW.esm.js';
4
+ import './rawTexture-BBFBylYg.esm.js';
5
+ import './assetContainer-C9nOA325.esm.js';
6
+ import './glTFLoaderAnimation-DLprnT2e.esm.js';
7
+
8
+ const NAME = "EXT_mesh_gpu_instancing";
9
+ /**
10
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md)
11
+ * [Playground Sample](https://playground.babylonjs.com/#QFIGLW#9)
12
+ */
13
+ // eslint-disable-next-line @typescript-eslint/naming-convention
14
+ class EXT_mesh_gpu_instancing {
15
+ /**
16
+ * @internal
17
+ */
18
+ constructor(loader) {
19
+ /**
20
+ * The name of this extension.
21
+ */
22
+ this.name = NAME;
23
+ this._loader = loader;
24
+ this.enabled = this._loader.isExtensionUsed(NAME);
25
+ }
26
+ /** @internal */
27
+ dispose() {
28
+ this._loader = null;
29
+ }
30
+ /**
31
+ * @internal
32
+ */
33
+ loadNodeAsync(context, node, assign) {
34
+ return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {
35
+ this._loader._disableInstancedMesh++;
36
+ const promise = this._loader.loadNodeAsync(`/nodes/${node.index}`, node, assign);
37
+ this._loader._disableInstancedMesh--;
38
+ if (!node._primitiveBabylonMeshes) {
39
+ return promise;
40
+ }
41
+ const promises = new Array();
42
+ let instanceCount = 0;
43
+ const loadAttribute = (attribute) => {
44
+ if (extension.attributes[attribute] == undefined) {
45
+ promises.push(Promise.resolve(null));
46
+ return;
47
+ }
48
+ const accessor = ArrayItem.Get(`${extensionContext}/attributes/${attribute}`, this._loader.gltf.accessors, extension.attributes[attribute]);
49
+ promises.push(this._loader._loadFloatAccessorAsync(`/accessors/${accessor.bufferView}`, accessor));
50
+ if (instanceCount === 0) {
51
+ instanceCount = accessor.count;
52
+ }
53
+ else if (instanceCount !== accessor.count) {
54
+ throw new Error(`${extensionContext}/attributes: Instance buffer accessors do not have the same count.`);
55
+ }
56
+ };
57
+ loadAttribute("TRANSLATION");
58
+ loadAttribute("ROTATION");
59
+ loadAttribute("SCALE");
60
+ return promise.then((babylonTransformNode) => {
61
+ return Promise.all(promises).then(([translationBuffer, rotationBuffer, scaleBuffer]) => {
62
+ const matrices = new Float32Array(instanceCount * 16);
63
+ TmpVectors.Vector3[0].copyFromFloats(0, 0, 0); // translation
64
+ TmpVectors.Quaternion[0].copyFromFloats(0, 0, 0, 1); // rotation
65
+ TmpVectors.Vector3[1].copyFromFloats(1, 1, 1); // scale
66
+ for (let i = 0; i < instanceCount; ++i) {
67
+ translationBuffer && Vector3.FromArrayToRef(translationBuffer, i * 3, TmpVectors.Vector3[0]);
68
+ rotationBuffer && Quaternion.FromArrayToRef(rotationBuffer, i * 4, TmpVectors.Quaternion[0]);
69
+ scaleBuffer && Vector3.FromArrayToRef(scaleBuffer, i * 3, TmpVectors.Vector3[1]);
70
+ Matrix.ComposeToRef(TmpVectors.Vector3[1], TmpVectors.Quaternion[0], TmpVectors.Vector3[0], TmpVectors.Matrix[0]);
71
+ TmpVectors.Matrix[0].copyToArray(matrices, i * 16);
72
+ }
73
+ for (const babylonMesh of node._primitiveBabylonMeshes) {
74
+ babylonMesh.thinInstanceSetBuffer("matrix", matrices, 16, true);
75
+ }
76
+ return babylonTransformNode;
77
+ });
78
+ });
79
+ });
80
+ }
81
+ }
82
+ unregisterGLTFExtension(NAME);
83
+ registerGLTFExtension(NAME, true, (loader) => new EXT_mesh_gpu_instancing(loader));
84
+
85
+ export { EXT_mesh_gpu_instancing };
86
+ //# sourceMappingURL=EXT_mesh_gpu_instancing-xdiHrPE-.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EXT_mesh_gpu_instancing-xdiHrPE-.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js"],"sourcesContent":["import { Vector3, Quaternion, Matrix, TmpVectors } from \"core/Maths/math.vector\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nimport \"core/Meshes/thinInstanceMesh\";\nconst NAME = \"EXT_mesh_gpu_instancing\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md)\n * [Playground Sample](https://playground.babylonjs.com/#QFIGLW#9)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_mesh_gpu_instancing {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n this._loader._disableInstancedMesh++;\n const promise = this._loader.loadNodeAsync(`/nodes/${node.index}`, node, assign);\n this._loader._disableInstancedMesh--;\n if (!node._primitiveBabylonMeshes) {\n return promise;\n }\n const promises = new Array();\n let instanceCount = 0;\n const loadAttribute = (attribute) => {\n if (extension.attributes[attribute] == undefined) {\n promises.push(Promise.resolve(null));\n return;\n }\n const accessor = ArrayItem.Get(`${extensionContext}/attributes/${attribute}`, this._loader.gltf.accessors, extension.attributes[attribute]);\n promises.push(this._loader._loadFloatAccessorAsync(`/accessors/${accessor.bufferView}`, accessor));\n if (instanceCount === 0) {\n instanceCount = accessor.count;\n }\n else if (instanceCount !== accessor.count) {\n throw new Error(`${extensionContext}/attributes: Instance buffer accessors do not have the same count.`);\n }\n };\n loadAttribute(\"TRANSLATION\");\n loadAttribute(\"ROTATION\");\n loadAttribute(\"SCALE\");\n return promise.then((babylonTransformNode) => {\n return Promise.all(promises).then(([translationBuffer, rotationBuffer, scaleBuffer]) => {\n const matrices = new Float32Array(instanceCount * 16);\n TmpVectors.Vector3[0].copyFromFloats(0, 0, 0); // translation\n TmpVectors.Quaternion[0].copyFromFloats(0, 0, 0, 1); // rotation\n TmpVectors.Vector3[1].copyFromFloats(1, 1, 1); // scale\n for (let i = 0; i < instanceCount; ++i) {\n translationBuffer && Vector3.FromArrayToRef(translationBuffer, i * 3, TmpVectors.Vector3[0]);\n rotationBuffer && Quaternion.FromArrayToRef(rotationBuffer, i * 4, TmpVectors.Quaternion[0]);\n scaleBuffer && Vector3.FromArrayToRef(scaleBuffer, i * 3, TmpVectors.Vector3[1]);\n Matrix.ComposeToRef(TmpVectors.Vector3[1], TmpVectors.Quaternion[0], TmpVectors.Vector3[0], TmpVectors.Matrix[0]);\n TmpVectors.Matrix[0].copyToArray(matrices, i * 16);\n }\n for (const babylonMesh of node._primitiveBabylonMeshes) {\n babylonMesh.thinInstanceSetBuffer(\"matrix\", matrices, 16, true);\n }\n return babylonTransformNode;\n });\n });\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_mesh_gpu_instancing(loader));\n//# sourceMappingURL=EXT_mesh_gpu_instancing.js.map"],"names":[],"mappings":";;;;;;;AAIA,MAAM,IAAI,GAAG,yBAAyB,CAAC;AACvC;AACA;AACA;AACA;AACA;AACO,MAAM,uBAAuB,CAAC;AACrC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;AAC9B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1D,KAAK;AACL;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AAC5B,KAAK;AACL;AACA;AACA;AACA,IAAI,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE;AACzC,QAAQ,OAAO,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC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C,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACrH,wBAAwB,WAAW,IAAI,OAAO,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACzG,wBAAwB,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1I,wBAAwB,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;AAC3E,qBAAqB;AACrB,oBAAoB,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,uBAAuB,EAAE;AAC5E,wBAAwB,WAAW,CAAC,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;AACxF,qBAAqB;AACrB,oBAAoB,OAAO,oBAAoB,CAAC;AAChD,iBAAiB,CAAC,CAAC;AACnB,aAAa,CAAC,CAAC;AACf,SAAS,CAAC,CAAC;AACX,KAAK;AACL,CAAC;AACD,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;;;;"}
@@ -0,0 +1,134 @@
1
+ import { GLTFLoader, ArrayItem } from './glTFLoader-FnbdTR40.esm.js';
2
+ import { i as Tools, aH as unregisterGLTFExtension, aI as registerGLTFExtension } from './index-H9RbNFln.esm.js';
3
+ import './rawTexture-BBFBylYg.esm.js';
4
+ import './assetContainer-C9nOA325.esm.js';
5
+ import './glTFLoaderAnimation-DLprnT2e.esm.js';
6
+
7
+ /**
8
+ * Meshopt compression (https://github.com/zeux/meshoptimizer)
9
+ *
10
+ * This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.
11
+ *
12
+ * **Encoder**
13
+ *
14
+ * The encoder is not currently implemented.
15
+ *
16
+ * **Decoder**
17
+ *
18
+ * By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).
19
+ *
20
+ * To update the configuration, use the following code:
21
+ * ```javascript
22
+ * MeshoptCompression.Configuration = {
23
+ * decoder: {
24
+ * url: "<url to the meshopt decoder library>"
25
+ * }
26
+ * };
27
+ * ```
28
+ */
29
+ class MeshoptCompression {
30
+ /**
31
+ * Default instance for the meshoptimizer object.
32
+ */
33
+ static get Default() {
34
+ if (!MeshoptCompression._Default) {
35
+ MeshoptCompression._Default = new MeshoptCompression();
36
+ }
37
+ return MeshoptCompression._Default;
38
+ }
39
+ /**
40
+ * Constructor
41
+ */
42
+ constructor() {
43
+ const decoder = MeshoptCompression.Configuration.decoder;
44
+ this._decoderModulePromise = Tools.LoadBabylonScriptAsync(decoder.url).then(() => {
45
+ // Wait for WebAssembly compilation before resolving promise
46
+ return MeshoptDecoder.ready;
47
+ });
48
+ }
49
+ /**
50
+ * Stop all async operations and release resources.
51
+ */
52
+ dispose() {
53
+ delete this._decoderModulePromise;
54
+ }
55
+ /**
56
+ * Decode meshopt data.
57
+ * @see https://github.com/zeux/meshoptimizer/tree/master/js#decoder
58
+ * @param source The input data.
59
+ * @param count The number of elements.
60
+ * @param stride The stride in bytes.
61
+ * @param mode The compression mode.
62
+ * @param filter The compression filter.
63
+ * @returns a Promise<Uint8Array> that resolves to the decoded data
64
+ */
65
+ decodeGltfBufferAsync(source, count, stride, mode, filter) {
66
+ return this._decoderModulePromise.then(async () => {
67
+ MeshoptDecoder.useWorkers(1);
68
+ const result = await MeshoptDecoder.decodeGltfBufferAsync(count, stride, source, mode, filter);
69
+ MeshoptDecoder.useWorkers(0);
70
+ return result;
71
+ });
72
+ }
73
+ }
74
+ /**
75
+ * The configuration. Defaults to the following:
76
+ * ```javascript
77
+ * decoder: {
78
+ * url: "https://cdn.babylonjs.com/meshopt_decoder.js"
79
+ * }
80
+ * ```
81
+ */
82
+ MeshoptCompression.Configuration = {
83
+ decoder: {
84
+ url: `${Tools._DefaultCdnUrl}/meshopt_decoder.js`,
85
+ },
86
+ };
87
+ MeshoptCompression._Default = null;
88
+
89
+ const NAME = "EXT_meshopt_compression";
90
+ /**
91
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md)
92
+ *
93
+ * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js
94
+ * @since 5.0.0
95
+ */
96
+ // eslint-disable-next-line @typescript-eslint/naming-convention
97
+ class EXT_meshopt_compression {
98
+ /**
99
+ * @internal
100
+ */
101
+ constructor(loader) {
102
+ /**
103
+ * The name of this extension.
104
+ */
105
+ this.name = NAME;
106
+ this.enabled = loader.isExtensionUsed(NAME);
107
+ this._loader = loader;
108
+ }
109
+ /** @internal */
110
+ dispose() {
111
+ this._loader = null;
112
+ }
113
+ /**
114
+ * @internal
115
+ */
116
+ loadBufferViewAsync(context, bufferView) {
117
+ return GLTFLoader.LoadExtensionAsync(context, bufferView, this.name, (extensionContext, extension) => {
118
+ const bufferViewMeshopt = bufferView;
119
+ if (bufferViewMeshopt._meshOptData) {
120
+ return bufferViewMeshopt._meshOptData;
121
+ }
122
+ const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);
123
+ bufferViewMeshopt._meshOptData = this._loader.loadBufferAsync(`/buffers/${buffer.index}`, buffer, extension.byteOffset || 0, extension.byteLength).then((buffer) => {
124
+ return MeshoptCompression.Default.decodeGltfBufferAsync(buffer, extension.count, extension.byteStride, extension.mode, extension.filter);
125
+ });
126
+ return bufferViewMeshopt._meshOptData;
127
+ });
128
+ }
129
+ }
130
+ unregisterGLTFExtension(NAME);
131
+ registerGLTFExtension(NAME, true, (loader) => new EXT_meshopt_compression(loader));
132
+
133
+ export { EXT_meshopt_compression };
134
+ //# sourceMappingURL=EXT_meshopt_compression-DtR1iauf.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EXT_meshopt_compression-DtR1iauf.esm.js","sources":["../../../../../dev/core/dist/Meshes/Compression/meshoptCompression.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_meshopt_compression.js"],"sourcesContent":["import { Tools } from \"../../Misc/tools\";\n/**\n * Meshopt compression (https://github.com/zeux/meshoptimizer)\n *\n * This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.\n *\n * **Encoder**\n *\n * The encoder is not currently implemented.\n *\n * **Decoder**\n *\n * By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).\n *\n * To update the configuration, use the following code:\n * ```javascript\n * MeshoptCompression.Configuration = {\n * decoder: {\n * url: \"<url to the meshopt decoder library>\"\n * }\n * };\n * ```\n */\nexport class MeshoptCompression {\n /**\n * Default instance for the meshoptimizer object.\n */\n static get Default() {\n if (!MeshoptCompression._Default) {\n MeshoptCompression._Default = new MeshoptCompression();\n }\n return MeshoptCompression._Default;\n }\n /**\n * Constructor\n */\n constructor() {\n const decoder = MeshoptCompression.Configuration.decoder;\n this._decoderModulePromise = Tools.LoadBabylonScriptAsync(decoder.url).then(() => {\n // Wait for WebAssembly compilation before resolving promise\n return MeshoptDecoder.ready;\n });\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n delete this._decoderModulePromise;\n }\n /**\n * Decode meshopt data.\n * @see https://github.com/zeux/meshoptimizer/tree/master/js#decoder\n * @param source The input data.\n * @param count The number of elements.\n * @param stride The stride in bytes.\n * @param mode The compression mode.\n * @param filter The compression filter.\n * @returns a Promise<Uint8Array> that resolves to the decoded data\n */\n decodeGltfBufferAsync(source, count, stride, mode, filter) {\n return this._decoderModulePromise.then(async () => {\n MeshoptDecoder.useWorkers(1);\n const result = await MeshoptDecoder.decodeGltfBufferAsync(count, stride, source, mode, filter);\n MeshoptDecoder.useWorkers(0);\n return result;\n });\n }\n}\n/**\n * The configuration. Defaults to the following:\n * ```javascript\n * decoder: {\n * url: \"https://cdn.babylonjs.com/meshopt_decoder.js\"\n * }\n * ```\n */\nMeshoptCompression.Configuration = {\n decoder: {\n url: `${Tools._DefaultCdnUrl}/meshopt_decoder.js`,\n },\n};\nMeshoptCompression._Default = null;\n//# sourceMappingURL=meshoptCompression.js.map","import { ArrayItem, GLTFLoader } from \"../glTFLoader\";\nimport { MeshoptCompression } from \"core/Meshes/Compression/meshoptCompression\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"EXT_meshopt_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md)\n *\n * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_meshopt_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this.enabled = loader.isExtensionUsed(NAME);\n this._loader = loader;\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadBufferViewAsync(context, bufferView) {\n return GLTFLoader.LoadExtensionAsync(context, bufferView, this.name, (extensionContext, extension) => {\n const bufferViewMeshopt = bufferView;\n if (bufferViewMeshopt._meshOptData) {\n return bufferViewMeshopt._meshOptData;\n }\n const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);\n bufferViewMeshopt._meshOptData = this._loader.loadBufferAsync(`/buffers/${buffer.index}`, buffer, extension.byteOffset || 0, extension.byteLength).then((buffer) => {\n return MeshoptCompression.Default.decodeGltfBufferAsync(buffer, extension.count, extension.byteStride, extension.mode, extension.filter);\n });\n return bufferViewMeshopt._meshOptData;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_meshopt_compression(loader));\n//# sourceMappingURL=EXT_meshopt_compression.js.map"],"names":[],"mappings":";;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,kBAAkB,CAAC;AAChC;AACA;AACA;AACA,IAAI,WAAW,OAAO,GAAG;AACzB,QAAQ,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE;AAC1C,YAAY,kBAAkB,CAAC,QAAQ,GAAG,IAAI,kBAAkB,EAAE,CAAC;AACnE,SAAS;AACT,QAAQ,OAAO,kBAAkB,CAAC,QAAQ,CAAC;AAC3C,KAAK;AACL;AACA;AACA;AACA,IAAI,WAAW,GAAG;AAClB,QAAQ,MAAM,OAAO,GAAG,kBAAkB,CAAC,aAAa,CAAC,OAAO,CAAC;AACjE,QAAQ,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM;AAC1F;AACA,YAAY,OAAO,cAAc,CAAC,KAAK,CAAC;AACxC,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,OAAO,IAAI,CAAC,qBAAqB,CAAC;AAC1C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;AAC/D,QAAQ,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY;AAC3D,YAAY,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACzC,YAAY,MAAM,MAAM,GAAG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YAAY,CAAC;AACtD,aAAa;AACb,YAAY,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;AAC3G,YAAY,iBAAiB,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,UAAU,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK;AAChL,gBAAgB,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;AACzJ,aAAa,CAAC,CAAC;AACf,YAAY,OAAO,iBAAiB,CAAC,YAAY,CAAC;AAClD,SAAS,CAAC,CAAC;AACX,KAAK;AACL,CAAC;AACD,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ import{GLTFLoader as e,ArrayItem as t}from"./glTFLoader-CX847JwZ.esm.min.js";import{i as s,aH as o,aI as r}from"./index-NKQY07Ai.esm.min.js";import"./rawTexture-DtTw1SfK.esm.min.js";import"./assetContainer-BWyT-iC8.esm.min.js";import"./glTFLoaderAnimation-YVA5W-1q.esm.min.js";class n{static get Default(){return n._Default||(n._Default=new n),n._Default}constructor(){const e=n.Configuration.decoder;this._decoderModulePromise=s.LoadBabylonScriptAsync(e.url).then((()=>MeshoptDecoder.ready))}dispose(){delete this._decoderModulePromise}decodeGltfBufferAsync(e,t,s,o,r){return this._decoderModulePromise.then((async()=>{MeshoptDecoder.useWorkers(1);const n=await MeshoptDecoder.decodeGltfBufferAsync(t,s,e,o,r);return MeshoptDecoder.useWorkers(0),n}))}}n.Configuration={decoder:{url:`${s._DefaultCdnUrl}/meshopt_decoder.js`}},n._Default=null;const a="EXT_meshopt_compression";class d{constructor(e){this.name=a,this.enabled=e.isExtensionUsed(a),this._loader=e}dispose(){this._loader=null}loadBufferViewAsync(s,o){return e.LoadExtensionAsync(s,o,this.name,((e,r)=>{const a=o;if(a._meshOptData)return a._meshOptData;const d=t.Get(`${s}/buffer`,this._loader.gltf.buffers,r.buffer);return a._meshOptData=this._loader.loadBufferAsync(`/buffers/${d.index}`,d,r.byteOffset||0,r.byteLength).then((e=>n.Default.decodeGltfBufferAsync(e,r.count,r.byteStride,r.mode,r.filter))),a._meshOptData}))}}o(a),r(a,!0,(e=>new d(e)));export{d as EXT_meshopt_compression};
2
+ //# sourceMappingURL=EXT_meshopt_compression-SJRA4qRp.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EXT_meshopt_compression-SJRA4qRp.esm.min.js","sources":["../../../../../dev/core/dist/Meshes/Compression/meshoptCompression.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_meshopt_compression.js"],"sourcesContent":["import { Tools } from \"../../Misc/tools\";\n/**\n * Meshopt compression (https://github.com/zeux/meshoptimizer)\n *\n * This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.\n *\n * **Encoder**\n *\n * The encoder is not currently implemented.\n *\n * **Decoder**\n *\n * By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).\n *\n * To update the configuration, use the following code:\n * ```javascript\n * MeshoptCompression.Configuration = {\n * decoder: {\n * url: \"<url to the meshopt decoder library>\"\n * }\n * };\n * ```\n */\nexport class MeshoptCompression {\n /**\n * Default instance for the meshoptimizer object.\n */\n static get Default() {\n if (!MeshoptCompression._Default) {\n MeshoptCompression._Default = new MeshoptCompression();\n }\n return MeshoptCompression._Default;\n }\n /**\n * Constructor\n */\n constructor() {\n const decoder = MeshoptCompression.Configuration.decoder;\n this._decoderModulePromise = Tools.LoadBabylonScriptAsync(decoder.url).then(() => {\n // Wait for WebAssembly compilation before resolving promise\n return MeshoptDecoder.ready;\n });\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n delete this._decoderModulePromise;\n }\n /**\n * Decode meshopt data.\n * @see https://github.com/zeux/meshoptimizer/tree/master/js#decoder\n * @param source The input data.\n * @param count The number of elements.\n * @param stride The stride in bytes.\n * @param mode The compression mode.\n * @param filter The compression filter.\n * @returns a Promise<Uint8Array> that resolves to the decoded data\n */\n decodeGltfBufferAsync(source, count, stride, mode, filter) {\n return this._decoderModulePromise.then(async () => {\n MeshoptDecoder.useWorkers(1);\n const result = await MeshoptDecoder.decodeGltfBufferAsync(count, stride, source, mode, filter);\n MeshoptDecoder.useWorkers(0);\n return result;\n });\n }\n}\n/**\n * The configuration. Defaults to the following:\n * ```javascript\n * decoder: {\n * url: \"https://cdn.babylonjs.com/meshopt_decoder.js\"\n * }\n * ```\n */\nMeshoptCompression.Configuration = {\n decoder: {\n url: `${Tools._DefaultCdnUrl}/meshopt_decoder.js`,\n },\n};\nMeshoptCompression._Default = null;\n//# sourceMappingURL=meshoptCompression.js.map","import { ArrayItem, GLTFLoader } from \"../glTFLoader\";\nimport { MeshoptCompression } from \"core/Meshes/Compression/meshoptCompression\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"EXT_meshopt_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md)\n *\n * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_meshopt_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this.enabled = loader.isExtensionUsed(NAME);\n this._loader = loader;\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadBufferViewAsync(context, bufferView) {\n return GLTFLoader.LoadExtensionAsync(context, bufferView, this.name, (extensionContext, extension) => {\n const bufferViewMeshopt = bufferView;\n if (bufferViewMeshopt._meshOptData) {\n return bufferViewMeshopt._meshOptData;\n }\n const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);\n bufferViewMeshopt._meshOptData = this._loader.loadBufferAsync(`/buffers/${buffer.index}`, buffer, extension.byteOffset || 0, extension.byteLength).then((buffer) => {\n return MeshoptCompression.Default.decodeGltfBufferAsync(buffer, extension.count, extension.byteStride, extension.mode, extension.filter);\n });\n return bufferViewMeshopt._meshOptData;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_meshopt_compression(loader));\n//# sourceMappingURL=EXT_meshopt_compression.js.map"],"names":["MeshoptCompression","Default","_Default","constructor","decoder","Configuration","this","_decoderModulePromise","Tools","LoadBabylonScriptAsync","url","then","MeshoptDecoder","ready","dispose","decodeGltfBufferAsync","source","count","stride","mode","filter","async","useWorkers","result","_DefaultCdnUrl","NAME","EXT_meshopt_compression","loader","name","enabled","isExtensionUsed","_loader","loadBufferViewAsync","context","bufferView","GLTFLoader","LoadExtensionAsync","extensionContext","extension","bufferViewMeshopt","_meshOptData","buffer","ArrayItem","Get","gltf","buffers","loadBufferAsync","index","byteOffset","byteLength","byteStride","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"qRAuBO,MAAMA,EAIT,kBAAWC,GAIP,OAHKD,EAAmBE,WACpBF,EAAmBE,SAAW,IAAIF,GAE/BA,EAAmBE,QAC7B,CAID,WAAAC,GACI,MAAMC,EAAUJ,EAAmBK,cAAcD,QACjDE,KAAKC,sBAAwBC,EAA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oader-FnbdTR40.esm.js';
2
+ import { aH as unregisterGLTFExtension, aI as registerGLTFExtension } from './index-H9RbNFln.esm.js';
3
+ import './rawTexture-BBFBylYg.esm.js';
4
+ import './assetContainer-C9nOA325.esm.js';
5
+ import './glTFLoaderAnimation-DLprnT2e.esm.js';
6
+
7
+ const NAME = "EXT_texture_avif";
8
+ /**
9
+ * [glTF PR](https://github.com/KhronosGroup/glTF/pull/2235)
10
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_avif/README.md)
11
+ */
12
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
+ class EXT_texture_avif {
14
+ /**
15
+ * @internal
16
+ */
17
+ constructor(loader) {
18
+ /** The name of this extension. */
19
+ this.name = NAME;
20
+ this._loader = loader;
21
+ this.enabled = loader.isExtensionUsed(NAME);
22
+ }
23
+ /** @internal */
24
+ dispose() {
25
+ this._loader = null;
26
+ }
27
+ /**
28
+ * @internal
29
+ */
30
+ _loadTextureAsync(context, texture, assign) {
31
+ return GLTFLoader.LoadExtensionAsync(context, texture, this.name, (extensionContext, extension) => {
32
+ const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);
33
+ const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);
34
+ return this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {
35
+ assign(babylonTexture);
36
+ }, undefined, !texture._textureInfo.nonColorData);
37
+ });
38
+ }
39
+ }
40
+ unregisterGLTFExtension(NAME);
41
+ registerGLTFExtension(NAME, true, (loader) => new EXT_texture_avif(loader));
42
+
43
+ export { EXT_texture_avif };
44
+ //# sourceMappingURL=EXT_texture_avif-DyYYGGQy.esm.js.map