@babylonjs/viewer 7.25.2-alpha → 7.25.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 (530) 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 +192 -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 +350 -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 +199 -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 +27 -17
  158. package/readme.md +21 -35
  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 +21 -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 +40 -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 +675 -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/dist/babylon-viewer.esm.js +0 -2
  193. package/dist/babylon-viewer.esm.js.map +0 -1
  194. package/dist/babylon-viewer.esm.min.js +0 -2
  195. package/dist/babylon-viewer.esm.min.js.map +0 -1
  196. package/dist/chunks/EXT_lights_image_based-BH3hZg5O.esm.min.js +0 -2
  197. package/dist/chunks/EXT_lights_image_based-BH3hZg5O.esm.min.js.map +0 -1
  198. package/dist/chunks/EXT_lights_image_based-DzfllwXH.esm.js +0 -170
  199. package/dist/chunks/EXT_lights_image_based-DzfllwXH.esm.js.map +0 -1
  200. package/dist/chunks/EXT_mesh_gpu_instancing-C9OEhnvW.esm.js +0 -86
  201. package/dist/chunks/EXT_mesh_gpu_instancing-C9OEhnvW.esm.js.map +0 -1
  202. package/dist/chunks/EXT_mesh_gpu_instancing-CXIBSaqJ.esm.min.js +0 -2
  203. package/dist/chunks/EXT_mesh_gpu_instancing-CXIBSaqJ.esm.min.js.map +0 -1
  204. package/dist/chunks/EXT_meshopt_compression-FHhysyRP.esm.min.js +0 -2
  205. package/dist/chunks/EXT_meshopt_compression-FHhysyRP.esm.min.js.map +0 -1
  206. package/dist/chunks/EXT_meshopt_compression-MDnzeuix.esm.js +0 -134
  207. package/dist/chunks/EXT_meshopt_compression-MDnzeuix.esm.js.map +0 -1
  208. package/dist/chunks/EXT_texture_avif-DYg5PN0r.esm.js +0 -44
  209. package/dist/chunks/EXT_texture_avif-DYg5PN0r.esm.js.map +0 -1
  210. package/dist/chunks/EXT_texture_avif-aYOG80m1.esm.min.js +0 -2
  211. package/dist/chunks/EXT_texture_avif-aYOG80m1.esm.min.js.map +0 -1
  212. package/dist/chunks/EXT_texture_webp-C4SoS8oM.esm.min.js +0 -2
  213. package/dist/chunks/EXT_texture_webp-C4SoS8oM.esm.min.js.map +0 -1
  214. package/dist/chunks/EXT_texture_webp-CFXwdFPL.esm.js +0 -43
  215. package/dist/chunks/EXT_texture_webp-CFXwdFPL.esm.js.map +0 -1
  216. package/dist/chunks/ExtrasAsMetadata-0irOjN40.esm.min.js +0 -2
  217. package/dist/chunks/ExtrasAsMetadata-0irOjN40.esm.min.js.map +0 -1
  218. package/dist/chunks/ExtrasAsMetadata-CMMGMmGq.esm.js +0 -64
  219. package/dist/chunks/ExtrasAsMetadata-CMMGMmGq.esm.js.map +0 -1
  220. package/dist/chunks/KHR_animation_pointer-BP1GTrPy.esm.js +0 -343
  221. package/dist/chunks/KHR_animation_pointer-BP1GTrPy.esm.js.map +0 -1
  222. package/dist/chunks/KHR_animation_pointer-DYUHlqMb.esm.min.js +0 -2
  223. package/dist/chunks/KHR_animation_pointer-DYUHlqMb.esm.min.js.map +0 -1
  224. package/dist/chunks/KHR_draco_mesh_compression-1__XqV2v.esm.js +0 -610
  225. package/dist/chunks/KHR_draco_mesh_compression-1__XqV2v.esm.js.map +0 -1
  226. package/dist/chunks/KHR_draco_mesh_compression-DugkDX1-.esm.min.js +0 -2
  227. package/dist/chunks/KHR_draco_mesh_compression-DugkDX1-.esm.min.js.map +0 -1
  228. package/dist/chunks/KHR_interactivity-CG9wdbbE.esm.js +0 -4033
  229. package/dist/chunks/KHR_interactivity-CG9wdbbE.esm.js.map +0 -1
  230. package/dist/chunks/KHR_interactivity-DTEAfXZw.esm.min.js +0 -2
  231. package/dist/chunks/KHR_interactivity-DTEAfXZw.esm.min.js.map +0 -1
  232. package/dist/chunks/KHR_lights_punctual-BJoC3s-k.esm.js +0 -1253
  233. package/dist/chunks/KHR_lights_punctual-BJoC3s-k.esm.js.map +0 -1
  234. package/dist/chunks/KHR_lights_punctual-CJ8IXFIN.esm.min.js +0 -2
  235. package/dist/chunks/KHR_lights_punctual-CJ8IXFIN.esm.min.js.map +0 -1
  236. package/dist/chunks/KHR_materials_anisotropy-D-JkJqtx.esm.min.js +0 -2
  237. package/dist/chunks/KHR_materials_anisotropy-D-JkJqtx.esm.min.js.map +0 -1
  238. package/dist/chunks/KHR_materials_anisotropy-vQUJOfyf.esm.js +0 -64
  239. package/dist/chunks/KHR_materials_anisotropy-vQUJOfyf.esm.js.map +0 -1
  240. package/dist/chunks/KHR_materials_clearcoat-DGkjpld9.esm.js +0 -96
  241. package/dist/chunks/KHR_materials_clearcoat-DGkjpld9.esm.js.map +0 -1
  242. package/dist/chunks/KHR_materials_clearcoat-D_sScrmJ.esm.min.js +0 -2
  243. package/dist/chunks/KHR_materials_clearcoat-D_sScrmJ.esm.min.js.map +0 -1
  244. package/dist/chunks/KHR_materials_diffuse_transmission-B-AVMVdy.esm.js +0 -97
  245. package/dist/chunks/KHR_materials_diffuse_transmission-B-AVMVdy.esm.js.map +0 -1
  246. package/dist/chunks/KHR_materials_diffuse_transmission-D89RzboR.esm.min.js +0 -2
  247. package/dist/chunks/KHR_materials_diffuse_transmission-D89RzboR.esm.min.js.map +0 -1
  248. package/dist/chunks/KHR_materials_dispersion-B8b6MXDS.esm.min.js +0 -2
  249. package/dist/chunks/KHR_materials_dispersion-B8b6MXDS.esm.min.js.map +0 -1
  250. package/dist/chunks/KHR_materials_dispersion-Biijd7CZ.esm.js +0 -62
  251. package/dist/chunks/KHR_materials_dispersion-Biijd7CZ.esm.js.map +0 -1
  252. package/dist/chunks/KHR_materials_emissive_strength-CphmP7Mx.esm.min.js +0 -2
  253. package/dist/chunks/KHR_materials_emissive_strength-CphmP7Mx.esm.min.js.map +0 -1
  254. package/dist/chunks/KHR_materials_emissive_strength-HYht21Ls.esm.js +0 -55
  255. package/dist/chunks/KHR_materials_emissive_strength-HYht21Ls.esm.js.map +0 -1
  256. package/dist/chunks/KHR_materials_ior-CMHiVWXF.esm.js +0 -64
  257. package/dist/chunks/KHR_materials_ior-CMHiVWXF.esm.js.map +0 -1
  258. package/dist/chunks/KHR_materials_ior-Dtd5Uruf.esm.min.js +0 -2
  259. package/dist/chunks/KHR_materials_ior-Dtd5Uruf.esm.min.js.map +0 -1
  260. package/dist/chunks/KHR_materials_iridescence-BPYqwadf.esm.min.js +0 -2
  261. package/dist/chunks/KHR_materials_iridescence-BPYqwadf.esm.min.js.map +0 -1
  262. package/dist/chunks/KHR_materials_iridescence-uiK5wAia.esm.js +0 -72
  263. package/dist/chunks/KHR_materials_iridescence-uiK5wAia.esm.js.map +0 -1
  264. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-At-foveb.esm.js +0 -81
  265. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-At-foveb.esm.js.map +0 -1
  266. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D-0vzv_p.esm.min.js +0 -2
  267. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D-0vzv_p.esm.min.js.map +0 -1
  268. package/dist/chunks/KHR_materials_sheen-D9QlTIrL.esm.min.js +0 -2
  269. package/dist/chunks/KHR_materials_sheen-D9QlTIrL.esm.min.js.map +0 -1
  270. package/dist/chunks/KHR_materials_sheen-D_dNVJOm.esm.js +0 -85
  271. package/dist/chunks/KHR_materials_sheen-D_dNVJOm.esm.js.map +0 -1
  272. package/dist/chunks/KHR_materials_specular-BoPxT-Mo.esm.min.js +0 -2
  273. package/dist/chunks/KHR_materials_specular-BoPxT-Mo.esm.min.js.map +0 -1
  274. package/dist/chunks/KHR_materials_specular-DQxjj2Cx.esm.js +0 -75
  275. package/dist/chunks/KHR_materials_specular-DQxjj2Cx.esm.js.map +0 -1
  276. package/dist/chunks/KHR_materials_transmission-BFM7Cmhe.esm.js +0 -307
  277. package/dist/chunks/KHR_materials_transmission-BFM7Cmhe.esm.js.map +0 -1
  278. package/dist/chunks/KHR_materials_transmission-Cmv46WbD.esm.min.js +0 -2
  279. package/dist/chunks/KHR_materials_transmission-Cmv46WbD.esm.min.js.map +0 -1
  280. package/dist/chunks/KHR_materials_unlit-5NSHSTuh.esm.js +0 -74
  281. package/dist/chunks/KHR_materials_unlit-5NSHSTuh.esm.js.map +0 -1
  282. package/dist/chunks/KHR_materials_unlit-D0eVH4Om.esm.min.js +0 -2
  283. package/dist/chunks/KHR_materials_unlit-D0eVH4Om.esm.min.js.map +0 -1
  284. package/dist/chunks/KHR_materials_variants-DV9kQ9N0.esm.js +0 -238
  285. package/dist/chunks/KHR_materials_variants-DV9kQ9N0.esm.js.map +0 -1
  286. package/dist/chunks/KHR_materials_variants-q_OSyG78.esm.min.js +0 -2
  287. package/dist/chunks/KHR_materials_variants-q_OSyG78.esm.min.js.map +0 -1
  288. package/dist/chunks/KHR_materials_volume-B-2guGwk.esm.min.js +0 -2
  289. package/dist/chunks/KHR_materials_volume-B-2guGwk.esm.min.js.map +0 -1
  290. package/dist/chunks/KHR_materials_volume-ByNJMyHb.esm.js +0 -87
  291. package/dist/chunks/KHR_materials_volume-ByNJMyHb.esm.js.map +0 -1
  292. package/dist/chunks/KHR_mesh_quantization-B-dDY2nG.esm.min.js +0 -2
  293. package/dist/chunks/KHR_mesh_quantization-B-dDY2nG.esm.min.js.map +0 -1
  294. package/dist/chunks/KHR_mesh_quantization-CtRIMI9n.esm.js +0 -26
  295. package/dist/chunks/KHR_mesh_quantization-CtRIMI9n.esm.js.map +0 -1
  296. package/dist/chunks/KHR_texture_basisu-Bpv_M6W8.esm.js +0 -43
  297. package/dist/chunks/KHR_texture_basisu-Bpv_M6W8.esm.js.map +0 -1
  298. package/dist/chunks/KHR_texture_basisu-CDZ_8ojt.esm.min.js +0 -2
  299. package/dist/chunks/KHR_texture_basisu-CDZ_8ojt.esm.min.js.map +0 -1
  300. package/dist/chunks/KHR_texture_transform-DR04vBMi.esm.js +0 -63
  301. package/dist/chunks/KHR_texture_transform-DR04vBMi.esm.js.map +0 -1
  302. package/dist/chunks/KHR_texture_transform-Dxlw1ALx.esm.min.js +0 -2
  303. package/dist/chunks/KHR_texture_transform-Dxlw1ALx.esm.min.js.map +0 -1
  304. package/dist/chunks/KHR_xmp_json_ld-BE7tnUAA.esm.js +0 -51
  305. package/dist/chunks/KHR_xmp_json_ld-BE7tnUAA.esm.js.map +0 -1
  306. package/dist/chunks/KHR_xmp_json_ld-Cba_e7FN.esm.min.js +0 -2
  307. package/dist/chunks/KHR_xmp_json_ld-Cba_e7FN.esm.min.js.map +0 -1
  308. package/dist/chunks/MSFT_audio_emitter-C7N149TS.esm.min.js +0 -2
  309. package/dist/chunks/MSFT_audio_emitter-C7N149TS.esm.min.js.map +0 -1
  310. package/dist/chunks/MSFT_audio_emitter-Dli0UATE.esm.js +0 -2236
  311. package/dist/chunks/MSFT_audio_emitter-Dli0UATE.esm.js.map +0 -1
  312. package/dist/chunks/MSFT_lod-B_XcOQr8.esm.min.js +0 -2
  313. package/dist/chunks/MSFT_lod-B_XcOQr8.esm.min.js.map +0 -1
  314. package/dist/chunks/MSFT_lod-Ce-KRZp9.esm.js +0 -337
  315. package/dist/chunks/MSFT_lod-Ce-KRZp9.esm.js.map +0 -1
  316. package/dist/chunks/MSFT_minecraftMesh-C1iLB8-L.esm.min.js +0 -2
  317. package/dist/chunks/MSFT_minecraftMesh-C1iLB8-L.esm.min.js.map +0 -1
  318. package/dist/chunks/MSFT_minecraftMesh-D7vFOPNh.esm.js +0 -46
  319. package/dist/chunks/MSFT_minecraftMesh-D7vFOPNh.esm.js.map +0 -1
  320. package/dist/chunks/MSFT_sRGBFactors-DCJApvhI.esm.js +0 -47
  321. package/dist/chunks/MSFT_sRGBFactors-DCJApvhI.esm.js.map +0 -1
  322. package/dist/chunks/MSFT_sRGBFactors-IRTTNK8h.esm.min.js +0 -2
  323. package/dist/chunks/MSFT_sRGBFactors-IRTTNK8h.esm.min.js.map +0 -1
  324. package/dist/chunks/assetContainer-9BV4w6Ec.esm.js +0 -1598
  325. package/dist/chunks/assetContainer-9BV4w6Ec.esm.js.map +0 -1
  326. package/dist/chunks/assetContainer-Cu6LKJHz.esm.min.js +0 -2
  327. package/dist/chunks/assetContainer-Cu6LKJHz.esm.min.js.map +0 -1
  328. package/dist/chunks/audioEngine-Bh-HZCai.esm.min.js +0 -2
  329. package/dist/chunks/audioEngine-Bh-HZCai.esm.min.js.map +0 -1
  330. package/dist/chunks/audioEngine-pydGAEd8.esm.js +0 -305
  331. package/dist/chunks/audioEngine-pydGAEd8.esm.js.map +0 -1
  332. package/dist/chunks/basisTextureLoader-BD8_wqQL.esm.min.js +0 -2
  333. package/dist/chunks/basisTextureLoader-BD8_wqQL.esm.min.js.map +0 -1
  334. package/dist/chunks/basisTextureLoader-JmRg1Sfn.esm.js +0 -600
  335. package/dist/chunks/basisTextureLoader-JmRg1Sfn.esm.js.map +0 -1
  336. package/dist/chunks/ddsTextureLoader-Bpjp8qSf.esm.js +0 -87
  337. package/dist/chunks/ddsTextureLoader-Bpjp8qSf.esm.js.map +0 -1
  338. package/dist/chunks/ddsTextureLoader-CEyJTB3O.esm.min.js +0 -2
  339. package/dist/chunks/ddsTextureLoader-CEyJTB3O.esm.min.js.map +0 -1
  340. package/dist/chunks/default.fragment-B11bdnrB.esm.min.js +0 -2
  341. package/dist/chunks/default.fragment-B11bdnrB.esm.min.js.map +0 -1
  342. package/dist/chunks/default.fragment-Bawtijue.esm.min.js +0 -2
  343. package/dist/chunks/default.fragment-Bawtijue.esm.min.js.map +0 -1
  344. package/dist/chunks/default.fragment-D3k4gvNV.esm.js +0 -456
  345. package/dist/chunks/default.fragment-D3k4gvNV.esm.js.map +0 -1
  346. package/dist/chunks/default.fragment-DL3qA9UG.esm.js +0 -515
  347. package/dist/chunks/default.fragment-DL3qA9UG.esm.js.map +0 -1
  348. package/dist/chunks/default.vertex-B7OOfc9A.esm.js +0 -178
  349. package/dist/chunks/default.vertex-B7OOfc9A.esm.js.map +0 -1
  350. package/dist/chunks/default.vertex-BKC2A0e0.esm.js +0 -199
  351. package/dist/chunks/default.vertex-BKC2A0e0.esm.js.map +0 -1
  352. package/dist/chunks/default.vertex-BRncvhAx.esm.min.js +0 -2
  353. package/dist/chunks/default.vertex-BRncvhAx.esm.min.js.map +0 -1
  354. package/dist/chunks/default.vertex-sJaJV_6d.esm.min.js +0 -2
  355. package/dist/chunks/default.vertex-sJaJV_6d.esm.min.js.map +0 -1
  356. package/dist/chunks/defaultUboDeclaration-C1JdSocs.esm.min.js +0 -2
  357. package/dist/chunks/defaultUboDeclaration-C1JdSocs.esm.min.js.map +0 -1
  358. package/dist/chunks/defaultUboDeclaration-Cszg1EQW.esm.js +0 -13
  359. package/dist/chunks/defaultUboDeclaration-Cszg1EQW.esm.js.map +0 -1
  360. package/dist/chunks/defaultUboDeclaration-DB7zHENU.esm.js +0 -15
  361. package/dist/chunks/defaultUboDeclaration-DB7zHENU.esm.js.map +0 -1
  362. package/dist/chunks/defaultUboDeclaration-XHlan1gc.esm.min.js +0 -2
  363. package/dist/chunks/defaultUboDeclaration-XHlan1gc.esm.min.js.map +0 -1
  364. package/dist/chunks/engine-DZrewcWP.esm.js +0 -1613
  365. package/dist/chunks/engine-DZrewcWP.esm.js.map +0 -1
  366. package/dist/chunks/engine-sFOTJhn4.esm.min.js +0 -2
  367. package/dist/chunks/engine-sFOTJhn4.esm.min.js.map +0 -1
  368. package/dist/chunks/envTextureLoader-DLAJXIl8.esm.min.js +0 -2
  369. package/dist/chunks/envTextureLoader-DLAJXIl8.esm.min.js.map +0 -1
  370. package/dist/chunks/envTextureLoader-DpLIoFjS.esm.js +0 -63
  371. package/dist/chunks/envTextureLoader-DpLIoFjS.esm.js.map +0 -1
  372. package/dist/chunks/environmentTextureTools-CiyJLBbf.esm.min.js +0 -2
  373. package/dist/chunks/environmentTextureTools-CiyJLBbf.esm.min.js.map +0 -1
  374. package/dist/chunks/environmentTextureTools-bPqq81in.esm.js +0 -381
  375. package/dist/chunks/environmentTextureTools-bPqq81in.esm.js.map +0 -1
  376. package/dist/chunks/exrTextureLoader-DJ7PbPlF.esm.min.js +0 -2
  377. package/dist/chunks/exrTextureLoader-DJ7PbPlF.esm.min.js.map +0 -1
  378. package/dist/chunks/exrTextureLoader-DYsBnFky.esm.js +0 -1682
  379. package/dist/chunks/exrTextureLoader-DYsBnFky.esm.js.map +0 -1
  380. package/dist/chunks/fogFragment-BLvD2fqs.esm.min.js +0 -2
  381. package/dist/chunks/fogFragment-BLvD2fqs.esm.min.js.map +0 -1
  382. package/dist/chunks/fogFragment-b0NlRwYe.esm.js +0 -102
  383. package/dist/chunks/fogFragment-b0NlRwYe.esm.js.map +0 -1
  384. package/dist/chunks/glTFLoader-BikrhFtn.esm.js +0 -7552
  385. package/dist/chunks/glTFLoader-BikrhFtn.esm.js.map +0 -1
  386. package/dist/chunks/glTFLoader-mZPFBYSM.esm.min.js +0 -2
  387. package/dist/chunks/glTFLoader-mZPFBYSM.esm.min.js.map +0 -1
  388. package/dist/chunks/glTFLoaderAnimation-BdwTR5Nl.esm.js +0 -77
  389. package/dist/chunks/glTFLoaderAnimation-BdwTR5Nl.esm.js.map +0 -1
  390. package/dist/chunks/glTFLoaderAnimation-CiKBDKnk.esm.min.js +0 -2
  391. package/dist/chunks/glTFLoaderAnimation-CiKBDKnk.esm.min.js.map +0 -1
  392. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +0 -2
  393. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +0 -1
  394. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +0 -67
  395. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +0 -1
  396. package/dist/chunks/harmonicsFunctions-C12V8Ng1.esm.js +0 -35
  397. package/dist/chunks/harmonicsFunctions-C12V8Ng1.esm.js.map +0 -1
  398. package/dist/chunks/harmonicsFunctions-CRoab7mv.esm.min.js +0 -2
  399. package/dist/chunks/harmonicsFunctions-CRoab7mv.esm.min.js.map +0 -1
  400. package/dist/chunks/harmonicsFunctions-CZi4YSE7.esm.js +0 -34
  401. package/dist/chunks/harmonicsFunctions-CZi4YSE7.esm.js.map +0 -1
  402. package/dist/chunks/harmonicsFunctions-GFzLo9xW.esm.min.js +0 -2
  403. package/dist/chunks/harmonicsFunctions-GFzLo9xW.esm.min.js.map +0 -1
  404. package/dist/chunks/hdrTextureLoader-CsWJNnG5.esm.js +0 -252
  405. package/dist/chunks/hdrTextureLoader-CsWJNnG5.esm.js.map +0 -1
  406. package/dist/chunks/hdrTextureLoader-Cwi3SM4o.esm.min.js +0 -2
  407. package/dist/chunks/hdrTextureLoader-Cwi3SM4o.esm.min.js.map +0 -1
  408. package/dist/chunks/helperFunctions-21b9-yGo.esm.min.js +0 -2
  409. package/dist/chunks/helperFunctions-21b9-yGo.esm.min.js.map +0 -1
  410. package/dist/chunks/helperFunctions-COVDWwPu.esm.js +0 -80
  411. package/dist/chunks/helperFunctions-COVDWwPu.esm.js.map +0 -1
  412. package/dist/chunks/helperFunctions-CQzJ5T38.esm.min.js +0 -2
  413. package/dist/chunks/helperFunctions-CQzJ5T38.esm.min.js.map +0 -1
  414. package/dist/chunks/helperFunctions-CUKI67ax.esm.js +0 -108
  415. package/dist/chunks/helperFunctions-CUKI67ax.esm.js.map +0 -1
  416. package/dist/chunks/index-5EaMDaGg.esm.js +0 -79820
  417. package/dist/chunks/index-5EaMDaGg.esm.js.map +0 -1
  418. package/dist/chunks/index-RwQCgcf4.esm.min.js +0 -57
  419. package/dist/chunks/index-RwQCgcf4.esm.min.js.map +0 -1
  420. package/dist/chunks/ktxTextureLoader-34pzZN2D.esm.js +0 -814
  421. package/dist/chunks/ktxTextureLoader-34pzZN2D.esm.js.map +0 -1
  422. package/dist/chunks/ktxTextureLoader-Dj2b7tTw.esm.min.js +0 -2
  423. package/dist/chunks/ktxTextureLoader-Dj2b7tTw.esm.min.js.map +0 -1
  424. package/dist/chunks/logDepthDeclaration-BTOfKIR5.esm.min.js +0 -2
  425. package/dist/chunks/logDepthDeclaration-BTOfKIR5.esm.min.js.map +0 -1
  426. package/dist/chunks/logDepthDeclaration-Boz5U8vN.esm.min.js +0 -2
  427. package/dist/chunks/logDepthDeclaration-Boz5U8vN.esm.min.js.map +0 -1
  428. package/dist/chunks/logDepthDeclaration-Dc0_n0rX.esm.js +0 -42
  429. package/dist/chunks/logDepthDeclaration-Dc0_n0rX.esm.js.map +0 -1
  430. package/dist/chunks/logDepthDeclaration-cImBekwl.esm.js +0 -35
  431. package/dist/chunks/logDepthDeclaration-cImBekwl.esm.js.map +0 -1
  432. package/dist/chunks/logDepthVertex-ABvK0V0R.esm.js +0 -77
  433. package/dist/chunks/logDepthVertex-ABvK0V0R.esm.js.map +0 -1
  434. package/dist/chunks/logDepthVertex-BA4bq6Km.esm.min.js +0 -2
  435. package/dist/chunks/logDepthVertex-BA4bq6Km.esm.min.js.map +0 -1
  436. package/dist/chunks/logDepthVertex-C7FgfYJH.esm.js +0 -605
  437. package/dist/chunks/logDepthVertex-C7FgfYJH.esm.js.map +0 -1
  438. package/dist/chunks/logDepthVertex-Da8gAKX-.esm.min.js +0 -2
  439. package/dist/chunks/logDepthVertex-Da8gAKX-.esm.min.js.map +0 -1
  440. package/dist/chunks/mainUVVaryingDeclaration-B-9VKUsa.esm.js +0 -11
  441. package/dist/chunks/mainUVVaryingDeclaration-B-9VKUsa.esm.js.map +0 -1
  442. package/dist/chunks/mainUVVaryingDeclaration-CNcp6TRG.esm.min.js +0 -2
  443. package/dist/chunks/mainUVVaryingDeclaration-CNcp6TRG.esm.min.js.map +0 -1
  444. package/dist/chunks/objFileLoader-3iAEdRPX.esm.js +0 -1280
  445. package/dist/chunks/objFileLoader-3iAEdRPX.esm.js.map +0 -1
  446. package/dist/chunks/objFileLoader-Cr90DdHJ.esm.min.js +0 -2
  447. package/dist/chunks/objFileLoader-Cr90DdHJ.esm.min.js.map +0 -1
  448. package/dist/chunks/oitFragment-BxefW3dP.esm.min.js +0 -2
  449. package/dist/chunks/oitFragment-BxefW3dP.esm.min.js.map +0 -1
  450. package/dist/chunks/oitFragment-DNM4M_TM.esm.js +0 -1166
  451. package/dist/chunks/oitFragment-DNM4M_TM.esm.js.map +0 -1
  452. package/dist/chunks/oitFragment-QOO-2oNY.esm.min.js +0 -2
  453. package/dist/chunks/oitFragment-QOO-2oNY.esm.min.js.map +0 -1
  454. package/dist/chunks/oitFragment-c8QTGncf.esm.js +0 -1210
  455. package/dist/chunks/oitFragment-c8QTGncf.esm.js.map +0 -1
  456. package/dist/chunks/pass.fragment-54wWMjH0.esm.js +0 -15
  457. package/dist/chunks/pass.fragment-54wWMjH0.esm.js.map +0 -1
  458. package/dist/chunks/pass.fragment-C2zJ2wfh.esm.min.js +0 -2
  459. package/dist/chunks/pass.fragment-C2zJ2wfh.esm.min.js.map +0 -1
  460. package/dist/chunks/pbr.fragment-B2LdxiLY.esm.js +0 -3163
  461. package/dist/chunks/pbr.fragment-B2LdxiLY.esm.js.map +0 -1
  462. package/dist/chunks/pbr.fragment-BdB3ttR4.esm.min.js +0 -2
  463. package/dist/chunks/pbr.fragment-BdB3ttR4.esm.min.js.map +0 -1
  464. package/dist/chunks/pbr.fragment-BweiXotT.esm.js +0 -3219
  465. package/dist/chunks/pbr.fragment-BweiXotT.esm.js.map +0 -1
  466. package/dist/chunks/pbr.fragment-DO84e7Qh.esm.min.js +0 -2
  467. package/dist/chunks/pbr.fragment-DO84e7Qh.esm.min.js.map +0 -1
  468. package/dist/chunks/pbr.vertex-BXRa8Hxv.esm.js +0 -335
  469. package/dist/chunks/pbr.vertex-BXRa8Hxv.esm.js.map +0 -1
  470. package/dist/chunks/pbr.vertex-CF2Ccw8q.esm.min.js +0 -2
  471. package/dist/chunks/pbr.vertex-CF2Ccw8q.esm.min.js.map +0 -1
  472. package/dist/chunks/pbr.vertex-Dp1NB2h0.esm.min.js +0 -2
  473. package/dist/chunks/pbr.vertex-Dp1NB2h0.esm.min.js.map +0 -1
  474. package/dist/chunks/pbr.vertex-ou_Fcm2v.esm.js +0 -208
  475. package/dist/chunks/pbr.vertex-ou_Fcm2v.esm.js.map +0 -1
  476. package/dist/chunks/postprocess.vertex-C12ptRTz.esm.js +0 -20
  477. package/dist/chunks/postprocess.vertex-C12ptRTz.esm.js.map +0 -1
  478. package/dist/chunks/postprocess.vertex-D9PCzQ_C.esm.min.js +0 -2
  479. package/dist/chunks/postprocess.vertex-D9PCzQ_C.esm.min.js.map +0 -1
  480. package/dist/chunks/rawTexture-BTLHgkBf.esm.js +0 -562
  481. package/dist/chunks/rawTexture-BTLHgkBf.esm.js.map +0 -1
  482. package/dist/chunks/rawTexture-Cb8Vzv3y.esm.min.js +0 -2
  483. package/dist/chunks/rawTexture-Cb8Vzv3y.esm.min.js.map +0 -1
  484. package/dist/chunks/rgbdDecode.fragment-4VUd_LZa.esm.js +0 -17
  485. package/dist/chunks/rgbdDecode.fragment-4VUd_LZa.esm.js.map +0 -1
  486. package/dist/chunks/rgbdDecode.fragment-B97s0YHK.esm.min.js +0 -2
  487. package/dist/chunks/rgbdDecode.fragment-B97s0YHK.esm.min.js.map +0 -1
  488. package/dist/chunks/rgbdDecode.fragment-CgqRZDLm.esm.js +0 -17
  489. package/dist/chunks/rgbdDecode.fragment-CgqRZDLm.esm.js.map +0 -1
  490. package/dist/chunks/rgbdDecode.fragment-DSa_xyAA.esm.min.js +0 -2
  491. package/dist/chunks/rgbdDecode.fragment-DSa_xyAA.esm.min.js.map +0 -1
  492. package/dist/chunks/rgbdEncode.fragment-C3-vIdKY.esm.js +0 -17
  493. package/dist/chunks/rgbdEncode.fragment-C3-vIdKY.esm.js.map +0 -1
  494. package/dist/chunks/rgbdEncode.fragment-CZ7DFmJC.esm.min.js +0 -2
  495. package/dist/chunks/rgbdEncode.fragment-CZ7DFmJC.esm.min.js.map +0 -1
  496. package/dist/chunks/rgbdEncode.fragment-CnIc0eyH.esm.min.js +0 -2
  497. package/dist/chunks/rgbdEncode.fragment-CnIc0eyH.esm.min.js.map +0 -1
  498. package/dist/chunks/rgbdEncode.fragment-DA8KkHQU.esm.js +0 -17
  499. package/dist/chunks/rgbdEncode.fragment-DA8KkHQU.esm.js.map +0 -1
  500. package/dist/chunks/splatFileLoader-BiXQ9pqp.esm.min.js +0 -2
  501. package/dist/chunks/splatFileLoader-BiXQ9pqp.esm.min.js.map +0 -1
  502. package/dist/chunks/splatFileLoader-D17axd4l.esm.js +0 -3179
  503. package/dist/chunks/splatFileLoader-D17axd4l.esm.js.map +0 -1
  504. package/dist/chunks/standardMaterial-CYafMW8c.esm.js +0 -1809
  505. package/dist/chunks/standardMaterial-CYafMW8c.esm.js.map +0 -1
  506. package/dist/chunks/standardMaterial-xLALVwqX.esm.min.js +0 -2
  507. package/dist/chunks/standardMaterial-xLALVwqX.esm.min.js.map +0 -1
  508. package/dist/chunks/stlFileLoader-BIeNnvqG.esm.js +0 -237
  509. package/dist/chunks/stlFileLoader-BIeNnvqG.esm.js.map +0 -1
  510. package/dist/chunks/stlFileLoader-CqtYJIkJ.esm.min.js +0 -2
  511. package/dist/chunks/stlFileLoader-CqtYJIkJ.esm.min.js.map +0 -1
  512. package/dist/chunks/tgaTextureLoader-CDefV-xQ.esm.min.js +0 -2
  513. package/dist/chunks/tgaTextureLoader-CDefV-xQ.esm.min.js.map +0 -1
  514. package/dist/chunks/tgaTextureLoader-CerR7twj.esm.js +0 -349
  515. package/dist/chunks/tgaTextureLoader-CerR7twj.esm.js.map +0 -1
  516. package/dist/chunks/thinInstanceMesh-InKoMs06.esm.js +0 -314
  517. package/dist/chunks/thinInstanceMesh-InKoMs06.esm.js.map +0 -1
  518. package/dist/chunks/thinInstanceMesh-XV_b72vY.esm.min.js +0 -2
  519. package/dist/chunks/thinInstanceMesh-XV_b72vY.esm.min.js.map +0 -1
  520. package/dist/chunks/vertexColorMixing-Dm0jnWj1.esm.js +0 -528
  521. package/dist/chunks/vertexColorMixing-Dm0jnWj1.esm.js.map +0 -1
  522. package/dist/chunks/vertexColorMixing-N0v0Ism3.esm.min.js +0 -2
  523. package/dist/chunks/vertexColorMixing-N0v0Ism3.esm.min.js.map +0 -1
  524. package/dist/chunks/workerPool-BUOov2K1.esm.js +0 -122
  525. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +0 -1
  526. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +0 -2
  527. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +0 -1
  528. package/lib/index.d.ts +0 -275
  529. package/lib/index.js +0 -942
  530. package/lib/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"rawTexture-BTLHgkBf.esm.js","sources":["../../../../../dev/core/dist/Engines/Extensions/engine.rawTexture.js","../../../../../dev/core/dist/Materials/Textures/rawTexture.js"],"sourcesContent":["import { InternalTexture } from \"../../Materials/Textures/internalTexture\";\nimport { Logger } from \"../../Misc/logger\";\nimport { Constants } from \"../constants\";\nimport { ThinEngine } from \"../thinEngine\";\nimport { IsExponentOfTwo } from \"../../Misc/tools.functions\";\nThinEngine.prototype.updateRawTexture = function (texture, data, format, invertY, compression = null, type = Constants.TEXTURETYPE_UNSIGNED_INT, useSRGBBuffer = false) {\n if (!texture) {\n return;\n }\n // Babylon's internalSizedFomat but gl's texImage2D internalFormat\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type, format, useSRGBBuffer);\n // Babylon's internalFormat but gl's texImage2D format\n const internalFormat = this._getInternalFormat(format);\n const textureType = this._getWebGLTextureType(type);\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n texture.format = format;\n texture.type = type;\n texture.invertY = invertY;\n texture._compression = compression;\n }\n if (texture.width % 4 !== 0) {\n this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1);\n }\n if (compression && data) {\n this._gl.compressedTexImage2D(this._gl.TEXTURE_2D, 0, this.getCaps().s3tc[compression], texture.width, texture.height, 0, data);\n }\n else {\n this._gl.texImage2D(this._gl.TEXTURE_2D, 0, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, data);\n }\n if (texture.generateMipMaps) {\n this._gl.generateMipmap(this._gl.TEXTURE_2D);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n // this.resetTextureCache();\n texture.isReady = true;\n};\nThinEngine.prototype.createRawTexture = function (data, width, height, format, generateMipMaps, invertY, samplingMode, compression = null, type = Constants.TEXTURETYPE_UNSIGNED_INT, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ncreationFlags = 0, useSRGBBuffer = false) {\n const texture = new InternalTexture(this, 3 /* InternalTextureSource.Raw */);\n texture.baseWidth = width;\n texture.baseHeight = height;\n texture.width = width;\n texture.height = height;\n texture.format = format;\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n texture.invertY = invertY;\n texture._compression = compression;\n texture.type = type;\n texture._useSRGBBuffer = this._getUseSRGBBuffer(useSRGBBuffer, !generateMipMaps);\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n }\n this.updateRawTexture(texture, data, format, invertY, compression, type, texture._useSRGBBuffer);\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\n // Filters\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, filters.mag);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, filters.min);\n if (generateMipMaps) {\n this._gl.generateMipmap(this._gl.TEXTURE_2D);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n this._internalTexturesCache.push(texture);\n return texture;\n};\nThinEngine.prototype.createRawCubeTexture = function (data, size, format, type, generateMipMaps, invertY, samplingMode, compression = null) {\n const gl = this._gl;\n const texture = new InternalTexture(this, 8 /* InternalTextureSource.CubeRaw */);\n texture.isCube = true;\n texture.format = format;\n texture.type = type;\n if (!this._doNotHandleContextLost) {\n texture._bufferViewArray = data;\n }\n const textureType = this._getWebGLTextureType(type);\n let internalFormat = this._getInternalFormat(format);\n if (internalFormat === gl.RGB) {\n internalFormat = gl.RGBA;\n }\n // Mipmap generation needs a sized internal format that is both color-renderable and texture-filterable\n if (textureType === gl.FLOAT && !this._caps.textureFloatLinearFiltering) {\n generateMipMaps = false;\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n Logger.Warn(\"Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\n }\n else if (textureType === this._gl.HALF_FLOAT_OES && !this._caps.textureHalfFloatLinearFiltering) {\n generateMipMaps = false;\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n Logger.Warn(\"Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\n }\n else if (textureType === gl.FLOAT && !this._caps.textureFloatRender) {\n generateMipMaps = false;\n Logger.Warn(\"Render to float textures is not supported. Mipmap generation forced to false.\");\n }\n else if (textureType === gl.HALF_FLOAT && !this._caps.colorBufferFloat) {\n generateMipMaps = false;\n Logger.Warn(\"Render to half float textures is not supported. Mipmap generation forced to false.\");\n }\n const width = size;\n const height = width;\n texture.width = width;\n texture.height = height;\n texture.invertY = invertY;\n texture._compression = compression;\n // Double check on POT to generate Mips.\n const isPot = !this.needPOTTextures || (IsExponentOfTwo(texture.width) && IsExponentOfTwo(texture.height));\n if (!isPot) {\n generateMipMaps = false;\n }\n // Upload data if needed. The texture won't be ready until then.\n if (data) {\n this.updateRawCubeTexture(texture, data, format, type, invertY, compression);\n }\n else {\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);\n const level = 0;\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n if (compression) {\n gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, this.getCaps().s3tc[compression], texture.width, texture.height, 0, undefined);\n }\n else {\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, null);\n }\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, texture, true);\n // Filters\n if (data && generateMipMaps) {\n this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);\n }\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, filters.mag);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, filters.min);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n texture.isReady = true;\n return texture;\n};\nThinEngine.prototype.updateRawCubeTexture = function (texture, data, format, type, invertY, compression = null, level = 0) {\n texture._bufferViewArray = data;\n texture.format = format;\n texture.type = type;\n texture.invertY = invertY;\n texture._compression = compression;\n const gl = this._gl;\n const textureType = this._getWebGLTextureType(type);\n let internalFormat = this._getInternalFormat(format);\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);\n let needConversion = false;\n if (internalFormat === gl.RGB) {\n internalFormat = gl.RGBA;\n needConversion = true;\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n if (texture.width % 4 !== 0) {\n gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);\n }\n // Data are known to be in +X +Y +Z -X -Y -Z\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n let faceData = data[faceIndex];\n if (compression) {\n gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, this.getCaps().s3tc[compression], texture.width, texture.height, 0, faceData);\n }\n else {\n if (needConversion) {\n faceData = _convertRGBtoRGBATextureData(faceData, texture.width, texture.height, type);\n }\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, faceData);\n }\n }\n const isPot = !this.needPOTTextures || (IsExponentOfTwo(texture.width) && IsExponentOfTwo(texture.height));\n if (isPot && texture.generateMipMaps && level === 0) {\n this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n // this.resetTextureCache();\n texture.isReady = true;\n};\nThinEngine.prototype.createRawCubeTextureFromUrl = function (url, scene, size, format, type, noMipmap, callback, mipmapGenerator, onLoad = null, onError = null, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, invertY = false) {\n const gl = this._gl;\n const texture = this.createRawCubeTexture(null, size, format, type, !noMipmap, invertY, samplingMode, null);\n scene?.addPendingData(texture);\n texture.url = url;\n texture.isReady = false;\n this._internalTexturesCache.push(texture);\n const onerror = (request, exception) => {\n scene?.removePendingData(texture);\n if (onError && request) {\n onError(request.status + \" \" + request.statusText, exception);\n }\n };\n const internalCallback = (data) => {\n const width = texture.width;\n const faceDataArrays = callback(data);\n if (!faceDataArrays) {\n return;\n }\n if (mipmapGenerator) {\n const textureType = this._getWebGLTextureType(type);\n let internalFormat = this._getInternalFormat(format);\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);\n let needConversion = false;\n if (internalFormat === gl.RGB) {\n internalFormat = gl.RGBA;\n needConversion = true;\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n this._unpackFlipY(false);\n const mipData = mipmapGenerator(faceDataArrays);\n for (let level = 0; level < mipData.length; level++) {\n const mipSize = width >> level;\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n let mipFaceData = mipData[level][faceIndex];\n if (needConversion) {\n mipFaceData = _convertRGBtoRGBATextureData(mipFaceData, mipSize, mipSize, type);\n }\n gl.texImage2D(faceIndex, level, internalSizedFomat, mipSize, mipSize, 0, internalFormat, textureType, mipFaceData);\n }\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n }\n else {\n this.updateRawCubeTexture(texture, faceDataArrays, format, type, invertY);\n }\n texture.isReady = true;\n // this.resetTextureCache();\n scene?.removePendingData(texture);\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (onLoad) {\n onLoad();\n }\n };\n this._loadFile(url, (data) => {\n internalCallback(data);\n }, undefined, scene?.offlineProvider, true, onerror);\n return texture;\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction _convertRGBtoRGBATextureData(rgbData, width, height, textureType) {\n // Create new RGBA data container.\n let rgbaData;\n let val1 = 1;\n if (textureType === Constants.TEXTURETYPE_FLOAT) {\n rgbaData = new Float32Array(width * height * 4);\n }\n else if (textureType === Constants.TEXTURETYPE_HALF_FLOAT) {\n rgbaData = new Uint16Array(width * height * 4);\n val1 = 15360; // 15360 is the encoding of 1 in half float\n }\n else if (textureType === Constants.TEXTURETYPE_UNSIGNED_INTEGER) {\n rgbaData = new Uint32Array(width * height * 4);\n }\n else {\n rgbaData = new Uint8Array(width * height * 4);\n }\n // Convert each pixel.\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n const index = (y * width + x) * 3;\n const newIndex = (y * width + x) * 4;\n // Map Old Value to new value.\n rgbaData[newIndex + 0] = rgbData[index + 0];\n rgbaData[newIndex + 1] = rgbData[index + 1];\n rgbaData[newIndex + 2] = rgbData[index + 2];\n // Add fully opaque alpha channel.\n rgbaData[newIndex + 3] = val1;\n }\n }\n return rgbaData;\n}\n/**\n * Create a function for createRawTexture3D/createRawTexture2DArray\n * @param is3D true for TEXTURE_3D and false for TEXTURE_2D_ARRAY\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction _makeCreateRawTextureFunction(is3D) {\n return function (data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression = null, textureType = Constants.TEXTURETYPE_UNSIGNED_INT) {\n const target = is3D ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY;\n const source = is3D ? 10 /* InternalTextureSource.Raw3D */ : 11 /* InternalTextureSource.Raw2DArray */;\n const texture = new InternalTexture(this, source);\n texture.baseWidth = width;\n texture.baseHeight = height;\n texture.baseDepth = depth;\n texture.width = width;\n texture.height = height;\n texture.depth = depth;\n texture.format = format;\n texture.type = textureType;\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n if (is3D) {\n texture.is3D = true;\n }\n else {\n texture.is2DArray = true;\n }\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n }\n if (is3D) {\n this.updateRawTexture3D(texture, data, format, invertY, compression, textureType);\n }\n else {\n this.updateRawTexture2DArray(texture, data, format, invertY, compression, textureType);\n }\n this._bindTextureDirectly(target, texture, true);\n // Filters\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n this._gl.texParameteri(target, this._gl.TEXTURE_MAG_FILTER, filters.mag);\n this._gl.texParameteri(target, this._gl.TEXTURE_MIN_FILTER, filters.min);\n if (generateMipMaps) {\n this._gl.generateMipmap(target);\n }\n this._bindTextureDirectly(target, null);\n this._internalTexturesCache.push(texture);\n return texture;\n };\n}\nThinEngine.prototype.createRawTexture2DArray = _makeCreateRawTextureFunction(false);\nThinEngine.prototype.createRawTexture3D = _makeCreateRawTextureFunction(true);\n/**\n * Create a function for updateRawTexture3D/updateRawTexture2DArray\n * @param is3D true for TEXTURE_3D and false for TEXTURE_2D_ARRAY\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction _makeUpdateRawTextureFunction(is3D) {\n return function (texture, data, format, invertY, compression = null, textureType = Constants.TEXTURETYPE_UNSIGNED_INT) {\n const target = is3D ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY;\n const internalType = this._getWebGLTextureType(textureType);\n const internalFormat = this._getInternalFormat(format);\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(textureType, format);\n this._bindTextureDirectly(target, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n texture.format = format;\n texture.invertY = invertY;\n texture._compression = compression;\n }\n if (texture.width % 4 !== 0) {\n this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1);\n }\n if (compression && data) {\n this._gl.compressedTexImage3D(target, 0, this.getCaps().s3tc[compression], texture.width, texture.height, texture.depth, 0, data);\n }\n else {\n this._gl.texImage3D(target, 0, internalSizedFomat, texture.width, texture.height, texture.depth, 0, internalFormat, internalType, data);\n }\n if (texture.generateMipMaps) {\n this._gl.generateMipmap(target);\n }\n this._bindTextureDirectly(target, null);\n // this.resetTextureCache();\n texture.isReady = true;\n };\n}\nThinEngine.prototype.updateRawTexture2DArray = _makeUpdateRawTextureFunction(false);\nThinEngine.prototype.updateRawTexture3D = _makeUpdateRawTextureFunction(true);\n//# sourceMappingURL=engine.rawTexture.js.map","import { Texture } from \"./texture\";\nimport { Constants } from \"../../Engines/constants\";\nimport \"../../Engines/Extensions/engine.rawTexture\";\n/**\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n */\nexport class RawTexture extends Texture {\n /**\n * Instantiates a new RawTexture.\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n * @param data define the array of data to use to create the texture (null to create an empty texture)\n * @param width define the width of the texture\n * @param height define the height of the texture\n * @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps define whether mip maps should be generated or not\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n */\n constructor(data, width, height, \n /**\n * Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n */\n format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags, useSRGBBuffer) {\n super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);\n this.format = format;\n if (!this._engine) {\n return;\n }\n if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\n }\n /**\n * Updates the texture underlying data.\n * @param data Define the new data of the texture\n */\n update(data) {\n this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);\n }\n /**\n * Clones the texture.\n * @returns the cloned texture\n */\n clone() {\n if (!this._texture) {\n return super.clone();\n }\n const rawTexture = new RawTexture(null, this.getSize().width, this.getSize().height, this.format, this.getScene(), this._texture.generateMipMaps, this._invertY, this.samplingMode, this._texture.type, this._texture._creationFlags, this._useSRGBBuffer);\n rawTexture._texture = this._texture;\n this._texture.incrementReferences();\n return rawTexture;\n }\n /**\n * Creates a luminance texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance texture\n */\n static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a luminance alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance alpha texture\n */\n static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates an alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the alpha texture\n */\n static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a RGB texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGB alpha texture\n */\n static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);\n }\n /**\n * Creates a R texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);\n }\n /**\n * Creates a R storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);\n }\n}\n//# sourceMappingURL=rawTexture.js.map"],"names":[],"mappings":";;AAKA,UAAU,CAAC,SAAS,CAAC,gBAAgB,GAAG,UAAU,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC,wBAAwB,EAAE,aAAa,GAAG,KAAK,EAAE;AACxK,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO;AACf,KAAK;AACL;AACA,IAAI,MAAM,kBAAkB,GAAG,IAAI,CAAC,iCAAiC,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;AACnG;AACA,IAAI,MAAM,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC3D,IAAI,MAAM,WAAW,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACxD,IAAI,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAClE,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,SAAS,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC;AAC7E,IAAI,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE;AACvC,QAAQ,OAAO,CAAC,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AAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,CAAC,4BAA4B,CAAC,CAAC;AACnL,KAAK;AACL;;;;"}
@@ -1,2 +0,0 @@
1
- import{T as e,C as t,c as i,L as r,b1 as T,f as s}from"./index-RwQCgcf4.esm.min.js";function _(e,i,r,T){let s,_=1;T===t.TEXTURETYPE_FLOAT?s=new Float32Array(i*r*4):T===t.TEXTURETYPE_HALF_FLOAT?(s=new Uint16Array(i*r*4),_=15360):s=T===t.TEXTURETYPE_UNSIGNED_INTEGER?new Uint32Array(i*r*4):new Uint8Array(i*r*4);for(let t=0;t<i;t++)for(let T=0;T<r;T++){const r=3*(T*i+t),a=4*(T*i+t);s[a+0]=e[r+0],s[a+1]=e[r+1],s[a+2]=e[r+2],s[a+3]=_}return s}function a(e){return function(r,T,s,_,a,E,n,h,l=null,o=t.TEXTURETYPE_UNSIGNED_INT){const R=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,u=new i(this,e?10:11);u.baseWidth=T,u.baseHeight=s,u.baseDepth=_,u.width=T,u.height=s,u.depth=_,u.format=a,u.type=o,u.generateMipMaps=E,u.samplingMode=h,e?u.is3D=!0:u.is2DArray=!0,this._doNotHandleContextLost||(u._bufferView=r),e?this.updateRawTexture3D(u,r,a,n,l,o):this.updateRawTexture2DArray(u,r,a,n,l,o),this._bindTextureDirectly(R,u,!0);const g=this._getSamplingParameters(h,E);return this._gl.texParameteri(R,this._gl.TEXTURE_MAG_FILTER,g.mag),this._gl.texParameteri(R,this._gl.TEXTURE_MIN_FILTER,g.min),E&&this._gl.generateMipmap(R),this._bindTextureDirectly(R,null),this._internalTexturesCache.push(u),u}}function E(e){return function(i,r,T,s,_=null,a=t.TEXTURETYPE_UNSIGNED_INT){const E=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,n=this._getWebGLTextureType(a),h=this._getInternalFormat(T),l=this._getRGBABufferInternalSizedFormat(a,T);this._bindTextureDirectly(E,i,!0),this._unpackFlipY(void 0===s||!!s),this._doNotHandleContextLost||(i._bufferView=r,i.format=T,i.invertY=s,i._compression=_),i.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),_&&r?this._gl.compressedTexImage3D(E,0,this.getCaps().s3tc[_],i.width,i.height,i.depth,0,r):this._gl.texImage3D(E,0,l,i.width,i.height,i.depth,0,h,n,r),i.generateMipMaps&&this._gl.generateMipmap(E),this._bindTextureDirectly(E,null),i.isReady=!0}}e.prototype.updateRawTexture=function(e,i,r,T,s=null,_=t.TEXTURETYPE_UNSIGNED_INT,a=!1){if(!e)return;const E=this._getRGBABufferInternalSizedFormat(_,r,a),n=this._getInternalFormat(r),h=this._getWebGLTextureType(_);this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===T||!!T),this._doNotHandleContextLost||(e._bufferView=i,e.format=r,e.type=_,e.invertY=T,e._compression=s),e.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),s&&i?this._gl.compressedTexImage2D(this._gl.TEXTURE_2D,0,this.getCaps().s3tc[s],e.width,e.height,0,i):this._gl.texImage2D(this._gl.TEXTURE_2D,0,E,e.width,e.height,0,n,h,i),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),e.isReady=!0},e.prototype.createRawTexture=function(e,r,T,s,_,a,E,n=null,h=t.TEXTURETYPE_UNSIGNED_INT,l=0,o=!1){const R=new i(this,3);R.baseWidth=r,R.baseHeight=T,R.width=r,R.height=T,R.format=s,R.generateMipMaps=_,R.samplingMode=E,R.invertY=a,R._compression=n,R.type=h,R._useSRGBBuffer=this._getUseSRGBBuffer(o,!_),this._doNotHandleContextLost||(R._bufferView=e),this.updateRawTexture(R,e,s,a,n,h,R._useSRGBBuffer),this._bindTextureDirectly(this._gl.TEXTURE_2D,R,!0);const u=this._getSamplingParameters(E,_);return this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,u.mag),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,u.min),_&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._internalTexturesCache.push(R),R},e.prototype.createRawCubeTexture=function(e,s,_,a,E,n,h,l=null){const o=this._gl,R=new i(this,8);R.isCube=!0,R.format=_,R.type=a,this._doNotHandleContextLost||(R._bufferViewArray=e);const u=this._getWebGLTextureType(a);let g=this._getInternalFormat(_);g===o.RGB&&(g=o.RGBA),u!==o.FLOAT||this._caps.textureFloatLinearFiltering?u!==this._gl.HALF_FLOAT_OES||this._caps.textureHalfFloatLinearFiltering?u!==o.FLOAT||this._caps.textureFloatRender?u!==o.HALF_FLOAT||this._caps.colorBufferFloat||(E=!1,r.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(E=!1,r.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(E=!1,h=t.TEXTURE_NEAREST_SAMPLINGMODE,r.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(E=!1,h=t.TEXTURE_NEAREST_SAMPLINGMODE,r.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively."));const p=s,A=p;R.width=p,R.height=A,R.invertY=n,R._compression=l;if(!this.needPOTTextures||T(R.width)&&T(R.height)||(E=!1),e)this.updateRawCubeTexture(R,e,_,a,n,l);else{const e=this._getRGBABufferInternalSizedFormat(a),t=0;this._bindTextureDirectly(o.TEXTURE_CUBE_MAP,R,!0);for(let i=0;i<6;i++)l?o.compressedTexImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+i,t,this.getCaps().s3tc[l],R.width,R.height,0,void 0):o.texImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+i,t,e,R.width,R.height,0,g,u,null);this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)}this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,R,!0),e&&E&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);const d=this._getSamplingParameters(h,E);return o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MAG_FILTER,d.mag),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MIN_FILTER,d.min),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),this._bindTextureDirectly(o.TEXTURE_CUBE_MAP,null),R.generateMipMaps=E,R.samplingMode=h,R.isReady=!0,R},e.prototype.updateRawCubeTexture=function(e,t,i,r,s,a=null,E=0){e._bufferViewArray=t,e.format=i,e.type=r,e.invertY=s,e._compression=a;const n=this._gl,h=this._getWebGLTextureType(r);let l=this._getInternalFormat(i);const o=this._getRGBABufferInternalSizedFormat(r);let R=!1;l===n.RGB&&(l=n.RGBA,R=!0),this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(void 0===s||!!s),e.width%4!=0&&n.pixelStorei(n.UNPACK_ALIGNMENT,1);for(let i=0;i<6;i++){let T=t[i];a?n.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+i,E,this.getCaps().s3tc[a],e.width,e.height,0,T):(R&&(T=_(T,e.width,e.height,r)),n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+i,E,o,e.width,e.height,0,l,h,T))}(!this.needPOTTextures||T(e.width)&&T(e.height))&&e.generateMipMaps&&0===E&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),e.isReady=!0},e.prototype.createRawCubeTextureFromUrl=function(e,i,r,T,s,a,E,n,h=null,l=null,o=t.TEXTURE_TRILINEAR_SAMPLINGMODE,R=!1){const u=this._gl,g=this.createRawCubeTexture(null,r,T,s,!a,R,o,null);i?.addPendingData(g),g.url=e,g.isReady=!1,this._internalTexturesCache.push(g);const p=e=>{const t=g.width,r=E(e);if(r){if(n){const e=this._getWebGLTextureType(s);let i=this._getInternalFormat(T);const a=this._getRGBABufferInternalSizedFormat(s);let E=!1;i===u.RGB&&(i=u.RGBA,E=!0),this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,g,!0),this._unpackFlipY(!1);const h=n(r);for(let r=0;r<h.length;r++){const T=t>>r;for(let t=0;t<6;t++){let n=h[r][t];E&&(n=_(n,T,T,s)),u.texImage2D(t,r,a,T,T,0,i,e,n)}}this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,null)}else this.updateRawCubeTexture(g,r,T,s,R);g.isReady=!0,i?.removePendingData(g),g.onLoadedObservable.notifyObservers(g),g.onLoadedObservable.clear(),h&&h()}};return this._loadFile(e,(e=>{p(e)}),void 0,i?.offlineProvider,!0,((e,t)=>{i?.removePendingData(g),l&&e&&l(e.status+" "+e.statusText,t)})),g},e.prototype.createRawTexture2DArray=a(!1),e.prototype.createRawTexture3D=a(!0),e.prototype.updateRawTexture2DArray=E(!1),e.prototype.updateRawTexture3D=E(!0);class n extends s{constructor(e,i,r,T,_,a=!0,E=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,h=t.TEXTURETYPE_UNSIGNED_INT,l,o){super(null,_,!a,E,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,l),this.format=T,this._engine&&(this._engine._caps.textureFloatLinearFiltering||h!==t.TEXTURETYPE_FLOAT||(n=t.TEXTURE_NEAREST_SAMPLINGMODE),this._engine._caps.textureHalfFloatLinearFiltering||h!==t.TEXTURETYPE_HALF_FLOAT||(n=t.TEXTURE_NEAREST_SAMPLINGMODE),this._texture=this._engine.createRawTexture(e,i,r,T,a,E,n,null,h,l??0,o??!1),this.wrapU=s.CLAMP_ADDRESSMODE,this.wrapV=s.CLAMP_ADDRESSMODE)}update(e){this._getEngine().updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type,this._texture._useSRGBBuffer)}clone(){if(!this._texture)return super.clone();const e=new n(null,this.getSize().width,this.getSize().height,this.format,this.getScene(),this._texture.generateMipMaps,this._invertY,this.samplingMode,this._texture.type,this._texture._creationFlags,this._useSRGBBuffer);return e._texture=this._texture,this._texture.incrementReferences(),e}static CreateLuminanceTexture(e,i,r,T,s=!0,_=!1,a=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new n(e,i,r,t.TEXTUREFORMAT_LUMINANCE,T,s,_,a)}static CreateLuminanceAlphaTexture(e,i,r,T,s=!0,_=!1,a=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new n(e,i,r,t.TEXTUREFORMAT_LUMINANCE_ALPHA,T,s,_,a)}static CreateAlphaTexture(e,i,r,T,s=!0,_=!1,a=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new n(e,i,r,t.TEXTUREFORMAT_ALPHA,T,s,_,a)}static CreateRGBTexture(e,i,r,T,s=!0,_=!1,a=t.TEXTURE_TRILINEAR_SAMPLINGMODE,E=t.TEXTURETYPE_UNSIGNED_INT,h=0,l=!1){return new n(e,i,r,t.TEXTUREFORMAT_RGB,T,s,_,a,E,h,l)}static CreateRGBATexture(e,i,r,T,s=!0,_=!1,a=t.TEXTURE_TRILINEAR_SAMPLINGMODE,E=t.TEXTURETYPE_UNSIGNED_INT,h=0,l=!1){return new n(e,i,r,t.TEXTUREFORMAT_RGBA,T,s,_,a,E,h,l)}static CreateRGBAStorageTexture(e,i,r,T,s=!0,_=!1,a=t.TEXTURE_TRILINEAR_SAMPLINGMODE,E=t.TEXTURETYPE_UNSIGNED_INT,h=!1){return new n(e,i,r,t.TEXTUREFORMAT_RGBA,T,s,_,a,E,t.TEXTURE_CREATIONFLAG_STORAGE,h)}static CreateRTexture(e,i,r,T,_=!0,a=!1,E=s.TRILINEAR_SAMPLINGMODE,h=t.TEXTURETYPE_FLOAT){return new n(e,i,r,t.TEXTUREFORMAT_R,T,_,a,E,h)}static CreateRStorageTexture(e,i,r,T,_=!0,a=!1,E=s.TRILINEAR_SAMPLINGMODE,h=t.TEXTURETYPE_FLOAT){return new n(e,i,r,t.TEXTUREFORMAT_R,T,_,a,E,h,t.TEXTURE_CREATIONFLAG_STORAGE)}}export{n as R};
2
- //# sourceMappingURL=rawTexture-Cb8Vzv3y.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rawTexture-Cb8Vzv3y.esm.min.js","sources":["../../../../../dev/core/dist/Engines/Extensions/engine.rawTexture.js","../../../../../dev/core/dist/Materials/Textures/rawTexture.js"],"sourcesContent":["import { InternalTexture } from \"../../Materials/Textures/internalTexture\";\nimport { Logger } from \"../../Misc/logger\";\nimport { Constants } from \"../constants\";\nimport { ThinEngine } from \"../thinEngine\";\nimport { IsExponentOfTwo } from \"../../Misc/tools.functions\";\nThinEngine.prototype.updateRawTexture = function (texture, data, format, invertY, compression = null, type = Constants.TEXTURETYPE_UNSIGNED_INT, useSRGBBuffer = false) {\n if (!texture) {\n return;\n }\n // Babylon's internalSizedFomat but gl's texImage2D internalFormat\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type, format, useSRGBBuffer);\n // Babylon's internalFormat but gl's texImage2D format\n const internalFormat = this._getInternalFormat(format);\n const textureType = this._getWebGLTextureType(type);\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n texture.format = format;\n texture.type = type;\n texture.invertY = invertY;\n texture._compression = compression;\n }\n if (texture.width % 4 !== 0) {\n this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1);\n }\n if (compression && data) {\n this._gl.compressedTexImage2D(this._gl.TEXTURE_2D, 0, this.getCaps().s3tc[compression], texture.width, texture.height, 0, data);\n }\n else {\n this._gl.texImage2D(this._gl.TEXTURE_2D, 0, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, data);\n }\n if (texture.generateMipMaps) {\n this._gl.generateMipmap(this._gl.TEXTURE_2D);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n // this.resetTextureCache();\n texture.isReady = true;\n};\nThinEngine.prototype.createRawTexture = function (data, width, height, format, generateMipMaps, invertY, samplingMode, compression = null, type = Constants.TEXTURETYPE_UNSIGNED_INT, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ncreationFlags = 0, useSRGBBuffer = false) {\n const texture = new InternalTexture(this, 3 /* InternalTextureSource.Raw */);\n texture.baseWidth = width;\n texture.baseHeight = height;\n texture.width = width;\n texture.height = height;\n texture.format = format;\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n texture.invertY = invertY;\n texture._compression = compression;\n texture.type = type;\n texture._useSRGBBuffer = this._getUseSRGBBuffer(useSRGBBuffer, !generateMipMaps);\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n }\n this.updateRawTexture(texture, data, format, invertY, compression, type, texture._useSRGBBuffer);\n this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);\n // Filters\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, filters.mag);\n this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, filters.min);\n if (generateMipMaps) {\n this._gl.generateMipmap(this._gl.TEXTURE_2D);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_2D, null);\n this._internalTexturesCache.push(texture);\n return texture;\n};\nThinEngine.prototype.createRawCubeTexture = function (data, size, format, type, generateMipMaps, invertY, samplingMode, compression = null) {\n const gl = this._gl;\n const texture = new InternalTexture(this, 8 /* InternalTextureSource.CubeRaw */);\n texture.isCube = true;\n texture.format = format;\n texture.type = type;\n if (!this._doNotHandleContextLost) {\n texture._bufferViewArray = data;\n }\n const textureType = this._getWebGLTextureType(type);\n let internalFormat = this._getInternalFormat(format);\n if (internalFormat === gl.RGB) {\n internalFormat = gl.RGBA;\n }\n // Mipmap generation needs a sized internal format that is both color-renderable and texture-filterable\n if (textureType === gl.FLOAT && !this._caps.textureFloatLinearFiltering) {\n generateMipMaps = false;\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n Logger.Warn(\"Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\n }\n else if (textureType === this._gl.HALF_FLOAT_OES && !this._caps.textureHalfFloatLinearFiltering) {\n generateMipMaps = false;\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n Logger.Warn(\"Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\");\n }\n else if (textureType === gl.FLOAT && !this._caps.textureFloatRender) {\n generateMipMaps = false;\n Logger.Warn(\"Render to float textures is not supported. Mipmap generation forced to false.\");\n }\n else if (textureType === gl.HALF_FLOAT && !this._caps.colorBufferFloat) {\n generateMipMaps = false;\n Logger.Warn(\"Render to half float textures is not supported. Mipmap generation forced to false.\");\n }\n const width = size;\n const height = width;\n texture.width = width;\n texture.height = height;\n texture.invertY = invertY;\n texture._compression = compression;\n // Double check on POT to generate Mips.\n const isPot = !this.needPOTTextures || (IsExponentOfTwo(texture.width) && IsExponentOfTwo(texture.height));\n if (!isPot) {\n generateMipMaps = false;\n }\n // Upload data if needed. The texture won't be ready until then.\n if (data) {\n this.updateRawCubeTexture(texture, data, format, type, invertY, compression);\n }\n else {\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);\n const level = 0;\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n if (compression) {\n gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, this.getCaps().s3tc[compression], texture.width, texture.height, 0, undefined);\n }\n else {\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, null);\n }\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, texture, true);\n // Filters\n if (data && generateMipMaps) {\n this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);\n }\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, filters.mag);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, filters.min);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n texture.isReady = true;\n return texture;\n};\nThinEngine.prototype.updateRawCubeTexture = function (texture, data, format, type, invertY, compression = null, level = 0) {\n texture._bufferViewArray = data;\n texture.format = format;\n texture.type = type;\n texture.invertY = invertY;\n texture._compression = compression;\n const gl = this._gl;\n const textureType = this._getWebGLTextureType(type);\n let internalFormat = this._getInternalFormat(format);\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);\n let needConversion = false;\n if (internalFormat === gl.RGB) {\n internalFormat = gl.RGBA;\n needConversion = true;\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n if (texture.width % 4 !== 0) {\n gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);\n }\n // Data are known to be in +X +Y +Z -X -Y -Z\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n let faceData = data[faceIndex];\n if (compression) {\n gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, this.getCaps().s3tc[compression], texture.width, texture.height, 0, faceData);\n }\n else {\n if (needConversion) {\n faceData = _convertRGBtoRGBATextureData(faceData, texture.width, texture.height, type);\n }\n gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, faceData);\n }\n }\n const isPot = !this.needPOTTextures || (IsExponentOfTwo(texture.width) && IsExponentOfTwo(texture.height));\n if (isPot && texture.generateMipMaps && level === 0) {\n this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);\n }\n this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);\n // this.resetTextureCache();\n texture.isReady = true;\n};\nThinEngine.prototype.createRawCubeTextureFromUrl = function (url, scene, size, format, type, noMipmap, callback, mipmapGenerator, onLoad = null, onError = null, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, invertY = false) {\n const gl = this._gl;\n const texture = this.createRawCubeTexture(null, size, format, type, !noMipmap, invertY, samplingMode, null);\n scene?.addPendingData(texture);\n texture.url = url;\n texture.isReady = false;\n this._internalTexturesCache.push(texture);\n const onerror = (request, exception) => {\n scene?.removePendingData(texture);\n if (onError && request) {\n onError(request.status + \" \" + request.statusText, exception);\n }\n };\n const internalCallback = (data) => {\n const width = texture.width;\n const faceDataArrays = callback(data);\n if (!faceDataArrays) {\n return;\n }\n if (mipmapGenerator) {\n const textureType = this._getWebGLTextureType(type);\n let internalFormat = this._getInternalFormat(format);\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);\n let needConversion = false;\n if (internalFormat === gl.RGB) {\n internalFormat = gl.RGBA;\n needConversion = true;\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);\n this._unpackFlipY(false);\n const mipData = mipmapGenerator(faceDataArrays);\n for (let level = 0; level < mipData.length; level++) {\n const mipSize = width >> level;\n for (let faceIndex = 0; faceIndex < 6; faceIndex++) {\n let mipFaceData = mipData[level][faceIndex];\n if (needConversion) {\n mipFaceData = _convertRGBtoRGBATextureData(mipFaceData, mipSize, mipSize, type);\n }\n gl.texImage2D(faceIndex, level, internalSizedFomat, mipSize, mipSize, 0, internalFormat, textureType, mipFaceData);\n }\n }\n this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);\n }\n else {\n this.updateRawCubeTexture(texture, faceDataArrays, format, type, invertY);\n }\n texture.isReady = true;\n // this.resetTextureCache();\n scene?.removePendingData(texture);\n texture.onLoadedObservable.notifyObservers(texture);\n texture.onLoadedObservable.clear();\n if (onLoad) {\n onLoad();\n }\n };\n this._loadFile(url, (data) => {\n internalCallback(data);\n }, undefined, scene?.offlineProvider, true, onerror);\n return texture;\n};\n/**\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction _convertRGBtoRGBATextureData(rgbData, width, height, textureType) {\n // Create new RGBA data container.\n let rgbaData;\n let val1 = 1;\n if (textureType === Constants.TEXTURETYPE_FLOAT) {\n rgbaData = new Float32Array(width * height * 4);\n }\n else if (textureType === Constants.TEXTURETYPE_HALF_FLOAT) {\n rgbaData = new Uint16Array(width * height * 4);\n val1 = 15360; // 15360 is the encoding of 1 in half float\n }\n else if (textureType === Constants.TEXTURETYPE_UNSIGNED_INTEGER) {\n rgbaData = new Uint32Array(width * height * 4);\n }\n else {\n rgbaData = new Uint8Array(width * height * 4);\n }\n // Convert each pixel.\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n const index = (y * width + x) * 3;\n const newIndex = (y * width + x) * 4;\n // Map Old Value to new value.\n rgbaData[newIndex + 0] = rgbData[index + 0];\n rgbaData[newIndex + 1] = rgbData[index + 1];\n rgbaData[newIndex + 2] = rgbData[index + 2];\n // Add fully opaque alpha channel.\n rgbaData[newIndex + 3] = val1;\n }\n }\n return rgbaData;\n}\n/**\n * Create a function for createRawTexture3D/createRawTexture2DArray\n * @param is3D true for TEXTURE_3D and false for TEXTURE_2D_ARRAY\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction _makeCreateRawTextureFunction(is3D) {\n return function (data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression = null, textureType = Constants.TEXTURETYPE_UNSIGNED_INT) {\n const target = is3D ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY;\n const source = is3D ? 10 /* InternalTextureSource.Raw3D */ : 11 /* InternalTextureSource.Raw2DArray */;\n const texture = new InternalTexture(this, source);\n texture.baseWidth = width;\n texture.baseHeight = height;\n texture.baseDepth = depth;\n texture.width = width;\n texture.height = height;\n texture.depth = depth;\n texture.format = format;\n texture.type = textureType;\n texture.generateMipMaps = generateMipMaps;\n texture.samplingMode = samplingMode;\n if (is3D) {\n texture.is3D = true;\n }\n else {\n texture.is2DArray = true;\n }\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n }\n if (is3D) {\n this.updateRawTexture3D(texture, data, format, invertY, compression, textureType);\n }\n else {\n this.updateRawTexture2DArray(texture, data, format, invertY, compression, textureType);\n }\n this._bindTextureDirectly(target, texture, true);\n // Filters\n const filters = this._getSamplingParameters(samplingMode, generateMipMaps);\n this._gl.texParameteri(target, this._gl.TEXTURE_MAG_FILTER, filters.mag);\n this._gl.texParameteri(target, this._gl.TEXTURE_MIN_FILTER, filters.min);\n if (generateMipMaps) {\n this._gl.generateMipmap(target);\n }\n this._bindTextureDirectly(target, null);\n this._internalTexturesCache.push(texture);\n return texture;\n };\n}\nThinEngine.prototype.createRawTexture2DArray = _makeCreateRawTextureFunction(false);\nThinEngine.prototype.createRawTexture3D = _makeCreateRawTextureFunction(true);\n/**\n * Create a function for updateRawTexture3D/updateRawTexture2DArray\n * @param is3D true for TEXTURE_3D and false for TEXTURE_2D_ARRAY\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction _makeUpdateRawTextureFunction(is3D) {\n return function (texture, data, format, invertY, compression = null, textureType = Constants.TEXTURETYPE_UNSIGNED_INT) {\n const target = is3D ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY;\n const internalType = this._getWebGLTextureType(textureType);\n const internalFormat = this._getInternalFormat(format);\n const internalSizedFomat = this._getRGBABufferInternalSizedFormat(textureType, format);\n this._bindTextureDirectly(target, texture, true);\n this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);\n if (!this._doNotHandleContextLost) {\n texture._bufferView = data;\n texture.format = format;\n texture.invertY = invertY;\n texture._compression = compression;\n }\n if (texture.width % 4 !== 0) {\n this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1);\n }\n if (compression && data) {\n this._gl.compressedTexImage3D(target, 0, this.getCaps().s3tc[compression], texture.width, texture.height, texture.depth, 0, data);\n }\n else {\n this._gl.texImage3D(target, 0, internalSizedFomat, texture.width, texture.height, texture.depth, 0, internalFormat, internalType, data);\n }\n if (texture.generateMipMaps) {\n this._gl.generateMipmap(target);\n }\n this._bindTextureDirectly(target, null);\n // this.resetTextureCache();\n texture.isReady = true;\n };\n}\nThinEngine.prototype.updateRawTexture2DArray = _makeUpdateRawTextureFunction(false);\nThinEngine.prototype.updateRawTexture3D = _makeUpdateRawTextureFunction(true);\n//# sourceMappingURL=engine.rawTexture.js.map","import { Texture } from \"./texture\";\nimport { Constants } from \"../../Engines/constants\";\nimport \"../../Engines/Extensions/engine.rawTexture\";\n/**\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n */\nexport class RawTexture extends Texture {\n /**\n * Instantiates a new RawTexture.\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n * @param data define the array of data to use to create the texture (null to create an empty texture)\n * @param width define the width of the texture\n * @param height define the height of the texture\n * @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps define whether mip maps should be generated or not\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n */\n constructor(data, width, height, \n /**\n * Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n */\n format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags, useSRGBBuffer) {\n super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);\n this.format = format;\n if (!this._engine) {\n return;\n }\n if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\n }\n /**\n * Updates the texture underlying data.\n * @param data Define the new data of the texture\n */\n update(data) {\n this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);\n }\n /**\n * Clones the texture.\n * @returns the cloned texture\n */\n clone() {\n if (!this._texture) {\n return super.clone();\n }\n const rawTexture = new RawTexture(null, this.getSize().width, this.getSize().height, this.format, this.getScene(), this._texture.generateMipMaps, this._invertY, this.samplingMode, this._texture.type, this._texture._creationFlags, this._useSRGBBuffer);\n rawTexture._texture = this._texture;\n this._texture.incrementReferences();\n return rawTexture;\n }\n /**\n * Creates a luminance texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance texture\n */\n static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a luminance alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance alpha texture\n */\n static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates an alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the alpha texture\n */\n static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a RGB texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGB alpha texture\n */\n static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);\n }\n /**\n * Creates a R texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);\n }\n /**\n * Creates a R storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);\n }\n}\n//# sourceMappingURL=rawTexture.js.map"],"names":["_convertRGBtoRGBATextureData","rgbData","width","height","textureType","rgbaData","val1","Constants","TEXTURETYPE_FLOAT","Float32Array","TEXTURETYPE_HALF_FLOAT","Uint16Array","TEXTURETYPE_UNSIGNED_INTEGER","Uint32Array","Uint8Array","x","y","index","newIndex","_makeCreateRawTextureFunction","is3D","data","depth","format","generateMipMaps","invertY","samplingMode","compression","TEXTURETYPE_UNSIGNED_INT","target","this","_gl","TEXTURE_3D","TEXTURE_2D_ARRAY","texture","InternalTexture","baseWidth","baseHeight","baseDepth","type","is2DArray","_doNotHandleContextLost","_bufferView","updateRawTexture3D","updateRawTexture2DArray","_bindTextureDirectly","filters","_getSamplingParameters","texParameteri","TEXTURE_MAG_FILTER","mag","TEXTURE_MIN_FILTER","min","generateMipmap","_internalTexturesCache","push","_makeUpdateRawTextureFunction","internalType","_getWebGLTextureType","internalFormat","_getInternalFormat","internalSizedFomat","_getRGBABufferInternalSizedFormat","_unpackFlipY","undefined","_compression","pixelStorei","UNPACK_ALIGNMENT","compressedTexImage3D","getCaps","s3tc","texImage3D","isReady","ThinEngine","prototype","updateRawTexture","useSRGBBuffer","TEXTURE_2D","compressedTexImage2D","texImage2D","createRawTexture","creationFlags","_useSRGBBuffer","_getUseSRGBBuffer","createRawCubeTexture","size","gl","isCube","_bufferViewArray","RGB","RGBA","FLOAT","_caps","textureFloatLinearFiltering","HALF_FLOAT_OES","textureHalfFloatLinearFiltering","textureFloatRender","HALF_FLOAT","colorBufferFloat","Logger","Warn","TEXTURE_NEAREST_SAMPLINGMODE","needPOTTextures","IsExponentOfTwo","updateRawCubeTexture","level","TEXTURE_CUBE_MAP","faceIndex","TEXTURE_CUBE_MAP_POSITIVE_X","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","needConversion","faceData","createRawCubeTextureFromUrl","url","scene","noMipmap","callback","mipmapGenerator","onLoad","onError","TEXTURE_TRILINEAR_SAMPLINGMODE","addPendingData","internalCallback","faceDataArrays","mipData","length","mipSize","mipFaceData","removePendingData","onLoadedObservable","notifyObservers","clear","_loadFile","offlineProvider","request","exception","status","statusText","createRawTexture2DArray","createRawTexture3D","RawTexture","Texture","constructor","sceneOrEngine","super","_engine","_texture","wrapU","CLAMP_ADDRESSMODE","wrapV","update","_getEngine","clone","rawTexture","getSize","getScene","_invertY","_creationFlags","incrementReferences","CreateLuminanceTexture","TEXTUREFORMAT_LUMINANCE","CreateLuminanceAlphaTexture","TEXTUREFORMAT_LUMINANCE_ALPHA","CreateAlphaTexture","TEXTUREFORMAT_ALPHA","CreateRGBTexture","TEXTUREFORMAT_RGB","CreateRGBATexture","TEXTUREFORMAT_RGBA","CreateRGBAStorageTexture","TEXTUR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AAU,EAAOC,EAAenB,EAAUmH,+BAAgCnF,EAAOhC,EAAUqB,yBAA0BqD,EAAgB,EAAGL,GAAgB,GACzO,OAAO,IAAIkE,EAAWzH,EAAMnB,EAAOC,EAAQI,EAAUmK,mBAAoBzB,EAAezH,EAAiBC,EAASC,EAAca,EAAM0C,EAAeL,EACxJ,CAcD,+BAAO+F,CAAyBtJ,EAAMnB,EAAOC,EAAQ8I,EAAezH,GAAkB,EAAMC,GAAU,EAAOC,EAAenB,EAAUmH,+BAAgCnF,EAAOhC,EAAUqB,yBAA0BgD,GAAgB,GAC7N,OAAO,IAAIkE,EAAWzH,EAAMnB,EAAOC,EAAQI,EAAUmK,mBAAoBzB,EAAezH,EAAiBC,EAASC,EAAca,EAAMhC,EAAUqK,6BAA8BhG,EACjL,CAaD,qBAAOiG,CAAexJ,EAAMnB,EAAOC,EAAQ8I,EAAezH,GAAkB,EAAMC,GAAU,EAAOC,EAAeqH,EAAQ+B,uBAAwBvI,EAAOhC,EAAUC,mBAC/J,OAAO,IAAIsI,EAAWzH,EAAMnB,EAAOC,EAAQI,EAAUwK,gBAAiB9B,EAAezH,EAAiBC,EAASC,EAAca,EAChI,CAaD,4BAAOyI,CAAsB3J,EAAMnB,EAAOC,EAAQ8I,EAAezH,GAAkB,EAAMC,GAAU,EAAOC,EAAeqH,EAAQ+B,uBAAwBvI,EAAOhC,EAAUC,mBACtK,OAAO,IAAIsI,EAAWzH,EAAMnB,EAAOC,EAAQI,EAAUwK,gBAAiB9B,EAAezH,EAAiBC,EAASC,EAAca,EAAMhC,EAAUqK,6BAChJ"}
@@ -1,17 +0,0 @@
1
- import { S as ShaderStore } from './index-5EaMDaGg.esm.js';
2
- import './helperFunctions-CUKI67ax.esm.js';
3
-
4
- // Do not edit.
5
- const name = "rgbdDecodePixelShader";
6
- const shader = `varying vec2 vUV;uniform sampler2D textureSampler;
7
- #include<helperFunctions>
8
- #define CUSTOM_FRAGMENT_DEFINITIONS
9
- void main(void)
10
- {gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;
11
- // Sideeffect
12
- ShaderStore.ShadersStore[name] = shader;
13
- /** @internal */
14
- const rgbdDecodePixelShader = { name, shader };
15
-
16
- export { rgbdDecodePixelShader };
17
- //# sourceMappingURL=rgbdDecode.fragment-4VUd_LZa.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rgbdDecode.fragment-4VUd_LZa.esm.js","sources":["../../../../../dev/core/dist/Shaders/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,iEAAiE,CAAC,CAAC;AACnE;AACA,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC;AACY,MAAC,qBAAqB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
@@ -1,2 +0,0 @@
1
- import{S as e}from"./index-RwQCgcf4.esm.min.js";import"./helperFunctions-21b9-yGo.esm.min.js";const r="rgbdDecodePixelShader",n="varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}";e.ShadersStore[r]=n;const o={name:r,shader:n};export{o as rgbdDecodePixelShader};
2
- //# sourceMappingURL=rgbdDecode.fragment-B97s0YHK.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rgbdDecode.fragment-B97s0YHK.esm.min.js","sources":["../../../../../dev/core/dist/Shaders/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStore","rgbdDecodePixelShader"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,0MAMfC,EAAYC,aAAaH,GAAQC,EAErB,MAACG,EAAwB,CAAEJ,OAAMC"}
@@ -1,17 +0,0 @@
1
- import { S as ShaderStore } from './index-5EaMDaGg.esm.js';
2
- import './helperFunctions-COVDWwPu.esm.js';
3
-
4
- // Do not edit.
5
- const name = "rgbdDecodePixelShader";
6
- const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
7
- #include<helperFunctions>
8
- #define CUSTOM_FRAGMENT_DEFINITIONS
9
- @fragment
10
- fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;
11
- // Sideeffect
12
- ShaderStore.ShadersStoreWGSL[name] = shader;
13
- /** @internal */
14
- const rgbdDecodePixelShaderWGSL = { name, shader };
15
-
16
- export { rgbdDecodePixelShaderWGSL };
17
- //# sourceMappingURL=rgbdDecode.fragment-CgqRZDLm.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rgbdDecode.fragment-CgqRZDLm.esm.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,2JAA2J,CAAC,CAAC;AAC7J;AACA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C;AACY,MAAC,yBAAyB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
@@ -1,2 +0,0 @@
1
- import{S as e}from"./index-RwQCgcf4.esm.min.js";import"./helperFunctions-CQzJ5T38.esm.min.js";const r="rgbdDecodePixelShader",t="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}";e.ShadersStoreWGSL[r]=t;const n={name:r,shader:t};export{n as rgbdDecodePixelShaderWGSL};
2
- //# sourceMappingURL=rgbdDecode.fragment-DSa_xyAA.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rgbdDecode.fragment-DSa_xyAA.esm.min.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStoreWGSL","rgbdDecodePixelShaderWGSL"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,qUAMfC,EAAYC,iBAAiBH,GAAQC,EAEzB,MAACG,EAA4B,CAAEJ,OAAMC"}
@@ -1,17 +0,0 @@
1
- import { S as ShaderStore } from './index-5EaMDaGg.esm.js';
2
- import './helperFunctions-COVDWwPu.esm.js';
3
-
4
- // Do not edit.
5
- const name = "rgbdEncodePixelShader";
6
- const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
7
- #include<helperFunctions>
8
- #define CUSTOM_FRAGMENT_DEFINITIONS
9
- @fragment
10
- fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;
11
- // Sideeffect
12
- ShaderStore.ShadersStoreWGSL[name] = shader;
13
- /** @internal */
14
- const rgbdEncodePixelShaderWGSL = { name, shader };
15
-
16
- export { rgbdEncodePixelShaderWGSL };
17
- //# sourceMappingURL=rgbdEncode.fragment-C3-vIdKY.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rgbdEncode.fragment-C3-vIdKY.esm.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,kJAAkJ,CAAC,CAAC;AACpJ;AACA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C;AACY,MAAC,yBAAyB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
@@ -1,2 +0,0 @@
1
- import{S as e}from"./index-RwQCgcf4.esm.min.js";import"./helperFunctions-CQzJ5T38.esm.min.js";const r="rgbdEncodePixelShader",t="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}";e.ShadersStoreWGSL[r]=t;const n={name:r,shader:t};export{n as rgbdEncodePixelShaderWGSL};
2
- //# sourceMappingURL=rgbdEncode.fragment-CZ7DFmJC.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rgbdEncode.fragment-CZ7DFmJC.esm.min.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStoreWGSL","rgbdEncodePixelShaderWGSL"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,4TAMfC,EAAYC,iBAAiBH,GAAQC,EAEzB,MAACG,EAA4B,CAAEJ,OAAMC"}
@@ -1,2 +0,0 @@
1
- import{S as e}from"./index-RwQCgcf4.esm.min.js";import"./helperFunctions-21b9-yGo.esm.min.js";const r="rgbdEncodePixelShader",n="varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}";e.ShadersStore[r]=n;const o={name:r,shader:n};export{o as rgbdEncodePixelShader};
2
- //# sourceMappingURL=rgbdEncode.fragment-CnIc0eyH.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rgbdEncode.fragment-CnIc0eyH.esm.min.js","sources":["../../../../../dev/core/dist/Shaders/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStore","rgbdEncodePixelShader"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,kMAMfC,EAAYC,aAAaH,GAAQC,EAErB,MAACG,EAAwB,CAAEJ,OAAMC"}
@@ -1,17 +0,0 @@
1
- import { S as ShaderStore } from './index-5EaMDaGg.esm.js';
2
- import './helperFunctions-CUKI67ax.esm.js';
3
-
4
- // Do not edit.
5
- const name = "rgbdEncodePixelShader";
6
- const shader = `varying vec2 vUV;uniform sampler2D textureSampler;
7
- #include<helperFunctions>
8
- #define CUSTOM_FRAGMENT_DEFINITIONS
9
- void main(void)
10
- {gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;
11
- // Sideeffect
12
- ShaderStore.ShadersStore[name] = shader;
13
- /** @internal */
14
- const rgbdEncodePixelShader = { name, shader };
15
-
16
- export { rgbdEncodePixelShader };
17
- //# sourceMappingURL=rgbdEncode.fragment-DA8KkHQU.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rgbdEncode.fragment-DA8KkHQU.esm.js","sources":["../../../../../dev/core/dist/Shaders/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,yDAAyD,CAAC,CAAC;AAC3D;AACA,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC;AACY,MAAC,qBAAqB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
@@ -1,2 +0,0 @@
1
- import{S as t,R as e,l as i,m as s,n as r,o,p as n,q as a,s as c,t as l,u as h,B as u,v as d,w as p,x as m,i as _,M as f,y as g,j as x,z as y,D as T,h as v,L as w,k as b,V as P,Q as M,C as R,g as C,F as A,H as k,J as I,K as V,N as F,E as z,e as D,U as S,X as B,Y as U,Z as E,r as L}from"./index-RwQCgcf4.esm.min.js";import"./fogFragment-BLvD2fqs.esm.min.js";import"./logDepthDeclaration-Boz5U8vN.esm.min.js";import"./logDepthVertex-Da8gAKX-.esm.min.js";import{R as W}from"./rawTexture-Cb8Vzv3y.esm.min.js";import"./thinInstanceMesh-XV_b72vY.esm.min.js";import{A as Z}from"./assetContainer-Cu6LKJHz.esm.min.js";import{S as N}from"./standardMaterial-xLALVwqX.esm.min.js";t.ShadersStore.gaussianSplattingPixelShader="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nvarying vec4 vColor;varying vec2 vPosition;void main () { \n#include<clipPlaneFragment>\nfloat A=-dot(vPosition,vPosition);if (A<-4.0) discard;float B=exp(A)*vColor.a;\n#include<logDepthFragment>\nvec3 color=vColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\ngl_FragColor=vec4(color,B);}\n";t.IncludesShadersStore.gaussianSplattingVertexDeclaration="uniform mat4 world;uniform mat4 view;uniform mat4 projection;\n";t.IncludesShadersStore.gaussianSplattingUboDeclaration="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n";t.ShadersStore.gaussianSplattingVertexShader="#include<__decl__gaussianSplattingVertex>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute vec2 position;attribute float splatIndex;uniform vec2 invViewport;uniform vec2 dataTextureSize;uniform vec2 focal;uniform sampler2D covariancesATexture;uniform sampler2D covariancesBTexture;uniform sampler2D centersTexture;uniform sampler2D colorsTexture;varying vec4 vColor;varying vec2 vPosition;\n#if !defined(WEBGL2) && !defined(WEBGPU) && !defined(NATIVE)\nmat3 transpose(mat3 matrix) {return mat3(matrix[0][0],matrix[1][0],matrix[2][0],\nmatrix[0][1],matrix[1][1],matrix[2][1],\nmatrix[0][2],matrix[1][2],matrix[2][2]);}\n#endif\nvec2 getDataUV(float index,vec2 textureSize) {float y=floor(index/textureSize.x);float x=index-y*textureSize.x;return vec2((x+0.5)/textureSize.x,(y+0.5)/textureSize.y);}\nvoid main () {vec2 splatUV=getDataUV(splatIndex,dataTextureSize);vec3 center=texture2D(centersTexture,splatUV).xyz;vec4 color=texture2D(colorsTexture,splatUV);vec3 covA=texture2D(covariancesATexture,splatUV).xyz;vec3 covB=texture2D(covariancesBTexture,splatUV).xyz;vec4 worldPos=world*vec4(center,1.0);mat4 modelView=view*world;vec4 camspace=view*worldPos;vec4 pos2d=projection*camspace;float bounds=1.2*pos2d.w;if (pos2d.z<-pos2d.w || pos2d.x<-bounds || pos2d.x>bounds\n|| pos2d.y<-bounds || pos2d.y>bounds) {gl_Position=vec4(0.0,0.0,2.0,1.0);return;}\nmat3 Vrk=mat3(\ncovA.x,covA.y,covA.z,\ncovA.y,covB.x,covB.y,\ncovA.z,covB.y,covB.z\n);mat3 J=mat3(\nfocal.x/camspace.z,0.,-(focal.x*camspace.x)/(camspace.z*camspace.z),\n0.,focal.y/camspace.z,-(focal.y*camspace.y)/(camspace.z*camspace.z),\n0.,0.,0.\n);mat3 invy=mat3(1,0,0,0,-1,0,0,0,1);mat3 T=invy*transpose(mat3(modelView))*J;mat3 cov2d=transpose(T)*Vrk*T;float mid=(cov2d[0][0]+cov2d[1][1])/2.0;float radius=length(vec2((cov2d[0][0]-cov2d[1][1])/2.0,cov2d[0][1]));float lambda1=mid+radius,lambda2=mid-radius;if (lambda2<0.0) return;vec2 diagonalVector=normalize(vec2(cov2d[0][1],lambda1-cov2d[0][0]));vec2 majorAxis=min(sqrt(2.0*lambda1),1024.0)*diagonalVector;vec2 minorAxis=min(sqrt(2.0*lambda2),1024.0)*vec2(diagonalVector.y,-diagonalVector.x);vColor=color;vPosition=position;vec2 vCenter=vec2(pos2d);gl_Position=vec4(\nvCenter \n+ (position.x*majorAxis\n+ position.y*minorAxis)*invViewport*pos2d.w,pos2d.zw);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n";class O extends m{constructor(){super(),this.FOG=!1,this.THIN_INSTANCES=!0,this.LOGARITHMICDEPTH=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.rebuild()}}class G extends i{constructor(t,e){super(t,e),this.backFaceCulling=!1}get hasRenderTargetTextures(){return!1}needAlphaTesting(){return!1}needAlphaBlending(){return!0}isReadyForSubMesh(t,e){const i=!0,l=e._drawWrapper;if(l.effect&&this.isFrozen&&l._wasPreviouslyReady&&l._wasPreviouslyUsingInstances===i)return!0;e.materialDefines||(e.materialDefines=new O);const h=this.getScene(),u=e.materialDefines;if(this._isReadyForSubMesh(e))return!0;const d=h.getEngine();if(s(t,h,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,u),r(h,d,this,u,i,null,!0),o(t,u,!1,!1),u.isDirty){u.markAsProcessed(),h.resetCachedMaterial();const t=[_.PositionKind,"splatIndex"];n(t,u);const i=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal"],s=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture"],r=["Scene","Mesh"];a({uniformsNames:i,uniformBuffersNames:r,samplers:s,defines:u}),c(i);const o=u.toString(),l=h.getEngine().createEffect("gaussianSplatting",{attributes:t,uniformsNames:i,uniformBuffersNames:r,samplers:s,defines:o,onCompiled:this.onCompiled,onError:this.onError},d);e.setEffect(l,u,this._materialContext)}return!(!e.effect||!e.effect.isReady())&&(u._renderId=h.getRenderId(),l._wasPreviouslyReady=!0,l._wasPreviouslyUsingInstances=i,!0)}bindForSubMesh(t,e,i){const s=this.getScene(),r=i.materialDefines;if(!r)return;const o=i.effect;if(!o)return;this._activeEffect=o,e.getMeshUniformBuffer().bindToEffect(o,"Mesh"),e.transferToEffect(t);if(this._mustRebind(s,o,i,e.visibility)){this.bindView(o),this.bindViewProjection(o);const t=s.getEngine(),i=this.getScene().activeCamera,r=t.getRenderWidth(),n=t.getRenderHeight(),a=i?.rigParent?.rigCameras.length||1;this._activeEffect.setFloat2("invViewport",1/(r/a),1/n);let c=1e3;if(i){const t=i.getProjectionMatrix().m[5];c=i.fovMode==l.FOVMODE_VERTICAL_FIXED?n*t/2:r*t/2}this._activeEffect.setFloat2("focal",c,c);const u=e;if(u.covariancesATexture){const t=u.covariancesATexture.getSize();o.setFloat2("dataTextureSize",t.width,t.height),o.setTexture("covariancesATexture",u.covariancesATexture),o.setTexture("covariancesBTexture",u.covariancesBTexture),o.setTexture("centersTexture",u.centersTexture),o.setTexture("colorsTexture",u.colorsTexture)}h(o,this,s)}else s.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0);u(s,e,o),this.useLogarithmicDepth&&d(r,o,s),this._afterBind(e,this._activeEffect,i)}clone(t){return p.Clone((()=>new G(t,this.getScene())),this)}serialize(){const t=super.serialize();return t.customType="BABYLON.GaussianSplattingMaterial",t}getClassName(){return"GaussianSplattingMaterial"}static Parse(t,e,i){return p.Parse((()=>new G(t.name,e)),t,e,i)}}e("BABYLON.GaussianSplattingMaterial",G);class j extends f{get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}constructor(t,e=null,i=null,s=!1){super(t,i),this._vertexCount=0,this._worker=null,this._frameIdLastUpdate=-1,this._modelViewMatrix=g.Identity(),this._canPostToWorker=!0,this._readyToDisplay=!1,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._splatPositions=null,this._covariancesA=null,this._covariancesB=null,this._colors=null,this._keepInRam=!1;const r=new x;r.positions=[-2,-2,0,2,-2,0,2,2,0,-2,2,0],r.indices=[0,1,2,0,2,3],r.applyToMesh(this),this.subMeshes=[],new y(0,0,4,0,6,this),this.setEnabled(!1),this._lastModelViewMatrix=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this._keepInRam=s,e&&this.loadFileAsync(e),this.material=new G(this.name+"_material",this._scene)}getClassName(){return"GaussianSplattingMesh"}getTotalVertices(){return this._vertexCount}isReady(t=!1){return!!super.isReady(t,!0)&&(!!this._readyToDisplay||(this._postToWorker(),!1))}_postToWorker(){const t=this.getScene().getFrameId();if(t!==this._frameIdLastUpdate&&this._worker&&this._scene.activeCamera&&this._canPostToWorker){this.getWorldMatrix().multiplyToRef(this._scene.activeCamera.getViewMatrix(),this._modelViewMatrix),T.Vector3[0].set(this._lastModelViewMatrix[8],this._lastModelViewMatrix[9],this._lastModelViewMatrix[10]),T.Vector3[1].set(this._modelViewMatrix.m[8],this._modelViewMatrix.m[9],this._modelViewMatrix.m[10]),T.Vector3[0].normalize(),T.Vector3[1].normalize();const e=v.Dot(T.Vector3[0],T.Vector3[1]);Math.abs(e-1)>=.01&&(this._frameIdLastUpdate=t,this._canPostToWorker=!1,this._lastModelViewMatrix=this._modelViewMatrix.m.slice(0),this._worker.postMessage({view:this._modelViewMatrix.m,depthMix:this._depthMix,useRightHandedSystem:this._scene.useRightHandedSystem},[this._depthMix.buffer]))}}render(t,e,i){return this._postToWorker(),super.render(t,e,i)}static ConvertPLYToSplat(t){const e=new Uint8Array(t),i=(new TextDecoder).decode(e.slice(0,10240)),s="end_header\n",r=i.indexOf(s);if(r<0||!i)return t;const o=parseInt(/element vertex (\d+)\n/.exec(i)[1]);let n=0;const a={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1},c=[],l=i.slice(0,r).split("\n").filter((t=>t.startsWith("property ")));for(const t of l){const[,e,i]=t.split(" ");if(c.push({name:i,type:e,offset:n}),!a[e])return w.Error(`Unsupported property type: ${e}. Are you sure it's a valid Gaussian Splatting file?`),new ArrayBuffer(0);n+=a[e]}const h=.28209479177387814,u=new DataView(t,r+11),d=new ArrayBuffer(32*o),p=new M;for(let t=0;t<o;t++){const e=new Float32Array(d,32*t,3),i=new Float32Array(d,32*t+12,3),s=new Uint8ClampedArray(d,32*t+24,4),r=new Uint8ClampedArray(d,32*t+28,4);let o=255,a=0,l=0,m=0;for(let r=0;r<c.length;r++){const d=c[r];let p;switch(d.type){case"float":p=u.getFloat32(d.offset+t*n,!0);break;case"int":p=u.getInt32(d.offset+t*n,!0);break;default:throw new Error(`Unsupported property type: ${d.type}`)}switch(d.name){case"x":e[0]=p;break;case"y":e[1]=p;break;case"z":e[2]=p;break;case"scale_0":i[0]=Math.exp(p);break;case"scale_1":i[1]=Math.exp(p);break;case"scale_2":i[2]=Math.exp(p);break;case"red":s[0]=p;break;case"green":s[1]=p;break;case"blue":s[2]=p;break;case"f_dc_0":s[0]=255*(.5+h*p);break;case"f_dc_1":s[1]=255*(.5+h*p);break;case"f_dc_2":s[2]=255*(.5+h*p);break;case"f_dc_3":s[3]=255*(.5+h*p);break;case"opacity":s[3]=1/(1+Math.exp(-p))*255;break;case"rot_0":o=p;break;case"rot_1":a=p;break;case"rot_2":l=p;break;case"rot_3":m=p}}p.set(a,l,m,o),p.normalize(),r[0]=128*p.w+128,r[1]=128*p.x+128,r[2]=128*p.y+128,r[3]=128*p.z+128}return d}loadDataAsync(t){return Promise.resolve(this._loadData(t))}loadFileAsync(t){return b.LoadFileAsync(t,!0).then((t=>{this._loadData(j.ConvertPLYToSplat(t))}))}dispose(t){this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._worker?.terminate(),this._worker=null,super.dispose(t,!0)}_copyTextures(t){this._covariancesATexture=t.covariancesATexture?.clone(),this._covariancesBTexture=t.covariancesBTexture?.clone(),this._centersTexture=t.centersTexture?.clone(),this._colorsTexture=t.colorsTexture?.clone()}clone(t=""){const e=new j(t,void 0,this.getScene());e._copySource(this),e.makeGeometryUnique(),e._vertexCount=this._vertexCount,e._copyTextures(this),e._modelViewMatrix=g.Identity(),e._splatPositions=this._splatPositions,e._readyToDisplay=!1,e._instanciateWorker();const i=this.getBoundingInfo();return e.getBoundingInfo().reConstruct(i.minimum,i.maximum,this.getWorldMatrix()),e.forcedInstanceCount=e._vertexCount,e.setEnabled(!0),e}updateData(t){if(!t.byteLength)return;this._covariancesATexture||(this._readyToDisplay=!1);const e=new Uint8Array(t),i=new Float32Array(e.buffer),s=e.length/32;this._vertexCount=s;const r=this._getTextureSize(s),o=r.x*r.y;this._splatPositions=new Float32Array(3*o);const n=new Float32Array(3*o),a=new Float32Array(3*o),c=T.Matrix[0],l=T.Matrix[1],h=T.Quaternion[0],u=new v(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=new v(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let t=0;t<s;t++){const s=i[8*t+0],r=-i[8*t+1],o=i[8*t+2];this._splatPositions[3*t+0]=s,this._splatPositions[3*t+1]=r,this._splatPositions[3*t+2]=o,u.minimizeInPlaceFromFloats(s,r,o),d.maximizeInPlaceFromFloats(s,r,o),h.set((e[32*t+28+1]-128)/128,(e[32*t+28+2]-128)/128,(e[32*t+28+3]-128)/128,-(e[32*t+28+0]-128)/128),h.toRotationMatrix(c),g.ScalingToRef(2*i[8*t+3+0],2*i[8*t+3+1],2*i[8*t+3+2],l);const p=c.multiplyToRef(l,T.Matrix[0]).m;n[3*t+0]=p[0]*p[0]+p[1]*p[1]+p[2]*p[2],n[3*t+1]=p[0]*p[4]+p[1]*p[5]+p[2]*p[6],n[3*t+2]=p[0]*p[8]+p[1]*p[9]+p[2]*p[10],a[3*t+0]=p[4]*p[4]+p[5]*p[5]+p[6]*p[6],a[3*t+1]=p[4]*p[8]+p[5]*p[9]+p[6]*p[10],a[3*t+2]=p[8]*p[8]+p[9]*p[9]+p[10]*p[10]}this.getBoundingInfo().reConstruct(u,d,this.getWorldMatrix()),this.forcedInstanceCount=this._vertexCount,this.setEnabled(!0);const p=(t,e,i,s)=>new W(t,e,i,s,this._scene,!1,!1,R.TEXTURE_BILINEAR_SAMPLINGMODE,R.TEXTURETYPE_FLOAT),m=(t,e,i,s)=>{this.getEngine().updateTextureData(t.getInternalTexture(),e,0,0,i,s,0,0,!1)},_=t=>{const e=t.length/3,i=new Float32Array(4*e);for(let s=0;s<e;++s)i[4*s+0]=t[3*s+0],i[4*s+1]=t[3*s+1],i[4*s+2]=t[3*s+2],i[4*s+3]=1;return i},f=new Float32Array(r.x*r.y*4);for(let t=0;t<this._vertexCount;++t)f[4*t+0]=e[32*t+24+0]/255,f[4*t+1]=e[32*t+24+1]/255,f[4*t+2]=e[32*t+24+2]/255,f[4*t+3]=e[32*t+24+3]/255;this._keepInRam&&(this._covariancesA=n,this._covariancesB=a,this._colors=f),this._covariancesATexture?(m(this._covariancesATexture,_(n),r.x,r.y),m(this._covariancesBTexture,_(a),r.x,r.y),m(this._centersTexture,_(this._splatPositions),r.x,r.y),m(this._colorsTexture,f,r.x,r.y)):(this._covariancesATexture=p(_(n),r.x,r.y,R.TEXTUREFORMAT_RGBA),this._covariancesBTexture=p(_(a),r.x,r.y,R.TEXTUREFORMAT_RGBA),this._centersTexture=p(_(this._splatPositions),r.x,r.y,R.TEXTUREFORMAT_RGBA),this._colorsTexture=p(f,r.x,r.y,R.TEXTUREFORMAT_RGBA),this._instanciateWorker())}_loadData(t){t.byteLength&&this.updateData(t)}_instanciateWorker(){if(!this._vertexCount)return;const t=new Float32Array(this._vertexCount);this.thinInstanceSetBuffer("splatIndex",t,1,!1),this._worker?.terminate(),this._worker=new Worker(URL.createObjectURL(new Blob(["(",j._CreateWorker.toString(),")(self)"],{type:"application/javascript"}))),this._depthMix=new BigInt64Array(this._vertexCount);const e=Float32Array.from(this._splatPositions),i=this._vertexCount;this._worker.postMessage({positions:e,vertexCount:i},[e.buffer]),this._worker.onmessage=e=>{this._depthMix=e.data.depthMix;const i=new Uint32Array(e.data.depthMix.buffer);for(let e=0;e<this._vertexCount;e++)t[e]=i[2*e];this.thinInstanceBufferUpdated("splatIndex"),this._canPostToWorker=!0,this._readyToDisplay=!0}}_getTextureSize(t){const e=this._scene.getEngine(),i=e.getCaps().maxTextureSize;let s=1;if(1!==e.version||e.isWebGPU)s=Math.ceil(t/i);else for(;i*s<t;)s*=2;return s>i&&(w.Error("GaussianSplatting texture size: ("+i+", "+s+"), maxTextureSize: "+i),s=i),new P(i,s)}}j._CreateWorker=function(t){let e,i,s,r,o=0;t.onmessage=n=>{if(n.data.positions)e=n.data.positions,o=n.data.vertexCount;else{const a=n.data.view;if(!e||!a)throw new Error("positions or view is not defined!");i=n.data.depthMix,s=new Uint32Array(i.buffer),r=new Float32Array(i.buffer);for(let t=0;t<o;t++)s[2*t]=t;let c=-1;n.data.useRightHandedSystem&&(c=1);for(let t=0;t<o;t++)r[2*t+1]=1e4+(a[2]*e[3*t+0]+a[6]*e[3*t+1]+a[10]*e[3*t+2])*c;i.sort(),t.postMessage({depthMix:i},[i.buffer])}}};class H{constructor(t,e,i,s,r){this.idx=0,this.color=new C(1,1,1,1),this.position=v.Zero(),this.rotation=v.Zero(),this.uv=new P(0,0),this.velocity=v.Zero(),this.pivot=v.Zero(),this.translateFromPivot=!1,this._pos=0,this._ind=0,this.groupId=0,this.idxInGroup=0,this._stillInvisible=!1,this._rotationMatrix=[1,0,0,0,1,0,0,0,1],this.parentId=null,this._globalPosition=v.Zero(),this.idx=t,this._group=e,this.groupId=i,this.idxInGroup=s,this._pcs=r}get size(){return this.size}set size(t){this.size=t}get quaternion(){return this.rotationQuaternion}set quaternion(t){this.rotationQuaternion=t}intersectsMesh(t,e){if(!t.hasBoundingInfo)return!1;if(!this._pcs.mesh)throw new Error("Point Cloud System doesnt contain the Mesh");if(e)return t.getBoundingInfo().boundingSphere.intersectsPoint(this.position.add(this._pcs.mesh.position));const i=t.getBoundingInfo().boundingBox,s=i.maximumWorld.x,r=i.minimumWorld.x,o=i.maximumWorld.y,n=i.minimumWorld.y,a=i.maximumWorld.z,c=i.minimumWorld.z,l=this.position.x+this._pcs.mesh.position.x,h=this.position.y+this._pcs.mesh.position.y,u=this.position.z+this._pcs.mesh.position.z;return r<=l&&l<=s&&n<=h&&h<=o&&c<=u&&u<=a}getRotationMatrix(t){let e;if(this.rotationQuaternion)e=this.rotationQuaternion;else{e=T.Quaternion[0];const t=this.rotation;M.RotationYawPitchRollToRef(t.y,t.x,t.z,e)}e.toRotationMatrix(t)}}class X{get groupID(){return this.groupId}set groupID(t){this.groupId=t}constructor(t,e){this.groupId=t,this._positionFunction=e}}class K{constructor(t,e,i=Number.MAX_VALUE,s=V){this.origin=t,this.direction=e,this.length=i,this.epsilon=s}clone(){return new K(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(t,e,i=0){const s=K._TmpVector3[0].copyFromFloats(t.x-i,t.y-i,t.z-i),r=K._TmpVector3[1].copyFromFloats(e.x+i,e.y+i,e.z+i);let o,n,a,c,l=0,h=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<s.x||this.origin.x>r.x)return!1}else if(o=1/this.direction.x,n=(s.x-this.origin.x)*o,a=(r.x-this.origin.x)*o,a===-1/0&&(a=1/0),n>a&&(c=n,n=a,a=c),l=Math.max(n,l),h=Math.min(a,h),l>h)return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<s.y||this.origin.y>r.y)return!1}else if(o=1/this.direction.y,n=(s.y-this.origin.y)*o,a=(r.y-this.origin.y)*o,a===-1/0&&(a=1/0),n>a&&(c=n,n=a,a=c),l=Math.max(n,l),h=Math.min(a,h),l>h)return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<s.z||this.origin.z>r.z)return!1}else if(o=1/this.direction.z,n=(s.z-this.origin.z)*o,a=(r.z-this.origin.z)*o,a===-1/0&&(a=1/0),n>a&&(c=n,n=a,a=c),l=Math.max(n,l),h=Math.min(a,h),l>h)return!1;return!0}intersectsBox(t,e=0){return this.intersectsBoxMinMax(t.minimum,t.maximum,e)}intersectsSphere(t,e=0){const i=t.center.x-this.origin.x,s=t.center.y-this.origin.y,r=t.center.z-this.origin.z,o=i*i+s*s+r*r,n=t.radius+e,a=n*n;if(o<=a)return!0;const c=i*this.direction.x+s*this.direction.y+r*this.direction.z;if(c<0)return!1;return o-c*c<=a}intersectsTriangle(t,e,i){const s=K._TmpVector3[0],r=K._TmpVector3[1],o=K._TmpVector3[2],n=K._TmpVector3[3],a=K._TmpVector3[4];e.subtractToRef(t,s),i.subtractToRef(t,r),v.CrossToRef(this.direction,r,o);const c=v.Dot(s,o);if(0===c)return null;const l=1/c;this.origin.subtractToRef(t,n);const h=v.Dot(n,o)*l;if(h<-this.epsilon||h>1+this.epsilon)return null;v.CrossToRef(n,s,a);const u=v.Dot(this.direction,a)*l;if(u<-this.epsilon||h+u>1+this.epsilon)return null;const d=v.Dot(r,a)*l;return d>this.length?null:new F(1-h-u,h,d)}intersectsPlane(t){let e;const i=v.Dot(t.normal,this.direction);if(Math.abs(i)<9.99999997475243e-7)return null;{const s=v.Dot(t.normal,this.origin);return e=(-t.d-s)/i,e<0?e<-9.99999997475243e-7?null:0:e}}intersectsAxis(t,e=0){switch(t){case"y":{const t=(this.origin.y-e)/this.direction.y;return t>0?null:new v(this.origin.x+this.direction.x*-t,e,this.origin.z+this.direction.z*-t)}case"x":{const t=(this.origin.x-e)/this.direction.x;return t>0?null:new v(e,this.origin.y+this.direction.y*-t,this.origin.z+this.direction.z*-t)}case"z":{const t=(this.origin.z-e)/this.direction.z;return t>0?null:new v(this.origin.x+this.direction.x*-t,this.origin.y+this.direction.y*-t,e)}default:return null}}intersectsMesh(t,e,i,s=!1,r,o=!1){const n=T.Matrix[0];return t.getWorldMatrix().invertToRef(n),this._tmpRay?K.TransformToRef(this,n,this._tmpRay):this._tmpRay=K.Transform(this,n),t.intersects(this._tmpRay,e,i,s,r,o)}intersectsMeshes(t,e,i){i?i.length=0:i=[];for(let s=0;s<t.length;s++){const r=this.intersectsMesh(t[s],e);r.hit&&i.push(r)}return i.sort(this._comparePickingInfo),i}_comparePickingInfo(t,e){return t.distance<e.distance?-1:t.distance>e.distance?1:0}intersectionSegment(t,e,i){const s=this.origin,r=T.Vector3[0],o=T.Vector3[1],n=T.Vector3[2],a=T.Vector3[3];e.subtractToRef(t,r),this.direction.scaleToRef(K._Rayl,n),s.addToRef(n,o),t.subtractToRef(s,a);const c=v.Dot(r,r),l=v.Dot(r,n),h=v.Dot(n,n),u=v.Dot(r,a),d=v.Dot(n,a),p=c*h-l*l;let m,_,f=p,g=p;p<K._Smallnum?(m=0,f=1,_=d,g=h):(m=l*d-h*u,_=c*d-l*u,m<0?(m=0,_=d,g=h):m>f&&(m=f,_=d+l,g=h)),_<0?(_=0,-u<0?m=0:-u>c?m=f:(m=-u,f=c)):_>g&&(_=g,-u+l<0?m=0:-u+l>c?m=f:(m=-u+l,f=c));const x=Math.abs(m)<K._Smallnum?0:m/f,y=Math.abs(_)<K._Smallnum?0:_/g,w=T.Vector3[4];n.scaleToRef(y,w);const b=T.Vector3[5];r.scaleToRef(x,b),b.addInPlace(a);const P=T.Vector3[6];b.subtractToRef(w,P);return y>0&&y<=this.length&&P.lengthSquared()<i*i?b.length():-1}update(t,e,i,s,r,o,n,a=!1){if(a){K._RayDistant||(K._RayDistant=K.Zero()),K._RayDistant.unprojectRayToRef(t,e,i,s,g.IdentityReadOnly,o,n);const a=T.Matrix[0];r.invertToRef(a),K.TransformToRef(K._RayDistant,a,this)}else this.unprojectRayToRef(t,e,i,s,r,o,n);return this}static Zero(){return new K(v.Zero(),v.Zero())}static CreateNew(t,e,i,s,r,o,n){return K.Zero().update(t,e,i,s,r,o,n)}static CreateNewFromTo(t,e,i=g.IdentityReadOnly){const s=new K(new v(0,0,0),new v(0,0,0));return K.CreateFromToToRef(t,e,s,i)}static CreateFromToToRef(t,e,i,s=g.IdentityReadOnly){i.origin.copyFrom(t);const r=e.subtractToRef(t,i.direction),o=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);return i.length=o,i.direction.normalize(),K.TransformToRef(i,s,i)}static Transform(t,e){const i=new K(new v(0,0,0),new v(0,0,0));return K.TransformToRef(t,e,i),i}static TransformToRef(t,e,i){v.TransformCoordinatesToRef(t.origin,e,i.origin),v.TransformNormalToRef(t.direction,e,i.direction),i.length=t.length,i.epsilon=t.epsilon;const s=i.direction,r=s.length();if(0!==r&&1!==r){const t=1/r;s.x*=t,s.y*=t,s.z*=t,i.length*=r}return i}unprojectRayToRef(t,e,i,s,r,o,n){const a=T.Matrix[0];r.multiplyToRef(o,a),a.multiplyToRef(n,a),a.invert();const c=z.LastCreatedEngine,l=T.Vector3[0];l.x=t/i*2-1,l.y=-(e/s*2-1),l.z=c?.useReverseDepthBuffer?1:c?.isNDCHalfZRange?0:-1;const h=T.Vector3[1].copyFromFloats(l.x,l.y,1-1e-8),u=T.Vector3[2],d=T.Vector3[3];v._UnprojectFromInvertedMatrixToRef(l,a,u),v._UnprojectFromInvertedMatrixToRef(h,a,d),this.origin.copyFrom(u),d.subtractToRef(u,this.direction),this.direction.normalize()}}var Y,q;K._TmpVector3=A(6,v.Zero),K._RayDistant=K.Zero(),K._Smallnum=1e-8,K._Rayl=1e9,k.prototype.createPickingRay=function(t,e,i,s,r=!1){const o=K.Zero();return this.createPickingRayToRef(t,e,i,o,s,r),o},k.prototype.createPickingRayToRef=function(t,e,i,s,r,o=!1,n=!1){const a=this.getEngine();if(!r&&!(r=this.activeCamera))return this;const c=r.viewport,l=a.getRenderHeight(),{x:h,y:u,width:d,height:p}=c.toGlobal(a.getRenderWidth(),l),m=1/a.getHardwareScalingLevel();return t=t*m-h,e=e*m-(l-u-p),s.update(t,e,d,p,i||g.IdentityReadOnly,o?g.IdentityReadOnly:r.getViewMatrix(),r.getProjectionMatrix(),n),this},k.prototype.createPickingRayInCameraSpace=function(t,e,i){const s=K.Zero();return this.createPickingRayInCameraSpaceToRef(t,e,s,i),s},k.prototype.createPickingRayInCameraSpaceToRef=function(t,e,i,s){if(!I)return this;const r=this.getEngine();if(!s&&!(s=this.activeCamera))throw new Error("Active camera not set");const o=s.viewport,n=r.getRenderHeight(),{x:a,y:c,width:l,height:h}=o.toGlobal(r.getRenderWidth(),n),u=g.Identity(),d=1/r.getHardwareScalingLevel();return t=t*d-a,e=e*d-(n-c-h),i.update(t,e,l,h,u,u,s.getProjectionMatrix()),this},k.prototype._internalPickForMesh=function(t,e,i,s,r,o,n,a){const c=e(s,i.enableDistantPicking),l=i.intersects(c,r,n,o,s,a);return l&&l.hit?!r&&null!=t&&l.distance>=t.distance?null:l:null},k.prototype._internalPick=function(t,e,i,s,r){let o=null;const n=!!(this.activeCameras&&this.activeCameras.length>1&&this.cameraToUseForPointers!==this.activeCamera),a=this.cameraToUseForPointers||this.activeCamera;for(let c=0;c<this.meshes.length;c++){const l=this.meshes[c];if(e){if(!e(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;const h=n&&l.isWorldMatrixCameraDependent(),u=l.computeWorldMatrix(h,a);if(l.hasThinInstances&&l.thinInstanceEnablePicking){const n=this._internalPickForMesh(o,t,l,u,!0,!0,r);if(n){if(s)return n;const a=T.Matrix[1],c=l.thinInstanceGetWorldMatrices();for(let n=0;n<c.length;n++){if(e&&!e(l,n))continue;c[n].multiplyToRef(u,a);const h=this._internalPickForMesh(o,t,l,a,i,s,r,!0);if(h&&(o=h,o.thinInstanceIndex=n,i))return o}}}else{const e=this._internalPickForMesh(o,t,l,u,i,s,r);if(e&&(o=e,i))return o}}return o||new I},k.prototype._internalMultiPick=function(t,e,i){if(!I)return null;const s=[],r=!!(this.activeCameras&&this.activeCameras.length>1&&this.cameraToUseForPointers!==this.activeCamera),o=this.cameraToUseForPointers||this.activeCamera;for(let n=0;n<this.meshes.length;n++){const a=this.meshes[n];if(e){if(!e(a,-1))continue}else if(!a.isEnabled()||!a.isVisible||!a.isPickable)continue;const c=r&&a.isWorldMatrixCameraDependent(),l=a.computeWorldMatrix(c,o);if(a.hasThinInstances&&a.thinInstanceEnablePicking){if(this._internalPickForMesh(null,t,a,l,!0,!0,i)){const r=T.Matrix[1],o=a.thinInstanceGetWorldMatrices();for(let n=0;n<o.length;n++){if(e&&!e(a,n))continue;o[n].multiplyToRef(l,r);const c=this._internalPickForMesh(null,t,a,r,!1,!1,i,!0);c&&(c.thinInstanceIndex=n,s.push(c))}}}else{const e=this._internalPickForMesh(null,t,a,l,!1,!1,i);e&&s.push(e)}}return s},k.prototype.pickWithBoundingInfo=function(t,e,i,s,r){if(!I)return null;const o=this._internalPick((i=>(this._tempPickingRay||(this._tempPickingRay=K.Zero()),this.createPickingRayToRef(t,e,i,this._tempPickingRay,r||null),this._tempPickingRay)),i,s,!0);return o&&(o.ray=this.createPickingRay(t,e,g.Identity(),r||null)),o},Object.defineProperty(k.prototype,"_pickingAvailable",{get:()=>!0,enumerable:!1,configurable:!1}),k.prototype.pick=function(t,e,i,s,r,o,n=!1){const a=this._internalPick(((i,s)=>(this._tempPickingRay||(this._tempPickingRay=K.Zero()),this.createPickingRayToRef(t,e,i,this._tempPickingRay,r||null,!1,s),this._tempPickingRay)),i,s,!1,o);return a&&(a.ray=this.createPickingRay(t,e,g.Identity(),r||null)),a},k.prototype.pickWithRay=function(t,e,i,s){const r=this._internalPick((e=>(this._pickWithRayInverseMatrix||(this._pickWithRayInverseMatrix=g.Identity()),e.invertToRef(this._pickWithRayInverseMatrix),this._cachedRayForTransform||(this._cachedRayForTransform=K.Zero()),K.TransformToRef(t,this._pickWithRayInverseMatrix,this._cachedRayForTransform),this._cachedRayForTransform)),e,i,!1,s);return r&&(r.ray=t),r},k.prototype.multiPick=function(t,e,i,s,r){return this._internalMultiPick((i=>this.createPickingRay(t,e,i,s||null)),i,r)},k.prototype.multiPickWithRay=function(t,e,i){return this._internalMultiPick((e=>(this._pickWithRayInverseMatrix||(this._pickWithRayInverseMatrix=g.Identity()),e.invertToRef(this._pickWithRayInverseMatrix),this._cachedRayForTransform||(this._cachedRayForTransform=K.Zero()),K.TransformToRef(t,this._pickWithRayInverseMatrix,this._cachedRayForTransform),this._cachedRayForTransform)),e,i)},l.prototype.getForwardRay=function(t=100,e,i){return this.getForwardRayToRef(new K(v.Zero(),v.Zero(),t),t,e,i)},l.prototype.getForwardRayToRef=function(t,e=100,i,s){i||(i=this.getWorldMatrix()),t.length=e,s?t.origin.copyFrom(s):t.origin.copyFrom(this.position);const r=T.Vector3[2];r.set(0,0,this._scene.useRightHandedSystem?-1:1);const o=T.Vector3[3];return v.TransformNormalToRef(r,i,o),v.NormalizeToRef(o,t.direction),t},function(t){t[t.Color=2]="Color",t[t.UV=1]="UV",t[t.Random=0]="Random",t[t.Stated=3]="Stated"}(Y||(Y={}));class Q{get positions(){return this._positions32}get colors(){return this._colors32}get uvs(){return this._uvs32}constructor(t,e,i,s){this.particles=new Array,this.nbParticles=0,this.counter=0,this.vars={},this._promises=[],this._positions=new Array,this._indices=new Array,this._normals=new Array,this._colors=new Array,this._uvs=new Array,this._updatable=!0,this._isVisibilityBoxLocked=!1,this._alwaysVisible=!1,this._groups=new Array,this._groupCounter=0,this._computeParticleColor=!0,this._computeParticleTexture=!0,this._computeParticleRotation=!0,this._computeBoundingBox=!1,this._isReady=!1,this.name=t,this._size=e,this._scene=i||z.LastCreatedScene,s&&void 0!==s.updatable?this._updatable=s.updatable:this._updatable=!0}buildMeshAsync(t){return Promise.all(this._promises).then((()=>(this._isReady=!0,this._buildMesh(t))))}_buildMesh(t){0===this.nbParticles&&this.addPoints(1),this._positions32=new Float32Array(this._positions),this._uvs32=new Float32Array(this._uvs),this._colors32=new Float32Array(this._colors);const e=new x;e.set(this._positions32,_.PositionKind),this._uvs32.length>0&&e.set(this._uvs32,_.UVKind);let i=0;this._colors32.length>0&&(i=1,e.set(this._colors32,_.ColorKind));const s=new f(this.name,this._scene);e.applyToMesh(s,this._updatable),this.mesh=s,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);let r=t;return r||(r=new N("point cloud material",this._scene),r.emissiveColor=new D(i,i,i),r.disableLighting=!0,r.pointsCloud=!0,r.pointSize=this._size),s.material=r,new Promise((t=>t(s)))}_addParticle(t,e,i,s){const r=new H(t,e,i,s,this);return this.particles.push(r),r}_randomUnitVector(t){t.position=new v(Math.random(),Math.random(),Math.random()),t.color=new C(1,1,1,1)}_getColorIndicesForCoord(t,e,i,s){const r=t._groupImageData,o=i*(4*s)+4*e,n=[o,o+1,o+2,o+3],a=n[1],c=n[2],l=n[3],h=r[n[0]],u=r[a],d=r[c],p=r[l];return new C(h/255,u/255,d/255,p)}_setPointsColorOrUV(t,e,i,s,r,o,n,a){a=a??0,i&&t.updateFacetData();const c=2*t.getBoundingInfo().boundingSphere.radius;let l=t.getVerticesData(_.PositionKind);const h=t.getIndices(),u=t.getVerticesData(_.UVKind+(a?a+1:"")),d=t.getVerticesData(_.ColorKind),p=v.Zero();t.computeWorldMatrix();const m=t.getWorldMatrix();if(!m.isIdentity()){l=l.slice(0);for(let t=0;t<l.length/3;t++)v.TransformCoordinatesFromFloatsToRef(l[3*t],l[3*t+1],l[3*t+2],m,p),l[3*t]=p.x,l[3*t+1]=p.y,l[3*t+2]=p.z}let f=0,g=0,x=0,y=0,T=0,w=0,b=0,M=0,R=0,A=0,k=0,I=0,V=0;const F=v.Zero(),z=v.Zero(),U=v.Zero(),E=v.Zero(),L=v.Zero();let W=0,Z=0,N=0,O=0,G=0,j=0;const H=P.Zero(),X=P.Zero(),Y=P.Zero(),q=P.Zero(),Q=P.Zero();let $=0,J=0,tt=0,et=0,it=0,st=0,rt=0,ot=0,nt=0,at=0,ct=0,lt=0;const ht=S.Zero(),ut=S.Zero(),dt=S.Zero(),pt=S.Zero(),mt=S.Zero();let _t,ft,gt=0,xt=0;n=n||0;let yt=new S(0,0,0,0),Tt=v.Zero(),vt=v.Zero(),wt=v.Zero(),bt=0,Pt=v.Zero(),Mt=0,Rt=0;const Ct=new K(v.Zero(),new v(1,0,0));let At,kt=v.Zero();for(let a=0;a<h.length/3;a++){let p,m,_,P,S,K,It,Vt;g=h[3*a],x=h[3*a+1],y=h[3*a+2],T=l[3*g],w=l[3*g+1],b=l[3*g+2],M=l[3*x],R=l[3*x+1],A=l[3*x+2],k=l[3*y],I=l[3*y+1],V=l[3*y+2],F.set(T,w,b),z.set(M,R,A),U.set(k,I,V),z.subtractToRef(F,E),U.subtractToRef(z,L),u&&(W=u[2*g],Z=u[2*g+1],N=u[2*x],O=u[2*x+1],G=u[2*y],j=u[2*y+1],H.set(W,Z),X.set(N,O),Y.set(G,j),X.subtractToRef(H,q),Y.subtractToRef(X,Q)),d&&s&&($=d[4*g],J=d[4*g+1],tt=d[4*g+2],et=d[4*g+3],it=d[4*x],st=d[4*x+1],rt=d[4*x+2],ot=d[4*x+3],nt=d[4*y],at=d[4*y+1],ct=d[4*y+2],lt=d[4*y+3],ht.set($,J,tt,et),ut.set(it,st,rt,ot),dt.set(nt,at,ct,lt),ut.subtractToRef(ht,pt),dt.subtractToRef(ut,mt));const Ft=new D(0,0,0),zt=new D(0,0,0);let Dt,St;for(let l=0;l<e._groupDensity[a];l++)f=this.particles.length,this._addParticle(f,e,this._groupCounter,a+l),St=this.particles[f],gt=Math.sqrt(B(0,1)),xt=B(0,1),_t=F.add(E.scale(gt)).add(L.scale(gt*xt)),i&&(Tt=t.getFacetNormal(a).normalize().scale(-1),vt=E.clone().normalize(),wt=v.Cross(Tt,vt),bt=B(0,2*Math.PI),Pt=vt.scale(Math.cos(bt)).add(wt.scale(Math.sin(bt))),bt=B(.1,Math.PI/2),kt=Pt.scale(Math.cos(bt)).add(Tt.scale(Math.sin(bt))),Ct.origin=_t.add(kt.scale(1e-5)),Ct.direction=kt,Ct.length=c,At=Ct.intersectsMesh(t),At.hit&&(Rt=At.pickedPoint.subtract(_t).length(),Mt=B(0,1)*Rt,_t.addInPlace(kt.scale(Mt)))),St.position=_t.clone(),this._positions.push(St.position.x,St.position.y,St.position.z),void 0!==s?u&&(ft=H.add(q.scale(gt)).add(Q.scale(gt*xt)),s?r&&null!==e._groupImageData?(p=e._groupImgWidth,m=e._groupImgHeight,Dt=this._getColorIndicesForCoord(e,Math.round(ft.x*p),Math.round(ft.y*m),p),St.color=Dt,this._colors.push(Dt.r,Dt.g,Dt.b,Dt.a)):d?(yt=ht.add(pt.scale(gt)).add(mt.scale(gt*xt)),St.color=new C(yt.x,yt.y,yt.z,yt.w),this._colors.push(yt.x,yt.y,yt.z,yt.w)):(yt=ht.set(Math.random(),Math.random(),Math.random(),1),St.color=new C(yt.x,yt.y,yt.z,yt.w),this._colors.push(yt.x,yt.y,yt.z,yt.w)):(St.uv=ft.clone(),this._uvs.push(St.uv.x,St.uv.y))):(o?(Ft.set(o.r,o.g,o.b),_=B(-n,n),P=B(-n,n),Vt=Ft.toHSV(),S=Vt.r,K=Vt.g+_,It=Vt.b+P,K<0&&(K=0),K>1&&(K=1),It<0&&(It=0),It>1&&(It=1),D.HSVtoRGBToRef(S,K,It,zt),yt.set(zt.r,zt.g,zt.b,1)):yt=ht.set(Math.random(),Math.random(),Math.random(),1),St.color=new C(yt.x,yt.y,yt.z,yt.w),this._colors.push(yt.x,yt.y,yt.z,yt.w))}}_colorFromTexture(t,e,i){if(null===t.material)return w.Warn(t.name+"has no material."),e._groupImageData=null,void this._setPointsColorOrUV(t,e,i,!0,!1);const s=t.material.getActiveTextures();if(0===s.length)return w.Warn(t.name+"has no usable texture."),e._groupImageData=null,void this._setPointsColorOrUV(t,e,i,!0,!1);const r=t.clone();r.setEnabled(!1),this._promises.push(new Promise((t=>{U.WhenAllReady(s,(()=>{let o=e._textureNb;o<0&&(o=0),o>s.length-1&&(o=s.length-1);const n=()=>{e._groupImgWidth=s[o].getSize().width,e._groupImgHeight=s[o].getSize().height,this._setPointsColorOrUV(r,e,i,!0,!0,void 0,void 0,s[o].coordinatesIndex),r.dispose(),t()};e._groupImageData=null;const a=s[o].readPixels();a?a.then((t=>{e._groupImageData=t,n()})):n()}))})))}_calculateDensity(t,e,i){let s,r,o,n,a,c,l,h,u,d,p,m;const _=v.Zero(),f=v.Zero(),g=v.Zero(),x=v.Zero(),y=v.Zero(),T=v.Zero();let w;const b=[];let P=0;const M=i.length/3;for(let t=0;t<M;t++)s=i[3*t],r=i[3*t+1],o=i[3*t+2],n=e[3*s],a=e[3*s+1],c=e[3*s+2],l=e[3*r],h=e[3*r+1],u=e[3*r+2],d=e[3*o],p=e[3*o+1],m=e[3*o+2],_.set(n,a,c),f.set(l,h,u),g.set(d,p,m),f.subtractToRef(_,x),g.subtractToRef(f,y),v.CrossToRef(x,y,T),w=.5*T.length(),P+=w,b[t]=P;const R=new Array(M);let C=t;for(let t=M-1;t>0;t--){const e=b[t];if(0===e)R[t]=0;else{const i=(e-b[t-1])/e*C,s=Math.floor(i),r=i-s,o=s+Number(Math.random()<r);R[t]=o,C-=o}}return R[0]=C,R}addPoints(t,e=this._randomUnitVector){const i=new X(this._groupCounter,e);let s,r=this.nbParticles;for(let e=0;e<t;e++)s=this._addParticle(r,i,this._groupCounter,e),i&&i._positionFunction&&i._positionFunction(s,r,e),this._positions.push(s.position.x,s.position.y,s.position.z),s.color&&this._colors.push(s.color.r,s.color.g,s.color.b,s.color.a),s.uv&&this._uvs.push(s.uv.x,s.uv.y),r++;return this.nbParticles+=t,this._groupCounter++,this._groupCounter}addSurfacePoints(t,e,i,s,r){let o=i||0;(isNaN(o)||o<0||o>3)&&(o=0);const n=t.getVerticesData(_.PositionKind),a=t.getIndices();this._groups.push(this._groupCounter);const c=new X(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(e,n,a),2===o?c._textureNb=s||0:s=s||new C(1,1,1,1),o){case 2:this._colorFromTexture(t,c,!1);break;case 1:this._setPointsColorOrUV(t,c,!1,!1,!1);break;case 0:this._setPointsColorOrUV(t,c,!1);break;case 3:this._setPointsColorOrUV(t,c,!1,void 0,void 0,s,r)}return this.nbParticles+=e,this._groupCounter++,this._groupCounter-1}addVolumePoints(t,e,i,s,r){let o=i||0;(isNaN(o)||o<0||o>3)&&(o=0);const n=t.getVerticesData(_.PositionKind),a=t.getIndices();this._groups.push(this._groupCounter);const c=new X(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(e,n,a),2===o?c._textureNb=s||0:s=s||new C(1,1,1,1),o){case 2:this._colorFromTexture(t,c,!0);break;case 1:this._setPointsColorOrUV(t,c,!0,!1,!1);break;case 0:this._setPointsColorOrUV(t,c,!0);break;case 3:this._setPointsColorOrUV(t,c,!0,void 0,void 0,s,r)}return this.nbParticles+=e,this._groupCounter++,this._groupCounter-1}setParticles(t=0,e=this.nbParticles-1,i=!0){if(!this._updatable||!this._isReady)return this;this.beforeUpdateParticles(t,e,i);const s=T.Matrix[0],r=this.mesh,o=this._colors32,n=this._positions32,a=this._uvs32,c=T.Vector3,l=c[5].copyFromFloats(1,0,0),h=c[6].copyFromFloats(0,1,0),u=c[7].copyFromFloats(0,0,1),d=c[8].setAll(Number.MAX_VALUE),p=c[9].setAll(-Number.MAX_VALUE);g.IdentityToRef(s);let m=0;if(this.mesh?.isFacetDataEnabled&&(this._computeBoundingBox=!0),e=e>=this.nbParticles?this.nbParticles-1:e,this._computeBoundingBox&&(0!=t||e!=this.nbParticles-1)){const t=this.mesh?.getBoundingInfo();t&&(d.copyFrom(t.minimum),p.copyFrom(t.maximum))}m=0;let f=0,x=0,y=0;for(let i=t;i<=e;i++){const t=this.particles[i];m=t.idx,f=3*m,x=4*m,y=2*m,this.updateParticle(t);const e=t._rotationMatrix,r=t.position,o=t._globalPosition;this._computeParticleRotation&&t.getRotationMatrix(s);if(null!==t.parentId){const i=this.particles[t.parentId],n=i._rotationMatrix,a=i._globalPosition,c=r.x*n[1]+r.y*n[4]+r.z*n[7],l=r.x*n[0]+r.y*n[3]+r.z*n[6],h=r.x*n[2]+r.y*n[5]+r.z*n[8];if(o.x=a.x+l,o.y=a.y+c,o.z=a.z+h,this._computeParticleRotation){const t=s.m;e[0]=t[0]*n[0]+t[1]*n[3]+t[2]*n[6],e[1]=t[0]*n[1]+t[1]*n[4]+t[2]*n[7],e[2]=t[0]*n[2]+t[1]*n[5]+t[2]*n[8],e[3]=t[4]*n[0]+t[5]*n[3]+t[6]*n[6],e[4]=t[4]*n[1]+t[5]*n[4]+t[6]*n[7],e[5]=t[4]*n[2]+t[5]*n[5]+t[6]*n[8],e[6]=t[8]*n[0]+t[9]*n[3]+t[10]*n[6],e[7]=t[8]*n[1]+t[9]*n[4]+t[10]*n[7],e[8]=t[8]*n[2]+t[9]*n[5]+t[10]*n[8]}}else if(o.x=0,o.y=0,o.z=0,this._computeParticleRotation){const t=s.m;e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10]}const a=c[11];t.translateFromPivot?a.setAll(0):a.copyFrom(t.pivot);const _=c[0];_.copyFrom(t.position);const g=_.x-t.pivot.x,T=_.y-t.pivot.y,v=_.z-t.pivot.z;let w=g*e[0]+T*e[3]+v*e[6],b=g*e[1]+T*e[4]+v*e[7],P=g*e[2]+T*e[5]+v*e[8];w+=a.x,b+=a.y,P+=a.z;const M=n[f]=o.x+l.x*w+h.x*b+u.x*P,R=n[f+1]=o.y+l.y*w+h.y*b+u.y*P,C=n[f+2]=o.z+l.z*w+h.z*b+u.z*P;if(this._computeBoundingBox&&(d.minimizeInPlaceFromFloats(M,R,C),p.maximizeInPlaceFromFloats(M,R,C)),this._computeParticleColor&&t.color){const e=t.color,i=this._colors32;i[x]=e.r,i[x+1]=e.g,i[x+2]=e.b,i[x+3]=e.a}if(this._computeParticleTexture&&t.uv){const e=t.uv,i=this._uvs32;i[y]=e.x,i[y+1]=e.y}}return r&&(i&&(this._computeParticleColor&&r.updateVerticesData(_.ColorKind,o,!1,!1),this._computeParticleTexture&&r.updateVerticesData(_.UVKind,a,!1,!1),r.updateVerticesData(_.PositionKind,n,!1,!1)),this._computeBoundingBox&&(r.hasBoundingInfo?r.getBoundingInfo().reConstruct(d,p,r._worldMatrix):r.buildBoundingInfo(d,p,r._worldMatrix))),this.afterUpdateParticles(t,e,i),this}dispose(){this.mesh?.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._uvs32=null,this._colors32=null}refreshVisibleSize(){return this._isVisibilityBoxLocked||this.mesh?.refreshBoundingInfo(),this}setVisibilityBox(t){if(!this.mesh)return;const e=t/2;this.mesh.buildBoundingInfo(new v(-e,-e,-e),new v(e,e,e))}get isAlwaysVisible(){return this._alwaysVisible}set isAlwaysVisible(t){this.mesh&&(this._alwaysVisible=t,this.mesh.alwaysSelectAsActiveMesh=t)}set computeParticleRotation(t){this._computeParticleRotation=t}set computeParticleColor(t){this._computeParticleColor=t}set computeParticleTexture(t){this._computeParticleTexture=t}get computeParticleColor(){return this._computeParticleColor}get computeParticleTexture(){return this._computeParticleTexture}set computeBoundingBox(t){this._computeBoundingBox=t}get computeBoundingBox(){return this._computeBoundingBox}initParticles(){}recycleParticle(t){return t}updateParticle(t){return t}beforeUpdateParticles(t,e,i){}afterUpdateParticles(t,e,i){}}!function(t){t[t.Splat=0]="Splat",t[t.PointCloud=1]="PointCloud",t[t.Mesh=2]="Mesh"}(q||(q={}));class ${constructor(t=$._DefaultLoadingOptions){this.name=E.name,this._assetContainer=null,this.extensions=E.extensions,this._loadingOptions=t}createPlugin(t){return new $(t[E.name])}async importMeshAsync(t,e,i,s,r,o){return this._parse(t,e,i,s).then((t=>({meshes:t,particleSystems:[],skeletons:[],animationGroups:[],transformNodes:[],geometries:[],lights:[],spriteManagers:[]})))}static _BuildPointCloud(t,e){if(!e.byteLength)return!1;const i=new Uint8Array(e),s=new Float32Array(e),r=i.length/32;return t.addPoints(r,(function(t,e){const r=s[8*e+0],o=s[8*e+1],n=s[8*e+2];t.position=new v(r,o,n);const a=i[32*e+24+0]/255,c=i[32*e+24+1]/255,l=i[32*e+24+2]/255;t.color=new C(a,c,l,1)})),!0}static _BuildMesh(t,e){const i=new f("PLYMesh",t),s=new Uint8Array(e.data),r=new Float32Array(e.data),o=s.length/32,n=[],a=new x;for(let t=0;t<o;t++){const e=r[8*t+0],i=r[8*t+1],s=r[8*t+2];n.push(e,i,s)}if(e.hasVertexColors){const t=new Float32Array(4*o);for(let e=0;e<o;e++){const i=s[32*e+24+0]/255,r=s[32*e+24+1]/255,o=s[32*e+24+2]/255;t[4*e+0]=i,t[4*e+1]=r,t[4*e+2]=o,t[4*e+3]=1}a.colors=t}return a.positions=n,a.indices=e.faces,a.applyToMesh(i),i}_parse(t,e,i,s){const r=[],o=$._ConvertPLYToSplat(i);switch(o.mode){case 0:{const t=new j("GaussianSplatting",null,e,this._loadingOptions.keepInRam);t._parentContainer=this._assetContainer,r.push(t),t.loadDataAsync(o.data)}break;case 1:{const t=new Q("PointCloud",1,e);if($._BuildPointCloud(t,o.data))return Promise.all([t.buildMeshAsync()]).then((t=>(r.push(t[0]),r)));t.dispose()}break;case 2:if(!o.faces)throw new Error("PLY mesh doesn't contain face informations.");r.push($._BuildMesh(e,o));break;default:throw new Error("Unsupported Splat mode")}return Promise.resolve(r)}loadAssetContainerAsync(t,e,i){const s=new Z(t);return this._assetContainer=s,this.importMeshAsync(null,t,e,i).then((t=>(t.meshes.forEach((t=>s.meshes.push(t))),this._assetContainer=null,s))).catch((t=>{throw this._assetContainer=null,t}))}loadAsync(t,e,i){return this.importMeshAsync(null,t,e,i).then((()=>{}))}static _ConvertPLYToSplat(t){const e=new Uint8Array(t),i=(new TextDecoder).decode(e.slice(0,10240)),s="end_header\n",r=i.indexOf(s);if(r<0||!i)return{mode:0,data:t};const o=parseInt(/element vertex (\d+)\n/.exec(i)[1]),n=/element face (\d+)\n/.exec(i);let a=0;n&&(a=parseInt(n[1]));let c=0;const l={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0},h=[],u=i.slice(0,r).split("\n").filter((t=>t.startsWith("property ")));for(const t of u){const[,e,i]=t.split(" ");h.push({name:i,type:e,offset:c}),l[e]?c+=l[e]:w.Warn(`Unsupported property type: ${e}.`)}const d=.28209479177387814,p=new DataView(t,r+11),m=new ArrayBuffer(32*o),_=new M;for(let t=0;t<o;t++){const e=new Float32Array(m,32*t,3),i=new Float32Array(m,32*t+12,3),s=new Uint8ClampedArray(m,32*t+24,4),r=new Uint8ClampedArray(m,32*t+28,4);let o=255,n=0,a=0,l=0;for(let r=0;r<h.length;r++){const u=h[r];let m;switch(u.type){case"float":m=p.getFloat32(u.offset+t*c,!0);break;case"int":m=p.getInt32(u.offset+t*c,!0);break;case"uint":m=p.getUint32(u.offset+t*c,!0);break;case"double":m=p.getFloat64(u.offset+t*c,!0);break;case"uchar":m=p.getUint8(u.offset+t*c);break;default:continue}switch(u.name){case"x":e[0]=m;break;case"y":e[1]=m;break;case"z":e[2]=m;break;case"scale_0":i[0]=Math.exp(m);break;case"scale_1":i[1]=Math.exp(m);break;case"scale_2":i[2]=Math.exp(m);break;case"diffuse_red":case"red":s[0]=m;break;case"diffuse_green":case"green":s[1]=m;break;case"diffuse_blue":case"blue":s[2]=m;break;case"f_dc_0":s[0]=255*(.5+d*m);break;case"f_dc_1":s[1]=255*(.5+d*m);break;case"f_dc_2":s[2]=255*(.5+d*m);break;case"f_dc_3":s[3]=255*(.5+d*m);break;case"opacity":s[3]=1/(1+Math.exp(-m))*255;break;case"rot_0":o=m;break;case"rot_1":n=m;break;case"rot_2":a=m;break;case"rot_3":l=m}}_.set(n,a,l,o),_.normalize(),r[0]=128*_.w+128,r[1]=128*_.x+128,r[2]=128*_.y+128,r[3]=128*_.z+128}const f=[];if(a){let t=c*o;for(let e=0;e<a;e++){const e=p.getUint8(t);if(3==e){t+=1;for(let i=0;i<e;i++){const e=p.getUint32(t+4*(2-i),!0);f.push(e)}t+=12}}}let g=0,x=0;const y=["x","y","z","scale_0","scale_1","scale_2","opacity","rot_0","rot_1","rot_2","rot_3"],T=["red","green","blue","f_dc_0","f_dc_1","f_dc_2"];for(let t=0;t<h.length;t++){const e=h[t];y.includes(e.name)&&g++,T.includes(e.name)&&x++}const v=g==y.length&&3==x;return{mode:a?2:v?0:1,data:m,faces:f,hasVertexColors:!!x}}}$._DefaultLoadingOptions={keepInRam:!1},L(new $);export{$ as SPLATFileLoader};
2
- //# sourceMappingURL=splatFileLoader-BiXQ9pqp.esm.min.js.map