@babylonjs/viewer 7.42.0 → 7.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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-Ci-qFwA1.esm.js +84 -0
  7. package/dist/chunks/EXT_lights_ies-Ci-qFwA1.esm.js.map +1 -0
  8. package/dist/chunks/EXT_lights_ies-D-YMOrZ9.esm.min.js +2 -0
  9. package/dist/chunks/EXT_lights_ies-D-YMOrZ9.esm.min.js.map +1 -0
  10. package/dist/chunks/EXT_lights_image_based-BHM1RTkE.esm.js +171 -0
  11. package/dist/chunks/EXT_lights_image_based-BHM1RTkE.esm.js.map +1 -0
  12. package/dist/chunks/EXT_lights_image_based-Cc-adXKP.esm.min.js +2 -0
  13. package/dist/chunks/EXT_lights_image_based-Cc-adXKP.esm.min.js.map +1 -0
  14. package/dist/chunks/EXT_mesh_gpu_instancing-TlOmZRvU.esm.min.js +2 -0
  15. package/dist/chunks/EXT_mesh_gpu_instancing-TlOmZRvU.esm.min.js.map +1 -0
  16. package/dist/chunks/EXT_mesh_gpu_instancing-dsUXxxp2.esm.js +86 -0
  17. package/dist/chunks/EXT_mesh_gpu_instancing-dsUXxxp2.esm.js.map +1 -0
  18. package/dist/chunks/EXT_meshopt_compression-CeEGmudK.esm.js +134 -0
  19. package/dist/chunks/EXT_meshopt_compression-CeEGmudK.esm.js.map +1 -0
  20. package/dist/chunks/EXT_meshopt_compression-D7y66yTe.esm.min.js +2 -0
  21. package/dist/chunks/EXT_meshopt_compression-D7y66yTe.esm.min.js.map +1 -0
  22. package/dist/chunks/EXT_texture_avif-BWTybLH0.esm.js +44 -0
  23. package/dist/chunks/EXT_texture_avif-BWTybLH0.esm.js.map +1 -0
  24. package/dist/chunks/EXT_texture_avif-mNqeOu2P.esm.min.js +2 -0
  25. package/dist/chunks/EXT_texture_avif-mNqeOu2P.esm.min.js.map +1 -0
  26. package/dist/chunks/EXT_texture_webp-DKLxrFm7.esm.js +43 -0
  27. package/dist/chunks/EXT_texture_webp-DKLxrFm7.esm.js.map +1 -0
  28. package/dist/chunks/EXT_texture_webp-DMNVMbSq.esm.min.js +2 -0
  29. package/dist/chunks/EXT_texture_webp-DMNVMbSq.esm.min.js.map +1 -0
  30. package/dist/chunks/ExtrasAsMetadata-CBhNQpn1.esm.min.js +2 -0
  31. package/dist/chunks/ExtrasAsMetadata-CBhNQpn1.esm.min.js.map +1 -0
  32. package/dist/chunks/ExtrasAsMetadata-O_XjMSvf.esm.js +64 -0
  33. package/dist/chunks/ExtrasAsMetadata-O_XjMSvf.esm.js.map +1 -0
  34. package/dist/chunks/KHR_animation_pointer-DLUPu-Bm.esm.min.js +2 -0
  35. package/dist/chunks/KHR_animation_pointer-DLUPu-Bm.esm.min.js.map +1 -0
  36. package/dist/chunks/KHR_animation_pointer-Dylfi9Fz.esm.js +352 -0
  37. package/dist/chunks/KHR_animation_pointer-Dylfi9Fz.esm.js.map +1 -0
  38. package/dist/chunks/KHR_draco_mesh_compression-CJEnvO4M.esm.js +610 -0
  39. package/dist/chunks/KHR_draco_mesh_compression-CJEnvO4M.esm.js.map +1 -0
  40. package/dist/chunks/KHR_draco_mesh_compression-wPFohS1o.esm.min.js +2 -0
  41. package/dist/chunks/KHR_draco_mesh_compression-wPFohS1o.esm.min.js.map +1 -0
  42. package/dist/chunks/KHR_interactivity-C4yQpsT1.esm.js +4033 -0
  43. package/dist/chunks/KHR_interactivity-C4yQpsT1.esm.js.map +1 -0
  44. package/dist/chunks/KHR_interactivity-oxFHxHco.esm.min.js +2 -0
  45. package/dist/chunks/KHR_interactivity-oxFHxHco.esm.min.js.map +1 -0
  46. package/dist/chunks/KHR_lights_punctual-B5ZwFshR.esm.min.js +2 -0
  47. package/dist/chunks/KHR_lights_punctual-B5ZwFshR.esm.min.js.map +1 -0
  48. package/dist/chunks/KHR_lights_punctual-W_G6_MHv.esm.js +581 -0
  49. package/dist/chunks/KHR_lights_punctual-W_G6_MHv.esm.js.map +1 -0
  50. package/dist/chunks/KHR_materials_anisotropy-DK3FaAoV.esm.js +65 -0
  51. package/dist/chunks/KHR_materials_anisotropy-DK3FaAoV.esm.js.map +1 -0
  52. package/dist/chunks/KHR_materials_anisotropy-DUxcWb0i.esm.min.js +2 -0
  53. package/dist/chunks/KHR_materials_anisotropy-DUxcWb0i.esm.min.js.map +1 -0
  54. package/dist/chunks/KHR_materials_clearcoat-D5F-K-o5.esm.js +96 -0
  55. package/dist/chunks/KHR_materials_clearcoat-D5F-K-o5.esm.js.map +1 -0
  56. package/dist/chunks/KHR_materials_clearcoat-kfqxn6o-.esm.min.js +2 -0
  57. package/dist/chunks/KHR_materials_clearcoat-kfqxn6o-.esm.min.js.map +1 -0
  58. package/dist/chunks/KHR_materials_diffuse_transmission-D1WjCvvs.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_diffuse_transmission-D1WjCvvs.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_diffuse_transmission-cD1yGJWP.esm.js +97 -0
  61. package/dist/chunks/KHR_materials_diffuse_transmission-cD1yGJWP.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_dispersion-B44irn68.esm.js +62 -0
  63. package/dist/chunks/KHR_materials_dispersion-B44irn68.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_dispersion-CJGSNg9e.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_dispersion-CJGSNg9e.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_emissive_strength-1FZ9WYNt.esm.min.js +2 -0
  67. package/dist/chunks/KHR_materials_emissive_strength-1FZ9WYNt.esm.min.js.map +1 -0
  68. package/dist/chunks/KHR_materials_emissive_strength-Dg92vLBQ.esm.js +55 -0
  69. package/dist/chunks/KHR_materials_emissive_strength-Dg92vLBQ.esm.js.map +1 -0
  70. package/dist/chunks/KHR_materials_ior-DU4QoLjV.esm.js +64 -0
  71. package/dist/chunks/KHR_materials_ior-DU4QoLjV.esm.js.map +1 -0
  72. package/dist/chunks/KHR_materials_ior-ZPFVJPej.esm.min.js +2 -0
  73. package/dist/chunks/KHR_materials_ior-ZPFVJPej.esm.min.js.map +1 -0
  74. package/dist/chunks/KHR_materials_iridescence-svCLgR8L.esm.min.js +2 -0
  75. package/dist/chunks/KHR_materials_iridescence-svCLgR8L.esm.min.js.map +1 -0
  76. package/dist/chunks/KHR_materials_iridescence-xbPLtspB.esm.js +72 -0
  77. package/dist/chunks/KHR_materials_iridescence-xbPLtspB.esm.js.map +1 -0
  78. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-5J94x_nS.esm.min.js +2 -0
  79. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-5J94x_nS.esm.min.js.map +1 -0
  80. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BqSOB3-L.esm.js +81 -0
  81. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BqSOB3-L.esm.js.map +1 -0
  82. package/dist/chunks/KHR_materials_sheen-DT3JvVfx.esm.min.js +2 -0
  83. package/dist/chunks/KHR_materials_sheen-DT3JvVfx.esm.min.js.map +1 -0
  84. package/dist/chunks/KHR_materials_sheen-DkNlwIOo.esm.js +85 -0
  85. package/dist/chunks/KHR_materials_sheen-DkNlwIOo.esm.js.map +1 -0
  86. package/dist/chunks/KHR_materials_specular-Cd7Yq-Qq.esm.js +75 -0
  87. package/dist/chunks/KHR_materials_specular-Cd7Yq-Qq.esm.js.map +1 -0
  88. package/dist/chunks/KHR_materials_specular-PEPk4kix.esm.min.js +2 -0
  89. package/dist/chunks/KHR_materials_specular-PEPk4kix.esm.min.js.map +1 -0
  90. package/dist/chunks/KHR_materials_transmission-Bm7YFHmd.esm.js +307 -0
  91. package/dist/chunks/KHR_materials_transmission-Bm7YFHmd.esm.js.map +1 -0
  92. package/dist/chunks/KHR_materials_transmission-COBZwOAj.esm.min.js +2 -0
  93. package/dist/chunks/KHR_materials_transmission-COBZwOAj.esm.min.js.map +1 -0
  94. package/dist/chunks/KHR_materials_unlit-CHjp-ZT-.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_unlit-CHjp-ZT-.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_unlit-CZsUA6bf.esm.js +74 -0
  97. package/dist/chunks/KHR_materials_unlit-CZsUA6bf.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_variants-BtTrg0hj.esm.min.js +2 -0
  99. package/dist/chunks/KHR_materials_variants-BtTrg0hj.esm.min.js.map +1 -0
  100. package/dist/chunks/KHR_materials_variants-iMOKYfNg.esm.js +262 -0
  101. package/dist/chunks/KHR_materials_variants-iMOKYfNg.esm.js.map +1 -0
  102. package/dist/chunks/KHR_materials_volume-ILasb3uO.esm.js +87 -0
  103. package/dist/chunks/KHR_materials_volume-ILasb3uO.esm.js.map +1 -0
  104. package/dist/chunks/KHR_materials_volume-temcLNI_.esm.min.js +2 -0
  105. package/dist/chunks/KHR_materials_volume-temcLNI_.esm.min.js.map +1 -0
  106. package/dist/chunks/KHR_mesh_quantization-C0asm1JG.esm.js +26 -0
  107. package/dist/chunks/KHR_mesh_quantization-C0asm1JG.esm.js.map +1 -0
  108. package/dist/chunks/KHR_mesh_quantization-DCthIdAs.esm.min.js +2 -0
  109. package/dist/chunks/KHR_mesh_quantization-DCthIdAs.esm.min.js.map +1 -0
  110. package/dist/chunks/KHR_node_hoverability-DnKiDE4Y.esm.min.js +2 -0
  111. package/dist/chunks/KHR_node_hoverability-DnKiDE4Y.esm.min.js.map +1 -0
  112. package/dist/chunks/KHR_node_hoverability-GSuiVlP1.esm.js +39 -0
  113. package/dist/chunks/KHR_node_hoverability-GSuiVlP1.esm.js.map +1 -0
  114. package/dist/chunks/KHR_node_visibility-5t4xtV-j.esm.js +46 -0
  115. package/dist/chunks/KHR_node_visibility-5t4xtV-j.esm.js.map +1 -0
  116. package/dist/chunks/KHR_node_visibility-BNok3d5m.esm.min.js +2 -0
  117. package/dist/chunks/KHR_node_visibility-BNok3d5m.esm.min.js.map +1 -0
  118. package/dist/chunks/KHR_texture_basisu-BTPFSG8m.esm.js +43 -0
  119. package/dist/chunks/KHR_texture_basisu-BTPFSG8m.esm.js.map +1 -0
  120. package/dist/chunks/KHR_texture_basisu-C_ka3xk0.esm.min.js +2 -0
  121. package/dist/chunks/KHR_texture_basisu-C_ka3xk0.esm.min.js.map +1 -0
  122. package/dist/chunks/KHR_texture_transform-B0AkmUrF.esm.js +63 -0
  123. package/dist/chunks/KHR_texture_transform-B0AkmUrF.esm.js.map +1 -0
  124. package/dist/chunks/KHR_texture_transform-DC15W9__.esm.min.js +2 -0
  125. package/dist/chunks/KHR_texture_transform-DC15W9__.esm.min.js.map +1 -0
  126. package/dist/chunks/KHR_xmp_json_ld-B3DsueWv.esm.min.js +2 -0
  127. package/dist/chunks/KHR_xmp_json_ld-B3DsueWv.esm.min.js.map +1 -0
  128. package/dist/chunks/KHR_xmp_json_ld-bAm-G6--.esm.js +51 -0
  129. package/dist/chunks/KHR_xmp_json_ld-bAm-G6--.esm.js.map +1 -0
  130. package/dist/chunks/MSFT_audio_emitter-Cc8T59W1.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_audio_emitter-Cc8T59W1.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_audio_emitter-CjhcZQN6.esm.js +2201 -0
  133. package/dist/chunks/MSFT_audio_emitter-CjhcZQN6.esm.js.map +1 -0
  134. package/dist/chunks/MSFT_lod-9wYPotTW.esm.js +337 -0
  135. package/dist/chunks/MSFT_lod-9wYPotTW.esm.js.map +1 -0
  136. package/dist/chunks/MSFT_lod-DP_X1_EM.esm.min.js +2 -0
  137. package/dist/chunks/MSFT_lod-DP_X1_EM.esm.min.js.map +1 -0
  138. package/dist/chunks/MSFT_minecraftMesh-B9bJiUgM.esm.min.js +2 -0
  139. package/dist/chunks/MSFT_minecraftMesh-B9bJiUgM.esm.min.js.map +1 -0
  140. package/dist/chunks/MSFT_minecraftMesh-CvZswzMQ.esm.js +46 -0
  141. package/dist/chunks/MSFT_minecraftMesh-CvZswzMQ.esm.js.map +1 -0
  142. package/dist/chunks/MSFT_sRGBFactors-CnwV85sg.esm.js +47 -0
  143. package/dist/chunks/MSFT_sRGBFactors-CnwV85sg.esm.js.map +1 -0
  144. package/dist/chunks/MSFT_sRGBFactors-D5yYcWKM.esm.min.js +2 -0
  145. package/dist/chunks/MSFT_sRGBFactors-D5yYcWKM.esm.min.js.map +1 -0
  146. package/dist/chunks/animationGroup-UgOvLa4g.esm.min.js +2 -0
  147. package/dist/chunks/animationGroup-UgOvLa4g.esm.min.js.map +1 -0
  148. package/dist/chunks/animationGroup-gDPM36g-.esm.js +2482 -0
  149. package/dist/chunks/animationGroup-gDPM36g-.esm.js.map +1 -0
  150. package/dist/chunks/assetContainer-CiUr-DU0.esm.min.js +2 -0
  151. package/dist/chunks/assetContainer-CiUr-DU0.esm.min.js.map +1 -0
  152. package/dist/chunks/assetContainer-epG4BKLL.esm.js +1786 -0
  153. package/dist/chunks/assetContainer-epG4BKLL.esm.js.map +1 -0
  154. package/dist/chunks/audioEngine-D4b-CKFM.esm.js +305 -0
  155. package/dist/chunks/audioEngine-D4b-CKFM.esm.js.map +1 -0
  156. package/dist/chunks/audioEngine-DidpdM17.esm.min.js +2 -0
  157. package/dist/chunks/audioEngine-DidpdM17.esm.min.js.map +1 -0
  158. package/dist/chunks/bakedVertexAnimation-BFhBHOvw.esm.min.js +2 -0
  159. package/dist/chunks/bakedVertexAnimation-BFhBHOvw.esm.min.js.map +1 -0
  160. package/dist/chunks/bakedVertexAnimation-N6nxhIqv.esm.js +114 -0
  161. package/dist/chunks/bakedVertexAnimation-N6nxhIqv.esm.js.map +1 -0
  162. package/dist/chunks/basisTextureLoader-OcrREqOq.esm.min.js +2 -0
  163. package/dist/chunks/basisTextureLoader-OcrREqOq.esm.min.js.map +1 -0
  164. package/dist/chunks/basisTextureLoader-ZCapEI_F.esm.js +600 -0
  165. package/dist/chunks/basisTextureLoader-ZCapEI_F.esm.js.map +1 -0
  166. package/dist/chunks/dds-B9WWIQim.esm.min.js +2 -0
  167. package/dist/chunks/dds-B9WWIQim.esm.min.js.map +1 -0
  168. package/dist/chunks/dds-ByKU9VsP.esm.js +540 -0
  169. package/dist/chunks/dds-ByKU9VsP.esm.js.map +1 -0
  170. package/dist/chunks/ddsTextureLoader-BkpPcu9k.esm.min.js +2 -0
  171. package/dist/chunks/ddsTextureLoader-BkpPcu9k.esm.min.js.map +1 -0
  172. package/dist/chunks/ddsTextureLoader-diChHKRj.esm.js +88 -0
  173. package/dist/chunks/ddsTextureLoader-diChHKRj.esm.js.map +1 -0
  174. package/dist/chunks/decalFragment-C8xhSOdE.esm.min.js +2 -0
  175. package/dist/chunks/decalFragment-C8xhSOdE.esm.min.js.map +1 -0
  176. package/dist/chunks/decalFragment-DmO1AHNB.esm.js +18 -0
  177. package/dist/chunks/decalFragment-DmO1AHNB.esm.js.map +1 -0
  178. package/dist/chunks/default.fragment-D1Z8A0b9.esm.js +515 -0
  179. package/dist/chunks/default.fragment-D1Z8A0b9.esm.js.map +1 -0
  180. package/dist/chunks/default.fragment-D5PPQsVZ.esm.min.js +2 -0
  181. package/dist/chunks/default.fragment-D5PPQsVZ.esm.min.js.map +1 -0
  182. package/dist/chunks/default.fragment-DBRikXsn.esm.min.js +2 -0
  183. package/dist/chunks/default.fragment-DBRikXsn.esm.min.js.map +1 -0
  184. package/dist/chunks/default.fragment-IZCYw7lv.esm.js +446 -0
  185. package/dist/chunks/default.fragment-IZCYw7lv.esm.js.map +1 -0
  186. package/dist/chunks/default.vertex-CN6R1EzX.esm.min.js +2 -0
  187. package/dist/chunks/default.vertex-CN6R1EzX.esm.min.js.map +1 -0
  188. package/dist/chunks/default.vertex-DRFPuY9g.esm.min.js +2 -0
  189. package/dist/chunks/default.vertex-DRFPuY9g.esm.min.js.map +1 -0
  190. package/dist/chunks/default.vertex-Dc5DNUqC.esm.js +190 -0
  191. package/dist/chunks/default.vertex-Dc5DNUqC.esm.js.map +1 -0
  192. package/dist/chunks/default.vertex-DxExVglD.esm.js +211 -0
  193. package/dist/chunks/default.vertex-DxExVglD.esm.js.map +1 -0
  194. package/dist/chunks/defaultUboDeclaration-BDbgDSi_.esm.js +15 -0
  195. package/dist/chunks/defaultUboDeclaration-BDbgDSi_.esm.js.map +1 -0
  196. package/dist/chunks/defaultUboDeclaration-CDULXhFz.esm.min.js +2 -0
  197. package/dist/chunks/defaultUboDeclaration-CDULXhFz.esm.min.js.map +1 -0
  198. package/dist/chunks/defaultUboDeclaration-Cvosattz.esm.min.js +2 -0
  199. package/dist/chunks/defaultUboDeclaration-Cvosattz.esm.min.js.map +1 -0
  200. package/dist/chunks/defaultUboDeclaration-DSe85PIb.esm.js +13 -0
  201. package/dist/chunks/defaultUboDeclaration-DSe85PIb.esm.js.map +1 -0
  202. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
  203. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
  204. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
  205. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
  206. package/dist/chunks/dumpTools-C_ehjdNT.esm.js +200 -0
  207. package/dist/chunks/dumpTools-C_ehjdNT.esm.js.map +1 -0
  208. package/dist/chunks/dumpTools-Diwqq1BX.esm.min.js +2 -0
  209. package/dist/chunks/dumpTools-Diwqq1BX.esm.min.js.map +1 -0
  210. package/dist/chunks/engine-BDZAwPiJ.esm.min.js +2 -0
  211. package/dist/chunks/engine-BDZAwPiJ.esm.min.js.map +1 -0
  212. package/dist/chunks/engine-CSI4kOyy.esm.js +2213 -0
  213. package/dist/chunks/engine-CSI4kOyy.esm.js.map +1 -0
  214. package/dist/chunks/engine.common-1urMt7JH.esm.min.js +2 -0
  215. package/dist/chunks/engine.common-1urMt7JH.esm.min.js.map +1 -0
  216. package/dist/chunks/engine.common-Cx-p9h0M.esm.js +1162 -0
  217. package/dist/chunks/engine.common-Cx-p9h0M.esm.js.map +1 -0
  218. package/dist/chunks/envTextureLoader-CJ9i14ko.esm.js +64 -0
  219. package/dist/chunks/envTextureLoader-CJ9i14ko.esm.js.map +1 -0
  220. package/dist/chunks/envTextureLoader-fH2Y0DYt.esm.min.js +2 -0
  221. package/dist/chunks/envTextureLoader-fH2Y0DYt.esm.min.js.map +1 -0
  222. package/dist/chunks/environmentTextureTools-CyrSAo3I.esm.min.js +2 -0
  223. package/dist/chunks/environmentTextureTools-CyrSAo3I.esm.min.js.map +1 -0
  224. package/dist/chunks/environmentTextureTools-DkS7FrDn.esm.js +382 -0
  225. package/dist/chunks/environmentTextureTools-DkS7FrDn.esm.js.map +1 -0
  226. package/dist/chunks/exrTextureLoader-Dh89s-Px.esm.min.js +2 -0
  227. package/dist/chunks/exrTextureLoader-Dh89s-Px.esm.min.js.map +1 -0
  228. package/dist/chunks/exrTextureLoader-h76VLpFY.esm.js +1683 -0
  229. package/dist/chunks/exrTextureLoader-h76VLpFY.esm.js.map +1 -0
  230. package/dist/chunks/fogFragment-Blf9OOMy.esm.js +101 -0
  231. package/dist/chunks/fogFragment-Blf9OOMy.esm.js.map +1 -0
  232. package/dist/chunks/fogFragment-BuGde4iy.esm.js +102 -0
  233. package/dist/chunks/fogFragment-BuGde4iy.esm.js.map +1 -0
  234. package/dist/chunks/fogFragment-CPdfBwJk.esm.min.js +2 -0
  235. package/dist/chunks/fogFragment-CPdfBwJk.esm.min.js.map +1 -0
  236. package/dist/chunks/fogFragment-CbywlrtD.esm.min.js +2 -0
  237. package/dist/chunks/fogFragment-CbywlrtD.esm.min.js.map +1 -0
  238. package/dist/chunks/fresnelFunction-Cwev8OVa.esm.js +12 -0
  239. package/dist/chunks/fresnelFunction-Cwev8OVa.esm.js.map +1 -0
  240. package/dist/chunks/fresnelFunction-xRcQNMft.esm.min.js +2 -0
  241. package/dist/chunks/fresnelFunction-xRcQNMft.esm.min.js.map +1 -0
  242. package/dist/chunks/glTFLoader-B92-LNra.esm.js +7723 -0
  243. package/dist/chunks/glTFLoader-B92-LNra.esm.js.map +1 -0
  244. package/dist/chunks/glTFLoader-DmRkkAjY.esm.min.js +2 -0
  245. package/dist/chunks/glTFLoader-DmRkkAjY.esm.min.js.map +1 -0
  246. package/dist/chunks/glTFLoaderAnimation-DlQTES98.esm.min.js +2 -0
  247. package/dist/chunks/glTFLoaderAnimation-DlQTES98.esm.min.js.map +1 -0
  248. package/dist/chunks/glTFLoaderAnimation-yKmr8v-6.esm.js +77 -0
  249. package/dist/chunks/glTFLoaderAnimation-yKmr8v-6.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-9EUqqTT7.esm.js +34 -0
  255. package/dist/chunks/harmonicsFunctions-9EUqqTT7.esm.js.map +1 -0
  256. package/dist/chunks/harmonicsFunctions-BTVfdwIa.esm.min.js +2 -0
  257. package/dist/chunks/harmonicsFunctions-BTVfdwIa.esm.min.js.map +1 -0
  258. package/dist/chunks/harmonicsFunctions-DKAFEgQi.esm.js +35 -0
  259. package/dist/chunks/harmonicsFunctions-DKAFEgQi.esm.js.map +1 -0
  260. package/dist/chunks/harmonicsFunctions-DlEPeDam.esm.min.js +2 -0
  261. package/dist/chunks/harmonicsFunctions-DlEPeDam.esm.min.js.map +1 -0
  262. package/dist/chunks/hdrTextureLoader-CMgKJ5Lq.esm.min.js +2 -0
  263. package/dist/chunks/hdrTextureLoader-CMgKJ5Lq.esm.min.js.map +1 -0
  264. package/dist/chunks/hdrTextureLoader-sW1qHH0B.esm.js +253 -0
  265. package/dist/chunks/hdrTextureLoader-sW1qHH0B.esm.js.map +1 -0
  266. package/dist/chunks/helperFunctions-BEU4o2m9.esm.min.js +2 -0
  267. package/dist/chunks/helperFunctions-BEU4o2m9.esm.min.js.map +1 -0
  268. package/dist/chunks/helperFunctions-BLAIRbtb.esm.js +110 -0
  269. package/dist/chunks/helperFunctions-BLAIRbtb.esm.js.map +1 -0
  270. package/dist/chunks/helperFunctions-C02MI6jo.esm.js +83 -0
  271. package/dist/chunks/helperFunctions-C02MI6jo.esm.js.map +1 -0
  272. package/dist/chunks/helperFunctions-DLaQtqyl.esm.min.js +2 -0
  273. package/dist/chunks/helperFunctions-DLaQtqyl.esm.min.js.map +1 -0
  274. package/dist/chunks/iesTextureLoader-BBeVYwxO.esm.js +189 -0
  275. package/dist/chunks/iesTextureLoader-BBeVYwxO.esm.js.map +1 -0
  276. package/dist/chunks/iesTextureLoader-CIarrWps.esm.min.js +2 -0
  277. package/dist/chunks/iesTextureLoader-CIarrWps.esm.min.js.map +1 -0
  278. package/dist/chunks/index-CGxy146H.esm.js +75019 -0
  279. package/dist/chunks/index-CGxy146H.esm.js.map +1 -0
  280. package/dist/chunks/index-dIbBUsdh.esm.min.js +57 -0
  281. package/dist/chunks/index-dIbBUsdh.esm.min.js.map +1 -0
  282. package/dist/chunks/ktxTextureLoader-LTFpQzZ9.esm.min.js +2 -0
  283. package/dist/chunks/ktxTextureLoader-LTFpQzZ9.esm.min.js.map +1 -0
  284. package/dist/chunks/ktxTextureLoader-d7KamU-V.esm.js +814 -0
  285. package/dist/chunks/ktxTextureLoader-d7KamU-V.esm.js.map +1 -0
  286. package/dist/chunks/logDepthDeclaration-BtuU_j2d.esm.js +11 -0
  287. package/dist/chunks/logDepthDeclaration-BtuU_j2d.esm.js.map +1 -0
  288. package/dist/chunks/logDepthDeclaration-CCI41SlH.esm.js +35 -0
  289. package/dist/chunks/logDepthDeclaration-CCI41SlH.esm.js.map +1 -0
  290. package/dist/chunks/logDepthDeclaration-DXoafQJg.esm.min.js +2 -0
  291. package/dist/chunks/logDepthDeclaration-DXoafQJg.esm.min.js.map +1 -0
  292. package/dist/chunks/logDepthDeclaration-DlxjEksr.esm.min.js +2 -0
  293. package/dist/chunks/logDepthDeclaration-DlxjEksr.esm.min.js.map +1 -0
  294. package/dist/chunks/logDepthVertex-BovLqk3n.esm.js +77 -0
  295. package/dist/chunks/logDepthVertex-BovLqk3n.esm.js.map +1 -0
  296. package/dist/chunks/logDepthVertex-CINV9_-e.esm.js +81 -0
  297. package/dist/chunks/logDepthVertex-CINV9_-e.esm.js.map +1 -0
  298. package/dist/chunks/logDepthVertex-CWwjB0Kr.esm.min.js +2 -0
  299. package/dist/chunks/logDepthVertex-CWwjB0Kr.esm.min.js.map +1 -0
  300. package/dist/chunks/logDepthVertex-cml69Ko5.esm.min.js +2 -0
  301. package/dist/chunks/logDepthVertex-cml69Ko5.esm.min.js.map +1 -0
  302. package/dist/chunks/mainUVVaryingDeclaration-3ioKJJn6.esm.min.js +2 -0
  303. package/dist/chunks/mainUVVaryingDeclaration-3ioKJJn6.esm.min.js.map +1 -0
  304. package/dist/chunks/mainUVVaryingDeclaration-Bm4sW0lo.esm.js +11 -0
  305. package/dist/chunks/mainUVVaryingDeclaration-Bm4sW0lo.esm.js.map +1 -0
  306. package/dist/chunks/mainUVVaryingDeclaration-K5Od0dkn.esm.js +11 -0
  307. package/dist/chunks/mainUVVaryingDeclaration-K5Od0dkn.esm.js.map +1 -0
  308. package/dist/chunks/mainUVVaryingDeclaration-m-PGJghl.esm.min.js +2 -0
  309. package/dist/chunks/mainUVVaryingDeclaration-m-PGJghl.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-BH4HWAOu.esm.min.js +2 -0
  315. package/dist/chunks/meshUboDeclaration-BH4HWAOu.esm.min.js.map +1 -0
  316. package/dist/chunks/meshUboDeclaration-Cas60IPQ.esm.js +26 -0
  317. package/dist/chunks/meshUboDeclaration-Cas60IPQ.esm.js.map +1 -0
  318. package/dist/chunks/objFileLoader-0_4yycA7.esm.js +1338 -0
  319. package/dist/chunks/objFileLoader-0_4yycA7.esm.js.map +1 -0
  320. package/dist/chunks/objFileLoader-Dz96Brl-.esm.min.js +2 -0
  321. package/dist/chunks/objFileLoader-Dz96Brl-.esm.min.js.map +1 -0
  322. package/dist/chunks/oitFragment-BpZOgKPO.esm.js +1078 -0
  323. package/dist/chunks/oitFragment-BpZOgKPO.esm.js.map +1 -0
  324. package/dist/chunks/oitFragment-D8XoJ_dZ.esm.js +1240 -0
  325. package/dist/chunks/oitFragment-D8XoJ_dZ.esm.js.map +1 -0
  326. package/dist/chunks/oitFragment-DFqlxMMu.esm.min.js +2 -0
  327. package/dist/chunks/oitFragment-DFqlxMMu.esm.min.js.map +1 -0
  328. package/dist/chunks/oitFragment-Dt_IcdBr.esm.min.js +2 -0
  329. package/dist/chunks/oitFragment-Dt_IcdBr.esm.min.js.map +1 -0
  330. package/dist/chunks/pass.fragment-BO_tZwR2.esm.min.js +2 -0
  331. package/dist/chunks/pass.fragment-BO_tZwR2.esm.min.js.map +1 -0
  332. package/dist/chunks/pass.fragment-CAJ07AKA.esm.min.js +2 -0
  333. package/dist/chunks/pass.fragment-CAJ07AKA.esm.min.js.map +1 -0
  334. package/dist/chunks/pass.fragment-DOM_xot6.esm.js +15 -0
  335. package/dist/chunks/pass.fragment-DOM_xot6.esm.js.map +1 -0
  336. package/dist/chunks/pass.fragment-oWdDflqj.esm.js +15 -0
  337. package/dist/chunks/pass.fragment-oWdDflqj.esm.js.map +1 -0
  338. package/dist/chunks/pbr.fragment-2NnS8PUn.esm.js +3222 -0
  339. package/dist/chunks/pbr.fragment-2NnS8PUn.esm.js.map +1 -0
  340. package/dist/chunks/pbr.fragment-DUrXnqv0.esm.js +3269 -0
  341. package/dist/chunks/pbr.fragment-DUrXnqv0.esm.js.map +1 -0
  342. package/dist/chunks/pbr.fragment-D_P4qV3f.esm.min.js +2 -0
  343. package/dist/chunks/pbr.fragment-D_P4qV3f.esm.min.js.map +1 -0
  344. package/dist/chunks/pbr.fragment-DjvjnXcU.esm.min.js +2 -0
  345. package/dist/chunks/pbr.fragment-DjvjnXcU.esm.min.js.map +1 -0
  346. package/dist/chunks/pbr.vertex-BwLZiVwu.esm.js +223 -0
  347. package/dist/chunks/pbr.vertex-BwLZiVwu.esm.js.map +1 -0
  348. package/dist/chunks/pbr.vertex-CSlE6Bb5.esm.min.js +2 -0
  349. package/dist/chunks/pbr.vertex-CSlE6Bb5.esm.min.js.map +1 -0
  350. package/dist/chunks/pbr.vertex-_S0iW8hg.esm.js +348 -0
  351. package/dist/chunks/pbr.vertex-_S0iW8hg.esm.js.map +1 -0
  352. package/dist/chunks/pbr.vertex-bRBmAyIj.esm.min.js +2 -0
  353. package/dist/chunks/pbr.vertex-bRBmAyIj.esm.min.js.map +1 -0
  354. package/dist/chunks/postprocess.vertex-BEv5EbQb.esm.js +20 -0
  355. package/dist/chunks/postprocess.vertex-BEv5EbQb.esm.js.map +1 -0
  356. package/dist/chunks/postprocess.vertex-n6pxYySV.esm.min.js +2 -0
  357. package/dist/chunks/postprocess.vertex-n6pxYySV.esm.min.js.map +1 -0
  358. package/dist/chunks/rawTexture-BgtfUTRv.esm.min.js +2 -0
  359. package/dist/chunks/rawTexture-BgtfUTRv.esm.min.js.map +1 -0
  360. package/dist/chunks/rawTexture-BnsEq6X_.esm.js +191 -0
  361. package/dist/chunks/rawTexture-BnsEq6X_.esm.js.map +1 -0
  362. package/dist/chunks/ray-BQbaIsoE.esm.min.js +2 -0
  363. package/dist/chunks/ray-BQbaIsoE.esm.min.js.map +1 -0
  364. package/dist/chunks/ray-kQ-7mA3p.esm.js +946 -0
  365. package/dist/chunks/ray-kQ-7mA3p.esm.js.map +1 -0
  366. package/dist/chunks/rgbdDecode.fragment-C-0r70dB.esm.min.js +2 -0
  367. package/dist/chunks/rgbdDecode.fragment-C-0r70dB.esm.min.js.map +1 -0
  368. package/dist/chunks/rgbdDecode.fragment-Cj_9_E4J.esm.min.js +2 -0
  369. package/dist/chunks/rgbdDecode.fragment-Cj_9_E4J.esm.min.js.map +1 -0
  370. package/dist/chunks/rgbdDecode.fragment-L6gnomkF.esm.js +13 -0
  371. package/dist/chunks/rgbdDecode.fragment-L6gnomkF.esm.js.map +1 -0
  372. package/dist/chunks/rgbdDecode.fragment-WOXNR51s.esm.js +13 -0
  373. package/dist/chunks/rgbdDecode.fragment-WOXNR51s.esm.js.map +1 -0
  374. package/dist/chunks/rgbdEncode.fragment-BSIZlh5E.esm.min.js +2 -0
  375. package/dist/chunks/rgbdEncode.fragment-BSIZlh5E.esm.min.js.map +1 -0
  376. package/dist/chunks/rgbdEncode.fragment-CAD4FyJj.esm.min.js +2 -0
  377. package/dist/chunks/rgbdEncode.fragment-CAD4FyJj.esm.min.js.map +1 -0
  378. package/dist/chunks/rgbdEncode.fragment-Coxf0-4F.esm.js +13 -0
  379. package/dist/chunks/rgbdEncode.fragment-Coxf0-4F.esm.js.map +1 -0
  380. package/dist/chunks/rgbdEncode.fragment-DBrZrw_R.esm.js +13 -0
  381. package/dist/chunks/rgbdEncode.fragment-DBrZrw_R.esm.js.map +1 -0
  382. package/dist/chunks/splatFileLoader-CmGRvDRg.esm.min.js +2 -0
  383. package/dist/chunks/splatFileLoader-CmGRvDRg.esm.min.js.map +1 -0
  384. package/dist/chunks/splatFileLoader-u73ZVkHS.esm.js +3384 -0
  385. package/dist/chunks/splatFileLoader-u73ZVkHS.esm.js.map +1 -0
  386. package/dist/chunks/spotLight-Cl-epVPn.esm.min.js +2 -0
  387. package/dist/chunks/spotLight-Cl-epVPn.esm.min.js.map +1 -0
  388. package/dist/chunks/spotLight-CugB1ldf.esm.js +701 -0
  389. package/dist/chunks/spotLight-CugB1ldf.esm.js.map +1 -0
  390. package/dist/chunks/standardMaterial-B1nhnycu.esm.min.js +2 -0
  391. package/dist/chunks/standardMaterial-B1nhnycu.esm.min.js.map +1 -0
  392. package/dist/chunks/standardMaterial-Byp5a_xI.esm.js +1812 -0
  393. package/dist/chunks/standardMaterial-Byp5a_xI.esm.js.map +1 -0
  394. package/dist/chunks/stlFileLoader-C4d3X1kg.esm.min.js +2 -0
  395. package/dist/chunks/stlFileLoader-C4d3X1kg.esm.min.js.map +1 -0
  396. package/dist/chunks/stlFileLoader-WWP9BrO0.esm.js +238 -0
  397. package/dist/chunks/stlFileLoader-WWP9BrO0.esm.js.map +1 -0
  398. package/dist/chunks/tgaTextureLoader-BoDMkE2j.esm.min.js +2 -0
  399. package/dist/chunks/tgaTextureLoader-BoDMkE2j.esm.min.js.map +1 -0
  400. package/dist/chunks/tgaTextureLoader-CcC1LAm5.esm.js +349 -0
  401. package/dist/chunks/tgaTextureLoader-CcC1LAm5.esm.js.map +1 -0
  402. package/dist/chunks/thinEngine-BdxPwWMb.esm.js +3848 -0
  403. package/dist/chunks/thinEngine-BdxPwWMb.esm.js.map +1 -0
  404. package/dist/chunks/thinEngine-RfQy4waT.esm.min.js +2 -0
  405. package/dist/chunks/thinEngine-RfQy4waT.esm.min.js.map +1 -0
  406. package/dist/chunks/thinInstanceMesh-DTHGILgM.esm.js +314 -0
  407. package/dist/chunks/thinInstanceMesh-DTHGILgM.esm.js.map +1 -0
  408. package/dist/chunks/thinInstanceMesh-mO1lgq0p.esm.min.js +2 -0
  409. package/dist/chunks/thinInstanceMesh-mO1lgq0p.esm.min.js.map +1 -0
  410. package/dist/chunks/vertexColorMixing-BNtmTN8e.esm.js +550 -0
  411. package/dist/chunks/vertexColorMixing-BNtmTN8e.esm.js.map +1 -0
  412. package/dist/chunks/vertexColorMixing-CP-o9oSE.esm.js +440 -0
  413. package/dist/chunks/vertexColorMixing-CP-o9oSE.esm.js.map +1 -0
  414. package/dist/chunks/vertexColorMixing-LW0x2Gpk.esm.min.js +2 -0
  415. package/dist/chunks/vertexColorMixing-LW0x2Gpk.esm.min.js.map +1 -0
  416. package/dist/chunks/vertexColorMixing-jX14Vi25.esm.min.js +2 -0
  417. package/dist/chunks/vertexColorMixing-jX14Vi25.esm.min.js.map +1 -0
  418. package/dist/chunks/webgpuEngine-BznfuvIT.esm.min.js +2 -0
  419. package/dist/chunks/webgpuEngine-BznfuvIT.esm.min.js.map +1 -0
  420. package/dist/chunks/webgpuEngine-YSuuE7dI.esm.js +11542 -0
  421. package/dist/chunks/webgpuEngine-YSuuE7dI.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 +596 -0
  427. package/lib/index.js +2168 -0
  428. package/lib/index.js.map +1 -0
  429. package/package.json +38 -24
  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,1812 @@
1
+ import { an as __decorate, ao as serializeAsTexture, ap as expandToProperty, aq as serializeAsColor3, ar as serialize, as as serializeAsFresnelParameters, R as RegisterClass, al as Scene, z as PushMaterial, s as Color3, at as SmartArray, a5 as Matrix, au as DetailMapConfiguration, av as PrePassConfiguration, aw as Material, ax as PrepareDefinesForLights, ay as PrepareDefinesForMultiview, az as PrepareDefinesForPrePass, aA as PrepareDefinesForOIT, aB as MaterialHelperGeometryRendering, C as Constants, aC as PrepareDefinesForMergedUV, t as Texture, J as PrepareDefinesForMisc, K as PrepareDefinesForFrameBoundValues, N as PrepareDefinesForAttributes, aD as HandleFallbacksForShadows, aE as PrepareAttributesForBones, Q as PrepareAttributesForInstances, aF as PrepareAttributesForMorphTargets, aG as PrepareAttributesForBakedVertexAnimation, aH as ImageProcessingConfiguration, W as PrepareUniformsAndSamplersList, X as addClipPlaneUniforms, aI as BindBonesParameters, aJ as BindTextureMatrix, Z as bindClipPlane, aK as BindLights, $ as BindFogParameters, aL as BindMorphTargetParameters, a0 as BindLogDepth, a1 as SerializationHelper, aM as MaterialFlags, a2 as MaterialDefines, aN as EffectFallbacks, V as VertexBuffer } from './index-CGxy146H.esm.js';
2
+
3
+ const onCreatedEffectParameters = { effect: null, subMesh: null };
4
+ /** @internal */
5
+ class StandardMaterialDefines extends MaterialDefines {
6
+ /**
7
+ * Initializes the Standard Material defines.
8
+ * @param externalProperties The external properties
9
+ */
10
+ constructor(externalProperties) {
11
+ super(externalProperties);
12
+ this.MAINUV1 = false;
13
+ this.MAINUV2 = false;
14
+ this.MAINUV3 = false;
15
+ this.MAINUV4 = false;
16
+ this.MAINUV5 = false;
17
+ this.MAINUV6 = false;
18
+ this.DIFFUSE = false;
19
+ this.DIFFUSEDIRECTUV = 0;
20
+ this.BAKED_VERTEX_ANIMATION_TEXTURE = false;
21
+ this.AMBIENT = false;
22
+ this.AMBIENTDIRECTUV = 0;
23
+ this.OPACITY = false;
24
+ this.OPACITYDIRECTUV = 0;
25
+ this.OPACITYRGB = false;
26
+ this.REFLECTION = false;
27
+ this.EMISSIVE = false;
28
+ this.EMISSIVEDIRECTUV = 0;
29
+ this.SPECULAR = false;
30
+ this.SPECULARDIRECTUV = 0;
31
+ this.BUMP = false;
32
+ this.BUMPDIRECTUV = 0;
33
+ this.PARALLAX = false;
34
+ this.PARALLAX_RHS = false;
35
+ this.PARALLAXOCCLUSION = false;
36
+ this.SPECULAROVERALPHA = false;
37
+ this.CLIPPLANE = false;
38
+ this.CLIPPLANE2 = false;
39
+ this.CLIPPLANE3 = false;
40
+ this.CLIPPLANE4 = false;
41
+ this.CLIPPLANE5 = false;
42
+ this.CLIPPLANE6 = false;
43
+ this.ALPHATEST = false;
44
+ this.DEPTHPREPASS = false;
45
+ this.ALPHAFROMDIFFUSE = false;
46
+ this.POINTSIZE = false;
47
+ this.FOG = false;
48
+ this.SPECULARTERM = false;
49
+ this.DIFFUSEFRESNEL = false;
50
+ this.OPACITYFRESNEL = false;
51
+ this.REFLECTIONFRESNEL = false;
52
+ this.REFRACTIONFRESNEL = false;
53
+ this.EMISSIVEFRESNEL = false;
54
+ this.FRESNEL = false;
55
+ this.NORMAL = false;
56
+ this.TANGENT = false;
57
+ this.UV1 = false;
58
+ this.UV2 = false;
59
+ this.UV3 = false;
60
+ this.UV4 = false;
61
+ this.UV5 = false;
62
+ this.UV6 = false;
63
+ this.VERTEXCOLOR = false;
64
+ this.VERTEXALPHA = false;
65
+ this.NUM_BONE_INFLUENCERS = 0;
66
+ this.BonesPerMesh = 0;
67
+ this.BONETEXTURE = false;
68
+ this.BONES_VELOCITY_ENABLED = false;
69
+ this.INSTANCES = false;
70
+ this.THIN_INSTANCES = false;
71
+ this.INSTANCESCOLOR = false;
72
+ this.GLOSSINESS = false;
73
+ this.ROUGHNESS = false;
74
+ this.EMISSIVEASILLUMINATION = false;
75
+ this.LINKEMISSIVEWITHDIFFUSE = false;
76
+ this.REFLECTIONFRESNELFROMSPECULAR = false;
77
+ this.LIGHTMAP = false;
78
+ this.LIGHTMAPDIRECTUV = 0;
79
+ this.OBJECTSPACE_NORMALMAP = false;
80
+ this.USELIGHTMAPASSHADOWMAP = false;
81
+ this.REFLECTIONMAP_3D = false;
82
+ this.REFLECTIONMAP_SPHERICAL = false;
83
+ this.REFLECTIONMAP_PLANAR = false;
84
+ this.REFLECTIONMAP_CUBIC = false;
85
+ this.USE_LOCAL_REFLECTIONMAP_CUBIC = false;
86
+ this.USE_LOCAL_REFRACTIONMAP_CUBIC = false;
87
+ this.REFLECTIONMAP_PROJECTION = false;
88
+ this.REFLECTIONMAP_SKYBOX = false;
89
+ this.REFLECTIONMAP_EXPLICIT = false;
90
+ this.REFLECTIONMAP_EQUIRECTANGULAR = false;
91
+ this.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;
92
+ this.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;
93
+ this.REFLECTIONMAP_OPPOSITEZ = false;
94
+ this.INVERTCUBICMAP = false;
95
+ this.LOGARITHMICDEPTH = false;
96
+ this.REFRACTION = false;
97
+ this.REFRACTIONMAP_3D = false;
98
+ this.REFLECTIONOVERALPHA = false;
99
+ this.TWOSIDEDLIGHTING = false;
100
+ this.SHADOWFLOAT = false;
101
+ this.MORPHTARGETS = false;
102
+ this.MORPHTARGETS_POSITION = false;
103
+ this.MORPHTARGETS_NORMAL = false;
104
+ this.MORPHTARGETS_TANGENT = false;
105
+ this.MORPHTARGETS_UV = false;
106
+ this.MORPHTARGETS_UV2 = false;
107
+ this.MORPHTARGETTEXTURE_HASPOSITIONS = false;
108
+ this.MORPHTARGETTEXTURE_HASNORMALS = false;
109
+ this.MORPHTARGETTEXTURE_HASTANGENTS = false;
110
+ this.MORPHTARGETTEXTURE_HASUVS = false;
111
+ this.MORPHTARGETTEXTURE_HASUV2S = false;
112
+ this.NUM_MORPH_INFLUENCERS = 0;
113
+ this.MORPHTARGETS_TEXTURE = false;
114
+ this.NONUNIFORMSCALING = false; // https://playground.babylonjs.com#V6DWIH
115
+ this.PREMULTIPLYALPHA = false; // https://playground.babylonjs.com#LNVJJ7
116
+ this.ALPHATEST_AFTERALLALPHACOMPUTATIONS = false;
117
+ this.ALPHABLEND = true;
118
+ this.PREPASS = false;
119
+ this.PREPASS_COLOR = false;
120
+ this.PREPASS_COLOR_INDEX = -1;
121
+ this.PREPASS_IRRADIANCE = false;
122
+ this.PREPASS_IRRADIANCE_INDEX = -1;
123
+ this.PREPASS_ALBEDO = false;
124
+ this.PREPASS_ALBEDO_INDEX = -1;
125
+ this.PREPASS_ALBEDO_SQRT = false;
126
+ this.PREPASS_ALBEDO_SQRT_INDEX = -1;
127
+ this.PREPASS_DEPTH = false;
128
+ this.PREPASS_DEPTH_INDEX = -1;
129
+ this.PREPASS_SCREENSPACE_DEPTH = false;
130
+ this.PREPASS_SCREENSPACE_DEPTH_INDEX = -1;
131
+ this.PREPASS_NORMAL = false;
132
+ this.PREPASS_NORMAL_INDEX = -1;
133
+ this.PREPASS_NORMAL_WORLDSPACE = false;
134
+ this.PREPASS_WORLD_NORMAL = false;
135
+ this.PREPASS_WORLD_NORMAL_INDEX = -1;
136
+ this.PREPASS_POSITION = false;
137
+ this.PREPASS_POSITION_INDEX = -1;
138
+ this.PREPASS_LOCAL_POSITION = false;
139
+ this.PREPASS_LOCAL_POSITION_INDEX = -1;
140
+ this.PREPASS_VELOCITY = false;
141
+ this.PREPASS_VELOCITY_INDEX = -1;
142
+ this.PREPASS_VELOCITY_LINEAR = false;
143
+ this.PREPASS_VELOCITY_LINEAR_INDEX = -1;
144
+ this.PREPASS_REFLECTIVITY = false;
145
+ this.PREPASS_REFLECTIVITY_INDEX = -1;
146
+ this.SCENE_MRT_COUNT = 0;
147
+ this.RGBDLIGHTMAP = false;
148
+ this.RGBDREFLECTION = false;
149
+ this.RGBDREFRACTION = false;
150
+ this.IMAGEPROCESSING = false;
151
+ this.VIGNETTE = false;
152
+ this.VIGNETTEBLENDMODEMULTIPLY = false;
153
+ this.VIGNETTEBLENDMODEOPAQUE = false;
154
+ this.TONEMAPPING = 0;
155
+ this.CONTRAST = false;
156
+ this.COLORCURVES = false;
157
+ this.COLORGRADING = false;
158
+ this.COLORGRADING3D = false;
159
+ this.SAMPLER3DGREENDEPTH = false;
160
+ this.SAMPLER3DBGRMAP = false;
161
+ this.DITHER = false;
162
+ this.IMAGEPROCESSINGPOSTPROCESS = false;
163
+ this.SKIPFINALCOLORCLAMP = false;
164
+ this.MULTIVIEW = false;
165
+ this.ORDER_INDEPENDENT_TRANSPARENCY = false;
166
+ this.ORDER_INDEPENDENT_TRANSPARENCY_16BITS = false;
167
+ this.CAMERA_ORTHOGRAPHIC = false;
168
+ this.CAMERA_PERSPECTIVE = false;
169
+ /**
170
+ * If the reflection texture on this material is in linear color space
171
+ * @internal
172
+ */
173
+ this.IS_REFLECTION_LINEAR = false;
174
+ /**
175
+ * If the refraction texture on this material is in linear color space
176
+ * @internal
177
+ */
178
+ this.IS_REFRACTION_LINEAR = false;
179
+ this.EXPOSURE = false;
180
+ this.DECAL_AFTER_DETAIL = false;
181
+ this.rebuild();
182
+ }
183
+ setReflectionMode(modeToEnable) {
184
+ const modes = [
185
+ "REFLECTIONMAP_CUBIC",
186
+ "REFLECTIONMAP_EXPLICIT",
187
+ "REFLECTIONMAP_PLANAR",
188
+ "REFLECTIONMAP_PROJECTION",
189
+ "REFLECTIONMAP_PROJECTION",
190
+ "REFLECTIONMAP_SKYBOX",
191
+ "REFLECTIONMAP_SPHERICAL",
192
+ "REFLECTIONMAP_EQUIRECTANGULAR",
193
+ "REFLECTIONMAP_EQUIRECTANGULAR_FIXED",
194
+ "REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED",
195
+ ];
196
+ for (const mode of modes) {
197
+ this[mode] = mode === modeToEnable;
198
+ }
199
+ }
200
+ }
201
+ /**
202
+ * This is the default material used in Babylon. It is the best trade off between quality
203
+ * and performances.
204
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction
205
+ */
206
+ class StandardMaterial extends PushMaterial {
207
+ /**
208
+ * Gets the image processing configuration used either in this material.
209
+ */
210
+ get imageProcessingConfiguration() {
211
+ return this._imageProcessingConfiguration;
212
+ }
213
+ /**
214
+ * Sets the Default image processing configuration used either in the this material.
215
+ *
216
+ * If sets to null, the scene one is in use.
217
+ */
218
+ set imageProcessingConfiguration(value) {
219
+ this._attachImageProcessingConfiguration(value);
220
+ // Ensure the effect will be rebuilt.
221
+ this._markAllSubMeshesAsTexturesDirty();
222
+ }
223
+ /**
224
+ * Attaches a new image processing configuration to the Standard Material.
225
+ * @param configuration
226
+ */
227
+ _attachImageProcessingConfiguration(configuration) {
228
+ if (configuration === this._imageProcessingConfiguration) {
229
+ return;
230
+ }
231
+ // Detaches observer
232
+ if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
233
+ this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
234
+ }
235
+ // Pick the scene configuration if needed
236
+ if (!configuration) {
237
+ this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;
238
+ }
239
+ else {
240
+ this._imageProcessingConfiguration = configuration;
241
+ }
242
+ // Attaches observer
243
+ if (this._imageProcessingConfiguration) {
244
+ this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(() => {
245
+ this._markAllSubMeshesAsImageProcessingDirty();
246
+ });
247
+ }
248
+ }
249
+ /**
250
+ * Can this material render to prepass
251
+ */
252
+ get isPrePassCapable() {
253
+ return !this.disableDepthWrite;
254
+ }
255
+ /**
256
+ * Gets whether the color curves effect is enabled.
257
+ */
258
+ get cameraColorCurvesEnabled() {
259
+ return this.imageProcessingConfiguration.colorCurvesEnabled;
260
+ }
261
+ /**
262
+ * Sets whether the color curves effect is enabled.
263
+ */
264
+ set cameraColorCurvesEnabled(value) {
265
+ this.imageProcessingConfiguration.colorCurvesEnabled = value;
266
+ }
267
+ /**
268
+ * Gets whether the color grading effect is enabled.
269
+ */
270
+ get cameraColorGradingEnabled() {
271
+ return this.imageProcessingConfiguration.colorGradingEnabled;
272
+ }
273
+ /**
274
+ * Gets whether the color grading effect is enabled.
275
+ */
276
+ set cameraColorGradingEnabled(value) {
277
+ this.imageProcessingConfiguration.colorGradingEnabled = value;
278
+ }
279
+ /**
280
+ * Gets whether tonemapping is enabled or not.
281
+ */
282
+ get cameraToneMappingEnabled() {
283
+ return this._imageProcessingConfiguration.toneMappingEnabled;
284
+ }
285
+ /**
286
+ * Sets whether tonemapping is enabled or not
287
+ */
288
+ set cameraToneMappingEnabled(value) {
289
+ this._imageProcessingConfiguration.toneMappingEnabled = value;
290
+ }
291
+ /**
292
+ * The camera exposure used on this material.
293
+ * This property is here and not in the camera to allow controlling exposure without full screen post process.
294
+ * This corresponds to a photographic exposure.
295
+ */
296
+ get cameraExposure() {
297
+ return this._imageProcessingConfiguration.exposure;
298
+ }
299
+ /**
300
+ * The camera exposure used on this material.
301
+ * This property is here and not in the camera to allow controlling exposure without full screen post process.
302
+ * This corresponds to a photographic exposure.
303
+ */
304
+ set cameraExposure(value) {
305
+ this._imageProcessingConfiguration.exposure = value;
306
+ }
307
+ /**
308
+ * Gets The camera contrast used on this material.
309
+ */
310
+ get cameraContrast() {
311
+ return this._imageProcessingConfiguration.contrast;
312
+ }
313
+ /**
314
+ * Sets The camera contrast used on this material.
315
+ */
316
+ set cameraContrast(value) {
317
+ this._imageProcessingConfiguration.contrast = value;
318
+ }
319
+ /**
320
+ * Gets the Color Grading 2D Lookup Texture.
321
+ */
322
+ get cameraColorGradingTexture() {
323
+ return this._imageProcessingConfiguration.colorGradingTexture;
324
+ }
325
+ /**
326
+ * Sets the Color Grading 2D Lookup Texture.
327
+ */
328
+ set cameraColorGradingTexture(value) {
329
+ this._imageProcessingConfiguration.colorGradingTexture = value;
330
+ }
331
+ /**
332
+ * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
333
+ * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
334
+ * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
335
+ * corresponding to low luminance, medium luminance, and high luminance areas respectively.
336
+ */
337
+ get cameraColorCurves() {
338
+ return this._imageProcessingConfiguration.colorCurves;
339
+ }
340
+ /**
341
+ * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).
342
+ * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
343
+ * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
344
+ * corresponding to low luminance, medium luminance, and high luminance areas respectively.
345
+ */
346
+ set cameraColorCurves(value) {
347
+ this._imageProcessingConfiguration.colorCurves = value;
348
+ }
349
+ /**
350
+ * Can this material render to several textures at once
351
+ */
352
+ get canRenderToMRT() {
353
+ return true;
354
+ }
355
+ /**
356
+ * Instantiates a new standard material.
357
+ * This is the default material used in Babylon. It is the best trade off between quality
358
+ * and performances.
359
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction
360
+ * @param name Define the name of the material in the scene
361
+ * @param scene Define the scene the material belong to
362
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
363
+ */
364
+ constructor(name, scene, forceGLSL = false) {
365
+ super(name, scene, undefined, forceGLSL || StandardMaterial.ForceGLSL);
366
+ this._diffuseTexture = null;
367
+ this._ambientTexture = null;
368
+ this._opacityTexture = null;
369
+ this._reflectionTexture = null;
370
+ this._emissiveTexture = null;
371
+ this._specularTexture = null;
372
+ this._bumpTexture = null;
373
+ this._lightmapTexture = null;
374
+ this._refractionTexture = null;
375
+ /**
376
+ * The color of the material lit by the environmental background lighting.
377
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#ambient-color-example
378
+ */
379
+ this.ambientColor = new Color3(0, 0, 0);
380
+ /**
381
+ * The basic color of the material as viewed under a light.
382
+ */
383
+ this.diffuseColor = new Color3(1, 1, 1);
384
+ /**
385
+ * Define how the color and intensity of the highlight given by the light in the material.
386
+ */
387
+ this.specularColor = new Color3(1, 1, 1);
388
+ /**
389
+ * Define the color of the material as if self lit.
390
+ * This will be mixed in the final result even in the absence of light.
391
+ */
392
+ this.emissiveColor = new Color3(0, 0, 0);
393
+ /**
394
+ * Defines how sharp are the highlights in the material.
395
+ * The bigger the value the sharper giving a more glossy feeling to the result.
396
+ * Reversely, the smaller the value the blurrier giving a more rough feeling to the result.
397
+ */
398
+ this.specularPower = 64;
399
+ this._useAlphaFromDiffuseTexture = false;
400
+ this._useEmissiveAsIllumination = false;
401
+ this._linkEmissiveWithDiffuse = false;
402
+ this._useSpecularOverAlpha = false;
403
+ this._useReflectionOverAlpha = false;
404
+ this._disableLighting = false;
405
+ this._useObjectSpaceNormalMap = false;
406
+ this._useParallax = false;
407
+ this._useParallaxOcclusion = false;
408
+ /**
409
+ * Apply a scaling factor that determine which "depth" the height map should reprensent. A value between 0.05 and 0.1 is reasonnable in Parallax, you can reach 0.2 using Parallax Occlusion.
410
+ */
411
+ this.parallaxScaleBias = 0.05;
412
+ this._roughness = 0;
413
+ /**
414
+ * In case of refraction, define the value of the index of refraction.
415
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions
416
+ */
417
+ this.indexOfRefraction = 0.98;
418
+ /**
419
+ * Invert the refraction texture alongside the y axis.
420
+ * It can be useful with procedural textures or probe for instance.
421
+ * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions
422
+ */
423
+ this.invertRefractionY = true;
424
+ /**
425
+ * Defines the alpha limits in alpha test mode.
426
+ */
427
+ this.alphaCutOff = 0.4;
428
+ this._useLightmapAsShadowmap = false;
429
+ this._useReflectionFresnelFromSpecular = false;
430
+ this._useGlossinessFromSpecularMapAlpha = false;
431
+ this._maxSimultaneousLights = 4;
432
+ this._invertNormalMapX = false;
433
+ this._invertNormalMapY = false;
434
+ this._twoSidedLighting = false;
435
+ this._applyDecalMapAfterDetailMap = false;
436
+ this._shadersLoaded = false;
437
+ this._renderTargets = new SmartArray(16);
438
+ this._worldViewProjectionMatrix = Matrix.Zero();
439
+ this._globalAmbientColor = new Color3(0, 0, 0);
440
+ this._cacheHasRenderTargetTextures = false;
441
+ this.detailMap = new DetailMapConfiguration(this);
442
+ // Setup the default processing configuration to the scene.
443
+ this._attachImageProcessingConfiguration(null);
444
+ this.prePassConfiguration = new PrePassConfiguration();
445
+ this.getRenderTargetTextures = () => {
446
+ this._renderTargets.reset();
447
+ if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
448
+ this._renderTargets.push(this._reflectionTexture);
449
+ }
450
+ if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {
451
+ this._renderTargets.push(this._refractionTexture);
452
+ }
453
+ this._eventInfo.renderTargets = this._renderTargets;
454
+ this._callbackPluginEventFillRenderTargetTextures(this._eventInfo);
455
+ return this._renderTargets;
456
+ };
457
+ }
458
+ /**
459
+ * Gets a boolean indicating that current material needs to register RTT
460
+ */
461
+ get hasRenderTargetTextures() {
462
+ if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
463
+ return true;
464
+ }
465
+ if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {
466
+ return true;
467
+ }
468
+ return this._cacheHasRenderTargetTextures;
469
+ }
470
+ /**
471
+ * Gets the current class name of the material e.g. "StandardMaterial"
472
+ * Mainly use in serialization.
473
+ * @returns the class name
474
+ */
475
+ getClassName() {
476
+ return "StandardMaterial";
477
+ }
478
+ /**
479
+ * Specifies if the material will require alpha blending
480
+ * @returns a boolean specifying if alpha blending is needed
481
+ */
482
+ needAlphaBlending() {
483
+ if (this._disableAlphaBlending) {
484
+ return false;
485
+ }
486
+ return (this.alpha < 1.0 ||
487
+ this._opacityTexture != null ||
488
+ this._shouldUseAlphaFromDiffuseTexture() ||
489
+ (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled));
490
+ }
491
+ /**
492
+ * Specifies if this material should be rendered in alpha test mode
493
+ * @returns a boolean specifying if an alpha test is needed.
494
+ */
495
+ needAlphaTesting() {
496
+ if (this._forceAlphaTest) {
497
+ return true;
498
+ }
499
+ return this._hasAlphaChannel() && (this._transparencyMode == null || this._transparencyMode === Material.MATERIAL_ALPHATEST);
500
+ }
501
+ /**
502
+ * @returns whether or not the alpha value of the diffuse texture should be used for alpha blending.
503
+ */
504
+ _shouldUseAlphaFromDiffuseTexture() {
505
+ return this._diffuseTexture != null && this._diffuseTexture.hasAlpha && this._useAlphaFromDiffuseTexture && this._transparencyMode !== Material.MATERIAL_OPAQUE;
506
+ }
507
+ /**
508
+ * @returns whether or not there is a usable alpha channel for transparency.
509
+ */
510
+ _hasAlphaChannel() {
511
+ return (this._diffuseTexture != null && this._diffuseTexture.hasAlpha) || this._opacityTexture != null;
512
+ }
513
+ /**
514
+ * Get the texture used for alpha test purpose.
515
+ * @returns the diffuse texture in case of the standard material.
516
+ */
517
+ getAlphaTestTexture() {
518
+ return this._diffuseTexture;
519
+ }
520
+ /**
521
+ * Get if the submesh is ready to be used and all its information available.
522
+ * Child classes can use it to update shaders
523
+ * @param mesh defines the mesh to check
524
+ * @param subMesh defines which submesh to check
525
+ * @param useInstances specifies that instances should be used
526
+ * @returns a boolean indicating that the submesh is ready or not
527
+ */
528
+ isReadyForSubMesh(mesh, subMesh, useInstances = false) {
529
+ if (!this._uniformBufferLayoutBuilt) {
530
+ this.buildUniformLayout();
531
+ }
532
+ const drawWrapper = subMesh._drawWrapper;
533
+ if (drawWrapper.effect && this.isFrozen) {
534
+ if (drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {
535
+ return true;
536
+ }
537
+ }
538
+ if (!subMesh.materialDefines) {
539
+ this._callbackPluginEventGeneric(4 /* MaterialPluginEvent.GetDefineNames */, this._eventInfo);
540
+ subMesh.materialDefines = new StandardMaterialDefines(this._eventInfo.defineNames);
541
+ }
542
+ const scene = this.getScene();
543
+ const defines = subMesh.materialDefines;
544
+ if (this._isReadyForSubMesh(subMesh)) {
545
+ return true;
546
+ }
547
+ const engine = scene.getEngine();
548
+ // Lights
549
+ defines._needNormals = PrepareDefinesForLights(scene, mesh, defines, true, this._maxSimultaneousLights, this._disableLighting);
550
+ // Multiview
551
+ PrepareDefinesForMultiview(scene, defines);
552
+ // PrePass
553
+ const oit = this.needAlphaBlendingForMesh(mesh) && this.getScene().useOrderIndependentTransparency;
554
+ PrepareDefinesForPrePass(scene, defines, this.canRenderToMRT && !oit);
555
+ // Order independant transparency
556
+ PrepareDefinesForOIT(scene, defines, oit);
557
+ MaterialHelperGeometryRendering.PrepareDefines(engine.currentRenderPassId, mesh, defines);
558
+ // Textures
559
+ if (defines._areTexturesDirty) {
560
+ this._eventInfo.hasRenderTargetTextures = false;
561
+ this._callbackPluginEventHasRenderTargetTextures(this._eventInfo);
562
+ this._cacheHasRenderTargetTextures = this._eventInfo.hasRenderTargetTextures;
563
+ defines._needUVs = false;
564
+ for (let i = 1; i <= Constants.MAX_SUPPORTED_UV_SETS; ++i) {
565
+ defines["MAINUV" + i] = false;
566
+ }
567
+ if (scene.texturesEnabled) {
568
+ defines.DIFFUSEDIRECTUV = 0;
569
+ defines.BUMPDIRECTUV = 0;
570
+ defines.AMBIENTDIRECTUV = 0;
571
+ defines.OPACITYDIRECTUV = 0;
572
+ defines.EMISSIVEDIRECTUV = 0;
573
+ defines.SPECULARDIRECTUV = 0;
574
+ defines.LIGHTMAPDIRECTUV = 0;
575
+ if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {
576
+ if (!this._diffuseTexture.isReadyOrNotBlocking()) {
577
+ return false;
578
+ }
579
+ else {
580
+ PrepareDefinesForMergedUV(this._diffuseTexture, defines, "DIFFUSE");
581
+ }
582
+ }
583
+ else {
584
+ defines.DIFFUSE = false;
585
+ }
586
+ if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {
587
+ if (!this._ambientTexture.isReadyOrNotBlocking()) {
588
+ return false;
589
+ }
590
+ else {
591
+ PrepareDefinesForMergedUV(this._ambientTexture, defines, "AMBIENT");
592
+ }
593
+ }
594
+ else {
595
+ defines.AMBIENT = false;
596
+ }
597
+ if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {
598
+ if (!this._opacityTexture.isReadyOrNotBlocking()) {
599
+ return false;
600
+ }
601
+ else {
602
+ PrepareDefinesForMergedUV(this._opacityTexture, defines, "OPACITY");
603
+ defines.OPACITYRGB = this._opacityTexture.getAlphaFromRGB;
604
+ }
605
+ }
606
+ else {
607
+ defines.OPACITY = false;
608
+ }
609
+ if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {
610
+ if (!this._reflectionTexture.isReadyOrNotBlocking()) {
611
+ return false;
612
+ }
613
+ else {
614
+ defines._needNormals = true;
615
+ defines.REFLECTION = true;
616
+ defines.ROUGHNESS = this._roughness > 0;
617
+ defines.REFLECTIONOVERALPHA = this._useReflectionOverAlpha;
618
+ defines.INVERTCUBICMAP = this._reflectionTexture.coordinatesMode === Texture.INVCUBIC_MODE;
619
+ defines.REFLECTIONMAP_3D = this._reflectionTexture.isCube;
620
+ defines.REFLECTIONMAP_OPPOSITEZ =
621
+ defines.REFLECTIONMAP_3D && this.getScene().useRightHandedSystem ? !this._reflectionTexture.invertZ : this._reflectionTexture.invertZ;
622
+ defines.RGBDREFLECTION = this._reflectionTexture.isRGBD;
623
+ switch (this._reflectionTexture.coordinatesMode) {
624
+ case Texture.EXPLICIT_MODE:
625
+ defines.setReflectionMode("REFLECTIONMAP_EXPLICIT");
626
+ break;
627
+ case Texture.PLANAR_MODE:
628
+ defines.setReflectionMode("REFLECTIONMAP_PLANAR");
629
+ break;
630
+ case Texture.PROJECTION_MODE:
631
+ defines.setReflectionMode("REFLECTIONMAP_PROJECTION");
632
+ break;
633
+ case Texture.SKYBOX_MODE:
634
+ defines.setReflectionMode("REFLECTIONMAP_SKYBOX");
635
+ break;
636
+ case Texture.SPHERICAL_MODE:
637
+ defines.setReflectionMode("REFLECTIONMAP_SPHERICAL");
638
+ break;
639
+ case Texture.EQUIRECTANGULAR_MODE:
640
+ defines.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR");
641
+ break;
642
+ case Texture.FIXED_EQUIRECTANGULAR_MODE:
643
+ defines.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR_FIXED");
644
+ break;
645
+ case Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:
646
+ defines.setReflectionMode("REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED");
647
+ break;
648
+ case Texture.CUBIC_MODE:
649
+ case Texture.INVCUBIC_MODE:
650
+ default:
651
+ defines.setReflectionMode("REFLECTIONMAP_CUBIC");
652
+ break;
653
+ }
654
+ defines.USE_LOCAL_REFLECTIONMAP_CUBIC = this._reflectionTexture.boundingBoxSize ? true : false;
655
+ }
656
+ }
657
+ else {
658
+ defines.REFLECTION = false;
659
+ defines.REFLECTIONMAP_OPPOSITEZ = false;
660
+ }
661
+ if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {
662
+ if (!this._emissiveTexture.isReadyOrNotBlocking()) {
663
+ return false;
664
+ }
665
+ else {
666
+ PrepareDefinesForMergedUV(this._emissiveTexture, defines, "EMISSIVE");
667
+ }
668
+ }
669
+ else {
670
+ defines.EMISSIVE = false;
671
+ }
672
+ if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {
673
+ if (!this._lightmapTexture.isReadyOrNotBlocking()) {
674
+ return false;
675
+ }
676
+ else {
677
+ PrepareDefinesForMergedUV(this._lightmapTexture, defines, "LIGHTMAP");
678
+ defines.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap;
679
+ defines.RGBDLIGHTMAP = this._lightmapTexture.isRGBD;
680
+ }
681
+ }
682
+ else {
683
+ defines.LIGHTMAP = false;
684
+ }
685
+ if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {
686
+ if (!this._specularTexture.isReadyOrNotBlocking()) {
687
+ return false;
688
+ }
689
+ else {
690
+ PrepareDefinesForMergedUV(this._specularTexture, defines, "SPECULAR");
691
+ defines.GLOSSINESS = this._useGlossinessFromSpecularMapAlpha;
692
+ }
693
+ }
694
+ else {
695
+ defines.SPECULAR = false;
696
+ }
697
+ if (scene.getEngine().getCaps().standardDerivatives && this._bumpTexture && StandardMaterial.BumpTextureEnabled) {
698
+ // Bump texture can not be not blocking.
699
+ if (!this._bumpTexture.isReady()) {
700
+ return false;
701
+ }
702
+ else {
703
+ PrepareDefinesForMergedUV(this._bumpTexture, defines, "BUMP");
704
+ defines.PARALLAX = this._useParallax;
705
+ defines.PARALLAX_RHS = scene.useRightHandedSystem;
706
+ defines.PARALLAXOCCLUSION = this._useParallaxOcclusion;
707
+ }
708
+ defines.OBJECTSPACE_NORMALMAP = this._useObjectSpaceNormalMap;
709
+ }
710
+ else {
711
+ defines.BUMP = false;
712
+ defines.PARALLAX = false;
713
+ defines.PARALLAX_RHS = false;
714
+ defines.PARALLAXOCCLUSION = false;
715
+ }
716
+ if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {
717
+ if (!this._refractionTexture.isReadyOrNotBlocking()) {
718
+ return false;
719
+ }
720
+ else {
721
+ defines._needUVs = true;
722
+ defines.REFRACTION = true;
723
+ defines.REFRACTIONMAP_3D = this._refractionTexture.isCube;
724
+ defines.RGBDREFRACTION = this._refractionTexture.isRGBD;
725
+ defines.USE_LOCAL_REFRACTIONMAP_CUBIC = this._refractionTexture.boundingBoxSize ? true : false;
726
+ }
727
+ }
728
+ else {
729
+ defines.REFRACTION = false;
730
+ }
731
+ defines.TWOSIDEDLIGHTING = !this._backFaceCulling && this._twoSidedLighting;
732
+ }
733
+ else {
734
+ defines.DIFFUSE = false;
735
+ defines.AMBIENT = false;
736
+ defines.OPACITY = false;
737
+ defines.REFLECTION = false;
738
+ defines.EMISSIVE = false;
739
+ defines.LIGHTMAP = false;
740
+ defines.BUMP = false;
741
+ defines.REFRACTION = false;
742
+ }
743
+ defines.ALPHAFROMDIFFUSE = this._shouldUseAlphaFromDiffuseTexture();
744
+ defines.EMISSIVEASILLUMINATION = this._useEmissiveAsIllumination;
745
+ defines.LINKEMISSIVEWITHDIFFUSE = this._linkEmissiveWithDiffuse;
746
+ defines.SPECULAROVERALPHA = this._useSpecularOverAlpha;
747
+ defines.PREMULTIPLYALPHA = this.alphaMode === Constants.ALPHA_PREMULTIPLIED || this.alphaMode === Constants.ALPHA_PREMULTIPLIED_PORTERDUFF;
748
+ defines.ALPHATEST_AFTERALLALPHACOMPUTATIONS = this.transparencyMode !== null;
749
+ defines.ALPHABLEND = this.transparencyMode === null || this.needAlphaBlendingForMesh(mesh); // check on null for backward compatibility
750
+ }
751
+ this._eventInfo.isReadyForSubMesh = true;
752
+ this._eventInfo.defines = defines;
753
+ this._eventInfo.subMesh = subMesh;
754
+ this._callbackPluginEventIsReadyForSubMesh(this._eventInfo);
755
+ if (!this._eventInfo.isReadyForSubMesh) {
756
+ return false;
757
+ }
758
+ if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {
759
+ if (!this._imageProcessingConfiguration.isReady()) {
760
+ return false;
761
+ }
762
+ this._imageProcessingConfiguration.prepareDefines(defines);
763
+ defines.IS_REFLECTION_LINEAR = this.reflectionTexture != null && !this.reflectionTexture.gammaSpace;
764
+ defines.IS_REFRACTION_LINEAR = this.refractionTexture != null && !this.refractionTexture.gammaSpace;
765
+ }
766
+ if (defines._areFresnelDirty) {
767
+ if (StandardMaterial.FresnelEnabled) {
768
+ // Fresnel
769
+ if (this._diffuseFresnelParameters ||
770
+ this._opacityFresnelParameters ||
771
+ this._emissiveFresnelParameters ||
772
+ this._refractionFresnelParameters ||
773
+ this._reflectionFresnelParameters) {
774
+ defines.DIFFUSEFRESNEL = this._diffuseFresnelParameters && this._diffuseFresnelParameters.isEnabled;
775
+ defines.OPACITYFRESNEL = this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled;
776
+ defines.REFLECTIONFRESNEL = this._reflectionFresnelParameters && this._reflectionFresnelParameters.isEnabled;
777
+ defines.REFLECTIONFRESNELFROMSPECULAR = this._useReflectionFresnelFromSpecular;
778
+ defines.REFRACTIONFRESNEL = this._refractionFresnelParameters && this._refractionFresnelParameters.isEnabled;
779
+ defines.EMISSIVEFRESNEL = this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled;
780
+ defines._needNormals = true;
781
+ defines.FRESNEL = true;
782
+ }
783
+ }
784
+ else {
785
+ defines.FRESNEL = false;
786
+ }
787
+ }
788
+ // Misc.
789
+ PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh) || this._forceAlphaTest, defines, this._applyDecalMapAfterDetailMap);
790
+ // Values that need to be evaluated on every frame
791
+ PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);
792
+ // External config
793
+ this._eventInfo.defines = defines;
794
+ this._eventInfo.mesh = mesh;
795
+ this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo);
796
+ // Attribs
797
+ PrepareDefinesForAttributes(mesh, defines, true, true, true);
798
+ // External config
799
+ this._callbackPluginEventPrepareDefines(this._eventInfo);
800
+ // Get correct effect
801
+ let forceWasNotReadyPreviously = false;
802
+ if (defines.isDirty) {
803
+ const lightDisposed = defines._areLightsDisposed;
804
+ defines.markAsProcessed();
805
+ // Fallbacks
806
+ const fallbacks = new EffectFallbacks();
807
+ if (defines.REFLECTION) {
808
+ fallbacks.addFallback(0, "REFLECTION");
809
+ }
810
+ if (defines.SPECULAR) {
811
+ fallbacks.addFallback(0, "SPECULAR");
812
+ }
813
+ if (defines.BUMP) {
814
+ fallbacks.addFallback(0, "BUMP");
815
+ }
816
+ if (defines.PARALLAX) {
817
+ fallbacks.addFallback(1, "PARALLAX");
818
+ }
819
+ if (defines.PARALLAX_RHS) {
820
+ fallbacks.addFallback(1, "PARALLAX_RHS");
821
+ }
822
+ if (defines.PARALLAXOCCLUSION) {
823
+ fallbacks.addFallback(0, "PARALLAXOCCLUSION");
824
+ }
825
+ if (defines.SPECULAROVERALPHA) {
826
+ fallbacks.addFallback(0, "SPECULAROVERALPHA");
827
+ }
828
+ if (defines.FOG) {
829
+ fallbacks.addFallback(1, "FOG");
830
+ }
831
+ if (defines.POINTSIZE) {
832
+ fallbacks.addFallback(0, "POINTSIZE");
833
+ }
834
+ if (defines.LOGARITHMICDEPTH) {
835
+ fallbacks.addFallback(0, "LOGARITHMICDEPTH");
836
+ }
837
+ HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights);
838
+ if (defines.SPECULARTERM) {
839
+ fallbacks.addFallback(0, "SPECULARTERM");
840
+ }
841
+ if (defines.DIFFUSEFRESNEL) {
842
+ fallbacks.addFallback(1, "DIFFUSEFRESNEL");
843
+ }
844
+ if (defines.OPACITYFRESNEL) {
845
+ fallbacks.addFallback(2, "OPACITYFRESNEL");
846
+ }
847
+ if (defines.REFLECTIONFRESNEL) {
848
+ fallbacks.addFallback(3, "REFLECTIONFRESNEL");
849
+ }
850
+ if (defines.EMISSIVEFRESNEL) {
851
+ fallbacks.addFallback(4, "EMISSIVEFRESNEL");
852
+ }
853
+ if (defines.FRESNEL) {
854
+ fallbacks.addFallback(4, "FRESNEL");
855
+ }
856
+ if (defines.MULTIVIEW) {
857
+ fallbacks.addFallback(0, "MULTIVIEW");
858
+ }
859
+ //Attributes
860
+ const attribs = [VertexBuffer.PositionKind];
861
+ if (defines.NORMAL) {
862
+ attribs.push(VertexBuffer.NormalKind);
863
+ }
864
+ if (defines.TANGENT) {
865
+ attribs.push(VertexBuffer.TangentKind);
866
+ }
867
+ for (let i = 1; i <= Constants.MAX_SUPPORTED_UV_SETS; ++i) {
868
+ if (defines["UV" + i]) {
869
+ attribs.push(`uv${i === 1 ? "" : i}`);
870
+ }
871
+ }
872
+ if (defines.VERTEXCOLOR) {
873
+ attribs.push(VertexBuffer.ColorKind);
874
+ }
875
+ PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
876
+ PrepareAttributesForInstances(attribs, defines);
877
+ PrepareAttributesForMorphTargets(attribs, mesh, defines);
878
+ PrepareAttributesForBakedVertexAnimation(attribs, mesh, defines);
879
+ let shaderName = "default";
880
+ const uniforms = [
881
+ "world",
882
+ "view",
883
+ "viewProjection",
884
+ "vEyePosition",
885
+ "vLightsType",
886
+ "vAmbientColor",
887
+ "vDiffuseColor",
888
+ "vSpecularColor",
889
+ "vEmissiveColor",
890
+ "visibility",
891
+ "vFogInfos",
892
+ "vFogColor",
893
+ "pointSize",
894
+ "vDiffuseInfos",
895
+ "vAmbientInfos",
896
+ "vOpacityInfos",
897
+ "vReflectionInfos",
898
+ "vEmissiveInfos",
899
+ "vSpecularInfos",
900
+ "vBumpInfos",
901
+ "vLightmapInfos",
902
+ "vRefractionInfos",
903
+ "mBones",
904
+ "diffuseMatrix",
905
+ "ambientMatrix",
906
+ "opacityMatrix",
907
+ "reflectionMatrix",
908
+ "emissiveMatrix",
909
+ "specularMatrix",
910
+ "bumpMatrix",
911
+ "normalMatrix",
912
+ "lightmapMatrix",
913
+ "refractionMatrix",
914
+ "diffuseLeftColor",
915
+ "diffuseRightColor",
916
+ "opacityParts",
917
+ "reflectionLeftColor",
918
+ "reflectionRightColor",
919
+ "emissiveLeftColor",
920
+ "emissiveRightColor",
921
+ "refractionLeftColor",
922
+ "refractionRightColor",
923
+ "vReflectionPosition",
924
+ "vReflectionSize",
925
+ "vRefractionPosition",
926
+ "vRefractionSize",
927
+ "logarithmicDepthConstant",
928
+ "vTangentSpaceParams",
929
+ "alphaCutOff",
930
+ "boneTextureWidth",
931
+ "morphTargetTextureInfo",
932
+ "morphTargetTextureIndices",
933
+ ];
934
+ const samplers = [
935
+ "diffuseSampler",
936
+ "ambientSampler",
937
+ "opacitySampler",
938
+ "reflectionCubeSampler",
939
+ "reflection2DSampler",
940
+ "emissiveSampler",
941
+ "specularSampler",
942
+ "bumpSampler",
943
+ "lightmapSampler",
944
+ "refractionCubeSampler",
945
+ "refraction2DSampler",
946
+ "boneSampler",
947
+ "morphTargets",
948
+ "oitDepthSampler",
949
+ "oitFrontColorSampler",
950
+ ];
951
+ const uniformBuffers = ["Material", "Scene", "Mesh"];
952
+ const indexParameters = { maxSimultaneousLights: this._maxSimultaneousLights, maxSimultaneousMorphTargets: defines.NUM_MORPH_INFLUENCERS };
953
+ this._eventInfo.fallbacks = fallbacks;
954
+ this._eventInfo.fallbackRank = 0;
955
+ this._eventInfo.defines = defines;
956
+ this._eventInfo.uniforms = uniforms;
957
+ this._eventInfo.attributes = attribs;
958
+ this._eventInfo.samplers = samplers;
959
+ this._eventInfo.uniformBuffersNames = uniformBuffers;
960
+ this._eventInfo.customCode = undefined;
961
+ this._eventInfo.mesh = mesh;
962
+ this._eventInfo.indexParameters = indexParameters;
963
+ this._callbackPluginEventGeneric(128 /* MaterialPluginEvent.PrepareEffect */, this._eventInfo);
964
+ MaterialHelperGeometryRendering.AddUniformsAndSamplers(uniforms, samplers);
965
+ PrePassConfiguration.AddUniforms(uniforms);
966
+ if (ImageProcessingConfiguration) {
967
+ ImageProcessingConfiguration.PrepareUniforms(uniforms, defines);
968
+ ImageProcessingConfiguration.PrepareSamplers(samplers, defines);
969
+ }
970
+ PrepareUniformsAndSamplersList({
971
+ uniformsNames: uniforms,
972
+ uniformBuffersNames: uniformBuffers,
973
+ samplers: samplers,
974
+ defines: defines,
975
+ maxSimultaneousLights: this._maxSimultaneousLights,
976
+ });
977
+ addClipPlaneUniforms(uniforms);
978
+ const csnrOptions = {};
979
+ if (this.customShaderNameResolve) {
980
+ shaderName = this.customShaderNameResolve(shaderName, uniforms, uniformBuffers, samplers, defines, attribs, csnrOptions);
981
+ }
982
+ const join = defines.toString();
983
+ const previousEffect = subMesh.effect;
984
+ let effect = scene.getEngine().createEffect(shaderName, {
985
+ attributes: attribs,
986
+ uniformsNames: uniforms,
987
+ uniformBuffersNames: uniformBuffers,
988
+ samplers: samplers,
989
+ defines: join,
990
+ fallbacks: fallbacks,
991
+ onCompiled: this.onCompiled,
992
+ onError: this.onError,
993
+ indexParameters,
994
+ processFinalCode: csnrOptions.processFinalCode,
995
+ processCodeAfterIncludes: this._eventInfo.customCode,
996
+ multiTarget: defines.PREPASS,
997
+ shaderLanguage: this._shaderLanguage,
998
+ extraInitializationsAsync: this._shadersLoaded
999
+ ? undefined
1000
+ : async () => {
1001
+ if (this._shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
1002
+ await Promise.all([import('./default.vertex-Dc5DNUqC.esm.js'), import('./default.fragment-IZCYw7lv.esm.js')]);
1003
+ }
1004
+ else {
1005
+ await Promise.all([import('./default.vertex-DxExVglD.esm.js'), import('./default.fragment-D1Z8A0b9.esm.js')]);
1006
+ }
1007
+ this._shadersLoaded = true;
1008
+ },
1009
+ }, engine);
1010
+ this._eventInfo.customCode = undefined;
1011
+ if (effect) {
1012
+ if (this._onEffectCreatedObservable) {
1013
+ onCreatedEffectParameters.effect = effect;
1014
+ onCreatedEffectParameters.subMesh = subMesh;
1015
+ this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);
1016
+ }
1017
+ // Use previous effect while new one is compiling
1018
+ if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {
1019
+ effect = previousEffect;
1020
+ defines.markAsUnprocessed();
1021
+ forceWasNotReadyPreviously = this.isFrozen;
1022
+ if (lightDisposed) {
1023
+ // re register in case it takes more than one frame.
1024
+ defines._areLightsDisposed = true;
1025
+ return false;
1026
+ }
1027
+ }
1028
+ else {
1029
+ scene.resetCachedMaterial();
1030
+ subMesh.setEffect(effect, defines, this._materialContext);
1031
+ }
1032
+ }
1033
+ }
1034
+ if (!subMesh.effect || !subMesh.effect.isReady()) {
1035
+ return false;
1036
+ }
1037
+ defines._renderId = scene.getRenderId();
1038
+ drawWrapper._wasPreviouslyReady = forceWasNotReadyPreviously ? false : true;
1039
+ drawWrapper._wasPreviouslyUsingInstances = useInstances;
1040
+ this._checkScenePerformancePriority();
1041
+ return true;
1042
+ }
1043
+ /**
1044
+ * Builds the material UBO layouts.
1045
+ * Used internally during the effect preparation.
1046
+ */
1047
+ buildUniformLayout() {
1048
+ // Order is important !
1049
+ const ubo = this._uniformBuffer;
1050
+ ubo.addUniform("diffuseLeftColor", 4);
1051
+ ubo.addUniform("diffuseRightColor", 4);
1052
+ ubo.addUniform("opacityParts", 4);
1053
+ ubo.addUniform("reflectionLeftColor", 4);
1054
+ ubo.addUniform("reflectionRightColor", 4);
1055
+ ubo.addUniform("refractionLeftColor", 4);
1056
+ ubo.addUniform("refractionRightColor", 4);
1057
+ ubo.addUniform("emissiveLeftColor", 4);
1058
+ ubo.addUniform("emissiveRightColor", 4);
1059
+ ubo.addUniform("vDiffuseInfos", 2);
1060
+ ubo.addUniform("vAmbientInfos", 2);
1061
+ ubo.addUniform("vOpacityInfos", 2);
1062
+ ubo.addUniform("vReflectionInfos", 2);
1063
+ ubo.addUniform("vReflectionPosition", 3);
1064
+ ubo.addUniform("vReflectionSize", 3);
1065
+ ubo.addUniform("vEmissiveInfos", 2);
1066
+ ubo.addUniform("vLightmapInfos", 2);
1067
+ ubo.addUniform("vSpecularInfos", 2);
1068
+ ubo.addUniform("vBumpInfos", 3);
1069
+ ubo.addUniform("diffuseMatrix", 16);
1070
+ ubo.addUniform("ambientMatrix", 16);
1071
+ ubo.addUniform("opacityMatrix", 16);
1072
+ ubo.addUniform("reflectionMatrix", 16);
1073
+ ubo.addUniform("emissiveMatrix", 16);
1074
+ ubo.addUniform("lightmapMatrix", 16);
1075
+ ubo.addUniform("specularMatrix", 16);
1076
+ ubo.addUniform("bumpMatrix", 16);
1077
+ ubo.addUniform("vTangentSpaceParams", 2);
1078
+ ubo.addUniform("pointSize", 1);
1079
+ ubo.addUniform("alphaCutOff", 1);
1080
+ ubo.addUniform("refractionMatrix", 16);
1081
+ ubo.addUniform("vRefractionInfos", 4);
1082
+ ubo.addUniform("vRefractionPosition", 3);
1083
+ ubo.addUniform("vRefractionSize", 3);
1084
+ ubo.addUniform("vSpecularColor", 4);
1085
+ ubo.addUniform("vEmissiveColor", 3);
1086
+ ubo.addUniform("vDiffuseColor", 4);
1087
+ ubo.addUniform("vAmbientColor", 3);
1088
+ super.buildUniformLayout();
1089
+ }
1090
+ /**
1091
+ * Binds the submesh to this material by preparing the effect and shader to draw
1092
+ * @param world defines the world transformation matrix
1093
+ * @param mesh defines the mesh containing the submesh
1094
+ * @param subMesh defines the submesh to bind the material to
1095
+ */
1096
+ bindForSubMesh(world, mesh, subMesh) {
1097
+ const scene = this.getScene();
1098
+ const defines = subMesh.materialDefines;
1099
+ if (!defines) {
1100
+ return;
1101
+ }
1102
+ const effect = subMesh.effect;
1103
+ if (!effect) {
1104
+ return;
1105
+ }
1106
+ this._activeEffect = effect;
1107
+ // Matrices Mesh.
1108
+ mesh.getMeshUniformBuffer().bindToEffect(effect, "Mesh");
1109
+ mesh.transferToEffect(world);
1110
+ // Binding unconditionally
1111
+ this._uniformBuffer.bindToEffect(effect, "Material");
1112
+ this.prePassConfiguration.bindForSubMesh(this._activeEffect, scene, mesh, world, this.isFrozen);
1113
+ MaterialHelperGeometryRendering.Bind(scene.getEngine().currentRenderPassId, this._activeEffect, mesh, world);
1114
+ this._eventInfo.subMesh = subMesh;
1115
+ this._callbackPluginEventHardBindForSubMesh(this._eventInfo);
1116
+ // Normal Matrix
1117
+ if (defines.OBJECTSPACE_NORMALMAP) {
1118
+ world.toNormalMatrix(this._normalMatrix);
1119
+ this.bindOnlyNormalMatrix(this._normalMatrix);
1120
+ }
1121
+ const mustRebind = this._mustRebind(scene, effect, subMesh, mesh.visibility);
1122
+ // Bones
1123
+ BindBonesParameters(mesh, effect);
1124
+ const ubo = this._uniformBuffer;
1125
+ if (mustRebind) {
1126
+ this.bindViewProjection(effect);
1127
+ if (!ubo.useUbo || !this.isFrozen || !ubo.isSync || subMesh._drawWrapper._forceRebindOnNextCall) {
1128
+ if (StandardMaterial.FresnelEnabled && defines.FRESNEL) {
1129
+ // Fresnel
1130
+ if (this.diffuseFresnelParameters && this.diffuseFresnelParameters.isEnabled) {
1131
+ ubo.updateColor4("diffuseLeftColor", this.diffuseFresnelParameters.leftColor, this.diffuseFresnelParameters.power);
1132
+ ubo.updateColor4("diffuseRightColor", this.diffuseFresnelParameters.rightColor, this.diffuseFresnelParameters.bias);
1133
+ }
1134
+ if (this.opacityFresnelParameters && this.opacityFresnelParameters.isEnabled) {
1135
+ ubo.updateColor4("opacityParts", new Color3(this.opacityFresnelParameters.leftColor.toLuminance(), this.opacityFresnelParameters.rightColor.toLuminance(), this.opacityFresnelParameters.bias), this.opacityFresnelParameters.power);
1136
+ }
1137
+ if (this.reflectionFresnelParameters && this.reflectionFresnelParameters.isEnabled) {
1138
+ ubo.updateColor4("reflectionLeftColor", this.reflectionFresnelParameters.leftColor, this.reflectionFresnelParameters.power);
1139
+ ubo.updateColor4("reflectionRightColor", this.reflectionFresnelParameters.rightColor, this.reflectionFresnelParameters.bias);
1140
+ }
1141
+ if (this.refractionFresnelParameters && this.refractionFresnelParameters.isEnabled) {
1142
+ ubo.updateColor4("refractionLeftColor", this.refractionFresnelParameters.leftColor, this.refractionFresnelParameters.power);
1143
+ ubo.updateColor4("refractionRightColor", this.refractionFresnelParameters.rightColor, this.refractionFresnelParameters.bias);
1144
+ }
1145
+ if (this.emissiveFresnelParameters && this.emissiveFresnelParameters.isEnabled) {
1146
+ ubo.updateColor4("emissiveLeftColor", this.emissiveFresnelParameters.leftColor, this.emissiveFresnelParameters.power);
1147
+ ubo.updateColor4("emissiveRightColor", this.emissiveFresnelParameters.rightColor, this.emissiveFresnelParameters.bias);
1148
+ }
1149
+ }
1150
+ // Textures
1151
+ if (scene.texturesEnabled) {
1152
+ if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {
1153
+ ubo.updateFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);
1154
+ BindTextureMatrix(this._diffuseTexture, ubo, "diffuse");
1155
+ }
1156
+ if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {
1157
+ ubo.updateFloat2("vAmbientInfos", this._ambientTexture.coordinatesIndex, this._ambientTexture.level);
1158
+ BindTextureMatrix(this._ambientTexture, ubo, "ambient");
1159
+ }
1160
+ if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {
1161
+ ubo.updateFloat2("vOpacityInfos", this._opacityTexture.coordinatesIndex, this._opacityTexture.level);
1162
+ BindTextureMatrix(this._opacityTexture, ubo, "opacity");
1163
+ }
1164
+ if (this._hasAlphaChannel()) {
1165
+ ubo.updateFloat("alphaCutOff", this.alphaCutOff);
1166
+ }
1167
+ if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {
1168
+ ubo.updateFloat2("vReflectionInfos", this._reflectionTexture.level, this.roughness);
1169
+ ubo.updateMatrix("reflectionMatrix", this._reflectionTexture.getReflectionTextureMatrix());
1170
+ if (this._reflectionTexture.boundingBoxSize) {
1171
+ const cubeTexture = this._reflectionTexture;
1172
+ ubo.updateVector3("vReflectionPosition", cubeTexture.boundingBoxPosition);
1173
+ ubo.updateVector3("vReflectionSize", cubeTexture.boundingBoxSize);
1174
+ }
1175
+ }
1176
+ if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {
1177
+ ubo.updateFloat2("vEmissiveInfos", this._emissiveTexture.coordinatesIndex, this._emissiveTexture.level);
1178
+ BindTextureMatrix(this._emissiveTexture, ubo, "emissive");
1179
+ }
1180
+ if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {
1181
+ ubo.updateFloat2("vLightmapInfos", this._lightmapTexture.coordinatesIndex, this._lightmapTexture.level);
1182
+ BindTextureMatrix(this._lightmapTexture, ubo, "lightmap");
1183
+ }
1184
+ if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {
1185
+ ubo.updateFloat2("vSpecularInfos", this._specularTexture.coordinatesIndex, this._specularTexture.level);
1186
+ BindTextureMatrix(this._specularTexture, ubo, "specular");
1187
+ }
1188
+ if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && StandardMaterial.BumpTextureEnabled) {
1189
+ ubo.updateFloat3("vBumpInfos", this._bumpTexture.coordinatesIndex, 1.0 / this._bumpTexture.level, this.parallaxScaleBias);
1190
+ BindTextureMatrix(this._bumpTexture, ubo, "bump");
1191
+ if (scene._mirroredCameraPosition) {
1192
+ ubo.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? 1.0 : -1.0, this._invertNormalMapY ? 1.0 : -1.0);
1193
+ }
1194
+ else {
1195
+ ubo.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? -1.0 : 1.0, this._invertNormalMapY ? -1.0 : 1.0);
1196
+ }
1197
+ }
1198
+ if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {
1199
+ let depth = 1.0;
1200
+ if (!this._refractionTexture.isCube) {
1201
+ ubo.updateMatrix("refractionMatrix", this._refractionTexture.getReflectionTextureMatrix());
1202
+ if (this._refractionTexture.depth) {
1203
+ depth = this._refractionTexture.depth;
1204
+ }
1205
+ }
1206
+ ubo.updateFloat4("vRefractionInfos", this._refractionTexture.level, this.indexOfRefraction, depth, this.invertRefractionY ? -1 : 1);
1207
+ if (this._refractionTexture.boundingBoxSize) {
1208
+ const cubeTexture = this._refractionTexture;
1209
+ ubo.updateVector3("vRefractionPosition", cubeTexture.boundingBoxPosition);
1210
+ ubo.updateVector3("vRefractionSize", cubeTexture.boundingBoxSize);
1211
+ }
1212
+ }
1213
+ }
1214
+ // Point size
1215
+ if (this.pointsCloud) {
1216
+ ubo.updateFloat("pointSize", this.pointSize);
1217
+ }
1218
+ ubo.updateColor4("vSpecularColor", this.specularColor, this.specularPower);
1219
+ ubo.updateColor3("vEmissiveColor", StandardMaterial.EmissiveTextureEnabled ? this.emissiveColor : Color3.BlackReadOnly);
1220
+ ubo.updateColor4("vDiffuseColor", this.diffuseColor, this.alpha);
1221
+ scene.ambientColor.multiplyToRef(this.ambientColor, this._globalAmbientColor);
1222
+ ubo.updateColor3("vAmbientColor", this._globalAmbientColor);
1223
+ }
1224
+ // Textures
1225
+ if (scene.texturesEnabled) {
1226
+ if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {
1227
+ effect.setTexture("diffuseSampler", this._diffuseTexture);
1228
+ }
1229
+ if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {
1230
+ effect.setTexture("ambientSampler", this._ambientTexture);
1231
+ }
1232
+ if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {
1233
+ effect.setTexture("opacitySampler", this._opacityTexture);
1234
+ }
1235
+ if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {
1236
+ if (this._reflectionTexture.isCube) {
1237
+ effect.setTexture("reflectionCubeSampler", this._reflectionTexture);
1238
+ }
1239
+ else {
1240
+ effect.setTexture("reflection2DSampler", this._reflectionTexture);
1241
+ }
1242
+ }
1243
+ if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {
1244
+ effect.setTexture("emissiveSampler", this._emissiveTexture);
1245
+ }
1246
+ if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {
1247
+ effect.setTexture("lightmapSampler", this._lightmapTexture);
1248
+ }
1249
+ if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {
1250
+ effect.setTexture("specularSampler", this._specularTexture);
1251
+ }
1252
+ if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && StandardMaterial.BumpTextureEnabled) {
1253
+ effect.setTexture("bumpSampler", this._bumpTexture);
1254
+ }
1255
+ if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {
1256
+ if (this._refractionTexture.isCube) {
1257
+ effect.setTexture("refractionCubeSampler", this._refractionTexture);
1258
+ }
1259
+ else {
1260
+ effect.setTexture("refraction2DSampler", this._refractionTexture);
1261
+ }
1262
+ }
1263
+ }
1264
+ // OIT with depth peeling
1265
+ if (this.getScene().useOrderIndependentTransparency && this.needAlphaBlendingForMesh(mesh)) {
1266
+ this.getScene().depthPeelingRenderer.bind(effect);
1267
+ }
1268
+ this._eventInfo.subMesh = subMesh;
1269
+ this._callbackPluginEventBindForSubMesh(this._eventInfo);
1270
+ // Clip plane
1271
+ bindClipPlane(effect, this, scene);
1272
+ // Colors
1273
+ this.bindEyePosition(effect);
1274
+ }
1275
+ else if (scene.getEngine()._features.needToAlwaysBindUniformBuffers) {
1276
+ this._needToBindSceneUbo = true;
1277
+ }
1278
+ if (mustRebind || !this.isFrozen) {
1279
+ // Lights
1280
+ if (scene.lightsEnabled && !this._disableLighting) {
1281
+ BindLights(scene, mesh, effect, defines, this._maxSimultaneousLights);
1282
+ }
1283
+ // View
1284
+ if ((scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) ||
1285
+ this._reflectionTexture ||
1286
+ this._refractionTexture ||
1287
+ mesh.receiveShadows ||
1288
+ defines.PREPASS) {
1289
+ this.bindView(effect);
1290
+ }
1291
+ // Fog
1292
+ BindFogParameters(scene, mesh, effect);
1293
+ // Morph targets
1294
+ if (defines.NUM_MORPH_INFLUENCERS) {
1295
+ BindMorphTargetParameters(mesh, effect);
1296
+ }
1297
+ if (defines.BAKED_VERTEX_ANIMATION_TEXTURE) {
1298
+ mesh.bakedVertexAnimationManager?.bind(effect, defines.INSTANCES);
1299
+ }
1300
+ // Log. depth
1301
+ if (this.useLogarithmicDepth) {
1302
+ BindLogDepth(defines, effect, scene);
1303
+ }
1304
+ // image processing
1305
+ if (this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess) {
1306
+ this._imageProcessingConfiguration.bind(this._activeEffect);
1307
+ }
1308
+ }
1309
+ this._afterBind(mesh, this._activeEffect, subMesh);
1310
+ ubo.update();
1311
+ }
1312
+ /**
1313
+ * Get the list of animatables in the material.
1314
+ * @returns the list of animatables object used in the material
1315
+ */
1316
+ getAnimatables() {
1317
+ const results = super.getAnimatables();
1318
+ if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) {
1319
+ results.push(this._diffuseTexture);
1320
+ }
1321
+ if (this._ambientTexture && this._ambientTexture.animations && this._ambientTexture.animations.length > 0) {
1322
+ results.push(this._ambientTexture);
1323
+ }
1324
+ if (this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0) {
1325
+ results.push(this._opacityTexture);
1326
+ }
1327
+ if (this._reflectionTexture && this._reflectionTexture.animations && this._reflectionTexture.animations.length > 0) {
1328
+ results.push(this._reflectionTexture);
1329
+ }
1330
+ if (this._emissiveTexture && this._emissiveTexture.animations && this._emissiveTexture.animations.length > 0) {
1331
+ results.push(this._emissiveTexture);
1332
+ }
1333
+ if (this._specularTexture && this._specularTexture.animations && this._specularTexture.animations.length > 0) {
1334
+ results.push(this._specularTexture);
1335
+ }
1336
+ if (this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0) {
1337
+ results.push(this._bumpTexture);
1338
+ }
1339
+ if (this._lightmapTexture && this._lightmapTexture.animations && this._lightmapTexture.animations.length > 0) {
1340
+ results.push(this._lightmapTexture);
1341
+ }
1342
+ if (this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0) {
1343
+ results.push(this._refractionTexture);
1344
+ }
1345
+ return results;
1346
+ }
1347
+ /**
1348
+ * Gets the active textures from the material
1349
+ * @returns an array of textures
1350
+ */
1351
+ getActiveTextures() {
1352
+ const activeTextures = super.getActiveTextures();
1353
+ if (this._diffuseTexture) {
1354
+ activeTextures.push(this._diffuseTexture);
1355
+ }
1356
+ if (this._ambientTexture) {
1357
+ activeTextures.push(this._ambientTexture);
1358
+ }
1359
+ if (this._opacityTexture) {
1360
+ activeTextures.push(this._opacityTexture);
1361
+ }
1362
+ if (this._reflectionTexture) {
1363
+ activeTextures.push(this._reflectionTexture);
1364
+ }
1365
+ if (this._emissiveTexture) {
1366
+ activeTextures.push(this._emissiveTexture);
1367
+ }
1368
+ if (this._specularTexture) {
1369
+ activeTextures.push(this._specularTexture);
1370
+ }
1371
+ if (this._bumpTexture) {
1372
+ activeTextures.push(this._bumpTexture);
1373
+ }
1374
+ if (this._lightmapTexture) {
1375
+ activeTextures.push(this._lightmapTexture);
1376
+ }
1377
+ if (this._refractionTexture) {
1378
+ activeTextures.push(this._refractionTexture);
1379
+ }
1380
+ return activeTextures;
1381
+ }
1382
+ /**
1383
+ * Specifies if the material uses a texture
1384
+ * @param texture defines the texture to check against the material
1385
+ * @returns a boolean specifying if the material uses the texture
1386
+ */
1387
+ hasTexture(texture) {
1388
+ if (super.hasTexture(texture)) {
1389
+ return true;
1390
+ }
1391
+ if (this._diffuseTexture === texture) {
1392
+ return true;
1393
+ }
1394
+ if (this._ambientTexture === texture) {
1395
+ return true;
1396
+ }
1397
+ if (this._opacityTexture === texture) {
1398
+ return true;
1399
+ }
1400
+ if (this._reflectionTexture === texture) {
1401
+ return true;
1402
+ }
1403
+ if (this._emissiveTexture === texture) {
1404
+ return true;
1405
+ }
1406
+ if (this._specularTexture === texture) {
1407
+ return true;
1408
+ }
1409
+ if (this._bumpTexture === texture) {
1410
+ return true;
1411
+ }
1412
+ if (this._lightmapTexture === texture) {
1413
+ return true;
1414
+ }
1415
+ if (this._refractionTexture === texture) {
1416
+ return true;
1417
+ }
1418
+ return false;
1419
+ }
1420
+ /**
1421
+ * Disposes the material
1422
+ * @param forceDisposeEffect specifies if effects should be forcefully disposed
1423
+ * @param forceDisposeTextures specifies if textures should be forcefully disposed
1424
+ */
1425
+ dispose(forceDisposeEffect, forceDisposeTextures) {
1426
+ if (forceDisposeTextures) {
1427
+ this._diffuseTexture?.dispose();
1428
+ this._ambientTexture?.dispose();
1429
+ this._opacityTexture?.dispose();
1430
+ this._reflectionTexture?.dispose();
1431
+ this._emissiveTexture?.dispose();
1432
+ this._specularTexture?.dispose();
1433
+ this._bumpTexture?.dispose();
1434
+ this._lightmapTexture?.dispose();
1435
+ this._refractionTexture?.dispose();
1436
+ }
1437
+ if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
1438
+ this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
1439
+ }
1440
+ super.dispose(forceDisposeEffect, forceDisposeTextures);
1441
+ }
1442
+ /**
1443
+ * Makes a duplicate of the material, and gives it a new name
1444
+ * @param name defines the new name for the duplicated material
1445
+ * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.
1446
+ * @param rootUrl defines the root URL to use to load textures
1447
+ * @returns the cloned material
1448
+ */
1449
+ clone(name, cloneTexturesOnlyOnce = true, rootUrl = "") {
1450
+ const result = SerializationHelper.Clone(() => new StandardMaterial(name, this.getScene()), this, { cloneTexturesOnlyOnce });
1451
+ result.name = name;
1452
+ result.id = name;
1453
+ this.stencil.copyTo(result.stencil);
1454
+ this._clonePlugins(result, rootUrl);
1455
+ return result;
1456
+ }
1457
+ /**
1458
+ * Creates a standard material from parsed material data
1459
+ * @param source defines the JSON representation of the material
1460
+ * @param scene defines the hosting scene
1461
+ * @param rootUrl defines the root URL to use to load textures and relative dependencies
1462
+ * @returns a new standard material
1463
+ */
1464
+ static Parse(source, scene, rootUrl) {
1465
+ const material = SerializationHelper.Parse(() => new StandardMaterial(source.name, scene), source, scene, rootUrl);
1466
+ if (source.stencil) {
1467
+ material.stencil.parse(source.stencil, scene, rootUrl);
1468
+ }
1469
+ Material._ParsePlugins(source, material, scene, rootUrl);
1470
+ return material;
1471
+ }
1472
+ // Flags used to enable or disable a type of texture for all Standard Materials
1473
+ /**
1474
+ * Are diffuse textures enabled in the application.
1475
+ */
1476
+ static get DiffuseTextureEnabled() {
1477
+ return MaterialFlags.DiffuseTextureEnabled;
1478
+ }
1479
+ static set DiffuseTextureEnabled(value) {
1480
+ MaterialFlags.DiffuseTextureEnabled = value;
1481
+ }
1482
+ /**
1483
+ * Are detail textures enabled in the application.
1484
+ */
1485
+ static get DetailTextureEnabled() {
1486
+ return MaterialFlags.DetailTextureEnabled;
1487
+ }
1488
+ static set DetailTextureEnabled(value) {
1489
+ MaterialFlags.DetailTextureEnabled = value;
1490
+ }
1491
+ /**
1492
+ * Are ambient textures enabled in the application.
1493
+ */
1494
+ static get AmbientTextureEnabled() {
1495
+ return MaterialFlags.AmbientTextureEnabled;
1496
+ }
1497
+ static set AmbientTextureEnabled(value) {
1498
+ MaterialFlags.AmbientTextureEnabled = value;
1499
+ }
1500
+ /**
1501
+ * Are opacity textures enabled in the application.
1502
+ */
1503
+ static get OpacityTextureEnabled() {
1504
+ return MaterialFlags.OpacityTextureEnabled;
1505
+ }
1506
+ static set OpacityTextureEnabled(value) {
1507
+ MaterialFlags.OpacityTextureEnabled = value;
1508
+ }
1509
+ /**
1510
+ * Are reflection textures enabled in the application.
1511
+ */
1512
+ static get ReflectionTextureEnabled() {
1513
+ return MaterialFlags.ReflectionTextureEnabled;
1514
+ }
1515
+ static set ReflectionTextureEnabled(value) {
1516
+ MaterialFlags.ReflectionTextureEnabled = value;
1517
+ }
1518
+ /**
1519
+ * Are emissive textures enabled in the application.
1520
+ */
1521
+ static get EmissiveTextureEnabled() {
1522
+ return MaterialFlags.EmissiveTextureEnabled;
1523
+ }
1524
+ static set EmissiveTextureEnabled(value) {
1525
+ MaterialFlags.EmissiveTextureEnabled = value;
1526
+ }
1527
+ /**
1528
+ * Are specular textures enabled in the application.
1529
+ */
1530
+ static get SpecularTextureEnabled() {
1531
+ return MaterialFlags.SpecularTextureEnabled;
1532
+ }
1533
+ static set SpecularTextureEnabled(value) {
1534
+ MaterialFlags.SpecularTextureEnabled = value;
1535
+ }
1536
+ /**
1537
+ * Are bump textures enabled in the application.
1538
+ */
1539
+ static get BumpTextureEnabled() {
1540
+ return MaterialFlags.BumpTextureEnabled;
1541
+ }
1542
+ static set BumpTextureEnabled(value) {
1543
+ MaterialFlags.BumpTextureEnabled = value;
1544
+ }
1545
+ /**
1546
+ * Are lightmap textures enabled in the application.
1547
+ */
1548
+ static get LightmapTextureEnabled() {
1549
+ return MaterialFlags.LightmapTextureEnabled;
1550
+ }
1551
+ static set LightmapTextureEnabled(value) {
1552
+ MaterialFlags.LightmapTextureEnabled = value;
1553
+ }
1554
+ /**
1555
+ * Are refraction textures enabled in the application.
1556
+ */
1557
+ static get RefractionTextureEnabled() {
1558
+ return MaterialFlags.RefractionTextureEnabled;
1559
+ }
1560
+ static set RefractionTextureEnabled(value) {
1561
+ MaterialFlags.RefractionTextureEnabled = value;
1562
+ }
1563
+ /**
1564
+ * Are color grading textures enabled in the application.
1565
+ */
1566
+ static get ColorGradingTextureEnabled() {
1567
+ return MaterialFlags.ColorGradingTextureEnabled;
1568
+ }
1569
+ static set ColorGradingTextureEnabled(value) {
1570
+ MaterialFlags.ColorGradingTextureEnabled = value;
1571
+ }
1572
+ /**
1573
+ * Are fresnels enabled in the application.
1574
+ */
1575
+ static get FresnelEnabled() {
1576
+ return MaterialFlags.FresnelEnabled;
1577
+ }
1578
+ static set FresnelEnabled(value) {
1579
+ MaterialFlags.FresnelEnabled = value;
1580
+ }
1581
+ }
1582
+ /**
1583
+ * Force all the standard materials to compile to glsl even on WebGPU engines.
1584
+ * False by default. This is mostly meant for backward compatibility.
1585
+ */
1586
+ StandardMaterial.ForceGLSL = false;
1587
+ __decorate([
1588
+ serializeAsTexture("diffuseTexture")
1589
+ ], StandardMaterial.prototype, "_diffuseTexture", void 0);
1590
+ __decorate([
1591
+ expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")
1592
+ ], StandardMaterial.prototype, "diffuseTexture", void 0);
1593
+ __decorate([
1594
+ serializeAsTexture("ambientTexture")
1595
+ ], StandardMaterial.prototype, "_ambientTexture", void 0);
1596
+ __decorate([
1597
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1598
+ ], StandardMaterial.prototype, "ambientTexture", void 0);
1599
+ __decorate([
1600
+ serializeAsTexture("opacityTexture")
1601
+ ], StandardMaterial.prototype, "_opacityTexture", void 0);
1602
+ __decorate([
1603
+ expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")
1604
+ ], StandardMaterial.prototype, "opacityTexture", void 0);
1605
+ __decorate([
1606
+ serializeAsTexture("reflectionTexture")
1607
+ ], StandardMaterial.prototype, "_reflectionTexture", void 0);
1608
+ __decorate([
1609
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1610
+ ], StandardMaterial.prototype, "reflectionTexture", void 0);
1611
+ __decorate([
1612
+ serializeAsTexture("emissiveTexture")
1613
+ ], StandardMaterial.prototype, "_emissiveTexture", void 0);
1614
+ __decorate([
1615
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1616
+ ], StandardMaterial.prototype, "emissiveTexture", void 0);
1617
+ __decorate([
1618
+ serializeAsTexture("specularTexture")
1619
+ ], StandardMaterial.prototype, "_specularTexture", void 0);
1620
+ __decorate([
1621
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1622
+ ], StandardMaterial.prototype, "specularTexture", void 0);
1623
+ __decorate([
1624
+ serializeAsTexture("bumpTexture")
1625
+ ], StandardMaterial.prototype, "_bumpTexture", void 0);
1626
+ __decorate([
1627
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1628
+ ], StandardMaterial.prototype, "bumpTexture", void 0);
1629
+ __decorate([
1630
+ serializeAsTexture("lightmapTexture")
1631
+ ], StandardMaterial.prototype, "_lightmapTexture", void 0);
1632
+ __decorate([
1633
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1634
+ ], StandardMaterial.prototype, "lightmapTexture", void 0);
1635
+ __decorate([
1636
+ serializeAsTexture("refractionTexture")
1637
+ ], StandardMaterial.prototype, "_refractionTexture", void 0);
1638
+ __decorate([
1639
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1640
+ ], StandardMaterial.prototype, "refractionTexture", void 0);
1641
+ __decorate([
1642
+ serializeAsColor3("ambient")
1643
+ ], StandardMaterial.prototype, "ambientColor", void 0);
1644
+ __decorate([
1645
+ serializeAsColor3("diffuse")
1646
+ ], StandardMaterial.prototype, "diffuseColor", void 0);
1647
+ __decorate([
1648
+ serializeAsColor3("specular")
1649
+ ], StandardMaterial.prototype, "specularColor", void 0);
1650
+ __decorate([
1651
+ serializeAsColor3("emissive")
1652
+ ], StandardMaterial.prototype, "emissiveColor", void 0);
1653
+ __decorate([
1654
+ serialize()
1655
+ ], StandardMaterial.prototype, "specularPower", void 0);
1656
+ __decorate([
1657
+ serialize("useAlphaFromDiffuseTexture")
1658
+ ], StandardMaterial.prototype, "_useAlphaFromDiffuseTexture", void 0);
1659
+ __decorate([
1660
+ expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")
1661
+ ], StandardMaterial.prototype, "useAlphaFromDiffuseTexture", void 0);
1662
+ __decorate([
1663
+ serialize("useEmissiveAsIllumination")
1664
+ ], StandardMaterial.prototype, "_useEmissiveAsIllumination", void 0);
1665
+ __decorate([
1666
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1667
+ ], StandardMaterial.prototype, "useEmissiveAsIllumination", void 0);
1668
+ __decorate([
1669
+ serialize("linkEmissiveWithDiffuse")
1670
+ ], StandardMaterial.prototype, "_linkEmissiveWithDiffuse", void 0);
1671
+ __decorate([
1672
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1673
+ ], StandardMaterial.prototype, "linkEmissiveWithDiffuse", void 0);
1674
+ __decorate([
1675
+ serialize("useSpecularOverAlpha")
1676
+ ], StandardMaterial.prototype, "_useSpecularOverAlpha", void 0);
1677
+ __decorate([
1678
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1679
+ ], StandardMaterial.prototype, "useSpecularOverAlpha", void 0);
1680
+ __decorate([
1681
+ serialize("useReflectionOverAlpha")
1682
+ ], StandardMaterial.prototype, "_useReflectionOverAlpha", void 0);
1683
+ __decorate([
1684
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1685
+ ], StandardMaterial.prototype, "useReflectionOverAlpha", void 0);
1686
+ __decorate([
1687
+ serialize("disableLighting")
1688
+ ], StandardMaterial.prototype, "_disableLighting", void 0);
1689
+ __decorate([
1690
+ expandToProperty("_markAllSubMeshesAsLightsDirty")
1691
+ ], StandardMaterial.prototype, "disableLighting", void 0);
1692
+ __decorate([
1693
+ serialize("useObjectSpaceNormalMap")
1694
+ ], StandardMaterial.prototype, "_useObjectSpaceNormalMap", void 0);
1695
+ __decorate([
1696
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1697
+ ], StandardMaterial.prototype, "useObjectSpaceNormalMap", void 0);
1698
+ __decorate([
1699
+ serialize("useParallax")
1700
+ ], StandardMaterial.prototype, "_useParallax", void 0);
1701
+ __decorate([
1702
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1703
+ ], StandardMaterial.prototype, "useParallax", void 0);
1704
+ __decorate([
1705
+ serialize("useParallaxOcclusion")
1706
+ ], StandardMaterial.prototype, "_useParallaxOcclusion", void 0);
1707
+ __decorate([
1708
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1709
+ ], StandardMaterial.prototype, "useParallaxOcclusion", void 0);
1710
+ __decorate([
1711
+ serialize()
1712
+ ], StandardMaterial.prototype, "parallaxScaleBias", void 0);
1713
+ __decorate([
1714
+ serialize("roughness")
1715
+ ], StandardMaterial.prototype, "_roughness", void 0);
1716
+ __decorate([
1717
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1718
+ ], StandardMaterial.prototype, "roughness", void 0);
1719
+ __decorate([
1720
+ serialize()
1721
+ ], StandardMaterial.prototype, "indexOfRefraction", void 0);
1722
+ __decorate([
1723
+ serialize()
1724
+ ], StandardMaterial.prototype, "invertRefractionY", void 0);
1725
+ __decorate([
1726
+ serialize()
1727
+ ], StandardMaterial.prototype, "alphaCutOff", void 0);
1728
+ __decorate([
1729
+ serialize("useLightmapAsShadowmap")
1730
+ ], StandardMaterial.prototype, "_useLightmapAsShadowmap", void 0);
1731
+ __decorate([
1732
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1733
+ ], StandardMaterial.prototype, "useLightmapAsShadowmap", void 0);
1734
+ __decorate([
1735
+ serializeAsFresnelParameters("diffuseFresnelParameters")
1736
+ ], StandardMaterial.prototype, "_diffuseFresnelParameters", void 0);
1737
+ __decorate([
1738
+ expandToProperty("_markAllSubMeshesAsFresnelDirty")
1739
+ ], StandardMaterial.prototype, "diffuseFresnelParameters", void 0);
1740
+ __decorate([
1741
+ serializeAsFresnelParameters("opacityFresnelParameters")
1742
+ ], StandardMaterial.prototype, "_opacityFresnelParameters", void 0);
1743
+ __decorate([
1744
+ expandToProperty("_markAllSubMeshesAsFresnelAndMiscDirty")
1745
+ ], StandardMaterial.prototype, "opacityFresnelParameters", void 0);
1746
+ __decorate([
1747
+ serializeAsFresnelParameters("reflectionFresnelParameters")
1748
+ ], StandardMaterial.prototype, "_reflectionFresnelParameters", void 0);
1749
+ __decorate([
1750
+ expandToProperty("_markAllSubMeshesAsFresnelDirty")
1751
+ ], StandardMaterial.prototype, "reflectionFresnelParameters", void 0);
1752
+ __decorate([
1753
+ serializeAsFresnelParameters("refractionFresnelParameters")
1754
+ ], StandardMaterial.prototype, "_refractionFresnelParameters", void 0);
1755
+ __decorate([
1756
+ expandToProperty("_markAllSubMeshesAsFresnelDirty")
1757
+ ], StandardMaterial.prototype, "refractionFresnelParameters", void 0);
1758
+ __decorate([
1759
+ serializeAsFresnelParameters("emissiveFresnelParameters")
1760
+ ], StandardMaterial.prototype, "_emissiveFresnelParameters", void 0);
1761
+ __decorate([
1762
+ expandToProperty("_markAllSubMeshesAsFresnelDirty")
1763
+ ], StandardMaterial.prototype, "emissiveFresnelParameters", void 0);
1764
+ __decorate([
1765
+ serialize("useReflectionFresnelFromSpecular")
1766
+ ], StandardMaterial.prototype, "_useReflectionFresnelFromSpecular", void 0);
1767
+ __decorate([
1768
+ expandToProperty("_markAllSubMeshesAsFresnelDirty")
1769
+ ], StandardMaterial.prototype, "useReflectionFresnelFromSpecular", void 0);
1770
+ __decorate([
1771
+ serialize("useGlossinessFromSpecularMapAlpha")
1772
+ ], StandardMaterial.prototype, "_useGlossinessFromSpecularMapAlpha", void 0);
1773
+ __decorate([
1774
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1775
+ ], StandardMaterial.prototype, "useGlossinessFromSpecularMapAlpha", void 0);
1776
+ __decorate([
1777
+ serialize("maxSimultaneousLights")
1778
+ ], StandardMaterial.prototype, "_maxSimultaneousLights", void 0);
1779
+ __decorate([
1780
+ expandToProperty("_markAllSubMeshesAsLightsDirty")
1781
+ ], StandardMaterial.prototype, "maxSimultaneousLights", void 0);
1782
+ __decorate([
1783
+ serialize("invertNormalMapX")
1784
+ ], StandardMaterial.prototype, "_invertNormalMapX", void 0);
1785
+ __decorate([
1786
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1787
+ ], StandardMaterial.prototype, "invertNormalMapX", void 0);
1788
+ __decorate([
1789
+ serialize("invertNormalMapY")
1790
+ ], StandardMaterial.prototype, "_invertNormalMapY", void 0);
1791
+ __decorate([
1792
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1793
+ ], StandardMaterial.prototype, "invertNormalMapY", void 0);
1794
+ __decorate([
1795
+ serialize("twoSidedLighting")
1796
+ ], StandardMaterial.prototype, "_twoSidedLighting", void 0);
1797
+ __decorate([
1798
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
1799
+ ], StandardMaterial.prototype, "twoSidedLighting", void 0);
1800
+ __decorate([
1801
+ serialize("applyDecalMapAfterDetailMap")
1802
+ ], StandardMaterial.prototype, "_applyDecalMapAfterDetailMap", void 0);
1803
+ __decorate([
1804
+ expandToProperty("_markAllSubMeshesAsMiscDirty")
1805
+ ], StandardMaterial.prototype, "applyDecalMapAfterDetailMap", void 0);
1806
+ RegisterClass("BABYLON.StandardMaterial", StandardMaterial);
1807
+ Scene.DefaultMaterialFactory = (scene) => {
1808
+ return new StandardMaterial("default material", scene);
1809
+ };
1810
+
1811
+ export { StandardMaterial as S };
1812
+ //# sourceMappingURL=standardMaterial-Byp5a_xI.esm.js.map