@babylonjs/viewer 7.41.1 → 7.42.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (619) hide show
  1. package/assets/photoStudio.env +0 -0
  2. package/dist/babylon-viewer.esm.js +2 -0
  3. package/dist/babylon-viewer.esm.js.map +1 -0
  4. package/dist/babylon-viewer.esm.min.js +2 -0
  5. package/dist/babylon-viewer.esm.min.js.map +1 -0
  6. package/dist/chunks/EXT_lights_ies-BHDD74jk.esm.min.js +2 -0
  7. package/dist/chunks/EXT_lights_ies-BHDD74jk.esm.min.js.map +1 -0
  8. package/dist/chunks/EXT_lights_ies-CJfRNbJm.esm.js +84 -0
  9. package/dist/chunks/EXT_lights_ies-CJfRNbJm.esm.js.map +1 -0
  10. package/dist/chunks/EXT_lights_image_based-B460Sv95.esm.min.js +2 -0
  11. package/dist/chunks/EXT_lights_image_based-B460Sv95.esm.min.js.map +1 -0
  12. package/dist/chunks/EXT_lights_image_based-CQ6UCahL.esm.js +171 -0
  13. package/dist/chunks/EXT_lights_image_based-CQ6UCahL.esm.js.map +1 -0
  14. package/dist/chunks/EXT_mesh_gpu_instancing-D77OfiDS.esm.js +86 -0
  15. package/dist/chunks/EXT_mesh_gpu_instancing-D77OfiDS.esm.js.map +1 -0
  16. package/dist/chunks/EXT_mesh_gpu_instancing-GMG29Y9J.esm.min.js +2 -0
  17. package/dist/chunks/EXT_mesh_gpu_instancing-GMG29Y9J.esm.min.js.map +1 -0
  18. package/dist/chunks/EXT_meshopt_compression-CniiOX0a.esm.js +134 -0
  19. package/dist/chunks/EXT_meshopt_compression-CniiOX0a.esm.js.map +1 -0
  20. package/dist/chunks/EXT_meshopt_compression-DCcKdizI.esm.min.js +2 -0
  21. package/dist/chunks/EXT_meshopt_compression-DCcKdizI.esm.min.js.map +1 -0
  22. package/dist/chunks/EXT_texture_avif-By7mk6aS.esm.min.js +2 -0
  23. package/dist/chunks/EXT_texture_avif-By7mk6aS.esm.min.js.map +1 -0
  24. package/dist/chunks/EXT_texture_avif-DnaKno7b.esm.js +44 -0
  25. package/dist/chunks/EXT_texture_avif-DnaKno7b.esm.js.map +1 -0
  26. package/dist/chunks/EXT_texture_webp-Bm29ukIo.esm.js +43 -0
  27. package/dist/chunks/EXT_texture_webp-Bm29ukIo.esm.js.map +1 -0
  28. package/dist/chunks/EXT_texture_webp-DtSWYlAE.esm.min.js +2 -0
  29. package/dist/chunks/EXT_texture_webp-DtSWYlAE.esm.min.js.map +1 -0
  30. package/dist/chunks/ExtrasAsMetadata-BUO8J2zR.esm.js +64 -0
  31. package/dist/chunks/ExtrasAsMetadata-BUO8J2zR.esm.js.map +1 -0
  32. package/dist/chunks/ExtrasAsMetadata-mi3fn9sR.esm.min.js +2 -0
  33. package/dist/chunks/ExtrasAsMetadata-mi3fn9sR.esm.min.js.map +1 -0
  34. package/dist/chunks/KHR_animation_pointer-COeThtQe.esm.min.js +2 -0
  35. package/dist/chunks/KHR_animation_pointer-COeThtQe.esm.min.js.map +1 -0
  36. package/dist/chunks/KHR_animation_pointer-DXqgkZGB.esm.js +352 -0
  37. package/dist/chunks/KHR_animation_pointer-DXqgkZGB.esm.js.map +1 -0
  38. package/dist/chunks/KHR_draco_mesh_compression-Bh9XGNFd.esm.js +610 -0
  39. package/dist/chunks/KHR_draco_mesh_compression-Bh9XGNFd.esm.js.map +1 -0
  40. package/dist/chunks/KHR_draco_mesh_compression-DyU2KIa2.esm.min.js +2 -0
  41. package/dist/chunks/KHR_draco_mesh_compression-DyU2KIa2.esm.min.js.map +1 -0
  42. package/dist/chunks/KHR_interactivity-QP9zFX3U.esm.js +4033 -0
  43. package/dist/chunks/KHR_interactivity-QP9zFX3U.esm.js.map +1 -0
  44. package/dist/chunks/KHR_interactivity-_r7e7vwA.esm.min.js +2 -0
  45. package/dist/chunks/KHR_interactivity-_r7e7vwA.esm.min.js.map +1 -0
  46. package/dist/chunks/KHR_lights_punctual-DWGx9KlE.esm.js +581 -0
  47. package/dist/chunks/KHR_lights_punctual-DWGx9KlE.esm.js.map +1 -0
  48. package/dist/chunks/KHR_lights_punctual-cz3ulMW0.esm.min.js +2 -0
  49. package/dist/chunks/KHR_lights_punctual-cz3ulMW0.esm.min.js.map +1 -0
  50. package/dist/chunks/KHR_materials_anisotropy-BSvZxEnx.esm.js +65 -0
  51. package/dist/chunks/KHR_materials_anisotropy-BSvZxEnx.esm.js.map +1 -0
  52. package/dist/chunks/KHR_materials_anisotropy-CtKPvN_z.esm.min.js +2 -0
  53. package/dist/chunks/KHR_materials_anisotropy-CtKPvN_z.esm.min.js.map +1 -0
  54. package/dist/chunks/KHR_materials_clearcoat-BephgEiM.esm.min.js +2 -0
  55. package/dist/chunks/KHR_materials_clearcoat-BephgEiM.esm.min.js.map +1 -0
  56. package/dist/chunks/KHR_materials_clearcoat-C3QB9HNC.esm.js +96 -0
  57. package/dist/chunks/KHR_materials_clearcoat-C3QB9HNC.esm.js.map +1 -0
  58. package/dist/chunks/KHR_materials_diffuse_transmission-CZvfLdyF.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_diffuse_transmission-CZvfLdyF.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_diffuse_transmission-DuM5GD2L.esm.js +97 -0
  61. package/dist/chunks/KHR_materials_diffuse_transmission-DuM5GD2L.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_dispersion-0FtkqUmS.esm.js +62 -0
  63. package/dist/chunks/KHR_materials_dispersion-0FtkqUmS.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_dispersion-C7mAat5y.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_dispersion-C7mAat5y.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_emissive_strength-Bz2y9OnA.esm.js +55 -0
  67. package/dist/chunks/KHR_materials_emissive_strength-Bz2y9OnA.esm.js.map +1 -0
  68. package/dist/chunks/KHR_materials_emissive_strength-b7ZNj1HF.esm.min.js +2 -0
  69. package/dist/chunks/KHR_materials_emissive_strength-b7ZNj1HF.esm.min.js.map +1 -0
  70. package/dist/chunks/KHR_materials_ior-C5-JiuLs.esm.min.js +2 -0
  71. package/dist/chunks/KHR_materials_ior-C5-JiuLs.esm.min.js.map +1 -0
  72. package/dist/chunks/KHR_materials_ior-D1jjzmsp.esm.js +64 -0
  73. package/dist/chunks/KHR_materials_ior-D1jjzmsp.esm.js.map +1 -0
  74. package/dist/chunks/KHR_materials_iridescence-CChET9-W.esm.js +72 -0
  75. package/dist/chunks/KHR_materials_iridescence-CChET9-W.esm.js.map +1 -0
  76. package/dist/chunks/KHR_materials_iridescence-hATfgETI.esm.min.js +2 -0
  77. package/dist/chunks/KHR_materials_iridescence-hATfgETI.esm.min.js.map +1 -0
  78. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B-HlmeqI.esm.js +81 -0
  79. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B-HlmeqI.esm.js.map +1 -0
  80. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_IaUmSJE.esm.min.js +2 -0
  81. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_IaUmSJE.esm.min.js.map +1 -0
  82. package/dist/chunks/KHR_materials_sheen-D2QD8uSC.esm.js +85 -0
  83. package/dist/chunks/KHR_materials_sheen-D2QD8uSC.esm.js.map +1 -0
  84. package/dist/chunks/KHR_materials_sheen-cqxpRyXD.esm.min.js +2 -0
  85. package/dist/chunks/KHR_materials_sheen-cqxpRyXD.esm.min.js.map +1 -0
  86. package/dist/chunks/KHR_materials_specular-DnHIH9RX.esm.min.js +2 -0
  87. package/dist/chunks/KHR_materials_specular-DnHIH9RX.esm.min.js.map +1 -0
  88. package/dist/chunks/KHR_materials_specular-vwRXhXVF.esm.js +75 -0
  89. package/dist/chunks/KHR_materials_specular-vwRXhXVF.esm.js.map +1 -0
  90. package/dist/chunks/KHR_materials_transmission-D81TRCgt.esm.min.js +2 -0
  91. package/dist/chunks/KHR_materials_transmission-D81TRCgt.esm.min.js.map +1 -0
  92. package/dist/chunks/KHR_materials_transmission-nPX6lno-.esm.js +307 -0
  93. package/dist/chunks/KHR_materials_transmission-nPX6lno-.esm.js.map +1 -0
  94. package/dist/chunks/KHR_materials_unlit-CLSTXPsk.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_unlit-CLSTXPsk.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_unlit-pmQPq5qR.esm.js +74 -0
  97. package/dist/chunks/KHR_materials_unlit-pmQPq5qR.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_variants-C_XVH51a.esm.js +262 -0
  99. package/dist/chunks/KHR_materials_variants-C_XVH51a.esm.js.map +1 -0
  100. package/dist/chunks/KHR_materials_variants-Czo1ZM8r.esm.min.js +2 -0
  101. package/dist/chunks/KHR_materials_variants-Czo1ZM8r.esm.min.js.map +1 -0
  102. package/dist/chunks/KHR_materials_volume-BJVGGE1g.esm.min.js +2 -0
  103. package/dist/chunks/KHR_materials_volume-BJVGGE1g.esm.min.js.map +1 -0
  104. package/dist/chunks/KHR_materials_volume-C4EKOzF-.esm.js +87 -0
  105. package/dist/chunks/KHR_materials_volume-C4EKOzF-.esm.js.map +1 -0
  106. package/dist/chunks/KHR_mesh_quantization-CZIcA8DN.esm.min.js +2 -0
  107. package/dist/chunks/KHR_mesh_quantization-CZIcA8DN.esm.min.js.map +1 -0
  108. package/dist/chunks/KHR_mesh_quantization-DG9WNux6.esm.js +26 -0
  109. package/dist/chunks/KHR_mesh_quantization-DG9WNux6.esm.js.map +1 -0
  110. package/dist/chunks/KHR_node_hoverability-C1YMkQ95.esm.js +39 -0
  111. package/dist/chunks/KHR_node_hoverability-C1YMkQ95.esm.js.map +1 -0
  112. package/dist/chunks/KHR_node_hoverability-HxHiCdR9.esm.min.js +2 -0
  113. package/dist/chunks/KHR_node_hoverability-HxHiCdR9.esm.min.js.map +1 -0
  114. package/dist/chunks/KHR_node_visibility-C5tc6GOc.esm.js +46 -0
  115. package/dist/chunks/KHR_node_visibility-C5tc6GOc.esm.js.map +1 -0
  116. package/dist/chunks/KHR_node_visibility-CSqn8wRd.esm.min.js +2 -0
  117. package/dist/chunks/KHR_node_visibility-CSqn8wRd.esm.min.js.map +1 -0
  118. package/dist/chunks/KHR_texture_basisu-DA2FE-qb.esm.min.js +2 -0
  119. package/dist/chunks/KHR_texture_basisu-DA2FE-qb.esm.min.js.map +1 -0
  120. package/dist/chunks/KHR_texture_basisu-KtQL54P-.esm.js +43 -0
  121. package/dist/chunks/KHR_texture_basisu-KtQL54P-.esm.js.map +1 -0
  122. package/dist/chunks/KHR_texture_transform-Cb6Q41F3.esm.js +63 -0
  123. package/dist/chunks/KHR_texture_transform-Cb6Q41F3.esm.js.map +1 -0
  124. package/dist/chunks/KHR_texture_transform-GdBAq_uW.esm.min.js +2 -0
  125. package/dist/chunks/KHR_texture_transform-GdBAq_uW.esm.min.js.map +1 -0
  126. package/dist/chunks/KHR_xmp_json_ld-CD_mkZDv.esm.min.js +2 -0
  127. package/dist/chunks/KHR_xmp_json_ld-CD_mkZDv.esm.min.js.map +1 -0
  128. package/dist/chunks/KHR_xmp_json_ld-f1rcQfsd.esm.js +51 -0
  129. package/dist/chunks/KHR_xmp_json_ld-f1rcQfsd.esm.js.map +1 -0
  130. package/dist/chunks/MSFT_audio_emitter-BU83EIcP.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_audio_emitter-BU83EIcP.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_audio_emitter-ClwdeJaR.esm.js +2201 -0
  133. package/dist/chunks/MSFT_audio_emitter-ClwdeJaR.esm.js.map +1 -0
  134. package/dist/chunks/MSFT_lod-D3MQWFc3.esm.min.js +2 -0
  135. package/dist/chunks/MSFT_lod-D3MQWFc3.esm.min.js.map +1 -0
  136. package/dist/chunks/MSFT_lod-DkM5iXcm.esm.js +337 -0
  137. package/dist/chunks/MSFT_lod-DkM5iXcm.esm.js.map +1 -0
  138. package/dist/chunks/MSFT_minecraftMesh-CG9JY5Ic.esm.min.js +2 -0
  139. package/dist/chunks/MSFT_minecraftMesh-CG9JY5Ic.esm.min.js.map +1 -0
  140. package/dist/chunks/MSFT_minecraftMesh-Cyjdx_Y_.esm.js +46 -0
  141. package/dist/chunks/MSFT_minecraftMesh-Cyjdx_Y_.esm.js.map +1 -0
  142. package/dist/chunks/MSFT_sRGBFactors-Bm3_fRmt.esm.min.js +2 -0
  143. package/dist/chunks/MSFT_sRGBFactors-Bm3_fRmt.esm.min.js.map +1 -0
  144. package/dist/chunks/MSFT_sRGBFactors-uFdNij-4.esm.js +47 -0
  145. package/dist/chunks/MSFT_sRGBFactors-uFdNij-4.esm.js.map +1 -0
  146. package/dist/chunks/animationGroup-CravGs2P.esm.min.js +2 -0
  147. package/dist/chunks/animationGroup-CravGs2P.esm.min.js.map +1 -0
  148. package/dist/chunks/animationGroup-DqmFa1Nk.esm.js +2482 -0
  149. package/dist/chunks/animationGroup-DqmFa1Nk.esm.js.map +1 -0
  150. package/dist/chunks/assetContainer-0Qu2XIWb.esm.js +1720 -0
  151. package/dist/chunks/assetContainer-0Qu2XIWb.esm.js.map +1 -0
  152. package/dist/chunks/assetContainer-CMuD-n3X.esm.min.js +2 -0
  153. package/dist/chunks/assetContainer-CMuD-n3X.esm.min.js.map +1 -0
  154. package/dist/chunks/audioEngine--EMyAh-L.esm.js +305 -0
  155. package/dist/chunks/audioEngine--EMyAh-L.esm.js.map +1 -0
  156. package/dist/chunks/audioEngine-3doZGQV6.esm.min.js +2 -0
  157. package/dist/chunks/audioEngine-3doZGQV6.esm.min.js.map +1 -0
  158. package/dist/chunks/bakedVertexAnimation-DgMI1D24.esm.min.js +2 -0
  159. package/dist/chunks/bakedVertexAnimation-DgMI1D24.esm.min.js.map +1 -0
  160. package/dist/chunks/bakedVertexAnimation-gQlUctpB.esm.js +114 -0
  161. package/dist/chunks/bakedVertexAnimation-gQlUctpB.esm.js.map +1 -0
  162. package/dist/chunks/basisTextureLoader-B0PY0ILM.esm.js +600 -0
  163. package/dist/chunks/basisTextureLoader-B0PY0ILM.esm.js.map +1 -0
  164. package/dist/chunks/basisTextureLoader-ES0mOtqQ.esm.min.js +2 -0
  165. package/dist/chunks/basisTextureLoader-ES0mOtqQ.esm.min.js.map +1 -0
  166. package/dist/chunks/dds-DEZD6DKL.esm.min.js +2 -0
  167. package/dist/chunks/dds-DEZD6DKL.esm.min.js.map +1 -0
  168. package/dist/chunks/dds-HwVEMga8.esm.js +540 -0
  169. package/dist/chunks/dds-HwVEMga8.esm.js.map +1 -0
  170. package/dist/chunks/ddsTextureLoader-3PDKukdG.esm.js +88 -0
  171. package/dist/chunks/ddsTextureLoader-3PDKukdG.esm.js.map +1 -0
  172. package/dist/chunks/ddsTextureLoader-C62DqYdE.esm.min.js +2 -0
  173. package/dist/chunks/ddsTextureLoader-C62DqYdE.esm.min.js.map +1 -0
  174. package/dist/chunks/decalFragment-B9KsZn_u.esm.min.js +2 -0
  175. package/dist/chunks/decalFragment-B9KsZn_u.esm.min.js.map +1 -0
  176. package/dist/chunks/decalFragment-CNA1EQK9.esm.js +18 -0
  177. package/dist/chunks/decalFragment-CNA1EQK9.esm.js.map +1 -0
  178. package/dist/chunks/default.fragment-BsajFq2Q.esm.js +446 -0
  179. package/dist/chunks/default.fragment-BsajFq2Q.esm.js.map +1 -0
  180. package/dist/chunks/default.fragment-C7O2NjXo.esm.min.js +2 -0
  181. package/dist/chunks/default.fragment-C7O2NjXo.esm.min.js.map +1 -0
  182. package/dist/chunks/default.fragment-CNef5Xlg.esm.min.js +2 -0
  183. package/dist/chunks/default.fragment-CNef5Xlg.esm.min.js.map +1 -0
  184. package/dist/chunks/default.fragment-DAO0SBl-.esm.js +515 -0
  185. package/dist/chunks/default.fragment-DAO0SBl-.esm.js.map +1 -0
  186. package/dist/chunks/default.vertex-Ban5pFUb.esm.js +211 -0
  187. package/dist/chunks/default.vertex-Ban5pFUb.esm.js.map +1 -0
  188. package/dist/chunks/default.vertex-CPjp6YBQ.esm.min.js +2 -0
  189. package/dist/chunks/default.vertex-CPjp6YBQ.esm.min.js.map +1 -0
  190. package/dist/chunks/default.vertex-CemfGK4Y.esm.min.js +2 -0
  191. package/dist/chunks/default.vertex-CemfGK4Y.esm.min.js.map +1 -0
  192. package/dist/chunks/default.vertex-QE4cV7Y2.esm.js +190 -0
  193. package/dist/chunks/default.vertex-QE4cV7Y2.esm.js.map +1 -0
  194. package/dist/chunks/defaultUboDeclaration-B5nIsoCQ.esm.min.js +2 -0
  195. package/dist/chunks/defaultUboDeclaration-B5nIsoCQ.esm.min.js.map +1 -0
  196. package/dist/chunks/defaultUboDeclaration-B8tY8ajW.esm.js +15 -0
  197. package/dist/chunks/defaultUboDeclaration-B8tY8ajW.esm.js.map +1 -0
  198. package/dist/chunks/defaultUboDeclaration-D7yr1BRw.esm.js +13 -0
  199. package/dist/chunks/defaultUboDeclaration-D7yr1BRw.esm.js.map +1 -0
  200. package/dist/chunks/defaultUboDeclaration-Db_EQWlv.esm.min.js +2 -0
  201. package/dist/chunks/defaultUboDeclaration-Db_EQWlv.esm.min.js.map +1 -0
  202. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
  203. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
  204. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
  205. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
  206. package/dist/chunks/dumpTools-C13JzZr_.esm.min.js +2 -0
  207. package/dist/chunks/dumpTools-C13JzZr_.esm.min.js.map +1 -0
  208. package/dist/chunks/dumpTools-D6BRv6Ws.esm.js +200 -0
  209. package/dist/chunks/dumpTools-D6BRv6Ws.esm.js.map +1 -0
  210. package/dist/chunks/engine-29lBc-mw.esm.min.js +2 -0
  211. package/dist/chunks/engine-29lBc-mw.esm.min.js.map +1 -0
  212. package/dist/chunks/engine-Bk6S663t.esm.js +2213 -0
  213. package/dist/chunks/engine-Bk6S663t.esm.js.map +1 -0
  214. package/dist/chunks/engine.common-D_DOB0rT.esm.js +1162 -0
  215. package/dist/chunks/engine.common-D_DOB0rT.esm.js.map +1 -0
  216. package/dist/chunks/engine.common-OpqDqcE2.esm.min.js +2 -0
  217. package/dist/chunks/engine.common-OpqDqcE2.esm.min.js.map +1 -0
  218. package/dist/chunks/envTextureLoader-DS13pG9w.esm.js +64 -0
  219. package/dist/chunks/envTextureLoader-DS13pG9w.esm.js.map +1 -0
  220. package/dist/chunks/envTextureLoader-Dt6q0XDu.esm.min.js +2 -0
  221. package/dist/chunks/envTextureLoader-Dt6q0XDu.esm.min.js.map +1 -0
  222. package/dist/chunks/environmentTextureTools-DKN-Hd8c.esm.min.js +2 -0
  223. package/dist/chunks/environmentTextureTools-DKN-Hd8c.esm.min.js.map +1 -0
  224. package/dist/chunks/environmentTextureTools-DWkvV21A.esm.js +382 -0
  225. package/dist/chunks/environmentTextureTools-DWkvV21A.esm.js.map +1 -0
  226. package/dist/chunks/exrTextureLoader-6o4jfUaF.esm.js +1683 -0
  227. package/dist/chunks/exrTextureLoader-6o4jfUaF.esm.js.map +1 -0
  228. package/dist/chunks/exrTextureLoader-CXV9O3pZ.esm.min.js +2 -0
  229. package/dist/chunks/exrTextureLoader-CXV9O3pZ.esm.min.js.map +1 -0
  230. package/dist/chunks/fogFragment-BdOtsPe3.esm.js +102 -0
  231. package/dist/chunks/fogFragment-BdOtsPe3.esm.js.map +1 -0
  232. package/dist/chunks/fogFragment-Cv3Bqrrg.esm.js +101 -0
  233. package/dist/chunks/fogFragment-Cv3Bqrrg.esm.js.map +1 -0
  234. package/dist/chunks/fogFragment-D91rqvp0.esm.min.js +2 -0
  235. package/dist/chunks/fogFragment-D91rqvp0.esm.min.js.map +1 -0
  236. package/dist/chunks/fogFragment-qdYpZbGA.esm.min.js +2 -0
  237. package/dist/chunks/fogFragment-qdYpZbGA.esm.min.js.map +1 -0
  238. package/dist/chunks/fresnelFunction-DBMK4K-2.esm.min.js +2 -0
  239. package/dist/chunks/fresnelFunction-DBMK4K-2.esm.min.js.map +1 -0
  240. package/dist/chunks/fresnelFunction-o5ZOc6C0.esm.js +12 -0
  241. package/dist/chunks/fresnelFunction-o5ZOc6C0.esm.js.map +1 -0
  242. package/dist/chunks/glTFLoader-Dj_JCgqJ.esm.min.js +2 -0
  243. package/dist/chunks/glTFLoader-Dj_JCgqJ.esm.min.js.map +1 -0
  244. package/dist/chunks/glTFLoader-DnWHbX53.esm.js +7693 -0
  245. package/dist/chunks/glTFLoader-DnWHbX53.esm.js.map +1 -0
  246. package/dist/chunks/glTFLoaderAnimation-A_WVS-lt.esm.min.js +2 -0
  247. package/dist/chunks/glTFLoaderAnimation-A_WVS-lt.esm.min.js.map +1 -0
  248. package/dist/chunks/glTFLoaderAnimation-C3gHlipY.esm.js +77 -0
  249. package/dist/chunks/glTFLoaderAnimation-C3gHlipY.esm.js.map +1 -0
  250. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  251. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  252. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  253. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  254. package/dist/chunks/harmonicsFunctions-91QStv6v.esm.min.js +2 -0
  255. package/dist/chunks/harmonicsFunctions-91QStv6v.esm.min.js.map +1 -0
  256. package/dist/chunks/harmonicsFunctions-DBJQNoSA.esm.min.js +2 -0
  257. package/dist/chunks/harmonicsFunctions-DBJQNoSA.esm.min.js.map +1 -0
  258. package/dist/chunks/harmonicsFunctions-DXdlMMN6.esm.js +34 -0
  259. package/dist/chunks/harmonicsFunctions-DXdlMMN6.esm.js.map +1 -0
  260. package/dist/chunks/harmonicsFunctions-VtAD6DeX.esm.js +35 -0
  261. package/dist/chunks/harmonicsFunctions-VtAD6DeX.esm.js.map +1 -0
  262. package/dist/chunks/hdrTextureLoader-CYtpPSzs.esm.js +253 -0
  263. package/dist/chunks/hdrTextureLoader-CYtpPSzs.esm.js.map +1 -0
  264. package/dist/chunks/hdrTextureLoader-CzZ1hV7q.esm.min.js +2 -0
  265. package/dist/chunks/hdrTextureLoader-CzZ1hV7q.esm.min.js.map +1 -0
  266. package/dist/chunks/helperFunctions-Bn3a_gzG.esm.js +110 -0
  267. package/dist/chunks/helperFunctions-Bn3a_gzG.esm.js.map +1 -0
  268. package/dist/chunks/helperFunctions-CA_QOVSE.esm.js +83 -0
  269. package/dist/chunks/helperFunctions-CA_QOVSE.esm.js.map +1 -0
  270. package/dist/chunks/helperFunctions-mebe29sq.esm.min.js +2 -0
  271. package/dist/chunks/helperFunctions-mebe29sq.esm.min.js.map +1 -0
  272. package/dist/chunks/helperFunctions-wIdfkMdZ.esm.min.js +2 -0
  273. package/dist/chunks/helperFunctions-wIdfkMdZ.esm.min.js.map +1 -0
  274. package/dist/chunks/iesTextureLoader-D8_bkaCP.esm.min.js +2 -0
  275. package/dist/chunks/iesTextureLoader-D8_bkaCP.esm.min.js.map +1 -0
  276. package/dist/chunks/iesTextureLoader-K1MQUalq.esm.js +189 -0
  277. package/dist/chunks/iesTextureLoader-K1MQUalq.esm.js.map +1 -0
  278. package/dist/chunks/index-Bo5F_mGk.esm.min.js +57 -0
  279. package/dist/chunks/index-Bo5F_mGk.esm.min.js.map +1 -0
  280. package/dist/chunks/index-Dlf001gP.esm.js +74889 -0
  281. package/dist/chunks/index-Dlf001gP.esm.js.map +1 -0
  282. package/dist/chunks/ktxTextureLoader-B6UHYOxL.esm.js +814 -0
  283. package/dist/chunks/ktxTextureLoader-B6UHYOxL.esm.js.map +1 -0
  284. package/dist/chunks/ktxTextureLoader-s_dbtiwN.esm.min.js +2 -0
  285. package/dist/chunks/ktxTextureLoader-s_dbtiwN.esm.min.js.map +1 -0
  286. package/dist/chunks/logDepthDeclaration--xmemf5p.esm.min.js +2 -0
  287. package/dist/chunks/logDepthDeclaration--xmemf5p.esm.min.js.map +1 -0
  288. package/dist/chunks/logDepthDeclaration-Babs-3_m.esm.js +35 -0
  289. package/dist/chunks/logDepthDeclaration-Babs-3_m.esm.js.map +1 -0
  290. package/dist/chunks/logDepthDeclaration-BvoznvSG.esm.min.js +2 -0
  291. package/dist/chunks/logDepthDeclaration-BvoznvSG.esm.min.js.map +1 -0
  292. package/dist/chunks/logDepthDeclaration-_EPT9ybx.esm.js +11 -0
  293. package/dist/chunks/logDepthDeclaration-_EPT9ybx.esm.js.map +1 -0
  294. package/dist/chunks/logDepthVertex-0vve_qKh.esm.js +77 -0
  295. package/dist/chunks/logDepthVertex-0vve_qKh.esm.js.map +1 -0
  296. package/dist/chunks/logDepthVertex-BkGmO8_s.esm.js +81 -0
  297. package/dist/chunks/logDepthVertex-BkGmO8_s.esm.js.map +1 -0
  298. package/dist/chunks/logDepthVertex-CVcNpHQe.esm.min.js +2 -0
  299. package/dist/chunks/logDepthVertex-CVcNpHQe.esm.min.js.map +1 -0
  300. package/dist/chunks/logDepthVertex-DL8eWalk.esm.min.js +2 -0
  301. package/dist/chunks/logDepthVertex-DL8eWalk.esm.min.js.map +1 -0
  302. package/dist/chunks/mainUVVaryingDeclaration-9DUO7sPf.esm.js +11 -0
  303. package/dist/chunks/mainUVVaryingDeclaration-9DUO7sPf.esm.js.map +1 -0
  304. package/dist/chunks/mainUVVaryingDeclaration-DXZGPs7O.esm.js +11 -0
  305. package/dist/chunks/mainUVVaryingDeclaration-DXZGPs7O.esm.js.map +1 -0
  306. package/dist/chunks/mainUVVaryingDeclaration-DaFtbg5X.esm.min.js +2 -0
  307. package/dist/chunks/mainUVVaryingDeclaration-DaFtbg5X.esm.min.js.map +1 -0
  308. package/dist/chunks/mainUVVaryingDeclaration-lKBcMFcP.esm.min.js +2 -0
  309. package/dist/chunks/mainUVVaryingDeclaration-lKBcMFcP.esm.min.js.map +1 -0
  310. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +119 -0
  311. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +1 -0
  312. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +2 -0
  313. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +1 -0
  314. package/dist/chunks/meshUboDeclaration-BN0BlYEZ.esm.js +26 -0
  315. package/dist/chunks/meshUboDeclaration-BN0BlYEZ.esm.js.map +1 -0
  316. package/dist/chunks/meshUboDeclaration-BcQ1P_co.esm.min.js +2 -0
  317. package/dist/chunks/meshUboDeclaration-BcQ1P_co.esm.min.js.map +1 -0
  318. package/dist/chunks/objFileLoader-Lx7JtYFA.esm.min.js +2 -0
  319. package/dist/chunks/objFileLoader-Lx7JtYFA.esm.min.js.map +1 -0
  320. package/dist/chunks/objFileLoader-_nxEPYB4.esm.js +1338 -0
  321. package/dist/chunks/objFileLoader-_nxEPYB4.esm.js.map +1 -0
  322. package/dist/chunks/oitFragment-BPgREULe.esm.js +1240 -0
  323. package/dist/chunks/oitFragment-BPgREULe.esm.js.map +1 -0
  324. package/dist/chunks/oitFragment-CKNxTV0T.esm.min.js +2 -0
  325. package/dist/chunks/oitFragment-CKNxTV0T.esm.min.js.map +1 -0
  326. package/dist/chunks/oitFragment-CT3oWGRL.esm.js +1078 -0
  327. package/dist/chunks/oitFragment-CT3oWGRL.esm.js.map +1 -0
  328. package/dist/chunks/oitFragment-CXrV_64a.esm.min.js +2 -0
  329. package/dist/chunks/oitFragment-CXrV_64a.esm.min.js.map +1 -0
  330. package/dist/chunks/pass.fragment-BugqjVKo.esm.js +15 -0
  331. package/dist/chunks/pass.fragment-BugqjVKo.esm.js.map +1 -0
  332. package/dist/chunks/pass.fragment-X-KK3tOa.esm.min.js +2 -0
  333. package/dist/chunks/pass.fragment-X-KK3tOa.esm.min.js.map +1 -0
  334. package/dist/chunks/pass.fragment-pJ1J3AeO.esm.min.js +2 -0
  335. package/dist/chunks/pass.fragment-pJ1J3AeO.esm.min.js.map +1 -0
  336. package/dist/chunks/pass.fragment-tk9KCmM-.esm.js +15 -0
  337. package/dist/chunks/pass.fragment-tk9KCmM-.esm.js.map +1 -0
  338. package/dist/chunks/pbr.fragment-C4BFWzEP.esm.js +3269 -0
  339. package/dist/chunks/pbr.fragment-C4BFWzEP.esm.js.map +1 -0
  340. package/dist/chunks/pbr.fragment-CTE0zFNb.esm.min.js +2 -0
  341. package/dist/chunks/pbr.fragment-CTE0zFNb.esm.min.js.map +1 -0
  342. package/dist/chunks/pbr.fragment-DZRIiJzv.esm.js +3222 -0
  343. package/dist/chunks/pbr.fragment-DZRIiJzv.esm.js.map +1 -0
  344. package/dist/chunks/pbr.fragment-Dk1kkP87.esm.min.js +2 -0
  345. package/dist/chunks/pbr.fragment-Dk1kkP87.esm.min.js.map +1 -0
  346. package/dist/chunks/pbr.vertex-Ba8BDEep.esm.min.js +2 -0
  347. package/dist/chunks/pbr.vertex-Ba8BDEep.esm.min.js.map +1 -0
  348. package/dist/chunks/pbr.vertex-DM2WONhK.esm.js +223 -0
  349. package/dist/chunks/pbr.vertex-DM2WONhK.esm.js.map +1 -0
  350. package/dist/chunks/pbr.vertex-DVghYyb7.esm.min.js +2 -0
  351. package/dist/chunks/pbr.vertex-DVghYyb7.esm.min.js.map +1 -0
  352. package/dist/chunks/pbr.vertex-DiVjR6Bs.esm.js +348 -0
  353. package/dist/chunks/pbr.vertex-DiVjR6Bs.esm.js.map +1 -0
  354. package/dist/chunks/postprocess.vertex-CtVD6qfW.esm.min.js +2 -0
  355. package/dist/chunks/postprocess.vertex-CtVD6qfW.esm.min.js.map +1 -0
  356. package/dist/chunks/postprocess.vertex-DntzOpKV.esm.js +20 -0
  357. package/dist/chunks/postprocess.vertex-DntzOpKV.esm.js.map +1 -0
  358. package/dist/chunks/rawTexture-BAt5J3G4.esm.min.js +2 -0
  359. package/dist/chunks/rawTexture-BAt5J3G4.esm.min.js.map +1 -0
  360. package/dist/chunks/rawTexture-D0O_yrdQ.esm.js +191 -0
  361. package/dist/chunks/rawTexture-D0O_yrdQ.esm.js.map +1 -0
  362. package/dist/chunks/ray-Bbt37I0I.esm.js +946 -0
  363. package/dist/chunks/ray-Bbt37I0I.esm.js.map +1 -0
  364. package/dist/chunks/ray-OQ0d0a-k.esm.min.js +2 -0
  365. package/dist/chunks/ray-OQ0d0a-k.esm.min.js.map +1 -0
  366. package/dist/chunks/rgbdDecode.fragment-4HjKGwMm.esm.min.js +2 -0
  367. package/dist/chunks/rgbdDecode.fragment-4HjKGwMm.esm.min.js.map +1 -0
  368. package/dist/chunks/rgbdDecode.fragment-CKVGwRZO.esm.js +13 -0
  369. package/dist/chunks/rgbdDecode.fragment-CKVGwRZO.esm.js.map +1 -0
  370. package/dist/chunks/rgbdDecode.fragment-Cn6YVnkB.esm.js +13 -0
  371. package/dist/chunks/rgbdDecode.fragment-Cn6YVnkB.esm.js.map +1 -0
  372. package/dist/chunks/rgbdDecode.fragment-DwcDy8Eo.esm.min.js +2 -0
  373. package/dist/chunks/rgbdDecode.fragment-DwcDy8Eo.esm.min.js.map +1 -0
  374. package/dist/chunks/rgbdEncode.fragment-BUluDIqG.esm.min.js +2 -0
  375. package/dist/chunks/rgbdEncode.fragment-BUluDIqG.esm.min.js.map +1 -0
  376. package/dist/chunks/rgbdEncode.fragment-CEiZq0Qt.esm.js +13 -0
  377. package/dist/chunks/rgbdEncode.fragment-CEiZq0Qt.esm.js.map +1 -0
  378. package/dist/chunks/rgbdEncode.fragment-CY0yYtEl.esm.js +13 -0
  379. package/dist/chunks/rgbdEncode.fragment-CY0yYtEl.esm.js.map +1 -0
  380. package/dist/chunks/rgbdEncode.fragment-DS4_h_Qc.esm.min.js +2 -0
  381. package/dist/chunks/rgbdEncode.fragment-DS4_h_Qc.esm.min.js.map +1 -0
  382. package/dist/chunks/splatFileLoader-C9ykR2nU.esm.js +3387 -0
  383. package/dist/chunks/splatFileLoader-C9ykR2nU.esm.js.map +1 -0
  384. package/dist/chunks/splatFileLoader-fz6lXWf1.esm.min.js +2 -0
  385. package/dist/chunks/splatFileLoader-fz6lXWf1.esm.min.js.map +1 -0
  386. package/dist/chunks/spotLight-BJUVKiS1.esm.min.js +2 -0
  387. package/dist/chunks/spotLight-BJUVKiS1.esm.min.js.map +1 -0
  388. package/dist/chunks/spotLight-DPadbSE2.esm.js +701 -0
  389. package/dist/chunks/spotLight-DPadbSE2.esm.js.map +1 -0
  390. package/dist/chunks/standardMaterial-BFBsF3pv.esm.min.js +2 -0
  391. package/dist/chunks/standardMaterial-BFBsF3pv.esm.min.js.map +1 -0
  392. package/dist/chunks/standardMaterial-eJkfs5dX.esm.js +1807 -0
  393. package/dist/chunks/standardMaterial-eJkfs5dX.esm.js.map +1 -0
  394. package/dist/chunks/stlFileLoader-D-4wZdg7.esm.js +238 -0
  395. package/dist/chunks/stlFileLoader-D-4wZdg7.esm.js.map +1 -0
  396. package/dist/chunks/stlFileLoader-DFdDdaYW.esm.min.js +2 -0
  397. package/dist/chunks/stlFileLoader-DFdDdaYW.esm.min.js.map +1 -0
  398. package/dist/chunks/tgaTextureLoader-84Uwk9uE.esm.min.js +2 -0
  399. package/dist/chunks/tgaTextureLoader-84Uwk9uE.esm.min.js.map +1 -0
  400. package/dist/chunks/tgaTextureLoader-DDAxGDFK.esm.js +349 -0
  401. package/dist/chunks/tgaTextureLoader-DDAxGDFK.esm.js.map +1 -0
  402. package/dist/chunks/thinEngine-CiBi1yBe.esm.min.js +2 -0
  403. package/dist/chunks/thinEngine-CiBi1yBe.esm.min.js.map +1 -0
  404. package/dist/chunks/thinEngine-iDkoF96X.esm.js +3848 -0
  405. package/dist/chunks/thinEngine-iDkoF96X.esm.js.map +1 -0
  406. package/dist/chunks/thinInstanceMesh-DGBYkFXN.esm.js +314 -0
  407. package/dist/chunks/thinInstanceMesh-DGBYkFXN.esm.js.map +1 -0
  408. package/dist/chunks/thinInstanceMesh-MROq1d7v.esm.min.js +2 -0
  409. package/dist/chunks/thinInstanceMesh-MROq1d7v.esm.min.js.map +1 -0
  410. package/dist/chunks/vertexColorMixing-0VXbzCuF.esm.js +428 -0
  411. package/dist/chunks/vertexColorMixing-0VXbzCuF.esm.js.map +1 -0
  412. package/dist/chunks/vertexColorMixing-B3GD6hE2.esm.js +538 -0
  413. package/dist/chunks/vertexColorMixing-B3GD6hE2.esm.js.map +1 -0
  414. package/dist/chunks/vertexColorMixing-ClVYo-h9.esm.min.js +2 -0
  415. package/dist/chunks/vertexColorMixing-ClVYo-h9.esm.min.js.map +1 -0
  416. package/dist/chunks/vertexColorMixing-j0Dix_Wy.esm.min.js +2 -0
  417. package/dist/chunks/vertexColorMixing-j0Dix_Wy.esm.min.js.map +1 -0
  418. package/dist/chunks/webgpuEngine-BLhhEybd.esm.min.js +2 -0
  419. package/dist/chunks/webgpuEngine-BLhhEybd.esm.min.js.map +1 -0
  420. package/dist/chunks/webgpuEngine-Cs5fkngY.esm.js +11533 -0
  421. package/dist/chunks/webgpuEngine-Cs5fkngY.esm.js.map +1 -0
  422. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  423. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  424. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  425. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  426. package/lib/index.d.ts +591 -0
  427. package/lib/index.js +2165 -0
  428. package/lib/index.js.map +1 -0
  429. package/package.json +19 -28
  430. package/readme.md +28 -28
  431. package/configuration/configuration.d.ts +0 -107
  432. package/configuration/configuration.js +0 -16
  433. package/configuration/configuration.js.map +0 -1
  434. package/configuration/configurationCompatibility.d.ts +0 -8
  435. package/configuration/configurationCompatibility.js +0 -66
  436. package/configuration/configurationCompatibility.js.map +0 -1
  437. package/configuration/configurationContainer.d.ts +0 -10
  438. package/configuration/configurationContainer.js +0 -10
  439. package/configuration/configurationContainer.js.map +0 -1
  440. package/configuration/globals.d.ts +0 -6
  441. package/configuration/globals.js +0 -18
  442. package/configuration/globals.js.map +0 -1
  443. package/configuration/index.d.ts +0 -2
  444. package/configuration/index.js +0 -4
  445. package/configuration/index.js.map +0 -1
  446. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  447. package/configuration/interfaces/cameraConfiguration.js +0 -2
  448. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  449. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  450. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  451. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  452. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  453. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  454. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  455. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  456. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  457. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  458. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  459. package/configuration/interfaces/groundConfiguration.js +0 -2
  460. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  461. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  462. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  463. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  464. package/configuration/interfaces/index.d.ts +0 -15
  465. package/configuration/interfaces/index.js +0 -16
  466. package/configuration/interfaces/index.js.map +0 -1
  467. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  468. package/configuration/interfaces/lightConfiguration.js +0 -2
  469. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  470. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  471. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  472. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  473. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  474. package/configuration/interfaces/modelConfiguration.js +0 -2
  475. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  476. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  477. package/configuration/interfaces/observersConfiguration.js +0 -2
  478. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  479. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  480. package/configuration/interfaces/sceneConfiguration.js +0 -2
  481. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  482. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  483. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  484. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  485. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  486. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  487. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  488. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  489. package/configuration/interfaces/templateConfiguration.js +0 -2
  490. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  491. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  492. package/configuration/interfaces/vrConfiguration.js +0 -2
  493. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  494. package/configuration/loader.d.ts +0 -4
  495. package/configuration/loader.js +0 -17
  496. package/configuration/loader.js.map +0 -1
  497. package/configuration/mappers.d.ts +0 -43
  498. package/configuration/mappers.js +0 -193
  499. package/configuration/mappers.js.map +0 -1
  500. package/configuration/renderOnlyLoader.d.ts +0 -33
  501. package/configuration/renderOnlyLoader.js +0 -162
  502. package/configuration/renderOnlyLoader.js.map +0 -1
  503. package/configuration/types/default.d.ts +0 -6
  504. package/configuration/types/default.js +0 -121
  505. package/configuration/types/default.js.map +0 -1
  506. package/configuration/types/environmentMap.d.ts +0 -5
  507. package/configuration/types/environmentMap.js +0 -14
  508. package/configuration/types/environmentMap.js.map +0 -1
  509. package/configuration/types/extended.d.ts +0 -6
  510. package/configuration/types/extended.js +0 -317
  511. package/configuration/types/extended.js.map +0 -1
  512. package/configuration/types/index.d.ts +0 -14
  513. package/configuration/types/index.js +0 -51
  514. package/configuration/types/index.js.map +0 -1
  515. package/configuration/types/minimal.d.ts +0 -6
  516. package/configuration/types/minimal.js +0 -43
  517. package/configuration/types/minimal.js.map +0 -1
  518. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  519. package/configuration/types/renderOnlyDefault.js +0 -31
  520. package/configuration/types/renderOnlyDefault.js.map +0 -1
  521. package/configuration/types/shadowLight.d.ts +0 -9
  522. package/configuration/types/shadowLight.js +0 -64
  523. package/configuration/types/shadowLight.js.map +0 -1
  524. package/helper/index.d.ts +0 -29
  525. package/helper/index.js +0 -66
  526. package/helper/index.js.map +0 -1
  527. package/index.d.ts +0 -30
  528. package/index.js +0 -46
  529. package/index.js.map +0 -1
  530. package/initializer.d.ts +0 -11
  531. package/initializer.js +0 -35
  532. package/initializer.js.map +0 -1
  533. package/interfaces.d.ts +0 -5
  534. package/interfaces.js +0 -7
  535. package/interfaces.js.map +0 -1
  536. package/labs/environmentSerializer.d.ts +0 -126
  537. package/labs/environmentSerializer.js +0 -191
  538. package/labs/environmentSerializer.js.map +0 -1
  539. package/labs/texture.d.ts +0 -183
  540. package/labs/texture.js +0 -351
  541. package/labs/texture.js.map +0 -1
  542. package/labs/viewerLabs.d.ts +0 -51
  543. package/labs/viewerLabs.js +0 -134
  544. package/labs/viewerLabs.js.map +0 -1
  545. package/loader/modelLoader.d.ts +0 -56
  546. package/loader/modelLoader.js +0 -202
  547. package/loader/modelLoader.js.map +0 -1
  548. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  549. package/loader/plugins/applyMaterialConfig.js +0 -16
  550. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  551. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  552. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  553. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  554. package/loader/plugins/index.d.ts +0 -19
  555. package/loader/plugins/index.js +0 -44
  556. package/loader/plugins/index.js.map +0 -1
  557. package/loader/plugins/loaderPlugin.d.ts +0 -24
  558. package/loader/plugins/loaderPlugin.js +0 -2
  559. package/loader/plugins/loaderPlugin.js.map +0 -1
  560. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  561. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  562. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  563. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  564. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  565. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  566. package/managers/observablesManager.d.ts +0 -66
  567. package/managers/observablesManager.js +0 -35
  568. package/managers/observablesManager.js.map +0 -1
  569. package/managers/sceneManager.d.ts +0 -245
  570. package/managers/sceneManager.js +0 -1375
  571. package/managers/sceneManager.js.map +0 -1
  572. package/managers/telemetryManager.d.ts +0 -78
  573. package/managers/telemetryManager.js +0 -117
  574. package/managers/telemetryManager.js.map +0 -1
  575. package/model/modelAnimation.d.ts +0 -215
  576. package/model/modelAnimation.js +0 -237
  577. package/model/modelAnimation.js.map +0 -1
  578. package/model/viewerModel.d.ts +0 -233
  579. package/model/viewerModel.js +0 -673
  580. package/model/viewerModel.js.map +0 -1
  581. package/optimizer/custom/extended.d.ts +0 -13
  582. package/optimizer/custom/extended.js +0 -101
  583. package/optimizer/custom/extended.js.map +0 -1
  584. package/optimizer/custom/index.d.ts +0 -9
  585. package/optimizer/custom/index.js +0 -26
  586. package/optimizer/custom/index.js.map +0 -1
  587. package/renderOnlyIndex.d.ts +0 -11
  588. package/renderOnlyIndex.js +0 -18
  589. package/renderOnlyIndex.js.map +0 -1
  590. package/templating/eventManager.d.ts +0 -35
  591. package/templating/eventManager.js +0 -66
  592. package/templating/eventManager.js.map +0 -1
  593. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  594. package/templating/plugins/hdButtonPlugin.js +0 -22
  595. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  596. package/templating/plugins/printButton.d.ts +0 -9
  597. package/templating/plugins/printButton.js +0 -41
  598. package/templating/plugins/printButton.js.map +0 -1
  599. package/templating/templateManager.d.ts +0 -197
  600. package/templating/templateManager.js +0 -561
  601. package/templating/templateManager.js.map +0 -1
  602. package/templating/viewerTemplatePlugin.d.ts +0 -21
  603. package/templating/viewerTemplatePlugin.js +0 -69
  604. package/templating/viewerTemplatePlugin.js.map +0 -1
  605. package/viewer/defaultViewer.d.ts +0 -130
  606. package/viewer/defaultViewer.js +0 -672
  607. package/viewer/defaultViewer.js.map +0 -1
  608. package/viewer/renderOnlyViewer.d.ts +0 -9
  609. package/viewer/renderOnlyViewer.js +0 -46
  610. package/viewer/renderOnlyViewer.js.map +0 -1
  611. package/viewer/viewer.d.ts +0 -258
  612. package/viewer/viewer.js +0 -783
  613. package/viewer/viewer.js.map +0 -1
  614. package/viewer/viewerManager.d.ts +0 -58
  615. package/viewer/viewerManager.js +0 -91
  616. package/viewer/viewerManager.js.map +0 -1
  617. package/viewer/viewerWithTemplate.d.ts +0 -9
  618. package/viewer/viewerWithTemplate.js +0 -20
  619. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_lights_punctual-DWGx9KlE.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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;"}
@@ -0,0 +1,2 @@
1
+ import{aX as t,v as o,aY as e,a5 as i,C as s,an as r,ar as h,R as n,s as a,aQ as d,aR as u}from"./index-Bo5F_mGk.esm.min.js";import{S as f,a as l}from"./spotLight-BJUVKiS1.esm.min.js";import{A as c,G as m}from"./glTFLoader-Dj_JCgqJ.esm.min.js";import"./rawTexture-BAt5J3G4.esm.min.js";import"./assetContainer-CMuD-n3X.esm.min.js";import"./glTFLoaderAnimation-A_WVS-lt.esm.min.js";t.AddNodeConstructor("Light_Type_1",((t,e)=>()=>new _(t,o.Zero(),e)));class _ extends f{get shadowFrustumSize(){return this._shadowFrustumSize}set shadowFrustumSize(t){this._shadowFrustumSize=t,this.forceProjectionMatrixCompute()}get shadowOrthoScale(){return this._shadowOrthoScale}set shadowOrthoScale(t){this._shadowOrthoScale=t,this.forceProjectionMatrixCompute()}get orthoLeft(){return this._orthoLeft}set orthoLeft(t){this._orthoLeft=t}get orthoRight(){return this._orthoRight}set orthoRight(t){this._orthoRight=t}get orthoTop(){return this._orthoTop}set orthoTop(t){this._orthoTop=t}get orthoBottom(){return this._orthoBottom}set orthoBottom(t){this._orthoBottom=t}constructor(t,o,e){super(t,e),this._shadowFrustumSize=0,this._shadowOrthoScale=.1,this.autoUpdateExtends=!0,this.autoCalcShadowZBounds=!1,this._orthoLeft=Number.MAX_VALUE,this._orthoRight=Number.MIN_VALUE,this._orthoTop=Number.MIN_VALUE,this._orthoBottom=Number.MAX_VALUE,this.position=o.scale(-1),this.direction=o}getClassName(){return"DirectionalLight"}getTypeID(){return e.LIGHTTYPEID_DIRECTIONALLIGHT}_setDefaultShadowProjectionMatrix(t,o,e){this.shadowFrustumSize>0?this._setDefaultFixedFrustumShadowProjectionMatrix(t):this._setDefaultAutoExtendShadowProjectionMatrix(t,o,e)}_setDefaultFixedFrustumShadowProjectionMatrix(t){const o=this.getScene().activeCamera;o&&i.OrthoLHToRef(this.shadowFrustumSize,this.shadowFrustumSize,void 0!==this.shadowMinZ?this.shadowMinZ:o.minZ,void 0!==this.shadowMaxZ?this.shadowMaxZ:o.maxZ,t,this.getScene().getEngine().isNDCHalfZRange)}_setDefaultAutoExtendShadowProjectionMatrix(t,e,r){const h=this.getScene().activeCamera;if(this.autoUpdateExtends||this._orthoLeft===Number.MAX_VALUE){const t=o.Zero();this._orthoLeft=Number.MAX_VALUE,this._orthoRight=-Number.MAX_VALUE,this._orthoTop=-Number.MAX_VALUE,this._orthoBottom=Number.MAX_VALUE;let i=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(let h=0;h<r.length;h++){const n=r[h];if(!n)continue;const a=n.getBoundingInfo().boundingBox;for(let r=0;r<a.vectorsWorld.length;r++)o.TransformCoordinatesToRef(a.vectorsWorld[r],e,t),t.x<this._orthoLeft&&(this._orthoLeft=t.x),t.y<this._orthoBottom&&(this._orthoBottom=t.y),t.x>this._orthoRight&&(this._orthoRight=t.x),t.y>this._orthoTop&&(this._orthoTop=t.y),this.autoCalcShadowZBounds&&(t.z<i&&(i=t.z),t.z>s&&(s=t.z))}this.autoCalcShadowZBounds&&(this._shadowMinZ=i,this._shadowMaxZ=s)}const n=this._orthoRight-this._orthoLeft,a=this._orthoTop-this._orthoBottom,d=void 0!==this.shadowMinZ?this.shadowMinZ:h?.minZ||s.ShadowMinZ,u=void 0!==this.shadowMaxZ?this.shadowMaxZ:h?.maxZ||s.ShadowMaxZ,f=this.getScene().getEngine().useReverseDepthBuffer;i.OrthoOffCenterLHToRef(this._orthoLeft-n*this.shadowOrthoScale,this._orthoRight+n*this.shadowOrthoScale,this._orthoBottom-a*this.shadowOrthoScale,this._orthoTop+a*this.shadowOrthoScale,f?u:d,f?d:u,t,this.getScene().getEngine().isNDCHalfZRange)}_buildUniformLayout(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()}transferToEffect(t,o){return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z,1,o),this):(this._uniformBuffer.updateFloat4("vLightData",this.direction.x,this.direction.y,this.direction.z,1,o),this)}transferToNodeMaterialEffect(t,o){return this.computeTransformedInformation()?(t.setFloat3(o,this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z),this):(t.setFloat3(o,this.direction.x,this.direction.y,this.direction.z),this)}getDepthMinZ(t){const o=this._scene.getEngine();return!o.useReverseDepthBuffer&&o.isNDCHalfZRange?0:1}getDepthMaxZ(t){const o=this._scene.getEngine();return o.useReverseDepthBuffer&&o.isNDCHalfZRange?0:1}prepareLightSpecificDefines(t,o){t["DIRLIGHT"+o]=!0}}r([h()],_.prototype,"shadowFrustumSize",null),r([h()],_.prototype,"shadowOrthoScale",null),r([h()],_.prototype,"autoUpdateExtends",void 0),r([h()],_.prototype,"autoCalcShadowZBounds",void 0),r([h("orthoLeft")],_.prototype,"_orthoLeft",void 0),r([h("orthoRight")],_.prototype,"_orthoRight",void 0),r([h("orthoTop")],_.prototype,"_orthoTop",void 0),r([h("orthoBottom")],_.prototype,"_orthoBottom",void 0),n("BABYLON.DirectionalLight",_),t.AddNodeConstructor("Light_Type_0",((t,e)=>()=>new g(t,o.Zero(),e)));class g extends f{get shadowAngle(){return this._shadowAngle}set shadowAngle(t){this._shadowAngle=t,this.forceProjectionMatrixCompute()}get direction(){return this._direction}set direction(t){const o=this.needCube();if(this._direction=t,this.needCube()!==o&&this._shadowGenerators){const t=this._shadowGenerators.values();for(let o=t.next();!0!==o.done;o=t.next()){o.value.recreateShadowMap()}}}constructor(t,o,e){super(t,e),this._shadowAngle=Math.PI/2,this.position=o}getClassName(){return"PointLight"}getTypeID(){return e.LIGHTTYPEID_POINTLIGHT}needCube(){return!this.direction}getShadowDirection(t){if(this.direction)return super.getShadowDirection(t);switch(t){case 0:return new o(1,0,0);case 1:return new o(-1,0,0);case 2:return new o(0,-1,0);case 3:return new o(0,1,0);case 4:return new o(0,0,1);case 5:return new o(0,0,-1)}return o.Zero()}_setDefaultShadowProjectionMatrix(t,o,e){const s=this.getScene().activeCamera;if(!s)return;const r=void 0!==this.shadowMinZ?this.shadowMinZ:s.minZ,h=void 0!==this.shadowMaxZ?this.shadowMaxZ:s.maxZ,n=this.getScene().getEngine().useReverseDepthBuffer;i.PerspectiveFovLHToRef(this.shadowAngle,1,n?h:r,n?r:h,t,!0,this._scene.getEngine().isNDCHalfZRange,void 0,n)}_buildUniformLayout(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("vLightFalloff",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()}transferToEffect(t,o){return this.computeTransformedInformation()?this._uniformBuffer.updateFloat4("vLightData",this.transformedPosition.x,this.transformedPosition.y,this.transformedPosition.z,0,o):this._uniformBuffer.updateFloat4("vLightData",this.position.x,this.position.y,this.position.z,0,o),this._uniformBuffer.updateFloat4("vLightFalloff",this.range,this._inverseSquaredRange,0,0,o),this}transferToNodeMaterialEffect(t,o){return this.computeTransformedInformation()?t.setFloat3(o,this.transformedPosition.x,this.transformedPosition.y,this.transformedPosition.z):t.setFloat3(o,this.position.x,this.position.y,this.position.z),this}prepareLightSpecificDefines(t,o){t["POINTLIGHT"+o]=!0}}r([h()],g.prototype,"shadowAngle",null),n("BABYLON.PointLight",g);const p="KHR_lights_punctual";class w{constructor(t){this.name=p,this._loader=t,this.enabled=this._loader.isExtensionUsed(p)}dispose(){this._loader=null,delete this._lights}onLoading(){const t=this._loader.gltf.extensions;if(t&&t[this.name]){const o=t[this.name];this._lights=o.lights,c.Assign(this._lights)}}loadNodeAsync(t,i,s){return m.LoadExtensionAsync(t,i,this.name,((r,h)=>(this._loader._allMaterialsDirtyRequired=!0,this._loader.loadNodeAsync(t,i,(t=>{let i;const n=c.Get(r,this._lights,h.light),d=n.name||t.name;switch(this._loader.babylonScene._blockEntityCollection=!!this._loader._assetContainer,n.type){case"directional":{const t=new _(d,o.Backward(),this._loader.babylonScene);t.position.setAll(0),i=t;break}case"point":i=new g(d,o.Zero(),this._loader.babylonScene);break;case"spot":{const t=new l(d,o.Zero(),o.Backward(),0,1,this._loader.babylonScene);t.angle=2*(n.spot&&n.spot.outerConeAngle||Math.PI/4),t.innerAngle=2*(n.spot&&n.spot.innerConeAngle||0),i=t;break}default:throw this._loader.babylonScene._blockEntityCollection=!1,new Error(`${r}: Invalid light type (${n.type})`)}i._parentContainer=this._loader._assetContainer,this._loader.babylonScene._blockEntityCollection=!1,n._babylonLight=i,i.falloffType=e.FALLOFF_GLTF,i.diffuse=n.color?a.FromArray(n.color):a.White(),i.intensity=null==n.intensity?1:n.intensity,i.range=null==n.range?Number.MAX_VALUE:n.range,i.parent=t,this._loader._babylonLights.push(i),m.AddPointerMetadata(i,r),s(t)})))))}}d(p),u(p,!0,(t=>new w(t)));export{w as KHR_lights};
2
+ //# sourceMappingURL=KHR_lights_punctual-cz3ulMW0.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_lights_punctual-cz3ulMW0.esm.min.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":["Node","AddNodeConstructor","name","scene","DirectionalLight","Vector3","Zero","ShadowLight","shadowFrustumSize","this","_shadowFrustumSize","value","forceProjectionMatrixCompute","shadowOrthoScale","_shadowOrthoScale","orthoLeft","_orthoLeft","left","orthoRight","_orthoRight","right","orthoTop","_orthoTop","top","orthoBottom","_orthoBottom","bottom","constructor","direction","super","autoUpdateExtends","autoCalcShadowZBounds","Number","MAX_VALUE","MIN_VALUE","position","scale","getClassName","getTypeID","Light","LIGHTTYPEID_DIRECTIONALLIGHT","_setDefaultShadowProjectionMatrix","matrix","viewMatrix","renderList","_setDefaultFixedFrustumShadowProjectionMatrix","_setDefaultAutoExtendShadowProjectionMatrix","activeCamera","getScene","Matrix","OrthoLHToRef","undefined","shadowMinZ","minZ","shadowMaxZ","maxZ","getEngine","isNDCHalfZRange","tempVector3","meshIndex","length","mesh","boundingBox","getBoundingInfo","index","vectorsWorld","TransformCoordinatesToRef","x","y","z","_shadowMinZ","_shadowMaxZ","xOffset","yOffset","Constants","ShadowMinZ","ShadowMaxZ","useReverseDepthBuffer","OrthoOffCenterLHToRef","_buildUniformLayout","_uniformBuffer","addUniform","create","transferToEffect","effect","lightIndex","computeTransformedInformation","updateFloat4","transformedDirection","transferToNodeMaterialEffect","lightDataUniformName","setFloat3","getDepthMinZ","_activeCamera","engine","_scene","getDepthMaxZ","prepareLightSpecificDefines","defines","__decorate","serialize","prototype","RegisterClass","PointLight","shadowAngle","_shadowAngle","_direction","previousNeedCube","needCube","_shadowGenerators","iterator","values","key","next","done","recreateShadowMap","Math","PI","LIGHTTYPEID_POINTLIGHT","getShadowDirection","faceIndex","PerspectiveFovLHToRef","transformedPosition","range","_inverseSquaredRange","NAME","KHR_lights","loader","_loader","enabled","isExtensionUsed","dispose","_lights","onLoading","extensions","gltf","extension","lights","ArrayItem","Assign","loadNodeAsync","context","node","assign","GLTFLoader","LoadExtensionAsync","extensionContext","_allMaterialsDirtyRequired","babylonMesh","babylonLight","light","Get","babylonScene","_blockEntityCollection","_assetContainer","type","babylonDirectionalLight","Backward","setAll","babylonSpotLight","SpotLight","angle","spot","outerConeAngle","innerAngle","innerConeAngle","Error","_parentContainer","_babylonLight","falloffType","FALLOFF_GLTF","diffuse","color","Color3","FromArray","White","intensity","parent","_babylonLights","push","AddPointerMetadata","unregisterGLTFExtension","registerGLTFExtension"],"mappings":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J,WAAY,EAAG,EAAGpJ,KAAKuH,QAAQwB,cACpGO,EAAiBE,MAAqE,GAA3DX,EAAMY,MAAQZ,EAAMY,KAAKC,gBAAmB/C,KAAKC,GAAK,GACjF0C,EAAiBK,WAAgE,GAAjDd,EAAMY,MAAQZ,EAAMY,KAAKG,gBAAmB,GAC5EhB,EAAeU,EACf,KACxB,CACoB,QAEI,MADAtJ,KAAKuH,QAAQwB,aAAaC,wBAAyB,EAC7C,IAAIa,MAAM,GAAGpB,0BAAyCI,EAAMK,SAG1EN,EAAakB,iBAAmB9J,KAAKuH,QAAQ0B,gBAC7CjJ,KAAKuH,QAAQwB,aAAaC,wBAAyB,EACnDH,EAAMkB,cAAgBnB,EACtBA,EAAaoB,YAAclI,EAAMmI,aACjCrB,EAAasB,QAAUrB,EAAMsB,MAAQC,EAAOC,UAAUxB,EAAMsB,OAASC,EAAOE,QAC5E1B,EAAa2B,UAA+B7H,MAAnBmG,EAAM0B,UAAyB,EAAI1B,EAAM0B,UAClE3B,EAAa1B,MAAuBxE,MAAfmG,EAAM3B,MAAqB3F,OAAOC,UAAYqH,EAAM3B,MACzE0B,EAAa4B,OAAS7B,EACtB3I,KAAKuH,QAAQkD,eAAeC,KAAK9B,GACjCL,EAAWoC,mBAAmB/B,EAAcH,GAC5CH,EAAOK,EAAY,MAGnC,EAEAiC,EAAwBxD,GACxByD,EAAsBzD,GAAM,GAAOE,GAAW,IAAID,EAAWC"}
@@ -0,0 +1,65 @@
1
+ import { a$ as PBRMaterial, aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Dlf001gP.esm.js';
2
+ import { G as GLTFLoader } from './glTFLoader-DnWHbX53.esm.js';
3
+ import './rawTexture-D0O_yrdQ.esm.js';
4
+ import './assetContainer-0Qu2XIWb.esm.js';
5
+ import './glTFLoaderAnimation-C3gHlipY.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-BSvZxEnx.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_anisotropy-BSvZxEnx.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,CAAC,+BAA+B,CAAC,gBAAgB,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AAC7G,YAAY,OAAO,OAAO,CAAC,GAAG,CAAC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;"}
@@ -0,0 +1,2 @@
1
+ import{a$ as e,aQ as o,aR as r}from"./index-Bo5F_mGk.esm.min.js";import{G as s}from"./glTFLoader-Dj_JCgqJ.esm.min.js";import"./rawTexture-BAt5J3G4.esm.min.js";import"./assetContainer-CMuD-n3X.esm.min.js";import"./glTFLoaderAnimation-A_WVS-lt.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-CtKPvN_z.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_anisotropy-CtKPvN_z.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,2 @@
1
+ import{a$ as e,aQ as a,aR as r}from"./index-Bo5F_mGk.esm.min.js";import{G as t}from"./glTFLoader-Dj_JCgqJ.esm.min.js";import"./rawTexture-BAt5J3G4.esm.min.js";import"./assetContainer-CMuD-n3X.esm.min.js";import"./glTFLoaderAnimation-A_WVS-lt.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-BephgEiM.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_clearcoat-BephgEiM.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,UAAUE,6BAA8B,EACxDjB,EAAgBe,UAAUG,0BAA2B,EACnBC,MAA9BP,EAAWQ,gBACXpB,EAAgBe,UAAUM,UAAYT,EAAWQ,gBAGjDpB,EAAgBe,UAAUM,UAAY,EAEtCT,EAAWU,kBACXjB,EAASE,KAAKjB,KAAKG,QAAQ8B,qBAAqB,GAAGzB,qBAA4Bc,EAAWU,kBAAmBE,IACzGA,EAAQjC,KAAO,GAAGS,EAAgBT,mBAClCS,EAAgBe,UAAUS,QAAUA,CAAO,KAGRL,MAAvCP,EAAWa,yBACXzB,EAAgBe,UAAUW,UAAYd,EAAWa,yBAGjDzB,EAAgBe,UAAUW,UAAY,EAEtCd,EAAWe,4BACXf,EAAWe,0BAA0BC,cAAe,EACpDvB,EAASE,KAAKjB,KAAKG,QAAQ8B,qBAAqB,GAAGzB,8BAAqCc,EAAWe,2BAA4BH,IAC3HA,EAAQjC,KAAO,GAAGS,EAAgBT,6BAClCS,EAAgBe,UAAUc,iBAAmBL,CAAO,MAGxDZ,EAAWkB,yBACXlB,EAAWkB,uBAAuBF,cAAe,EACjDvB,EAASE,KAAKjB,KAAKG,QAAQ8B,qBAAqB,GAAGzB,2BAAkCc,EAAWkB,wBAAyBN,IACrHA,EAAQjC,KAAO,GAAGS,EAAgBT,0BAClCS,EAAgBe,UAAUgB,YAAcP,CAAO,KAEnDxB,EAAgBgC,kBAAoBhC,EAAgBiC,WAAWC,qBAC/DlC,EAAgBmC,iBAAmBnC,EAAgBiC,WAAWC,qBACff,MAA3CP,EAAWkB,uBAAuBM,QAClCpC,EAAgBe,UAAUgB,YAAYM,MAAQzB,EAAWkB,uBAAuBM,QAGjF3B,QAAQC,IAAIL,GAAUM,MAAK,QAC1C,EAEA2B,EAAwBpD,GACxBqD,EAAsBrD,GAAM,GAAOG,GAAW,IAAIF,EAAwBE"}
@@ -0,0 +1,96 @@
1
+ import { a$ as PBRMaterial, aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Dlf001gP.esm.js';
2
+ import { G as GLTFLoader } from './glTFLoader-DnWHbX53.esm.js';
3
+ import './rawTexture-D0O_yrdQ.esm.js';
4
+ import './assetContainer-0Qu2XIWb.esm.js';
5
+ import './glTFLoaderAnimation-C3gHlipY.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-C3QB9HNC.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_clearcoat-C3QB9HNC.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.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,yBAAyB;AACtC;AACA;AACA;AACA;AACA;AACO,MAAM,uBAAuB,CAAC;AACrC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC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nimation-A_WVS-lt.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-CZvfLdyF.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KHR_materials_diffuse_transmission-CZvfLdyF.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, aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Dlf001gP.esm.js';
2
+ import { G as GLTFLoader } from './glTFLoader-DnWHbX53.esm.js';
3
+ import './rawTexture-D0O_yrdQ.esm.js';
4
+ import './assetContainer-0Qu2XIWb.esm.js';
5
+ import './glTFLoaderAnimation-C3gHlipY.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-DuM5GD2L.esm.js.map