@babylonjs/viewer 7.40.2-alpha → 7.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (615) hide show
  1. package/configuration/configuration.d.ts +107 -0
  2. package/configuration/configuration.js +16 -0
  3. package/configuration/configuration.js.map +1 -0
  4. package/configuration/configurationCompatibility.d.ts +8 -0
  5. package/configuration/configurationCompatibility.js +66 -0
  6. package/configuration/configurationCompatibility.js.map +1 -0
  7. package/configuration/configurationContainer.d.ts +10 -0
  8. package/configuration/configurationContainer.js +10 -0
  9. package/configuration/configurationContainer.js.map +1 -0
  10. package/configuration/globals.d.ts +6 -0
  11. package/configuration/globals.js +18 -0
  12. package/configuration/globals.js.map +1 -0
  13. package/configuration/index.d.ts +2 -0
  14. package/configuration/index.js +4 -0
  15. package/configuration/index.js.map +1 -0
  16. package/configuration/interfaces/cameraConfiguration.d.ts +31 -0
  17. package/configuration/interfaces/cameraConfiguration.js +2 -0
  18. package/configuration/interfaces/cameraConfiguration.js.map +1 -0
  19. package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -0
  20. package/configuration/interfaces/colorGradingConfiguration.js +2 -0
  21. package/configuration/interfaces/colorGradingConfiguration.js.map +1 -0
  22. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -0
  23. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +2 -0
  24. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -0
  25. package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -0
  26. package/configuration/interfaces/environmentMapConfiguration.js +2 -0
  27. package/configuration/interfaces/environmentMapConfiguration.js.map +1 -0
  28. package/configuration/interfaces/groundConfiguration.d.ts +24 -0
  29. package/configuration/interfaces/groundConfiguration.js +2 -0
  30. package/configuration/interfaces/groundConfiguration.js.map +1 -0
  31. package/configuration/interfaces/imageProcessingConfiguration.d.ts +45 -0
  32. package/configuration/interfaces/imageProcessingConfiguration.js +2 -0
  33. package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -0
  34. package/configuration/interfaces/index.d.ts +15 -0
  35. package/configuration/interfaces/index.js +16 -0
  36. package/configuration/interfaces/index.js.map +1 -0
  37. package/configuration/interfaces/lightConfiguration.d.ts +60 -0
  38. package/configuration/interfaces/lightConfiguration.js +2 -0
  39. package/configuration/interfaces/lightConfiguration.js.map +1 -0
  40. package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -0
  41. package/configuration/interfaces/modelAnimationConfiguration.js +2 -0
  42. package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -0
  43. package/configuration/interfaces/modelConfiguration.d.ts +65 -0
  44. package/configuration/interfaces/modelConfiguration.js +2 -0
  45. package/configuration/interfaces/modelConfiguration.js.map +1 -0
  46. package/configuration/interfaces/observersConfiguration.d.ts +5 -0
  47. package/configuration/interfaces/observersConfiguration.js +2 -0
  48. package/configuration/interfaces/observersConfiguration.js.map +1 -0
  49. package/configuration/interfaces/sceneConfiguration.d.ts +48 -0
  50. package/configuration/interfaces/sceneConfiguration.js +2 -0
  51. package/configuration/interfaces/sceneConfiguration.js.map +1 -0
  52. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -0
  53. package/configuration/interfaces/sceneOptimizerConfiguration.js +2 -0
  54. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -0
  55. package/configuration/interfaces/skyboxConfiguration.d.ts +21 -0
  56. package/configuration/interfaces/skyboxConfiguration.js +2 -0
  57. package/configuration/interfaces/skyboxConfiguration.js.map +1 -0
  58. package/configuration/interfaces/templateConfiguration.d.ts +67 -0
  59. package/configuration/interfaces/templateConfiguration.js +2 -0
  60. package/configuration/interfaces/templateConfiguration.js.map +1 -0
  61. package/configuration/interfaces/vrConfiguration.d.ts +16 -0
  62. package/configuration/interfaces/vrConfiguration.js +2 -0
  63. package/configuration/interfaces/vrConfiguration.js.map +1 -0
  64. package/configuration/loader.d.ts +4 -0
  65. package/configuration/loader.js +17 -0
  66. package/configuration/loader.js.map +1 -0
  67. package/configuration/mappers.d.ts +43 -0
  68. package/configuration/mappers.js +193 -0
  69. package/configuration/mappers.js.map +1 -0
  70. package/configuration/renderOnlyLoader.d.ts +33 -0
  71. package/configuration/renderOnlyLoader.js +162 -0
  72. package/configuration/renderOnlyLoader.js.map +1 -0
  73. package/configuration/types/default.d.ts +6 -0
  74. package/configuration/types/default.js +121 -0
  75. package/configuration/types/default.js.map +1 -0
  76. package/configuration/types/environmentMap.d.ts +5 -0
  77. package/configuration/types/environmentMap.js +14 -0
  78. package/configuration/types/environmentMap.js.map +1 -0
  79. package/configuration/types/extended.d.ts +6 -0
  80. package/configuration/types/extended.js +317 -0
  81. package/configuration/types/extended.js.map +1 -0
  82. package/configuration/types/index.d.ts +14 -0
  83. package/configuration/types/index.js +51 -0
  84. package/configuration/types/index.js.map +1 -0
  85. package/configuration/types/minimal.d.ts +6 -0
  86. package/configuration/types/minimal.js +43 -0
  87. package/configuration/types/minimal.js.map +1 -0
  88. package/configuration/types/renderOnlyDefault.d.ts +30 -0
  89. package/configuration/types/renderOnlyDefault.js +31 -0
  90. package/configuration/types/renderOnlyDefault.js.map +1 -0
  91. package/configuration/types/shadowLight.d.ts +9 -0
  92. package/configuration/types/shadowLight.js +64 -0
  93. package/configuration/types/shadowLight.js.map +1 -0
  94. package/helper/index.d.ts +29 -0
  95. package/helper/index.js +66 -0
  96. package/helper/index.js.map +1 -0
  97. package/index.d.ts +30 -0
  98. package/index.js +46 -0
  99. package/index.js.map +1 -0
  100. package/initializer.d.ts +11 -0
  101. package/initializer.js +35 -0
  102. package/initializer.js.map +1 -0
  103. package/interfaces.d.ts +5 -0
  104. package/interfaces.js +7 -0
  105. package/interfaces.js.map +1 -0
  106. package/labs/environmentSerializer.d.ts +126 -0
  107. package/labs/environmentSerializer.js +191 -0
  108. package/labs/environmentSerializer.js.map +1 -0
  109. package/labs/texture.d.ts +183 -0
  110. package/labs/texture.js +351 -0
  111. package/labs/texture.js.map +1 -0
  112. package/labs/viewerLabs.d.ts +51 -0
  113. package/labs/viewerLabs.js +134 -0
  114. package/labs/viewerLabs.js.map +1 -0
  115. package/loader/modelLoader.d.ts +56 -0
  116. package/loader/modelLoader.js +202 -0
  117. package/loader/modelLoader.js.map +1 -0
  118. package/loader/plugins/applyMaterialConfig.d.ts +12 -0
  119. package/loader/plugins/applyMaterialConfig.js +16 -0
  120. package/loader/plugins/applyMaterialConfig.js.map +1 -0
  121. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -0
  122. package/loader/plugins/extendedMaterialLoaderPlugin.js +16 -0
  123. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -0
  124. package/loader/plugins/index.d.ts +19 -0
  125. package/loader/plugins/index.js +44 -0
  126. package/loader/plugins/index.js.map +1 -0
  127. package/loader/plugins/loaderPlugin.d.ts +24 -0
  128. package/loader/plugins/loaderPlugin.js +2 -0
  129. package/loader/plugins/loaderPlugin.js.map +1 -0
  130. package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -0
  131. package/loader/plugins/msftLodLoaderPlugin.js +21 -0
  132. package/loader/plugins/msftLodLoaderPlugin.js.map +1 -0
  133. package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -0
  134. package/loader/plugins/telemetryLoaderPlugin.js +36 -0
  135. package/loader/plugins/telemetryLoaderPlugin.js.map +1 -0
  136. package/managers/observablesManager.d.ts +66 -0
  137. package/managers/observablesManager.js +35 -0
  138. package/managers/observablesManager.js.map +1 -0
  139. package/managers/sceneManager.d.ts +245 -0
  140. package/managers/sceneManager.js +1375 -0
  141. package/managers/sceneManager.js.map +1 -0
  142. package/managers/telemetryManager.d.ts +78 -0
  143. package/managers/telemetryManager.js +117 -0
  144. package/managers/telemetryManager.js.map +1 -0
  145. package/model/modelAnimation.d.ts +215 -0
  146. package/model/modelAnimation.js +237 -0
  147. package/model/modelAnimation.js.map +1 -0
  148. package/model/viewerModel.d.ts +233 -0
  149. package/model/viewerModel.js +673 -0
  150. package/model/viewerModel.js.map +1 -0
  151. package/optimizer/custom/extended.d.ts +13 -0
  152. package/optimizer/custom/extended.js +101 -0
  153. package/optimizer/custom/extended.js.map +1 -0
  154. package/optimizer/custom/index.d.ts +9 -0
  155. package/optimizer/custom/index.js +26 -0
  156. package/optimizer/custom/index.js.map +1 -0
  157. package/package.json +28 -19
  158. package/readme.md +28 -28
  159. package/renderOnlyIndex.d.ts +11 -0
  160. package/renderOnlyIndex.js +18 -0
  161. package/renderOnlyIndex.js.map +1 -0
  162. package/templating/eventManager.d.ts +35 -0
  163. package/templating/eventManager.js +66 -0
  164. package/templating/eventManager.js.map +1 -0
  165. package/templating/plugins/hdButtonPlugin.d.ts +9 -0
  166. package/templating/plugins/hdButtonPlugin.js +22 -0
  167. package/templating/plugins/hdButtonPlugin.js.map +1 -0
  168. package/templating/plugins/printButton.d.ts +9 -0
  169. package/templating/plugins/printButton.js +41 -0
  170. package/templating/plugins/printButton.js.map +1 -0
  171. package/templating/templateManager.d.ts +197 -0
  172. package/templating/templateManager.js +561 -0
  173. package/templating/templateManager.js.map +1 -0
  174. package/templating/viewerTemplatePlugin.d.ts +21 -0
  175. package/templating/viewerTemplatePlugin.js +69 -0
  176. package/templating/viewerTemplatePlugin.js.map +1 -0
  177. package/viewer/defaultViewer.d.ts +130 -0
  178. package/viewer/defaultViewer.js +672 -0
  179. package/viewer/defaultViewer.js.map +1 -0
  180. package/viewer/renderOnlyViewer.d.ts +9 -0
  181. package/viewer/renderOnlyViewer.js +46 -0
  182. package/viewer/renderOnlyViewer.js.map +1 -0
  183. package/viewer/viewer.d.ts +258 -0
  184. package/viewer/viewer.js +783 -0
  185. package/viewer/viewer.js.map +1 -0
  186. package/viewer/viewerManager.d.ts +58 -0
  187. package/viewer/viewerManager.js +91 -0
  188. package/viewer/viewerManager.js.map +1 -0
  189. package/viewer/viewerWithTemplate.d.ts +9 -0
  190. package/viewer/viewerWithTemplate.js +20 -0
  191. package/viewer/viewerWithTemplate.js.map +1 -0
  192. package/assets/photoStudio.env +0 -0
  193. package/dist/babylon-viewer.esm.js +0 -2
  194. package/dist/babylon-viewer.esm.js.map +0 -1
  195. package/dist/babylon-viewer.esm.min.js +0 -2
  196. package/dist/babylon-viewer.esm.min.js.map +0 -1
  197. package/dist/chunks/EXT_lights_ies-BrhvRw2-.esm.js +0 -84
  198. package/dist/chunks/EXT_lights_ies-BrhvRw2-.esm.js.map +0 -1
  199. package/dist/chunks/EXT_lights_ies-Ddw_Gk8Q.esm.min.js +0 -2
  200. package/dist/chunks/EXT_lights_ies-Ddw_Gk8Q.esm.min.js.map +0 -1
  201. package/dist/chunks/EXT_lights_image_based-BjoWM5tf.esm.min.js +0 -2
  202. package/dist/chunks/EXT_lights_image_based-BjoWM5tf.esm.min.js.map +0 -1
  203. package/dist/chunks/EXT_lights_image_based-Bt2TW49Q.esm.js +0 -171
  204. package/dist/chunks/EXT_lights_image_based-Bt2TW49Q.esm.js.map +0 -1
  205. package/dist/chunks/EXT_mesh_gpu_instancing-Cy595I0S.esm.js +0 -86
  206. package/dist/chunks/EXT_mesh_gpu_instancing-Cy595I0S.esm.js.map +0 -1
  207. package/dist/chunks/EXT_mesh_gpu_instancing-DbVyjoq7.esm.min.js +0 -2
  208. package/dist/chunks/EXT_mesh_gpu_instancing-DbVyjoq7.esm.min.js.map +0 -1
  209. package/dist/chunks/EXT_meshopt_compression-PLPAdJXy.esm.min.js +0 -2
  210. package/dist/chunks/EXT_meshopt_compression-PLPAdJXy.esm.min.js.map +0 -1
  211. package/dist/chunks/EXT_meshopt_compression-ynnPogtK.esm.js +0 -134
  212. package/dist/chunks/EXT_meshopt_compression-ynnPogtK.esm.js.map +0 -1
  213. package/dist/chunks/EXT_texture_avif-D2N-IXnv.esm.min.js +0 -2
  214. package/dist/chunks/EXT_texture_avif-D2N-IXnv.esm.min.js.map +0 -1
  215. package/dist/chunks/EXT_texture_avif-Vt2hSGI5.esm.js +0 -44
  216. package/dist/chunks/EXT_texture_avif-Vt2hSGI5.esm.js.map +0 -1
  217. package/dist/chunks/EXT_texture_webp-CWz2PiP_.esm.min.js +0 -2
  218. package/dist/chunks/EXT_texture_webp-CWz2PiP_.esm.min.js.map +0 -1
  219. package/dist/chunks/EXT_texture_webp-i_LM5STR.esm.js +0 -43
  220. package/dist/chunks/EXT_texture_webp-i_LM5STR.esm.js.map +0 -1
  221. package/dist/chunks/ExtrasAsMetadata-BPRuILS3.esm.js +0 -64
  222. package/dist/chunks/ExtrasAsMetadata-BPRuILS3.esm.js.map +0 -1
  223. package/dist/chunks/ExtrasAsMetadata-BpKCYcU-.esm.min.js +0 -2
  224. package/dist/chunks/ExtrasAsMetadata-BpKCYcU-.esm.min.js.map +0 -1
  225. package/dist/chunks/KHR_animation_pointer-D25vJZ-D.esm.js +0 -352
  226. package/dist/chunks/KHR_animation_pointer-D25vJZ-D.esm.js.map +0 -1
  227. package/dist/chunks/KHR_animation_pointer-WM3ggesH.esm.min.js +0 -2
  228. package/dist/chunks/KHR_animation_pointer-WM3ggesH.esm.min.js.map +0 -1
  229. package/dist/chunks/KHR_draco_mesh_compression-6AbT2wN8.esm.min.js +0 -2
  230. package/dist/chunks/KHR_draco_mesh_compression-6AbT2wN8.esm.min.js.map +0 -1
  231. package/dist/chunks/KHR_draco_mesh_compression-Bn3cig1r.esm.js +0 -617
  232. package/dist/chunks/KHR_draco_mesh_compression-Bn3cig1r.esm.js.map +0 -1
  233. package/dist/chunks/KHR_interactivity-BN92hPs7.esm.js +0 -4033
  234. package/dist/chunks/KHR_interactivity-BN92hPs7.esm.js.map +0 -1
  235. package/dist/chunks/KHR_interactivity-B_CAm57j.esm.min.js +0 -2
  236. package/dist/chunks/KHR_interactivity-B_CAm57j.esm.min.js.map +0 -1
  237. package/dist/chunks/KHR_lights_punctual-BGKxFRu8.esm.js +0 -581
  238. package/dist/chunks/KHR_lights_punctual-BGKxFRu8.esm.js.map +0 -1
  239. package/dist/chunks/KHR_lights_punctual-DCOXnpRP.esm.min.js +0 -2
  240. package/dist/chunks/KHR_lights_punctual-DCOXnpRP.esm.min.js.map +0 -1
  241. package/dist/chunks/KHR_materials_anisotropy-Dav3eIQr.esm.js +0 -65
  242. package/dist/chunks/KHR_materials_anisotropy-Dav3eIQr.esm.js.map +0 -1
  243. package/dist/chunks/KHR_materials_anisotropy-I_WlXBtU.esm.min.js +0 -2
  244. package/dist/chunks/KHR_materials_anisotropy-I_WlXBtU.esm.min.js.map +0 -1
  245. package/dist/chunks/KHR_materials_clearcoat-D_Vx4NDv.esm.js +0 -96
  246. package/dist/chunks/KHR_materials_clearcoat-D_Vx4NDv.esm.js.map +0 -1
  247. package/dist/chunks/KHR_materials_clearcoat-DrU2oJzb.esm.min.js +0 -2
  248. package/dist/chunks/KHR_materials_clearcoat-DrU2oJzb.esm.min.js.map +0 -1
  249. package/dist/chunks/KHR_materials_diffuse_transmission-C8j8KtbL.esm.js +0 -97
  250. package/dist/chunks/KHR_materials_diffuse_transmission-C8j8KtbL.esm.js.map +0 -1
  251. package/dist/chunks/KHR_materials_diffuse_transmission-YyXsJa9T.esm.min.js +0 -2
  252. package/dist/chunks/KHR_materials_diffuse_transmission-YyXsJa9T.esm.min.js.map +0 -1
  253. package/dist/chunks/KHR_materials_dispersion-3Dk8ELun.esm.min.js +0 -2
  254. package/dist/chunks/KHR_materials_dispersion-3Dk8ELun.esm.min.js.map +0 -1
  255. package/dist/chunks/KHR_materials_dispersion-8_vd0eka.esm.js +0 -62
  256. package/dist/chunks/KHR_materials_dispersion-8_vd0eka.esm.js.map +0 -1
  257. package/dist/chunks/KHR_materials_emissive_strength-6VqWp9kS.esm.js +0 -55
  258. package/dist/chunks/KHR_materials_emissive_strength-6VqWp9kS.esm.js.map +0 -1
  259. package/dist/chunks/KHR_materials_emissive_strength-Bpd-wcN6.esm.min.js +0 -2
  260. package/dist/chunks/KHR_materials_emissive_strength-Bpd-wcN6.esm.min.js.map +0 -1
  261. package/dist/chunks/KHR_materials_ior-BGPYY59r.esm.min.js +0 -2
  262. package/dist/chunks/KHR_materials_ior-BGPYY59r.esm.min.js.map +0 -1
  263. package/dist/chunks/KHR_materials_ior-Cs0X7UR6.esm.js +0 -64
  264. package/dist/chunks/KHR_materials_ior-Cs0X7UR6.esm.js.map +0 -1
  265. package/dist/chunks/KHR_materials_iridescence-BI7_Q9V2.esm.js +0 -72
  266. package/dist/chunks/KHR_materials_iridescence-BI7_Q9V2.esm.js.map +0 -1
  267. package/dist/chunks/KHR_materials_iridescence-CvIyjrbg.esm.min.js +0 -2
  268. package/dist/chunks/KHR_materials_iridescence-CvIyjrbg.esm.min.js.map +0 -1
  269. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BFUvgZ3P.esm.min.js +0 -2
  270. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BFUvgZ3P.esm.min.js.map +0 -1
  271. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-C3famAnb.esm.js +0 -81
  272. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-C3famAnb.esm.js.map +0 -1
  273. package/dist/chunks/KHR_materials_sheen-B4V2NlWD.esm.js +0 -85
  274. package/dist/chunks/KHR_materials_sheen-B4V2NlWD.esm.js.map +0 -1
  275. package/dist/chunks/KHR_materials_sheen-CegUHCDa.esm.min.js +0 -2
  276. package/dist/chunks/KHR_materials_sheen-CegUHCDa.esm.min.js.map +0 -1
  277. package/dist/chunks/KHR_materials_specular-CC5wN1RR.esm.min.js +0 -2
  278. package/dist/chunks/KHR_materials_specular-CC5wN1RR.esm.min.js.map +0 -1
  279. package/dist/chunks/KHR_materials_specular-TypCUJDx.esm.js +0 -75
  280. package/dist/chunks/KHR_materials_specular-TypCUJDx.esm.js.map +0 -1
  281. package/dist/chunks/KHR_materials_transmission-BY9yIcAF.esm.js +0 -307
  282. package/dist/chunks/KHR_materials_transmission-BY9yIcAF.esm.js.map +0 -1
  283. package/dist/chunks/KHR_materials_transmission-SU6SJMhP.esm.min.js +0 -2
  284. package/dist/chunks/KHR_materials_transmission-SU6SJMhP.esm.min.js.map +0 -1
  285. package/dist/chunks/KHR_materials_unlit-DOjLjYi4.esm.js +0 -74
  286. package/dist/chunks/KHR_materials_unlit-DOjLjYi4.esm.js.map +0 -1
  287. package/dist/chunks/KHR_materials_unlit-DwCYujyL.esm.min.js +0 -2
  288. package/dist/chunks/KHR_materials_unlit-DwCYujyL.esm.min.js.map +0 -1
  289. package/dist/chunks/KHR_materials_variants-BJUrgDp4.esm.js +0 -262
  290. package/dist/chunks/KHR_materials_variants-BJUrgDp4.esm.js.map +0 -1
  291. package/dist/chunks/KHR_materials_variants-BXHHmDq_.esm.min.js +0 -2
  292. package/dist/chunks/KHR_materials_variants-BXHHmDq_.esm.min.js.map +0 -1
  293. package/dist/chunks/KHR_materials_volume-D8a4cCjx.esm.min.js +0 -2
  294. package/dist/chunks/KHR_materials_volume-D8a4cCjx.esm.min.js.map +0 -1
  295. package/dist/chunks/KHR_materials_volume-cyXWRVXR.esm.js +0 -87
  296. package/dist/chunks/KHR_materials_volume-cyXWRVXR.esm.js.map +0 -1
  297. package/dist/chunks/KHR_mesh_quantization-BJCC5tJC.esm.min.js +0 -2
  298. package/dist/chunks/KHR_mesh_quantization-BJCC5tJC.esm.min.js.map +0 -1
  299. package/dist/chunks/KHR_mesh_quantization-BhTbEUzk.esm.js +0 -26
  300. package/dist/chunks/KHR_mesh_quantization-BhTbEUzk.esm.js.map +0 -1
  301. package/dist/chunks/KHR_node_hoverability-C2Bud6ES.esm.min.js +0 -2
  302. package/dist/chunks/KHR_node_hoverability-C2Bud6ES.esm.min.js.map +0 -1
  303. package/dist/chunks/KHR_node_hoverability-DlRIeNZh.esm.js +0 -39
  304. package/dist/chunks/KHR_node_hoverability-DlRIeNZh.esm.js.map +0 -1
  305. package/dist/chunks/KHR_node_visibility-CB2d0WsR.esm.js +0 -46
  306. package/dist/chunks/KHR_node_visibility-CB2d0WsR.esm.js.map +0 -1
  307. package/dist/chunks/KHR_node_visibility-CFk6SMES.esm.min.js +0 -2
  308. package/dist/chunks/KHR_node_visibility-CFk6SMES.esm.min.js.map +0 -1
  309. package/dist/chunks/KHR_texture_basisu-B68Sil5v.esm.js +0 -43
  310. package/dist/chunks/KHR_texture_basisu-B68Sil5v.esm.js.map +0 -1
  311. package/dist/chunks/KHR_texture_basisu-C2OGAWY7.esm.min.js +0 -2
  312. package/dist/chunks/KHR_texture_basisu-C2OGAWY7.esm.min.js.map +0 -1
  313. package/dist/chunks/KHR_texture_transform-Bk2KMc5C.esm.js +0 -63
  314. package/dist/chunks/KHR_texture_transform-Bk2KMc5C.esm.js.map +0 -1
  315. package/dist/chunks/KHR_texture_transform-D9MJQRee.esm.min.js +0 -2
  316. package/dist/chunks/KHR_texture_transform-D9MJQRee.esm.min.js.map +0 -1
  317. package/dist/chunks/KHR_xmp_json_ld-BkiGlm_U.esm.min.js +0 -2
  318. package/dist/chunks/KHR_xmp_json_ld-BkiGlm_U.esm.min.js.map +0 -1
  319. package/dist/chunks/KHR_xmp_json_ld-a9-wGW9D.esm.js +0 -51
  320. package/dist/chunks/KHR_xmp_json_ld-a9-wGW9D.esm.js.map +0 -1
  321. package/dist/chunks/MSFT_audio_emitter-B7aM8Qaz.esm.min.js +0 -2
  322. package/dist/chunks/MSFT_audio_emitter-B7aM8Qaz.esm.min.js.map +0 -1
  323. package/dist/chunks/MSFT_audio_emitter-D0Z8eJZb.esm.js +0 -2207
  324. package/dist/chunks/MSFT_audio_emitter-D0Z8eJZb.esm.js.map +0 -1
  325. package/dist/chunks/MSFT_lod-BjIiS7t9.esm.js +0 -337
  326. package/dist/chunks/MSFT_lod-BjIiS7t9.esm.js.map +0 -1
  327. package/dist/chunks/MSFT_lod-DIOF_rM4.esm.min.js +0 -2
  328. package/dist/chunks/MSFT_lod-DIOF_rM4.esm.min.js.map +0 -1
  329. package/dist/chunks/MSFT_minecraftMesh-Bx5s-9FS.esm.js +0 -46
  330. package/dist/chunks/MSFT_minecraftMesh-Bx5s-9FS.esm.js.map +0 -1
  331. package/dist/chunks/MSFT_minecraftMesh-EqwVrdf4.esm.min.js +0 -2
  332. package/dist/chunks/MSFT_minecraftMesh-EqwVrdf4.esm.min.js.map +0 -1
  333. package/dist/chunks/MSFT_sRGBFactors-BJH-moQl.esm.min.js +0 -2
  334. package/dist/chunks/MSFT_sRGBFactors-BJH-moQl.esm.min.js.map +0 -1
  335. package/dist/chunks/MSFT_sRGBFactors-Db1zWU4o.esm.js +0 -47
  336. package/dist/chunks/MSFT_sRGBFactors-Db1zWU4o.esm.js.map +0 -1
  337. package/dist/chunks/animationGroup-DjpN6ul8.esm.js +0 -2482
  338. package/dist/chunks/animationGroup-DjpN6ul8.esm.js.map +0 -1
  339. package/dist/chunks/animationGroup-Duijaphk.esm.min.js +0 -2
  340. package/dist/chunks/animationGroup-Duijaphk.esm.min.js.map +0 -1
  341. package/dist/chunks/assetContainer-2ZDjmTJ7.esm.min.js +0 -2
  342. package/dist/chunks/assetContainer-2ZDjmTJ7.esm.min.js.map +0 -1
  343. package/dist/chunks/assetContainer-nATkXNwM.esm.js +0 -1720
  344. package/dist/chunks/assetContainer-nATkXNwM.esm.js.map +0 -1
  345. package/dist/chunks/audioEngine-C2kMlYrt.esm.js +0 -305
  346. package/dist/chunks/audioEngine-C2kMlYrt.esm.js.map +0 -1
  347. package/dist/chunks/audioEngine-iEjhOdSs.esm.min.js +0 -2
  348. package/dist/chunks/audioEngine-iEjhOdSs.esm.min.js.map +0 -1
  349. package/dist/chunks/bakedVertexAnimation-CX_LYhI-.esm.js +0 -114
  350. package/dist/chunks/bakedVertexAnimation-CX_LYhI-.esm.js.map +0 -1
  351. package/dist/chunks/bakedVertexAnimation-Duhv1yIp.esm.min.js +0 -2
  352. package/dist/chunks/bakedVertexAnimation-Duhv1yIp.esm.min.js.map +0 -1
  353. package/dist/chunks/basisTextureLoader-BJrbh335.esm.min.js +0 -2
  354. package/dist/chunks/basisTextureLoader-BJrbh335.esm.min.js.map +0 -1
  355. package/dist/chunks/basisTextureLoader-KDTm6Vl6.esm.js +0 -600
  356. package/dist/chunks/basisTextureLoader-KDTm6Vl6.esm.js.map +0 -1
  357. package/dist/chunks/dds-BiituSHb.esm.min.js +0 -2
  358. package/dist/chunks/dds-BiituSHb.esm.min.js.map +0 -1
  359. package/dist/chunks/dds-CeXwQQLK.esm.js +0 -540
  360. package/dist/chunks/dds-CeXwQQLK.esm.js.map +0 -1
  361. package/dist/chunks/ddsTextureLoader-D38C-6i9.esm.min.js +0 -2
  362. package/dist/chunks/ddsTextureLoader-D38C-6i9.esm.min.js.map +0 -1
  363. package/dist/chunks/ddsTextureLoader-DZgDhz39.esm.js +0 -88
  364. package/dist/chunks/ddsTextureLoader-DZgDhz39.esm.js.map +0 -1
  365. package/dist/chunks/decalFragment-B0hAgbHQ.esm.js +0 -18
  366. package/dist/chunks/decalFragment-B0hAgbHQ.esm.js.map +0 -1
  367. package/dist/chunks/decalFragment-BisNb1SA.esm.min.js +0 -2
  368. package/dist/chunks/decalFragment-BisNb1SA.esm.min.js.map +0 -1
  369. package/dist/chunks/default.fragment-BKDPVw0f.esm.min.js +0 -2
  370. package/dist/chunks/default.fragment-BKDPVw0f.esm.min.js.map +0 -1
  371. package/dist/chunks/default.fragment-CKRvFrOX.esm.min.js +0 -2
  372. package/dist/chunks/default.fragment-CKRvFrOX.esm.min.js.map +0 -1
  373. package/dist/chunks/default.fragment-DBNZgft_.esm.js +0 -515
  374. package/dist/chunks/default.fragment-DBNZgft_.esm.js.map +0 -1
  375. package/dist/chunks/default.fragment-mEUMwg3j.esm.js +0 -446
  376. package/dist/chunks/default.fragment-mEUMwg3j.esm.js.map +0 -1
  377. package/dist/chunks/default.vertex-BIMZfH9h.esm.min.js +0 -2
  378. package/dist/chunks/default.vertex-BIMZfH9h.esm.min.js.map +0 -1
  379. package/dist/chunks/default.vertex-BYGJcupS.esm.js +0 -181
  380. package/dist/chunks/default.vertex-BYGJcupS.esm.js.map +0 -1
  381. package/dist/chunks/default.vertex-D-mtahDc.esm.min.js +0 -2
  382. package/dist/chunks/default.vertex-D-mtahDc.esm.min.js.map +0 -1
  383. package/dist/chunks/default.vertex-uhPv4tjg.esm.js +0 -202
  384. package/dist/chunks/default.vertex-uhPv4tjg.esm.js.map +0 -1
  385. package/dist/chunks/defaultUboDeclaration-CRSLp0Ab.esm.js +0 -13
  386. package/dist/chunks/defaultUboDeclaration-CRSLp0Ab.esm.js.map +0 -1
  387. package/dist/chunks/defaultUboDeclaration-CWb_GB6I.esm.min.js +0 -2
  388. package/dist/chunks/defaultUboDeclaration-CWb_GB6I.esm.min.js.map +0 -1
  389. package/dist/chunks/defaultUboDeclaration-Coy2X5Tb.esm.min.js +0 -2
  390. package/dist/chunks/defaultUboDeclaration-Coy2X5Tb.esm.min.js.map +0 -1
  391. package/dist/chunks/defaultUboDeclaration-vQgTvkEe.esm.js +0 -15
  392. package/dist/chunks/defaultUboDeclaration-vQgTvkEe.esm.js.map +0 -1
  393. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +0 -11
  394. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +0 -1
  395. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +0 -2
  396. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +0 -1
  397. package/dist/chunks/dumpTools-DO-b-FSI.esm.js +0 -200
  398. package/dist/chunks/dumpTools-DO-b-FSI.esm.js.map +0 -1
  399. package/dist/chunks/dumpTools-a-Jxv0UI.esm.min.js +0 -2
  400. package/dist/chunks/dumpTools-a-Jxv0UI.esm.min.js.map +0 -1
  401. package/dist/chunks/engine-BcUVpC0R.esm.js +0 -2216
  402. package/dist/chunks/engine-BcUVpC0R.esm.js.map +0 -1
  403. package/dist/chunks/engine-CBJrzwFS.esm.min.js +0 -2
  404. package/dist/chunks/engine-CBJrzwFS.esm.min.js.map +0 -1
  405. package/dist/chunks/engine.common-CSbFYR6g.esm.min.js +0 -2
  406. package/dist/chunks/engine.common-CSbFYR6g.esm.min.js.map +0 -1
  407. package/dist/chunks/engine.common-MyFhbP5R.esm.js +0 -1162
  408. package/dist/chunks/engine.common-MyFhbP5R.esm.js.map +0 -1
  409. package/dist/chunks/envTextureLoader-DFF091wY.esm.min.js +0 -2
  410. package/dist/chunks/envTextureLoader-DFF091wY.esm.min.js.map +0 -1
  411. package/dist/chunks/envTextureLoader-Mp-YE5HT.esm.js +0 -64
  412. package/dist/chunks/envTextureLoader-Mp-YE5HT.esm.js.map +0 -1
  413. package/dist/chunks/environmentTextureTools-B2Hu-wcq.esm.min.js +0 -2
  414. package/dist/chunks/environmentTextureTools-B2Hu-wcq.esm.min.js.map +0 -1
  415. package/dist/chunks/environmentTextureTools-Dd-a4rbC.esm.js +0 -382
  416. package/dist/chunks/environmentTextureTools-Dd-a4rbC.esm.js.map +0 -1
  417. package/dist/chunks/exrTextureLoader-DqVtC6Vz.esm.min.js +0 -2
  418. package/dist/chunks/exrTextureLoader-DqVtC6Vz.esm.min.js.map +0 -1
  419. package/dist/chunks/exrTextureLoader-yzAS6vzg.esm.js +0 -1683
  420. package/dist/chunks/exrTextureLoader-yzAS6vzg.esm.js.map +0 -1
  421. package/dist/chunks/fogFragment-B6w-VW0A.esm.js +0 -102
  422. package/dist/chunks/fogFragment-B6w-VW0A.esm.js.map +0 -1
  423. package/dist/chunks/fogFragment-BdwYc4_S.esm.js +0 -101
  424. package/dist/chunks/fogFragment-BdwYc4_S.esm.js.map +0 -1
  425. package/dist/chunks/fogFragment-CKVFmHTL.esm.min.js +0 -2
  426. package/dist/chunks/fogFragment-CKVFmHTL.esm.min.js.map +0 -1
  427. package/dist/chunks/fogFragment-CrTUuKN1.esm.min.js +0 -2
  428. package/dist/chunks/fogFragment-CrTUuKN1.esm.min.js.map +0 -1
  429. package/dist/chunks/fresnelFunction-BeTviBu9.esm.js +0 -12
  430. package/dist/chunks/fresnelFunction-BeTviBu9.esm.js.map +0 -1
  431. package/dist/chunks/fresnelFunction-BsRBgxHr.esm.min.js +0 -2
  432. package/dist/chunks/fresnelFunction-BsRBgxHr.esm.min.js.map +0 -1
  433. package/dist/chunks/glTFLoader-BNxQLfRc.esm.min.js +0 -2
  434. package/dist/chunks/glTFLoader-BNxQLfRc.esm.min.js.map +0 -1
  435. package/dist/chunks/glTFLoader-C3ib4SHM.esm.js +0 -7586
  436. package/dist/chunks/glTFLoader-C3ib4SHM.esm.js.map +0 -1
  437. package/dist/chunks/glTFLoaderAnimation-BNIOeHW6.esm.min.js +0 -2
  438. package/dist/chunks/glTFLoaderAnimation-BNIOeHW6.esm.min.js.map +0 -1
  439. package/dist/chunks/glTFLoaderAnimation-CIZW3HpB.esm.js +0 -77
  440. package/dist/chunks/glTFLoaderAnimation-CIZW3HpB.esm.js.map +0 -1
  441. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +0 -2
  442. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +0 -1
  443. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +0 -67
  444. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +0 -1
  445. package/dist/chunks/harmonicsFunctions-BEk7hjTV.esm.js +0 -35
  446. package/dist/chunks/harmonicsFunctions-BEk7hjTV.esm.js.map +0 -1
  447. package/dist/chunks/harmonicsFunctions-DNd3DvtK.esm.js +0 -34
  448. package/dist/chunks/harmonicsFunctions-DNd3DvtK.esm.js.map +0 -1
  449. package/dist/chunks/harmonicsFunctions-Dcle49vi.esm.min.js +0 -2
  450. package/dist/chunks/harmonicsFunctions-Dcle49vi.esm.min.js.map +0 -1
  451. package/dist/chunks/harmonicsFunctions-yt7loS1y.esm.min.js +0 -2
  452. package/dist/chunks/harmonicsFunctions-yt7loS1y.esm.min.js.map +0 -1
  453. package/dist/chunks/hdrTextureLoader-CVa1eQ0k.esm.min.js +0 -2
  454. package/dist/chunks/hdrTextureLoader-CVa1eQ0k.esm.min.js.map +0 -1
  455. package/dist/chunks/hdrTextureLoader-vBST57Sm.esm.js +0 -253
  456. package/dist/chunks/hdrTextureLoader-vBST57Sm.esm.js.map +0 -1
  457. package/dist/chunks/helperFunctions-CZ3iJ2Zw.esm.js +0 -108
  458. package/dist/chunks/helperFunctions-CZ3iJ2Zw.esm.js.map +0 -1
  459. package/dist/chunks/helperFunctions-D0BgwVW1.esm.min.js +0 -2
  460. package/dist/chunks/helperFunctions-D0BgwVW1.esm.min.js.map +0 -1
  461. package/dist/chunks/helperFunctions-DjXuKfJE.esm.min.js +0 -2
  462. package/dist/chunks/helperFunctions-DjXuKfJE.esm.min.js.map +0 -1
  463. package/dist/chunks/helperFunctions-utyx3wAA.esm.js +0 -80
  464. package/dist/chunks/helperFunctions-utyx3wAA.esm.js.map +0 -1
  465. package/dist/chunks/iesTextureLoader-CROHHiJh.esm.js +0 -189
  466. package/dist/chunks/iesTextureLoader-CROHHiJh.esm.js.map +0 -1
  467. package/dist/chunks/iesTextureLoader-WrbecGoP.esm.min.js +0 -2
  468. package/dist/chunks/iesTextureLoader-WrbecGoP.esm.min.js.map +0 -1
  469. package/dist/chunks/index-DnSap2FI.esm.js +0 -74799
  470. package/dist/chunks/index-DnSap2FI.esm.js.map +0 -1
  471. package/dist/chunks/index-j2tloO6T.esm.min.js +0 -57
  472. package/dist/chunks/index-j2tloO6T.esm.min.js.map +0 -1
  473. package/dist/chunks/ktxTextureLoader-BiAsvhuB.esm.js +0 -814
  474. package/dist/chunks/ktxTextureLoader-BiAsvhuB.esm.js.map +0 -1
  475. package/dist/chunks/ktxTextureLoader-DdTyaRVu.esm.min.js +0 -2
  476. package/dist/chunks/ktxTextureLoader-DdTyaRVu.esm.min.js.map +0 -1
  477. package/dist/chunks/logDepthDeclaration-B3OVyLof.esm.min.js +0 -2
  478. package/dist/chunks/logDepthDeclaration-B3OVyLof.esm.min.js.map +0 -1
  479. package/dist/chunks/logDepthDeclaration-B7WZlAEH.esm.min.js +0 -2
  480. package/dist/chunks/logDepthDeclaration-B7WZlAEH.esm.min.js.map +0 -1
  481. package/dist/chunks/logDepthDeclaration-C4zeVBON.esm.js +0 -11
  482. package/dist/chunks/logDepthDeclaration-C4zeVBON.esm.js.map +0 -1
  483. package/dist/chunks/logDepthDeclaration-CWmx6aVd.esm.js +0 -35
  484. package/dist/chunks/logDepthDeclaration-CWmx6aVd.esm.js.map +0 -1
  485. package/dist/chunks/logDepthVertex-7PIzO8Uh.esm.js +0 -81
  486. package/dist/chunks/logDepthVertex-7PIzO8Uh.esm.js.map +0 -1
  487. package/dist/chunks/logDepthVertex-CplbMCm2.esm.min.js +0 -2
  488. package/dist/chunks/logDepthVertex-CplbMCm2.esm.min.js.map +0 -1
  489. package/dist/chunks/logDepthVertex-bHa3hoU5.esm.min.js +0 -2
  490. package/dist/chunks/logDepthVertex-bHa3hoU5.esm.min.js.map +0 -1
  491. package/dist/chunks/logDepthVertex-vHSzwfZ-.esm.js +0 -77
  492. package/dist/chunks/logDepthVertex-vHSzwfZ-.esm.js.map +0 -1
  493. package/dist/chunks/mainUVVaryingDeclaration-CNqYA-gB.esm.min.js +0 -2
  494. package/dist/chunks/mainUVVaryingDeclaration-CNqYA-gB.esm.min.js.map +0 -1
  495. package/dist/chunks/mainUVVaryingDeclaration-CeQvcMfP.esm.js +0 -11
  496. package/dist/chunks/mainUVVaryingDeclaration-CeQvcMfP.esm.js.map +0 -1
  497. package/dist/chunks/mainUVVaryingDeclaration-CvsL0qYU.esm.min.js +0 -2
  498. package/dist/chunks/mainUVVaryingDeclaration-CvsL0qYU.esm.min.js.map +0 -1
  499. package/dist/chunks/mainUVVaryingDeclaration-utHd2T0O.esm.js +0 -11
  500. package/dist/chunks/mainUVVaryingDeclaration-utHd2T0O.esm.js.map +0 -1
  501. package/dist/chunks/meshUboDeclaration-BJPUJrXy.esm.min.js +0 -2
  502. package/dist/chunks/meshUboDeclaration-BJPUJrXy.esm.min.js.map +0 -1
  503. package/dist/chunks/meshUboDeclaration-VYoDYbYC.esm.js +0 -26
  504. package/dist/chunks/meshUboDeclaration-VYoDYbYC.esm.js.map +0 -1
  505. package/dist/chunks/objFileLoader-8afS-_hY.esm.js +0 -1338
  506. package/dist/chunks/objFileLoader-8afS-_hY.esm.js.map +0 -1
  507. package/dist/chunks/objFileLoader-BzLe6gaH.esm.min.js +0 -2
  508. package/dist/chunks/objFileLoader-BzLe6gaH.esm.min.js.map +0 -1
  509. package/dist/chunks/oitFragment-CHqqW65b.esm.js +0 -1240
  510. package/dist/chunks/oitFragment-CHqqW65b.esm.js.map +0 -1
  511. package/dist/chunks/oitFragment-CeyJ_Jg6.esm.min.js +0 -2
  512. package/dist/chunks/oitFragment-CeyJ_Jg6.esm.min.js.map +0 -1
  513. package/dist/chunks/oitFragment-D_sf5Zw1.esm.min.js +0 -2
  514. package/dist/chunks/oitFragment-D_sf5Zw1.esm.min.js.map +0 -1
  515. package/dist/chunks/oitFragment-alnyZbc9.esm.js +0 -1078
  516. package/dist/chunks/oitFragment-alnyZbc9.esm.js.map +0 -1
  517. package/dist/chunks/pass.fragment-CwG7GshA.esm.js +0 -15
  518. package/dist/chunks/pass.fragment-CwG7GshA.esm.js.map +0 -1
  519. package/dist/chunks/pass.fragment-DfyFrxFg.esm.min.js +0 -2
  520. package/dist/chunks/pass.fragment-DfyFrxFg.esm.min.js.map +0 -1
  521. package/dist/chunks/pass.fragment-DvFaAVdg.esm.min.js +0 -2
  522. package/dist/chunks/pass.fragment-DvFaAVdg.esm.min.js.map +0 -1
  523. package/dist/chunks/pass.fragment-ZOmfFzXO.esm.js +0 -15
  524. package/dist/chunks/pass.fragment-ZOmfFzXO.esm.js.map +0 -1
  525. package/dist/chunks/pbr.fragment-C3zMQTsB.esm.min.js +0 -2
  526. package/dist/chunks/pbr.fragment-C3zMQTsB.esm.min.js.map +0 -1
  527. package/dist/chunks/pbr.fragment-CwRrGfA1.esm.js +0 -3232
  528. package/dist/chunks/pbr.fragment-CwRrGfA1.esm.js.map +0 -1
  529. package/dist/chunks/pbr.fragment-nFI8xyI0.esm.min.js +0 -2
  530. package/dist/chunks/pbr.fragment-nFI8xyI0.esm.min.js.map +0 -1
  531. package/dist/chunks/pbr.fragment-q5uFa6s9.esm.js +0 -3273
  532. package/dist/chunks/pbr.fragment-q5uFa6s9.esm.js.map +0 -1
  533. package/dist/chunks/pbr.vertex-CTHhPDZF.esm.js +0 -214
  534. package/dist/chunks/pbr.vertex-CTHhPDZF.esm.js.map +0 -1
  535. package/dist/chunks/pbr.vertex-CzNCwEDt.esm.min.js +0 -2
  536. package/dist/chunks/pbr.vertex-CzNCwEDt.esm.min.js.map +0 -1
  537. package/dist/chunks/pbr.vertex-CzdtHEkI.esm.min.js +0 -2
  538. package/dist/chunks/pbr.vertex-CzdtHEkI.esm.min.js.map +0 -1
  539. package/dist/chunks/pbr.vertex-xNnroO_M.esm.js +0 -339
  540. package/dist/chunks/pbr.vertex-xNnroO_M.esm.js.map +0 -1
  541. package/dist/chunks/postprocess.vertex-BYAf7HA1.esm.min.js +0 -2
  542. package/dist/chunks/postprocess.vertex-BYAf7HA1.esm.min.js.map +0 -1
  543. package/dist/chunks/postprocess.vertex-CbyPpEkq.esm.js +0 -20
  544. package/dist/chunks/postprocess.vertex-CbyPpEkq.esm.js.map +0 -1
  545. package/dist/chunks/rawTexture-CBbxz3pc.esm.js +0 -191
  546. package/dist/chunks/rawTexture-CBbxz3pc.esm.js.map +0 -1
  547. package/dist/chunks/rawTexture-DPGXBgNz.esm.min.js +0 -2
  548. package/dist/chunks/rawTexture-DPGXBgNz.esm.min.js.map +0 -1
  549. package/dist/chunks/ray-C_Cg5Enj.esm.js +0 -946
  550. package/dist/chunks/ray-C_Cg5Enj.esm.js.map +0 -1
  551. package/dist/chunks/ray-VbeIB6un.esm.min.js +0 -2
  552. package/dist/chunks/ray-VbeIB6un.esm.min.js.map +0 -1
  553. package/dist/chunks/rgbdDecode.fragment-C8j9F7Bp.esm.js +0 -13
  554. package/dist/chunks/rgbdDecode.fragment-C8j9F7Bp.esm.js.map +0 -1
  555. package/dist/chunks/rgbdDecode.fragment-CcXKr577.esm.js +0 -13
  556. package/dist/chunks/rgbdDecode.fragment-CcXKr577.esm.js.map +0 -1
  557. package/dist/chunks/rgbdDecode.fragment-Cwx1U7TE.esm.min.js +0 -2
  558. package/dist/chunks/rgbdDecode.fragment-Cwx1U7TE.esm.min.js.map +0 -1
  559. package/dist/chunks/rgbdDecode.fragment-DAz-9d4q.esm.min.js +0 -2
  560. package/dist/chunks/rgbdDecode.fragment-DAz-9d4q.esm.min.js.map +0 -1
  561. package/dist/chunks/rgbdEncode.fragment-B-B_-l4T.esm.min.js +0 -2
  562. package/dist/chunks/rgbdEncode.fragment-B-B_-l4T.esm.min.js.map +0 -1
  563. package/dist/chunks/rgbdEncode.fragment-C-IhOuE7.esm.js +0 -13
  564. package/dist/chunks/rgbdEncode.fragment-C-IhOuE7.esm.js.map +0 -1
  565. package/dist/chunks/rgbdEncode.fragment-D2kStupC.esm.min.js +0 -2
  566. package/dist/chunks/rgbdEncode.fragment-D2kStupC.esm.min.js.map +0 -1
  567. package/dist/chunks/rgbdEncode.fragment-DqeaHLSx.esm.js +0 -13
  568. package/dist/chunks/rgbdEncode.fragment-DqeaHLSx.esm.js.map +0 -1
  569. package/dist/chunks/splatFileLoader-CM4z7s6S.esm.min.js +0 -2
  570. package/dist/chunks/splatFileLoader-CM4z7s6S.esm.min.js.map +0 -1
  571. package/dist/chunks/splatFileLoader-DE83jdwc.esm.js +0 -3379
  572. package/dist/chunks/splatFileLoader-DE83jdwc.esm.js.map +0 -1
  573. package/dist/chunks/spotLight-98FksSI3.esm.min.js +0 -2
  574. package/dist/chunks/spotLight-98FksSI3.esm.min.js.map +0 -1
  575. package/dist/chunks/spotLight-DuWkoiV8.esm.js +0 -701
  576. package/dist/chunks/spotLight-DuWkoiV8.esm.js.map +0 -1
  577. package/dist/chunks/standardMaterial-Bp1mTX1d.esm.js +0 -1805
  578. package/dist/chunks/standardMaterial-Bp1mTX1d.esm.js.map +0 -1
  579. package/dist/chunks/standardMaterial-D8kKjcZn.esm.min.js +0 -2
  580. package/dist/chunks/standardMaterial-D8kKjcZn.esm.min.js.map +0 -1
  581. package/dist/chunks/stlFileLoader-BFPumqQB.esm.js +0 -238
  582. package/dist/chunks/stlFileLoader-BFPumqQB.esm.js.map +0 -1
  583. package/dist/chunks/stlFileLoader-BosbmaNZ.esm.min.js +0 -2
  584. package/dist/chunks/stlFileLoader-BosbmaNZ.esm.min.js.map +0 -1
  585. package/dist/chunks/tgaTextureLoader-CKRrtbo-.esm.min.js +0 -2
  586. package/dist/chunks/tgaTextureLoader-CKRrtbo-.esm.min.js.map +0 -1
  587. package/dist/chunks/tgaTextureLoader-PEVGE0SY.esm.js +0 -349
  588. package/dist/chunks/tgaTextureLoader-PEVGE0SY.esm.js.map +0 -1
  589. package/dist/chunks/thinEngine-kKYV_9vd.esm.js +0 -3848
  590. package/dist/chunks/thinEngine-kKYV_9vd.esm.js.map +0 -1
  591. package/dist/chunks/thinEngine-x_AyHrxY.esm.min.js +0 -2
  592. package/dist/chunks/thinEngine-x_AyHrxY.esm.min.js.map +0 -1
  593. package/dist/chunks/thinInstanceMesh-BlVs6kyh.esm.js +0 -314
  594. package/dist/chunks/thinInstanceMesh-BlVs6kyh.esm.js.map +0 -1
  595. package/dist/chunks/thinInstanceMesh-CNDaksPN.esm.min.js +0 -2
  596. package/dist/chunks/thinInstanceMesh-CNDaksPN.esm.min.js.map +0 -1
  597. package/dist/chunks/vertexColorMixing-2eNeJSgA.esm.min.js +0 -2
  598. package/dist/chunks/vertexColorMixing-2eNeJSgA.esm.min.js.map +0 -1
  599. package/dist/chunks/vertexColorMixing-BjOdZrk-.esm.js +0 -412
  600. package/dist/chunks/vertexColorMixing-BjOdZrk-.esm.js.map +0 -1
  601. package/dist/chunks/vertexColorMixing-BpqdwwOR.esm.min.js +0 -2
  602. package/dist/chunks/vertexColorMixing-BpqdwwOR.esm.min.js.map +0 -1
  603. package/dist/chunks/vertexColorMixing-CuP50ad9.esm.js +0 -522
  604. package/dist/chunks/vertexColorMixing-CuP50ad9.esm.js.map +0 -1
  605. package/dist/chunks/webgpuEngine-BW5Z2CFp.esm.min.js +0 -2
  606. package/dist/chunks/webgpuEngine-BW5Z2CFp.esm.min.js.map +0 -1
  607. package/dist/chunks/webgpuEngine-Cwdi0UKo.esm.js +0 -11533
  608. package/dist/chunks/webgpuEngine-Cwdi0UKo.esm.js.map +0 -1
  609. package/dist/chunks/workerPool-BUOov2K1.esm.js +0 -122
  610. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +0 -1
  611. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +0 -2
  612. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +0 -1
  613. package/lib/index.d.ts +0 -591
  614. package/lib/index.js +0 -2165
  615. package/lib/index.js.map +0 -1
@@ -1,946 +0,0 @@
1
- import { af as BuildArray, v as Vector3, ag as Epsilon, ah as IntersectionInfo, a6 as TmpVectors, a4 as Matrix, E as EngineStore, ai as PickingInfo, aj as _ImportHelper, ak as Scene, Y as Camera } from './index-DnSap2FI.esm.js';
2
-
3
- /**
4
- * Class representing a ray with position and direction
5
- */
6
- class Ray {
7
- /**
8
- * Creates a new ray
9
- * @param origin origin point
10
- * @param direction direction
11
- * @param length length of the ray
12
- * @param epsilon The epsilon value to use when calculating the ray/triangle intersection (default: 0)
13
- */
14
- constructor(
15
- /** origin point */
16
- origin,
17
- /** direction */
18
- direction,
19
- /** [Number.MAX_VALUE] length of the ray */
20
- length = Number.MAX_VALUE,
21
- /** [Epsilon] The epsilon value to use when calculating the ray/triangle intersection (default: Epsilon from math constants) */
22
- epsilon = Epsilon) {
23
- this.origin = origin;
24
- this.direction = direction;
25
- this.length = length;
26
- this.epsilon = epsilon;
27
- }
28
- // Methods
29
- /**
30
- * Clone the current ray
31
- * @returns a new ray
32
- */
33
- clone() {
34
- return new Ray(this.origin.clone(), this.direction.clone(), this.length);
35
- }
36
- /**
37
- * Checks if the ray intersects a box
38
- * This does not account for the ray length by design to improve perfs.
39
- * @param minimum bound of the box
40
- * @param maximum bound of the box
41
- * @param intersectionTreshold extra extend to be added to the box in all direction
42
- * @returns if the box was hit
43
- */
44
- intersectsBoxMinMax(minimum, maximum, intersectionTreshold = 0) {
45
- const newMinimum = Ray._TmpVector3[0].copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);
46
- const newMaximum = Ray._TmpVector3[1].copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);
47
- let d = 0.0;
48
- let maxValue = Number.MAX_VALUE;
49
- let inv;
50
- let min;
51
- let max;
52
- let temp;
53
- if (Math.abs(this.direction.x) < 0.0000001) {
54
- if (this.origin.x < newMinimum.x || this.origin.x > newMaximum.x) {
55
- return false;
56
- }
57
- }
58
- else {
59
- inv = 1.0 / this.direction.x;
60
- min = (newMinimum.x - this.origin.x) * inv;
61
- max = (newMaximum.x - this.origin.x) * inv;
62
- if (max === -Infinity) {
63
- max = Infinity;
64
- }
65
- if (min > max) {
66
- temp = min;
67
- min = max;
68
- max = temp;
69
- }
70
- d = Math.max(min, d);
71
- maxValue = Math.min(max, maxValue);
72
- if (d > maxValue) {
73
- return false;
74
- }
75
- }
76
- if (Math.abs(this.direction.y) < 0.0000001) {
77
- if (this.origin.y < newMinimum.y || this.origin.y > newMaximum.y) {
78
- return false;
79
- }
80
- }
81
- else {
82
- inv = 1.0 / this.direction.y;
83
- min = (newMinimum.y - this.origin.y) * inv;
84
- max = (newMaximum.y - this.origin.y) * inv;
85
- if (max === -Infinity) {
86
- max = Infinity;
87
- }
88
- if (min > max) {
89
- temp = min;
90
- min = max;
91
- max = temp;
92
- }
93
- d = Math.max(min, d);
94
- maxValue = Math.min(max, maxValue);
95
- if (d > maxValue) {
96
- return false;
97
- }
98
- }
99
- if (Math.abs(this.direction.z) < 0.0000001) {
100
- if (this.origin.z < newMinimum.z || this.origin.z > newMaximum.z) {
101
- return false;
102
- }
103
- }
104
- else {
105
- inv = 1.0 / this.direction.z;
106
- min = (newMinimum.z - this.origin.z) * inv;
107
- max = (newMaximum.z - this.origin.z) * inv;
108
- if (max === -Infinity) {
109
- max = Infinity;
110
- }
111
- if (min > max) {
112
- temp = min;
113
- min = max;
114
- max = temp;
115
- }
116
- d = Math.max(min, d);
117
- maxValue = Math.min(max, maxValue);
118
- if (d > maxValue) {
119
- return false;
120
- }
121
- }
122
- return true;
123
- }
124
- /**
125
- * Checks if the ray intersects a box
126
- * This does not account for the ray lenght by design to improve perfs.
127
- * @param box the bounding box to check
128
- * @param intersectionTreshold extra extend to be added to the BoundingBox in all direction
129
- * @returns if the box was hit
130
- */
131
- intersectsBox(box, intersectionTreshold = 0) {
132
- return this.intersectsBoxMinMax(box.minimum, box.maximum, intersectionTreshold);
133
- }
134
- /**
135
- * If the ray hits a sphere
136
- * @param sphere the bounding sphere to check
137
- * @param intersectionTreshold extra extend to be added to the BoundingSphere in all direction
138
- * @returns true if it hits the sphere
139
- */
140
- intersectsSphere(sphere, intersectionTreshold = 0) {
141
- const x = sphere.center.x - this.origin.x;
142
- const y = sphere.center.y - this.origin.y;
143
- const z = sphere.center.z - this.origin.z;
144
- const pyth = x * x + y * y + z * z;
145
- const radius = sphere.radius + intersectionTreshold;
146
- const rr = radius * radius;
147
- if (pyth <= rr) {
148
- return true;
149
- }
150
- const dot = x * this.direction.x + y * this.direction.y + z * this.direction.z;
151
- if (dot < 0.0) {
152
- return false;
153
- }
154
- const temp = pyth - dot * dot;
155
- return temp <= rr;
156
- }
157
- /**
158
- * If the ray hits a triange
159
- * @param vertex0 triangle vertex
160
- * @param vertex1 triangle vertex
161
- * @param vertex2 triangle vertex
162
- * @returns intersection information if hit
163
- */
164
- intersectsTriangle(vertex0, vertex1, vertex2) {
165
- const edge1 = Ray._TmpVector3[0];
166
- const edge2 = Ray._TmpVector3[1];
167
- const pvec = Ray._TmpVector3[2];
168
- const tvec = Ray._TmpVector3[3];
169
- const qvec = Ray._TmpVector3[4];
170
- vertex1.subtractToRef(vertex0, edge1);
171
- vertex2.subtractToRef(vertex0, edge2);
172
- Vector3.CrossToRef(this.direction, edge2, pvec);
173
- const det = Vector3.Dot(edge1, pvec);
174
- if (det === 0) {
175
- return null;
176
- }
177
- const invdet = 1 / det;
178
- this.origin.subtractToRef(vertex0, tvec);
179
- const bv = Vector3.Dot(tvec, pvec) * invdet;
180
- if (bv < -this.epsilon || bv > 1.0 + this.epsilon) {
181
- return null;
182
- }
183
- Vector3.CrossToRef(tvec, edge1, qvec);
184
- const bw = Vector3.Dot(this.direction, qvec) * invdet;
185
- if (bw < -this.epsilon || bv + bw > 1.0 + this.epsilon) {
186
- return null;
187
- }
188
- //check if the distance is longer than the predefined length.
189
- const distance = Vector3.Dot(edge2, qvec) * invdet;
190
- if (distance > this.length) {
191
- return null;
192
- }
193
- return new IntersectionInfo(1 - bv - bw, bv, distance);
194
- }
195
- /**
196
- * Checks if ray intersects a plane
197
- * @param plane the plane to check
198
- * @returns the distance away it was hit
199
- */
200
- intersectsPlane(plane) {
201
- let distance;
202
- const result1 = Vector3.Dot(plane.normal, this.direction);
203
- if (Math.abs(result1) < 9.99999997475243e-7) {
204
- return null;
205
- }
206
- else {
207
- const result2 = Vector3.Dot(plane.normal, this.origin);
208
- distance = (-plane.d - result2) / result1;
209
- if (distance < 0.0) {
210
- if (distance < -9.99999997475243e-7) {
211
- return null;
212
- }
213
- else {
214
- return 0;
215
- }
216
- }
217
- return distance;
218
- }
219
- }
220
- /**
221
- * Calculate the intercept of a ray on a given axis
222
- * @param axis to check 'x' | 'y' | 'z'
223
- * @param offset from axis interception (i.e. an offset of 1y is intercepted above ground)
224
- * @returns a vector containing the coordinates where 'axis' is equal to zero (else offset), or null if there is no intercept.
225
- */
226
- intersectsAxis(axis, offset = 0) {
227
- switch (axis) {
228
- case "y": {
229
- const t = (this.origin.y - offset) / this.direction.y;
230
- if (t > 0) {
231
- return null;
232
- }
233
- return new Vector3(this.origin.x + this.direction.x * -t, offset, this.origin.z + this.direction.z * -t);
234
- }
235
- case "x": {
236
- const t = (this.origin.x - offset) / this.direction.x;
237
- if (t > 0) {
238
- return null;
239
- }
240
- return new Vector3(offset, this.origin.y + this.direction.y * -t, this.origin.z + this.direction.z * -t);
241
- }
242
- case "z": {
243
- const t = (this.origin.z - offset) / this.direction.z;
244
- if (t > 0) {
245
- return null;
246
- }
247
- return new Vector3(this.origin.x + this.direction.x * -t, this.origin.y + this.direction.y * -t, offset);
248
- }
249
- default:
250
- return null;
251
- }
252
- }
253
- /**
254
- * 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,
255
- * irrespective of orientation.
256
- * @param mesh the mesh to check
257
- * @param fastCheck defines if the first intersection will be used (and not the closest)
258
- * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
259
- * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)
260
- * @param worldToUse defines the world matrix to use to get the world coordinate of the intersection point
261
- * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check
262
- * @returns picking info of the intersection
263
- */
264
- intersectsMesh(mesh, fastCheck, trianglePredicate, onlyBoundingInfo = false, worldToUse, skipBoundingInfo = false) {
265
- const tm = TmpVectors.Matrix[0];
266
- mesh.getWorldMatrix().invertToRef(tm);
267
- if (this._tmpRay) {
268
- Ray.TransformToRef(this, tm, this._tmpRay);
269
- }
270
- else {
271
- this._tmpRay = Ray.Transform(this, tm);
272
- }
273
- return mesh.intersects(this._tmpRay, fastCheck, trianglePredicate, onlyBoundingInfo, worldToUse, skipBoundingInfo);
274
- }
275
- /**
276
- * Checks if ray intersects a mesh
277
- * @param meshes the meshes to check
278
- * @param fastCheck defines if the first intersection will be used (and not the closest)
279
- * @param results array to store result in
280
- * @returns Array of picking infos
281
- */
282
- intersectsMeshes(meshes, fastCheck, results) {
283
- if (results) {
284
- results.length = 0;
285
- }
286
- else {
287
- results = [];
288
- }
289
- for (let i = 0; i < meshes.length; i++) {
290
- const pickInfo = this.intersectsMesh(meshes[i], fastCheck);
291
- if (pickInfo.hit) {
292
- results.push(pickInfo);
293
- }
294
- }
295
- results.sort(this._comparePickingInfo);
296
- return results;
297
- }
298
- _comparePickingInfo(pickingInfoA, pickingInfoB) {
299
- if (pickingInfoA.distance < pickingInfoB.distance) {
300
- return -1;
301
- }
302
- else if (pickingInfoA.distance > pickingInfoB.distance) {
303
- return 1;
304
- }
305
- else {
306
- return 0;
307
- }
308
- }
309
- /**
310
- * Intersection test between the ray and a given segment within a given tolerance (threshold)
311
- * @param sega the first point of the segment to test the intersection against
312
- * @param segb the second point of the segment to test the intersection against
313
- * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
314
- * @returns the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
315
- */
316
- intersectionSegment(sega, segb, threshold) {
317
- const o = this.origin;
318
- const u = TmpVectors.Vector3[0];
319
- const rsegb = TmpVectors.Vector3[1];
320
- const v = TmpVectors.Vector3[2];
321
- const w = TmpVectors.Vector3[3];
322
- segb.subtractToRef(sega, u);
323
- this.direction.scaleToRef(Ray._Rayl, v);
324
- o.addToRef(v, rsegb);
325
- sega.subtractToRef(o, w);
326
- const a = Vector3.Dot(u, u); // always >= 0
327
- const b = Vector3.Dot(u, v);
328
- const c = Vector3.Dot(v, v); // always >= 0
329
- const d = Vector3.Dot(u, w);
330
- const e = Vector3.Dot(v, w);
331
- const D = a * c - b * b; // always >= 0
332
- let sN, sD = D; // sc = sN / sD, default sD = D >= 0
333
- let tN, tD = D; // tc = tN / tD, default tD = D >= 0
334
- // compute the line parameters of the two closest points
335
- if (D < Ray._Smallnum) {
336
- // the lines are almost parallel
337
- sN = 0.0; // force using point P0 on segment S1
338
- sD = 1.0; // to prevent possible division by 0.0 later
339
- tN = e;
340
- tD = c;
341
- }
342
- else {
343
- // get the closest points on the infinite lines
344
- sN = b * e - c * d;
345
- tN = a * e - b * d;
346
- if (sN < 0.0) {
347
- // sc < 0 => the s=0 edge is visible
348
- sN = 0.0;
349
- tN = e;
350
- tD = c;
351
- }
352
- else if (sN > sD) {
353
- // sc > 1 => the s=1 edge is visible
354
- sN = sD;
355
- tN = e + b;
356
- tD = c;
357
- }
358
- }
359
- if (tN < 0.0) {
360
- // tc < 0 => the t=0 edge is visible
361
- tN = 0.0;
362
- // recompute sc for this edge
363
- if (-d < 0.0) {
364
- sN = 0.0;
365
- }
366
- else if (-d > a) {
367
- sN = sD;
368
- }
369
- else {
370
- sN = -d;
371
- sD = a;
372
- }
373
- }
374
- else if (tN > tD) {
375
- // tc > 1 => the t=1 edge is visible
376
- tN = tD;
377
- // recompute sc for this edge
378
- if (-d + b < 0.0) {
379
- sN = 0;
380
- }
381
- else if (-d + b > a) {
382
- sN = sD;
383
- }
384
- else {
385
- sN = -d + b;
386
- sD = a;
387
- }
388
- }
389
- // finally do the division to get sc and tc
390
- const sc = Math.abs(sN) < Ray._Smallnum ? 0.0 : sN / sD;
391
- const tc = Math.abs(tN) < Ray._Smallnum ? 0.0 : tN / tD;
392
- // get the difference of the two closest points
393
- const qtc = TmpVectors.Vector3[4];
394
- v.scaleToRef(tc, qtc);
395
- const qsc = TmpVectors.Vector3[5];
396
- u.scaleToRef(sc, qsc);
397
- qsc.addInPlace(w);
398
- const dP = TmpVectors.Vector3[6];
399
- qsc.subtractToRef(qtc, dP); // = S1(sc) - S2(tc)
400
- const isIntersected = tc > 0 && tc <= this.length && dP.lengthSquared() < threshold * threshold; // return intersection result
401
- if (isIntersected) {
402
- return qsc.length();
403
- }
404
- return -1;
405
- }
406
- /**
407
- * Update the ray from viewport position
408
- * @param x position
409
- * @param y y position
410
- * @param viewportWidth viewport width
411
- * @param viewportHeight viewport height
412
- * @param world world matrix
413
- * @param view view matrix
414
- * @param projection projection matrix
415
- * @param enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)
416
- * @returns this ray updated
417
- */
418
- update(x, y, viewportWidth, viewportHeight, world, view, projection, enableDistantPicking = false) {
419
- if (enableDistantPicking) {
420
- // With world matrices having great values (like 8000000000 on 1 or more scaling or position axis),
421
- // multiplying view/projection/world and doing invert will result in loss of float precision in the matrix.
422
- // One way to fix it is to compute the ray with world at identity then transform the ray in object space.
423
- // This is slower (2 matrix inverts instead of 1) but precision is preserved.
424
- // This is hidden behind `EnableDistantPicking` flag (default is false)
425
- if (!Ray._RayDistant) {
426
- Ray._RayDistant = Ray.Zero();
427
- }
428
- Ray._RayDistant.unprojectRayToRef(x, y, viewportWidth, viewportHeight, Matrix.IdentityReadOnly, view, projection);
429
- const tm = TmpVectors.Matrix[0];
430
- world.invertToRef(tm);
431
- Ray.TransformToRef(Ray._RayDistant, tm, this);
432
- }
433
- else {
434
- this.unprojectRayToRef(x, y, viewportWidth, viewportHeight, world, view, projection);
435
- }
436
- return this;
437
- }
438
- // Statics
439
- /**
440
- * Creates a ray with origin and direction of 0,0,0
441
- * @returns the new ray
442
- */
443
- static Zero() {
444
- return new Ray(Vector3.Zero(), Vector3.Zero());
445
- }
446
- /**
447
- * Creates a new ray from screen space and viewport
448
- * @param x position
449
- * @param y y position
450
- * @param viewportWidth viewport width
451
- * @param viewportHeight viewport height
452
- * @param world world matrix
453
- * @param view view matrix
454
- * @param projection projection matrix
455
- * @returns new ray
456
- */
457
- static CreateNew(x, y, viewportWidth, viewportHeight, world, view, projection) {
458
- const result = Ray.Zero();
459
- return result.update(x, y, viewportWidth, viewportHeight, world, view, projection);
460
- }
461
- /**
462
- * 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
463
- * transformed to the given world matrix.
464
- * @param origin The origin point
465
- * @param end The end point
466
- * @param world a matrix to transform the ray to. Default is the identity matrix.
467
- * @returns the new ray
468
- */
469
- static CreateNewFromTo(origin, end, world = Matrix.IdentityReadOnly) {
470
- const result = new Ray(new Vector3(0, 0, 0), new Vector3(0, 0, 0));
471
- return Ray.CreateFromToToRef(origin, end, result, world);
472
- }
473
- /**
474
- * 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
475
- * transformed to the given world matrix.
476
- * @param origin The origin point
477
- * @param end The end point
478
- * @param result the object to store the result
479
- * @param world a matrix to transform the ray to. Default is the identity matrix.
480
- * @returns the ref ray
481
- */
482
- static CreateFromToToRef(origin, end, result, world = Matrix.IdentityReadOnly) {
483
- result.origin.copyFrom(origin);
484
- const direction = end.subtractToRef(origin, result.direction);
485
- const length = Math.sqrt(direction.x * direction.x + direction.y * direction.y + direction.z * direction.z);
486
- result.length = length;
487
- result.direction.normalize();
488
- return Ray.TransformToRef(result, world, result);
489
- }
490
- /**
491
- * Transforms a ray by a matrix
492
- * @param ray ray to transform
493
- * @param matrix matrix to apply
494
- * @returns the resulting new ray
495
- */
496
- static Transform(ray, matrix) {
497
- const result = new Ray(new Vector3(0, 0, 0), new Vector3(0, 0, 0));
498
- Ray.TransformToRef(ray, matrix, result);
499
- return result;
500
- }
501
- /**
502
- * Transforms a ray by a matrix
503
- * @param ray ray to transform
504
- * @param matrix matrix to apply
505
- * @param result ray to store result in
506
- * @returns the updated result ray
507
- */
508
- static TransformToRef(ray, matrix, result) {
509
- Vector3.TransformCoordinatesToRef(ray.origin, matrix, result.origin);
510
- Vector3.TransformNormalToRef(ray.direction, matrix, result.direction);
511
- result.length = ray.length;
512
- result.epsilon = ray.epsilon;
513
- const dir = result.direction;
514
- const len = dir.length();
515
- if (!(len === 0 || len === 1)) {
516
- const num = 1.0 / len;
517
- dir.x *= num;
518
- dir.y *= num;
519
- dir.z *= num;
520
- result.length *= len;
521
- }
522
- return result;
523
- }
524
- /**
525
- * Unproject a ray from screen space to object space
526
- * @param sourceX defines the screen space x coordinate to use
527
- * @param sourceY defines the screen space y coordinate to use
528
- * @param viewportWidth defines the current width of the viewport
529
- * @param viewportHeight defines the current height of the viewport
530
- * @param world defines the world matrix to use (can be set to Identity to go to world space)
531
- * @param view defines the view matrix to use
532
- * @param projection defines the projection matrix to use
533
- */
534
- unprojectRayToRef(sourceX, sourceY, viewportWidth, viewportHeight, world, view, projection) {
535
- const matrix = TmpVectors.Matrix[0];
536
- world.multiplyToRef(view, matrix);
537
- matrix.multiplyToRef(projection, matrix);
538
- matrix.invert();
539
- const engine = EngineStore.LastCreatedEngine;
540
- const nearScreenSource = TmpVectors.Vector3[0];
541
- nearScreenSource.x = (sourceX / viewportWidth) * 2 - 1;
542
- nearScreenSource.y = -((sourceY / viewportHeight) * 2 - 1);
543
- nearScreenSource.z = engine?.useReverseDepthBuffer ? 1 : engine?.isNDCHalfZRange ? 0 : -1;
544
- // far Z need to be close but < to 1 or camera projection matrix with maxZ = 0 will NaN
545
- const farScreenSource = TmpVectors.Vector3[1].copyFromFloats(nearScreenSource.x, nearScreenSource.y, 1.0 - 1e-8);
546
- const nearVec3 = TmpVectors.Vector3[2];
547
- const farVec3 = TmpVectors.Vector3[3];
548
- Vector3._UnprojectFromInvertedMatrixToRef(nearScreenSource, matrix, nearVec3);
549
- Vector3._UnprojectFromInvertedMatrixToRef(farScreenSource, matrix, farVec3);
550
- this.origin.copyFrom(nearVec3);
551
- farVec3.subtractToRef(nearVec3, this.direction);
552
- this.direction.normalize();
553
- }
554
- }
555
- Ray._TmpVector3 = BuildArray(6, Vector3.Zero);
556
- Ray._RayDistant = Ray.Zero();
557
- Ray._Smallnum = 0.00000001;
558
- Ray._Rayl = 10e8;
559
- /**
560
- * Creates a ray that can be used to pick in the scene
561
- * @param scene defines the scene to use for the picking
562
- * @param x defines the x coordinate of the origin (on-screen)
563
- * @param y defines the y coordinate of the origin (on-screen)
564
- * @param world defines the world matrix to use if you want to pick in object space (instead of world space)
565
- * @param camera defines the camera to use for the picking
566
- * @param cameraViewSpace defines if picking will be done in view space (false by default)
567
- * @returns a Ray
568
- */
569
- function CreatePickingRay(scene, x, y, world, camera, cameraViewSpace = false) {
570
- const result = Ray.Zero();
571
- CreatePickingRayToRef(scene, x, y, world, result, camera, cameraViewSpace);
572
- return result;
573
- }
574
- /**
575
- * Creates a ray that can be used to pick in the scene
576
- * @param scene defines the scene to use for the picking
577
- * @param x defines the x coordinate of the origin (on-screen)
578
- * @param y defines the y coordinate of the origin (on-screen)
579
- * @param world defines the world matrix to use if you want to pick in object space (instead of world space)
580
- * @param result defines the ray where to store the picking ray
581
- * @param camera defines the camera to use for the picking
582
- * @param cameraViewSpace defines if picking will be done in view space (false by default)
583
- * @param enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)
584
- * @returns the current scene
585
- */
586
- function CreatePickingRayToRef(scene, x, y, world, result, camera, cameraViewSpace = false, enableDistantPicking = false) {
587
- const engine = scene.getEngine();
588
- if (!camera && !(camera = scene.activeCamera)) {
589
- return scene;
590
- }
591
- const cameraViewport = camera.viewport;
592
- const renderHeight = engine.getRenderHeight();
593
- const { x: vx, y: vy, width, height } = cameraViewport.toGlobal(engine.getRenderWidth(), renderHeight);
594
- // Moving coordinates to local viewport world
595
- const levelInv = 1 / engine.getHardwareScalingLevel();
596
- x = x * levelInv - vx;
597
- y = y * levelInv - (renderHeight - vy - height);
598
- result.update(x, y, width, height, world ? world : Matrix.IdentityReadOnly, cameraViewSpace ? Matrix.IdentityReadOnly : camera.getViewMatrix(), camera.getProjectionMatrix(), enableDistantPicking);
599
- return scene;
600
- }
601
- /**
602
- * Creates a ray that can be used to pick in the scene
603
- * @param scene defines the scene to use for the picking
604
- * @param x defines the x coordinate of the origin (on-screen)
605
- * @param y defines the y coordinate of the origin (on-screen)
606
- * @param camera defines the camera to use for the picking
607
- * @returns a Ray
608
- */
609
- function CreatePickingRayInCameraSpace(scene, x, y, camera) {
610
- const result = Ray.Zero();
611
- CreatePickingRayInCameraSpaceToRef(scene, x, y, result, camera);
612
- return result;
613
- }
614
- /**
615
- * Creates a ray that can be used to pick in the scene
616
- * @param scene defines the scene to use for the picking
617
- * @param x defines the x coordinate of the origin (on-screen)
618
- * @param y defines the y coordinate of the origin (on-screen)
619
- * @param result defines the ray where to store the picking ray
620
- * @param camera defines the camera to use for the picking
621
- * @returns the current scene
622
- */
623
- function CreatePickingRayInCameraSpaceToRef(scene, x, y, result, camera) {
624
- if (!PickingInfo) {
625
- return scene;
626
- }
627
- const engine = scene.getEngine();
628
- if (!camera && !(camera = scene.activeCamera)) {
629
- throw new Error("Active camera not set");
630
- }
631
- const cameraViewport = camera.viewport;
632
- const renderHeight = engine.getRenderHeight();
633
- const { x: vx, y: vy, width, height } = cameraViewport.toGlobal(engine.getRenderWidth(), renderHeight);
634
- const identity = Matrix.Identity();
635
- // Moving coordinates to local viewport world
636
- const levelInv = 1 / engine.getHardwareScalingLevel();
637
- x = x * levelInv - vx;
638
- y = y * levelInv - (renderHeight - vy - height);
639
- result.update(x, y, width, height, identity, identity, camera.getProjectionMatrix());
640
- return scene;
641
- }
642
- function InternalPickForMesh(pickingInfo, rayFunction, mesh, world, fastCheck, onlyBoundingInfo, trianglePredicate, skipBoundingInfo) {
643
- const ray = rayFunction(world, mesh.enableDistantPicking);
644
- const result = mesh.intersects(ray, fastCheck, trianglePredicate, onlyBoundingInfo, world, skipBoundingInfo);
645
- if (!result || !result.hit) {
646
- return null;
647
- }
648
- if (!fastCheck && pickingInfo != null && result.distance >= pickingInfo.distance) {
649
- return null;
650
- }
651
- return result;
652
- }
653
- function InternalPick(scene, rayFunction, predicate, fastCheck, onlyBoundingInfo, trianglePredicate) {
654
- let pickingInfo = null;
655
- const computeWorldMatrixForCamera = !!(scene.activeCameras && scene.activeCameras.length > 1 && scene.cameraToUseForPointers !== scene.activeCamera);
656
- const currentCamera = scene.cameraToUseForPointers || scene.activeCamera;
657
- const picker = InternalPickForMesh;
658
- for (let meshIndex = 0; meshIndex < scene.meshes.length; meshIndex++) {
659
- const mesh = scene.meshes[meshIndex];
660
- if (predicate) {
661
- if (!predicate(mesh, -1)) {
662
- continue;
663
- }
664
- }
665
- else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {
666
- continue;
667
- }
668
- const forceCompute = computeWorldMatrixForCamera && mesh.isWorldMatrixCameraDependent();
669
- const world = mesh.computeWorldMatrix(forceCompute, currentCamera);
670
- if (mesh.hasThinInstances && mesh.thinInstanceEnablePicking) {
671
- // first check if the ray intersects the whole bounding box/sphere of the mesh
672
- const result = picker(pickingInfo, rayFunction, mesh, world, true, true, trianglePredicate);
673
- if (result) {
674
- if (onlyBoundingInfo) {
675
- // the user only asked for a bounding info check so we can return
676
- return result;
677
- }
678
- const tmpMatrix = TmpVectors.Matrix[1];
679
- const thinMatrices = mesh.thinInstanceGetWorldMatrices();
680
- for (let index = 0; index < thinMatrices.length; index++) {
681
- if (predicate && !predicate(mesh, index)) {
682
- continue;
683
- }
684
- const thinMatrix = thinMatrices[index];
685
- thinMatrix.multiplyToRef(world, tmpMatrix);
686
- const result = picker(pickingInfo, rayFunction, mesh, tmpMatrix, fastCheck, onlyBoundingInfo, trianglePredicate, true);
687
- if (result) {
688
- pickingInfo = result;
689
- pickingInfo.thinInstanceIndex = index;
690
- if (fastCheck) {
691
- return pickingInfo;
692
- }
693
- }
694
- }
695
- }
696
- }
697
- else {
698
- const result = picker(pickingInfo, rayFunction, mesh, world, fastCheck, onlyBoundingInfo, trianglePredicate);
699
- if (result) {
700
- pickingInfo = result;
701
- if (fastCheck) {
702
- return pickingInfo;
703
- }
704
- }
705
- }
706
- }
707
- return pickingInfo || new PickingInfo();
708
- }
709
- function InternalMultiPick(scene, rayFunction, predicate, trianglePredicate) {
710
- if (!PickingInfo) {
711
- return null;
712
- }
713
- const pickingInfos = [];
714
- const computeWorldMatrixForCamera = !!(scene.activeCameras && scene.activeCameras.length > 1 && scene.cameraToUseForPointers !== scene.activeCamera);
715
- const currentCamera = scene.cameraToUseForPointers || scene.activeCamera;
716
- const picker = InternalPickForMesh;
717
- for (let meshIndex = 0; meshIndex < scene.meshes.length; meshIndex++) {
718
- const mesh = scene.meshes[meshIndex];
719
- if (predicate) {
720
- if (!predicate(mesh, -1)) {
721
- continue;
722
- }
723
- }
724
- else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {
725
- continue;
726
- }
727
- const forceCompute = computeWorldMatrixForCamera && mesh.isWorldMatrixCameraDependent();
728
- const world = mesh.computeWorldMatrix(forceCompute, currentCamera);
729
- if (mesh.hasThinInstances && mesh.thinInstanceEnablePicking) {
730
- const result = picker(null, rayFunction, mesh, world, true, true, trianglePredicate);
731
- if (result) {
732
- const tmpMatrix = TmpVectors.Matrix[1];
733
- const thinMatrices = mesh.thinInstanceGetWorldMatrices();
734
- for (let index = 0; index < thinMatrices.length; index++) {
735
- if (predicate && !predicate(mesh, index)) {
736
- continue;
737
- }
738
- const thinMatrix = thinMatrices[index];
739
- thinMatrix.multiplyToRef(world, tmpMatrix);
740
- const result = picker(null, rayFunction, mesh, tmpMatrix, false, false, trianglePredicate, true);
741
- if (result) {
742
- result.thinInstanceIndex = index;
743
- pickingInfos.push(result);
744
- }
745
- }
746
- }
747
- }
748
- else {
749
- const result = picker(null, rayFunction, mesh, world, false, false, trianglePredicate);
750
- if (result) {
751
- pickingInfos.push(result);
752
- }
753
- }
754
- }
755
- return pickingInfos;
756
- }
757
- /** Launch a ray to try to pick a mesh in the scene using only bounding information of the main mesh (not using submeshes)
758
- * @param scene defines the scene to use for the picking
759
- * @param x position on screen
760
- * @param y position on screen
761
- * @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
762
- * @param fastCheck defines if the first intersection will be used (and not the closest)
763
- * @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
764
- * @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)
765
- */
766
- function PickWithBoundingInfo(scene, x, y, predicate, fastCheck, camera) {
767
- if (!PickingInfo) {
768
- return null;
769
- }
770
- const result = InternalPick(scene, (world) => {
771
- if (!scene._tempPickingRay) {
772
- scene._tempPickingRay = Ray.Zero();
773
- }
774
- CreatePickingRayToRef(scene, x, y, world, scene._tempPickingRay, camera || null);
775
- return scene._tempPickingRay;
776
- }, predicate, fastCheck, true);
777
- if (result) {
778
- result.ray = CreatePickingRay(scene, x, y, Matrix.Identity(), camera || null);
779
- }
780
- return result;
781
- }
782
- /** Launch a ray to try to pick a mesh in the scene
783
- * @param scene defines the scene to use for the picking
784
- * @param x position on screen
785
- * @param y position on screen
786
- * @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
787
- * @param fastCheck defines if the first intersection will be used (and not the closest)
788
- * @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
789
- * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
790
- * @param _enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)
791
- * @returns a PickingInfo
792
- */
793
- function Pick(scene, x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking = false) {
794
- const result = InternalPick(scene, (world, enableDistantPicking) => {
795
- if (!scene._tempPickingRay) {
796
- scene._tempPickingRay = Ray.Zero();
797
- }
798
- CreatePickingRayToRef(scene, x, y, world, scene._tempPickingRay, camera || null, false, enableDistantPicking);
799
- return scene._tempPickingRay;
800
- }, predicate, fastCheck, false, trianglePredicate);
801
- if (result) {
802
- result.ray = CreatePickingRay(scene, x, y, Matrix.Identity(), camera || null);
803
- }
804
- return result;
805
- }
806
- /**
807
- * Use the given ray to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides,
808
- * irrespective of orientation.
809
- * @param scene defines the scene to use for the picking
810
- * @param ray The ray to use to pick meshes
811
- * @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
812
- * @param fastCheck defines if the first intersection will be used (and not the closest)
813
- * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
814
- * @returns a PickingInfo
815
- */
816
- function PickWithRay(scene, ray, predicate, fastCheck, trianglePredicate) {
817
- const result = InternalPick(scene, (world) => {
818
- if (!scene._pickWithRayInverseMatrix) {
819
- scene._pickWithRayInverseMatrix = Matrix.Identity();
820
- }
821
- world.invertToRef(scene._pickWithRayInverseMatrix);
822
- if (!scene._cachedRayForTransform) {
823
- scene._cachedRayForTransform = Ray.Zero();
824
- }
825
- Ray.TransformToRef(ray, scene._pickWithRayInverseMatrix, scene._cachedRayForTransform);
826
- return scene._cachedRayForTransform;
827
- }, predicate, fastCheck, false, trianglePredicate);
828
- if (result) {
829
- result.ray = ray;
830
- }
831
- return result;
832
- }
833
- /**
834
- * 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,
835
- * irrespective of orientation.
836
- * @param scene defines the scene to use for the picking
837
- * @param x X position on screen
838
- * @param y Y position on screen
839
- * @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
840
- * @param camera camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
841
- * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
842
- * @returns an array of PickingInfo
843
- */
844
- function MultiPick(scene, x, y, predicate, camera, trianglePredicate) {
845
- return InternalMultiPick(scene, (world) => CreatePickingRay(scene, x, y, world, camera || null), predicate, trianglePredicate);
846
- }
847
- /**
848
- * Launch a ray to try to pick a mesh in the scene
849
- * @param scene defines the scene to use for the picking
850
- * @param ray Ray to use
851
- * @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
852
- * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
853
- * @returns an array of PickingInfo
854
- */
855
- function MultiPickWithRay(scene, ray, predicate, trianglePredicate) {
856
- return InternalMultiPick(scene, (world) => {
857
- if (!scene._pickWithRayInverseMatrix) {
858
- scene._pickWithRayInverseMatrix = Matrix.Identity();
859
- }
860
- world.invertToRef(scene._pickWithRayInverseMatrix);
861
- if (!scene._cachedRayForTransform) {
862
- scene._cachedRayForTransform = Ray.Zero();
863
- }
864
- Ray.TransformToRef(ray, scene._pickWithRayInverseMatrix, scene._cachedRayForTransform);
865
- return scene._cachedRayForTransform;
866
- }, predicate, trianglePredicate);
867
- }
868
- /**
869
- * Gets a ray in the forward direction from the camera.
870
- * @param camera Defines the camera to use to get the ray from
871
- * @param refRay the ray to (re)use when setting the values
872
- * @param length Defines the length of the ray to create
873
- * @param transform Defines the transform to apply to the ray, by default the world matrx is used to create a workd space ray
874
- * @param origin Defines the start point of the ray which defaults to the camera position
875
- * @returns the forward ray
876
- */
877
- function GetForwardRayToRef(camera, refRay, length = 100, transform, origin) {
878
- if (!transform) {
879
- transform = camera.getWorldMatrix();
880
- }
881
- refRay.length = length;
882
- if (origin) {
883
- refRay.origin.copyFrom(origin);
884
- }
885
- else {
886
- refRay.origin.copyFrom(camera.position);
887
- }
888
- const forward = TmpVectors.Vector3[2];
889
- forward.set(0, 0, camera._scene.useRightHandedSystem ? -1 : 1);
890
- const worldForward = TmpVectors.Vector3[3];
891
- Vector3.TransformNormalToRef(forward, transform, worldForward);
892
- Vector3.NormalizeToRef(worldForward, refRay.direction);
893
- return refRay;
894
- }
895
- /**
896
- * Initialize the minimal interdependecies between the Ray and Scene and Camera
897
- * @param sceneClass defines the scene prototype to use
898
- * @param cameraClass defines the camera prototype to use
899
- */
900
- function AddRayExtensions(sceneClass, cameraClass) {
901
- if (cameraClass) {
902
- cameraClass.prototype.getForwardRay = function (length = 100, transform, origin) {
903
- return GetForwardRayToRef(this, new Ray(Vector3.Zero(), Vector3.Zero(), length), length, transform, origin);
904
- };
905
- cameraClass.prototype.getForwardRayToRef = function (refRay, length = 100, transform, origin) {
906
- return GetForwardRayToRef(this, refRay, length, transform, origin);
907
- };
908
- }
909
- if (!sceneClass) {
910
- return;
911
- }
912
- _ImportHelper._IsPickingAvailable = true;
913
- sceneClass.prototype.createPickingRay = function (x, y, world, camera, cameraViewSpace = false) {
914
- return CreatePickingRay(this, x, y, world, camera, cameraViewSpace);
915
- };
916
- }
917
-
918
- // Picking
919
- AddRayExtensions(Scene, Camera);
920
- Scene.prototype.createPickingRayToRef = function (x, y, world, result, camera, cameraViewSpace = false, enableDistantPicking = false) {
921
- return CreatePickingRayToRef(this, x, y, world, result, camera, cameraViewSpace, enableDistantPicking);
922
- };
923
- Scene.prototype.createPickingRayInCameraSpace = function (x, y, camera) {
924
- return CreatePickingRayInCameraSpace(this, x, y, camera);
925
- };
926
- Scene.prototype.createPickingRayInCameraSpaceToRef = function (x, y, result, camera) {
927
- return CreatePickingRayInCameraSpaceToRef(this, x, y, result, camera);
928
- };
929
- Scene.prototype.pickWithBoundingInfo = function (x, y, predicate, fastCheck, camera) {
930
- return PickWithBoundingInfo(this, x, y, predicate, fastCheck, camera);
931
- };
932
- Scene.prototype.pick = function (x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking = false) {
933
- return Pick(this, x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking);
934
- };
935
- Scene.prototype.pickWithRay = function (ray, predicate, fastCheck, trianglePredicate) {
936
- return PickWithRay(this, ray, predicate, fastCheck, trianglePredicate);
937
- };
938
- Scene.prototype.multiPick = function (x, y, predicate, camera, trianglePredicate) {
939
- return MultiPick(this, x, y, predicate, camera, trianglePredicate);
940
- };
941
- Scene.prototype.multiPickWithRay = function (ray, predicate, trianglePredicate) {
942
- return MultiPickWithRay(this, ray, predicate, trianglePredicate);
943
- };
944
-
945
- export { AddRayExtensions, CreatePickingRay, CreatePickingRayInCameraSpace, CreatePickingRayInCameraSpaceToRef, CreatePickingRayToRef, GetForwardRayToRef, MultiPick, MultiPickWithRay, Pick, PickWithBoundingInfo, PickWithRay, Ray };
946
- //# sourceMappingURL=ray-C_Cg5Enj.esm.js.map