@babylonjs/viewer 7.39.1 → 7.39.2-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (615) hide show
  1. package/assets/photoStudio.env +0 -0
  2. package/dist/babylon-viewer.esm.js +2 -0
  3. package/dist/babylon-viewer.esm.js.map +1 -0
  4. package/dist/babylon-viewer.esm.min.js +2 -0
  5. package/dist/babylon-viewer.esm.min.js.map +1 -0
  6. package/dist/chunks/EXT_lights_ies-4qR36gYU.esm.min.js +2 -0
  7. package/dist/chunks/EXT_lights_ies-4qR36gYU.esm.min.js.map +1 -0
  8. package/dist/chunks/EXT_lights_ies-BPlraXeK.esm.js +84 -0
  9. package/dist/chunks/EXT_lights_ies-BPlraXeK.esm.js.map +1 -0
  10. package/dist/chunks/EXT_lights_image_based-BKcuKJnG.esm.js +171 -0
  11. package/dist/chunks/EXT_lights_image_based-BKcuKJnG.esm.js.map +1 -0
  12. package/dist/chunks/EXT_lights_image_based-BdVvViaf.esm.min.js +2 -0
  13. package/dist/chunks/EXT_lights_image_based-BdVvViaf.esm.min.js.map +1 -0
  14. package/dist/chunks/EXT_mesh_gpu_instancing-BuZ_HIlp.esm.min.js +2 -0
  15. package/dist/chunks/EXT_mesh_gpu_instancing-BuZ_HIlp.esm.min.js.map +1 -0
  16. package/dist/chunks/EXT_mesh_gpu_instancing-D18AKsGb.esm.js +86 -0
  17. package/dist/chunks/EXT_mesh_gpu_instancing-D18AKsGb.esm.js.map +1 -0
  18. package/dist/chunks/EXT_meshopt_compression-CQh4jdfN.esm.min.js +2 -0
  19. package/dist/chunks/EXT_meshopt_compression-CQh4jdfN.esm.min.js.map +1 -0
  20. package/dist/chunks/EXT_meshopt_compression-O1MQUocb.esm.js +134 -0
  21. package/dist/chunks/EXT_meshopt_compression-O1MQUocb.esm.js.map +1 -0
  22. package/dist/chunks/EXT_texture_avif-CCxF0wVt.esm.js +44 -0
  23. package/dist/chunks/EXT_texture_avif-CCxF0wVt.esm.js.map +1 -0
  24. package/dist/chunks/EXT_texture_avif-DlR_5lIH.esm.min.js +2 -0
  25. package/dist/chunks/EXT_texture_avif-DlR_5lIH.esm.min.js.map +1 -0
  26. package/dist/chunks/EXT_texture_webp-BZWMblFL.esm.min.js +2 -0
  27. package/dist/chunks/EXT_texture_webp-BZWMblFL.esm.min.js.map +1 -0
  28. package/dist/chunks/EXT_texture_webp-CkYnXjDY.esm.js +43 -0
  29. package/dist/chunks/EXT_texture_webp-CkYnXjDY.esm.js.map +1 -0
  30. package/dist/chunks/ExtrasAsMetadata-BS_0W2ux.esm.js +64 -0
  31. package/dist/chunks/ExtrasAsMetadata-BS_0W2ux.esm.js.map +1 -0
  32. package/dist/chunks/ExtrasAsMetadata-D94X7SZK.esm.min.js +2 -0
  33. package/dist/chunks/ExtrasAsMetadata-D94X7SZK.esm.min.js.map +1 -0
  34. package/dist/chunks/KHR_animation_pointer-B5MIvuuG.esm.min.js +2 -0
  35. package/dist/chunks/KHR_animation_pointer-B5MIvuuG.esm.min.js.map +1 -0
  36. package/dist/chunks/KHR_animation_pointer-DJR-hNZz.esm.js +352 -0
  37. package/dist/chunks/KHR_animation_pointer-DJR-hNZz.esm.js.map +1 -0
  38. package/dist/chunks/KHR_draco_mesh_compression-1IaOqeJI.esm.min.js +2 -0
  39. package/dist/chunks/KHR_draco_mesh_compression-1IaOqeJI.esm.min.js.map +1 -0
  40. package/dist/chunks/KHR_draco_mesh_compression-BMN23sqe.esm.js +617 -0
  41. package/dist/chunks/KHR_draco_mesh_compression-BMN23sqe.esm.js.map +1 -0
  42. package/dist/chunks/KHR_interactivity-D6IKznLX.esm.min.js +2 -0
  43. package/dist/chunks/KHR_interactivity-D6IKznLX.esm.min.js.map +1 -0
  44. package/dist/chunks/KHR_interactivity-FHoEiTSr.esm.js +4033 -0
  45. package/dist/chunks/KHR_interactivity-FHoEiTSr.esm.js.map +1 -0
  46. package/dist/chunks/KHR_lights_punctual-CS0_Hl-k.esm.min.js +2 -0
  47. package/dist/chunks/KHR_lights_punctual-CS0_Hl-k.esm.min.js.map +1 -0
  48. package/dist/chunks/KHR_lights_punctual-CU8SL4YU.esm.js +581 -0
  49. package/dist/chunks/KHR_lights_punctual-CU8SL4YU.esm.js.map +1 -0
  50. package/dist/chunks/KHR_materials_anisotropy-BmoCKU2T.esm.js +65 -0
  51. package/dist/chunks/KHR_materials_anisotropy-BmoCKU2T.esm.js.map +1 -0
  52. package/dist/chunks/KHR_materials_anisotropy-c5WiyW7u.esm.min.js +2 -0
  53. package/dist/chunks/KHR_materials_anisotropy-c5WiyW7u.esm.min.js.map +1 -0
  54. package/dist/chunks/KHR_materials_clearcoat-BevP4R0R.esm.js +96 -0
  55. package/dist/chunks/KHR_materials_clearcoat-BevP4R0R.esm.js.map +1 -0
  56. package/dist/chunks/KHR_materials_clearcoat-D0oqehbY.esm.min.js +2 -0
  57. package/dist/chunks/KHR_materials_clearcoat-D0oqehbY.esm.min.js.map +1 -0
  58. package/dist/chunks/KHR_materials_diffuse_transmission-3jJq_5Ei.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_diffuse_transmission-3jJq_5Ei.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_diffuse_transmission-VpLwEVvR.esm.js +97 -0
  61. package/dist/chunks/KHR_materials_diffuse_transmission-VpLwEVvR.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_dispersion-KcCrKADQ.esm.js +62 -0
  63. package/dist/chunks/KHR_materials_dispersion-KcCrKADQ.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_dispersion-NGevtKqF.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_dispersion-NGevtKqF.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_emissive_strength-B3Cpv5ft.esm.js +55 -0
  67. package/dist/chunks/KHR_materials_emissive_strength-B3Cpv5ft.esm.js.map +1 -0
  68. package/dist/chunks/KHR_materials_emissive_strength-CjL_dxqU.esm.min.js +2 -0
  69. package/dist/chunks/KHR_materials_emissive_strength-CjL_dxqU.esm.min.js.map +1 -0
  70. package/dist/chunks/KHR_materials_ior-C1zdaIo6.esm.min.js +2 -0
  71. package/dist/chunks/KHR_materials_ior-C1zdaIo6.esm.min.js.map +1 -0
  72. package/dist/chunks/KHR_materials_ior-DVdZ4qiW.esm.js +64 -0
  73. package/dist/chunks/KHR_materials_ior-DVdZ4qiW.esm.js.map +1 -0
  74. package/dist/chunks/KHR_materials_iridescence-CNNoTWsO.esm.js +72 -0
  75. package/dist/chunks/KHR_materials_iridescence-CNNoTWsO.esm.js.map +1 -0
  76. package/dist/chunks/KHR_materials_iridescence-nRyZ5G0K.esm.min.js +2 -0
  77. package/dist/chunks/KHR_materials_iridescence-nRyZ5G0K.esm.min.js.map +1 -0
  78. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BF5M7ba6.esm.js +81 -0
  79. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BF5M7ba6.esm.js.map +1 -0
  80. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CcK3cSiv.esm.min.js +2 -0
  81. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CcK3cSiv.esm.min.js.map +1 -0
  82. package/dist/chunks/KHR_materials_sheen-CLR1ycGi.esm.min.js +2 -0
  83. package/dist/chunks/KHR_materials_sheen-CLR1ycGi.esm.min.js.map +1 -0
  84. package/dist/chunks/KHR_materials_sheen-Do0Q9hN6.esm.js +85 -0
  85. package/dist/chunks/KHR_materials_sheen-Do0Q9hN6.esm.js.map +1 -0
  86. package/dist/chunks/KHR_materials_specular-D8LxzxVK.esm.js +75 -0
  87. package/dist/chunks/KHR_materials_specular-D8LxzxVK.esm.js.map +1 -0
  88. package/dist/chunks/KHR_materials_specular-DFAw3GK3.esm.min.js +2 -0
  89. package/dist/chunks/KHR_materials_specular-DFAw3GK3.esm.min.js.map +1 -0
  90. package/dist/chunks/KHR_materials_transmission-DJXq51hn.esm.js +307 -0
  91. package/dist/chunks/KHR_materials_transmission-DJXq51hn.esm.js.map +1 -0
  92. package/dist/chunks/KHR_materials_transmission-DwVHJye5.esm.min.js +2 -0
  93. package/dist/chunks/KHR_materials_transmission-DwVHJye5.esm.min.js.map +1 -0
  94. package/dist/chunks/KHR_materials_unlit-DMhNm_H7.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_unlit-DMhNm_H7.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_unlit-Fz1AnVdn.esm.js +74 -0
  97. package/dist/chunks/KHR_materials_unlit-Fz1AnVdn.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_variants-C8ln7j0W.esm.min.js +2 -0
  99. package/dist/chunks/KHR_materials_variants-C8ln7j0W.esm.min.js.map +1 -0
  100. package/dist/chunks/KHR_materials_variants-DoA-NgHQ.esm.js +262 -0
  101. package/dist/chunks/KHR_materials_variants-DoA-NgHQ.esm.js.map +1 -0
  102. package/dist/chunks/KHR_materials_volume-D3xYuzG6.esm.min.js +2 -0
  103. package/dist/chunks/KHR_materials_volume-D3xYuzG6.esm.min.js.map +1 -0
  104. package/dist/chunks/KHR_materials_volume-DEGZfaf7.esm.js +87 -0
  105. package/dist/chunks/KHR_materials_volume-DEGZfaf7.esm.js.map +1 -0
  106. package/dist/chunks/KHR_mesh_quantization-CCStwARs.esm.min.js +2 -0
  107. package/dist/chunks/KHR_mesh_quantization-CCStwARs.esm.min.js.map +1 -0
  108. package/dist/chunks/KHR_mesh_quantization-CXx2AbVp.esm.js +26 -0
  109. package/dist/chunks/KHR_mesh_quantization-CXx2AbVp.esm.js.map +1 -0
  110. package/dist/chunks/KHR_node_hoverability-CTR7HT3o.esm.js +39 -0
  111. package/dist/chunks/KHR_node_hoverability-CTR7HT3o.esm.js.map +1 -0
  112. package/dist/chunks/KHR_node_hoverability-x2eI6Gs9.esm.min.js +2 -0
  113. package/dist/chunks/KHR_node_hoverability-x2eI6Gs9.esm.min.js.map +1 -0
  114. package/dist/chunks/KHR_node_visibility-4HdLmsRo.esm.js +46 -0
  115. package/dist/chunks/KHR_node_visibility-4HdLmsRo.esm.js.map +1 -0
  116. package/dist/chunks/KHR_node_visibility-BCcg-0od.esm.min.js +2 -0
  117. package/dist/chunks/KHR_node_visibility-BCcg-0od.esm.min.js.map +1 -0
  118. package/dist/chunks/KHR_texture_basisu-DYy4wQV8.esm.min.js +2 -0
  119. package/dist/chunks/KHR_texture_basisu-DYy4wQV8.esm.min.js.map +1 -0
  120. package/dist/chunks/KHR_texture_basisu-xtFTmbqu.esm.js +43 -0
  121. package/dist/chunks/KHR_texture_basisu-xtFTmbqu.esm.js.map +1 -0
  122. package/dist/chunks/KHR_texture_transform-BFfAtZVl.esm.min.js +2 -0
  123. package/dist/chunks/KHR_texture_transform-BFfAtZVl.esm.min.js.map +1 -0
  124. package/dist/chunks/KHR_texture_transform-DWbdthW6.esm.js +63 -0
  125. package/dist/chunks/KHR_texture_transform-DWbdthW6.esm.js.map +1 -0
  126. package/dist/chunks/KHR_xmp_json_ld-Cq7VTWzM.esm.js +51 -0
  127. package/dist/chunks/KHR_xmp_json_ld-Cq7VTWzM.esm.js.map +1 -0
  128. package/dist/chunks/KHR_xmp_json_ld-DWdeU_IR.esm.min.js +2 -0
  129. package/dist/chunks/KHR_xmp_json_ld-DWdeU_IR.esm.min.js.map +1 -0
  130. package/dist/chunks/MSFT_audio_emitter-CTikE_8C.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_audio_emitter-CTikE_8C.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_audio_emitter-g-xL1ZbP.esm.js +2207 -0
  133. package/dist/chunks/MSFT_audio_emitter-g-xL1ZbP.esm.js.map +1 -0
  134. package/dist/chunks/MSFT_lod-CWGEeOE_.esm.js +337 -0
  135. package/dist/chunks/MSFT_lod-CWGEeOE_.esm.js.map +1 -0
  136. package/dist/chunks/MSFT_lod-CplrNR_z.esm.min.js +2 -0
  137. package/dist/chunks/MSFT_lod-CplrNR_z.esm.min.js.map +1 -0
  138. package/dist/chunks/MSFT_minecraftMesh-BN62A-kY.esm.min.js +2 -0
  139. package/dist/chunks/MSFT_minecraftMesh-BN62A-kY.esm.min.js.map +1 -0
  140. package/dist/chunks/MSFT_minecraftMesh-CWbwJqYL.esm.js +46 -0
  141. package/dist/chunks/MSFT_minecraftMesh-CWbwJqYL.esm.js.map +1 -0
  142. package/dist/chunks/MSFT_sRGBFactors-D7PCfKro.esm.min.js +2 -0
  143. package/dist/chunks/MSFT_sRGBFactors-D7PCfKro.esm.min.js.map +1 -0
  144. package/dist/chunks/MSFT_sRGBFactors-Dkr-KEwE.esm.js +47 -0
  145. package/dist/chunks/MSFT_sRGBFactors-Dkr-KEwE.esm.js.map +1 -0
  146. package/dist/chunks/animationGroup-DM-j9N1V.esm.js +2482 -0
  147. package/dist/chunks/animationGroup-DM-j9N1V.esm.js.map +1 -0
  148. package/dist/chunks/animationGroup-Kda0guiA.esm.min.js +2 -0
  149. package/dist/chunks/animationGroup-Kda0guiA.esm.min.js.map +1 -0
  150. package/dist/chunks/assetContainer-CFUATXVJ.esm.js +1720 -0
  151. package/dist/chunks/assetContainer-CFUATXVJ.esm.js.map +1 -0
  152. package/dist/chunks/assetContainer-jgIpF0Xj.esm.min.js +2 -0
  153. package/dist/chunks/assetContainer-jgIpF0Xj.esm.min.js.map +1 -0
  154. package/dist/chunks/audioEngine-DP7mTb_N.esm.js +305 -0
  155. package/dist/chunks/audioEngine-DP7mTb_N.esm.js.map +1 -0
  156. package/dist/chunks/audioEngine-DXwzZRuc.esm.min.js +2 -0
  157. package/dist/chunks/audioEngine-DXwzZRuc.esm.min.js.map +1 -0
  158. package/dist/chunks/bakedVertexAnimation-D93QZjVC.esm.js +114 -0
  159. package/dist/chunks/bakedVertexAnimation-D93QZjVC.esm.js.map +1 -0
  160. package/dist/chunks/bakedVertexAnimation-a0VE1nIK.esm.min.js +2 -0
  161. package/dist/chunks/bakedVertexAnimation-a0VE1nIK.esm.min.js.map +1 -0
  162. package/dist/chunks/basisTextureLoader-BRauwpC9.esm.min.js +2 -0
  163. package/dist/chunks/basisTextureLoader-BRauwpC9.esm.min.js.map +1 -0
  164. package/dist/chunks/basisTextureLoader-BlQn3PhW.esm.js +600 -0
  165. package/dist/chunks/basisTextureLoader-BlQn3PhW.esm.js.map +1 -0
  166. package/dist/chunks/dds-BakVE7_G.esm.js +540 -0
  167. package/dist/chunks/dds-BakVE7_G.esm.js.map +1 -0
  168. package/dist/chunks/dds-Bd8lzypO.esm.min.js +2 -0
  169. package/dist/chunks/dds-Bd8lzypO.esm.min.js.map +1 -0
  170. package/dist/chunks/ddsTextureLoader-nRpeqKlq.esm.js +88 -0
  171. package/dist/chunks/ddsTextureLoader-nRpeqKlq.esm.js.map +1 -0
  172. package/dist/chunks/ddsTextureLoader-o67cgekT.esm.min.js +2 -0
  173. package/dist/chunks/ddsTextureLoader-o67cgekT.esm.min.js.map +1 -0
  174. package/dist/chunks/decalFragment-BoIyvSRj.esm.js +18 -0
  175. package/dist/chunks/decalFragment-BoIyvSRj.esm.js.map +1 -0
  176. package/dist/chunks/decalFragment-DdmP32l2.esm.min.js +2 -0
  177. package/dist/chunks/decalFragment-DdmP32l2.esm.min.js.map +1 -0
  178. package/dist/chunks/default.fragment--Bk0jkpq.esm.min.js +2 -0
  179. package/dist/chunks/default.fragment--Bk0jkpq.esm.min.js.map +1 -0
  180. package/dist/chunks/default.fragment-8JCA2onb.esm.js +515 -0
  181. package/dist/chunks/default.fragment-8JCA2onb.esm.js.map +1 -0
  182. package/dist/chunks/default.fragment-BnHHny3M.esm.min.js +2 -0
  183. package/dist/chunks/default.fragment-BnHHny3M.esm.min.js.map +1 -0
  184. package/dist/chunks/default.fragment-yFDq7Yk2.esm.js +446 -0
  185. package/dist/chunks/default.fragment-yFDq7Yk2.esm.js.map +1 -0
  186. package/dist/chunks/default.vertex-BqhIPPwq.esm.min.js +2 -0
  187. package/dist/chunks/default.vertex-BqhIPPwq.esm.min.js.map +1 -0
  188. package/dist/chunks/default.vertex-BrSRv27y.esm.js +181 -0
  189. package/dist/chunks/default.vertex-BrSRv27y.esm.js.map +1 -0
  190. package/dist/chunks/default.vertex-CyVKU3MR.esm.min.js +2 -0
  191. package/dist/chunks/default.vertex-CyVKU3MR.esm.min.js.map +1 -0
  192. package/dist/chunks/default.vertex-Dbr4Brlw.esm.js +202 -0
  193. package/dist/chunks/default.vertex-Dbr4Brlw.esm.js.map +1 -0
  194. package/dist/chunks/defaultUboDeclaration-B_Lff6It.esm.min.js +2 -0
  195. package/dist/chunks/defaultUboDeclaration-B_Lff6It.esm.min.js.map +1 -0
  196. package/dist/chunks/defaultUboDeclaration-DapF4oDG.esm.js +13 -0
  197. package/dist/chunks/defaultUboDeclaration-DapF4oDG.esm.js.map +1 -0
  198. package/dist/chunks/defaultUboDeclaration-DhkJEdVS.esm.min.js +2 -0
  199. package/dist/chunks/defaultUboDeclaration-DhkJEdVS.esm.min.js.map +1 -0
  200. package/dist/chunks/defaultUboDeclaration-Slzzuc8Z.esm.js +15 -0
  201. package/dist/chunks/defaultUboDeclaration-Slzzuc8Z.esm.js.map +1 -0
  202. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
  203. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
  204. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
  205. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
  206. package/dist/chunks/dumpTools-BLztomr1.esm.min.js +2 -0
  207. package/dist/chunks/dumpTools-BLztomr1.esm.min.js.map +1 -0
  208. package/dist/chunks/dumpTools-Cdw9GIJk.esm.js +200 -0
  209. package/dist/chunks/dumpTools-Cdw9GIJk.esm.js.map +1 -0
  210. package/dist/chunks/engine-Bqcy7XH3.esm.min.js +2 -0
  211. package/dist/chunks/engine-Bqcy7XH3.esm.min.js.map +1 -0
  212. package/dist/chunks/engine-ZqfZB8zR.esm.js +2216 -0
  213. package/dist/chunks/engine-ZqfZB8zR.esm.js.map +1 -0
  214. package/dist/chunks/engine.common-BD0GAxmh.esm.min.js +2 -0
  215. package/dist/chunks/engine.common-BD0GAxmh.esm.min.js.map +1 -0
  216. package/dist/chunks/engine.common-DykUWXa4.esm.js +1162 -0
  217. package/dist/chunks/engine.common-DykUWXa4.esm.js.map +1 -0
  218. package/dist/chunks/envTextureLoader-Bae1wyc9.esm.min.js +2 -0
  219. package/dist/chunks/envTextureLoader-Bae1wyc9.esm.min.js.map +1 -0
  220. package/dist/chunks/envTextureLoader-l2igipId.esm.js +64 -0
  221. package/dist/chunks/envTextureLoader-l2igipId.esm.js.map +1 -0
  222. package/dist/chunks/environmentTextureTools-BRpO3y41.esm.min.js +2 -0
  223. package/dist/chunks/environmentTextureTools-BRpO3y41.esm.min.js.map +1 -0
  224. package/dist/chunks/environmentTextureTools-Bdnqd2Nu.esm.js +382 -0
  225. package/dist/chunks/environmentTextureTools-Bdnqd2Nu.esm.js.map +1 -0
  226. package/dist/chunks/exrTextureLoader-JKsZ3m2S.esm.js +1683 -0
  227. package/dist/chunks/exrTextureLoader-JKsZ3m2S.esm.js.map +1 -0
  228. package/dist/chunks/exrTextureLoader-JXpYRea6.esm.min.js +2 -0
  229. package/dist/chunks/exrTextureLoader-JXpYRea6.esm.min.js.map +1 -0
  230. package/dist/chunks/fogFragment-B8DN_zZM.esm.js +102 -0
  231. package/dist/chunks/fogFragment-B8DN_zZM.esm.js.map +1 -0
  232. package/dist/chunks/fogFragment-CRlriWtW.esm.min.js +2 -0
  233. package/dist/chunks/fogFragment-CRlriWtW.esm.min.js.map +1 -0
  234. package/dist/chunks/fogFragment-CjA4bh2v.esm.min.js +2 -0
  235. package/dist/chunks/fogFragment-CjA4bh2v.esm.min.js.map +1 -0
  236. package/dist/chunks/fogFragment-gzSW7fy9.esm.js +101 -0
  237. package/dist/chunks/fogFragment-gzSW7fy9.esm.js.map +1 -0
  238. package/dist/chunks/fresnelFunction-B1zYLwo0.esm.js +12 -0
  239. package/dist/chunks/fresnelFunction-B1zYLwo0.esm.js.map +1 -0
  240. package/dist/chunks/fresnelFunction-C_gho-pZ.esm.min.js +2 -0
  241. package/dist/chunks/fresnelFunction-C_gho-pZ.esm.min.js.map +1 -0
  242. package/dist/chunks/glTFLoader-BFUUTcVx.esm.js +7586 -0
  243. package/dist/chunks/glTFLoader-BFUUTcVx.esm.js.map +1 -0
  244. package/dist/chunks/glTFLoader-INCp6zxS.esm.min.js +2 -0
  245. package/dist/chunks/glTFLoader-INCp6zxS.esm.min.js.map +1 -0
  246. package/dist/chunks/glTFLoaderAnimation-BOMgARkG.esm.js +77 -0
  247. package/dist/chunks/glTFLoaderAnimation-BOMgARkG.esm.js.map +1 -0
  248. package/dist/chunks/glTFLoaderAnimation-DJTuoyoY.esm.min.js +2 -0
  249. package/dist/chunks/glTFLoaderAnimation-DJTuoyoY.esm.min.js.map +1 -0
  250. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  251. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  252. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  253. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  254. package/dist/chunks/harmonicsFunctions-BxN634-s.esm.js +34 -0
  255. package/dist/chunks/harmonicsFunctions-BxN634-s.esm.js.map +1 -0
  256. package/dist/chunks/harmonicsFunctions-Cd-f480y.esm.min.js +2 -0
  257. package/dist/chunks/harmonicsFunctions-Cd-f480y.esm.min.js.map +1 -0
  258. package/dist/chunks/harmonicsFunctions-D1R6DnLz.esm.js +35 -0
  259. package/dist/chunks/harmonicsFunctions-D1R6DnLz.esm.js.map +1 -0
  260. package/dist/chunks/harmonicsFunctions-Qmgk7VLJ.esm.min.js +2 -0
  261. package/dist/chunks/harmonicsFunctions-Qmgk7VLJ.esm.min.js.map +1 -0
  262. package/dist/chunks/hdrTextureLoader-BxlJhmEA.esm.js +253 -0
  263. package/dist/chunks/hdrTextureLoader-BxlJhmEA.esm.js.map +1 -0
  264. package/dist/chunks/hdrTextureLoader-CfiyNQxw.esm.min.js +2 -0
  265. package/dist/chunks/hdrTextureLoader-CfiyNQxw.esm.min.js.map +1 -0
  266. package/dist/chunks/helperFunctions-CA6oEthZ.esm.js +108 -0
  267. package/dist/chunks/helperFunctions-CA6oEthZ.esm.js.map +1 -0
  268. package/dist/chunks/helperFunctions-DhmsmNSo.esm.min.js +2 -0
  269. package/dist/chunks/helperFunctions-DhmsmNSo.esm.min.js.map +1 -0
  270. package/dist/chunks/helperFunctions-JSaV4zvu.esm.min.js +2 -0
  271. package/dist/chunks/helperFunctions-JSaV4zvu.esm.min.js.map +1 -0
  272. package/dist/chunks/helperFunctions-kIWOIO7x.esm.js +80 -0
  273. package/dist/chunks/helperFunctions-kIWOIO7x.esm.js.map +1 -0
  274. package/dist/chunks/iesTextureLoader-Dl220l3j.esm.js +189 -0
  275. package/dist/chunks/iesTextureLoader-Dl220l3j.esm.js.map +1 -0
  276. package/dist/chunks/iesTextureLoader-R3BtnOZe.esm.min.js +2 -0
  277. package/dist/chunks/iesTextureLoader-R3BtnOZe.esm.min.js.map +1 -0
  278. package/dist/chunks/index-BV954TSg.esm.min.js +57 -0
  279. package/dist/chunks/index-BV954TSg.esm.min.js.map +1 -0
  280. package/dist/chunks/index-DNagLMQU.esm.js +74702 -0
  281. package/dist/chunks/index-DNagLMQU.esm.js.map +1 -0
  282. package/dist/chunks/ktxTextureLoader-8q0pdrVv.esm.js +814 -0
  283. package/dist/chunks/ktxTextureLoader-8q0pdrVv.esm.js.map +1 -0
  284. package/dist/chunks/ktxTextureLoader-DTJ9S4nn.esm.min.js +2 -0
  285. package/dist/chunks/ktxTextureLoader-DTJ9S4nn.esm.min.js.map +1 -0
  286. package/dist/chunks/logDepthDeclaration-CDNUELTA.esm.js +11 -0
  287. package/dist/chunks/logDepthDeclaration-CDNUELTA.esm.js.map +1 -0
  288. package/dist/chunks/logDepthDeclaration-Dc_3sQ3G.esm.min.js +2 -0
  289. package/dist/chunks/logDepthDeclaration-Dc_3sQ3G.esm.min.js.map +1 -0
  290. package/dist/chunks/logDepthDeclaration-hjWXUVIC.esm.min.js +2 -0
  291. package/dist/chunks/logDepthDeclaration-hjWXUVIC.esm.min.js.map +1 -0
  292. package/dist/chunks/logDepthDeclaration-mBI2i1ll.esm.js +35 -0
  293. package/dist/chunks/logDepthDeclaration-mBI2i1ll.esm.js.map +1 -0
  294. package/dist/chunks/logDepthVertex-B1OW0jvO.esm.min.js +2 -0
  295. package/dist/chunks/logDepthVertex-B1OW0jvO.esm.min.js.map +1 -0
  296. package/dist/chunks/logDepthVertex-Dbo4wFVt.esm.min.js +2 -0
  297. package/dist/chunks/logDepthVertex-Dbo4wFVt.esm.min.js.map +1 -0
  298. package/dist/chunks/logDepthVertex-DxGn-AeQ.esm.js +77 -0
  299. package/dist/chunks/logDepthVertex-DxGn-AeQ.esm.js.map +1 -0
  300. package/dist/chunks/logDepthVertex-oR1gWmhN.esm.js +81 -0
  301. package/dist/chunks/logDepthVertex-oR1gWmhN.esm.js.map +1 -0
  302. package/dist/chunks/mainUVVaryingDeclaration-B5vwo1hm.esm.js +11 -0
  303. package/dist/chunks/mainUVVaryingDeclaration-B5vwo1hm.esm.js.map +1 -0
  304. package/dist/chunks/mainUVVaryingDeclaration-BpoV9QuW.esm.min.js +2 -0
  305. package/dist/chunks/mainUVVaryingDeclaration-BpoV9QuW.esm.min.js.map +1 -0
  306. package/dist/chunks/mainUVVaryingDeclaration-LjxE2Mea.esm.js +11 -0
  307. package/dist/chunks/mainUVVaryingDeclaration-LjxE2Mea.esm.js.map +1 -0
  308. package/dist/chunks/mainUVVaryingDeclaration-rw0pqFUf.esm.min.js +2 -0
  309. package/dist/chunks/mainUVVaryingDeclaration-rw0pqFUf.esm.min.js.map +1 -0
  310. package/dist/chunks/meshUboDeclaration-BmKxcbO0.esm.js +26 -0
  311. package/dist/chunks/meshUboDeclaration-BmKxcbO0.esm.js.map +1 -0
  312. package/dist/chunks/meshUboDeclaration-C3peGJMc.esm.min.js +2 -0
  313. package/dist/chunks/meshUboDeclaration-C3peGJMc.esm.min.js.map +1 -0
  314. package/dist/chunks/objFileLoader-CbXXPwdO.esm.js +1338 -0
  315. package/dist/chunks/objFileLoader-CbXXPwdO.esm.js.map +1 -0
  316. package/dist/chunks/objFileLoader-CqrKcsxQ.esm.min.js +2 -0
  317. package/dist/chunks/objFileLoader-CqrKcsxQ.esm.min.js.map +1 -0
  318. package/dist/chunks/oitFragment-5RXvySJz.esm.js +1078 -0
  319. package/dist/chunks/oitFragment-5RXvySJz.esm.js.map +1 -0
  320. package/dist/chunks/oitFragment-BQK7d-f2.esm.min.js +2 -0
  321. package/dist/chunks/oitFragment-BQK7d-f2.esm.min.js.map +1 -0
  322. package/dist/chunks/oitFragment-D21gxicm.esm.js +1240 -0
  323. package/dist/chunks/oitFragment-D21gxicm.esm.js.map +1 -0
  324. package/dist/chunks/oitFragment-RvJLDoeq.esm.min.js +2 -0
  325. package/dist/chunks/oitFragment-RvJLDoeq.esm.min.js.map +1 -0
  326. package/dist/chunks/pass.fragment-5i-vYHQA.esm.min.js +2 -0
  327. package/dist/chunks/pass.fragment-5i-vYHQA.esm.min.js.map +1 -0
  328. package/dist/chunks/pass.fragment-Ce_q1NhI.esm.js +15 -0
  329. package/dist/chunks/pass.fragment-Ce_q1NhI.esm.js.map +1 -0
  330. package/dist/chunks/pass.fragment-VMbJ4sLl.esm.min.js +2 -0
  331. package/dist/chunks/pass.fragment-VMbJ4sLl.esm.min.js.map +1 -0
  332. package/dist/chunks/pass.fragment-atV6YKWy.esm.js +15 -0
  333. package/dist/chunks/pass.fragment-atV6YKWy.esm.js.map +1 -0
  334. package/dist/chunks/pbr.fragment-Bu_fi_iI.esm.min.js +2 -0
  335. package/dist/chunks/pbr.fragment-Bu_fi_iI.esm.min.js.map +1 -0
  336. package/dist/chunks/pbr.fragment-DPtALaTz.esm.min.js +2 -0
  337. package/dist/chunks/pbr.fragment-DPtALaTz.esm.min.js.map +1 -0
  338. package/dist/chunks/pbr.fragment-DmruHCJ9.esm.js +3232 -0
  339. package/dist/chunks/pbr.fragment-DmruHCJ9.esm.js.map +1 -0
  340. package/dist/chunks/pbr.fragment-cxg4hnoI.esm.js +3273 -0
  341. package/dist/chunks/pbr.fragment-cxg4hnoI.esm.js.map +1 -0
  342. package/dist/chunks/pbr.vertex-Cjk-WaTM.esm.min.js +2 -0
  343. package/dist/chunks/pbr.vertex-Cjk-WaTM.esm.min.js.map +1 -0
  344. package/dist/chunks/pbr.vertex-D47_G7iU.esm.js +339 -0
  345. package/dist/chunks/pbr.vertex-D47_G7iU.esm.js.map +1 -0
  346. package/dist/chunks/pbr.vertex-DS2o5zbh.esm.min.js +2 -0
  347. package/dist/chunks/pbr.vertex-DS2o5zbh.esm.min.js.map +1 -0
  348. package/dist/chunks/pbr.vertex-WHOPTEk3.esm.js +214 -0
  349. package/dist/chunks/pbr.vertex-WHOPTEk3.esm.js.map +1 -0
  350. package/dist/chunks/postprocess.vertex-BzgzVIsS.esm.min.js +2 -0
  351. package/dist/chunks/postprocess.vertex-BzgzVIsS.esm.min.js.map +1 -0
  352. package/dist/chunks/postprocess.vertex-PL27JBZv.esm.js +20 -0
  353. package/dist/chunks/postprocess.vertex-PL27JBZv.esm.js.map +1 -0
  354. package/dist/chunks/rawTexture-BVYz58jL.esm.min.js +2 -0
  355. package/dist/chunks/rawTexture-BVYz58jL.esm.min.js.map +1 -0
  356. package/dist/chunks/rawTexture-CNIh53bc.esm.js +191 -0
  357. package/dist/chunks/rawTexture-CNIh53bc.esm.js.map +1 -0
  358. package/dist/chunks/ray-CT3BNKAW.esm.js +946 -0
  359. package/dist/chunks/ray-CT3BNKAW.esm.js.map +1 -0
  360. package/dist/chunks/ray-DX4Fw29u.esm.min.js +2 -0
  361. package/dist/chunks/ray-DX4Fw29u.esm.min.js.map +1 -0
  362. package/dist/chunks/rgbdDecode.fragment-BZPuGjF3.esm.js +17 -0
  363. package/dist/chunks/rgbdDecode.fragment-BZPuGjF3.esm.js.map +1 -0
  364. package/dist/chunks/rgbdDecode.fragment-CdDQUiAd.esm.min.js +2 -0
  365. package/dist/chunks/rgbdDecode.fragment-CdDQUiAd.esm.min.js.map +1 -0
  366. package/dist/chunks/rgbdDecode.fragment-DU4OpfAH.esm.js +17 -0
  367. package/dist/chunks/rgbdDecode.fragment-DU4OpfAH.esm.js.map +1 -0
  368. package/dist/chunks/rgbdDecode.fragment-Z7C0ndoD.esm.min.js +2 -0
  369. package/dist/chunks/rgbdDecode.fragment-Z7C0ndoD.esm.min.js.map +1 -0
  370. package/dist/chunks/rgbdEncode.fragment-11YOq3IZ.esm.js +17 -0
  371. package/dist/chunks/rgbdEncode.fragment-11YOq3IZ.esm.js.map +1 -0
  372. package/dist/chunks/rgbdEncode.fragment-CW8jhON1.esm.min.js +2 -0
  373. package/dist/chunks/rgbdEncode.fragment-CW8jhON1.esm.min.js.map +1 -0
  374. package/dist/chunks/rgbdEncode.fragment-C_wUTOj2.esm.js +17 -0
  375. package/dist/chunks/rgbdEncode.fragment-C_wUTOj2.esm.js.map +1 -0
  376. package/dist/chunks/rgbdEncode.fragment-M5RRLioq.esm.min.js +2 -0
  377. package/dist/chunks/rgbdEncode.fragment-M5RRLioq.esm.min.js.map +1 -0
  378. package/dist/chunks/splatFileLoader-CF4Tx1Lb.esm.min.js +2 -0
  379. package/dist/chunks/splatFileLoader-CF4Tx1Lb.esm.min.js.map +1 -0
  380. package/dist/chunks/splatFileLoader-DiZshr8t.esm.js +3379 -0
  381. package/dist/chunks/splatFileLoader-DiZshr8t.esm.js.map +1 -0
  382. package/dist/chunks/spotLight-C21P2jUw.esm.js +701 -0
  383. package/dist/chunks/spotLight-C21P2jUw.esm.js.map +1 -0
  384. package/dist/chunks/spotLight-DI_bUJRY.esm.min.js +2 -0
  385. package/dist/chunks/spotLight-DI_bUJRY.esm.min.js.map +1 -0
  386. package/dist/chunks/standardMaterial-BJxaRLqY.esm.js +1805 -0
  387. package/dist/chunks/standardMaterial-BJxaRLqY.esm.js.map +1 -0
  388. package/dist/chunks/standardMaterial-DJS6_-Gr.esm.min.js +2 -0
  389. package/dist/chunks/standardMaterial-DJS6_-Gr.esm.min.js.map +1 -0
  390. package/dist/chunks/stlFileLoader-D15Lbb9F.esm.min.js +2 -0
  391. package/dist/chunks/stlFileLoader-D15Lbb9F.esm.min.js.map +1 -0
  392. package/dist/chunks/stlFileLoader-Deg3Vy89.esm.js +238 -0
  393. package/dist/chunks/stlFileLoader-Deg3Vy89.esm.js.map +1 -0
  394. package/dist/chunks/tgaTextureLoader-2TGZHIP9.esm.min.js +2 -0
  395. package/dist/chunks/tgaTextureLoader-2TGZHIP9.esm.min.js.map +1 -0
  396. package/dist/chunks/tgaTextureLoader-DwfP9S47.esm.js +349 -0
  397. package/dist/chunks/tgaTextureLoader-DwfP9S47.esm.js.map +1 -0
  398. package/dist/chunks/thinEngine-0DsMlU2k.esm.min.js +2 -0
  399. package/dist/chunks/thinEngine-0DsMlU2k.esm.min.js.map +1 -0
  400. package/dist/chunks/thinEngine-Cm65Vx_j.esm.js +3842 -0
  401. package/dist/chunks/thinEngine-Cm65Vx_j.esm.js.map +1 -0
  402. package/dist/chunks/thinInstanceMesh-C6UlEC2f.esm.min.js +2 -0
  403. package/dist/chunks/thinInstanceMesh-C6UlEC2f.esm.min.js.map +1 -0
  404. package/dist/chunks/thinInstanceMesh-DA6E7x4T.esm.js +314 -0
  405. package/dist/chunks/thinInstanceMesh-DA6E7x4T.esm.js.map +1 -0
  406. package/dist/chunks/vertexColorMixing-BRSVXv9U.esm.min.js +2 -0
  407. package/dist/chunks/vertexColorMixing-BRSVXv9U.esm.min.js.map +1 -0
  408. package/dist/chunks/vertexColorMixing-BXirzxd2.esm.js +522 -0
  409. package/dist/chunks/vertexColorMixing-BXirzxd2.esm.js.map +1 -0
  410. package/dist/chunks/vertexColorMixing-D0_S2DHD.esm.js +412 -0
  411. package/dist/chunks/vertexColorMixing-D0_S2DHD.esm.js.map +1 -0
  412. package/dist/chunks/vertexColorMixing-Db2ycO0T.esm.min.js +2 -0
  413. package/dist/chunks/vertexColorMixing-Db2ycO0T.esm.min.js.map +1 -0
  414. package/dist/chunks/webgpuEngine-CPedVcqR.esm.min.js +2 -0
  415. package/dist/chunks/webgpuEngine-CPedVcqR.esm.min.js.map +1 -0
  416. package/dist/chunks/webgpuEngine-CqHGurOF.esm.js +11533 -0
  417. package/dist/chunks/webgpuEngine-CqHGurOF.esm.js.map +1 -0
  418. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  419. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  420. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  421. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  422. package/lib/index.d.ts +558 -0
  423. package/lib/index.js +2076 -0
  424. package/lib/index.js.map +1 -0
  425. package/package.json +19 -28
  426. package/readme.md +29 -24
  427. package/configuration/configuration.d.ts +0 -107
  428. package/configuration/configuration.js +0 -16
  429. package/configuration/configuration.js.map +0 -1
  430. package/configuration/configurationCompatibility.d.ts +0 -8
  431. package/configuration/configurationCompatibility.js +0 -66
  432. package/configuration/configurationCompatibility.js.map +0 -1
  433. package/configuration/configurationContainer.d.ts +0 -10
  434. package/configuration/configurationContainer.js +0 -10
  435. package/configuration/configurationContainer.js.map +0 -1
  436. package/configuration/globals.d.ts +0 -6
  437. package/configuration/globals.js +0 -18
  438. package/configuration/globals.js.map +0 -1
  439. package/configuration/index.d.ts +0 -2
  440. package/configuration/index.js +0 -4
  441. package/configuration/index.js.map +0 -1
  442. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  443. package/configuration/interfaces/cameraConfiguration.js +0 -2
  444. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  445. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  446. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  447. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  448. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  449. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  450. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  451. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  452. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  453. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  454. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  455. package/configuration/interfaces/groundConfiguration.js +0 -2
  456. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  457. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  458. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  459. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  460. package/configuration/interfaces/index.d.ts +0 -15
  461. package/configuration/interfaces/index.js +0 -16
  462. package/configuration/interfaces/index.js.map +0 -1
  463. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  464. package/configuration/interfaces/lightConfiguration.js +0 -2
  465. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  466. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  467. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  468. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  469. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  470. package/configuration/interfaces/modelConfiguration.js +0 -2
  471. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  472. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  473. package/configuration/interfaces/observersConfiguration.js +0 -2
  474. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  475. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  476. package/configuration/interfaces/sceneConfiguration.js +0 -2
  477. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  478. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  479. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  480. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  481. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  482. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  483. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  484. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  485. package/configuration/interfaces/templateConfiguration.js +0 -2
  486. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  487. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  488. package/configuration/interfaces/vrConfiguration.js +0 -2
  489. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  490. package/configuration/loader.d.ts +0 -4
  491. package/configuration/loader.js +0 -17
  492. package/configuration/loader.js.map +0 -1
  493. package/configuration/mappers.d.ts +0 -43
  494. package/configuration/mappers.js +0 -193
  495. package/configuration/mappers.js.map +0 -1
  496. package/configuration/renderOnlyLoader.d.ts +0 -33
  497. package/configuration/renderOnlyLoader.js +0 -162
  498. package/configuration/renderOnlyLoader.js.map +0 -1
  499. package/configuration/types/default.d.ts +0 -6
  500. package/configuration/types/default.js +0 -121
  501. package/configuration/types/default.js.map +0 -1
  502. package/configuration/types/environmentMap.d.ts +0 -5
  503. package/configuration/types/environmentMap.js +0 -14
  504. package/configuration/types/environmentMap.js.map +0 -1
  505. package/configuration/types/extended.d.ts +0 -6
  506. package/configuration/types/extended.js +0 -317
  507. package/configuration/types/extended.js.map +0 -1
  508. package/configuration/types/index.d.ts +0 -14
  509. package/configuration/types/index.js +0 -51
  510. package/configuration/types/index.js.map +0 -1
  511. package/configuration/types/minimal.d.ts +0 -6
  512. package/configuration/types/minimal.js +0 -43
  513. package/configuration/types/minimal.js.map +0 -1
  514. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  515. package/configuration/types/renderOnlyDefault.js +0 -31
  516. package/configuration/types/renderOnlyDefault.js.map +0 -1
  517. package/configuration/types/shadowLight.d.ts +0 -9
  518. package/configuration/types/shadowLight.js +0 -64
  519. package/configuration/types/shadowLight.js.map +0 -1
  520. package/helper/index.d.ts +0 -29
  521. package/helper/index.js +0 -66
  522. package/helper/index.js.map +0 -1
  523. package/index.d.ts +0 -30
  524. package/index.js +0 -46
  525. package/index.js.map +0 -1
  526. package/initializer.d.ts +0 -11
  527. package/initializer.js +0 -35
  528. package/initializer.js.map +0 -1
  529. package/interfaces.d.ts +0 -5
  530. package/interfaces.js +0 -7
  531. package/interfaces.js.map +0 -1
  532. package/labs/environmentSerializer.d.ts +0 -126
  533. package/labs/environmentSerializer.js +0 -191
  534. package/labs/environmentSerializer.js.map +0 -1
  535. package/labs/texture.d.ts +0 -183
  536. package/labs/texture.js +0 -351
  537. package/labs/texture.js.map +0 -1
  538. package/labs/viewerLabs.d.ts +0 -51
  539. package/labs/viewerLabs.js +0 -134
  540. package/labs/viewerLabs.js.map +0 -1
  541. package/loader/modelLoader.d.ts +0 -56
  542. package/loader/modelLoader.js +0 -202
  543. package/loader/modelLoader.js.map +0 -1
  544. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  545. package/loader/plugins/applyMaterialConfig.js +0 -16
  546. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  547. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  548. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  549. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  550. package/loader/plugins/index.d.ts +0 -19
  551. package/loader/plugins/index.js +0 -44
  552. package/loader/plugins/index.js.map +0 -1
  553. package/loader/plugins/loaderPlugin.d.ts +0 -24
  554. package/loader/plugins/loaderPlugin.js +0 -2
  555. package/loader/plugins/loaderPlugin.js.map +0 -1
  556. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  557. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  558. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  559. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  560. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  561. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  562. package/managers/observablesManager.d.ts +0 -66
  563. package/managers/observablesManager.js +0 -35
  564. package/managers/observablesManager.js.map +0 -1
  565. package/managers/sceneManager.d.ts +0 -245
  566. package/managers/sceneManager.js +0 -1375
  567. package/managers/sceneManager.js.map +0 -1
  568. package/managers/telemetryManager.d.ts +0 -78
  569. package/managers/telemetryManager.js +0 -117
  570. package/managers/telemetryManager.js.map +0 -1
  571. package/model/modelAnimation.d.ts +0 -215
  572. package/model/modelAnimation.js +0 -237
  573. package/model/modelAnimation.js.map +0 -1
  574. package/model/viewerModel.d.ts +0 -233
  575. package/model/viewerModel.js +0 -673
  576. package/model/viewerModel.js.map +0 -1
  577. package/optimizer/custom/extended.d.ts +0 -13
  578. package/optimizer/custom/extended.js +0 -101
  579. package/optimizer/custom/extended.js.map +0 -1
  580. package/optimizer/custom/index.d.ts +0 -9
  581. package/optimizer/custom/index.js +0 -26
  582. package/optimizer/custom/index.js.map +0 -1
  583. package/renderOnlyIndex.d.ts +0 -11
  584. package/renderOnlyIndex.js +0 -18
  585. package/renderOnlyIndex.js.map +0 -1
  586. package/templating/eventManager.d.ts +0 -35
  587. package/templating/eventManager.js +0 -66
  588. package/templating/eventManager.js.map +0 -1
  589. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  590. package/templating/plugins/hdButtonPlugin.js +0 -22
  591. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  592. package/templating/plugins/printButton.d.ts +0 -9
  593. package/templating/plugins/printButton.js +0 -41
  594. package/templating/plugins/printButton.js.map +0 -1
  595. package/templating/templateManager.d.ts +0 -197
  596. package/templating/templateManager.js +0 -561
  597. package/templating/templateManager.js.map +0 -1
  598. package/templating/viewerTemplatePlugin.d.ts +0 -21
  599. package/templating/viewerTemplatePlugin.js +0 -69
  600. package/templating/viewerTemplatePlugin.js.map +0 -1
  601. package/viewer/defaultViewer.d.ts +0 -130
  602. package/viewer/defaultViewer.js +0 -672
  603. package/viewer/defaultViewer.js.map +0 -1
  604. package/viewer/renderOnlyViewer.d.ts +0 -9
  605. package/viewer/renderOnlyViewer.js +0 -46
  606. package/viewer/renderOnlyViewer.js.map +0 -1
  607. package/viewer/viewer.d.ts +0 -258
  608. package/viewer/viewer.js +0 -783
  609. package/viewer/viewer.js.map +0 -1
  610. package/viewer/viewerManager.d.ts +0 -58
  611. package/viewer/viewerManager.js +0 -91
  612. package/viewer/viewerManager.js.map +0 -1
  613. package/viewer/viewerWithTemplate.d.ts +0 -9
  614. package/viewer/viewerWithTemplate.js +0 -20
  615. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_lights_punctual-CU8SL4YU.esm.js","sources":["../../../../../dev/core/dist/Lights/directionalLight.js","../../../../../dev/core/dist/Lights/pointLight.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_lights_punctual.js"],"sourcesContent":["import { __decorate } from \"tslib\";\nimport { serialize } from \"../Misc/decorators\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector\";\nimport { Node } from \"../node\";\nimport { Light } from \"./light\";\nimport { ShadowLight } from \"./shadowLight\";\nimport { RegisterClass } from \"../Misc/typeStore\";\nimport { Constants } from \"core/Engines/constants\";\nNode.AddNodeConstructor(\"Light_Type_1\", (name, scene) => {\n return () => new DirectionalLight(name, Vector3.Zero(), scene);\n});\n/**\n * A directional light is defined by a direction (what a surprise!).\n * The light is emitted from everywhere in the specified direction, and has an infinite range.\n * An example of a directional light is when a distance planet is lit by the apparently parallel lines of light from its sun. Light in a downward direction will light the top of an object.\n * Documentation: https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n */\nexport class DirectionalLight extends ShadowLight {\n /**\n * Fix frustum size for the shadow generation. This is disabled if the value is 0.\n */\n get shadowFrustumSize() {\n return this._shadowFrustumSize;\n }\n /**\n * Specifies a fix frustum size for the shadow generation.\n */\n set shadowFrustumSize(value) {\n this._shadowFrustumSize = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Gets the shadow projection scale against the optimal computed one.\n * 0.1 by default which means that the projection window is increase by 10% from the optimal size.\n * This does not impact in fixed frustum size (shadowFrustumSize being set)\n */\n get shadowOrthoScale() {\n return this._shadowOrthoScale;\n }\n /**\n * Sets the shadow projection scale against the optimal computed one.\n * 0.1 by default which means that the projection window is increase by 10% from the optimal size.\n * This does not impact in fixed frustum size (shadowFrustumSize being set)\n */\n set shadowOrthoScale(value) {\n this._shadowOrthoScale = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Gets or sets the orthoLeft property used to build the light frustum\n */\n get orthoLeft() {\n return this._orthoLeft;\n }\n set orthoLeft(left) {\n this._orthoLeft = left;\n }\n /**\n * Gets or sets the orthoRight property used to build the light frustum\n */\n get orthoRight() {\n return this._orthoRight;\n }\n set orthoRight(right) {\n this._orthoRight = right;\n }\n /**\n * Gets or sets the orthoTop property used to build the light frustum\n */\n get orthoTop() {\n return this._orthoTop;\n }\n set orthoTop(top) {\n this._orthoTop = top;\n }\n /**\n * Gets or sets the orthoBottom property used to build the light frustum\n */\n get orthoBottom() {\n return this._orthoBottom;\n }\n set orthoBottom(bottom) {\n this._orthoBottom = bottom;\n }\n /**\n * Creates a DirectionalLight object in the scene, oriented towards the passed direction (Vector3).\n * The directional light is emitted from everywhere in the given direction.\n * It can cast shadows.\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n * @param name The friendly name of the light\n * @param direction The direction of the light\n * @param scene The scene the light belongs to\n */\n constructor(name, direction, scene) {\n super(name, scene);\n this._shadowFrustumSize = 0;\n this._shadowOrthoScale = 0.1;\n /**\n * Automatically compute the projection matrix to best fit (including all the casters)\n * on each frame.\n */\n this.autoUpdateExtends = true;\n /**\n * Automatically compute the shadowMinZ and shadowMaxZ for the projection matrix to best fit (including all the casters)\n * on each frame. autoUpdateExtends must be set to true for this to work\n */\n this.autoCalcShadowZBounds = false;\n // Cache\n this._orthoLeft = Number.MAX_VALUE;\n this._orthoRight = Number.MIN_VALUE;\n this._orthoTop = Number.MIN_VALUE;\n this._orthoBottom = Number.MAX_VALUE;\n this.position = direction.scale(-1.0);\n this.direction = direction;\n }\n /**\n * Returns the string \"DirectionalLight\".\n * @returns The class name\n */\n getClassName() {\n return \"DirectionalLight\";\n }\n /**\n * Returns the integer 1.\n * @returns The light Type id as a constant defines in Light.LIGHTTYPEID_x\n */\n getTypeID() {\n return Light.LIGHTTYPEID_DIRECTIONALLIGHT;\n }\n /**\n * Sets the passed matrix \"matrix\" as projection matrix for the shadows cast by the light according to the passed view matrix.\n * Returns the DirectionalLight Shadow projection matrix.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n _setDefaultShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n if (this.shadowFrustumSize > 0) {\n this._setDefaultFixedFrustumShadowProjectionMatrix(matrix);\n }\n else {\n this._setDefaultAutoExtendShadowProjectionMatrix(matrix, viewMatrix, renderList);\n }\n }\n /**\n * Sets the passed matrix \"matrix\" as fixed frustum projection matrix for the shadows cast by the light according to the passed view matrix.\n * Returns the DirectionalLight Shadow projection matrix.\n * @param matrix\n */\n _setDefaultFixedFrustumShadowProjectionMatrix(matrix) {\n const activeCamera = this.getScene().activeCamera;\n if (!activeCamera) {\n return;\n }\n Matrix.OrthoLHToRef(this.shadowFrustumSize, this.shadowFrustumSize, this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ, this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ, matrix, this.getScene().getEngine().isNDCHalfZRange);\n }\n /**\n * Sets the passed matrix \"matrix\" as auto extend projection matrix for the shadows cast by the light according to the passed view matrix.\n * Returns the DirectionalLight Shadow projection matrix.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n _setDefaultAutoExtendShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n const activeCamera = this.getScene().activeCamera;\n // Check extends\n if (this.autoUpdateExtends || this._orthoLeft === Number.MAX_VALUE) {\n const tempVector3 = Vector3.Zero();\n this._orthoLeft = Number.MAX_VALUE;\n this._orthoRight = -Number.MAX_VALUE;\n this._orthoTop = -Number.MAX_VALUE;\n this._orthoBottom = Number.MAX_VALUE;\n let shadowMinZ = Number.MAX_VALUE;\n let shadowMaxZ = -Number.MAX_VALUE;\n for (let meshIndex = 0; meshIndex < renderList.length; meshIndex++) {\n const mesh = renderList[meshIndex];\n if (!mesh) {\n continue;\n }\n const boundingInfo = mesh.getBoundingInfo();\n const boundingBox = boundingInfo.boundingBox;\n for (let index = 0; index < boundingBox.vectorsWorld.length; index++) {\n Vector3.TransformCoordinatesToRef(boundingBox.vectorsWorld[index], viewMatrix, tempVector3);\n if (tempVector3.x < this._orthoLeft) {\n this._orthoLeft = tempVector3.x;\n }\n if (tempVector3.y < this._orthoBottom) {\n this._orthoBottom = tempVector3.y;\n }\n if (tempVector3.x > this._orthoRight) {\n this._orthoRight = tempVector3.x;\n }\n if (tempVector3.y > this._orthoTop) {\n this._orthoTop = tempVector3.y;\n }\n if (this.autoCalcShadowZBounds) {\n if (tempVector3.z < shadowMinZ) {\n shadowMinZ = tempVector3.z;\n }\n if (tempVector3.z > shadowMaxZ) {\n shadowMaxZ = tempVector3.z;\n }\n }\n }\n }\n if (this.autoCalcShadowZBounds) {\n this._shadowMinZ = shadowMinZ;\n this._shadowMaxZ = shadowMaxZ;\n }\n }\n const xOffset = this._orthoRight - this._orthoLeft;\n const yOffset = this._orthoTop - this._orthoBottom;\n const minZ = this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera?.minZ || Constants.ShadowMinZ;\n const maxZ = this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera?.maxZ || Constants.ShadowMaxZ;\n const useReverseDepthBuffer = this.getScene().getEngine().useReverseDepthBuffer;\n Matrix.OrthoOffCenterLHToRef(this._orthoLeft - xOffset * this.shadowOrthoScale, this._orthoRight + xOffset * this.shadowOrthoScale, this._orthoBottom - yOffset * this.shadowOrthoScale, this._orthoTop + yOffset * this.shadowOrthoScale, useReverseDepthBuffer ? maxZ : minZ, useReverseDepthBuffer ? minZ : maxZ, matrix, this.getScene().getEngine().isNDCHalfZRange);\n }\n _buildUniformLayout() {\n this._uniformBuffer.addUniform(\"vLightData\", 4);\n this._uniformBuffer.addUniform(\"vLightDiffuse\", 4);\n this._uniformBuffer.addUniform(\"vLightSpecular\", 4);\n this._uniformBuffer.addUniform(\"shadowsInfo\", 3);\n this._uniformBuffer.addUniform(\"depthValues\", 2);\n this._uniformBuffer.create();\n }\n /**\n * Sets the passed Effect object with the DirectionalLight transformed position (or position if not parented) and the passed name.\n * @param effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The directional light\n */\n transferToEffect(effect, lightIndex) {\n if (this.computeTransformedInformation()) {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.transformedDirection.x, this.transformedDirection.y, this.transformedDirection.z, 1, lightIndex);\n return this;\n }\n this._uniformBuffer.updateFloat4(\"vLightData\", this.direction.x, this.direction.y, this.direction.z, 1, lightIndex);\n return this;\n }\n transferToNodeMaterialEffect(effect, lightDataUniformName) {\n if (this.computeTransformedInformation()) {\n effect.setFloat3(lightDataUniformName, this.transformedDirection.x, this.transformedDirection.y, this.transformedDirection.z);\n return this;\n }\n effect.setFloat3(lightDataUniformName, this.direction.x, this.direction.y, this.direction.z);\n return this;\n }\n /**\n * Gets the minZ used for shadow according to both the scene and the light.\n *\n * Values are fixed on directional lights as it relies on an ortho projection hence the need to convert being\n * -1 and 1 to 0 and 1 doing (depth + min) / (min + max) -> (depth + 1) / (1 + 1) -> (depth * 0.5) + 0.5.\n * (when not using reverse depth buffer / NDC half Z range)\n * @param _activeCamera The camera we are returning the min for (not used)\n * @returns the depth min z\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getDepthMinZ(_activeCamera) {\n const engine = this._scene.getEngine();\n return !engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n }\n /**\n * Gets the maxZ used for shadow according to both the scene and the light.\n *\n * Values are fixed on directional lights as it relies on an ortho projection hence the need to convert being\n * -1 and 1 to 0 and 1 doing (depth + min) / (min + max) -> (depth + 1) / (1 + 1) -> (depth * 0.5) + 0.5.\n * (when not using reverse depth buffer / NDC half Z range)\n * @param _activeCamera The camera we are returning the max for\n * @returns the depth max z\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getDepthMaxZ(_activeCamera) {\n const engine = this._scene.getEngine();\n return engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n }\n /**\n * Prepares the list of defines specific to the light type.\n * @param defines the list of defines\n * @param lightIndex defines the index of the light for the effect\n */\n prepareLightSpecificDefines(defines, lightIndex) {\n defines[\"DIRLIGHT\" + lightIndex] = true;\n }\n}\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"shadowFrustumSize\", null);\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"shadowOrthoScale\", null);\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"autoUpdateExtends\", void 0);\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"autoCalcShadowZBounds\", void 0);\n__decorate([\n serialize(\"orthoLeft\")\n], DirectionalLight.prototype, \"_orthoLeft\", void 0);\n__decorate([\n serialize(\"orthoRight\")\n], DirectionalLight.prototype, \"_orthoRight\", void 0);\n__decorate([\n serialize(\"orthoTop\")\n], DirectionalLight.prototype, \"_orthoTop\", void 0);\n__decorate([\n serialize(\"orthoBottom\")\n], DirectionalLight.prototype, \"_orthoBottom\", void 0);\n// Register Class Name\nRegisterClass(\"BABYLON.DirectionalLight\", DirectionalLight);\n//# sourceMappingURL=directionalLight.js.map","import { __decorate } from \"tslib\";\nimport { serialize } from \"../Misc/decorators\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector\";\nimport { Node } from \"../node\";\nimport { Light } from \"./light\";\nimport { ShadowLight } from \"./shadowLight\";\nimport { RegisterClass } from \"../Misc/typeStore\";\nNode.AddNodeConstructor(\"Light_Type_0\", (name, scene) => {\n return () => new PointLight(name, Vector3.Zero(), scene);\n});\n/**\n * A point light is a light defined by an unique point in world space.\n * The light is emitted in every direction from this point.\n * A good example of a point light is a standard light bulb.\n * Documentation: https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n */\nexport class PointLight extends ShadowLight {\n /**\n * Getter: In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n * This specifies what angle the shadow will use to be created.\n *\n * It default to 90 degrees to work nicely with the cube texture generation for point lights shadow maps.\n */\n get shadowAngle() {\n return this._shadowAngle;\n }\n /**\n * Setter: In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n * This specifies what angle the shadow will use to be created.\n *\n * It default to 90 degrees to work nicely with the cube texture generation for point lights shadow maps.\n */\n set shadowAngle(value) {\n this._shadowAngle = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Gets the direction if it has been set.\n * In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n */\n get direction() {\n return this._direction;\n }\n /**\n * In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n */\n set direction(value) {\n const previousNeedCube = this.needCube();\n this._direction = value;\n if (this.needCube() !== previousNeedCube && this._shadowGenerators) {\n const iterator = this._shadowGenerators.values();\n for (let key = iterator.next(); key.done !== true; key = iterator.next()) {\n const shadowGenerator = key.value;\n shadowGenerator.recreateShadowMap();\n }\n }\n }\n /**\n * Creates a PointLight object from the passed name and position (Vector3) and adds it in the scene.\n * A PointLight emits the light in every direction.\n * It can cast shadows.\n * If the scene camera is already defined and you want to set your PointLight at the camera position, just set it :\n * ```javascript\n * var pointLight = new PointLight(\"pl\", camera.position, scene);\n * ```\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n * @param name The light friendly name\n * @param position The position of the point light in the scene\n * @param scene The scene the lights belongs to\n */\n constructor(name, position, scene) {\n super(name, scene);\n this._shadowAngle = Math.PI / 2;\n this.position = position;\n }\n /**\n * Returns the string \"PointLight\"\n * @returns the class name\n */\n getClassName() {\n return \"PointLight\";\n }\n /**\n * Returns the integer 0.\n * @returns The light Type id as a constant defines in Light.LIGHTTYPEID_x\n */\n getTypeID() {\n return Light.LIGHTTYPEID_POINTLIGHT;\n }\n /**\n * Specifies whether or not the shadowmap should be a cube texture.\n * @returns true if the shadowmap needs to be a cube texture.\n */\n needCube() {\n return !this.direction;\n }\n /**\n * Returns a new Vector3 aligned with the PointLight cube system according to the passed cube face index (integer).\n * @param faceIndex The index of the face we are computed the direction to generate shadow\n * @returns The set direction in 2d mode otherwise the direction to the cubemap face if needCube() is true\n */\n getShadowDirection(faceIndex) {\n if (this.direction) {\n return super.getShadowDirection(faceIndex);\n }\n else {\n switch (faceIndex) {\n case 0:\n return new Vector3(1.0, 0.0, 0.0);\n case 1:\n return new Vector3(-1.0, 0.0, 0.0);\n case 2:\n return new Vector3(0.0, -1.0, 0.0);\n case 3:\n return new Vector3(0.0, 1.0, 0.0);\n case 4:\n return new Vector3(0.0, 0.0, 1.0);\n case 5:\n return new Vector3(0.0, 0.0, -1.0);\n }\n }\n return Vector3.Zero();\n }\n /**\n * Sets the passed matrix \"matrix\" as a left-handed perspective projection matrix with the following settings :\n * - fov = PI / 2\n * - aspect ratio : 1.0\n * - z-near and far equal to the active camera minZ and maxZ.\n * Returns the PointLight.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setDefaultShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n const activeCamera = this.getScene().activeCamera;\n if (!activeCamera) {\n return;\n }\n const minZ = this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ;\n const maxZ = this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ;\n const useReverseDepthBuffer = this.getScene().getEngine().useReverseDepthBuffer;\n Matrix.PerspectiveFovLHToRef(this.shadowAngle, 1.0, useReverseDepthBuffer ? maxZ : minZ, useReverseDepthBuffer ? minZ : maxZ, matrix, true, this._scene.getEngine().isNDCHalfZRange, undefined, useReverseDepthBuffer);\n }\n _buildUniformLayout() {\n this._uniformBuffer.addUniform(\"vLightData\", 4);\n this._uniformBuffer.addUniform(\"vLightDiffuse\", 4);\n this._uniformBuffer.addUniform(\"vLightSpecular\", 4);\n this._uniformBuffer.addUniform(\"vLightFalloff\", 4);\n this._uniformBuffer.addUniform(\"shadowsInfo\", 3);\n this._uniformBuffer.addUniform(\"depthValues\", 2);\n this._uniformBuffer.create();\n }\n /**\n * Sets the passed Effect \"effect\" with the PointLight transformed position (or position, if none) and passed name (string).\n * @param effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The point light\n */\n transferToEffect(effect, lightIndex) {\n if (this.computeTransformedInformation()) {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z, 0.0, lightIndex);\n }\n else {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.position.x, this.position.y, this.position.z, 0, lightIndex);\n }\n this._uniformBuffer.updateFloat4(\"vLightFalloff\", this.range, this._inverseSquaredRange, 0, 0, lightIndex);\n return this;\n }\n transferToNodeMaterialEffect(effect, lightDataUniformName) {\n if (this.computeTransformedInformation()) {\n effect.setFloat3(lightDataUniformName, this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z);\n }\n else {\n effect.setFloat3(lightDataUniformName, this.position.x, this.position.y, this.position.z);\n }\n return this;\n }\n /**\n * Prepares the list of defines specific to the light type.\n * @param defines the list of defines\n * @param lightIndex defines the index of the light for the effect\n */\n prepareLightSpecificDefines(defines, lightIndex) {\n defines[\"POINTLIGHT\" + lightIndex] = true;\n }\n}\n__decorate([\n serialize()\n], PointLight.prototype, \"shadowAngle\", null);\n// Register Class Name\nRegisterClass(\"BABYLON.PointLight\", PointLight);\n//# sourceMappingURL=pointLight.js.map","import { Vector3 } from \"core/Maths/math.vector\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { DirectionalLight } from \"core/Lights/directionalLight\";\nimport { PointLight } from \"core/Lights/pointLight\";\nimport { SpotLight } from \"core/Lights/spotLight\";\nimport { Light } from \"core/Lights/light\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_lights_punctual\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_lights {\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 ArrayItem.Assign(this._lights);\n }\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n this._loader._allMaterialsDirtyRequired = true;\n return this._loader.loadNodeAsync(context, node, (babylonMesh) => {\n let babylonLight;\n const light = ArrayItem.Get(extensionContext, this._lights, extension.light);\n const name = light.name || babylonMesh.name;\n this._loader.babylonScene._blockEntityCollection = !!this._loader._assetContainer;\n switch (light.type) {\n case \"directional\" /* KHRLightsPunctual_LightType.DIRECTIONAL */: {\n const babylonDirectionalLight = new DirectionalLight(name, Vector3.Backward(), this._loader.babylonScene);\n babylonDirectionalLight.position.setAll(0);\n babylonLight = babylonDirectionalLight;\n break;\n }\n case \"point\" /* KHRLightsPunctual_LightType.POINT */: {\n babylonLight = new PointLight(name, Vector3.Zero(), this._loader.babylonScene);\n break;\n }\n case \"spot\" /* KHRLightsPunctual_LightType.SPOT */: {\n const babylonSpotLight = new SpotLight(name, Vector3.Zero(), Vector3.Backward(), 0, 1, this._loader.babylonScene);\n babylonSpotLight.angle = ((light.spot && light.spot.outerConeAngle) || Math.PI / 4) * 2;\n babylonSpotLight.innerAngle = ((light.spot && light.spot.innerConeAngle) || 0) * 2;\n babylonLight = babylonSpotLight;\n break;\n }\n default: {\n this._loader.babylonScene._blockEntityCollection = false;\n throw new Error(`${extensionContext}: Invalid light type (${light.type})`);\n }\n }\n babylonLight._parentContainer = this._loader._assetContainer;\n this._loader.babylonScene._blockEntityCollection = false;\n light._babylonLight = babylonLight;\n babylonLight.falloffType = Light.FALLOFF_GLTF;\n babylonLight.diffuse = light.color ? Color3.FromArray(light.color) : Color3.White();\n babylonLight.intensity = light.intensity == undefined ? 1 : light.intensity;\n babylonLight.range = light.range == undefined ? Number.MAX_VALUE : light.range;\n babylonLight.parent = babylonMesh;\n this._loader._babylonLights.push(babylonLight);\n GLTFLoader.AddPointerMetadata(babylonLight, extensionContext);\n assign(babylonMesh);\n });\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_lights(loader));\n//# sourceMappingURL=KHR_lights_punctual.js.map"],"names":[],"mappings":";;;;;;;AAQA,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK;AACzD,IAAI,OAAO,MAAM,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC;AAClE,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,gBAAgB,SAAS,WAAW,CAAC;AAClD;AACA;AACA;AACA,IAAI,IAAI,iBAAiB,GAAG;AAC5B,QAAQ,OAAO,IAAI,CAAC,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI,IAAI,iBAAiB,CAAC,KAAK,EAAE;AACjC,QAAQ,IAAI,CAAC,kBAAkB,GAAG,KAAK;AACvC,QAAQ,IAAI,CAAC,4BAA4B,EAAE;AAC3C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AY,CAAC,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe;AAC5E,gBAAgB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,sBAAsB,GAAG,KAAK;AACxE,gBAAgB,KAAK,CAAC,aAAa,GAAG,YAAY;AAClD,gBAAgB,YAAY,CAAC,WAAW,GAAG,KAAK,CAAC,YAAY;AAC7D,gBAAgB,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE;AACnG,gBAAgB,YAAY,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,SAAS,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS;AAC3F,gBAAgB,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,SAAS,GAAG,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK;AAC9F,gBAAgB,YAAY,CAAC,MAAM,GAAG,WAAW;AACjD,gBAAgB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC;AAC9D,gBAAgB,UAAU,CAAC,kBAAkB,CAAC,YAAY,EAAE,gBAAgB,CAAC;AAC7E,gBAAgB,MAAM,CAAC,WAAW,CAAC;AACnC,aAAa,CAAC;AACd,SAAS,CAAC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;;;;"}
@@ -0,0 +1,65 @@
1
+ import { a_ as PBRMaterial, aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-DNagLMQU.esm.js';
2
+ import { G as GLTFLoader } from './glTFLoader-BFUUTcVx.esm.js';
3
+ import './rawTexture-CNIh53bc.esm.js';
4
+ import './assetContainer-CFUATXVJ.esm.js';
5
+ import './glTFLoaderAnimation-BOMgARkG.esm.js';
6
+
7
+ const NAME = "KHR_materials_anisotropy";
8
+ /**
9
+ * [Specification](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy)
10
+ */
11
+ // eslint-disable-next-line @typescript-eslint/naming-convention
12
+ class KHR_materials_anisotropy {
13
+ /**
14
+ * @internal
15
+ */
16
+ constructor(loader) {
17
+ /**
18
+ * The name of this extension.
19
+ */
20
+ this.name = NAME;
21
+ /**
22
+ * Defines a number that determines the order the extensions are applied.
23
+ */
24
+ this.order = 195;
25
+ this._loader = loader;
26
+ this.enabled = this._loader.isExtensionUsed(NAME);
27
+ }
28
+ /** @internal */
29
+ dispose() {
30
+ this._loader = null;
31
+ }
32
+ /**
33
+ * @internal
34
+ */
35
+ loadMaterialPropertiesAsync(context, material, babylonMaterial) {
36
+ return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
37
+ const promises = new Array();
38
+ promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
39
+ promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));
40
+ return Promise.all(promises).then(() => { });
41
+ });
42
+ }
43
+ _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {
44
+ if (!(babylonMaterial instanceof PBRMaterial)) {
45
+ throw new Error(`${context}: Material type not supported`);
46
+ }
47
+ const promises = new Array();
48
+ babylonMaterial.anisotropy.isEnabled = true;
49
+ babylonMaterial.anisotropy.intensity = properties.anisotropyStrength ?? 0;
50
+ babylonMaterial.anisotropy.angle = properties.anisotropyRotation ?? 0;
51
+ if (properties.anisotropyTexture) {
52
+ properties.anisotropyTexture.nonColorData = true;
53
+ promises.push(this._loader.loadTextureInfoAsync(`${context}/anisotropyTexture`, properties.anisotropyTexture, (texture) => {
54
+ texture.name = `${babylonMaterial.name} (Anisotropy Intensity)`;
55
+ babylonMaterial.anisotropy.texture = texture;
56
+ }));
57
+ }
58
+ return Promise.all(promises).then(() => { });
59
+ }
60
+ }
61
+ unregisterGLTFExtension(NAME);
62
+ registerGLTFExtension(NAME, true, (loader) => new KHR_materials_anisotropy(loader));
63
+
64
+ export { KHR_materials_anisotropy };
65
+ //# sourceMappingURL=KHR_materials_anisotropy-BmoCKU2T.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_anisotropy-BmoCKU2T.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_anisotropy.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_anisotropy\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_anisotropy {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 195;\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 loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.anisotropy.isEnabled = true;\n babylonMaterial.anisotropy.intensity = properties.anisotropyStrength ?? 0;\n babylonMaterial.anisotropy.angle = properties.anisotropyRotation ?? 0;\n if (properties.anisotropyTexture) {\n properties.anisotropyTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/anisotropyTexture`, properties.anisotropyTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Anisotropy Intensity)`;\n babylonMaterial.anisotropy.texture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_anisotropy(loader));\n//# sourceMappingURL=KHR_materials_anisotropy.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,0BAA0B;AACvC;AACA;AACA;AACA;AACO,MAAM,wBAAwB,CAAC;AACtC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE;AACpE,QAAQ,OAAO,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,gBAAgB,EAAE,SAAS,KAAK;AAC5G,YAAY,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE;AACxC,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;AACvG,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI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AC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,wBAAwB,CAAC,MAAM,CAAC,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ import{a_ as e,aP as o,aQ as r}from"./index-BV954TSg.esm.min.js";import{G as s}from"./glTFLoader-INCp6zxS.esm.min.js";import"./rawTexture-BVYz58jL.esm.min.js";import"./assetContainer-jgIpF0Xj.esm.min.js";import"./glTFLoaderAnimation-DJTuoyoY.esm.min.js";const t="KHR_materials_anisotropy";class n{constructor(e){this.name=t,this.order=195,this._loader=e,this.enabled=this._loader.isExtensionUsed(t)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,o,r){return s.LoadExtensionAsync(e,o,this.name,((s,t)=>{const n=new Array;return n.push(this._loader.loadMaterialPropertiesAsync(e,o,r)),n.push(this._loadIridescencePropertiesAsync(s,t,r)),Promise.all(n).then((()=>{}))}))}_loadIridescencePropertiesAsync(o,r,s){if(!(s instanceof e))throw new Error(`${o}: Material type not supported`);const t=new Array;return s.anisotropy.isEnabled=!0,s.anisotropy.intensity=r.anisotropyStrength??0,s.anisotropy.angle=r.anisotropyRotation??0,r.anisotropyTexture&&(r.anisotropyTexture.nonColorData=!0,t.push(this._loader.loadTextureInfoAsync(`${o}/anisotropyTexture`,r.anisotropyTexture,(e=>{e.name=`${s.name} (Anisotropy Intensity)`,s.anisotropy.texture=e})))),Promise.all(t).then((()=>{}))}}o(t),r(t,!0,(e=>new n(e)));export{n as KHR_materials_anisotropy};
2
+ //# sourceMappingURL=KHR_materials_anisotropy-c5WiyW7u.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_anisotropy-c5WiyW7u.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_anisotropy.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_anisotropy\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_anisotropy {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 195;\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 loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.anisotropy.isEnabled = true;\n babylonMaterial.anisotropy.intensity = properties.anisotropyStrength ?? 0;\n babylonMaterial.anisotropy.angle = properties.anisotropyRotation ?? 0;\n if (properties.anisotropyTexture) {\n properties.anisotropyTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/anisotropyTexture`, properties.anisotropyTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Anisotropy Intensity)`;\n babylonMaterial.anisotropy.texture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_anisotropy(loader));\n//# sourceMappingURL=KHR_materials_anisotropy.js.map"],"names":["NAME","KHR_materials_anisotropy","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadIridescencePropertiesAsync","Promise","all","then","properties","PBRMaterial","Error","anisotropy","isEnabled","intensity","anisotropyStrength","angle","anisotropyRotation","anisotropyTexture","nonColorData","loadTextureInfoAsync","texture","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8PAGA,MAAMA,EAAO,2BAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKjB,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKjB,KAAKkB,gCAAgCL,EAAkBC,EAAWJ,IACzES,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,+BAAAH,CAAgCV,EAASc,EAAYZ,GACjD,KAAMA,aAA2Ba,GAC7B,MAAM,IAAIC,MAAM,GAAGhB,kCAEvB,MAAMO,EAAW,IAAIC,MAWrB,OAVAN,EAAgBe,WAAWC,WAAY,EACvChB,EAAgBe,WAAWE,UAAYL,EAAWM,oBAAsB,EACxElB,EAAgBe,WAAWI,MAAQP,EAAWQ,oBAAsB,EAChER,EAAWS,oBACXT,EAAWS,kBAAkBC,cAAe,EAC5CjB,EAASE,KAAKjB,KAAKG,QAAQ8B,qBAAqB,GAAGzB,sBAA6Bc,EAAWS,mBAAoBG,IAC3GA,EAAQjC,KAAO,GAAGS,EAAgBT,8BAClCS,EAAgBe,WAAWS,QAAUA,CAAO,MAG7Cf,QAAQC,IAAIL,GAAUM,MAAK,QAC1C,EAEAc,EAAwBvC,GACxBwC,EAAsBxC,GAAM,GAAOG,GAAW,IAAIF,EAAyBE"}
@@ -0,0 +1,96 @@
1
+ import { a_ as PBRMaterial, aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-DNagLMQU.esm.js';
2
+ import { G as GLTFLoader } from './glTFLoader-BFUUTcVx.esm.js';
3
+ import './rawTexture-CNIh53bc.esm.js';
4
+ import './assetContainer-CFUATXVJ.esm.js';
5
+ import './glTFLoaderAnimation-BOMgARkG.esm.js';
6
+
7
+ const NAME = "KHR_materials_clearcoat";
8
+ /**
9
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md)
10
+ * [Playground Sample](https://www.babylonjs-playground.com/frame.html#7F7PN6#8)
11
+ */
12
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
+ class KHR_materials_clearcoat {
14
+ /**
15
+ * @internal
16
+ */
17
+ constructor(loader) {
18
+ /**
19
+ * The name of this extension.
20
+ */
21
+ this.name = NAME;
22
+ /**
23
+ * Defines a number that determines the order the extensions are applied.
24
+ */
25
+ this.order = 190;
26
+ this._loader = loader;
27
+ this.enabled = this._loader.isExtensionUsed(NAME);
28
+ }
29
+ /** @internal */
30
+ dispose() {
31
+ this._loader = null;
32
+ }
33
+ /**
34
+ * @internal
35
+ */
36
+ loadMaterialPropertiesAsync(context, material, babylonMaterial) {
37
+ return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
38
+ const promises = new Array();
39
+ promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
40
+ promises.push(this._loadClearCoatPropertiesAsync(extensionContext, extension, babylonMaterial));
41
+ return Promise.all(promises).then(() => { });
42
+ });
43
+ }
44
+ _loadClearCoatPropertiesAsync(context, properties, babylonMaterial) {
45
+ if (!(babylonMaterial instanceof PBRMaterial)) {
46
+ throw new Error(`${context}: Material type not supported`);
47
+ }
48
+ const promises = new Array();
49
+ babylonMaterial.clearCoat.isEnabled = true;
50
+ babylonMaterial.clearCoat.useRoughnessFromMainTexture = false;
51
+ babylonMaterial.clearCoat.remapF0OnInterfaceChange = false;
52
+ if (properties.clearcoatFactor != undefined) {
53
+ babylonMaterial.clearCoat.intensity = properties.clearcoatFactor;
54
+ }
55
+ else {
56
+ babylonMaterial.clearCoat.intensity = 0;
57
+ }
58
+ if (properties.clearcoatTexture) {
59
+ promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatTexture`, properties.clearcoatTexture, (texture) => {
60
+ texture.name = `${babylonMaterial.name} (ClearCoat)`;
61
+ babylonMaterial.clearCoat.texture = texture;
62
+ }));
63
+ }
64
+ if (properties.clearcoatRoughnessFactor != undefined) {
65
+ babylonMaterial.clearCoat.roughness = properties.clearcoatRoughnessFactor;
66
+ }
67
+ else {
68
+ babylonMaterial.clearCoat.roughness = 0;
69
+ }
70
+ if (properties.clearcoatRoughnessTexture) {
71
+ properties.clearcoatRoughnessTexture.nonColorData = true;
72
+ promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatRoughnessTexture`, properties.clearcoatRoughnessTexture, (texture) => {
73
+ texture.name = `${babylonMaterial.name} (ClearCoat Roughness)`;
74
+ babylonMaterial.clearCoat.textureRoughness = texture;
75
+ }));
76
+ }
77
+ if (properties.clearcoatNormalTexture) {
78
+ properties.clearcoatNormalTexture.nonColorData = true;
79
+ promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatNormalTexture`, properties.clearcoatNormalTexture, (texture) => {
80
+ texture.name = `${babylonMaterial.name} (ClearCoat Normal)`;
81
+ babylonMaterial.clearCoat.bumpTexture = texture;
82
+ }));
83
+ babylonMaterial.invertNormalMapX = !babylonMaterial.getScene().useRightHandedSystem;
84
+ babylonMaterial.invertNormalMapY = babylonMaterial.getScene().useRightHandedSystem;
85
+ if (properties.clearcoatNormalTexture.scale != undefined) {
86
+ babylonMaterial.clearCoat.bumpTexture.level = properties.clearcoatNormalTexture.scale;
87
+ }
88
+ }
89
+ return Promise.all(promises).then(() => { });
90
+ }
91
+ }
92
+ unregisterGLTFExtension(NAME);
93
+ registerGLTFExtension(NAME, true, (loader) => new KHR_materials_clearcoat(loader));
94
+
95
+ export { KHR_materials_clearcoat };
96
+ //# sourceMappingURL=KHR_materials_clearcoat-BevP4R0R.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_clearcoat-BevP4R0R.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_clearcoat.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_clearcoat\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#7F7PN6#8)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_clearcoat {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\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 loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadClearCoatPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadClearCoatPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.clearCoat.isEnabled = true;\n babylonMaterial.clearCoat.useRoughnessFromMainTexture = false;\n babylonMaterial.clearCoat.remapF0OnInterfaceChange = false;\n if (properties.clearcoatFactor != undefined) {\n babylonMaterial.clearCoat.intensity = properties.clearcoatFactor;\n }\n else {\n babylonMaterial.clearCoat.intensity = 0;\n }\n if (properties.clearcoatTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatTexture`, properties.clearcoatTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat)`;\n babylonMaterial.clearCoat.texture = texture;\n }));\n }\n if (properties.clearcoatRoughnessFactor != undefined) {\n babylonMaterial.clearCoat.roughness = properties.clearcoatRoughnessFactor;\n }\n else {\n babylonMaterial.clearCoat.roughness = 0;\n }\n if (properties.clearcoatRoughnessTexture) {\n properties.clearcoatRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatRoughnessTexture`, properties.clearcoatRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Roughness)`;\n babylonMaterial.clearCoat.textureRoughness = texture;\n }));\n }\n if (properties.clearcoatNormalTexture) {\n properties.clearcoatNormalTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatNormalTexture`, properties.clearcoatNormalTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Normal)`;\n babylonMaterial.clearCoat.bumpTexture = texture;\n }));\n babylonMaterial.invertNormalMapX = !babylonMaterial.getScene().useRightHandedSystem;\n babylonMaterial.invertNormalMapY = babylonMaterial.getScene().useRightHandedSystem;\n if (properties.clearcoatNormalTexture.scale != undefined) {\n babylonMaterial.clearCoat.bumpTexture.level = properties.clearcoatNormalTexture.scale;\n }\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_clearcoat(loader));\n//# sourceMappingURL=KHR_materials_clearcoat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CAAC,MAAM,KAAK,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ import{a_ as e,aP as a,aQ as r}from"./index-BV954TSg.esm.min.js";import{G as t}from"./glTFLoader-INCp6zxS.esm.min.js";import"./rawTexture-BVYz58jL.esm.min.js";import"./assetContainer-jgIpF0Xj.esm.min.js";import"./glTFLoaderAnimation-DJTuoyoY.esm.min.js";const o="KHR_materials_clearcoat";class s{constructor(e){this.name=o,this.order=190,this._loader=e,this.enabled=this._loader.isExtensionUsed(o)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,a,r){return t.LoadExtensionAsync(e,a,this.name,((t,o)=>{const s=new Array;return s.push(this._loader.loadMaterialPropertiesAsync(e,a,r)),s.push(this._loadClearCoatPropertiesAsync(t,o,r)),Promise.all(s).then((()=>{}))}))}_loadClearCoatPropertiesAsync(a,r,t){if(!(t instanceof e))throw new Error(`${a}: Material type not supported`);const o=new Array;return t.clearCoat.isEnabled=!0,t.clearCoat.useRoughnessFromMainTexture=!1,t.clearCoat.remapF0OnInterfaceChange=!1,null!=r.clearcoatFactor?t.clearCoat.intensity=r.clearcoatFactor:t.clearCoat.intensity=0,r.clearcoatTexture&&o.push(this._loader.loadTextureInfoAsync(`${a}/clearcoatTexture`,r.clearcoatTexture,(e=>{e.name=`${t.name} (ClearCoat)`,t.clearCoat.texture=e}))),null!=r.clearcoatRoughnessFactor?t.clearCoat.roughness=r.clearcoatRoughnessFactor:t.clearCoat.roughness=0,r.clearcoatRoughnessTexture&&(r.clearcoatRoughnessTexture.nonColorData=!0,o.push(this._loader.loadTextureInfoAsync(`${a}/clearcoatRoughnessTexture`,r.clearcoatRoughnessTexture,(e=>{e.name=`${t.name} (ClearCoat Roughness)`,t.clearCoat.textureRoughness=e})))),r.clearcoatNormalTexture&&(r.clearcoatNormalTexture.nonColorData=!0,o.push(this._loader.loadTextureInfoAsync(`${a}/clearcoatNormalTexture`,r.clearcoatNormalTexture,(e=>{e.name=`${t.name} (ClearCoat Normal)`,t.clearCoat.bumpTexture=e}))),t.invertNormalMapX=!t.getScene().useRightHandedSystem,t.invertNormalMapY=t.getScene().useRightHandedSystem,null!=r.clearcoatNormalTexture.scale&&(t.clearCoat.bumpTexture.level=r.clearcoatNormalTexture.scale)),Promise.all(o).then((()=>{}))}}a(o),r(o,!0,(e=>new s(e)));export{s as KHR_materials_clearcoat};
2
+ //# sourceMappingURL=KHR_materials_clearcoat-D0oqehbY.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_clearcoat-D0oqehbY.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_clearcoat.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_clearcoat\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#7F7PN6#8)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_clearcoat {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\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 loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadClearCoatPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadClearCoatPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.clearCoat.isEnabled = true;\n babylonMaterial.clearCoat.useRoughnessFromMainTexture = false;\n babylonMaterial.clearCoat.remapF0OnInterfaceChange = false;\n if (properties.clearcoatFactor != undefined) {\n babylonMaterial.clearCoat.intensity = properties.clearcoatFactor;\n }\n else {\n babylonMaterial.clearCoat.intensity = 0;\n }\n if (properties.clearcoatTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatTexture`, properties.clearcoatTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat)`;\n babylonMaterial.clearCoat.texture = texture;\n }));\n }\n if (properties.clearcoatRoughnessFactor != undefined) {\n babylonMaterial.clearCoat.roughness = properties.clearcoatRoughnessFactor;\n }\n else {\n babylonMaterial.clearCoat.roughness = 0;\n }\n if (properties.clearcoatRoughnessTexture) {\n properties.clearcoatRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatRoughnessTexture`, properties.clearcoatRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Roughness)`;\n babylonMaterial.clearCoat.textureRoughness = texture;\n }));\n }\n if (properties.clearcoatNormalTexture) {\n properties.clearcoatNormalTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatNormalTexture`, properties.clearcoatNormalTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Normal)`;\n babylonMaterial.clearCoat.bumpTexture = texture;\n }));\n babylonMaterial.invertNormalMapX = !babylonMaterial.getScene().useRightHandedSystem;\n babylonMaterial.invertNormalMapY = babylonMaterial.getScene().useRightHandedSystem;\n if (properties.clearcoatNormalTexture.scale != undefined) {\n babylonMaterial.clearCoat.bumpTexture.level = properties.clearcoatNormalTexture.scale;\n }\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_clearcoat(loader));\n//# sourceMappingURL=KHR_materials_clearcoat.js.map"],"names":["NAME","KHR_materials_clearcoat","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadClearCoatPropertiesAsync","Promise","all","then","properties","PBRMaterial","Error","clearCoat","isEnabled","useRoughnessFromMainTexture","remapF0OnInterfaceChange","undefined","clearcoatFactor","intensity","clearcoatTexture","loadTextureInfoAsync","texture","clearcoatRoughnessFactor","roughness","clearcoatRoughnessTexture","nonColorData","textureRoughness","clearcoatNormalTexture","bumpTexture","invertNormalMapX","getScene","useRightHandedSystem","invertNormalMapY","scale","level","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8PAGA,MAAMA,EAAO,0BAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKjB,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKjB,KAAKkB,8BAA8BL,EAAkBC,EAAWJ,IACvES,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,6BAAAH,CAA8BV,EAASc,EAAYZ,GAC/C,KAAMA,aAA2Ba,GAC7B,MAAM,IAAIC,MAAM,GAAGhB,kCAEvB,MAAMO,EAAW,IAAIC,MAyCrB,OAxCAN,EAAgBe,UAAUC,WAAY,EACtChB,EAAgBe,UAA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S.esm.min.js";import"./rawTexture-BVYz58jL.esm.min.js";import"./assetContainer-jgIpF0Xj.esm.min.js";import"./glTFLoaderAnimation-DJTuoyoY.esm.min.js";const i="KHR_materials_diffuse_transmission";class o{constructor(s){this.name=i,this.order=174,this._loader=s,this.enabled=this._loader.isExtensionUsed(i),this.enabled&&(s.parent.transparencyAsCoverage=!0)}dispose(){this._loader=null}loadMaterialPropertiesAsync(s,e,r){return a.LoadExtensionAsync(s,e,this.name,((n,a)=>{const i=new Array;return i.push(this._loader.loadMaterialPropertiesAsync(s,e,r)),i.push(this._loadTranslucentPropertiesAsync(n,e,r,a)),Promise.all(i).then((()=>{}))}))}_loadTranslucentPropertiesAsync(r,n,a,i){if(!(a instanceof s))throw new Error(`${r}: Material type not supported`);const o=a;if(o.subSurface.isTranslucencyEnabled=!0,o.subSurface.volumeIndexOfRefraction=1,o.subSurface.minimumThickness=0,o.subSurface.maximumThickness=0,o.subSurface.useAlbedoToTintTranslucency=!1,void 0===i.diffuseTransmissionFactor)return o.subSurface.translucencyIntensity=0,o.subSurface.isTranslucencyEnabled=!1,Promise.resolve();o.subSurface.translucencyIntensity=i.diffuseTransmissionFactor;const t=new Array;return o.subSurface.useGltfStyleTextures=!0,i.diffuseTransmissionTexture&&(i.diffuseTransmissionTexture.nonColorData=!0,t.push(this._loader.loadTextureInfoAsync(`${r}/diffuseTransmissionTexture`,i.diffuseTransmissionTexture).then((s=>{s.name=`${a.name} (Diffuse Transmission)`,o.subSurface.translucencyIntensityTexture=s})))),void 0!==i.diffuseTransmissionColorFactor?o.subSurface.translucencyColor=e.FromArray(i.diffuseTransmissionColorFactor):o.subSurface.translucencyColor=e.White(),i.diffuseTransmissionColorTexture&&t.push(this._loader.loadTextureInfoAsync(`${r}/diffuseTransmissionColorTexture`,i.diffuseTransmissionColorTexture).then((s=>{s.name=`${a.name} (Diffuse Transmission Color)`,o.subSurface.translucencyColorTexture=s}))),Promise.all(t).then((()=>{}))}}r(i),n(i,!0,(s=>new o(s)));export{o as KHR_materials_diffuse_transmission};
2
+ //# sourceMappingURL=KHR_materials_diffuse_transmission-3jJq_5Ei.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_diffuse_transmission-3jJq_5Ei.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_diffuse_transmission\";\n/**\n * [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/1825)\n * !!! Experimental Extension Subject to Changes !!!\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_diffuse_transmission {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 174;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n if (this.enabled) {\n loader.parent.transparencyAsCoverage = true;\n }\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadTranslucentPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadTranslucentPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const pbrMaterial = babylonMaterial;\n // Enables \"translucency\" texture which represents diffusely-transmitted light.\n pbrMaterial.subSurface.isTranslucencyEnabled = true;\n // Since this extension models thin-surface transmission only, we must make the\n // internal IOR == 1.0 and set the thickness to 0.\n pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;\n pbrMaterial.subSurface.minimumThickness = 0.0;\n pbrMaterial.subSurface.maximumThickness = 0.0;\n // Tint color will be used for transmission.\n pbrMaterial.subSurface.useAlbedoToTintTranslucency = false;\n if (extension.diffuseTransmissionFactor !== undefined) {\n pbrMaterial.subSurface.translucencyIntensity = extension.diffuseTransmissionFactor;\n }\n else {\n pbrMaterial.subSurface.translucencyIntensity = 0.0;\n pbrMaterial.subSurface.isTranslucencyEnabled = false;\n return Promise.resolve();\n }\n const promises = new Array();\n pbrMaterial.subSurface.useGltfStyleTextures = true;\n if (extension.diffuseTransmissionTexture) {\n extension.diffuseTransmissionTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionTexture`, extension.diffuseTransmissionTexture).then((texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse Transmission)`;\n pbrMaterial.subSurface.translucencyIntensityTexture = texture;\n }));\n }\n if (extension.diffuseTransmissionColorFactor !== undefined) {\n pbrMaterial.subSurface.translucencyColor = Color3.FromArray(extension.diffuseTransmissionColorFactor);\n }\n else {\n pbrMaterial.subSurface.translucencyColor = Color3.White();\n }\n if (extension.diffuseTransmissionColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionColorTexture`, extension.diffuseTransmissionColorTexture).then((texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse Transmission Color)`;\n pbrMaterial.subSurface.translucencyColorTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_diffuse_transmission(loader));\n//# sourceMappingURL=KHR_materials_diffuse_transmission.js.map"],"names":["NAME","KHR_materials_diffuse_transmission","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","parent","transparencyAsCoverage","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadTranslucentPropertiesAsync","Promise","all","then","PBRMaterial","Error","pbrMaterial","subSurface","isTranslucencyEnabled","volumeIndexOfRefraction","minimumThickness","maximumThickness","useAlbedoToTintTranslucency","undefined","diffuseTransmissionFactor","translucencyIntensity","resolve","useGltfStyleTextures","diffuseTransmissionTexture","nonColorData","loadTextureInfoAsync","texture","translucencyIntensityTexture","diffuseTransmissionColorFactor","translucencyColor","Color3","FromArray","White","diffuseTransmissionColorTexture","translucencyColorTexture","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"qQAIA,MAAMA,EAAO,qCAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,GACxCI,KAAKI,UACLL,EAAOO,OAAOC,wBAAyB,EAEnD,CAEI,OAAAC,GACIR,KAAKG,QAAU,IACvB,CAII,2BAAAM,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUX,KAAKC,MAAM,CAACc,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKnB,KAAKG,QAAQM,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKnB,KAAKoB,gCAAgCL,EAAkBJ,EAAUC,EAAiBI,IACzFK,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,+BAAAH,CAAgCV,EAASC,EAAUC,EAAiBI,GAChE,KAAMJ,aAA2BY,GAC7B,MAAM,IAAIC,MAAM,GAAGf,kCAEvB,MAAMgB,EAAcd,EAUpB,GARAc,EAAYC,WAAWC,uBAAwB,EAG/CF,EAAYC,WAAWE,wBAA0B,EACjDH,EAAYC,WAAWG,iBAAmB,EAC1CJ,EAAYC,WAAWI,iBAAmB,EAE1CL,EAAYC,WAAWK,6BAA8B,OACTC,IAAxCjB,EAAUkB,0BAMV,OAFAR,EAAYC,WAAWQ,sBAAwB,EAC/CT,EAAYC,WAAWC,uBAAwB,EACxCP,QAAQe,UALfV,EAAYC,WAAWQ,sBAAwBnB,EAAUkB,0BAO7D,MAAMjB,EAAW,IAAIC,MAqBrB,OApBAQ,EAAYC,WAAWU,sBAAuB,EAC1CrB,EAAUsB,6BACVtB,EAAUsB,2BAA2BC,cAAe,EACpDtB,EAASE,KAAKnB,KAAKG,QAAQqC,qBAAqB,GAAG9B,+BAAsCM,EAAUsB,4BAA4Bf,MAAMkB,IACjIA,EAAQxC,KAAO,GAAGW,EAAgBX,8BAClCyB,EAAYC,WAAWe,6BAA+BD,CAAO,WAGpBR,IAA7CjB,EAAU2B,+BACVjB,EAAYC,WAAWiB,kBAAoBC,EAAOC,UAAU9B,EAAU2B,gCAGtEjB,EAAYC,WAAWiB,kBAAoBC,EAAOE,QAElD/B,EAAUgC,iCACV/B,EAASE,KAAKnB,KAAKG,QAAQqC,qBAAqB,GAAG9B,oCAA2CM,EAAUgC,iCAAiCzB,MAAMkB,IAC3IA,EAAQxC,KAAO,GAAGW,EAAgBX,oCAClCyB,EAAYC,WAAWsB,yBAA2BR,CAAO,KAG1DpB,QAAQC,IAAIL,GAAUM,MAAK,QAC1C,EAEA2B,EAAwBtD,GACxBuD,EAAsBvD,GAAM,GAAOG,GAAW,IAAIF,EAAmCE"}
@@ -0,0 +1,97 @@
1
+ import { a_ as PBRMaterial, s as Color3, aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-DNagLMQU.esm.js';
2
+ import { G as GLTFLoader } from './glTFLoader-BFUUTcVx.esm.js';
3
+ import './rawTexture-CNIh53bc.esm.js';
4
+ import './assetContainer-CFUATXVJ.esm.js';
5
+ import './glTFLoaderAnimation-BOMgARkG.esm.js';
6
+
7
+ const NAME = "KHR_materials_diffuse_transmission";
8
+ /**
9
+ * [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/1825)
10
+ * !!! Experimental Extension Subject to Changes !!!
11
+ */
12
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
+ class KHR_materials_diffuse_transmission {
14
+ /**
15
+ * @internal
16
+ */
17
+ constructor(loader) {
18
+ /**
19
+ * The name of this extension.
20
+ */
21
+ this.name = NAME;
22
+ /**
23
+ * Defines a number that determines the order the extensions are applied.
24
+ */
25
+ this.order = 174;
26
+ this._loader = loader;
27
+ this.enabled = this._loader.isExtensionUsed(NAME);
28
+ if (this.enabled) {
29
+ loader.parent.transparencyAsCoverage = true;
30
+ }
31
+ }
32
+ /** @internal */
33
+ dispose() {
34
+ this._loader = null;
35
+ }
36
+ /**
37
+ * @internal
38
+ */
39
+ loadMaterialPropertiesAsync(context, material, babylonMaterial) {
40
+ return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
41
+ const promises = new Array();
42
+ promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
43
+ promises.push(this._loadTranslucentPropertiesAsync(extensionContext, material, babylonMaterial, extension));
44
+ return Promise.all(promises).then(() => { });
45
+ });
46
+ }
47
+ _loadTranslucentPropertiesAsync(context, material, babylonMaterial, extension) {
48
+ if (!(babylonMaterial instanceof PBRMaterial)) {
49
+ throw new Error(`${context}: Material type not supported`);
50
+ }
51
+ const pbrMaterial = babylonMaterial;
52
+ // Enables "translucency" texture which represents diffusely-transmitted light.
53
+ pbrMaterial.subSurface.isTranslucencyEnabled = true;
54
+ // Since this extension models thin-surface transmission only, we must make the
55
+ // internal IOR == 1.0 and set the thickness to 0.
56
+ pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;
57
+ pbrMaterial.subSurface.minimumThickness = 0.0;
58
+ pbrMaterial.subSurface.maximumThickness = 0.0;
59
+ // Tint color will be used for transmission.
60
+ pbrMaterial.subSurface.useAlbedoToTintTranslucency = false;
61
+ if (extension.diffuseTransmissionFactor !== undefined) {
62
+ pbrMaterial.subSurface.translucencyIntensity = extension.diffuseTransmissionFactor;
63
+ }
64
+ else {
65
+ pbrMaterial.subSurface.translucencyIntensity = 0.0;
66
+ pbrMaterial.subSurface.isTranslucencyEnabled = false;
67
+ return Promise.resolve();
68
+ }
69
+ const promises = new Array();
70
+ pbrMaterial.subSurface.useGltfStyleTextures = true;
71
+ if (extension.diffuseTransmissionTexture) {
72
+ extension.diffuseTransmissionTexture.nonColorData = true;
73
+ promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionTexture`, extension.diffuseTransmissionTexture).then((texture) => {
74
+ texture.name = `${babylonMaterial.name} (Diffuse Transmission)`;
75
+ pbrMaterial.subSurface.translucencyIntensityTexture = texture;
76
+ }));
77
+ }
78
+ if (extension.diffuseTransmissionColorFactor !== undefined) {
79
+ pbrMaterial.subSurface.translucencyColor = Color3.FromArray(extension.diffuseTransmissionColorFactor);
80
+ }
81
+ else {
82
+ pbrMaterial.subSurface.translucencyColor = Color3.White();
83
+ }
84
+ if (extension.diffuseTransmissionColorTexture) {
85
+ promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionColorTexture`, extension.diffuseTransmissionColorTexture).then((texture) => {
86
+ texture.name = `${babylonMaterial.name} (Diffuse Transmission Color)`;
87
+ pbrMaterial.subSurface.translucencyColorTexture = texture;
88
+ }));
89
+ }
90
+ return Promise.all(promises).then(() => { });
91
+ }
92
+ }
93
+ unregisterGLTFExtension(NAME);
94
+ registerGLTFExtension(NAME, true, (loader) => new KHR_materials_diffuse_transmission(loader));
95
+
96
+ export { KHR_materials_diffuse_transmission };
97
+ //# sourceMappingURL=KHR_materials_diffuse_transmission-VpLwEVvR.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_diffuse_transmission-VpLwEVvR.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_diffuse_transmission\";\n/**\n * [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/1825)\n * !!! Experimental Extension Subject to Changes !!!\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_diffuse_transmission {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 174;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n if (this.enabled) {\n loader.parent.transparencyAsCoverage = true;\n }\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadTranslucentPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadTranslucentPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const pbrMaterial = babylonMaterial;\n // Enables \"translucency\" texture which represents diffusely-transmitted light.\n pbrMaterial.subSurface.isTranslucencyEnabled = true;\n // Since this extension models thin-surface transmission only, we must make the\n // internal IOR == 1.0 and set the thickness to 0.\n pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;\n pbrMaterial.subSurface.minimumThickness = 0.0;\n pbrMaterial.subSurface.maximumThickness = 0.0;\n // Tint color will be used for transmission.\n pbrMaterial.subSurface.useAlbedoToTintTranslucency = false;\n if (extension.diffuseTransmissionFactor !== undefined) {\n pbrMaterial.subSurface.translucencyIntensity = extension.diffuseTransmissionFactor;\n }\n else {\n pbrMaterial.subSurface.translucencyIntensity = 0.0;\n pbrMaterial.subSurface.isTranslucencyEnabled = false;\n return Promise.resolve();\n }\n const promises = new Array();\n pbrMaterial.subSurface.useGltfStyleTextures = true;\n if (extension.diffuseTransmissionTexture) {\n extension.diffuseTransmissionTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionTexture`, extension.diffuseTransmissionTexture).then((texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse Transmission)`;\n pbrMaterial.subSurface.translucencyIntensityTexture = texture;\n }));\n }\n if (extension.diffuseTransmissionColorFactor !== undefined) {\n pbrMaterial.subSurface.translucencyColor = Color3.FromArray(extension.diffuseTransmissionColorFactor);\n }\n else {\n pbrMaterial.subSurface.translucencyColor = Color3.White();\n }\n if (extension.diffuseTransmissionColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionColorTexture`, extension.diffuseTransmissionColorTexture).then((texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse Transmission Color)`;\n pbrMaterial.subSurface.translucencyColorTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_diffuse_transmission(loader));\n//# sourceMappingURL=KHR_materials_diffuse_transmission.js.map"],"names":[],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,oCAAoC;AACjD;AACA;AACA;AACA;AACA;AACO,MAAM,kCAAkC,CAAC;AAChD;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD,QAAQ,IAAI,IAAI,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AAE;AACrE;AACA,QAAQ,IAAI,SAAS,CAAC,+BAA+B,EAAE;AACvD,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,gCAAgC,CAAC,EAAE,SAAS,CAAC,+BAA+B,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK;AACvK,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,6BAA6B,CAAC;AACrF,gBAAgB,WAAW,CAAC,UAAU,CAAC,wBAAwB,GAAG,OAAO;AACzE,aAAa,CAAC,CAAC;AACf;AACA,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;AACpD;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,kCAAkC,CAAC,MAAM,CAAC,CAAC;;;;"}
@@ -0,0 +1,62 @@
1
+ import { a_ as PBRMaterial, aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-DNagLMQU.esm.js';
2
+ import { G as GLTFLoader } from './glTFLoader-BFUUTcVx.esm.js';
3
+ import './rawTexture-CNIh53bc.esm.js';
4
+ import './assetContainer-CFUATXVJ.esm.js';
5
+ import './glTFLoaderAnimation-BOMgARkG.esm.js';
6
+
7
+ const NAME = "KHR_materials_dispersion";
8
+ /**
9
+ * [Specification](https://github.com/KhronosGroup/glTF/blob/87bd64a7f5e23c84b6aef2e6082069583ed0ddb4/extensions/2.0/Khronos/KHR_materials_dispersion/README.md)
10
+ * @experimental
11
+ */
12
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
+ class KHR_materials_dispersion {
14
+ /**
15
+ * @internal
16
+ */
17
+ constructor(loader) {
18
+ /**
19
+ * The name of this extension.
20
+ */
21
+ this.name = NAME;
22
+ /**
23
+ * Defines a number that determines the order the extensions are applied.
24
+ */
25
+ this.order = 174;
26
+ this._loader = loader;
27
+ this.enabled = this._loader.isExtensionUsed(NAME);
28
+ }
29
+ /** @internal */
30
+ dispose() {
31
+ this._loader = null;
32
+ }
33
+ /**
34
+ * @internal
35
+ */
36
+ loadMaterialPropertiesAsync(context, material, babylonMaterial) {
37
+ return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
38
+ const promises = new Array();
39
+ promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
40
+ promises.push(this._loadDispersionPropertiesAsync(extensionContext, material, babylonMaterial, extension));
41
+ return Promise.all(promises).then(() => { });
42
+ });
43
+ }
44
+ _loadDispersionPropertiesAsync(context, material, babylonMaterial, extension) {
45
+ if (!(babylonMaterial instanceof PBRMaterial)) {
46
+ throw new Error(`${context}: Material type not supported`);
47
+ }
48
+ // If transparency isn't enabled already, this extension shouldn't do anything.
49
+ // i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.
50
+ if (!babylonMaterial.subSurface.isRefractionEnabled || !extension.dispersion) {
51
+ return Promise.resolve();
52
+ }
53
+ babylonMaterial.subSurface.isDispersionEnabled = true;
54
+ babylonMaterial.subSurface.dispersion = extension.dispersion;
55
+ return Promise.resolve();
56
+ }
57
+ }
58
+ unregisterGLTFExtension(NAME);
59
+ registerGLTFExtension(NAME, true, (loader) => new KHR_materials_dispersion(loader));
60
+
61
+ export { KHR_materials_dispersion };
62
+ //# sourceMappingURL=KHR_materials_dispersion-KcCrKADQ.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_dispersion-KcCrKADQ.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_dispersion.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_dispersion\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/87bd64a7f5e23c84b6aef2e6082069583ed0ddb4/extensions/2.0/Khronos/KHR_materials_dispersion/README.md)\n * @experimental\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_dispersion {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 174;\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 loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadDispersionPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadDispersionPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n // If transparency isn't enabled already, this extension shouldn't do anything.\n // i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.\n if (!babylonMaterial.subSurface.isRefractionEnabled || !extension.dispersion) {\n return Promise.resolve();\n }\n babylonMaterial.subSurface.isDispersionEnabled = true;\n babylonMaterial.subSurface.dispersion = extension.dispersion;\n return Promise.resolve();\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_dispersion(loader));\n//# sourceMappingURL=KHR_materials_dispersion.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,0BAA0B;AACvC;AACA;AACA;AACA;AACA;AACO,MAAM,wBAAwB,CAAC;AACtC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;A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CAAC,UAAU,EAAE;AACtF,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE;AACpC;AACA,QAAQ,eAAe,CAAC,UAAU,CAAC,mBAAmB,GAAG,IAAI;AAC7D,QAAQ,eAAe,CAAC,UAAU,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU;AACpE,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE;AAChC;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,wBAAwB,CAAC,MAAM,CAAC,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ import{a_ as s,aP as e,aQ as r}from"./index-BV954TSg.esm.min.js";import{G as i}from"./glTFLoader-INCp6zxS.esm.min.js";import"./rawTexture-BVYz58jL.esm.min.js";import"./assetContainer-jgIpF0Xj.esm.min.js";import"./glTFLoaderAnimation-DJTuoyoY.esm.min.js";const o="KHR_materials_dispersion";class n{constructor(s){this.name=o,this.order=174,this._loader=s,this.enabled=this._loader.isExtensionUsed(o)}dispose(){this._loader=null}loadMaterialPropertiesAsync(s,e,r){return i.LoadExtensionAsync(s,e,this.name,((i,o)=>{const n=new Array;return n.push(this._loader.loadMaterialPropertiesAsync(s,e,r)),n.push(this._loadDispersionPropertiesAsync(i,e,r,o)),Promise.all(n).then((()=>{}))}))}_loadDispersionPropertiesAsync(e,r,i,o){if(!(i instanceof s))throw new Error(`${e}: Material type not supported`);return i.subSurface.isRefractionEnabled&&o.dispersion?(i.subSurface.isDispersionEnabled=!0,i.subSurface.dispersion=o.dispersion,Promise.resolve()):Promise.resolve()}}e(o),r(o,!0,(s=>new n(s)));export{n as KHR_materials_dispersion};
2
+ //# sourceMappingURL=KHR_materials_dispersion-NGevtKqF.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_dispersion-NGevtKqF.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_dispersion.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_dispersion\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/87bd64a7f5e23c84b6aef2e6082069583ed0ddb4/extensions/2.0/Khronos/KHR_materials_dispersion/README.md)\n * @experimental\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_dispersion {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 174;\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 loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadDispersionPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadDispersionPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n // If transparency isn't enabled already, this extension shouldn't do anything.\n // i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.\n if (!babylonMaterial.subSurface.isRefractionEnabled || !extension.dispersion) {\n return Promise.resolve();\n }\n babylonMaterial.subSurface.isDispersionEnabled = true;\n babylonMaterial.subSurface.dispersion = extension.dispersion;\n return Promise.resolve();\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_dispersion(loader));\n//# sourceMappingURL=KHR_materials_dispersion.js.map"],"names":["NAME","KHR_materials_dispersion","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadDispersionPropertiesAsync","Promise","all","then","PBRMaterial","Error","subSurface","isRefractionEnabled","dispersion","isDispersionEnabled","resolve","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8PAGA,MAAMA,EAAO,2BAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKjB,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKjB,KAAKkB,+BAA+BL,EAAkBJ,EAAUC,EAAiBI,IACxFK,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,8BAAAH,CAA+BV,EAASC,EAAUC,EAAiBI,GAC/D,KAAMJ,aAA2BY,GAC7B,MAAM,IAAIC,MAAM,GAAGf,kCAIvB,OAAKE,EAAgBc,WAAWC,qBAAwBX,EAAUY,YAGlEhB,EAAgBc,WAAWG,qBAAsB,EACjDjB,EAAgBc,WAAWE,WAAaZ,EAAUY,WAC3CP,QAAQS,WAJJT,QAAQS,SAK3B,EAEAC,EAAwBjC,GACxBkC,EAAsBlC,GAAM,GAAOG,GAAW,IAAIF,EAAyBE"}