@babylonjs/viewer 7.41.1-alpha → 7.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (619) hide show
  1. package/configuration/configuration.d.ts +107 -0
  2. package/configuration/configuration.js +16 -0
  3. package/configuration/configuration.js.map +1 -0
  4. package/configuration/configurationCompatibility.d.ts +8 -0
  5. package/configuration/configurationCompatibility.js +66 -0
  6. package/configuration/configurationCompatibility.js.map +1 -0
  7. package/configuration/configurationContainer.d.ts +10 -0
  8. package/configuration/configurationContainer.js +10 -0
  9. package/configuration/configurationContainer.js.map +1 -0
  10. package/configuration/globals.d.ts +6 -0
  11. package/configuration/globals.js +18 -0
  12. package/configuration/globals.js.map +1 -0
  13. package/configuration/index.d.ts +2 -0
  14. package/configuration/index.js +4 -0
  15. package/configuration/index.js.map +1 -0
  16. package/configuration/interfaces/cameraConfiguration.d.ts +31 -0
  17. package/configuration/interfaces/cameraConfiguration.js +2 -0
  18. package/configuration/interfaces/cameraConfiguration.js.map +1 -0
  19. package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -0
  20. package/configuration/interfaces/colorGradingConfiguration.js +2 -0
  21. package/configuration/interfaces/colorGradingConfiguration.js.map +1 -0
  22. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -0
  23. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +2 -0
  24. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -0
  25. package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -0
  26. package/configuration/interfaces/environmentMapConfiguration.js +2 -0
  27. package/configuration/interfaces/environmentMapConfiguration.js.map +1 -0
  28. package/configuration/interfaces/groundConfiguration.d.ts +24 -0
  29. package/configuration/interfaces/groundConfiguration.js +2 -0
  30. package/configuration/interfaces/groundConfiguration.js.map +1 -0
  31. package/configuration/interfaces/imageProcessingConfiguration.d.ts +45 -0
  32. package/configuration/interfaces/imageProcessingConfiguration.js +2 -0
  33. package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -0
  34. package/configuration/interfaces/index.d.ts +15 -0
  35. package/configuration/interfaces/index.js +16 -0
  36. package/configuration/interfaces/index.js.map +1 -0
  37. package/configuration/interfaces/lightConfiguration.d.ts +60 -0
  38. package/configuration/interfaces/lightConfiguration.js +2 -0
  39. package/configuration/interfaces/lightConfiguration.js.map +1 -0
  40. package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -0
  41. package/configuration/interfaces/modelAnimationConfiguration.js +2 -0
  42. package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -0
  43. package/configuration/interfaces/modelConfiguration.d.ts +65 -0
  44. package/configuration/interfaces/modelConfiguration.js +2 -0
  45. package/configuration/interfaces/modelConfiguration.js.map +1 -0
  46. package/configuration/interfaces/observersConfiguration.d.ts +5 -0
  47. package/configuration/interfaces/observersConfiguration.js +2 -0
  48. package/configuration/interfaces/observersConfiguration.js.map +1 -0
  49. package/configuration/interfaces/sceneConfiguration.d.ts +48 -0
  50. package/configuration/interfaces/sceneConfiguration.js +2 -0
  51. package/configuration/interfaces/sceneConfiguration.js.map +1 -0
  52. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -0
  53. package/configuration/interfaces/sceneOptimizerConfiguration.js +2 -0
  54. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -0
  55. package/configuration/interfaces/skyboxConfiguration.d.ts +21 -0
  56. package/configuration/interfaces/skyboxConfiguration.js +2 -0
  57. package/configuration/interfaces/skyboxConfiguration.js.map +1 -0
  58. package/configuration/interfaces/templateConfiguration.d.ts +67 -0
  59. package/configuration/interfaces/templateConfiguration.js +2 -0
  60. package/configuration/interfaces/templateConfiguration.js.map +1 -0
  61. package/configuration/interfaces/vrConfiguration.d.ts +16 -0
  62. package/configuration/interfaces/vrConfiguration.js +2 -0
  63. package/configuration/interfaces/vrConfiguration.js.map +1 -0
  64. package/configuration/loader.d.ts +4 -0
  65. package/configuration/loader.js +17 -0
  66. package/configuration/loader.js.map +1 -0
  67. package/configuration/mappers.d.ts +43 -0
  68. package/configuration/mappers.js +193 -0
  69. package/configuration/mappers.js.map +1 -0
  70. package/configuration/renderOnlyLoader.d.ts +33 -0
  71. package/configuration/renderOnlyLoader.js +162 -0
  72. package/configuration/renderOnlyLoader.js.map +1 -0
  73. package/configuration/types/default.d.ts +6 -0
  74. package/configuration/types/default.js +121 -0
  75. package/configuration/types/default.js.map +1 -0
  76. package/configuration/types/environmentMap.d.ts +5 -0
  77. package/configuration/types/environmentMap.js +14 -0
  78. package/configuration/types/environmentMap.js.map +1 -0
  79. package/configuration/types/extended.d.ts +6 -0
  80. package/configuration/types/extended.js +317 -0
  81. package/configuration/types/extended.js.map +1 -0
  82. package/configuration/types/index.d.ts +14 -0
  83. package/configuration/types/index.js +51 -0
  84. package/configuration/types/index.js.map +1 -0
  85. package/configuration/types/minimal.d.ts +6 -0
  86. package/configuration/types/minimal.js +43 -0
  87. package/configuration/types/minimal.js.map +1 -0
  88. package/configuration/types/renderOnlyDefault.d.ts +30 -0
  89. package/configuration/types/renderOnlyDefault.js +31 -0
  90. package/configuration/types/renderOnlyDefault.js.map +1 -0
  91. package/configuration/types/shadowLight.d.ts +9 -0
  92. package/configuration/types/shadowLight.js +64 -0
  93. package/configuration/types/shadowLight.js.map +1 -0
  94. package/helper/index.d.ts +29 -0
  95. package/helper/index.js +66 -0
  96. package/helper/index.js.map +1 -0
  97. package/index.d.ts +30 -0
  98. package/index.js +46 -0
  99. package/index.js.map +1 -0
  100. package/initializer.d.ts +11 -0
  101. package/initializer.js +35 -0
  102. package/initializer.js.map +1 -0
  103. package/interfaces.d.ts +5 -0
  104. package/interfaces.js +7 -0
  105. package/interfaces.js.map +1 -0
  106. package/labs/environmentSerializer.d.ts +126 -0
  107. package/labs/environmentSerializer.js +191 -0
  108. package/labs/environmentSerializer.js.map +1 -0
  109. package/labs/texture.d.ts +183 -0
  110. package/labs/texture.js +351 -0
  111. package/labs/texture.js.map +1 -0
  112. package/labs/viewerLabs.d.ts +51 -0
  113. package/labs/viewerLabs.js +134 -0
  114. package/labs/viewerLabs.js.map +1 -0
  115. package/loader/modelLoader.d.ts +56 -0
  116. package/loader/modelLoader.js +202 -0
  117. package/loader/modelLoader.js.map +1 -0
  118. package/loader/plugins/applyMaterialConfig.d.ts +12 -0
  119. package/loader/plugins/applyMaterialConfig.js +16 -0
  120. package/loader/plugins/applyMaterialConfig.js.map +1 -0
  121. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -0
  122. package/loader/plugins/extendedMaterialLoaderPlugin.js +16 -0
  123. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -0
  124. package/loader/plugins/index.d.ts +19 -0
  125. package/loader/plugins/index.js +44 -0
  126. package/loader/plugins/index.js.map +1 -0
  127. package/loader/plugins/loaderPlugin.d.ts +24 -0
  128. package/loader/plugins/loaderPlugin.js +2 -0
  129. package/loader/plugins/loaderPlugin.js.map +1 -0
  130. package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -0
  131. package/loader/plugins/msftLodLoaderPlugin.js +21 -0
  132. package/loader/plugins/msftLodLoaderPlugin.js.map +1 -0
  133. package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -0
  134. package/loader/plugins/telemetryLoaderPlugin.js +36 -0
  135. package/loader/plugins/telemetryLoaderPlugin.js.map +1 -0
  136. package/managers/observablesManager.d.ts +66 -0
  137. package/managers/observablesManager.js +35 -0
  138. package/managers/observablesManager.js.map +1 -0
  139. package/managers/sceneManager.d.ts +245 -0
  140. package/managers/sceneManager.js +1375 -0
  141. package/managers/sceneManager.js.map +1 -0
  142. package/managers/telemetryManager.d.ts +78 -0
  143. package/managers/telemetryManager.js +117 -0
  144. package/managers/telemetryManager.js.map +1 -0
  145. package/model/modelAnimation.d.ts +215 -0
  146. package/model/modelAnimation.js +237 -0
  147. package/model/modelAnimation.js.map +1 -0
  148. package/model/viewerModel.d.ts +233 -0
  149. package/model/viewerModel.js +673 -0
  150. package/model/viewerModel.js.map +1 -0
  151. package/optimizer/custom/extended.d.ts +13 -0
  152. package/optimizer/custom/extended.js +101 -0
  153. package/optimizer/custom/extended.js.map +1 -0
  154. package/optimizer/custom/index.d.ts +9 -0
  155. package/optimizer/custom/index.js +26 -0
  156. package/optimizer/custom/index.js.map +1 -0
  157. package/package.json +28 -19
  158. package/readme.md +28 -28
  159. package/renderOnlyIndex.d.ts +11 -0
  160. package/renderOnlyIndex.js +18 -0
  161. package/renderOnlyIndex.js.map +1 -0
  162. package/templating/eventManager.d.ts +35 -0
  163. package/templating/eventManager.js +66 -0
  164. package/templating/eventManager.js.map +1 -0
  165. package/templating/plugins/hdButtonPlugin.d.ts +9 -0
  166. package/templating/plugins/hdButtonPlugin.js +22 -0
  167. package/templating/plugins/hdButtonPlugin.js.map +1 -0
  168. package/templating/plugins/printButton.d.ts +9 -0
  169. package/templating/plugins/printButton.js +41 -0
  170. package/templating/plugins/printButton.js.map +1 -0
  171. package/templating/templateManager.d.ts +197 -0
  172. package/templating/templateManager.js +561 -0
  173. package/templating/templateManager.js.map +1 -0
  174. package/templating/viewerTemplatePlugin.d.ts +21 -0
  175. package/templating/viewerTemplatePlugin.js +69 -0
  176. package/templating/viewerTemplatePlugin.js.map +1 -0
  177. package/viewer/defaultViewer.d.ts +130 -0
  178. package/viewer/defaultViewer.js +672 -0
  179. package/viewer/defaultViewer.js.map +1 -0
  180. package/viewer/renderOnlyViewer.d.ts +9 -0
  181. package/viewer/renderOnlyViewer.js +46 -0
  182. package/viewer/renderOnlyViewer.js.map +1 -0
  183. package/viewer/viewer.d.ts +258 -0
  184. package/viewer/viewer.js +783 -0
  185. package/viewer/viewer.js.map +1 -0
  186. package/viewer/viewerManager.d.ts +58 -0
  187. package/viewer/viewerManager.js +91 -0
  188. package/viewer/viewerManager.js.map +1 -0
  189. package/viewer/viewerWithTemplate.d.ts +9 -0
  190. package/viewer/viewerWithTemplate.js +20 -0
  191. package/viewer/viewerWithTemplate.js.map +1 -0
  192. package/assets/photoStudio.env +0 -0
  193. package/dist/babylon-viewer.esm.js +0 -2
  194. package/dist/babylon-viewer.esm.js.map +0 -1
  195. package/dist/babylon-viewer.esm.min.js +0 -2
  196. package/dist/babylon-viewer.esm.min.js.map +0 -1
  197. package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js +0 -2
  198. package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js.map +0 -1
  199. package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js +0 -84
  200. package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js.map +0 -1
  201. package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js +0 -171
  202. package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js.map +0 -1
  203. package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js +0 -2
  204. package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js.map +0 -1
  205. package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js +0 -86
  206. package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js.map +0 -1
  207. package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js +0 -2
  208. package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js.map +0 -1
  209. package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js +0 -134
  210. package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js.map +0 -1
  211. package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js +0 -2
  212. package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js.map +0 -1
  213. package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js +0 -2
  214. package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js.map +0 -1
  215. package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js +0 -44
  216. package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js.map +0 -1
  217. package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js +0 -2
  218. package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js.map +0 -1
  219. package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js +0 -43
  220. package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js.map +0 -1
  221. package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js +0 -64
  222. package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js.map +0 -1
  223. package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js +0 -2
  224. package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js.map +0 -1
  225. package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js +0 -2
  226. package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js.map +0 -1
  227. package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js +0 -352
  228. package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js.map +0 -1
  229. package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js +0 -2
  230. package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js.map +0 -1
  231. package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js +0 -610
  232. package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js.map +0 -1
  233. package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js +0 -2
  234. package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js.map +0 -1
  235. package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js +0 -4033
  236. package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js.map +0 -1
  237. package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js +0 -581
  238. package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js.map +0 -1
  239. package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js +0 -2
  240. package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js.map +0 -1
  241. package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js +0 -65
  242. package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js.map +0 -1
  243. package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js +0 -2
  244. package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js.map +0 -1
  245. package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js +0 -2
  246. package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js.map +0 -1
  247. package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js +0 -96
  248. package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js.map +0 -1
  249. package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js +0 -2
  250. package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js.map +0 -1
  251. package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js +0 -97
  252. package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js.map +0 -1
  253. package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js +0 -62
  254. package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js.map +0 -1
  255. package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js +0 -2
  256. package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js.map +0 -1
  257. package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js +0 -55
  258. package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js.map +0 -1
  259. package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js +0 -2
  260. package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js.map +0 -1
  261. package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js +0 -64
  262. package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js.map +0 -1
  263. package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js +0 -2
  264. package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js.map +0 -1
  265. package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js +0 -72
  266. package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js.map +0 -1
  267. package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js +0 -2
  268. package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js.map +0 -1
  269. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js +0 -2
  270. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js.map +0 -1
  271. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js +0 -81
  272. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js.map +0 -1
  273. package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js +0 -85
  274. package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js.map +0 -1
  275. package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js +0 -2
  276. package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js.map +0 -1
  277. package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js +0 -75
  278. package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js.map +0 -1
  279. package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js +0 -2
  280. package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js.map +0 -1
  281. package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js +0 -2
  282. package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js.map +0 -1
  283. package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js +0 -307
  284. package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js.map +0 -1
  285. package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js +0 -2
  286. package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js.map +0 -1
  287. package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js +0 -74
  288. package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js.map +0 -1
  289. package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js +0 -262
  290. package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js.map +0 -1
  291. package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js +0 -2
  292. package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js.map +0 -1
  293. package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js +0 -2
  294. package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js.map +0 -1
  295. package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js +0 -87
  296. package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js.map +0 -1
  297. package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js +0 -2
  298. package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js.map +0 -1
  299. package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js +0 -26
  300. package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js.map +0 -1
  301. package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js +0 -39
  302. package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js.map +0 -1
  303. package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js +0 -2
  304. package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js.map +0 -1
  305. package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js +0 -2
  306. package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js.map +0 -1
  307. package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js +0 -46
  308. package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js.map +0 -1
  309. package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js +0 -43
  310. package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js.map +0 -1
  311. package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js +0 -2
  312. package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js.map +0 -1
  313. package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js +0 -63
  314. package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js.map +0 -1
  315. package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js +0 -2
  316. package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js.map +0 -1
  317. package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js +0 -51
  318. package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js.map +0 -1
  319. package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js +0 -2
  320. package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js.map +0 -1
  321. package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js +0 -2
  322. package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js.map +0 -1
  323. package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js +0 -2201
  324. package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js.map +0 -1
  325. package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js +0 -337
  326. package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js.map +0 -1
  327. package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js +0 -2
  328. package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js.map +0 -1
  329. package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js +0 -2
  330. package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js.map +0 -1
  331. package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js +0 -46
  332. package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js.map +0 -1
  333. package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js +0 -47
  334. package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js.map +0 -1
  335. package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js +0 -2
  336. package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js.map +0 -1
  337. package/dist/chunks/animationGroup-8TJDgymS.esm.js +0 -2482
  338. package/dist/chunks/animationGroup-8TJDgymS.esm.js.map +0 -1
  339. package/dist/chunks/animationGroup-toXtd3a1.esm.min.js +0 -2
  340. package/dist/chunks/animationGroup-toXtd3a1.esm.min.js.map +0 -1
  341. package/dist/chunks/assetContainer-7pMDUaac.esm.min.js +0 -2
  342. package/dist/chunks/assetContainer-7pMDUaac.esm.min.js.map +0 -1
  343. package/dist/chunks/assetContainer-DYzO0AbX.esm.js +0 -1720
  344. package/dist/chunks/assetContainer-DYzO0AbX.esm.js.map +0 -1
  345. package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js +0 -2
  346. package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js.map +0 -1
  347. package/dist/chunks/audioEngine-peiGqjr6.esm.js +0 -305
  348. package/dist/chunks/audioEngine-peiGqjr6.esm.js.map +0 -1
  349. package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js +0 -2
  350. package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js.map +0 -1
  351. package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js +0 -114
  352. package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js.map +0 -1
  353. package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js +0 -600
  354. package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js.map +0 -1
  355. package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js +0 -2
  356. package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js.map +0 -1
  357. package/dist/chunks/dds-6EdM5O6M.esm.js +0 -540
  358. package/dist/chunks/dds-6EdM5O6M.esm.js.map +0 -1
  359. package/dist/chunks/dds-DVX_K9B3.esm.min.js +0 -2
  360. package/dist/chunks/dds-DVX_K9B3.esm.min.js.map +0 -1
  361. package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js +0 -2
  362. package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js.map +0 -1
  363. package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js +0 -88
  364. package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js.map +0 -1
  365. package/dist/chunks/decalFragment-C_Cews3-.esm.js +0 -18
  366. package/dist/chunks/decalFragment-C_Cews3-.esm.js.map +0 -1
  367. package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js +0 -2
  368. package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js.map +0 -1
  369. package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js +0 -2
  370. package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js.map +0 -1
  371. package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js +0 -2
  372. package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js.map +0 -1
  373. package/dist/chunks/default.fragment-CyFHDykY.esm.js +0 -446
  374. package/dist/chunks/default.fragment-CyFHDykY.esm.js.map +0 -1
  375. package/dist/chunks/default.fragment-ej-2z5tS.esm.js +0 -515
  376. package/dist/chunks/default.fragment-ej-2z5tS.esm.js.map +0 -1
  377. package/dist/chunks/default.vertex-16mVOFgT.esm.js +0 -211
  378. package/dist/chunks/default.vertex-16mVOFgT.esm.js.map +0 -1
  379. package/dist/chunks/default.vertex-D--q2At3.esm.min.js +0 -2
  380. package/dist/chunks/default.vertex-D--q2At3.esm.min.js.map +0 -1
  381. package/dist/chunks/default.vertex-DDlgZTrR.esm.js +0 -190
  382. package/dist/chunks/default.vertex-DDlgZTrR.esm.js.map +0 -1
  383. package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js +0 -2
  384. package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js.map +0 -1
  385. package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js +0 -15
  386. package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js.map +0 -1
  387. package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js +0 -13
  388. package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js.map +0 -1
  389. package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js +0 -2
  390. package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js.map +0 -1
  391. package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js +0 -2
  392. package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js.map +0 -1
  393. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +0 -11
  394. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +0 -1
  395. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +0 -2
  396. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +0 -1
  397. package/dist/chunks/dumpTools-Bhux0wvM.esm.js +0 -200
  398. package/dist/chunks/dumpTools-Bhux0wvM.esm.js.map +0 -1
  399. package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js +0 -2
  400. package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js.map +0 -1
  401. package/dist/chunks/engine-DF_zE4qj.esm.js +0 -2213
  402. package/dist/chunks/engine-DF_zE4qj.esm.js.map +0 -1
  403. package/dist/chunks/engine-DVmdDcyP.esm.min.js +0 -2
  404. package/dist/chunks/engine-DVmdDcyP.esm.min.js.map +0 -1
  405. package/dist/chunks/engine.common-CvOmoKru.esm.js +0 -1162
  406. package/dist/chunks/engine.common-CvOmoKru.esm.js.map +0 -1
  407. package/dist/chunks/engine.common-DpTzktQJ.esm.min.js +0 -2
  408. package/dist/chunks/engine.common-DpTzktQJ.esm.min.js.map +0 -1
  409. package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js +0 -64
  410. package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js.map +0 -1
  411. package/dist/chunks/envTextureLoader-DMQui088.esm.min.js +0 -2
  412. package/dist/chunks/envTextureLoader-DMQui088.esm.min.js.map +0 -1
  413. package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js +0 -2
  414. package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js.map +0 -1
  415. package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js +0 -382
  416. package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js.map +0 -1
  417. package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js +0 -1683
  418. package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js.map +0 -1
  419. package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js +0 -2
  420. package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js.map +0 -1
  421. package/dist/chunks/fogFragment-BrGGFaiu.esm.js +0 -101
  422. package/dist/chunks/fogFragment-BrGGFaiu.esm.js.map +0 -1
  423. package/dist/chunks/fogFragment-ByOwwQur.esm.min.js +0 -2
  424. package/dist/chunks/fogFragment-ByOwwQur.esm.min.js.map +0 -1
  425. package/dist/chunks/fogFragment-Chod24nu.esm.min.js +0 -2
  426. package/dist/chunks/fogFragment-Chod24nu.esm.min.js.map +0 -1
  427. package/dist/chunks/fogFragment-gZfybCpt.esm.js +0 -102
  428. package/dist/chunks/fogFragment-gZfybCpt.esm.js.map +0 -1
  429. package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js +0 -2
  430. package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js.map +0 -1
  431. package/dist/chunks/fresnelFunction-DBlxfmri.esm.js +0 -12
  432. package/dist/chunks/fresnelFunction-DBlxfmri.esm.js.map +0 -1
  433. package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js +0 -2
  434. package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js.map +0 -1
  435. package/dist/chunks/glTFLoader-fUFiWvYb.esm.js +0 -7693
  436. package/dist/chunks/glTFLoader-fUFiWvYb.esm.js.map +0 -1
  437. package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js +0 -2
  438. package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js.map +0 -1
  439. package/dist/chunks/glTFLoaderAnimation-CttmY50U.esm.js +0 -77
  440. package/dist/chunks/glTFLoaderAnimation-CttmY50U.esm.js.map +0 -1
  441. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +0 -2
  442. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +0 -1
  443. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +0 -67
  444. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +0 -1
  445. package/dist/chunks/harmonicsFunctions-B0Rp1hEo.esm.min.js +0 -2
  446. package/dist/chunks/harmonicsFunctions-B0Rp1hEo.esm.min.js.map +0 -1
  447. package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js +0 -34
  448. package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js.map +0 -1
  449. package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js +0 -2
  450. package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js.map +0 -1
  451. package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js +0 -35
  452. package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js.map +0 -1
  453. package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js +0 -253
  454. package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js.map +0 -1
  455. package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js +0 -2
  456. package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js.map +0 -1
  457. package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js +0 -2
  458. package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js.map +0 -1
  459. package/dist/chunks/helperFunctions-C66wRWtu.esm.js +0 -110
  460. package/dist/chunks/helperFunctions-C66wRWtu.esm.js.map +0 -1
  461. package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js +0 -2
  462. package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js.map +0 -1
  463. package/dist/chunks/helperFunctions-gnki_9Kj.esm.js +0 -83
  464. package/dist/chunks/helperFunctions-gnki_9Kj.esm.js.map +0 -1
  465. package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js +0 -189
  466. package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js.map +0 -1
  467. package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js +0 -2
  468. package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js.map +0 -1
  469. package/dist/chunks/index-C6hXZyZb.esm.js +0 -74889
  470. package/dist/chunks/index-C6hXZyZb.esm.js.map +0 -1
  471. package/dist/chunks/index-rZVkfTE6.esm.min.js +0 -57
  472. package/dist/chunks/index-rZVkfTE6.esm.min.js.map +0 -1
  473. package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js +0 -814
  474. package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js.map +0 -1
  475. package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js +0 -2
  476. package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js.map +0 -1
  477. package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js +0 -2
  478. package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js.map +0 -1
  479. package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js +0 -11
  480. package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js.map +0 -1
  481. package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js +0 -2
  482. package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js.map +0 -1
  483. package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js +0 -35
  484. package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js.map +0 -1
  485. package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js +0 -2
  486. package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js.map +0 -1
  487. package/dist/chunks/logDepthVertex-DKPfA10X.esm.js +0 -81
  488. package/dist/chunks/logDepthVertex-DKPfA10X.esm.js.map +0 -1
  489. package/dist/chunks/logDepthVertex-ojTShW5I.esm.js +0 -77
  490. package/dist/chunks/logDepthVertex-ojTShW5I.esm.js.map +0 -1
  491. package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js +0 -2
  492. package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js.map +0 -1
  493. package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js +0 -2
  494. package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js.map +0 -1
  495. package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js +0 -11
  496. package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js.map +0 -1
  497. package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js +0 -2
  498. package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js.map +0 -1
  499. package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.esm.js +0 -11
  500. package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.esm.js.map +0 -1
  501. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +0 -119
  502. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +0 -1
  503. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +0 -2
  504. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +0 -1
  505. package/dist/chunks/meshUboDeclaration-QvH0RgeZ.esm.js +0 -26
  506. package/dist/chunks/meshUboDeclaration-QvH0RgeZ.esm.js.map +0 -1
  507. package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js +0 -2
  508. package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js.map +0 -1
  509. package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js +0 -2
  510. package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js.map +0 -1
  511. package/dist/chunks/objFileLoader-BPwrX8RK.esm.js +0 -1338
  512. package/dist/chunks/objFileLoader-BPwrX8RK.esm.js.map +0 -1
  513. package/dist/chunks/oitFragment-CmcWUhsZ.esm.js +0 -1240
  514. package/dist/chunks/oitFragment-CmcWUhsZ.esm.js.map +0 -1
  515. package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js +0 -1078
  516. package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js.map +0 -1
  517. package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js +0 -2
  518. package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js.map +0 -1
  519. package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js +0 -2
  520. package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js.map +0 -1
  521. package/dist/chunks/pass.fragment--XRaXRhU.esm.js +0 -15
  522. package/dist/chunks/pass.fragment--XRaXRhU.esm.js.map +0 -1
  523. package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js +0 -2
  524. package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js.map +0 -1
  525. package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js +0 -2
  526. package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js.map +0 -1
  527. package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js +0 -15
  528. package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js.map +0 -1
  529. package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js +0 -3269
  530. package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js.map +0 -1
  531. package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js +0 -2
  532. package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js.map +0 -1
  533. package/dist/chunks/pbr.fragment-fky04gH_.esm.js +0 -3222
  534. package/dist/chunks/pbr.fragment-fky04gH_.esm.js.map +0 -1
  535. package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js +0 -2
  536. package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js.map +0 -1
  537. package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js +0 -223
  538. package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js.map +0 -1
  539. package/dist/chunks/pbr.vertex-BXcMYADF.esm.js +0 -348
  540. package/dist/chunks/pbr.vertex-BXcMYADF.esm.js.map +0 -1
  541. package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js +0 -2
  542. package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js.map +0 -1
  543. package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js +0 -2
  544. package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js.map +0 -1
  545. package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js +0 -2
  546. package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js.map +0 -1
  547. package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js +0 -20
  548. package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js.map +0 -1
  549. package/dist/chunks/rawTexture-CWiRIto8.esm.js +0 -191
  550. package/dist/chunks/rawTexture-CWiRIto8.esm.js.map +0 -1
  551. package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js +0 -2
  552. package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js.map +0 -1
  553. package/dist/chunks/ray-ix7SqYNQ.esm.min.js +0 -2
  554. package/dist/chunks/ray-ix7SqYNQ.esm.min.js.map +0 -1
  555. package/dist/chunks/ray-nTZBkOil.esm.js +0 -946
  556. package/dist/chunks/ray-nTZBkOil.esm.js.map +0 -1
  557. package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js +0 -2
  558. package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js.map +0 -1
  559. package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js +0 -13
  560. package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js.map +0 -1
  561. package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js +0 -2
  562. package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js.map +0 -1
  563. package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js +0 -13
  564. package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js.map +0 -1
  565. package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js +0 -13
  566. package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js.map +0 -1
  567. package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js +0 -2
  568. package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js.map +0 -1
  569. package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js +0 -13
  570. package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js.map +0 -1
  571. package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js +0 -2
  572. package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js.map +0 -1
  573. package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js +0 -2
  574. package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js.map +0 -1
  575. package/dist/chunks/splatFileLoader-Dp33YOem.esm.js +0 -3379
  576. package/dist/chunks/splatFileLoader-Dp33YOem.esm.js.map +0 -1
  577. package/dist/chunks/spotLight-C0NmKeem.esm.js +0 -701
  578. package/dist/chunks/spotLight-C0NmKeem.esm.js.map +0 -1
  579. package/dist/chunks/spotLight-CcuCNdES.esm.min.js +0 -2
  580. package/dist/chunks/spotLight-CcuCNdES.esm.min.js.map +0 -1
  581. package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js +0 -2
  582. package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js.map +0 -1
  583. package/dist/chunks/standardMaterial-v_D8QA4q.esm.js +0 -1807
  584. package/dist/chunks/standardMaterial-v_D8QA4q.esm.js.map +0 -1
  585. package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js +0 -2
  586. package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js.map +0 -1
  587. package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js +0 -238
  588. package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js.map +0 -1
  589. package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js +0 -349
  590. package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js.map +0 -1
  591. package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js +0 -2
  592. package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js.map +0 -1
  593. package/dist/chunks/thinEngine-DksimP2U.esm.js +0 -3848
  594. package/dist/chunks/thinEngine-DksimP2U.esm.js.map +0 -1
  595. package/dist/chunks/thinEngine-tsALaFYH.esm.min.js +0 -2
  596. package/dist/chunks/thinEngine-tsALaFYH.esm.min.js.map +0 -1
  597. package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js +0 -314
  598. package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js.map +0 -1
  599. package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js +0 -2
  600. package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js.map +0 -1
  601. package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js +0 -2
  602. package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js.map +0 -1
  603. package/dist/chunks/vertexColorMixing-D9917nJN.esm.js +0 -428
  604. package/dist/chunks/vertexColorMixing-D9917nJN.esm.js.map +0 -1
  605. package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js +0 -2
  606. package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js.map +0 -1
  607. package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js +0 -538
  608. package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js.map +0 -1
  609. package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js +0 -2
  610. package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js.map +0 -1
  611. package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js +0 -11533
  612. package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js.map +0 -1
  613. package/dist/chunks/workerPool-BUOov2K1.esm.js +0 -122
  614. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +0 -1
  615. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +0 -2
  616. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +0 -1
  617. package/lib/index.d.ts +0 -591
  618. package/lib/index.js +0 -2165
  619. package/lib/index.js.map +0 -1
@@ -1,191 +0,0 @@
1
- import { t as Texture, C as Constants } from './index-C6hXZyZb.esm.js';
2
-
3
- /**
4
- * Raw texture can help creating a texture directly from an array of data.
5
- * This can be super useful if you either get the data from an uncompressed source or
6
- * if you wish to create your texture pixel by pixel.
7
- */
8
- class RawTexture extends Texture {
9
- /**
10
- * Instantiates a new RawTexture.
11
- * Raw texture can help creating a texture directly from an array of data.
12
- * This can be super useful if you either get the data from an uncompressed source or
13
- * if you wish to create your texture pixel by pixel.
14
- * @param data define the array of data to use to create the texture (null to create an empty texture)
15
- * @param width define the width of the texture
16
- * @param height define the height of the texture
17
- * @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)
18
- * @param sceneOrEngine defines the scene or engine the texture will belong to
19
- * @param generateMipMaps define whether mip maps should be generated or not
20
- * @param invertY define if the data should be flipped on Y when uploaded to the GPU
21
- * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
22
- * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
23
- * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
24
- * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
25
- */
26
- constructor(data, width, height,
27
- /**
28
- * Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)
29
- */
30
- format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags, useSRGBBuffer) {
31
- super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);
32
- this.format = format;
33
- if (!this._engine) {
34
- return;
35
- }
36
- if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {
37
- samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
38
- }
39
- if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {
40
- samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
41
- }
42
- this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);
43
- this.wrapU = Texture.CLAMP_ADDRESSMODE;
44
- this.wrapV = Texture.CLAMP_ADDRESSMODE;
45
- }
46
- /**
47
- * Updates the texture underlying data.
48
- * @param data Define the new data of the texture
49
- */
50
- update(data) {
51
- this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);
52
- }
53
- /**
54
- * Clones the texture.
55
- * @returns the cloned texture
56
- */
57
- clone() {
58
- if (!this._texture) {
59
- return super.clone();
60
- }
61
- 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);
62
- rawTexture._texture = this._texture;
63
- this._texture.incrementReferences();
64
- return rawTexture;
65
- }
66
- /**
67
- * Creates a luminance texture from some data.
68
- * @param data Define the texture data
69
- * @param width Define the width of the texture
70
- * @param height Define the height of the texture
71
- * @param sceneOrEngine defines the scene or engine the texture will belong to
72
- * @param generateMipMaps Define whether or not to create mip maps for the texture
73
- * @param invertY define if the data should be flipped on Y when uploaded to the GPU
74
- * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
75
- * @returns the luminance texture
76
- */
77
- static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
78
- return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);
79
- }
80
- /**
81
- * Creates a luminance alpha texture from some data.
82
- * @param data Define the texture data
83
- * @param width Define the width of the texture
84
- * @param height Define the height of the texture
85
- * @param sceneOrEngine defines the scene or engine the texture will belong to
86
- * @param generateMipMaps Define whether or not to create mip maps for the texture
87
- * @param invertY define if the data should be flipped on Y when uploaded to the GPU
88
- * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
89
- * @returns the luminance alpha texture
90
- */
91
- static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
92
- return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);
93
- }
94
- /**
95
- * Creates an alpha texture from some data.
96
- * @param data Define the texture data
97
- * @param width Define the width of the texture
98
- * @param height Define the height of the texture
99
- * @param sceneOrEngine defines the scene or engine the texture will belong to
100
- * @param generateMipMaps Define whether or not to create mip maps for the texture
101
- * @param invertY define if the data should be flipped on Y when uploaded to the GPU
102
- * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
103
- * @returns the alpha texture
104
- */
105
- static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
106
- return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);
107
- }
108
- /**
109
- * Creates a RGB texture from some data.
110
- * @param data Define the texture data
111
- * @param width Define the width of the texture
112
- * @param height Define the height of the texture
113
- * @param sceneOrEngine defines the scene or engine the texture will belong to
114
- * @param generateMipMaps Define whether or not to create mip maps for the texture
115
- * @param invertY define if the data should be flipped on Y when uploaded to the GPU
116
- * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
117
- * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
118
- * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
119
- * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
120
- * @returns the RGB alpha texture
121
- */
122
- static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags = 0, useSRGBBuffer = false) {
123
- return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);
124
- }
125
- /**
126
- * Creates a RGBA texture from some data.
127
- * @param data Define the texture data
128
- * @param width Define the width of the texture
129
- * @param height Define the height of the texture
130
- * @param sceneOrEngine defines the scene or engine the texture will belong to
131
- * @param generateMipMaps Define whether or not to create mip maps for the texture
132
- * @param invertY define if the data should be flipped on Y when uploaded to the GPU
133
- * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
134
- * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
135
- * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
136
- * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
137
- * @returns the RGBA texture
138
- */
139
- static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags = 0, useSRGBBuffer = false) {
140
- return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);
141
- }
142
- /**
143
- * Creates a RGBA storage texture from some data.
144
- * @param data Define the texture data
145
- * @param width Define the width of the texture
146
- * @param height Define the height of the texture
147
- * @param sceneOrEngine defines the scene or engine the texture will belong to
148
- * @param generateMipMaps Define whether or not to create mip maps for the texture
149
- * @param invertY define if the data should be flipped on Y when uploaded to the GPU
150
- * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
151
- * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
152
- * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
153
- * @returns the RGBA texture
154
- */
155
- static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, useSRGBBuffer = false) {
156
- return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);
157
- }
158
- /**
159
- * Creates a R texture from some data.
160
- * @param data Define the texture data
161
- * @param width Define the width of the texture
162
- * @param height Define the height of the texture
163
- * @param sceneOrEngine defines the scene or engine the texture will belong to
164
- * @param generateMipMaps Define whether or not to create mip maps for the texture
165
- * @param invertY define if the data should be flipped on Y when uploaded to the GPU
166
- * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
167
- * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
168
- * @returns the R texture
169
- */
170
- static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {
171
- return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);
172
- }
173
- /**
174
- * Creates a R storage texture from some data.
175
- * @param data Define the texture data
176
- * @param width Define the width of the texture
177
- * @param height Define the height of the texture
178
- * @param sceneOrEngine defines the scene or engine the texture will belong to
179
- * @param generateMipMaps Define whether or not to create mip maps for the texture
180
- * @param invertY define if the data should be flipped on Y when uploaded to the GPU
181
- * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
182
- * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
183
- * @returns the R texture
184
- */
185
- static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {
186
- return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);
187
- }
188
- }
189
-
190
- export { RawTexture as R };
191
- //# sourceMappingURL=rawTexture-CWiRIto8.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rawTexture-CWiRIto8.esm.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawTexture.js"],"sourcesContent":["import { Texture } from \"./texture\";\nimport { Constants } from \"../../Engines/constants\";\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_BYTE, 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_BYTE, 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_BYTE, 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_BYTE, 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":";;AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,UAAU,SAAS,OAAO,CAAC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM;AACnC;AACA;AACA;AACA,IAAI,MA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GAAG,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,sBAAsB,EAAE,IAAI,GAAG,SAAS,CAAC,iBAAiB,EAAE;AAC1L,QAAQ,OAAO,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,qBAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,GAAG,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,sBAAsB,EAAE,IAAI,GAAG,SAAS,CAAC,iBAAiB,EAAE;AACjM,QAAQ,OAAO,IAAI,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;AAClL;AACA;;;;"}
@@ -1,2 +0,0 @@
1
- import{t as e,C as t}from"./index-rZVkfTE6.esm.min.js";class E extends e{constructor(E,T,r,R,_,i=!0,n=!1,A=t.TEXTURE_TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_UNSIGNED_BYTE,u,a){super(null,_,!i,n,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,u),this.format=R,this._engine&&(this._engine._caps.textureFloatLinearFiltering||s!==t.TEXTURETYPE_FLOAT||(A=t.TEXTURE_NEAREST_SAMPLINGMODE),this._engine._caps.textureHalfFloatLinearFiltering||s!==t.TEXTURETYPE_HALF_FLOAT||(A=t.TEXTURE_NEAREST_SAMPLINGMODE),this._texture=this._engine.createRawTexture(E,T,r,R,i,n,A,null,s,u??0,a??!1),this.wrapU=e.CLAMP_ADDRESSMODE,this.wrapV=e.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 E(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,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new E(e,T,r,t.TEXTUREFORMAT_LUMINANCE,R,_,i,n)}static CreateLuminanceAlphaTexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new E(e,T,r,t.TEXTUREFORMAT_LUMINANCE_ALPHA,R,_,i,n)}static CreateAlphaTexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new E(e,T,r,t.TEXTUREFORMAT_ALPHA,R,_,i,n)}static CreateRGBTexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_BYTE,s=0,u=!1){return new E(e,T,r,t.TEXTUREFORMAT_RGB,R,_,i,n,A,s,u)}static CreateRGBATexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_BYTE,s=0,u=!1){return new E(e,T,r,t.TEXTUREFORMAT_RGBA,R,_,i,n,A,s,u)}static CreateRGBAStorageTexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_BYTE,s=!1){return new E(e,T,r,t.TEXTUREFORMAT_RGBA,R,_,i,n,A,t.TEXTURE_CREATIONFLAG_STORAGE,s)}static CreateRTexture(T,r,R,_,i=!0,n=!1,A=e.TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_FLOAT){return new E(T,r,R,t.TEXTUREFORMAT_R,_,i,n,A,s)}static CreateRStorageTexture(T,r,R,_,i=!0,n=!1,A=e.TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_FLOAT){return new E(T,r,R,t.TEXTUREFORMAT_R,_,i,n,A,s,t.TEXTURE_CREATIONFLAG_STORAGE)}}export{E as R};
2
- //# sourceMappingURL=rawTexture-DX8V9PEj.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rawTexture-DX8V9PEj.esm.min.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawTexture.js"],"sourcesContent":["import { Texture } from \"./texture\";\nimport { Constants } from \"../../Engines/constants\";\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_BYTE, 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_BYTE, 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_BYTE, 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_BYTE, 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":["RawTexture","Texture","constructor","data","width","height","format","sceneOrEngine","generateMipMaps","invertY","samplingMode","Constants","TEXTURE_TRILINEAR_SAMPLINGMODE","type","TEXTURETYPE_UNSIGNED_BYTE","creationFlags","useSRGBBuffer","super","undefined","this","_engine","_caps","textureFloatLinearFiltering","TEXTURETYPE_FLOAT","TEXTURE_NEAREST_SAMPLINGMODE","textureHalfFloatLinearFiltering","TEXTURETYPE_HALF_FLOAT","_texture","createRawTexture","wrapU","CLAMP_ADDRESSMODE","wrapV","update","_getEngine","updateRawTexture","_useSRGBBuffer","clone","rawTexture","getSize","getScene","_invertY","_creationFlags","incrementReferences","CreateLuminanceTexture","TEXTUREFORMAT_LUMINANCE","CreateLuminanceAlphaTexture","TEXTUREFORMAT_LUMINANCE_ALPHA","CreateAlphaTexture","TEXTUREFORMAT_ALPHA","CreateRGBTexture","TEXTUREFORMAT_RGB","CreateRGBATexture","TEXTUREFORMAT_RGBA","CreateRGBAStorageTexture","TEXTURE_CREATIONFLAG_STORAGE","CreateRTexture","TRILINEAR_SAMPLINGMODE","TEXTUREFORMAT_R","CreateRStorageTexture"],"mappings":"uDAOO,MAAMA,UAAmBC,EAkB5B,WAAAC,CAAYC,EAAMC,EAAOC,EAIzBC,EAAQC,EAAeC,GAAkB,EAAMC,GAAU,EAAOC,EAAeC,EAAUC,+BAAgCC,EAAOF,EAAUG,0BAA2BC,EAAeC,GAChLC,MAAM,KAAMV,GAAgBC,EAAiBC,OAASS,OAAWA,OAAWA,OAAWA,OAA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3C,EAAOF,EAAUY,mBAC/J,OAAO,IAAIvB,EAAWG,EAAMC,EAAOC,EAAQM,EAAU8C,gBAAiBlD,EAAeC,EAAiBC,EAASC,EAAcG,EACrI,CAaI,4BAAO6C,CAAsBvD,EAAMC,EAAOC,EAAQE,EAAeC,GAAkB,EAAMC,GAAU,EAAOC,EAAeT,EAAQuD,uBAAwB3C,EAAOF,EAAUY,mBACtK,OAAO,IAAIvB,EAAWG,EAAMC,EAAOC,EAAQM,EAAU8C,gBAAiBlD,EAAeC,EAAiBC,EAASC,EAAcG,EAAMF,EAAU2C,6BACrJ"}
@@ -1,2 +0,0 @@
1
- import{ag as t,v as e,ah as i,ai as n,a7 as r,a5 as o,E as s,aj as a,ak as c,al as h,Y as l}from"./index-rZVkfTE6.esm.min.js";class u{constructor(t,e,n=Number.MAX_VALUE,r=i){this.origin=t,this.direction=e,this.length=n,this.epsilon=r}clone(){return new u(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(t,e,i=0){const n=u._TmpVector3[0].copyFromFloats(t.x-i,t.y-i,t.z-i),r=u._TmpVector3[1].copyFromFloats(e.x+i,e.y+i,e.z+i);let o,s,a,c,h=0,l=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<n.x||this.origin.x>r.x)return!1}else if(o=1/this.direction.x,s=(n.x-this.origin.x)*o,a=(r.x-this.origin.x)*o,a===-1/0&&(a=1/0),s>a&&(c=s,s=a,a=c),h=Math.max(s,h),l=Math.min(a,l),h>l)return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<n.y||this.origin.y>r.y)return!1}else if(o=1/this.direction.y,s=(n.y-this.origin.y)*o,a=(r.y-this.origin.y)*o,a===-1/0&&(a=1/0),s>a&&(c=s,s=a,a=c),h=Math.max(s,h),l=Math.min(a,l),h>l)return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<n.z||this.origin.z>r.z)return!1}else if(o=1/this.direction.z,s=(n.z-this.origin.z)*o,a=(r.z-this.origin.z)*o,a===-1/0&&(a=1/0),s>a&&(c=s,s=a,a=c),h=Math.max(s,h),l=Math.min(a,l),h>l)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,n=t.center.y-this.origin.y,r=t.center.z-this.origin.z,o=i*i+n*n+r*r,s=t.radius+e,a=s*s;if(o<=a)return!0;const c=i*this.direction.x+n*this.direction.y+r*this.direction.z;if(c<0)return!1;return o-c*c<=a}intersectsTriangle(t,i,r){const o=u._TmpVector3[0],s=u._TmpVector3[1],a=u._TmpVector3[2],c=u._TmpVector3[3],h=u._TmpVector3[4];i.subtractToRef(t,o),r.subtractToRef(t,s),e.CrossToRef(this.direction,s,a);const l=e.Dot(o,a);if(0===l)return null;const f=1/l;this.origin.subtractToRef(t,c);const m=e.Dot(c,a)*f;if(m<-this.epsilon||m>1+this.epsilon)return null;e.CrossToRef(c,o,h);const y=e.Dot(this.direction,h)*f;if(y<-this.epsilon||m+y>1+this.epsilon)return null;const d=e.Dot(s,h)*f;return d>this.length?null:new n(1-m-y,m,d)}intersectsPlane(t){let i;const n=e.Dot(t.normal,this.direction);if(Math.abs(n)<9.99999997475243e-7)return null;{const r=e.Dot(t.normal,this.origin);return i=(-t.d-r)/n,i<0?i<-9.99999997475243e-7?null:0:i}}intersectsAxis(t,i=0){switch(t){case"y":{const t=(this.origin.y-i)/this.direction.y;return t>0?null:new e(this.origin.x+this.direction.x*-t,i,this.origin.z+this.direction.z*-t)}case"x":{const t=(this.origin.x-i)/this.direction.x;return t>0?null:new e(i,this.origin.y+this.direction.y*-t,this.origin.z+this.direction.z*-t)}case"z":{const t=(this.origin.z-i)/this.direction.z;return t>0?null:new e(this.origin.x+this.direction.x*-t,this.origin.y+this.direction.y*-t,i)}default:return null}}intersectsMesh(t,e,i,n=!1,o,s=!1){const a=r.Matrix[0];return t.getWorldMatrix().invertToRef(a),this._tmpRay?u.TransformToRef(this,a,this._tmpRay):this._tmpRay=u.Transform(this,a),t.intersects(this._tmpRay,e,i,n,o,s)}intersectsMeshes(t,e,i){i?i.length=0:i=[];for(let n=0;n<t.length;n++){const r=this.intersectsMesh(t[n],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,i,n){const o=this.origin,s=r.Vector3[0],a=r.Vector3[1],c=r.Vector3[2],h=r.Vector3[3];i.subtractToRef(t,s),this.direction.scaleToRef(u._Rayl,c),o.addToRef(c,a),t.subtractToRef(o,h);const l=e.Dot(s,s),f=e.Dot(s,c),m=e.Dot(c,c),y=e.Dot(s,h),d=e.Dot(c,h),g=l*m-f*f;let R,p,T=g,x=g;g<u._Smallnum?(R=0,T=1,p=d,x=m):(R=f*d-m*y,p=l*d-f*y,R<0?(R=0,p=d,x=m):R>T&&(R=T,p=d+f,x=m)),p<0?(p=0,-y<0?R=0:-y>l?R=T:(R=-y,T=l)):p>x&&(p=x,-y+f<0?R=0:-y+f>l?R=T:(R=-y+f,T=l));const _=Math.abs(R)<u._Smallnum?0:R/T,M=Math.abs(p)<u._Smallnum?0:p/x,I=r.Vector3[4];c.scaleToRef(M,I);const k=r.Vector3[5];s.scaleToRef(_,k),k.addInPlace(h);const v=r.Vector3[6];k.subtractToRef(I,v);return M>0&&M<=this.length&&v.lengthSquared()<n*n?k.length():-1}update(t,e,i,n,s,a,c,h=!1){if(h){u._RayDistant||(u._RayDistant=u.Zero()),u._RayDistant.unprojectRayToRef(t,e,i,n,o.IdentityReadOnly,a,c);const h=r.Matrix[0];s.invertToRef(h),u.TransformToRef(u._RayDistant,h,this)}else this.unprojectRayToRef(t,e,i,n,s,a,c);return this}static Zero(){return new u(e.Zero(),e.Zero())}static CreateNew(t,e,i,n,r,o,s){return u.Zero().update(t,e,i,n,r,o,s)}static CreateNewFromTo(t,i,n=o.IdentityReadOnly){const r=new u(new e(0,0,0),new e(0,0,0));return u.CreateFromToToRef(t,i,r,n)}static CreateFromToToRef(t,e,i,n=o.IdentityReadOnly){i.origin.copyFrom(t);const r=e.subtractToRef(t,i.direction),s=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);return i.length=s,i.direction.normalize(),u.TransformToRef(i,n,i)}static Transform(t,i){const n=new u(new e(0,0,0),new e(0,0,0));return u.TransformToRef(t,i,n),n}static TransformToRef(t,i,n){e.TransformCoordinatesToRef(t.origin,i,n.origin),e.TransformNormalToRef(t.direction,i,n.direction),n.length=t.length,n.epsilon=t.epsilon;const r=n.direction,o=r.length();if(0!==o&&1!==o){const t=1/o;r.x*=t,r.y*=t,r.z*=t,n.length*=o}return n}unprojectRayToRef(t,i,n,o,a,c,h){const l=r.Matrix[0];a.multiplyToRef(c,l),l.multiplyToRef(h,l),l.invert();const u=s.LastCreatedEngine,f=r.Vector3[0];f.x=t/n*2-1,f.y=-(i/o*2-1),f.z=u?.useReverseDepthBuffer?1:u?.isNDCHalfZRange?0:-1;const m=r.Vector3[1].copyFromFloats(f.x,f.y,1-1e-8),y=r.Vector3[2],d=r.Vector3[3];e._UnprojectFromInvertedMatrixToRef(f,l,y),e._UnprojectFromInvertedMatrixToRef(m,l,d),this.origin.copyFrom(y),d.subtractToRef(y,this.direction),this.direction.normalize()}}function f(t,e,i,n,r,o=!1){const s=u.Zero();return m(t,e,i,n,s,r,o),s}function m(t,e,i,n,r,s,a=!1,c=!1){const h=t.getEngine();if(!s&&!(s=t.activeCamera))return t;const l=s.viewport,u=h.getRenderHeight(),{x:f,y:m,width:y,height:d}=l.toGlobal(h.getRenderWidth(),u),g=1/h.getHardwareScalingLevel();return e=e*g-f,i=i*g-(u-m-d),r.update(e,i,y,d,n||o.IdentityReadOnly,a?o.IdentityReadOnly:s.getViewMatrix(),s.getProjectionMatrix(),c),t}function y(t,e,i,n){const r=u.Zero();return d(t,e,i,r,n),r}function d(t,e,i,n,r){if(!a)return t;const s=t.getEngine();if(!r&&!(r=t.activeCamera))throw new Error("Active camera not set");const c=r.viewport,h=s.getRenderHeight(),{x:l,y:u,width:f,height:m}=c.toGlobal(s.getRenderWidth(),h),y=o.Identity(),d=1/s.getHardwareScalingLevel();return e=e*d-l,i=i*d-(h-u-m),n.update(e,i,f,m,y,y,r.getProjectionMatrix()),t}function g(t,e,i,n,r,o,s,a){const c=e(n,i.enableDistantPicking),h=i.intersects(c,r,s,o,n,a);return h&&h.hit?!r&&null!=t&&h.distance>=t.distance?null:h:null}function R(t,e,i,n,o,s){let c=null;const h=!!(t.activeCameras&&t.activeCameras.length>1&&t.cameraToUseForPointers!==t.activeCamera),l=t.cameraToUseForPointers||t.activeCamera,u=g;for(let a=0;a<t.meshes.length;a++){const f=t.meshes[a];if(i){if(!i(f,-1))continue}else if(!f.isEnabled()||!f.isVisible||!f.isPickable)continue;const m=h&&f.isWorldMatrixCameraDependent(),y=f.computeWorldMatrix(m,l);if(f.hasThinInstances&&f.thinInstanceEnablePicking){const t=u(c,e,f,y,!0,!0,s);if(t){if(o)return t;const a=r.Matrix[1],h=f.thinInstanceGetWorldMatrices();for(let t=0;t<h.length;t++){if(i&&!i(f,t))continue;h[t].multiplyToRef(y,a);const r=u(c,e,f,a,n,o,s,!0);if(r&&(c=r,c.thinInstanceIndex=t,n))return c}}}else{const t=u(c,e,f,y,n,o,s);if(t&&(c=t,n))return c}}return c||new a}function p(t,e,i,n){if(!a)return null;const o=[],s=!!(t.activeCameras&&t.activeCameras.length>1&&t.cameraToUseForPointers!==t.activeCamera),c=t.cameraToUseForPointers||t.activeCamera,h=g;for(let a=0;a<t.meshes.length;a++){const l=t.meshes[a];if(i){if(!i(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;const u=s&&l.isWorldMatrixCameraDependent(),f=l.computeWorldMatrix(u,c);if(l.hasThinInstances&&l.thinInstanceEnablePicking){if(h(null,e,l,f,!0,!0,n)){const t=r.Matrix[1],s=l.thinInstanceGetWorldMatrices();for(let r=0;r<s.length;r++){if(i&&!i(l,r))continue;s[r].multiplyToRef(f,t);const a=h(null,e,l,t,!1,!1,n,!0);a&&(a.thinInstanceIndex=r,o.push(a))}}}else{const t=h(null,e,l,f,!1,!1,n);t&&o.push(t)}}return o}function T(t,e,i,n,r,s){if(!a)return null;const c=R(t,(n=>(t._tempPickingRay||(t._tempPickingRay=u.Zero()),m(t,e,i,n,t._tempPickingRay,s||null),t._tempPickingRay)),n,r,!0);return c&&(c.ray=f(t,e,i,o.Identity(),s||null)),c}function x(t,e,i,n,r,s,a,c=!1){const h=R(t,((n,r)=>(t._tempPickingRay||(t._tempPickingRay=u.Zero()),m(t,e,i,n,t._tempPickingRay,s||null,!1,r),t._tempPickingRay)),n,r,!1,a);return h&&(h.ray=f(t,e,i,o.Identity(),s||null)),h}function _(t,e,i,n,r){const s=R(t,(i=>(t._pickWithRayInverseMatrix||(t._pickWithRayInverseMatrix=o.Identity()),i.invertToRef(t._pickWithRayInverseMatrix),t._cachedRayForTransform||(t._cachedRayForTransform=u.Zero()),u.TransformToRef(e,t._pickWithRayInverseMatrix,t._cachedRayForTransform),t._cachedRayForTransform)),i,n,!1,r);return s&&(s.ray=e),s}function M(t,e,i,n,r,o){return p(t,(n=>f(t,e,i,n,r||null)),n,o)}function I(t,e,i,n){return p(t,(i=>(t._pickWithRayInverseMatrix||(t._pickWithRayInverseMatrix=o.Identity()),i.invertToRef(t._pickWithRayInverseMatrix),t._cachedRayForTransform||(t._cachedRayForTransform=u.Zero()),u.TransformToRef(e,t._pickWithRayInverseMatrix,t._cachedRayForTransform),t._cachedRayForTransform)),i,n)}function k(t,i,n=100,o,s){o||(o=t.getWorldMatrix()),i.length=n,s?i.origin.copyFrom(s):i.origin.copyFrom(t.position);const a=r.Vector3[2];a.set(0,0,t._scene.useRightHandedSystem?-1:1);const c=r.Vector3[3];return e.TransformNormalToRef(a,o,c),e.NormalizeToRef(c,i.direction),i}function v(t,i){i&&(i.prototype.getForwardRay=function(t=100,i,n){return k(this,new u(e.Zero(),e.Zero(),t),t,i,n)},i.prototype.getForwardRayToRef=function(t,e=100,i,n){return k(this,t,e,i,n)}),t&&(c._IsPickingAvailable=!0,t.prototype.createPickingRay=function(t,e,i,n,r=!1){return f(this,t,e,i,n,r)})}u._TmpVector3=t(6,e.Zero),u._RayDistant=u.Zero(),u._Smallnum=1e-8,u._Rayl=1e9,v(h,l),h.prototype.createPickingRayToRef=function(t,e,i,n,r,o=!1,s=!1){return m(this,t,e,i,n,r,o,s)},h.prototype.createPickingRayInCameraSpace=function(t,e,i){return y(this,t,e,i)},h.prototype.createPickingRayInCameraSpaceToRef=function(t,e,i,n){return d(this,t,e,i,n)},h.prototype.pickWithBoundingInfo=function(t,e,i,n,r){return T(this,t,e,i,n,r)},h.prototype.pick=function(t,e,i,n,r,o,s=!1){return x(this,t,e,i,n,r,o,s)},h.prototype.pickWithRay=function(t,e,i,n){return _(this,t,e,i,n)},h.prototype.multiPick=function(t,e,i,n,r){return M(this,t,e,i,n,r)},h.prototype.multiPickWithRay=function(t,e,i){return I(this,t,e,i)};export{v as AddRayExtensions,f as CreatePickingRay,y as CreatePickingRayInCameraSpace,d as CreatePickingRayInCameraSpaceToRef,m as CreatePickingRayToRef,k as GetForwardRayToRef,M as MultiPick,I as MultiPickWithRay,x as Pick,T as PickWithBoundingInfo,_ as PickWithRay,u as Ray};
2
- //# sourceMappingURL=ray-ix7SqYNQ.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ray-ix7SqYNQ.esm.min.js","sources":["../../../../../dev/core/dist/Culling/ray.core.js","../../../../../dev/core/dist/Culling/ray.js"],"sourcesContent":["import { Epsilon } from \"core/Maths/math.constants\";\nimport { Matrix, TmpVectors, Vector3 } from \"core/Maths/math.vector\";\nimport { BuildArray } from \"core/Misc/arrayTools\";\nimport { IntersectionInfo } from \"../Collisions/intersectionInfo\";\nimport { PickingInfo } from \"core/Collisions/pickingInfo\";\nimport { EngineStore } from \"core/Engines/engineStore\";\nimport { _ImportHelper } from \"core/import.helper\";\n/**\n * Use this object to customize mesh picking behavior\n */\nexport const PickingCustomization = {\n internalPickerForMesh: undefined,\n};\n/**\n * Class representing a ray with position and direction\n */\nexport class Ray {\n /**\n * Creates a new ray\n * @param origin origin point\n * @param direction direction\n * @param length length of the ray\n * @param epsilon The epsilon value to use when calculating the ray/triangle intersection (default: 0)\n */\n constructor(\n /** origin point */\n origin, \n /** direction */\n direction, \n /** [Number.MAX_VALUE] length of the ray */\n length = Number.MAX_VALUE, \n /** [Epsilon] The epsilon value to use when calculating the ray/triangle intersection (default: Epsilon from math constants) */\n epsilon = Epsilon) {\n this.origin = origin;\n this.direction = direction;\n this.length = length;\n this.epsilon = epsilon;\n }\n // Methods\n /**\n * Clone the current ray\n * @returns a new ray\n */\n clone() {\n return new Ray(this.origin.clone(), this.direction.clone(), this.length);\n }\n /**\n * Checks if the ray intersects a box\n * This does not account for the ray length by design to improve perfs.\n * @param minimum bound of the box\n * @param maximum bound of the box\n * @param intersectionTreshold extra extend to be added to the box in all direction\n * @returns if the box was hit\n */\n intersectsBoxMinMax(minimum, maximum, intersectionTreshold = 0) {\n const newMinimum = Ray._TmpVector3[0].copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);\n const newMaximum = Ray._TmpVector3[1].copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);\n let d = 0.0;\n let maxValue = Number.MAX_VALUE;\n let inv;\n let min;\n let max;\n let temp;\n if (Math.abs(this.direction.x) < 0.0000001) {\n if (this.origin.x < newMinimum.x || this.origin.x > newMaximum.x) {\n return false;\n }\n }\n else {\n inv = 1.0 / this.direction.x;\n min = (newMinimum.x - this.origin.x) * inv;\n max = (newMaximum.x - this.origin.x) * inv;\n if (max === -Infinity) {\n max = Infinity;\n }\n if (min > max) {\n temp = min;\n min = max;\n max = temp;\n }\n d = Math.max(min, d);\n maxValue = Math.min(max, maxValue);\n if (d > maxValue) {\n return false;\n }\n }\n if (Math.abs(this.direction.y) < 0.0000001) {\n if (this.origin.y < newMinimum.y || this.origin.y > newMaximum.y) {\n return false;\n }\n }\n else {\n inv = 1.0 / this.direction.y;\n min = (newMinimum.y - this.origin.y) * inv;\n max = (newMaximum.y - this.origin.y) * inv;\n if (max === -Infinity) {\n max = Infinity;\n }\n if (min > max) {\n temp = min;\n min = max;\n max = temp;\n }\n d = Math.max(min, d);\n maxValue = Math.min(max, maxValue);\n if (d > maxValue) {\n return false;\n }\n }\n if (Math.abs(this.direction.z) < 0.0000001) {\n if (this.origin.z < newMinimum.z || this.origin.z > newMaximum.z) {\n return false;\n }\n }\n else {\n inv = 1.0 / this.direction.z;\n min = (newMinimum.z - this.origin.z) * inv;\n max = (newMaximum.z - this.origin.z) * inv;\n if (max === -Infinity) {\n max = Infinity;\n }\n if (min > max) {\n temp = min;\n min = max;\n max = temp;\n }\n d = Math.max(min, d);\n maxValue = Math.min(max, maxValue);\n if (d > maxValue) {\n return false;\n }\n }\n return true;\n }\n /**\n * Checks if the ray intersects a box\n * This does not account for the ray lenght by design to improve perfs.\n * @param box the bounding box to check\n * @param intersectionTreshold extra extend to be added to the BoundingBox in all direction\n * @returns if the box was hit\n */\n intersectsBox(box, intersectionTreshold = 0) {\n return this.intersectsBoxMinMax(box.minimum, box.maximum, intersectionTreshold);\n }\n /**\n * If the ray hits a sphere\n * @param sphere the bounding sphere to check\n * @param intersectionTreshold extra extend to be added to the BoundingSphere in all direction\n * @returns true if it hits the sphere\n */\n intersectsSphere(sphere, intersectionTreshold = 0) {\n const x = sphere.center.x - this.origin.x;\n const y = sphere.center.y - this.origin.y;\n const z = sphere.center.z - this.origin.z;\n const pyth = x * x + y * y + z * z;\n const radius = sphere.radius + intersectionTreshold;\n const rr = radius * radius;\n if (pyth <= rr) {\n return true;\n }\n const dot = x * this.direction.x + y * this.direction.y + z * this.direction.z;\n if (dot < 0.0) {\n return false;\n }\n const temp = pyth - dot * dot;\n return temp <= rr;\n }\n /**\n * If the ray hits a triange\n * @param vertex0 triangle vertex\n * @param vertex1 triangle vertex\n * @param vertex2 triangle vertex\n * @returns intersection information if hit\n */\n intersectsTriangle(vertex0, vertex1, vertex2) {\n const edge1 = Ray._TmpVector3[0];\n const edge2 = Ray._TmpVector3[1];\n const pvec = Ray._TmpVector3[2];\n const tvec = Ray._TmpVector3[3];\n const qvec = Ray._TmpVector3[4];\n vertex1.subtractToRef(vertex0, edge1);\n vertex2.subtractToRef(vertex0, edge2);\n Vector3.CrossToRef(this.direction, edge2, pvec);\n const det = Vector3.Dot(edge1, pvec);\n if (det === 0) {\n return null;\n }\n const invdet = 1 / det;\n this.origin.subtractToRef(vertex0, tvec);\n const bv = Vector3.Dot(tvec, pvec) * invdet;\n if (bv < -this.epsilon || bv > 1.0 + this.epsilon) {\n return null;\n }\n Vector3.CrossToRef(tvec, edge1, qvec);\n const bw = Vector3.Dot(this.direction, qvec) * invdet;\n if (bw < -this.epsilon || bv + bw > 1.0 + this.epsilon) {\n return null;\n }\n //check if the distance is longer than the predefined length.\n const distance = Vector3.Dot(edge2, qvec) * invdet;\n if (distance > this.length) {\n return null;\n }\n return new IntersectionInfo(1 - bv - bw, bv, distance);\n }\n /**\n * Checks if ray intersects a plane\n * @param plane the plane to check\n * @returns the distance away it was hit\n */\n intersectsPlane(plane) {\n let distance;\n const result1 = Vector3.Dot(plane.normal, this.direction);\n if (Math.abs(result1) < 9.99999997475243e-7) {\n return null;\n }\n else {\n const result2 = Vector3.Dot(plane.normal, this.origin);\n distance = (-plane.d - result2) / result1;\n if (distance < 0.0) {\n if (distance < -9.99999997475243e-7) {\n return null;\n }\n else {\n return 0;\n }\n }\n return distance;\n }\n }\n /**\n * Calculate the intercept of a ray on a given axis\n * @param axis to check 'x' | 'y' | 'z'\n * @param offset from axis interception (i.e. an offset of 1y is intercepted above ground)\n * @returns a vector containing the coordinates where 'axis' is equal to zero (else offset), or null if there is no intercept.\n */\n intersectsAxis(axis, offset = 0) {\n switch (axis) {\n case \"y\": {\n const t = (this.origin.y - offset) / this.direction.y;\n if (t > 0) {\n return null;\n }\n return new Vector3(this.origin.x + this.direction.x * -t, offset, this.origin.z + this.direction.z * -t);\n }\n case \"x\": {\n const t = (this.origin.x - offset) / this.direction.x;\n if (t > 0) {\n return null;\n }\n return new Vector3(offset, this.origin.y + this.direction.y * -t, this.origin.z + this.direction.z * -t);\n }\n case \"z\": {\n const t = (this.origin.z - offset) / this.direction.z;\n if (t > 0) {\n return null;\n }\n return new Vector3(this.origin.x + this.direction.x * -t, this.origin.y + this.direction.y * -t, offset);\n }\n default:\n return null;\n }\n }\n /**\n * Checks if ray intersects a mesh. The ray is defined in WORLD space. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param mesh the mesh to check\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\n * @param worldToUse defines the world matrix to use to get the world coordinate of the intersection point\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\n * @returns picking info of the intersection\n */\n intersectsMesh(mesh, fastCheck, trianglePredicate, onlyBoundingInfo = false, worldToUse, skipBoundingInfo = false) {\n const tm = TmpVectors.Matrix[0];\n mesh.getWorldMatrix().invertToRef(tm);\n if (this._tmpRay) {\n Ray.TransformToRef(this, tm, this._tmpRay);\n }\n else {\n this._tmpRay = Ray.Transform(this, tm);\n }\n return mesh.intersects(this._tmpRay, fastCheck, trianglePredicate, onlyBoundingInfo, worldToUse, skipBoundingInfo);\n }\n /**\n * Checks if ray intersects a mesh\n * @param meshes the meshes to check\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param results array to store result in\n * @returns Array of picking infos\n */\n intersectsMeshes(meshes, fastCheck, results) {\n if (results) {\n results.length = 0;\n }\n else {\n results = [];\n }\n for (let i = 0; i < meshes.length; i++) {\n const pickInfo = this.intersectsMesh(meshes[i], fastCheck);\n if (pickInfo.hit) {\n results.push(pickInfo);\n }\n }\n results.sort(this._comparePickingInfo);\n return results;\n }\n _comparePickingInfo(pickingInfoA, pickingInfoB) {\n if (pickingInfoA.distance < pickingInfoB.distance) {\n return -1;\n }\n else if (pickingInfoA.distance > pickingInfoB.distance) {\n return 1;\n }\n else {\n return 0;\n }\n }\n /**\n * Intersection test between the ray and a given segment within a given tolerance (threshold)\n * @param sega the first point of the segment to test the intersection against\n * @param segb the second point of the segment to test the intersection against\n * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful\n * @returns the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection\n */\n intersectionSegment(sega, segb, threshold) {\n const o = this.origin;\n const u = TmpVectors.Vector3[0];\n const rsegb = TmpVectors.Vector3[1];\n const v = TmpVectors.Vector3[2];\n const w = TmpVectors.Vector3[3];\n segb.subtractToRef(sega, u);\n this.direction.scaleToRef(Ray._Rayl, v);\n o.addToRef(v, rsegb);\n sega.subtractToRef(o, w);\n const a = Vector3.Dot(u, u); // always >= 0\n const b = Vector3.Dot(u, v);\n const c = Vector3.Dot(v, v); // always >= 0\n const d = Vector3.Dot(u, w);\n const e = Vector3.Dot(v, w);\n const D = a * c - b * b; // always >= 0\n let sN, sD = D; // sc = sN / sD, default sD = D >= 0\n let tN, tD = D; // tc = tN / tD, default tD = D >= 0\n // compute the line parameters of the two closest points\n if (D < Ray._Smallnum) {\n // the lines are almost parallel\n sN = 0.0; // force using point P0 on segment S1\n sD = 1.0; // to prevent possible division by 0.0 later\n tN = e;\n tD = c;\n }\n else {\n // get the closest points on the infinite lines\n sN = b * e - c * d;\n tN = a * e - b * d;\n if (sN < 0.0) {\n // sc < 0 => the s=0 edge is visible\n sN = 0.0;\n tN = e;\n tD = c;\n }\n else if (sN > sD) {\n // sc > 1 => the s=1 edge is visible\n sN = sD;\n tN = e + b;\n tD = c;\n }\n }\n if (tN < 0.0) {\n // tc < 0 => the t=0 edge is visible\n tN = 0.0;\n // recompute sc for this edge\n if (-d < 0.0) {\n sN = 0.0;\n }\n else if (-d > a) {\n sN = sD;\n }\n else {\n sN = -d;\n sD = a;\n }\n }\n else if (tN > tD) {\n // tc > 1 => the t=1 edge is visible\n tN = tD;\n // recompute sc for this edge\n if (-d + b < 0.0) {\n sN = 0;\n }\n else if (-d + b > a) {\n sN = sD;\n }\n else {\n sN = -d + b;\n sD = a;\n }\n }\n // finally do the division to get sc and tc\n const sc = Math.abs(sN) < Ray._Smallnum ? 0.0 : sN / sD;\n const tc = Math.abs(tN) < Ray._Smallnum ? 0.0 : tN / tD;\n // get the difference of the two closest points\n const qtc = TmpVectors.Vector3[4];\n v.scaleToRef(tc, qtc);\n const qsc = TmpVectors.Vector3[5];\n u.scaleToRef(sc, qsc);\n qsc.addInPlace(w);\n const dP = TmpVectors.Vector3[6];\n qsc.subtractToRef(qtc, dP); // = S1(sc) - S2(tc)\n const isIntersected = tc > 0 && tc <= this.length && dP.lengthSquared() < threshold * threshold; // return intersection result\n if (isIntersected) {\n return qsc.length();\n }\n return -1;\n }\n /**\n * Update the ray from viewport position\n * @param x position\n * @param y y position\n * @param viewportWidth viewport width\n * @param viewportHeight viewport height\n * @param world world matrix\n * @param view view matrix\n * @param projection projection matrix\n * @param enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)\n * @returns this ray updated\n */\n update(x, y, viewportWidth, viewportHeight, world, view, projection, enableDistantPicking = false) {\n if (enableDistantPicking) {\n // With world matrices having great values (like 8000000000 on 1 or more scaling or position axis),\n // multiplying view/projection/world and doing invert will result in loss of float precision in the matrix.\n // One way to fix it is to compute the ray with world at identity then transform the ray in object space.\n // This is slower (2 matrix inverts instead of 1) but precision is preserved.\n // This is hidden behind `EnableDistantPicking` flag (default is false)\n if (!Ray._RayDistant) {\n Ray._RayDistant = Ray.Zero();\n }\n Ray._RayDistant.unprojectRayToRef(x, y, viewportWidth, viewportHeight, Matrix.IdentityReadOnly, view, projection);\n const tm = TmpVectors.Matrix[0];\n world.invertToRef(tm);\n Ray.TransformToRef(Ray._RayDistant, tm, this);\n }\n else {\n this.unprojectRayToRef(x, y, viewportWidth, viewportHeight, world, view, projection);\n }\n return this;\n }\n // Statics\n /**\n * Creates a ray with origin and direction of 0,0,0\n * @returns the new ray\n */\n static Zero() {\n return new Ray(Vector3.Zero(), Vector3.Zero());\n }\n /**\n * Creates a new ray from screen space and viewport\n * @param x position\n * @param y y position\n * @param viewportWidth viewport width\n * @param viewportHeight viewport height\n * @param world world matrix\n * @param view view matrix\n * @param projection projection matrix\n * @returns new ray\n */\n static CreateNew(x, y, viewportWidth, viewportHeight, world, view, projection) {\n const result = Ray.Zero();\n return result.update(x, y, viewportWidth, viewportHeight, world, view, projection);\n }\n /**\n * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be\n * transformed to the given world matrix.\n * @param origin The origin point\n * @param end The end point\n * @param world a matrix to transform the ray to. Default is the identity matrix.\n * @returns the new ray\n */\n static CreateNewFromTo(origin, end, world = Matrix.IdentityReadOnly) {\n const result = new Ray(new Vector3(0, 0, 0), new Vector3(0, 0, 0));\n return Ray.CreateFromToToRef(origin, end, result, world);\n }\n /**\n * Function will update a transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be\n * transformed to the given world matrix.\n * @param origin The origin point\n * @param end The end point\n * @param result the object to store the result\n * @param world a matrix to transform the ray to. Default is the identity matrix.\n * @returns the ref ray\n */\n static CreateFromToToRef(origin, end, result, world = Matrix.IdentityReadOnly) {\n result.origin.copyFrom(origin);\n const direction = end.subtractToRef(origin, result.direction);\n const length = Math.sqrt(direction.x * direction.x + direction.y * direction.y + direction.z * direction.z);\n result.length = length;\n result.direction.normalize();\n return Ray.TransformToRef(result, world, result);\n }\n /**\n * Transforms a ray by a matrix\n * @param ray ray to transform\n * @param matrix matrix to apply\n * @returns the resulting new ray\n */\n static Transform(ray, matrix) {\n const result = new Ray(new Vector3(0, 0, 0), new Vector3(0, 0, 0));\n Ray.TransformToRef(ray, matrix, result);\n return result;\n }\n /**\n * Transforms a ray by a matrix\n * @param ray ray to transform\n * @param matrix matrix to apply\n * @param result ray to store result in\n * @returns the updated result ray\n */\n static TransformToRef(ray, matrix, result) {\n Vector3.TransformCoordinatesToRef(ray.origin, matrix, result.origin);\n Vector3.TransformNormalToRef(ray.direction, matrix, result.direction);\n result.length = ray.length;\n result.epsilon = ray.epsilon;\n const dir = result.direction;\n const len = dir.length();\n if (!(len === 0 || len === 1)) {\n const num = 1.0 / len;\n dir.x *= num;\n dir.y *= num;\n dir.z *= num;\n result.length *= len;\n }\n return result;\n }\n /**\n * Unproject a ray from screen space to object space\n * @param sourceX defines the screen space x coordinate to use\n * @param sourceY defines the screen space y coordinate to use\n * @param viewportWidth defines the current width of the viewport\n * @param viewportHeight defines the current height of the viewport\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\n * @param view defines the view matrix to use\n * @param projection defines the projection matrix to use\n */\n unprojectRayToRef(sourceX, sourceY, viewportWidth, viewportHeight, world, view, projection) {\n const matrix = TmpVectors.Matrix[0];\n world.multiplyToRef(view, matrix);\n matrix.multiplyToRef(projection, matrix);\n matrix.invert();\n const engine = EngineStore.LastCreatedEngine;\n const nearScreenSource = TmpVectors.Vector3[0];\n nearScreenSource.x = (sourceX / viewportWidth) * 2 - 1;\n nearScreenSource.y = -((sourceY / viewportHeight) * 2 - 1);\n nearScreenSource.z = engine?.useReverseDepthBuffer ? 1 : engine?.isNDCHalfZRange ? 0 : -1;\n // far Z need to be close but < to 1 or camera projection matrix with maxZ = 0 will NaN\n const farScreenSource = TmpVectors.Vector3[1].copyFromFloats(nearScreenSource.x, nearScreenSource.y, 1.0 - 1e-8);\n const nearVec3 = TmpVectors.Vector3[2];\n const farVec3 = TmpVectors.Vector3[3];\n Vector3._UnprojectFromInvertedMatrixToRef(nearScreenSource, matrix, nearVec3);\n Vector3._UnprojectFromInvertedMatrixToRef(farScreenSource, matrix, farVec3);\n this.origin.copyFrom(nearVec3);\n farVec3.subtractToRef(nearVec3, this.direction);\n this.direction.normalize();\n }\n}\nRay._TmpVector3 = BuildArray(6, Vector3.Zero);\nRay._RayDistant = Ray.Zero();\nRay._Smallnum = 0.00000001;\nRay._Rayl = 10e8;\n/**\n * Creates a ray that can be used to pick in the scene\n * @param scene defines the scene to use for the picking\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param world defines the world matrix to use if you want to pick in object space (instead of world space)\n * @param camera defines the camera to use for the picking\n * @param cameraViewSpace defines if picking will be done in view space (false by default)\n * @returns a Ray\n */\nexport function CreatePickingRay(scene, x, y, world, camera, cameraViewSpace = false) {\n const result = Ray.Zero();\n CreatePickingRayToRef(scene, x, y, world, result, camera, cameraViewSpace);\n return result;\n}\n/**\n * Creates a ray that can be used to pick in the scene\n * @param scene defines the scene to use for the picking\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param world defines the world matrix to use if you want to pick in object space (instead of world space)\n * @param result defines the ray where to store the picking ray\n * @param camera defines the camera to use for the picking\n * @param cameraViewSpace defines if picking will be done in view space (false by default)\n * @param enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)\n * @returns the current scene\n */\nexport function CreatePickingRayToRef(scene, x, y, world, result, camera, cameraViewSpace = false, enableDistantPicking = false) {\n const engine = scene.getEngine();\n if (!camera && !(camera = scene.activeCamera)) {\n return scene;\n }\n const cameraViewport = camera.viewport;\n const renderHeight = engine.getRenderHeight();\n const { x: vx, y: vy, width, height } = cameraViewport.toGlobal(engine.getRenderWidth(), renderHeight);\n // Moving coordinates to local viewport world\n const levelInv = 1 / engine.getHardwareScalingLevel();\n x = x * levelInv - vx;\n y = y * levelInv - (renderHeight - vy - height);\n result.update(x, y, width, height, world ? world : Matrix.IdentityReadOnly, cameraViewSpace ? Matrix.IdentityReadOnly : camera.getViewMatrix(), camera.getProjectionMatrix(), enableDistantPicking);\n return scene;\n}\n/**\n * Creates a ray that can be used to pick in the scene\n * @param scene defines the scene to use for the picking\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param camera defines the camera to use for the picking\n * @returns a Ray\n */\nexport function CreatePickingRayInCameraSpace(scene, x, y, camera) {\n const result = Ray.Zero();\n CreatePickingRayInCameraSpaceToRef(scene, x, y, result, camera);\n return result;\n}\n/**\n * Creates a ray that can be used to pick in the scene\n * @param scene defines the scene to use for the picking\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param result defines the ray where to store the picking ray\n * @param camera defines the camera to use for the picking\n * @returns the current scene\n */\nexport function CreatePickingRayInCameraSpaceToRef(scene, x, y, result, camera) {\n if (!PickingInfo) {\n return scene;\n }\n const engine = scene.getEngine();\n if (!camera && !(camera = scene.activeCamera)) {\n throw new Error(\"Active camera not set\");\n }\n const cameraViewport = camera.viewport;\n const renderHeight = engine.getRenderHeight();\n const { x: vx, y: vy, width, height } = cameraViewport.toGlobal(engine.getRenderWidth(), renderHeight);\n const identity = Matrix.Identity();\n // Moving coordinates to local viewport world\n const levelInv = 1 / engine.getHardwareScalingLevel();\n x = x * levelInv - vx;\n y = y * levelInv - (renderHeight - vy - height);\n result.update(x, y, width, height, identity, identity, camera.getProjectionMatrix());\n return scene;\n}\nfunction InternalPickForMesh(pickingInfo, rayFunction, mesh, world, fastCheck, onlyBoundingInfo, trianglePredicate, skipBoundingInfo) {\n const ray = rayFunction(world, mesh.enableDistantPicking);\n const result = mesh.intersects(ray, fastCheck, trianglePredicate, onlyBoundingInfo, world, skipBoundingInfo);\n if (!result || !result.hit) {\n return null;\n }\n if (!fastCheck && pickingInfo != null && result.distance >= pickingInfo.distance) {\n return null;\n }\n return result;\n}\nfunction InternalPick(scene, rayFunction, predicate, fastCheck, onlyBoundingInfo, trianglePredicate) {\n let pickingInfo = null;\n const computeWorldMatrixForCamera = !!(scene.activeCameras && scene.activeCameras.length > 1 && scene.cameraToUseForPointers !== scene.activeCamera);\n const currentCamera = scene.cameraToUseForPointers || scene.activeCamera;\n const picker = PickingCustomization.internalPickerForMesh || InternalPickForMesh;\n for (let meshIndex = 0; meshIndex < scene.meshes.length; meshIndex++) {\n const mesh = scene.meshes[meshIndex];\n if (predicate) {\n if (!predicate(mesh, -1)) {\n continue;\n }\n }\n else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {\n continue;\n }\n const forceCompute = computeWorldMatrixForCamera && mesh.isWorldMatrixCameraDependent();\n const world = mesh.computeWorldMatrix(forceCompute, currentCamera);\n if (mesh.hasThinInstances && mesh.thinInstanceEnablePicking) {\n // first check if the ray intersects the whole bounding box/sphere of the mesh\n const result = picker(pickingInfo, rayFunction, mesh, world, true, true, trianglePredicate);\n if (result) {\n if (onlyBoundingInfo) {\n // the user only asked for a bounding info check so we can return\n return result;\n }\n const tmpMatrix = TmpVectors.Matrix[1];\n const thinMatrices = mesh.thinInstanceGetWorldMatrices();\n for (let index = 0; index < thinMatrices.length; index++) {\n if (predicate && !predicate(mesh, index)) {\n continue;\n }\n const thinMatrix = thinMatrices[index];\n thinMatrix.multiplyToRef(world, tmpMatrix);\n const result = picker(pickingInfo, rayFunction, mesh, tmpMatrix, fastCheck, onlyBoundingInfo, trianglePredicate, true);\n if (result) {\n pickingInfo = result;\n pickingInfo.thinInstanceIndex = index;\n if (fastCheck) {\n return pickingInfo;\n }\n }\n }\n }\n }\n else {\n const result = picker(pickingInfo, rayFunction, mesh, world, fastCheck, onlyBoundingInfo, trianglePredicate);\n if (result) {\n pickingInfo = result;\n if (fastCheck) {\n return pickingInfo;\n }\n }\n }\n }\n return pickingInfo || new PickingInfo();\n}\nfunction InternalMultiPick(scene, rayFunction, predicate, trianglePredicate) {\n if (!PickingInfo) {\n return null;\n }\n const pickingInfos = [];\n const computeWorldMatrixForCamera = !!(scene.activeCameras && scene.activeCameras.length > 1 && scene.cameraToUseForPointers !== scene.activeCamera);\n const currentCamera = scene.cameraToUseForPointers || scene.activeCamera;\n const picker = PickingCustomization.internalPickerForMesh || InternalPickForMesh;\n for (let meshIndex = 0; meshIndex < scene.meshes.length; meshIndex++) {\n const mesh = scene.meshes[meshIndex];\n if (predicate) {\n if (!predicate(mesh, -1)) {\n continue;\n }\n }\n else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {\n continue;\n }\n const forceCompute = computeWorldMatrixForCamera && mesh.isWorldMatrixCameraDependent();\n const world = mesh.computeWorldMatrix(forceCompute, currentCamera);\n if (mesh.hasThinInstances && mesh.thinInstanceEnablePicking) {\n const result = picker(null, rayFunction, mesh, world, true, true, trianglePredicate);\n if (result) {\n const tmpMatrix = TmpVectors.Matrix[1];\n const thinMatrices = mesh.thinInstanceGetWorldMatrices();\n for (let index = 0; index < thinMatrices.length; index++) {\n if (predicate && !predicate(mesh, index)) {\n continue;\n }\n const thinMatrix = thinMatrices[index];\n thinMatrix.multiplyToRef(world, tmpMatrix);\n const result = picker(null, rayFunction, mesh, tmpMatrix, false, false, trianglePredicate, true);\n if (result) {\n result.thinInstanceIndex = index;\n pickingInfos.push(result);\n }\n }\n }\n }\n else {\n const result = picker(null, rayFunction, mesh, world, false, false, trianglePredicate);\n if (result) {\n pickingInfos.push(result);\n }\n }\n }\n return pickingInfos;\n}\n/** Launch a ray to try to pick a mesh in the scene using only bounding information of the main mesh (not using submeshes)\n * @param scene defines the scene to use for the picking\n * @param x position on screen\n * @param y position on screen\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used\n * @returns a PickingInfo (Please note that some info will not be set like distance, bv, bu and everything that cannot be capture by only using bounding infos)\n */\nexport function PickWithBoundingInfo(scene, x, y, predicate, fastCheck, camera) {\n if (!PickingInfo) {\n return null;\n }\n const result = InternalPick(scene, (world) => {\n if (!scene._tempPickingRay) {\n scene._tempPickingRay = Ray.Zero();\n }\n CreatePickingRayToRef(scene, x, y, world, scene._tempPickingRay, camera || null);\n return scene._tempPickingRay;\n }, predicate, fastCheck, true);\n if (result) {\n result.ray = CreatePickingRay(scene, x, y, Matrix.Identity(), camera || null);\n }\n return result;\n}\n/** Launch a ray to try to pick a mesh in the scene\n * @param scene defines the scene to use for the picking\n * @param x position on screen\n * @param y position on screen\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @param _enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)\n * @returns a PickingInfo\n */\nexport function Pick(scene, x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking = false) {\n const result = InternalPick(scene, (world, enableDistantPicking) => {\n if (!scene._tempPickingRay) {\n scene._tempPickingRay = Ray.Zero();\n }\n CreatePickingRayToRef(scene, x, y, world, scene._tempPickingRay, camera || null, false, enableDistantPicking);\n return scene._tempPickingRay;\n }, predicate, fastCheck, false, trianglePredicate);\n if (result) {\n result.ray = CreatePickingRay(scene, x, y, Matrix.Identity(), camera || null);\n }\n return result;\n}\n/**\n * Use the given ray to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param scene defines the scene to use for the picking\n * @param ray The ray to use to pick meshes\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns a PickingInfo\n */\nexport function PickWithRay(scene, ray, predicate, fastCheck, trianglePredicate) {\n const result = InternalPick(scene, (world) => {\n if (!scene._pickWithRayInverseMatrix) {\n scene._pickWithRayInverseMatrix = Matrix.Identity();\n }\n world.invertToRef(scene._pickWithRayInverseMatrix);\n if (!scene._cachedRayForTransform) {\n scene._cachedRayForTransform = Ray.Zero();\n }\n Ray.TransformToRef(ray, scene._pickWithRayInverseMatrix, scene._cachedRayForTransform);\n return scene._cachedRayForTransform;\n }, predicate, fastCheck, false, trianglePredicate);\n if (result) {\n result.ray = ray;\n }\n return result;\n}\n/**\n * Launch a ray to try to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param scene defines the scene to use for the picking\n * @param x X position on screen\n * @param y Y position on screen\n * @param predicate Predicate function used to determine eligible meshes and instances. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param camera camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns an array of PickingInfo\n */\nexport function MultiPick(scene, x, y, predicate, camera, trianglePredicate) {\n return InternalMultiPick(scene, (world) => CreatePickingRay(scene, x, y, world, camera || null), predicate, trianglePredicate);\n}\n/**\n * Launch a ray to try to pick a mesh in the scene\n * @param scene defines the scene to use for the picking\n * @param ray Ray to use\n * @param predicate Predicate function used to determine eligible meshes and instances. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns an array of PickingInfo\n */\nexport function MultiPickWithRay(scene, ray, predicate, trianglePredicate) {\n return InternalMultiPick(scene, (world) => {\n if (!scene._pickWithRayInverseMatrix) {\n scene._pickWithRayInverseMatrix = Matrix.Identity();\n }\n world.invertToRef(scene._pickWithRayInverseMatrix);\n if (!scene._cachedRayForTransform) {\n scene._cachedRayForTransform = Ray.Zero();\n }\n Ray.TransformToRef(ray, scene._pickWithRayInverseMatrix, scene._cachedRayForTransform);\n return scene._cachedRayForTransform;\n }, predicate, trianglePredicate);\n}\n/**\n * Gets a ray in the forward direction from the camera.\n * @param camera Defines the camera to use to get the ray from\n * @param length Defines the length of the ray to create\n * @param transform Defines the transform to apply to the ray, by default the world matrix is used to create a workd space ray\n * @param origin Defines the start point of the ray which defaults to the camera position\n * @returns the forward ray\n */\nexport function GetForwardRay(camera, length = 100, transform, origin) {\n return GetForwardRayToRef(camera, new Ray(Vector3.Zero(), Vector3.Zero(), length), length, transform, origin);\n}\n/**\n * Gets a ray in the forward direction from the camera.\n * @param camera Defines the camera to use to get the ray from\n * @param refRay the ray to (re)use when setting the values\n * @param length Defines the length of the ray to create\n * @param transform Defines the transform to apply to the ray, by default the world matrx is used to create a workd space ray\n * @param origin Defines the start point of the ray which defaults to the camera position\n * @returns the forward ray\n */\nexport function GetForwardRayToRef(camera, refRay, length = 100, transform, origin) {\n if (!transform) {\n transform = camera.getWorldMatrix();\n }\n refRay.length = length;\n if (origin) {\n refRay.origin.copyFrom(origin);\n }\n else {\n refRay.origin.copyFrom(camera.position);\n }\n const forward = TmpVectors.Vector3[2];\n forward.set(0, 0, camera._scene.useRightHandedSystem ? -1 : 1);\n const worldForward = TmpVectors.Vector3[3];\n Vector3.TransformNormalToRef(forward, transform, worldForward);\n Vector3.NormalizeToRef(worldForward, refRay.direction);\n return refRay;\n}\n/**\n * Initialize the minimal interdependecies between the Ray and Scene and Camera\n * @param sceneClass defines the scene prototype to use\n * @param cameraClass defines the camera prototype to use\n */\nexport function AddRayExtensions(sceneClass, cameraClass) {\n if (cameraClass) {\n cameraClass.prototype.getForwardRay = function (length = 100, transform, origin) {\n return GetForwardRayToRef(this, new Ray(Vector3.Zero(), Vector3.Zero(), length), length, transform, origin);\n };\n cameraClass.prototype.getForwardRayToRef = function (refRay, length = 100, transform, origin) {\n return GetForwardRayToRef(this, refRay, length, transform, origin);\n };\n }\n if (!sceneClass) {\n return;\n }\n _ImportHelper._IsPickingAvailable = true;\n sceneClass.prototype.createPickingRay = function (x, y, world, camera, cameraViewSpace = false) {\n return CreatePickingRay(this, x, y, world, camera, cameraViewSpace);\n };\n}\n//# sourceMappingURL=ray.core.js.map","import { Scene } from \"../scene\";\nimport { Camera } from \"../Cameras/camera\";\nimport { AddRayExtensions, CreatePickingRayInCameraSpace, CreatePickingRayInCameraSpaceToRef, CreatePickingRayToRef, MultiPick, MultiPickWithRay, Pick, PickWithBoundingInfo, PickWithRay, } from \"./ray.core\";\nexport * from \"./ray.core\";\n// Picking\nAddRayExtensions(Scene, Camera);\nScene.prototype.createPickingRayToRef = function (x, y, world, result, camera, cameraViewSpace = false, enableDistantPicking = false) {\n return CreatePickingRayToRef(this, x, y, world, result, camera, cameraViewSpace, enableDistantPicking);\n};\nScene.prototype.createPickingRayInCameraSpace = function (x, y, camera) {\n return CreatePickingRayInCameraSpace(this, x, y, camera);\n};\nScene.prototype.createPickingRayInCameraSpaceToRef = function (x, y, result, camera) {\n return CreatePickingRayInCameraSpaceToRef(this, x, y, result, camera);\n};\nScene.prototype.pickWithBoundingInfo = function (x, y, predicate, fastCheck, camera) {\n return PickWithBoundingInfo(this, x, y, predicate, fastCheck, camera);\n};\nScene.prototype.pick = function (x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking = false) {\n return Pick(this, x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking);\n};\nScene.prototype.pickWithRay = function (ray, predicate, fastCheck, trianglePredicate) {\n return PickWithRay(this, ray, predicate, fastCheck, trianglePredicate);\n};\nScene.prototype.multiPick = function (x, y, predicate, camera, trianglePredicate) {\n return MultiPick(this, x, y, predicate, camera, trianglePredicate);\n};\nScene.prototype.multiPickWithRay = function (ray, predicate, trianglePredicate) {\n return MultiPickWithRay(this, ray, predicate, trianglePredicate);\n};\n//# sourceMappingURL=ray.js.map"],"names":["Ray","constructor","origin","direction","length","Number","MAX_VALUE","epsilon","Epsilon","this","clone","intersectsBoxMinMax","minimum","maximum","intersectionTreshold","newMinimum","_TmpVector3","copyFromFloats","x","y","z","newMaximum","inv","min","max","temp","d","maxValue","Math","abs","Infinity","intersectsBox","box","intersectsSphere","sphere","center","pyth","radius","rr","dot","intersectsTriangle","vertex0","vertex1","vertex2","edge1","edge2","pvec","tvec","qvec","subtractToRef","Vector3","CrossToRef","det","Dot","invdet","bv","bw","distance","IntersectionInfo","intersectsPlane","plane","result1","normal","result2","intersectsAxis","axis","offset","t","intersectsMesh","mesh","fastCheck","trianglePredicate","onlyBoundingInfo","worldToUse","skipBoundingInfo","tm","TmpVectors","Matrix","getWorldMatrix","invertToRef","_tmpRay","TransformToRef","Transform","intersects","intersectsMeshes","meshes","results","i","pickInfo","hit","push","sort","_comparePickingInfo","pickingInfoA","pickingInfoB","intersectionSegment","sega","segb","threshold","o","u","rsegb","v","w","scaleToRef","_Rayl","addToRef","a","b","c","e","D","sN","tN","sD","tD","_Smallnum","sc","tc","qtc","qsc","addInPlace","dP","lengthSquared","update","viewportWidth","viewportHeight","world","view","projection","enableDistantPicking","_RayDistant","Zero","unprojectRayToRef","IdentityReadOnly","CreateNew","CreateNewFromTo","end","result","CreateFromToToRef","copyFrom","sqrt","normalize","ray","matrix","TransformCoordinatesToRef","TransformNormalToRef","dir","len","num","sourceX","sourceY","multiplyToRef","invert","engine","EngineStore","LastCreatedEngine","nearScreenSource","useReverseDepthBuffer","isNDCHalfZRange","farScreenSource","nearVec3","farVec3","_UnprojectFromInvertedMatrixToRef","CreatePickingRay","scene","camera","cameraViewSpace","CreatePickingRayToRef","getEngine","activeCamera","cameraViewport","viewport","renderHeight","getRenderHeight","vx","vy","width","height","toGlobal","getRenderWidth","levelInv","getHardwareScalingLevel","getViewMatrix","getProjectionMatrix","CreatePickingRayInCameraSpace","CreatePickingRayInCameraSpaceToRef","PickingInfo","Error","identity","Identity","InternalPickForMesh","pickingInfo","rayFunction","InternalPick","predicate","computeWorldMatrixForCamera","activeCameras","cameraToUseForPointers","currentCamera","picker","meshIndex","isEnabled","isVisible","isPickable","forceCompute","isWorldMatrixCameraDependent","computeWorldMatrix","hasThinInstances","thinInstanceEnablePicking","tmpMatrix","thinMatrices","thinInstanceGetWorldMatrices","index","thinInstanceIndex","InternalMultiPick","pickingInfos","PickWithBoundingInfo","_tempPickingRay","Pick","_enableDistantPicking","PickWithRay","_pickWithRayInverseMatrix","_cachedRayForTransform","MultiPick","MultiPickWithRay","GetForwardRayToRef","refRay","transform","position","forward","set","_scene","useRightHandedSystem","worldForward","NormalizeToRef","AddRayExtensions","sceneClass","cameraClass","prototype","getForwardRay","getForwardRayToRef","_ImportHelper","_IsPickingAvailable","createPickingRay","BuildArray","Scene","Camera","createPickingRayToRef","createPickingRayInCameraSpace","createPickingRayInCameraSpaceToRef","pickWithBoundingInfo","pick","pickWithRay","multiPick","multiPickWithRay"],"mappings":"8HAgBO,MAAMA,EAQT,WAAAC,CAEAC,EAEAC,EAEAC,EAASC,OAAOC,UAEhBC,EAAUC,GACNC,KAAKP,OAASA,EACdO,KAAKN,UAAYA,EACjBM,KAAKL,OAASA,EACdK,KAAKF,QAAUA,CACvB,CAMI,KAAAG,GACI,OAAO,IAAIV,EAAIS,KAAKP,OAAOQ,QAASD,KAAKN,UAAUO,QAASD,KAAKL,OACzE,CASI,mBAAAO,CAAoBC,EAASC,EAASC,EAAuB,GACzD,MAAMC,EAAaf,EAAIgB,YAAY,GAAGC,eAAeL,EAAQM,EAAIJ,EAAsBF,EAAQO,EAAIL,EAAsBF,EAAQQ,EAAIN,GAC/HO,EAAarB,EAAIgB,YAAY,GAAGC,eAAeJ,EAAQK,EAAIJ,EAAsBD,EAAQM,EAAIL,EAAsBD,EAAQO,EAAIN,GACrI,IAEIQ,EACAC,EACAC,EACAC,EALAC,EAAI,EACJC,EAAWtB,OAAOC,UAKtB,GAAIsB,KAAKC,IAAIpB,KAAKN,UAAUe,GAAK,MAC7B,GAAIT,KAAKP,OAAOgB,EAAIH,EAAWG,GAAKT,KAAKP,OAAOgB,EAAIG,EAAWH,EAC3D,OAAO,OAiBX,GAbAI,EAAM,EAAMb,KAAKN,UAAUe,EAC3BK,GAAOR,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