@babylonjs/viewer 7.40.2-alpha → 7.40.2

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