@babylonjs/viewer 7.24.0 → 7.25.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (522) hide show
  1. package/dist/babylon-viewer.esm.js +2 -0
  2. package/dist/babylon-viewer.esm.js.map +1 -0
  3. package/dist/babylon-viewer.esm.min.js +2 -0
  4. package/dist/babylon-viewer.esm.min.js.map +1 -0
  5. package/dist/chunks/EXT_lights_image_based-DC9fPJli.esm.min.js +2 -0
  6. package/dist/chunks/EXT_lights_image_based-DC9fPJli.esm.min.js.map +1 -0
  7. package/dist/chunks/EXT_lights_image_based-DfFQ31PL.esm.js +170 -0
  8. package/dist/chunks/EXT_lights_image_based-DfFQ31PL.esm.js.map +1 -0
  9. package/dist/chunks/EXT_mesh_gpu_instancing-DepTQjtD.esm.min.js +2 -0
  10. package/dist/chunks/EXT_mesh_gpu_instancing-DepTQjtD.esm.min.js.map +1 -0
  11. package/dist/chunks/EXT_mesh_gpu_instancing-cqFbSeIg.esm.js +86 -0
  12. package/dist/chunks/EXT_mesh_gpu_instancing-cqFbSeIg.esm.js.map +1 -0
  13. package/dist/chunks/EXT_meshopt_compression-BZz8a7N9.esm.js +134 -0
  14. package/dist/chunks/EXT_meshopt_compression-BZz8a7N9.esm.js.map +1 -0
  15. package/dist/chunks/EXT_meshopt_compression-CjMbh6eU.esm.min.js +2 -0
  16. package/dist/chunks/EXT_meshopt_compression-CjMbh6eU.esm.min.js.map +1 -0
  17. package/dist/chunks/EXT_texture_avif-DBTOdhvO.esm.js +44 -0
  18. package/dist/chunks/EXT_texture_avif-DBTOdhvO.esm.js.map +1 -0
  19. package/dist/chunks/EXT_texture_avif-DVAZSRkl.esm.min.js +2 -0
  20. package/dist/chunks/EXT_texture_avif-DVAZSRkl.esm.min.js.map +1 -0
  21. package/dist/chunks/EXT_texture_webp-BWiEqn-s.esm.min.js +2 -0
  22. package/dist/chunks/EXT_texture_webp-BWiEqn-s.esm.min.js.map +1 -0
  23. package/dist/chunks/EXT_texture_webp-Bgb7TgNp.esm.js +43 -0
  24. package/dist/chunks/EXT_texture_webp-Bgb7TgNp.esm.js.map +1 -0
  25. package/dist/chunks/ExtrasAsMetadata-Cr7Llzvd.esm.js +64 -0
  26. package/dist/chunks/ExtrasAsMetadata-Cr7Llzvd.esm.js.map +1 -0
  27. package/dist/chunks/ExtrasAsMetadata-DGIXOpGN.esm.min.js +2 -0
  28. package/dist/chunks/ExtrasAsMetadata-DGIXOpGN.esm.min.js.map +1 -0
  29. package/dist/chunks/KHR_animation_pointer-DrmQLtaw.esm.js +343 -0
  30. package/dist/chunks/KHR_animation_pointer-DrmQLtaw.esm.js.map +1 -0
  31. package/dist/chunks/KHR_animation_pointer-IVYLBxVU.esm.min.js +2 -0
  32. package/dist/chunks/KHR_animation_pointer-IVYLBxVU.esm.min.js.map +1 -0
  33. package/dist/chunks/KHR_draco_mesh_compression-CfqHokQU.esm.min.js +2 -0
  34. package/dist/chunks/KHR_draco_mesh_compression-CfqHokQU.esm.min.js.map +1 -0
  35. package/dist/chunks/KHR_draco_mesh_compression-DZR9h5nP.esm.js +610 -0
  36. package/dist/chunks/KHR_draco_mesh_compression-DZR9h5nP.esm.js.map +1 -0
  37. package/dist/chunks/KHR_interactivity-BQOxjpC1.esm.min.js +2 -0
  38. package/dist/chunks/KHR_interactivity-BQOxjpC1.esm.min.js.map +1 -0
  39. package/dist/chunks/KHR_interactivity-BbEGVmbr.esm.js +4033 -0
  40. package/dist/chunks/KHR_interactivity-BbEGVmbr.esm.js.map +1 -0
  41. package/dist/chunks/KHR_lights_punctual-5wF2wPZ4.esm.js +1253 -0
  42. package/dist/chunks/KHR_lights_punctual-5wF2wPZ4.esm.js.map +1 -0
  43. package/dist/chunks/KHR_lights_punctual-CxE0tWFW.esm.min.js +2 -0
  44. package/dist/chunks/KHR_lights_punctual-CxE0tWFW.esm.min.js.map +1 -0
  45. package/dist/chunks/KHR_materials_anisotropy-D5wj2P4R.esm.js +64 -0
  46. package/dist/chunks/KHR_materials_anisotropy-D5wj2P4R.esm.js.map +1 -0
  47. package/dist/chunks/KHR_materials_anisotropy-DzShF01_.esm.min.js +2 -0
  48. package/dist/chunks/KHR_materials_anisotropy-DzShF01_.esm.min.js.map +1 -0
  49. package/dist/chunks/KHR_materials_clearcoat-CVlq2-J0.esm.min.js +2 -0
  50. package/dist/chunks/KHR_materials_clearcoat-CVlq2-J0.esm.min.js.map +1 -0
  51. package/dist/chunks/KHR_materials_clearcoat-v7Cuht8B.esm.js +96 -0
  52. package/dist/chunks/KHR_materials_clearcoat-v7Cuht8B.esm.js.map +1 -0
  53. package/dist/chunks/KHR_materials_diffuse_transmission-Btv08kRf.esm.min.js +2 -0
  54. package/dist/chunks/KHR_materials_diffuse_transmission-Btv08kRf.esm.min.js.map +1 -0
  55. package/dist/chunks/KHR_materials_diffuse_transmission-DxEe_ssV.esm.js +95 -0
  56. package/dist/chunks/KHR_materials_diffuse_transmission-DxEe_ssV.esm.js.map +1 -0
  57. package/dist/chunks/KHR_materials_dispersion-BIMxA8Vq.esm.min.js +2 -0
  58. package/dist/chunks/KHR_materials_dispersion-BIMxA8Vq.esm.min.js.map +1 -0
  59. package/dist/chunks/KHR_materials_dispersion-D_4Rt_AT.esm.js +62 -0
  60. package/dist/chunks/KHR_materials_dispersion-D_4Rt_AT.esm.js.map +1 -0
  61. package/dist/chunks/KHR_materials_emissive_strength-BImvoUuh.esm.js +55 -0
  62. package/dist/chunks/KHR_materials_emissive_strength-BImvoUuh.esm.js.map +1 -0
  63. package/dist/chunks/KHR_materials_emissive_strength-BidGyKyI.esm.min.js +2 -0
  64. package/dist/chunks/KHR_materials_emissive_strength-BidGyKyI.esm.min.js.map +1 -0
  65. package/dist/chunks/KHR_materials_ior-DRDijE46.esm.min.js +2 -0
  66. package/dist/chunks/KHR_materials_ior-DRDijE46.esm.min.js.map +1 -0
  67. package/dist/chunks/KHR_materials_ior-Qsq8sSTQ.esm.js +64 -0
  68. package/dist/chunks/KHR_materials_ior-Qsq8sSTQ.esm.js.map +1 -0
  69. package/dist/chunks/KHR_materials_iridescence-BO-OSEkK.esm.min.js +2 -0
  70. package/dist/chunks/KHR_materials_iridescence-BO-OSEkK.esm.min.js.map +1 -0
  71. package/dist/chunks/KHR_materials_iridescence-Cc8j46MB.esm.js +72 -0
  72. package/dist/chunks/KHR_materials_iridescence-Cc8j46MB.esm.js.map +1 -0
  73. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Cd2w1hlF.esm.min.js +2 -0
  74. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Cd2w1hlF.esm.min.js.map +1 -0
  75. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DEtDFZPX.esm.js +81 -0
  76. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DEtDFZPX.esm.js.map +1 -0
  77. package/dist/chunks/KHR_materials_sheen-2GP5jiCT.esm.min.js +2 -0
  78. package/dist/chunks/KHR_materials_sheen-2GP5jiCT.esm.min.js.map +1 -0
  79. package/dist/chunks/KHR_materials_sheen-CQ3Q14sp.esm.js +85 -0
  80. package/dist/chunks/KHR_materials_sheen-CQ3Q14sp.esm.js.map +1 -0
  81. package/dist/chunks/KHR_materials_specular-B8bgMjMv.esm.min.js +2 -0
  82. package/dist/chunks/KHR_materials_specular-B8bgMjMv.esm.min.js.map +1 -0
  83. package/dist/chunks/KHR_materials_specular-D7P48RHW.esm.js +75 -0
  84. package/dist/chunks/KHR_materials_specular-D7P48RHW.esm.js.map +1 -0
  85. package/dist/chunks/KHR_materials_transmission-B6NtjEPp.esm.js +306 -0
  86. package/dist/chunks/KHR_materials_transmission-B6NtjEPp.esm.js.map +1 -0
  87. package/dist/chunks/KHR_materials_transmission-DPUUVLV8.esm.min.js +2 -0
  88. package/dist/chunks/KHR_materials_transmission-DPUUVLV8.esm.min.js.map +1 -0
  89. package/dist/chunks/KHR_materials_unlit-BRJnLegu.esm.min.js +2 -0
  90. package/dist/chunks/KHR_materials_unlit-BRJnLegu.esm.min.js.map +1 -0
  91. package/dist/chunks/KHR_materials_unlit-jqO9HFUm.esm.js +74 -0
  92. package/dist/chunks/KHR_materials_unlit-jqO9HFUm.esm.js.map +1 -0
  93. package/dist/chunks/KHR_materials_variants-D3zo3Fn8.esm.min.js +2 -0
  94. package/dist/chunks/KHR_materials_variants-D3zo3Fn8.esm.min.js.map +1 -0
  95. package/dist/chunks/KHR_materials_variants-DVhDwsbf.esm.js +238 -0
  96. package/dist/chunks/KHR_materials_variants-DVhDwsbf.esm.js.map +1 -0
  97. package/dist/chunks/KHR_materials_volume-BBlHI00R.esm.min.js +2 -0
  98. package/dist/chunks/KHR_materials_volume-BBlHI00R.esm.min.js.map +1 -0
  99. package/dist/chunks/KHR_materials_volume-pazjLjwn.esm.js +87 -0
  100. package/dist/chunks/KHR_materials_volume-pazjLjwn.esm.js.map +1 -0
  101. package/dist/chunks/KHR_mesh_quantization-BFCOpPq5.esm.min.js +2 -0
  102. package/dist/chunks/KHR_mesh_quantization-BFCOpPq5.esm.min.js.map +1 -0
  103. package/dist/chunks/KHR_mesh_quantization-DPAOJj_N.esm.js +26 -0
  104. package/dist/chunks/KHR_mesh_quantization-DPAOJj_N.esm.js.map +1 -0
  105. package/dist/chunks/KHR_texture_basisu-BGQg840h.esm.js +43 -0
  106. package/dist/chunks/KHR_texture_basisu-BGQg840h.esm.js.map +1 -0
  107. package/dist/chunks/KHR_texture_basisu-DjOd_UYI.esm.min.js +2 -0
  108. package/dist/chunks/KHR_texture_basisu-DjOd_UYI.esm.min.js.map +1 -0
  109. package/dist/chunks/KHR_texture_transform-CIEkHeKT.esm.js +63 -0
  110. package/dist/chunks/KHR_texture_transform-CIEkHeKT.esm.js.map +1 -0
  111. package/dist/chunks/KHR_texture_transform-LAK_4q2j.esm.min.js +2 -0
  112. package/dist/chunks/KHR_texture_transform-LAK_4q2j.esm.min.js.map +1 -0
  113. package/dist/chunks/KHR_xmp_json_ld-ByF20O9F.esm.min.js +2 -0
  114. package/dist/chunks/KHR_xmp_json_ld-ByF20O9F.esm.min.js.map +1 -0
  115. package/dist/chunks/KHR_xmp_json_ld-if0NXwJy.esm.js +51 -0
  116. package/dist/chunks/KHR_xmp_json_ld-if0NXwJy.esm.js.map +1 -0
  117. package/dist/chunks/MSFT_audio_emitter-D2B5Hzz0.esm.js +1608 -0
  118. package/dist/chunks/MSFT_audio_emitter-D2B5Hzz0.esm.js.map +1 -0
  119. package/dist/chunks/MSFT_audio_emitter-k-n62mVd.esm.min.js +2 -0
  120. package/dist/chunks/MSFT_audio_emitter-k-n62mVd.esm.min.js.map +1 -0
  121. package/dist/chunks/MSFT_lod-CpIv0Ill.esm.min.js +2 -0
  122. package/dist/chunks/MSFT_lod-CpIv0Ill.esm.min.js.map +1 -0
  123. package/dist/chunks/MSFT_lod-DZ3Pv8Ql.esm.js +337 -0
  124. package/dist/chunks/MSFT_lod-DZ3Pv8Ql.esm.js.map +1 -0
  125. package/dist/chunks/MSFT_minecraftMesh-GnUA-Z1C.esm.min.js +2 -0
  126. package/dist/chunks/MSFT_minecraftMesh-GnUA-Z1C.esm.min.js.map +1 -0
  127. package/dist/chunks/MSFT_minecraftMesh-KL-RFOpw.esm.js +46 -0
  128. package/dist/chunks/MSFT_minecraftMesh-KL-RFOpw.esm.js.map +1 -0
  129. package/dist/chunks/MSFT_sRGBFactors-BqvzNhFN.esm.js +47 -0
  130. package/dist/chunks/MSFT_sRGBFactors-BqvzNhFN.esm.js.map +1 -0
  131. package/dist/chunks/MSFT_sRGBFactors-BzPS1BeM.esm.min.js +2 -0
  132. package/dist/chunks/MSFT_sRGBFactors-BzPS1BeM.esm.min.js.map +1 -0
  133. package/dist/chunks/assetContainer-CaFtpYEC.esm.min.js +2 -0
  134. package/dist/chunks/assetContainer-CaFtpYEC.esm.min.js.map +1 -0
  135. package/dist/chunks/assetContainer-DEN9e8ap.esm.js +1598 -0
  136. package/dist/chunks/assetContainer-DEN9e8ap.esm.js.map +1 -0
  137. package/dist/chunks/basisTextureLoader-4lvRsW5R.esm.js +600 -0
  138. package/dist/chunks/basisTextureLoader-4lvRsW5R.esm.js.map +1 -0
  139. package/dist/chunks/basisTextureLoader-CSgqqtvQ.esm.min.js +2 -0
  140. package/dist/chunks/basisTextureLoader-CSgqqtvQ.esm.min.js.map +1 -0
  141. package/dist/chunks/ddsTextureLoader-BIGKoQfH.esm.min.js +2 -0
  142. package/dist/chunks/ddsTextureLoader-BIGKoQfH.esm.min.js.map +1 -0
  143. package/dist/chunks/ddsTextureLoader-WkW9Z98R.esm.js +87 -0
  144. package/dist/chunks/ddsTextureLoader-WkW9Z98R.esm.js.map +1 -0
  145. package/dist/chunks/default.fragment-C5qVdkwU.esm.min.js +2 -0
  146. package/dist/chunks/default.fragment-C5qVdkwU.esm.min.js.map +1 -0
  147. package/dist/chunks/default.fragment-KU3HcVdD.esm.js +515 -0
  148. package/dist/chunks/default.fragment-KU3HcVdD.esm.js.map +1 -0
  149. package/dist/chunks/default.fragment-YuNZ7QG_.esm.js +456 -0
  150. package/dist/chunks/default.fragment-YuNZ7QG_.esm.js.map +1 -0
  151. package/dist/chunks/default.fragment-tBVj8NVU.esm.min.js +2 -0
  152. package/dist/chunks/default.fragment-tBVj8NVU.esm.min.js.map +1 -0
  153. package/dist/chunks/default.vertex-BO-PPsjL.esm.min.js +2 -0
  154. package/dist/chunks/default.vertex-BO-PPsjL.esm.min.js.map +1 -0
  155. package/dist/chunks/default.vertex-BVid4c1x.esm.js +199 -0
  156. package/dist/chunks/default.vertex-BVid4c1x.esm.js.map +1 -0
  157. package/dist/chunks/default.vertex-DyVCLPqJ.esm.js +178 -0
  158. package/dist/chunks/default.vertex-DyVCLPqJ.esm.js.map +1 -0
  159. package/dist/chunks/default.vertex-Jx_lr96D.esm.min.js +2 -0
  160. package/dist/chunks/default.vertex-Jx_lr96D.esm.min.js.map +1 -0
  161. package/dist/chunks/defaultUboDeclaration-BCAmDlbI.esm.min.js +2 -0
  162. package/dist/chunks/defaultUboDeclaration-BCAmDlbI.esm.min.js.map +1 -0
  163. package/dist/chunks/defaultUboDeclaration-Bc5r1i_z.esm.js +13 -0
  164. package/dist/chunks/defaultUboDeclaration-Bc5r1i_z.esm.js.map +1 -0
  165. package/dist/chunks/defaultUboDeclaration-BuE-DHID.esm.js +15 -0
  166. package/dist/chunks/defaultUboDeclaration-BuE-DHID.esm.js.map +1 -0
  167. package/dist/chunks/defaultUboDeclaration-DSNWa2yC.esm.min.js +2 -0
  168. package/dist/chunks/defaultUboDeclaration-DSNWa2yC.esm.min.js.map +1 -0
  169. package/dist/chunks/envTextureLoader-DMQ4NJ4V.esm.js +63 -0
  170. package/dist/chunks/envTextureLoader-DMQ4NJ4V.esm.js.map +1 -0
  171. package/dist/chunks/envTextureLoader-a8A_Oy6u.esm.min.js +2 -0
  172. package/dist/chunks/envTextureLoader-a8A_Oy6u.esm.min.js.map +1 -0
  173. package/dist/chunks/environmentTextureTools-DUKiZwIi.esm.min.js +2 -0
  174. package/dist/chunks/environmentTextureTools-DUKiZwIi.esm.min.js.map +1 -0
  175. package/dist/chunks/environmentTextureTools-nMKhR78g.esm.js +381 -0
  176. package/dist/chunks/environmentTextureTools-nMKhR78g.esm.js.map +1 -0
  177. package/dist/chunks/exrTextureLoader-D5NU09ih.esm.js +1682 -0
  178. package/dist/chunks/exrTextureLoader-D5NU09ih.esm.js.map +1 -0
  179. package/dist/chunks/exrTextureLoader-N-X2bKA6.esm.min.js +2 -0
  180. package/dist/chunks/exrTextureLoader-N-X2bKA6.esm.min.js.map +1 -0
  181. package/dist/chunks/fogFragment-D6bC8Ff4.esm.min.js +2 -0
  182. package/dist/chunks/fogFragment-D6bC8Ff4.esm.min.js.map +1 -0
  183. package/dist/chunks/fogFragment-I5stYsjp.esm.js +102 -0
  184. package/dist/chunks/fogFragment-I5stYsjp.esm.js.map +1 -0
  185. package/dist/chunks/glTFLoader-Da2YOCGR.esm.js +7552 -0
  186. package/dist/chunks/glTFLoader-Da2YOCGR.esm.js.map +1 -0
  187. package/dist/chunks/glTFLoader-Is2_r9v2.esm.min.js +2 -0
  188. package/dist/chunks/glTFLoader-Is2_r9v2.esm.min.js.map +1 -0
  189. package/dist/chunks/glTFLoaderAnimation-Bglz6m7h.esm.min.js +2 -0
  190. package/dist/chunks/glTFLoaderAnimation-Bglz6m7h.esm.min.js.map +1 -0
  191. package/dist/chunks/glTFLoaderAnimation-CbznFn_D.esm.js +77 -0
  192. package/dist/chunks/glTFLoaderAnimation-CbznFn_D.esm.js.map +1 -0
  193. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  194. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  195. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  196. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  197. package/dist/chunks/harmonicsFunctions-BetF_GFT.esm.js +35 -0
  198. package/dist/chunks/harmonicsFunctions-BetF_GFT.esm.js.map +1 -0
  199. package/dist/chunks/harmonicsFunctions-CilRmaCi.esm.js +34 -0
  200. package/dist/chunks/harmonicsFunctions-CilRmaCi.esm.js.map +1 -0
  201. package/dist/chunks/harmonicsFunctions-DeWuwYX2.esm.min.js +2 -0
  202. package/dist/chunks/harmonicsFunctions-DeWuwYX2.esm.min.js.map +1 -0
  203. package/dist/chunks/harmonicsFunctions-DvXfJIer.esm.min.js +2 -0
  204. package/dist/chunks/harmonicsFunctions-DvXfJIer.esm.min.js.map +1 -0
  205. package/dist/chunks/hdrTextureLoader-Dcqnpgjb.esm.min.js +2 -0
  206. package/dist/chunks/hdrTextureLoader-Dcqnpgjb.esm.min.js.map +1 -0
  207. package/dist/chunks/hdrTextureLoader-byrfFp-O.esm.js +252 -0
  208. package/dist/chunks/hdrTextureLoader-byrfFp-O.esm.js.map +1 -0
  209. package/dist/chunks/helperFunctions-B7m7R064.esm.js +108 -0
  210. package/dist/chunks/helperFunctions-B7m7R064.esm.js.map +1 -0
  211. package/dist/chunks/helperFunctions-BAP7B_1V.esm.min.js +2 -0
  212. package/dist/chunks/helperFunctions-BAP7B_1V.esm.min.js.map +1 -0
  213. package/dist/chunks/helperFunctions-CigixUGL.esm.min.js +2 -0
  214. package/dist/chunks/helperFunctions-CigixUGL.esm.min.js.map +1 -0
  215. package/dist/chunks/helperFunctions-D2JAu3Um.esm.js +80 -0
  216. package/dist/chunks/helperFunctions-D2JAu3Um.esm.js.map +1 -0
  217. package/dist/chunks/index-Ba-YQVRw.esm.min.js +57 -0
  218. package/dist/chunks/index-Ba-YQVRw.esm.min.js.map +1 -0
  219. package/dist/chunks/index-DCMXQRx5.esm.js +81652 -0
  220. package/dist/chunks/index-DCMXQRx5.esm.js.map +1 -0
  221. package/dist/chunks/ktxTextureLoader-B7JJ6I6Z.esm.js +814 -0
  222. package/dist/chunks/ktxTextureLoader-B7JJ6I6Z.esm.js.map +1 -0
  223. package/dist/chunks/ktxTextureLoader-BVcuaoad.esm.min.js +2 -0
  224. package/dist/chunks/ktxTextureLoader-BVcuaoad.esm.min.js.map +1 -0
  225. package/dist/chunks/logDepthDeclaration-BJgjCQaD.esm.js +42 -0
  226. package/dist/chunks/logDepthDeclaration-BJgjCQaD.esm.js.map +1 -0
  227. package/dist/chunks/logDepthDeclaration-Bsw_jD9J.esm.js +35 -0
  228. package/dist/chunks/logDepthDeclaration-Bsw_jD9J.esm.js.map +1 -0
  229. package/dist/chunks/logDepthDeclaration-C0bLjDGt.esm.min.js +2 -0
  230. package/dist/chunks/logDepthDeclaration-C0bLjDGt.esm.min.js.map +1 -0
  231. package/dist/chunks/logDepthDeclaration-CF5JhF4_.esm.min.js +2 -0
  232. package/dist/chunks/logDepthDeclaration-CF5JhF4_.esm.min.js.map +1 -0
  233. package/dist/chunks/logDepthVertex-Bu3IKzw6.esm.min.js +2 -0
  234. package/dist/chunks/logDepthVertex-Bu3IKzw6.esm.min.js.map +1 -0
  235. package/dist/chunks/logDepthVertex-D6ApgK5s.esm.js +77 -0
  236. package/dist/chunks/logDepthVertex-D6ApgK5s.esm.js.map +1 -0
  237. package/dist/chunks/logDepthVertex-RSueoP5o.esm.min.js +2 -0
  238. package/dist/chunks/logDepthVertex-RSueoP5o.esm.min.js.map +1 -0
  239. package/dist/chunks/logDepthVertex-jmh6sp9r.esm.js +605 -0
  240. package/dist/chunks/logDepthVertex-jmh6sp9r.esm.js.map +1 -0
  241. package/dist/chunks/mainUVVaryingDeclaration-BNr0GD05.esm.min.js +2 -0
  242. package/dist/chunks/mainUVVaryingDeclaration-BNr0GD05.esm.min.js.map +1 -0
  243. package/dist/chunks/mainUVVaryingDeclaration-ZPe9Pfpm.esm.js +11 -0
  244. package/dist/chunks/mainUVVaryingDeclaration-ZPe9Pfpm.esm.js.map +1 -0
  245. package/dist/chunks/objFileLoader-B1j9OyPi.esm.js +1280 -0
  246. package/dist/chunks/objFileLoader-B1j9OyPi.esm.js.map +1 -0
  247. package/dist/chunks/objFileLoader-B2Z0kBGZ.esm.min.js +2 -0
  248. package/dist/chunks/objFileLoader-B2Z0kBGZ.esm.min.js.map +1 -0
  249. package/dist/chunks/oitFragment-C7OX8yZO.esm.js +1166 -0
  250. package/dist/chunks/oitFragment-C7OX8yZO.esm.js.map +1 -0
  251. package/dist/chunks/oitFragment-CROGuom4.esm.min.js +2 -0
  252. package/dist/chunks/oitFragment-CROGuom4.esm.min.js.map +1 -0
  253. package/dist/chunks/oitFragment-Cx8fxkh0.esm.min.js +2 -0
  254. package/dist/chunks/oitFragment-Cx8fxkh0.esm.min.js.map +1 -0
  255. package/dist/chunks/oitFragment-QaeREI-l.esm.js +1210 -0
  256. package/dist/chunks/oitFragment-QaeREI-l.esm.js.map +1 -0
  257. package/dist/chunks/pass.fragment-Cp76VdVm.esm.min.js +2 -0
  258. package/dist/chunks/pass.fragment-Cp76VdVm.esm.min.js.map +1 -0
  259. package/dist/chunks/pass.fragment-DWGZaulM.esm.js +15 -0
  260. package/dist/chunks/pass.fragment-DWGZaulM.esm.js.map +1 -0
  261. package/dist/chunks/pbr.fragment-1MSLuKxt.esm.min.js +2 -0
  262. package/dist/chunks/pbr.fragment-1MSLuKxt.esm.min.js.map +1 -0
  263. package/dist/chunks/pbr.fragment-CVVaxHTM.esm.js +3172 -0
  264. package/dist/chunks/pbr.fragment-CVVaxHTM.esm.js.map +1 -0
  265. package/dist/chunks/pbr.fragment-DjDXkzPC.esm.js +3228 -0
  266. package/dist/chunks/pbr.fragment-DjDXkzPC.esm.js.map +1 -0
  267. package/dist/chunks/pbr.fragment-u-qCDBnn.esm.min.js +2 -0
  268. package/dist/chunks/pbr.fragment-u-qCDBnn.esm.min.js.map +1 -0
  269. package/dist/chunks/pbr.vertex-CY3atoVH.esm.min.js +2 -0
  270. package/dist/chunks/pbr.vertex-CY3atoVH.esm.min.js.map +1 -0
  271. package/dist/chunks/pbr.vertex-CvBNpmrL.esm.js +335 -0
  272. package/dist/chunks/pbr.vertex-CvBNpmrL.esm.js.map +1 -0
  273. package/dist/chunks/pbr.vertex-Cz1vuu4g.esm.min.js +2 -0
  274. package/dist/chunks/pbr.vertex-Cz1vuu4g.esm.min.js.map +1 -0
  275. package/dist/chunks/pbr.vertex-DmN6aBEn.esm.js +208 -0
  276. package/dist/chunks/pbr.vertex-DmN6aBEn.esm.js.map +1 -0
  277. package/dist/chunks/postprocess.vertex-C1KLVO46.esm.min.js +2 -0
  278. package/dist/chunks/postprocess.vertex-C1KLVO46.esm.min.js.map +1 -0
  279. package/dist/chunks/postprocess.vertex-bRjFMMTw.esm.js +20 -0
  280. package/dist/chunks/postprocess.vertex-bRjFMMTw.esm.js.map +1 -0
  281. package/dist/chunks/rawTexture-CnRJFGS0.esm.min.js +2 -0
  282. package/dist/chunks/rawTexture-CnRJFGS0.esm.min.js.map +1 -0
  283. package/dist/chunks/rawTexture-DqO-U47x.esm.js +562 -0
  284. package/dist/chunks/rawTexture-DqO-U47x.esm.js.map +1 -0
  285. package/dist/chunks/rgbdDecode.fragment-B3x1NGLA.esm.js +17 -0
  286. package/dist/chunks/rgbdDecode.fragment-B3x1NGLA.esm.js.map +1 -0
  287. package/dist/chunks/rgbdDecode.fragment-Ced65A9P.esm.js +17 -0
  288. package/dist/chunks/rgbdDecode.fragment-Ced65A9P.esm.js.map +1 -0
  289. package/dist/chunks/rgbdDecode.fragment-DeTDMkx-.esm.min.js +2 -0
  290. package/dist/chunks/rgbdDecode.fragment-DeTDMkx-.esm.min.js.map +1 -0
  291. package/dist/chunks/rgbdDecode.fragment-I4vSkcn6.esm.min.js +2 -0
  292. package/dist/chunks/rgbdDecode.fragment-I4vSkcn6.esm.min.js.map +1 -0
  293. package/dist/chunks/rgbdEncode.fragment-BI_5lpaM.esm.js +17 -0
  294. package/dist/chunks/rgbdEncode.fragment-BI_5lpaM.esm.js.map +1 -0
  295. package/dist/chunks/rgbdEncode.fragment-CvsdJfL-.esm.min.js +2 -0
  296. package/dist/chunks/rgbdEncode.fragment-CvsdJfL-.esm.min.js.map +1 -0
  297. package/dist/chunks/rgbdEncode.fragment-DBV9U7_S.esm.js +17 -0
  298. package/dist/chunks/rgbdEncode.fragment-DBV9U7_S.esm.js.map +1 -0
  299. package/dist/chunks/rgbdEncode.fragment-Ga_wck8r.esm.min.js +2 -0
  300. package/dist/chunks/rgbdEncode.fragment-Ga_wck8r.esm.min.js.map +1 -0
  301. package/dist/chunks/splatFileLoader-CqZQp8gT.esm.min.js +2 -0
  302. package/dist/chunks/splatFileLoader-CqZQp8gT.esm.min.js.map +1 -0
  303. package/dist/chunks/splatFileLoader-Ojz6wPQF.esm.js +3154 -0
  304. package/dist/chunks/splatFileLoader-Ojz6wPQF.esm.js.map +1 -0
  305. package/dist/chunks/standardMaterial-BRFkCYek.esm.min.js +2 -0
  306. package/dist/chunks/standardMaterial-BRFkCYek.esm.min.js.map +1 -0
  307. package/dist/chunks/standardMaterial-CrPdkeQ7.esm.js +1809 -0
  308. package/dist/chunks/standardMaterial-CrPdkeQ7.esm.js.map +1 -0
  309. package/dist/chunks/stlFileLoader-CZ4gnzj5.esm.js +237 -0
  310. package/dist/chunks/stlFileLoader-CZ4gnzj5.esm.js.map +1 -0
  311. package/dist/chunks/stlFileLoader-vUsEa3k7.esm.min.js +2 -0
  312. package/dist/chunks/stlFileLoader-vUsEa3k7.esm.min.js.map +1 -0
  313. package/dist/chunks/tgaTextureLoader-CWw7TE84.esm.js +349 -0
  314. package/dist/chunks/tgaTextureLoader-CWw7TE84.esm.js.map +1 -0
  315. package/dist/chunks/tgaTextureLoader-z-0S-ufz.esm.min.js +2 -0
  316. package/dist/chunks/tgaTextureLoader-z-0S-ufz.esm.min.js.map +1 -0
  317. package/dist/chunks/thinInstanceMesh-BPnShKmm.esm.min.js +2 -0
  318. package/dist/chunks/thinInstanceMesh-BPnShKmm.esm.min.js.map +1 -0
  319. package/dist/chunks/thinInstanceMesh-BvcXpcNe.esm.js +314 -0
  320. package/dist/chunks/thinInstanceMesh-BvcXpcNe.esm.js.map +1 -0
  321. package/dist/chunks/vertexColorMixing-BY_oWZih.esm.min.js +2 -0
  322. package/dist/chunks/vertexColorMixing-BY_oWZih.esm.min.js.map +1 -0
  323. package/dist/chunks/vertexColorMixing-Cq9NDkQU.esm.js +528 -0
  324. package/dist/chunks/vertexColorMixing-Cq9NDkQU.esm.js.map +1 -0
  325. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  326. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  327. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  328. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  329. package/lib/index.d.ts +237 -0
  330. package/lib/index.js +871 -0
  331. package/lib/index.js.map +1 -0
  332. package/package.json +17 -27
  333. package/readme.md +35 -21
  334. package/configuration/configuration.d.ts +0 -107
  335. package/configuration/configuration.js +0 -16
  336. package/configuration/configuration.js.map +0 -1
  337. package/configuration/configurationCompatibility.d.ts +0 -8
  338. package/configuration/configurationCompatibility.js +0 -66
  339. package/configuration/configurationCompatibility.js.map +0 -1
  340. package/configuration/configurationContainer.d.ts +0 -10
  341. package/configuration/configurationContainer.js +0 -10
  342. package/configuration/configurationContainer.js.map +0 -1
  343. package/configuration/globals.d.ts +0 -6
  344. package/configuration/globals.js +0 -18
  345. package/configuration/globals.js.map +0 -1
  346. package/configuration/index.d.ts +0 -2
  347. package/configuration/index.js +0 -4
  348. package/configuration/index.js.map +0 -1
  349. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  350. package/configuration/interfaces/cameraConfiguration.js +0 -2
  351. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  352. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  353. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  354. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  355. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  356. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  357. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  358. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  359. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  360. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  361. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  362. package/configuration/interfaces/groundConfiguration.js +0 -2
  363. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  364. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  365. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  366. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  367. package/configuration/interfaces/index.d.ts +0 -15
  368. package/configuration/interfaces/index.js +0 -16
  369. package/configuration/interfaces/index.js.map +0 -1
  370. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  371. package/configuration/interfaces/lightConfiguration.js +0 -2
  372. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  373. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  374. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  375. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  376. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  377. package/configuration/interfaces/modelConfiguration.js +0 -2
  378. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  379. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  380. package/configuration/interfaces/observersConfiguration.js +0 -2
  381. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  382. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  383. package/configuration/interfaces/sceneConfiguration.js +0 -2
  384. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  385. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  386. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  387. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  388. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  389. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  390. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  391. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  392. package/configuration/interfaces/templateConfiguration.js +0 -2
  393. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  394. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  395. package/configuration/interfaces/vrConfiguration.js +0 -2
  396. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  397. package/configuration/loader.d.ts +0 -4
  398. package/configuration/loader.js +0 -17
  399. package/configuration/loader.js.map +0 -1
  400. package/configuration/mappers.d.ts +0 -43
  401. package/configuration/mappers.js +0 -192
  402. package/configuration/mappers.js.map +0 -1
  403. package/configuration/renderOnlyLoader.d.ts +0 -33
  404. package/configuration/renderOnlyLoader.js +0 -162
  405. package/configuration/renderOnlyLoader.js.map +0 -1
  406. package/configuration/types/default.d.ts +0 -6
  407. package/configuration/types/default.js +0 -121
  408. package/configuration/types/default.js.map +0 -1
  409. package/configuration/types/environmentMap.d.ts +0 -5
  410. package/configuration/types/environmentMap.js +0 -14
  411. package/configuration/types/environmentMap.js.map +0 -1
  412. package/configuration/types/extended.d.ts +0 -6
  413. package/configuration/types/extended.js +0 -317
  414. package/configuration/types/extended.js.map +0 -1
  415. package/configuration/types/index.d.ts +0 -14
  416. package/configuration/types/index.js +0 -51
  417. package/configuration/types/index.js.map +0 -1
  418. package/configuration/types/minimal.d.ts +0 -6
  419. package/configuration/types/minimal.js +0 -43
  420. package/configuration/types/minimal.js.map +0 -1
  421. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  422. package/configuration/types/renderOnlyDefault.js +0 -31
  423. package/configuration/types/renderOnlyDefault.js.map +0 -1
  424. package/configuration/types/shadowLight.d.ts +0 -9
  425. package/configuration/types/shadowLight.js +0 -64
  426. package/configuration/types/shadowLight.js.map +0 -1
  427. package/helper/index.d.ts +0 -29
  428. package/helper/index.js +0 -66
  429. package/helper/index.js.map +0 -1
  430. package/index.d.ts +0 -30
  431. package/index.js +0 -46
  432. package/index.js.map +0 -1
  433. package/initializer.d.ts +0 -11
  434. package/initializer.js +0 -35
  435. package/initializer.js.map +0 -1
  436. package/interfaces.d.ts +0 -5
  437. package/interfaces.js +0 -7
  438. package/interfaces.js.map +0 -1
  439. package/labs/environmentSerializer.d.ts +0 -126
  440. package/labs/environmentSerializer.js +0 -191
  441. package/labs/environmentSerializer.js.map +0 -1
  442. package/labs/texture.d.ts +0 -183
  443. package/labs/texture.js +0 -351
  444. package/labs/texture.js.map +0 -1
  445. package/labs/viewerLabs.d.ts +0 -51
  446. package/labs/viewerLabs.js +0 -134
  447. package/labs/viewerLabs.js.map +0 -1
  448. package/loader/modelLoader.d.ts +0 -56
  449. package/loader/modelLoader.js +0 -199
  450. package/loader/modelLoader.js.map +0 -1
  451. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  452. package/loader/plugins/applyMaterialConfig.js +0 -16
  453. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  454. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  455. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  456. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  457. package/loader/plugins/index.d.ts +0 -19
  458. package/loader/plugins/index.js +0 -44
  459. package/loader/plugins/index.js.map +0 -1
  460. package/loader/plugins/loaderPlugin.d.ts +0 -24
  461. package/loader/plugins/loaderPlugin.js +0 -2
  462. package/loader/plugins/loaderPlugin.js.map +0 -1
  463. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  464. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  465. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  466. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  467. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  468. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  469. package/managers/observablesManager.d.ts +0 -66
  470. package/managers/observablesManager.js +0 -35
  471. package/managers/observablesManager.js.map +0 -1
  472. package/managers/sceneManager.d.ts +0 -245
  473. package/managers/sceneManager.js +0 -1375
  474. package/managers/sceneManager.js.map +0 -1
  475. package/managers/telemetryManager.d.ts +0 -78
  476. package/managers/telemetryManager.js +0 -117
  477. package/managers/telemetryManager.js.map +0 -1
  478. package/model/modelAnimation.d.ts +0 -215
  479. package/model/modelAnimation.js +0 -237
  480. package/model/modelAnimation.js.map +0 -1
  481. package/model/viewerModel.d.ts +0 -233
  482. package/model/viewerModel.js +0 -673
  483. package/model/viewerModel.js.map +0 -1
  484. package/optimizer/custom/extended.d.ts +0 -13
  485. package/optimizer/custom/extended.js +0 -101
  486. package/optimizer/custom/extended.js.map +0 -1
  487. package/optimizer/custom/index.d.ts +0 -9
  488. package/optimizer/custom/index.js +0 -26
  489. package/optimizer/custom/index.js.map +0 -1
  490. package/renderOnlyIndex.d.ts +0 -11
  491. package/renderOnlyIndex.js +0 -18
  492. package/renderOnlyIndex.js.map +0 -1
  493. package/templating/eventManager.d.ts +0 -35
  494. package/templating/eventManager.js +0 -66
  495. package/templating/eventManager.js.map +0 -1
  496. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  497. package/templating/plugins/hdButtonPlugin.js +0 -21
  498. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  499. package/templating/plugins/printButton.d.ts +0 -9
  500. package/templating/plugins/printButton.js +0 -40
  501. package/templating/plugins/printButton.js.map +0 -1
  502. package/templating/templateManager.d.ts +0 -197
  503. package/templating/templateManager.js +0 -561
  504. package/templating/templateManager.js.map +0 -1
  505. package/templating/viewerTemplatePlugin.d.ts +0 -21
  506. package/templating/viewerTemplatePlugin.js +0 -69
  507. package/templating/viewerTemplatePlugin.js.map +0 -1
  508. package/viewer/defaultViewer.d.ts +0 -130
  509. package/viewer/defaultViewer.js +0 -675
  510. package/viewer/defaultViewer.js.map +0 -1
  511. package/viewer/renderOnlyViewer.d.ts +0 -9
  512. package/viewer/renderOnlyViewer.js +0 -46
  513. package/viewer/renderOnlyViewer.js.map +0 -1
  514. package/viewer/viewer.d.ts +0 -258
  515. package/viewer/viewer.js +0 -783
  516. package/viewer/viewer.js.map +0 -1
  517. package/viewer/viewerManager.d.ts +0 -58
  518. package/viewer/viewerManager.js +0 -91
  519. package/viewer/viewerManager.js.map +0 -1
  520. package/viewer/viewerWithTemplate.d.ts +0 -9
  521. package/viewer/viewerWithTemplate.js +0 -20
  522. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1,562 @@
1
+ import { aV as ThinEngine, u as Constants, aW as InternalTexture, L as Logger, aX as IsExponentOfTwo, T as Texture } from './index-DCMXQRx5.esm.js';
2
+
3
+ ThinEngine.prototype.updateRawTexture = function (texture, data, format, invertY, compression = null, type = Constants.TEXTURETYPE_UNSIGNED_INT, useSRGBBuffer = false) {
4
+ if (!texture) {
5
+ return;
6
+ }
7
+ // Babylon's internalSizedFomat but gl's texImage2D internalFormat
8
+ const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type, format, useSRGBBuffer);
9
+ // Babylon's internalFormat but gl's texImage2D format
10
+ const internalFormat = this._getInternalFormat(format);
11
+ const textureType = this._getWebGLTextureType(type);
12
+ this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);
13
+ this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);
14
+ if (!this._doNotHandleContextLost) {
15
+ texture._bufferView = data;
16
+ texture.format = format;
17
+ texture.type = type;
18
+ texture.invertY = invertY;
19
+ texture._compression = compression;
20
+ }
21
+ if (texture.width % 4 !== 0) {
22
+ this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1);
23
+ }
24
+ if (compression && data) {
25
+ this._gl.compressedTexImage2D(this._gl.TEXTURE_2D, 0, this.getCaps().s3tc[compression], texture.width, texture.height, 0, data);
26
+ }
27
+ else {
28
+ this._gl.texImage2D(this._gl.TEXTURE_2D, 0, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, data);
29
+ }
30
+ if (texture.generateMipMaps) {
31
+ this._gl.generateMipmap(this._gl.TEXTURE_2D);
32
+ }
33
+ this._bindTextureDirectly(this._gl.TEXTURE_2D, null);
34
+ // this.resetTextureCache();
35
+ texture.isReady = true;
36
+ };
37
+ ThinEngine.prototype.createRawTexture = function (data, width, height, format, generateMipMaps, invertY, samplingMode, compression = null, type = Constants.TEXTURETYPE_UNSIGNED_INT,
38
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
39
+ creationFlags = 0, useSRGBBuffer = false) {
40
+ const texture = new InternalTexture(this, 3 /* InternalTextureSource.Raw */);
41
+ texture.baseWidth = width;
42
+ texture.baseHeight = height;
43
+ texture.width = width;
44
+ texture.height = height;
45
+ texture.format = format;
46
+ texture.generateMipMaps = generateMipMaps;
47
+ texture.samplingMode = samplingMode;
48
+ texture.invertY = invertY;
49
+ texture._compression = compression;
50
+ texture.type = type;
51
+ texture._useSRGBBuffer = this._getUseSRGBBuffer(useSRGBBuffer, !generateMipMaps);
52
+ if (!this._doNotHandleContextLost) {
53
+ texture._bufferView = data;
54
+ }
55
+ this.updateRawTexture(texture, data, format, invertY, compression, type, texture._useSRGBBuffer);
56
+ this._bindTextureDirectly(this._gl.TEXTURE_2D, texture, true);
57
+ // Filters
58
+ const filters = this._getSamplingParameters(samplingMode, generateMipMaps);
59
+ this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, filters.mag);
60
+ this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER, filters.min);
61
+ if (generateMipMaps) {
62
+ this._gl.generateMipmap(this._gl.TEXTURE_2D);
63
+ }
64
+ this._bindTextureDirectly(this._gl.TEXTURE_2D, null);
65
+ this._internalTexturesCache.push(texture);
66
+ return texture;
67
+ };
68
+ ThinEngine.prototype.createRawCubeTexture = function (data, size, format, type, generateMipMaps, invertY, samplingMode, compression = null) {
69
+ const gl = this._gl;
70
+ const texture = new InternalTexture(this, 8 /* InternalTextureSource.CubeRaw */);
71
+ texture.isCube = true;
72
+ texture.format = format;
73
+ texture.type = type;
74
+ if (!this._doNotHandleContextLost) {
75
+ texture._bufferViewArray = data;
76
+ }
77
+ const textureType = this._getWebGLTextureType(type);
78
+ let internalFormat = this._getInternalFormat(format);
79
+ if (internalFormat === gl.RGB) {
80
+ internalFormat = gl.RGBA;
81
+ }
82
+ // Mipmap generation needs a sized internal format that is both color-renderable and texture-filterable
83
+ if (textureType === gl.FLOAT && !this._caps.textureFloatLinearFiltering) {
84
+ generateMipMaps = false;
85
+ samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
86
+ Logger.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.");
87
+ }
88
+ else if (textureType === this._gl.HALF_FLOAT_OES && !this._caps.textureHalfFloatLinearFiltering) {
89
+ generateMipMaps = false;
90
+ samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
91
+ Logger.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.");
92
+ }
93
+ else if (textureType === gl.FLOAT && !this._caps.textureFloatRender) {
94
+ generateMipMaps = false;
95
+ Logger.Warn("Render to float textures is not supported. Mipmap generation forced to false.");
96
+ }
97
+ else if (textureType === gl.HALF_FLOAT && !this._caps.colorBufferFloat) {
98
+ generateMipMaps = false;
99
+ Logger.Warn("Render to half float textures is not supported. Mipmap generation forced to false.");
100
+ }
101
+ const width = size;
102
+ const height = width;
103
+ texture.width = width;
104
+ texture.height = height;
105
+ texture.invertY = invertY;
106
+ texture._compression = compression;
107
+ // Double check on POT to generate Mips.
108
+ const isPot = !this.needPOTTextures || (IsExponentOfTwo(texture.width) && IsExponentOfTwo(texture.height));
109
+ if (!isPot) {
110
+ generateMipMaps = false;
111
+ }
112
+ // Upload data if needed. The texture won't be ready until then.
113
+ if (data) {
114
+ this.updateRawCubeTexture(texture, data, format, type, invertY, compression);
115
+ }
116
+ else {
117
+ const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);
118
+ const level = 0;
119
+ this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);
120
+ for (let faceIndex = 0; faceIndex < 6; faceIndex++) {
121
+ if (compression) {
122
+ gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, this.getCaps().s3tc[compression], texture.width, texture.height, 0, undefined);
123
+ }
124
+ else {
125
+ gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, null);
126
+ }
127
+ }
128
+ this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);
129
+ }
130
+ this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, texture, true);
131
+ // Filters
132
+ if (data && generateMipMaps) {
133
+ this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);
134
+ }
135
+ const filters = this._getSamplingParameters(samplingMode, generateMipMaps);
136
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, filters.mag);
137
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, filters.min);
138
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
139
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
140
+ this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);
141
+ texture.generateMipMaps = generateMipMaps;
142
+ texture.samplingMode = samplingMode;
143
+ texture.isReady = true;
144
+ return texture;
145
+ };
146
+ ThinEngine.prototype.updateRawCubeTexture = function (texture, data, format, type, invertY, compression = null, level = 0) {
147
+ texture._bufferViewArray = data;
148
+ texture.format = format;
149
+ texture.type = type;
150
+ texture.invertY = invertY;
151
+ texture._compression = compression;
152
+ const gl = this._gl;
153
+ const textureType = this._getWebGLTextureType(type);
154
+ let internalFormat = this._getInternalFormat(format);
155
+ const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);
156
+ let needConversion = false;
157
+ if (internalFormat === gl.RGB) {
158
+ internalFormat = gl.RGBA;
159
+ needConversion = true;
160
+ }
161
+ this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);
162
+ this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);
163
+ if (texture.width % 4 !== 0) {
164
+ gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
165
+ }
166
+ // Data are known to be in +X +Y +Z -X -Y -Z
167
+ for (let faceIndex = 0; faceIndex < 6; faceIndex++) {
168
+ let faceData = data[faceIndex];
169
+ if (compression) {
170
+ gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, this.getCaps().s3tc[compression], texture.width, texture.height, 0, faceData);
171
+ }
172
+ else {
173
+ if (needConversion) {
174
+ faceData = _convertRGBtoRGBATextureData(faceData, texture.width, texture.height, type);
175
+ }
176
+ gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + faceIndex, level, internalSizedFomat, texture.width, texture.height, 0, internalFormat, textureType, faceData);
177
+ }
178
+ }
179
+ const isPot = !this.needPOTTextures || (IsExponentOfTwo(texture.width) && IsExponentOfTwo(texture.height));
180
+ if (isPot && texture.generateMipMaps && level === 0) {
181
+ this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);
182
+ }
183
+ this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP, null);
184
+ // this.resetTextureCache();
185
+ texture.isReady = true;
186
+ };
187
+ ThinEngine.prototype.createRawCubeTextureFromUrl = function (url, scene, size, format, type, noMipmap, callback, mipmapGenerator, onLoad = null, onError = null, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, invertY = false) {
188
+ const gl = this._gl;
189
+ const texture = this.createRawCubeTexture(null, size, format, type, !noMipmap, invertY, samplingMode, null);
190
+ scene?.addPendingData(texture);
191
+ texture.url = url;
192
+ texture.isReady = false;
193
+ this._internalTexturesCache.push(texture);
194
+ const onerror = (request, exception) => {
195
+ scene?.removePendingData(texture);
196
+ if (onError && request) {
197
+ onError(request.status + " " + request.statusText, exception);
198
+ }
199
+ };
200
+ const internalCallback = (data) => {
201
+ const width = texture.width;
202
+ const faceDataArrays = callback(data);
203
+ if (!faceDataArrays) {
204
+ return;
205
+ }
206
+ if (mipmapGenerator) {
207
+ const textureType = this._getWebGLTextureType(type);
208
+ let internalFormat = this._getInternalFormat(format);
209
+ const internalSizedFomat = this._getRGBABufferInternalSizedFormat(type);
210
+ let needConversion = false;
211
+ if (internalFormat === gl.RGB) {
212
+ internalFormat = gl.RGBA;
213
+ needConversion = true;
214
+ }
215
+ this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, texture, true);
216
+ this._unpackFlipY(false);
217
+ const mipData = mipmapGenerator(faceDataArrays);
218
+ for (let level = 0; level < mipData.length; level++) {
219
+ const mipSize = width >> level;
220
+ for (let faceIndex = 0; faceIndex < 6; faceIndex++) {
221
+ let mipFaceData = mipData[level][faceIndex];
222
+ if (needConversion) {
223
+ mipFaceData = _convertRGBtoRGBATextureData(mipFaceData, mipSize, mipSize, type);
224
+ }
225
+ gl.texImage2D(faceIndex, level, internalSizedFomat, mipSize, mipSize, 0, internalFormat, textureType, mipFaceData);
226
+ }
227
+ }
228
+ this._bindTextureDirectly(gl.TEXTURE_CUBE_MAP, null);
229
+ }
230
+ else {
231
+ this.updateRawCubeTexture(texture, faceDataArrays, format, type, invertY);
232
+ }
233
+ texture.isReady = true;
234
+ // this.resetTextureCache();
235
+ scene?.removePendingData(texture);
236
+ texture.onLoadedObservable.notifyObservers(texture);
237
+ texture.onLoadedObservable.clear();
238
+ if (onLoad) {
239
+ onLoad();
240
+ }
241
+ };
242
+ this._loadFile(url, (data) => {
243
+ internalCallback(data);
244
+ }, undefined, scene?.offlineProvider, true, onerror);
245
+ return texture;
246
+ };
247
+ /**
248
+ * @internal
249
+ */
250
+ // eslint-disable-next-line @typescript-eslint/naming-convention
251
+ function _convertRGBtoRGBATextureData(rgbData, width, height, textureType) {
252
+ // Create new RGBA data container.
253
+ let rgbaData;
254
+ let val1 = 1;
255
+ if (textureType === Constants.TEXTURETYPE_FLOAT) {
256
+ rgbaData = new Float32Array(width * height * 4);
257
+ }
258
+ else if (textureType === Constants.TEXTURETYPE_HALF_FLOAT) {
259
+ rgbaData = new Uint16Array(width * height * 4);
260
+ val1 = 15360; // 15360 is the encoding of 1 in half float
261
+ }
262
+ else if (textureType === Constants.TEXTURETYPE_UNSIGNED_INTEGER) {
263
+ rgbaData = new Uint32Array(width * height * 4);
264
+ }
265
+ else {
266
+ rgbaData = new Uint8Array(width * height * 4);
267
+ }
268
+ // Convert each pixel.
269
+ for (let x = 0; x < width; x++) {
270
+ for (let y = 0; y < height; y++) {
271
+ const index = (y * width + x) * 3;
272
+ const newIndex = (y * width + x) * 4;
273
+ // Map Old Value to new value.
274
+ rgbaData[newIndex + 0] = rgbData[index + 0];
275
+ rgbaData[newIndex + 1] = rgbData[index + 1];
276
+ rgbaData[newIndex + 2] = rgbData[index + 2];
277
+ // Add fully opaque alpha channel.
278
+ rgbaData[newIndex + 3] = val1;
279
+ }
280
+ }
281
+ return rgbaData;
282
+ }
283
+ /**
284
+ * Create a function for createRawTexture3D/createRawTexture2DArray
285
+ * @param is3D true for TEXTURE_3D and false for TEXTURE_2D_ARRAY
286
+ * @internal
287
+ */
288
+ // eslint-disable-next-line @typescript-eslint/naming-convention
289
+ function _makeCreateRawTextureFunction(is3D) {
290
+ return function (data, width, height, depth, format, generateMipMaps, invertY, samplingMode, compression = null, textureType = Constants.TEXTURETYPE_UNSIGNED_INT) {
291
+ const target = is3D ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY;
292
+ const source = is3D ? 10 /* InternalTextureSource.Raw3D */ : 11 /* InternalTextureSource.Raw2DArray */;
293
+ const texture = new InternalTexture(this, source);
294
+ texture.baseWidth = width;
295
+ texture.baseHeight = height;
296
+ texture.baseDepth = depth;
297
+ texture.width = width;
298
+ texture.height = height;
299
+ texture.depth = depth;
300
+ texture.format = format;
301
+ texture.type = textureType;
302
+ texture.generateMipMaps = generateMipMaps;
303
+ texture.samplingMode = samplingMode;
304
+ if (is3D) {
305
+ texture.is3D = true;
306
+ }
307
+ else {
308
+ texture.is2DArray = true;
309
+ }
310
+ if (!this._doNotHandleContextLost) {
311
+ texture._bufferView = data;
312
+ }
313
+ if (is3D) {
314
+ this.updateRawTexture3D(texture, data, format, invertY, compression, textureType);
315
+ }
316
+ else {
317
+ this.updateRawTexture2DArray(texture, data, format, invertY, compression, textureType);
318
+ }
319
+ this._bindTextureDirectly(target, texture, true);
320
+ // Filters
321
+ const filters = this._getSamplingParameters(samplingMode, generateMipMaps);
322
+ this._gl.texParameteri(target, this._gl.TEXTURE_MAG_FILTER, filters.mag);
323
+ this._gl.texParameteri(target, this._gl.TEXTURE_MIN_FILTER, filters.min);
324
+ if (generateMipMaps) {
325
+ this._gl.generateMipmap(target);
326
+ }
327
+ this._bindTextureDirectly(target, null);
328
+ this._internalTexturesCache.push(texture);
329
+ return texture;
330
+ };
331
+ }
332
+ ThinEngine.prototype.createRawTexture2DArray = _makeCreateRawTextureFunction(false);
333
+ ThinEngine.prototype.createRawTexture3D = _makeCreateRawTextureFunction(true);
334
+ /**
335
+ * Create a function for updateRawTexture3D/updateRawTexture2DArray
336
+ * @param is3D true for TEXTURE_3D and false for TEXTURE_2D_ARRAY
337
+ * @internal
338
+ */
339
+ // eslint-disable-next-line @typescript-eslint/naming-convention
340
+ function _makeUpdateRawTextureFunction(is3D) {
341
+ return function (texture, data, format, invertY, compression = null, textureType = Constants.TEXTURETYPE_UNSIGNED_INT) {
342
+ const target = is3D ? this._gl.TEXTURE_3D : this._gl.TEXTURE_2D_ARRAY;
343
+ const internalType = this._getWebGLTextureType(textureType);
344
+ const internalFormat = this._getInternalFormat(format);
345
+ const internalSizedFomat = this._getRGBABufferInternalSizedFormat(textureType, format);
346
+ this._bindTextureDirectly(target, texture, true);
347
+ this._unpackFlipY(invertY === undefined ? true : invertY ? true : false);
348
+ if (!this._doNotHandleContextLost) {
349
+ texture._bufferView = data;
350
+ texture.format = format;
351
+ texture.invertY = invertY;
352
+ texture._compression = compression;
353
+ }
354
+ if (texture.width % 4 !== 0) {
355
+ this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT, 1);
356
+ }
357
+ if (compression && data) {
358
+ this._gl.compressedTexImage3D(target, 0, this.getCaps().s3tc[compression], texture.width, texture.height, texture.depth, 0, data);
359
+ }
360
+ else {
361
+ this._gl.texImage3D(target, 0, internalSizedFomat, texture.width, texture.height, texture.depth, 0, internalFormat, internalType, data);
362
+ }
363
+ if (texture.generateMipMaps) {
364
+ this._gl.generateMipmap(target);
365
+ }
366
+ this._bindTextureDirectly(target, null);
367
+ // this.resetTextureCache();
368
+ texture.isReady = true;
369
+ };
370
+ }
371
+ ThinEngine.prototype.updateRawTexture2DArray = _makeUpdateRawTextureFunction(false);
372
+ ThinEngine.prototype.updateRawTexture3D = _makeUpdateRawTextureFunction(true);
373
+
374
+ /**
375
+ * Raw texture can help creating a texture directly from an array of data.
376
+ * This can be super useful if you either get the data from an uncompressed source or
377
+ * if you wish to create your texture pixel by pixel.
378
+ */
379
+ class RawTexture extends Texture {
380
+ /**
381
+ * Instantiates a new RawTexture.
382
+ * Raw texture can help creating a texture directly from an array of data.
383
+ * This can be super useful if you either get the data from an uncompressed source or
384
+ * if you wish to create your texture pixel by pixel.
385
+ * @param data define the array of data to use to create the texture (null to create an empty texture)
386
+ * @param width define the width of the texture
387
+ * @param height define the height of the texture
388
+ * @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)
389
+ * @param sceneOrEngine defines the scene or engine the texture will belong to
390
+ * @param generateMipMaps define whether mip maps should be generated or not
391
+ * @param invertY define if the data should be flipped on Y when uploaded to the GPU
392
+ * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
393
+ * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
394
+ * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
395
+ * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
396
+ */
397
+ constructor(data, width, height,
398
+ /**
399
+ * Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)
400
+ */
401
+ format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags, useSRGBBuffer) {
402
+ super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);
403
+ this.format = format;
404
+ if (!this._engine) {
405
+ return;
406
+ }
407
+ if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {
408
+ samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
409
+ }
410
+ if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {
411
+ samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
412
+ }
413
+ this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);
414
+ this.wrapU = Texture.CLAMP_ADDRESSMODE;
415
+ this.wrapV = Texture.CLAMP_ADDRESSMODE;
416
+ }
417
+ /**
418
+ * Updates the texture underlying data.
419
+ * @param data Define the new data of the texture
420
+ */
421
+ update(data) {
422
+ this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);
423
+ }
424
+ /**
425
+ * Clones the texture.
426
+ * @returns the cloned texture
427
+ */
428
+ clone() {
429
+ if (!this._texture) {
430
+ return super.clone();
431
+ }
432
+ 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);
433
+ rawTexture._texture = this._texture;
434
+ this._texture.incrementReferences();
435
+ return rawTexture;
436
+ }
437
+ /**
438
+ * Creates a luminance texture from some data.
439
+ * @param data Define the texture data
440
+ * @param width Define the width of the texture
441
+ * @param height Define the height of the texture
442
+ * @param sceneOrEngine defines the scene or engine the texture will belong to
443
+ * @param generateMipMaps Define whether or not to create mip maps for the texture
444
+ * @param invertY define if the data should be flipped on Y when uploaded to the GPU
445
+ * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
446
+ * @returns the luminance texture
447
+ */
448
+ static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
449
+ return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);
450
+ }
451
+ /**
452
+ * Creates a luminance alpha texture from some data.
453
+ * @param data Define the texture data
454
+ * @param width Define the width of the texture
455
+ * @param height Define the height of the texture
456
+ * @param sceneOrEngine defines the scene or engine the texture will belong to
457
+ * @param generateMipMaps Define whether or not to create mip maps for the texture
458
+ * @param invertY define if the data should be flipped on Y when uploaded to the GPU
459
+ * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
460
+ * @returns the luminance alpha texture
461
+ */
462
+ static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
463
+ return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);
464
+ }
465
+ /**
466
+ * Creates an alpha texture from some data.
467
+ * @param data Define the texture data
468
+ * @param width Define the width of the texture
469
+ * @param height Define the height of the texture
470
+ * @param sceneOrEngine defines the scene or engine the texture will belong to
471
+ * @param generateMipMaps Define whether or not to create mip maps for the texture
472
+ * @param invertY define if the data should be flipped on Y when uploaded to the GPU
473
+ * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
474
+ * @returns the alpha texture
475
+ */
476
+ static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
477
+ return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);
478
+ }
479
+ /**
480
+ * Creates a RGB texture from some data.
481
+ * @param data Define the texture data
482
+ * @param width Define the width of the texture
483
+ * @param height Define the height of the texture
484
+ * @param sceneOrEngine defines the scene or engine the texture will belong to
485
+ * @param generateMipMaps Define whether or not to create mip maps for the texture
486
+ * @param invertY define if the data should be flipped on Y when uploaded to the GPU
487
+ * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
488
+ * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
489
+ * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
490
+ * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
491
+ * @returns the RGB alpha texture
492
+ */
493
+ static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {
494
+ return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);
495
+ }
496
+ /**
497
+ * Creates a RGBA texture from some data.
498
+ * @param data Define the texture data
499
+ * @param width Define the width of the texture
500
+ * @param height Define the height of the texture
501
+ * @param sceneOrEngine defines the scene or engine the texture will belong to
502
+ * @param generateMipMaps Define whether or not to create mip maps for the texture
503
+ * @param invertY define if the data should be flipped on Y when uploaded to the GPU
504
+ * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
505
+ * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
506
+ * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
507
+ * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
508
+ * @returns the RGBA texture
509
+ */
510
+ static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {
511
+ return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);
512
+ }
513
+ /**
514
+ * Creates a RGBA storage texture from some data.
515
+ * @param data Define the texture data
516
+ * @param width Define the width of the texture
517
+ * @param height Define the height of the texture
518
+ * @param sceneOrEngine defines the scene or engine the texture will belong to
519
+ * @param generateMipMaps Define whether or not to create mip maps for the texture
520
+ * @param invertY define if the data should be flipped on Y when uploaded to the GPU
521
+ * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
522
+ * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
523
+ * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
524
+ * @returns the RGBA texture
525
+ */
526
+ static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, useSRGBBuffer = false) {
527
+ return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);
528
+ }
529
+ /**
530
+ * Creates a R texture from some data.
531
+ * @param data Define the texture data
532
+ * @param width Define the width of the texture
533
+ * @param height Define the height of the texture
534
+ * @param sceneOrEngine defines the scene or engine the texture will belong to
535
+ * @param generateMipMaps Define whether or not to create mip maps for the texture
536
+ * @param invertY define if the data should be flipped on Y when uploaded to the GPU
537
+ * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
538
+ * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
539
+ * @returns the R texture
540
+ */
541
+ static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {
542
+ return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);
543
+ }
544
+ /**
545
+ * Creates a R storage texture from some data.
546
+ * @param data Define the texture data
547
+ * @param width Define the width of the texture
548
+ * @param height Define the height of the texture
549
+ * @param sceneOrEngine defines the scene or engine the texture will belong to
550
+ * @param generateMipMaps Define whether or not to create mip maps for the texture
551
+ * @param invertY define if the data should be flipped on Y when uploaded to the GPU
552
+ * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
553
+ * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
554
+ * @returns the R texture
555
+ */
556
+ static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {
557
+ return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);
558
+ }
559
+ }
560
+
561
+ export { RawTexture as R };
562
+ //# sourceMappingURL=rawTexture-DqO-U47x.esm.js.map