@babylonjs/viewer 7.40.1-alpha → 7.40.1

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-gxFyrTPG.esm.min.js +0 -2
  198. package/dist/chunks/EXT_lights_ies-gxFyrTPG.esm.min.js.map +0 -1
  199. package/dist/chunks/EXT_lights_ies-pE68tmBj.esm.js +0 -84
  200. package/dist/chunks/EXT_lights_ies-pE68tmBj.esm.js.map +0 -1
  201. package/dist/chunks/EXT_lights_image_based-B8Oal0Ur.esm.min.js +0 -2
  202. package/dist/chunks/EXT_lights_image_based-B8Oal0Ur.esm.min.js.map +0 -1
  203. package/dist/chunks/EXT_lights_image_based-CmP_ZGlF.esm.js +0 -171
  204. package/dist/chunks/EXT_lights_image_based-CmP_ZGlF.esm.js.map +0 -1
  205. package/dist/chunks/EXT_mesh_gpu_instancing-DSFpOud_.esm.min.js +0 -2
  206. package/dist/chunks/EXT_mesh_gpu_instancing-DSFpOud_.esm.min.js.map +0 -1
  207. package/dist/chunks/EXT_mesh_gpu_instancing-DksAVeyV.esm.js +0 -86
  208. package/dist/chunks/EXT_mesh_gpu_instancing-DksAVeyV.esm.js.map +0 -1
  209. package/dist/chunks/EXT_meshopt_compression-CNUItnkN.esm.min.js +0 -2
  210. package/dist/chunks/EXT_meshopt_compression-CNUItnkN.esm.min.js.map +0 -1
  211. package/dist/chunks/EXT_meshopt_compression-CeM-AELC.esm.js +0 -134
  212. package/dist/chunks/EXT_meshopt_compression-CeM-AELC.esm.js.map +0 -1
  213. package/dist/chunks/EXT_texture_avif-BWOJV_Yf.esm.js +0 -44
  214. package/dist/chunks/EXT_texture_avif-BWOJV_Yf.esm.js.map +0 -1
  215. package/dist/chunks/EXT_texture_avif-CSTfqZHT.esm.min.js +0 -2
  216. package/dist/chunks/EXT_texture_avif-CSTfqZHT.esm.min.js.map +0 -1
  217. package/dist/chunks/EXT_texture_webp-4Pxv5jC9.esm.min.js +0 -2
  218. package/dist/chunks/EXT_texture_webp-4Pxv5jC9.esm.min.js.map +0 -1
  219. package/dist/chunks/EXT_texture_webp-C9og1YZL.esm.js +0 -43
  220. package/dist/chunks/EXT_texture_webp-C9og1YZL.esm.js.map +0 -1
  221. package/dist/chunks/ExtrasAsMetadata-BmFy6ZgN.esm.js +0 -64
  222. package/dist/chunks/ExtrasAsMetadata-BmFy6ZgN.esm.js.map +0 -1
  223. package/dist/chunks/ExtrasAsMetadata-BwYwFtj7.esm.min.js +0 -2
  224. package/dist/chunks/ExtrasAsMetadata-BwYwFtj7.esm.min.js.map +0 -1
  225. package/dist/chunks/KHR_animation_pointer-BM2iOlKg.esm.js +0 -352
  226. package/dist/chunks/KHR_animation_pointer-BM2iOlKg.esm.js.map +0 -1
  227. package/dist/chunks/KHR_animation_pointer-C7FvhqL3.esm.min.js +0 -2
  228. package/dist/chunks/KHR_animation_pointer-C7FvhqL3.esm.min.js.map +0 -1
  229. package/dist/chunks/KHR_draco_mesh_compression-BocaEHGh.esm.js +0 -617
  230. package/dist/chunks/KHR_draco_mesh_compression-BocaEHGh.esm.js.map +0 -1
  231. package/dist/chunks/KHR_draco_mesh_compression-CjRCmIUz.esm.min.js +0 -2
  232. package/dist/chunks/KHR_draco_mesh_compression-CjRCmIUz.esm.min.js.map +0 -1
  233. package/dist/chunks/KHR_interactivity-C_ndoQHo.esm.min.js +0 -2
  234. package/dist/chunks/KHR_interactivity-C_ndoQHo.esm.min.js.map +0 -1
  235. package/dist/chunks/KHR_interactivity-ClHXW_8S.esm.js +0 -4033
  236. package/dist/chunks/KHR_interactivity-ClHXW_8S.esm.js.map +0 -1
  237. package/dist/chunks/KHR_lights_punctual-D0u7ZFj4.esm.js +0 -581
  238. package/dist/chunks/KHR_lights_punctual-D0u7ZFj4.esm.js.map +0 -1
  239. package/dist/chunks/KHR_lights_punctual-Z509RdIo.esm.min.js +0 -2
  240. package/dist/chunks/KHR_lights_punctual-Z509RdIo.esm.min.js.map +0 -1
  241. package/dist/chunks/KHR_materials_anisotropy-Dz4vBqG3.esm.min.js +0 -2
  242. package/dist/chunks/KHR_materials_anisotropy-Dz4vBqG3.esm.min.js.map +0 -1
  243. package/dist/chunks/KHR_materials_anisotropy-VuLS4v3P.esm.js +0 -65
  244. package/dist/chunks/KHR_materials_anisotropy-VuLS4v3P.esm.js.map +0 -1
  245. package/dist/chunks/KHR_materials_clearcoat-DM7vCrC3.esm.min.js +0 -2
  246. package/dist/chunks/KHR_materials_clearcoat-DM7vCrC3.esm.min.js.map +0 -1
  247. package/dist/chunks/KHR_materials_clearcoat-Dt0nQ5Ky.esm.js +0 -96
  248. package/dist/chunks/KHR_materials_clearcoat-Dt0nQ5Ky.esm.js.map +0 -1
  249. package/dist/chunks/KHR_materials_diffuse_transmission-1Pa4ScwD.esm.min.js +0 -2
  250. package/dist/chunks/KHR_materials_diffuse_transmission-1Pa4ScwD.esm.min.js.map +0 -1
  251. package/dist/chunks/KHR_materials_diffuse_transmission-DIUHVeOQ.esm.js +0 -97
  252. package/dist/chunks/KHR_materials_diffuse_transmission-DIUHVeOQ.esm.js.map +0 -1
  253. package/dist/chunks/KHR_materials_dispersion-CMpGZsUw.esm.min.js +0 -2
  254. package/dist/chunks/KHR_materials_dispersion-CMpGZsUw.esm.min.js.map +0 -1
  255. package/dist/chunks/KHR_materials_dispersion-CeSj8nUI.esm.js +0 -62
  256. package/dist/chunks/KHR_materials_dispersion-CeSj8nUI.esm.js.map +0 -1
  257. package/dist/chunks/KHR_materials_emissive_strength-CQQX31qK.esm.js +0 -55
  258. package/dist/chunks/KHR_materials_emissive_strength-CQQX31qK.esm.js.map +0 -1
  259. package/dist/chunks/KHR_materials_emissive_strength-DH4A4kIp.esm.min.js +0 -2
  260. package/dist/chunks/KHR_materials_emissive_strength-DH4A4kIp.esm.min.js.map +0 -1
  261. package/dist/chunks/KHR_materials_ior-BTU1gw-j.esm.js +0 -64
  262. package/dist/chunks/KHR_materials_ior-BTU1gw-j.esm.js.map +0 -1
  263. package/dist/chunks/KHR_materials_ior-DyzPdK6b.esm.min.js +0 -2
  264. package/dist/chunks/KHR_materials_ior-DyzPdK6b.esm.min.js.map +0 -1
  265. package/dist/chunks/KHR_materials_iridescence-8ZgbULX5.esm.min.js +0 -2
  266. package/dist/chunks/KHR_materials_iridescence-8ZgbULX5.esm.min.js.map +0 -1
  267. package/dist/chunks/KHR_materials_iridescence-D2HCEadq.esm.js +0 -72
  268. package/dist/chunks/KHR_materials_iridescence-D2HCEadq.esm.js.map +0 -1
  269. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-C4K79VpA.esm.min.js +0 -2
  270. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-C4K79VpA.esm.min.js.map +0 -1
  271. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DtJVJ-gl.esm.js +0 -81
  272. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DtJVJ-gl.esm.js.map +0 -1
  273. package/dist/chunks/KHR_materials_sheen-CT4KjW_v.esm.js +0 -85
  274. package/dist/chunks/KHR_materials_sheen-CT4KjW_v.esm.js.map +0 -1
  275. package/dist/chunks/KHR_materials_sheen-DQt5abo-.esm.min.js +0 -2
  276. package/dist/chunks/KHR_materials_sheen-DQt5abo-.esm.min.js.map +0 -1
  277. package/dist/chunks/KHR_materials_specular-CCvL1awH.esm.min.js +0 -2
  278. package/dist/chunks/KHR_materials_specular-CCvL1awH.esm.min.js.map +0 -1
  279. package/dist/chunks/KHR_materials_specular-CgLKBQCa.esm.js +0 -75
  280. package/dist/chunks/KHR_materials_specular-CgLKBQCa.esm.js.map +0 -1
  281. package/dist/chunks/KHR_materials_transmission-B64oDwox.esm.js +0 -307
  282. package/dist/chunks/KHR_materials_transmission-B64oDwox.esm.js.map +0 -1
  283. package/dist/chunks/KHR_materials_transmission-C6yPYKde.esm.min.js +0 -2
  284. package/dist/chunks/KHR_materials_transmission-C6yPYKde.esm.min.js.map +0 -1
  285. package/dist/chunks/KHR_materials_unlit-BGPDq328.esm.js +0 -74
  286. package/dist/chunks/KHR_materials_unlit-BGPDq328.esm.js.map +0 -1
  287. package/dist/chunks/KHR_materials_unlit-Sz3qCEGr.esm.min.js +0 -2
  288. package/dist/chunks/KHR_materials_unlit-Sz3qCEGr.esm.min.js.map +0 -1
  289. package/dist/chunks/KHR_materials_variants-Cqw7xft3.esm.min.js +0 -2
  290. package/dist/chunks/KHR_materials_variants-Cqw7xft3.esm.min.js.map +0 -1
  291. package/dist/chunks/KHR_materials_variants-D7rYTNoB.esm.js +0 -262
  292. package/dist/chunks/KHR_materials_variants-D7rYTNoB.esm.js.map +0 -1
  293. package/dist/chunks/KHR_materials_volume-BBsNt0LM.esm.js +0 -87
  294. package/dist/chunks/KHR_materials_volume-BBsNt0LM.esm.js.map +0 -1
  295. package/dist/chunks/KHR_materials_volume-DfWO7kG_.esm.min.js +0 -2
  296. package/dist/chunks/KHR_materials_volume-DfWO7kG_.esm.min.js.map +0 -1
  297. package/dist/chunks/KHR_mesh_quantization-BiDGkiGh.esm.min.js +0 -2
  298. package/dist/chunks/KHR_mesh_quantization-BiDGkiGh.esm.min.js.map +0 -1
  299. package/dist/chunks/KHR_mesh_quantization-fE1qitjF.esm.js +0 -26
  300. package/dist/chunks/KHR_mesh_quantization-fE1qitjF.esm.js.map +0 -1
  301. package/dist/chunks/KHR_node_hoverability-DaOK-Y48.esm.min.js +0 -2
  302. package/dist/chunks/KHR_node_hoverability-DaOK-Y48.esm.min.js.map +0 -1
  303. package/dist/chunks/KHR_node_hoverability-glogCdHq.esm.js +0 -39
  304. package/dist/chunks/KHR_node_hoverability-glogCdHq.esm.js.map +0 -1
  305. package/dist/chunks/KHR_node_visibility-BCVXn2la.esm.min.js +0 -2
  306. package/dist/chunks/KHR_node_visibility-BCVXn2la.esm.min.js.map +0 -1
  307. package/dist/chunks/KHR_node_visibility-CCfVtnan.esm.js +0 -46
  308. package/dist/chunks/KHR_node_visibility-CCfVtnan.esm.js.map +0 -1
  309. package/dist/chunks/KHR_texture_basisu-_cpZJuOo.esm.min.js +0 -2
  310. package/dist/chunks/KHR_texture_basisu-_cpZJuOo.esm.min.js.map +0 -1
  311. package/dist/chunks/KHR_texture_basisu-nhRrTq0b.esm.js +0 -43
  312. package/dist/chunks/KHR_texture_basisu-nhRrTq0b.esm.js.map +0 -1
  313. package/dist/chunks/KHR_texture_transform-AgI_J0Ru.esm.js +0 -63
  314. package/dist/chunks/KHR_texture_transform-AgI_J0Ru.esm.js.map +0 -1
  315. package/dist/chunks/KHR_texture_transform-CgcA7bhJ.esm.min.js +0 -2
  316. package/dist/chunks/KHR_texture_transform-CgcA7bhJ.esm.min.js.map +0 -1
  317. package/dist/chunks/KHR_xmp_json_ld-C37VZwlU.esm.min.js +0 -2
  318. package/dist/chunks/KHR_xmp_json_ld-C37VZwlU.esm.min.js.map +0 -1
  319. package/dist/chunks/KHR_xmp_json_ld-Cm4z6qFH.esm.js +0 -51
  320. package/dist/chunks/KHR_xmp_json_ld-Cm4z6qFH.esm.js.map +0 -1
  321. package/dist/chunks/MSFT_audio_emitter-4EFTMS8D.esm.js +0 -2207
  322. package/dist/chunks/MSFT_audio_emitter-4EFTMS8D.esm.js.map +0 -1
  323. package/dist/chunks/MSFT_audio_emitter-Czn1DAbD.esm.min.js +0 -2
  324. package/dist/chunks/MSFT_audio_emitter-Czn1DAbD.esm.min.js.map +0 -1
  325. package/dist/chunks/MSFT_lod-Bn4FnO5A.esm.js +0 -337
  326. package/dist/chunks/MSFT_lod-Bn4FnO5A.esm.js.map +0 -1
  327. package/dist/chunks/MSFT_lod-DDB-SKXR.esm.min.js +0 -2
  328. package/dist/chunks/MSFT_lod-DDB-SKXR.esm.min.js.map +0 -1
  329. package/dist/chunks/MSFT_minecraftMesh-APRwcxWb.esm.min.js +0 -2
  330. package/dist/chunks/MSFT_minecraftMesh-APRwcxWb.esm.min.js.map +0 -1
  331. package/dist/chunks/MSFT_minecraftMesh-DPvby_FZ.esm.js +0 -46
  332. package/dist/chunks/MSFT_minecraftMesh-DPvby_FZ.esm.js.map +0 -1
  333. package/dist/chunks/MSFT_sRGBFactors-D33sXFGi.esm.js +0 -47
  334. package/dist/chunks/MSFT_sRGBFactors-D33sXFGi.esm.js.map +0 -1
  335. package/dist/chunks/MSFT_sRGBFactors-OsUqZSue.esm.min.js +0 -2
  336. package/dist/chunks/MSFT_sRGBFactors-OsUqZSue.esm.min.js.map +0 -1
  337. package/dist/chunks/animationGroup-BR3zskS8.esm.js +0 -2482
  338. package/dist/chunks/animationGroup-BR3zskS8.esm.js.map +0 -1
  339. package/dist/chunks/animationGroup-ChIp5GuO.esm.min.js +0 -2
  340. package/dist/chunks/animationGroup-ChIp5GuO.esm.min.js.map +0 -1
  341. package/dist/chunks/assetContainer-DLSDgjTx.esm.min.js +0 -2
  342. package/dist/chunks/assetContainer-DLSDgjTx.esm.min.js.map +0 -1
  343. package/dist/chunks/assetContainer-cm8rvay3.esm.js +0 -1720
  344. package/dist/chunks/assetContainer-cm8rvay3.esm.js.map +0 -1
  345. package/dist/chunks/audioEngine-Cx5dB73O.esm.js +0 -305
  346. package/dist/chunks/audioEngine-Cx5dB73O.esm.js.map +0 -1
  347. package/dist/chunks/audioEngine-hKZ2m0jY.esm.min.js +0 -2
  348. package/dist/chunks/audioEngine-hKZ2m0jY.esm.min.js.map +0 -1
  349. package/dist/chunks/bakedVertexAnimation-BCUFE4CP.esm.min.js +0 -2
  350. package/dist/chunks/bakedVertexAnimation-BCUFE4CP.esm.min.js.map +0 -1
  351. package/dist/chunks/bakedVertexAnimation-ByPKjjzz.esm.js +0 -114
  352. package/dist/chunks/bakedVertexAnimation-ByPKjjzz.esm.js.map +0 -1
  353. package/dist/chunks/basisTextureLoader-BIqCbGFg.esm.min.js +0 -2
  354. package/dist/chunks/basisTextureLoader-BIqCbGFg.esm.min.js.map +0 -1
  355. package/dist/chunks/basisTextureLoader-CT8X4ynA.esm.js +0 -600
  356. package/dist/chunks/basisTextureLoader-CT8X4ynA.esm.js.map +0 -1
  357. package/dist/chunks/dds-BDOPTCsA.esm.min.js +0 -2
  358. package/dist/chunks/dds-BDOPTCsA.esm.min.js.map +0 -1
  359. package/dist/chunks/dds-BYrGO6eI.esm.js +0 -540
  360. package/dist/chunks/dds-BYrGO6eI.esm.js.map +0 -1
  361. package/dist/chunks/ddsTextureLoader-BbrffKmM.esm.min.js +0 -2
  362. package/dist/chunks/ddsTextureLoader-BbrffKmM.esm.min.js.map +0 -1
  363. package/dist/chunks/ddsTextureLoader-C36kkIBH.esm.js +0 -88
  364. package/dist/chunks/ddsTextureLoader-C36kkIBH.esm.js.map +0 -1
  365. package/dist/chunks/decalFragment-07cq9QvS.esm.min.js +0 -2
  366. package/dist/chunks/decalFragment-07cq9QvS.esm.min.js.map +0 -1
  367. package/dist/chunks/decalFragment-B16Nfnl3.esm.js +0 -18
  368. package/dist/chunks/decalFragment-B16Nfnl3.esm.js.map +0 -1
  369. package/dist/chunks/default.fragment-BkjbMxBE.esm.min.js +0 -2
  370. package/dist/chunks/default.fragment-BkjbMxBE.esm.min.js.map +0 -1
  371. package/dist/chunks/default.fragment-C-8jVS2k.esm.min.js +0 -2
  372. package/dist/chunks/default.fragment-C-8jVS2k.esm.min.js.map +0 -1
  373. package/dist/chunks/default.fragment-C3Pectqi.esm.js +0 -515
  374. package/dist/chunks/default.fragment-C3Pectqi.esm.js.map +0 -1
  375. package/dist/chunks/default.fragment-D3LhG5le.esm.js +0 -446
  376. package/dist/chunks/default.fragment-D3LhG5le.esm.js.map +0 -1
  377. package/dist/chunks/default.vertex-CPx_2Z0S.esm.js +0 -181
  378. package/dist/chunks/default.vertex-CPx_2Z0S.esm.js.map +0 -1
  379. package/dist/chunks/default.vertex-CVMUuXku.esm.js +0 -202
  380. package/dist/chunks/default.vertex-CVMUuXku.esm.js.map +0 -1
  381. package/dist/chunks/default.vertex-CbVQZVXB.esm.min.js +0 -2
  382. package/dist/chunks/default.vertex-CbVQZVXB.esm.min.js.map +0 -1
  383. package/dist/chunks/default.vertex-S3Wv9p0Q.esm.min.js +0 -2
  384. package/dist/chunks/default.vertex-S3Wv9p0Q.esm.min.js.map +0 -1
  385. package/dist/chunks/defaultUboDeclaration-BdxOUPT0.esm.min.js +0 -2
  386. package/dist/chunks/defaultUboDeclaration-BdxOUPT0.esm.min.js.map +0 -1
  387. package/dist/chunks/defaultUboDeclaration-CUaZKOKG.esm.min.js +0 -2
  388. package/dist/chunks/defaultUboDeclaration-CUaZKOKG.esm.min.js.map +0 -1
  389. package/dist/chunks/defaultUboDeclaration-DdcmVbYg.esm.js +0 -15
  390. package/dist/chunks/defaultUboDeclaration-DdcmVbYg.esm.js.map +0 -1
  391. package/dist/chunks/defaultUboDeclaration-rLhenj1H.esm.js +0 -13
  392. package/dist/chunks/defaultUboDeclaration-rLhenj1H.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-CPmY0U7D.esm.js +0 -200
  398. package/dist/chunks/dumpTools-CPmY0U7D.esm.js.map +0 -1
  399. package/dist/chunks/dumpTools-DVDwJ2sz.esm.min.js +0 -2
  400. package/dist/chunks/dumpTools-DVDwJ2sz.esm.min.js.map +0 -1
  401. package/dist/chunks/engine-BqSrdURz.esm.min.js +0 -2
  402. package/dist/chunks/engine-BqSrdURz.esm.min.js.map +0 -1
  403. package/dist/chunks/engine-D_GgT2Nf.esm.js +0 -2216
  404. package/dist/chunks/engine-D_GgT2Nf.esm.js.map +0 -1
  405. package/dist/chunks/engine.common-CN1Lug5p.esm.js +0 -1162
  406. package/dist/chunks/engine.common-CN1Lug5p.esm.js.map +0 -1
  407. package/dist/chunks/engine.common-DgiXKhLy.esm.min.js +0 -2
  408. package/dist/chunks/engine.common-DgiXKhLy.esm.min.js.map +0 -1
  409. package/dist/chunks/envTextureLoader-BORNR9vu.esm.min.js +0 -2
  410. package/dist/chunks/envTextureLoader-BORNR9vu.esm.min.js.map +0 -1
  411. package/dist/chunks/envTextureLoader-DHwsXTfw.esm.js +0 -64
  412. package/dist/chunks/envTextureLoader-DHwsXTfw.esm.js.map +0 -1
  413. package/dist/chunks/environmentTextureTools-B2vnsFq-.esm.js +0 -382
  414. package/dist/chunks/environmentTextureTools-B2vnsFq-.esm.js.map +0 -1
  415. package/dist/chunks/environmentTextureTools-BYQHZH-c.esm.min.js +0 -2
  416. package/dist/chunks/environmentTextureTools-BYQHZH-c.esm.min.js.map +0 -1
  417. package/dist/chunks/exrTextureLoader-B8FQohBr.esm.js +0 -1683
  418. package/dist/chunks/exrTextureLoader-B8FQohBr.esm.js.map +0 -1
  419. package/dist/chunks/exrTextureLoader-D8xP0GLQ.esm.min.js +0 -2
  420. package/dist/chunks/exrTextureLoader-D8xP0GLQ.esm.min.js.map +0 -1
  421. package/dist/chunks/fogFragment-5YT33bDn.esm.js +0 -102
  422. package/dist/chunks/fogFragment-5YT33bDn.esm.js.map +0 -1
  423. package/dist/chunks/fogFragment-BOBZ2KwN.esm.min.js +0 -2
  424. package/dist/chunks/fogFragment-BOBZ2KwN.esm.min.js.map +0 -1
  425. package/dist/chunks/fogFragment-CLENZGuB.esm.js +0 -101
  426. package/dist/chunks/fogFragment-CLENZGuB.esm.js.map +0 -1
  427. package/dist/chunks/fogFragment-D9dudohA.esm.min.js +0 -2
  428. package/dist/chunks/fogFragment-D9dudohA.esm.min.js.map +0 -1
  429. package/dist/chunks/fresnelFunction-BkO99b6C.esm.js +0 -12
  430. package/dist/chunks/fresnelFunction-BkO99b6C.esm.js.map +0 -1
  431. package/dist/chunks/fresnelFunction-CqiLsMCu.esm.min.js +0 -2
  432. package/dist/chunks/fresnelFunction-CqiLsMCu.esm.min.js.map +0 -1
  433. package/dist/chunks/glTFLoader-CkL-dxBD.esm.min.js +0 -2
  434. package/dist/chunks/glTFLoader-CkL-dxBD.esm.min.js.map +0 -1
  435. package/dist/chunks/glTFLoader-IEHRfiUn.esm.js +0 -7586
  436. package/dist/chunks/glTFLoader-IEHRfiUn.esm.js.map +0 -1
  437. package/dist/chunks/glTFLoaderAnimation-CV32Nmqb.esm.js +0 -77
  438. package/dist/chunks/glTFLoaderAnimation-CV32Nmqb.esm.js.map +0 -1
  439. package/dist/chunks/glTFLoaderAnimation-Cq2ziV9o.esm.min.js +0 -2
  440. package/dist/chunks/glTFLoaderAnimation-Cq2ziV9o.esm.min.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-B5QCEZvF.esm.js +0 -34
  446. package/dist/chunks/harmonicsFunctions-B5QCEZvF.esm.js.map +0 -1
  447. package/dist/chunks/harmonicsFunctions-BxLCgoIQ.esm.min.js +0 -2
  448. package/dist/chunks/harmonicsFunctions-BxLCgoIQ.esm.min.js.map +0 -1
  449. package/dist/chunks/harmonicsFunctions-Daxnf8NE.esm.min.js +0 -2
  450. package/dist/chunks/harmonicsFunctions-Daxnf8NE.esm.min.js.map +0 -1
  451. package/dist/chunks/harmonicsFunctions-UzG0C-sm.esm.js +0 -35
  452. package/dist/chunks/harmonicsFunctions-UzG0C-sm.esm.js.map +0 -1
  453. package/dist/chunks/hdrTextureLoader-BpVjKGyb.esm.min.js +0 -2
  454. package/dist/chunks/hdrTextureLoader-BpVjKGyb.esm.min.js.map +0 -1
  455. package/dist/chunks/hdrTextureLoader-DgW8CxRF.esm.js +0 -253
  456. package/dist/chunks/hdrTextureLoader-DgW8CxRF.esm.js.map +0 -1
  457. package/dist/chunks/helperFunctions-BFgvMG5S.esm.min.js +0 -2
  458. package/dist/chunks/helperFunctions-BFgvMG5S.esm.min.js.map +0 -1
  459. package/dist/chunks/helperFunctions-BatAhE6u.esm.js +0 -108
  460. package/dist/chunks/helperFunctions-BatAhE6u.esm.js.map +0 -1
  461. package/dist/chunks/helperFunctions-qECwmiwu.esm.min.js +0 -2
  462. package/dist/chunks/helperFunctions-qECwmiwu.esm.min.js.map +0 -1
  463. package/dist/chunks/helperFunctions-vbA-oTJx.esm.js +0 -80
  464. package/dist/chunks/helperFunctions-vbA-oTJx.esm.js.map +0 -1
  465. package/dist/chunks/iesTextureLoader-Ccd5pvbh.esm.min.js +0 -2
  466. package/dist/chunks/iesTextureLoader-Ccd5pvbh.esm.min.js.map +0 -1
  467. package/dist/chunks/iesTextureLoader-nMYnOfhm.esm.js +0 -189
  468. package/dist/chunks/iesTextureLoader-nMYnOfhm.esm.js.map +0 -1
  469. package/dist/chunks/index-BHIM4QBr.esm.min.js +0 -57
  470. package/dist/chunks/index-BHIM4QBr.esm.min.js.map +0 -1
  471. package/dist/chunks/index-CtkZLm9J.esm.js +0 -74717
  472. package/dist/chunks/index-CtkZLm9J.esm.js.map +0 -1
  473. package/dist/chunks/ktxTextureLoader-CkkvHzY3.esm.js +0 -814
  474. package/dist/chunks/ktxTextureLoader-CkkvHzY3.esm.js.map +0 -1
  475. package/dist/chunks/ktxTextureLoader-CwGlHia2.esm.min.js +0 -2
  476. package/dist/chunks/ktxTextureLoader-CwGlHia2.esm.min.js.map +0 -1
  477. package/dist/chunks/logDepthDeclaration-BiUSPlzz.esm.js +0 -35
  478. package/dist/chunks/logDepthDeclaration-BiUSPlzz.esm.js.map +0 -1
  479. package/dist/chunks/logDepthDeclaration-Bq2fzMbS.esm.js +0 -11
  480. package/dist/chunks/logDepthDeclaration-Bq2fzMbS.esm.js.map +0 -1
  481. package/dist/chunks/logDepthDeclaration-C8DJP16D.esm.min.js +0 -2
  482. package/dist/chunks/logDepthDeclaration-C8DJP16D.esm.min.js.map +0 -1
  483. package/dist/chunks/logDepthDeclaration-DJpvEdPG.esm.min.js +0 -2
  484. package/dist/chunks/logDepthDeclaration-DJpvEdPG.esm.min.js.map +0 -1
  485. package/dist/chunks/logDepthVertex-C00_obGd.esm.min.js +0 -2
  486. package/dist/chunks/logDepthVertex-C00_obGd.esm.min.js.map +0 -1
  487. package/dist/chunks/logDepthVertex-CYIGBMYd.esm.js +0 -77
  488. package/dist/chunks/logDepthVertex-CYIGBMYd.esm.js.map +0 -1
  489. package/dist/chunks/logDepthVertex-CxT8FVOf.esm.js +0 -81
  490. package/dist/chunks/logDepthVertex-CxT8FVOf.esm.js.map +0 -1
  491. package/dist/chunks/logDepthVertex-SyM_Fu5K.esm.min.js +0 -2
  492. package/dist/chunks/logDepthVertex-SyM_Fu5K.esm.min.js.map +0 -1
  493. package/dist/chunks/mainUVVaryingDeclaration-BaIG4IFB.esm.js +0 -11
  494. package/dist/chunks/mainUVVaryingDeclaration-BaIG4IFB.esm.js.map +0 -1
  495. package/dist/chunks/mainUVVaryingDeclaration-CQzOmEIM.esm.min.js +0 -2
  496. package/dist/chunks/mainUVVaryingDeclaration-CQzOmEIM.esm.min.js.map +0 -1
  497. package/dist/chunks/mainUVVaryingDeclaration-D100Qvmm.esm.min.js +0 -2
  498. package/dist/chunks/mainUVVaryingDeclaration-D100Qvmm.esm.min.js.map +0 -1
  499. package/dist/chunks/mainUVVaryingDeclaration-OSD7irdC.esm.js +0 -11
  500. package/dist/chunks/mainUVVaryingDeclaration-OSD7irdC.esm.js.map +0 -1
  501. package/dist/chunks/meshUboDeclaration--wzKOTOT.esm.min.js +0 -2
  502. package/dist/chunks/meshUboDeclaration--wzKOTOT.esm.min.js.map +0 -1
  503. package/dist/chunks/meshUboDeclaration-DIi9ZPDc.esm.js +0 -26
  504. package/dist/chunks/meshUboDeclaration-DIi9ZPDc.esm.js.map +0 -1
  505. package/dist/chunks/objFileLoader-Cda8pwUd.esm.js +0 -1338
  506. package/dist/chunks/objFileLoader-Cda8pwUd.esm.js.map +0 -1
  507. package/dist/chunks/objFileLoader-kzI-pZ8o.esm.min.js +0 -2
  508. package/dist/chunks/objFileLoader-kzI-pZ8o.esm.min.js.map +0 -1
  509. package/dist/chunks/oitFragment-4cP4dKVP.esm.min.js +0 -2
  510. package/dist/chunks/oitFragment-4cP4dKVP.esm.min.js.map +0 -1
  511. package/dist/chunks/oitFragment-Bz1w36ia.esm.js +0 -1078
  512. package/dist/chunks/oitFragment-Bz1w36ia.esm.js.map +0 -1
  513. package/dist/chunks/oitFragment-DUkW-kmb.esm.min.js +0 -2
  514. package/dist/chunks/oitFragment-DUkW-kmb.esm.min.js.map +0 -1
  515. package/dist/chunks/oitFragment-DiuTTpNa.esm.js +0 -1240
  516. package/dist/chunks/oitFragment-DiuTTpNa.esm.js.map +0 -1
  517. package/dist/chunks/pass.fragment-B8l5NRgR.esm.min.js +0 -2
  518. package/dist/chunks/pass.fragment-B8l5NRgR.esm.min.js.map +0 -1
  519. package/dist/chunks/pass.fragment-BF4UEoT8.esm.min.js +0 -2
  520. package/dist/chunks/pass.fragment-BF4UEoT8.esm.min.js.map +0 -1
  521. package/dist/chunks/pass.fragment-CD3_26yo.esm.js +0 -15
  522. package/dist/chunks/pass.fragment-CD3_26yo.esm.js.map +0 -1
  523. package/dist/chunks/pass.fragment-DfeELUEn.esm.js +0 -15
  524. package/dist/chunks/pass.fragment-DfeELUEn.esm.js.map +0 -1
  525. package/dist/chunks/pbr.fragment-BDylAp64.esm.min.js +0 -2
  526. package/dist/chunks/pbr.fragment-BDylAp64.esm.min.js.map +0 -1
  527. package/dist/chunks/pbr.fragment-C1qko419.esm.min.js +0 -2
  528. package/dist/chunks/pbr.fragment-C1qko419.esm.min.js.map +0 -1
  529. package/dist/chunks/pbr.fragment-EBVxSAEQ.esm.js +0 -3232
  530. package/dist/chunks/pbr.fragment-EBVxSAEQ.esm.js.map +0 -1
  531. package/dist/chunks/pbr.fragment-lt62m8b7.esm.js +0 -3273
  532. package/dist/chunks/pbr.fragment-lt62m8b7.esm.js.map +0 -1
  533. package/dist/chunks/pbr.vertex-CGRL_eY2.esm.js +0 -339
  534. package/dist/chunks/pbr.vertex-CGRL_eY2.esm.js.map +0 -1
  535. package/dist/chunks/pbr.vertex-CHv4zeYj.esm.min.js +0 -2
  536. package/dist/chunks/pbr.vertex-CHv4zeYj.esm.min.js.map +0 -1
  537. package/dist/chunks/pbr.vertex-Dk4h9ywZ.esm.min.js +0 -2
  538. package/dist/chunks/pbr.vertex-Dk4h9ywZ.esm.min.js.map +0 -1
  539. package/dist/chunks/pbr.vertex-DopP5mYu.esm.js +0 -214
  540. package/dist/chunks/pbr.vertex-DopP5mYu.esm.js.map +0 -1
  541. package/dist/chunks/postprocess.vertex-Bt30-Flh.esm.min.js +0 -2
  542. package/dist/chunks/postprocess.vertex-Bt30-Flh.esm.min.js.map +0 -1
  543. package/dist/chunks/postprocess.vertex-pLUOpXIY.esm.js +0 -20
  544. package/dist/chunks/postprocess.vertex-pLUOpXIY.esm.js.map +0 -1
  545. package/dist/chunks/rawTexture-78KJgWfq.esm.js +0 -191
  546. package/dist/chunks/rawTexture-78KJgWfq.esm.js.map +0 -1
  547. package/dist/chunks/rawTexture-CCCnj14W.esm.min.js +0 -2
  548. package/dist/chunks/rawTexture-CCCnj14W.esm.min.js.map +0 -1
  549. package/dist/chunks/ray-CfhmGTmj.esm.js +0 -946
  550. package/dist/chunks/ray-CfhmGTmj.esm.js.map +0 -1
  551. package/dist/chunks/ray-Du89cGmz.esm.min.js +0 -2
  552. package/dist/chunks/ray-Du89cGmz.esm.min.js.map +0 -1
  553. package/dist/chunks/rgbdDecode.fragment-BHAQKD_5.esm.js +0 -13
  554. package/dist/chunks/rgbdDecode.fragment-BHAQKD_5.esm.js.map +0 -1
  555. package/dist/chunks/rgbdDecode.fragment-CV6q4aIi.esm.js +0 -13
  556. package/dist/chunks/rgbdDecode.fragment-CV6q4aIi.esm.js.map +0 -1
  557. package/dist/chunks/rgbdDecode.fragment-DEu4F_6T.esm.min.js +0 -2
  558. package/dist/chunks/rgbdDecode.fragment-DEu4F_6T.esm.min.js.map +0 -1
  559. package/dist/chunks/rgbdDecode.fragment-DiJfgZKv.esm.min.js +0 -2
  560. package/dist/chunks/rgbdDecode.fragment-DiJfgZKv.esm.min.js.map +0 -1
  561. package/dist/chunks/rgbdEncode.fragment-CR30N0Mr.esm.js +0 -13
  562. package/dist/chunks/rgbdEncode.fragment-CR30N0Mr.esm.js.map +0 -1
  563. package/dist/chunks/rgbdEncode.fragment-CUE3DGC8.esm.min.js +0 -2
  564. package/dist/chunks/rgbdEncode.fragment-CUE3DGC8.esm.min.js.map +0 -1
  565. package/dist/chunks/rgbdEncode.fragment-DdFs5QJM.esm.js +0 -13
  566. package/dist/chunks/rgbdEncode.fragment-DdFs5QJM.esm.js.map +0 -1
  567. package/dist/chunks/rgbdEncode.fragment-omm81hdD.esm.min.js +0 -2
  568. package/dist/chunks/rgbdEncode.fragment-omm81hdD.esm.min.js.map +0 -1
  569. package/dist/chunks/splatFileLoader-BnaOhITn.esm.js +0 -3379
  570. package/dist/chunks/splatFileLoader-BnaOhITn.esm.js.map +0 -1
  571. package/dist/chunks/splatFileLoader-CuMIDOsR.esm.min.js +0 -2
  572. package/dist/chunks/splatFileLoader-CuMIDOsR.esm.min.js.map +0 -1
  573. package/dist/chunks/spotLight-Ca0-j1Op.esm.js +0 -701
  574. package/dist/chunks/spotLight-Ca0-j1Op.esm.js.map +0 -1
  575. package/dist/chunks/spotLight-DXuSbTaJ.esm.min.js +0 -2
  576. package/dist/chunks/spotLight-DXuSbTaJ.esm.min.js.map +0 -1
  577. package/dist/chunks/standardMaterial-DKyaZtcm.esm.js +0 -1805
  578. package/dist/chunks/standardMaterial-DKyaZtcm.esm.js.map +0 -1
  579. package/dist/chunks/standardMaterial-h3ccobBt.esm.min.js +0 -2
  580. package/dist/chunks/standardMaterial-h3ccobBt.esm.min.js.map +0 -1
  581. package/dist/chunks/stlFileLoader-CDv97liE.esm.js +0 -238
  582. package/dist/chunks/stlFileLoader-CDv97liE.esm.js.map +0 -1
  583. package/dist/chunks/stlFileLoader-e2ImyWaM.esm.min.js +0 -2
  584. package/dist/chunks/stlFileLoader-e2ImyWaM.esm.min.js.map +0 -1
  585. package/dist/chunks/tgaTextureLoader-DJaEph-Q.esm.js +0 -349
  586. package/dist/chunks/tgaTextureLoader-DJaEph-Q.esm.js.map +0 -1
  587. package/dist/chunks/tgaTextureLoader-slv-QvZW.esm.min.js +0 -2
  588. package/dist/chunks/tgaTextureLoader-slv-QvZW.esm.min.js.map +0 -1
  589. package/dist/chunks/thinEngine-Ue9ZAvRK.esm.js +0 -3848
  590. package/dist/chunks/thinEngine-Ue9ZAvRK.esm.js.map +0 -1
  591. package/dist/chunks/thinEngine-pihAbdON.esm.min.js +0 -2
  592. package/dist/chunks/thinEngine-pihAbdON.esm.min.js.map +0 -1
  593. package/dist/chunks/thinInstanceMesh-BgfKoejL.esm.min.js +0 -2
  594. package/dist/chunks/thinInstanceMesh-BgfKoejL.esm.min.js.map +0 -1
  595. package/dist/chunks/thinInstanceMesh-V41szD4h.esm.js +0 -314
  596. package/dist/chunks/thinInstanceMesh-V41szD4h.esm.js.map +0 -1
  597. package/dist/chunks/vertexColorMixing-CZsK7mYP.esm.min.js +0 -2
  598. package/dist/chunks/vertexColorMixing-CZsK7mYP.esm.min.js.map +0 -1
  599. package/dist/chunks/vertexColorMixing-DKVusFas.esm.js +0 -522
  600. package/dist/chunks/vertexColorMixing-DKVusFas.esm.js.map +0 -1
  601. package/dist/chunks/vertexColorMixing-DeZKI8QK.esm.js +0 -412
  602. package/dist/chunks/vertexColorMixing-DeZKI8QK.esm.js.map +0 -1
  603. package/dist/chunks/vertexColorMixing-axGN1U7X.esm.min.js +0 -2
  604. package/dist/chunks/vertexColorMixing-axGN1U7X.esm.min.js.map +0 -1
  605. package/dist/chunks/webgpuEngine-COis70hT.esm.js +0 -11533
  606. package/dist/chunks/webgpuEngine-COis70hT.esm.js.map +0 -1
  607. package/dist/chunks/webgpuEngine-Cx_GlShD.esm.min.js +0 -2
  608. package/dist/chunks/webgpuEngine-Cx_GlShD.esm.min.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 -559
  614. package/lib/index.js +0 -2083
  615. package/lib/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"KHR_draco_mesh_compression-BocaEHGh.esm.js","sources":["../../../../../dev/core/dist/Meshes/Compression/dracoCompressionWorker.js","../../../../../dev/core/dist/Meshes/Compression/dracoCompression.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_draco_mesh_compression.js"],"sourcesContent":["/**\n * @internal\n */\nexport function decodeMesh(decoderModule /*DecoderModule*/, data, attributes, onIndicesData, onAttributeData) {\n let decoder = null;\n let buffer = null;\n let geometry = null;\n try {\n decoder = new decoderModule.Decoder();\n buffer = new decoderModule.DecoderBuffer();\n buffer.Init(data, data.byteLength);\n let status;\n const type = decoder.GetEncodedGeometryType(buffer);\n switch (type) {\n case decoderModule.TRIANGULAR_MESH: {\n const mesh = new decoderModule.Mesh();\n status = decoder.DecodeBufferToMesh(buffer, mesh);\n if (!status.ok() || mesh.ptr === 0) {\n throw new Error(status.error_msg());\n }\n const numFaces = mesh.num_faces();\n const numIndices = numFaces * 3;\n const byteLength = numIndices * 4;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetTrianglesUInt32Array(mesh, byteLength, ptr);\n const indices = new Uint32Array(numIndices);\n indices.set(new Uint32Array(decoderModule.HEAPF32.buffer, ptr, numIndices));\n onIndicesData(indices);\n }\n finally {\n decoderModule._free(ptr);\n }\n geometry = mesh;\n break;\n }\n case decoderModule.POINT_CLOUD: {\n const pointCloud = new decoderModule.PointCloud();\n status = decoder.DecodeBufferToPointCloud(buffer, pointCloud);\n if (!status.ok() || !pointCloud.ptr) {\n throw new Error(status.error_msg());\n }\n geometry = pointCloud;\n break;\n }\n default: {\n throw new Error(`Invalid geometry type ${type}`);\n }\n }\n const numPoints = geometry.num_points();\n const processAttribute = (decoder, geometry, kind, attribute) => {\n const dataType = attribute.data_type();\n const numComponents = attribute.num_components();\n const normalized = attribute.normalized();\n const byteStride = attribute.byte_stride();\n const byteOffset = attribute.byte_offset();\n const dataTypeInfo = {\n [decoderModule.DT_FLOAT32]: { typedArrayConstructor: Float32Array, heap: decoderModule.HEAPF32 },\n [decoderModule.DT_INT8]: { typedArrayConstructor: Int8Array, heap: decoderModule.HEAP8 },\n [decoderModule.DT_INT16]: { typedArrayConstructor: Int16Array, heap: decoderModule.HEAP16 },\n [decoderModule.DT_INT32]: { typedArrayConstructor: Int32Array, heap: decoderModule.HEAP32 },\n [decoderModule.DT_UINT8]: { typedArrayConstructor: Uint8Array, heap: decoderModule.HEAPU8 },\n [decoderModule.DT_UINT16]: { typedArrayConstructor: Uint16Array, heap: decoderModule.HEAPU16 },\n [decoderModule.DT_UINT32]: { typedArrayConstructor: Uint32Array, heap: decoderModule.HEAPU32 },\n };\n const info = dataTypeInfo[dataType];\n if (!info) {\n throw new Error(`Invalid data type ${dataType}`);\n }\n const numValues = numPoints * numComponents;\n const byteLength = numValues * info.typedArrayConstructor.BYTES_PER_ELEMENT;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetAttributeDataArrayForAllPoints(geometry, attribute, dataType, byteLength, ptr);\n const data = new info.typedArrayConstructor(info.heap.buffer, ptr, numValues);\n onAttributeData(kind, data.slice(), numComponents, byteOffset, byteStride, normalized);\n }\n finally {\n decoderModule._free(ptr);\n }\n };\n if (attributes) {\n for (const kind in attributes) {\n const id = attributes[kind];\n const attribute = decoder.GetAttributeByUniqueId(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n else {\n const dracoAttributeTypes = {\n position: decoderModule.POSITION,\n normal: decoderModule.NORMAL,\n color: decoderModule.COLOR,\n uv: decoderModule.TEX_COORD,\n };\n for (const kind in dracoAttributeTypes) {\n const id = decoder.GetAttributeId(geometry, dracoAttributeTypes[kind]);\n if (id !== -1) {\n const attribute = decoder.GetAttribute(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n }\n return numPoints;\n }\n finally {\n if (geometry) {\n decoderModule.destroy(geometry);\n }\n if (buffer) {\n decoderModule.destroy(buffer);\n }\n if (decoder) {\n decoderModule.destroy(decoder);\n }\n }\n}\n/**\n * The worker function that gets converted to a blob url to pass into a worker.\n * To be used if a developer wants to create their own worker instance and inject it instead of using the default worker.\n */\nexport function workerFunction() {\n let decoderPromise;\n onmessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"init\": {\n const decoder = message.decoder;\n // if URL is provided then load the script. Otherwise expect the script to be loaded already\n if (decoder.url) {\n importScripts(decoder.url);\n }\n const initDecoderObject = decoder.wasmBinary ? { wasmBinary: decoder.wasmBinary } : {};\n decoderPromise = DracoDecoderModule(initDecoderObject);\n postMessage({ id: \"initDone\" });\n break;\n }\n case \"decodeMesh\": {\n if (!decoderPromise) {\n throw new Error(\"Draco decoder module is not available\");\n }\n decoderPromise.then((decoder) => {\n const numPoints = decodeMesh(decoder, message.dataView, message.attributes, (indices) => {\n postMessage({ id: \"indices\", data: indices }, [indices.buffer]);\n }, (kind, data, size, offset, stride, normalized) => {\n postMessage({ id: \"attribute\", kind, data, size, byteOffset: offset, byteStride: stride, normalized }, [data.buffer]);\n });\n postMessage({ id: \"decodeMeshDone\", totalVertices: numPoints });\n });\n break;\n }\n }\n };\n}\n/**\n * Initializes a worker that was created for the draco agent pool\n * @param worker The worker to initialize\n * @param decoderWasmBinary The wasm binary to load into the worker\n * @param moduleUrl The url to the draco decoder module (optional)\n * @returns A promise that resolves when the worker is initialized\n */\nexport function initializeWebWorker(worker, decoderWasmBinary, moduleUrl) {\n return new Promise((resolve, reject) => {\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n };\n const onMessage = (event) => {\n if (event.data.id === \"initDone\") {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve(worker);\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n if (!decoderWasmBinary) {\n worker.postMessage({\n id: \"init\",\n decoder: {\n url: moduleUrl,\n },\n });\n }\n else {\n // clone the array buffer to make it transferable\n const clone = decoderWasmBinary.slice(0);\n worker.postMessage({\n id: \"init\",\n decoder: {\n url: moduleUrl,\n wasmBinary: clone,\n },\n }, [clone]);\n }\n // note: no transfer list as the ArrayBuffer is shared across main thread and pool workers\n });\n}\n//# sourceMappingURL=dracoCompressionWorker.js.map","import { Tools } from \"../../Misc/tools\";\nimport { AutoReleaseWorkerPool } from \"../../Misc/workerPool\";\nimport { Geometry } from \"../geometry\";\nimport { VertexBuffer } from \"../buffer\";\nimport { VertexData } from \"../mesh.vertexData\";\nimport { Logger } from \"../../Misc/logger\";\nimport { decodeMesh, workerFunction, initializeWebWorker } from \"./dracoCompressionWorker\";\nfunction createDecoderAsync(wasmBinary, jsModule) {\n return new Promise((resolve) => {\n (jsModule || DracoDecoderModule)({ wasmBinary }).then((module) => {\n resolve({ module });\n });\n });\n}\n/**\n * Draco compression (https://google.github.io/draco/)\n *\n * This class wraps the Draco module.\n *\n * **Encoder**\n *\n * The encoder is not currently implemented.\n *\n * **Decoder**\n *\n * By default, the configuration points to a copy of the Draco decoder files for glTF from the babylon.js preview cdn https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js.\n *\n * To update the configuration, use the following code:\n * ```javascript\n * DracoCompression.Configuration = {\n * decoder: {\n * wasmUrl: \"<url to the WebAssembly library>\",\n * wasmBinaryUrl: \"<url to the WebAssembly binary>\",\n * fallbackUrl: \"<url to the fallback JavaScript library>\",\n * }\n * };\n * ```\n *\n * Draco has two versions, one for WebAssembly and one for JavaScript. The decoder configuration can be set to only support WebAssembly or only support the JavaScript version.\n * Decoding will automatically fallback to the JavaScript version if WebAssembly version is not configured or if WebAssembly is not supported by the browser.\n * Use `DracoCompression.DecoderAvailable` to determine if the decoder configuration is available for the current context.\n *\n * To decode Draco compressed data, get the default DracoCompression object and call decodeMeshToGeometryAsync:\n * ```javascript\n * var geometry = await DracoCompression.Default.decodeMeshToGeometryAsync(data);\n * ```\n *\n * @see https://playground.babylonjs.com/#DMZIBD#0\n */\nexport class DracoCompression {\n /**\n * Returns true if the decoder configuration is available.\n */\n static get DecoderAvailable() {\n const decoder = DracoCompression.Configuration.decoder;\n return !!((decoder.wasmUrl && decoder.wasmBinaryUrl && typeof WebAssembly === \"object\") || decoder.fallbackUrl);\n }\n static GetDefaultNumWorkers() {\n if (typeof navigator !== \"object\" || !navigator.hardwareConcurrency) {\n return 1;\n }\n // Use 50% of the available logical processors but capped at 4.\n return Math.min(Math.floor(navigator.hardwareConcurrency * 0.5), 4);\n }\n /**\n * Default instance for the draco compression object.\n */\n static get Default() {\n if (!DracoCompression._Default) {\n DracoCompression._Default = new DracoCompression();\n }\n return DracoCompression._Default;\n }\n /**\n * Reset the default draco compression object to null and disposing the removed default instance.\n * Note that if the workerPool is a member of the static Configuration object it is recommended not to run dispose,\n * unless the static worker pool is no longer needed.\n * @param skipDispose set to true to not dispose the removed default instance\n */\n static ResetDefault(skipDispose) {\n if (DracoCompression._Default) {\n if (!skipDispose) {\n DracoCompression._Default.dispose();\n }\n DracoCompression._Default = null;\n }\n }\n /**\n * Constructor\n * @param numWorkers The number of workers for async operations Or an options object. Specify `0` to disable web workers and run synchronously in the current context.\n */\n constructor(numWorkers = DracoCompression.DefaultNumWorkers) {\n const decoder = DracoCompression.Configuration.decoder;\n // check if the decoder binary and worker pool was injected\n // Note - it is expected that the developer checked if WebWorker, WebAssembly and the URL object are available\n if (decoder.workerPool || (typeof numWorkers === \"object\" && numWorkers.workerPool)) {\n // set the promise accordingly\n this._workerPoolPromise = Promise.resolve(decoder.workerPool || numWorkers.workerPool);\n }\n else {\n // to avoid making big changes to the decider, if wasmBinary is provided use it in the wasmBinaryPromise\n const wasmBinaryProvided = decoder.wasmBinary || (typeof numWorkers === \"object\" && numWorkers.wasmBinary);\n const numberOfWorkers = typeof numWorkers === \"number\" ? numWorkers : numWorkers.numWorkers;\n const useWorkers = numberOfWorkers && typeof Worker === \"function\" && typeof URL === \"function\";\n const urlNeeded = useWorkers || (!useWorkers && !decoder.jsModule);\n // code maintained here for back-compat with no changes\n const decoderInfo = decoder.wasmUrl && decoder.wasmBinaryUrl && typeof WebAssembly === \"object\"\n ? {\n url: urlNeeded ? Tools.GetBabylonScriptURL(decoder.wasmUrl, true) : \"\",\n wasmBinaryPromise: wasmBinaryProvided ? Promise.resolve(wasmBinaryProvided) : Tools.LoadFileAsync(Tools.GetBabylonScriptURL(decoder.wasmBinaryUrl, true)),\n }\n : {\n url: urlNeeded ? Tools.GetBabylonScriptURL(decoder.fallbackUrl) : \"\",\n wasmBinaryPromise: Promise.resolve(undefined),\n };\n if (useWorkers) {\n this._workerPoolPromise = decoderInfo.wasmBinaryPromise.then((decoderWasmBinary) => {\n const workerContent = `${decodeMesh}(${workerFunction})()`;\n const workerBlobUrl = URL.createObjectURL(new Blob([workerContent], { type: \"application/javascript\" }));\n return new AutoReleaseWorkerPool(numberOfWorkers, () => {\n const worker = new Worker(workerBlobUrl);\n return initializeWebWorker(worker, decoderWasmBinary, decoderInfo.url);\n });\n });\n }\n else {\n this._decoderModulePromise = decoderInfo.wasmBinaryPromise.then(async (decoderWasmBinary) => {\n if (typeof DracoDecoderModule === \"undefined\") {\n if (!decoder.jsModule) {\n if (!decoderInfo.url) {\n throw new Error(\"Draco decoder module is not available\");\n }\n await Tools.LoadBabylonScriptAsync(decoderInfo.url);\n }\n }\n return await createDecoderAsync(decoderWasmBinary, decoder.jsModule);\n });\n }\n }\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n if (this._workerPoolPromise) {\n this._workerPoolPromise.then((workerPool) => {\n workerPool.dispose();\n });\n }\n delete this._workerPoolPromise;\n delete this._decoderModulePromise;\n }\n /**\n * Returns a promise that resolves when ready. Call this manually to ensure draco compression is ready before use.\n * @returns a promise that resolves when ready\n */\n async whenReadyAsync() {\n if (this._workerPoolPromise) {\n await this._workerPoolPromise;\n return;\n }\n if (this._decoderModulePromise) {\n await this._decoderModulePromise;\n return;\n }\n }\n /**\n * Decode Draco compressed mesh data to mesh data.\n * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @param gltfNormalizedOverride A map of attributes from vertex buffer kinds to normalized flags to override the Draco normalization\n * @returns A promise that resolves with the decoded mesh data\n */\n decodeMeshToMeshDataAsync(data, attributes, gltfNormalizedOverride) {\n const dataView = data instanceof ArrayBuffer ? new Int8Array(data) : new Int8Array(data.buffer, data.byteOffset, data.byteLength);\n const applyGltfNormalizedOverride = (kind, normalized) => {\n if (gltfNormalizedOverride && gltfNormalizedOverride[kind] !== undefined) {\n if (normalized !== gltfNormalizedOverride[kind]) {\n Logger.Warn(`Normalized flag from Draco data (${normalized}) does not match normalized flag from glTF accessor (${gltfNormalizedOverride[kind]}). Using flag from glTF accessor.`);\n }\n return gltfNormalizedOverride[kind];\n }\n else {\n return normalized;\n }\n };\n if (this._workerPoolPromise) {\n return this._workerPoolPromise.then((workerPool) => {\n return new Promise((resolve, reject) => {\n workerPool.push((worker, onComplete) => {\n let resultIndices = null;\n const resultAttributes = [];\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n onComplete();\n };\n const onMessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"decodeMeshDone\": {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve({ indices: resultIndices, attributes: resultAttributes, totalVertices: message.totalVertices });\n onComplete();\n break;\n }\n case \"indices\": {\n resultIndices = message.data;\n break;\n }\n case \"attribute\": {\n resultAttributes.push({\n kind: message.kind,\n data: message.data,\n size: message.size,\n byteOffset: message.byteOffset,\n byteStride: message.byteStride,\n normalized: applyGltfNormalizedOverride(message.kind, message.normalized),\n });\n break;\n }\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n const dataViewCopy = dataView.slice();\n worker.postMessage({ id: \"decodeMesh\", dataView: dataViewCopy, attributes: attributes }, [dataViewCopy.buffer]);\n });\n });\n });\n }\n if (this._decoderModulePromise) {\n return this._decoderModulePromise.then((decoder) => {\n let resultIndices = null;\n const resultAttributes = [];\n const numPoints = decodeMesh(decoder.module, dataView, attributes, (indices) => {\n resultIndices = indices;\n }, (kind, data, size, byteOffset, byteStride, normalized) => {\n resultAttributes.push({\n kind,\n data,\n size,\n byteOffset,\n byteStride,\n normalized,\n });\n });\n return { indices: resultIndices, attributes: resultAttributes, totalVertices: numPoints };\n });\n }\n throw new Error(\"Draco decoder module is not available\");\n }\n /**\n * Decode Draco compressed mesh data to Babylon geometry.\n * @param name The name to use when creating the geometry\n * @param scene The scene to use when creating the geometry\n * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @returns A promise that resolves with the decoded geometry\n */\n async decodeMeshToGeometryAsync(name, scene, data, attributes) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes);\n const geometry = new Geometry(name, scene);\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n }\n /** @internal */\n async _decodeMeshToGeometryForGltfAsync(name, scene, data, attributes, gltfNormalizedOverride, boundingInfo) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes, gltfNormalizedOverride);\n const geometry = new Geometry(name, scene);\n if (boundingInfo) {\n geometry._boundingInfo = boundingInfo;\n geometry.useBoundingInfoFromGeometry = true;\n }\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n }\n /**\n * Decode Draco compressed mesh data to Babylon vertex data.\n * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @returns A promise that resolves with the decoded vertex data\n * @deprecated Use {@link decodeMeshToGeometryAsync} for better performance in some cases\n */\n async decodeMeshAsync(data, attributes) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes);\n const vertexData = new VertexData();\n if (meshData.indices) {\n vertexData.indices = meshData.indices;\n }\n for (const attribute of meshData.attributes) {\n const floatData = VertexBuffer.GetFloatData(attribute.data, attribute.size, VertexBuffer.GetDataType(attribute.data), attribute.byteOffset, attribute.byteStride, attribute.normalized, meshData.totalVertices);\n vertexData.set(floatData, attribute.kind);\n }\n return vertexData;\n }\n}\n/**\n * The configuration. Defaults to the following urls:\n * - wasmUrl: \"https://cdn.babylonjs.com/draco_wasm_wrapper_gltf.js\"\n * - wasmBinaryUrl: \"https://cdn.babylonjs.com/draco_decoder_gltf.wasm\"\n * - fallbackUrl: \"https://cdn.babylonjs.com/draco_decoder_gltf.js\"\n */\nDracoCompression.Configuration = {\n decoder: {\n wasmUrl: `${Tools._DefaultCdnUrl}/draco_wasm_wrapper_gltf.js`,\n wasmBinaryUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.wasm`,\n fallbackUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.js`,\n },\n};\n/**\n * Default number of workers to create when creating the draco compression object.\n */\nDracoCompression.DefaultNumWorkers = DracoCompression.GetDefaultNumWorkers();\nDracoCompression._Default = null;\n//# sourceMappingURL=dracoCompression.js.map","import { DracoCompression } from \"core/Meshes/Compression/dracoCompression\";\nimport { VertexBuffer } from \"core/Buffers/buffer\";\nimport { GLTFLoader, ArrayItem, LoadBoundingInfoFromPositionAccessor } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_draco_mesh_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_draco_mesh_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines whether to use the normalized flag from the glTF accessor instead of the Draco data. Defaults to true.\n */\n this.useNormalizedFlagFromAccessor = true;\n this._loader = loader;\n this.enabled = DracoCompression.DecoderAvailable && this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n delete this.dracoCompression;\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadVertexDataAsync(context, primitive, babylonMesh) {\n return GLTFLoader.LoadExtensionAsync(context, primitive, this.name, (extensionContext, extension) => {\n if (primitive.mode != undefined) {\n if (primitive.mode !== 4 /* MeshPrimitiveMode.TRIANGLES */ && primitive.mode !== 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */) {\n throw new Error(`${context}: Unsupported mode ${primitive.mode}`);\n }\n }\n const attributes = {};\n const normalized = {};\n const loadAttribute = (name, kind) => {\n const uniqueId = extension.attributes[name];\n if (uniqueId == undefined) {\n return;\n }\n babylonMesh._delayInfo = babylonMesh._delayInfo || [];\n if (babylonMesh._delayInfo.indexOf(kind) === -1) {\n babylonMesh._delayInfo.push(kind);\n }\n attributes[kind] = uniqueId;\n if (this.useNormalizedFlagFromAccessor) {\n const accessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[name]);\n if (accessor) {\n normalized[kind] = accessor.normalized || false;\n }\n }\n };\n loadAttribute(\"POSITION\", VertexBuffer.PositionKind);\n loadAttribute(\"NORMAL\", VertexBuffer.NormalKind);\n loadAttribute(\"TANGENT\", VertexBuffer.TangentKind);\n loadAttribute(\"TEXCOORD_0\", VertexBuffer.UVKind);\n loadAttribute(\"TEXCOORD_1\", VertexBuffer.UV2Kind);\n loadAttribute(\"TEXCOORD_2\", VertexBuffer.UV3Kind);\n loadAttribute(\"TEXCOORD_3\", VertexBuffer.UV4Kind);\n loadAttribute(\"TEXCOORD_4\", VertexBuffer.UV5Kind);\n loadAttribute(\"TEXCOORD_5\", VertexBuffer.UV6Kind);\n loadAttribute(\"JOINTS_0\", VertexBuffer.MatricesIndicesKind);\n loadAttribute(\"WEIGHTS_0\", VertexBuffer.MatricesWeightsKind);\n loadAttribute(\"COLOR_0\", VertexBuffer.ColorKind);\n const bufferView = ArrayItem.Get(extensionContext, this._loader.gltf.bufferViews, extension.bufferView);\n if (!bufferView._dracoBabylonGeometry) {\n bufferView._dracoBabylonGeometry = this._loader.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then((data) => {\n const dracoCompression = this.dracoCompression || DracoCompression.Default;\n const positionAccessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[\"POSITION\"]);\n const babylonBoundingInfo = !this._loader.parent.alwaysComputeBoundingBox && !babylonMesh.skeleton && positionAccessor ? LoadBoundingInfoFromPositionAccessor(positionAccessor) : null;\n return dracoCompression\n ._decodeMeshToGeometryForGltfAsync(babylonMesh.name, this._loader.babylonScene, data, attributes, normalized, babylonBoundingInfo)\n .catch((error) => {\n throw new Error(`${context}: ${error.message}`);\n });\n });\n }\n return bufferView._dracoBabylonGeometry;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_draco_mesh_compression(loader));\n//# sourceMapp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AC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,0BAA0B,CAAC,MAAM,CAAC,CAAC;;;;"}
@@ -1,2 +0,0 @@
1
- import{T as e,w as r,V as t,x as o,L as s,aP as a,aQ as n}from"./index-BHIM4QBr.esm.min.js";import{A as i}from"./workerPool-BWHiDmEZ.esm.min.js";import{G as d,A as c,L as l}from"./glTFLoader-CkL-dxBD.esm.min.js";import"./rawTexture-CCCnj14W.esm.min.js";import"./assetContainer-DLSDgjTx.esm.min.js";import"./glTFLoaderAnimation-Cq2ziV9o.esm.min.js";function m(e,r,t,o,s){let a=null,n=null,i=null;try{let d;a=new e.Decoder,n=new e.DecoderBuffer,n.Init(r,r.byteLength);const c=a.GetEncodedGeometryType(n);switch(c){case e.TRIANGULAR_MESH:{const r=new e.Mesh;if(d=a.DecodeBufferToMesh(n,r),!d.ok()||0===r.ptr)throw new Error(d.error_msg());const t=3*r.num_faces(),s=4*t,c=e._malloc(s);try{a.GetTrianglesUInt32Array(r,s,c);const n=new Uint32Array(t);n.set(new Uint32Array(e.HEAPF32.buffer,c,t)),o(n)}finally{e._free(c)}i=r;break}case e.POINT_CLOUD:{const r=new e.PointCloud;if(d=a.DecodeBufferToPointCloud(n,r),!d.ok()||!r.ptr)throw new Error(d.error_msg());i=r;break}default:throw new Error(`Invalid geometry type ${c}`)}const l=i.num_points(),m=(r,t,o,a)=>{const n=a.data_type(),i=a.num_components(),d=a.normalized(),c=a.byte_stride(),m=a.byte_offset(),u={[e.DT_FLOAT32]:{typedArrayConstructor:Float32Array,heap:e.HEAPF32},[e.DT_INT8]:{typedArrayConstructor:Int8Array,heap:e.HEAP8},[e.DT_INT16]:{typedArrayConstructor:Int16Array,heap:e.HEAP16},[e.DT_INT32]:{typedArrayConstructor:Int32Array,heap:e.HEAP32},[e.DT_UINT8]:{typedArrayConstructor:Uint8Array,heap:e.HEAPU8},[e.DT_UINT16]:{typedArrayConstructor:Uint16Array,heap:e.HEAPU16},[e.DT_UINT32]:{typedArrayConstructor:Uint32Array,heap:e.HEAPU32}}[n];if(!u)throw new Error(`Invalid data type ${n}`);const f=l*i,y=f*u.typedArrayConstructor.BYTES_PER_ELEMENT,w=e._malloc(y);try{r.GetAttributeDataArrayForAllPoints(t,a,n,y,w);const e=new u.typedArrayConstructor(u.heap.buffer,w,f);s(o,e.slice(),i,m,c,d)}finally{e._free(w)}};if(t)for(const e in t){const r=t[e],o=a.GetAttributeByUniqueId(i,r);m(a,i,e,o)}else{const r={position:e.POSITION,normal:e.NORMAL,color:e.COLOR,uv:e.TEX_COORD};for(const e in r){const t=a.GetAttributeId(i,r[e]);if(-1!==t){const r=a.GetAttribute(i,t);m(a,i,e,r)}}}return l}finally{i&&e.destroy(i),n&&e.destroy(n),a&&e.destroy(a)}}function u(){let e;onmessage=r=>{const t=r.data;switch(t.id){case"init":{const r=t.decoder;r.url&&importScripts(r.url);const o=r.wasmBinary?{wasmBinary:r.wasmBinary}:{};e=DracoDecoderModule(o),postMessage({id:"initDone"});break}case"decodeMesh":if(!e)throw new Error("Draco decoder module is not available");e.then((e=>{const r=m(e,t.dataView,t.attributes,(e=>{postMessage({id:"indices",data:e},[e.buffer])}),((e,r,t,o,s,a)=>{postMessage({id:"attribute",kind:e,data:r,size:t,byteOffset:o,byteStride:s,normalized:a},[r.buffer])}));postMessage({id:"decodeMeshDone",totalVertices:r})}))}}}class f{static get DecoderAvailable(){const e=f.Configuration.decoder;return!!(e.wasmUrl&&e.wasmBinaryUrl&&"object"==typeof WebAssembly||e.fallbackUrl)}static GetDefaultNumWorkers(){return"object"==typeof navigator&&navigator.hardwareConcurrency?Math.min(Math.floor(.5*navigator.hardwareConcurrency),4):1}static get Default(){return f._Default||(f._Default=new f),f._Default}static ResetDefault(e){f._Default&&(e||f._Default.dispose(),f._Default=null)}constructor(r=f.DefaultNumWorkers){const t=f.Configuration.decoder;if(t.workerPool||"object"==typeof r&&r.workerPool)this._workerPoolPromise=Promise.resolve(t.workerPool||r.workerPool);else{const o=t.wasmBinary||"object"==typeof r&&r.wasmBinary,s="number"==typeof r?r:r.numWorkers,a=s&&"function"==typeof Worker&&"function"==typeof URL,n=a||!a&&!t.jsModule,d=t.wasmUrl&&t.wasmBinaryUrl&&"object"==typeof WebAssembly?{url:n?e.GetBabylonScriptURL(t.wasmUrl,!0):"",wasmBinaryPromise:o?Promise.resolve(o):e.LoadFileAsync(e.GetBabylonScriptURL(t.wasmBinaryUrl,!0))}:{url:n?e.GetBabylonScriptURL(t.fallbackUrl):"",wasmBinaryPromise:Promise.resolve(void 0)};a?this._workerPoolPromise=d.wasmBinaryPromise.then((e=>{const r=`${m}(${u})()`,t=URL.createObjectURL(new Blob([r],{type:"application/javascript"}));return new i(s,(()=>function(e,r,t){return new Promise(((o,s)=>{const a=r=>{e.removeEventListener("error",a),e.removeEventListener("message",n),s(r)},n=r=>{"initDone"===r.data.id&&(e.removeEventListener("error",a),e.removeEventListener("message",n),o(e))};if(e.addEventListener("error",a),e.addEventListener("message",n),r){const o=r.slice(0);e.postMessage({id:"init",decoder:{url:t,wasmBinary:o}},[o])}else e.postMessage({id:"init",decoder:{url:t}})}))}(new Worker(t),e,d.url)))})):this._decoderModulePromise=d.wasmBinaryPromise.then((async r=>{if("undefined"==typeof DracoDecoderModule&&!t.jsModule){if(!d.url)throw new Error("Draco decoder module is not available");await e.LoadBabylonScriptAsync(d.url)}return await(o=r,s=t.jsModule,new Promise((e=>{(s||DracoDecoderModule)({wasmBinary:o}).then((r=>{e({module:r})}))})));var o,s}))}}dispose(){this._workerPoolPromise&&this._workerPoolPromise.then((e=>{e.dispose()})),delete this._workerPoolPromise,delete this._decoderModulePromise}async whenReadyAsync(){this._workerPoolPromise?await this._workerPoolPromise:this._decoderModulePromise&&await this._decoderModulePromise}decodeMeshToMeshDataAsync(e,r,t){const o=e instanceof ArrayBuffer?new Int8Array(e):new Int8Array(e.buffer,e.byteOffset,e.byteLength);if(this._workerPoolPromise)return this._workerPoolPromise.then((e=>new Promise(((a,n)=>{e.push(((e,i)=>{let d=null;const c=[],l=r=>{e.removeEventListener("error",l),e.removeEventListener("message",m),n(r),i()},m=r=>{const o=r.data;switch(o.id){case"decodeMeshDone":e.removeEventListener("error",l),e.removeEventListener("message",m),a({indices:d,attributes:c,totalVertices:o.totalVertices}),i();break;case"indices":d=o.data;break;case"attribute":c.push({kind:o.kind,data:o.data,size:o.size,byteOffset:o.byteOffset,byteStride:o.byteStride,normalized:(n=o.kind,u=o.normalized,t&&void 0!==t[n]?(u!==t[n]&&s.Warn(`Normalized flag from Draco data (${u}) does not match normalized flag from glTF accessor (${t[n]}). Using flag from glTF accessor.`),t[n]):u)})}var n,u};e.addEventListener("error",l),e.addEventListener("message",m);const u=o.slice();e.postMessage({id:"decodeMesh",dataView:u,attributes:r},[u.buffer])}))}))));if(this._decoderModulePromise)return this._decoderModulePromise.then((e=>{let t=null;const s=[],a=m(e.module,o,r,(e=>{t=e}),((e,r,t,o,a,n)=>{s.push({kind:e,data:r,size:t,byteOffset:o,byteStride:a,normalized:n})}));return{indices:t,attributes:s,totalVertices:a}}));throw new Error("Draco decoder module is not available")}async decodeMeshToGeometryAsync(e,o,s,a){const n=await this.decodeMeshToMeshDataAsync(s,a),i=new r(e,o);n.indices&&i.setIndices(n.indices);for(const e of n.attributes)i.setVerticesBuffer(new t(o.getEngine(),e.data,e.kind,!1,void 0,e.byteStride,void 0,e.byteOffset,e.size,void 0,e.normalized,!0),n.totalVertices);return i}async _decodeMeshToGeometryForGltfAsync(e,o,s,a,n,i){const d=await this.decodeMeshToMeshDataAsync(s,a,n),c=new r(e,o);i&&(c._boundingInfo=i,c.useBoundingInfoFromGeometry=!0),d.indices&&c.setIndices(d.indices);for(const e of d.attributes)c.setVerticesBuffer(new t(o.getEngine(),e.data,e.kind,!1,void 0,e.byteStride,void 0,e.byteOffset,e.size,void 0,e.normalized,!0),d.totalVertices);return c}async decodeMeshAsync(e,r){const s=await this.decodeMeshToMeshDataAsync(e,r),a=new o;s.indices&&(a.indices=s.indices);for(const e of s.attributes){const r=t.GetFloatData(e.data,e.size,t.GetDataType(e.data),e.byteOffset,e.byteStride,e.normalized,s.totalVertices);a.set(r,e.kind)}return a}}f.Configuration={decoder:{wasmUrl:`${e._DefaultCdnUrl}/draco_wasm_wrapper_gltf.js`,wasmBinaryUrl:`${e._DefaultCdnUrl}/draco_decoder_gltf.wasm`,fallbackUrl:`${e._DefaultCdnUrl}/draco_decoder_gltf.js`}},f.DefaultNumWorkers=f.GetDefaultNumWorkers(),f._Default=null;const y="KHR_draco_mesh_compression";class w{constructor(e){this.name=y,this.useNormalizedFlagFromAccessor=!0,this._loader=e,this.enabled=f.DecoderAvailable&&this._loader.isExtensionUsed(y)}dispose(){delete this.dracoCompression,this._loader=null}_loadVertexDataAsync(e,r,o){return d.LoadExtensionAsync(e,r,this.name,((s,a)=>{if(null!=r.mode&&4!==r.mode&&5!==r.mode)throw new Error(`${e}: Unsupported mode ${r.mode}`);const n={},i={},d=(e,t)=>{const s=a.attributes[e];if(null!=s&&(o._delayInfo=o._delayInfo||[],-1===o._delayInfo.indexOf(t)&&o._delayInfo.push(t),n[t]=s,this.useNormalizedFlagFromAccessor)){const o=c.TryGet(this._loader.gltf.accessors,r.attributes[e]);o&&(i[t]=o.normalized||!1)}};d("POSITION",t.PositionKind),d("NORMAL",t.NormalKind),d("TANGENT",t.TangentKind),d("TEXCOORD_0",t.UVKind),d("TEXCOORD_1",t.UV2Kind),d("TEXCOORD_2",t.UV3Kind),d("TEXCOORD_3",t.UV4Kind),d("TEXCOORD_4",t.UV5Kind),d("TEXCOORD_5",t.UV6Kind),d("JOINTS_0",t.MatricesIndicesKind),d("WEIGHTS_0",t.MatricesWeightsKind),d("COLOR_0",t.ColorKind);const m=c.Get(s,this._loader.gltf.bufferViews,a.bufferView);return m._dracoBabylonGeometry||(m._dracoBabylonGeometry=this._loader.loadBufferViewAsync(`/bufferViews/${m.index}`,m).then((t=>{const s=this.dracoCompression||f.Default,a=c.TryGet(this._loader.gltf.accessors,r.attributes.POSITION),d=this._loader.parent.alwaysComputeBoundingBox||o.skeleton||!a?null:l(a);return s._decodeMeshToGeometryForGltfAsync(o.name,this._loader.babylonScene,t,n,i,d).catch((r=>{throw new Error(`${e}: ${r.message}`)}))}))),m._dracoBabylonGeometry}))}}a(y),n(y,!0,(e=>new w(e)));export{w as KHR_draco_mesh_compression};
2
- //# sourceMappingURL=KHR_draco_mesh_compression-CjRCmIUz.esm.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"KHR_draco_mesh_compression-CjRCmIUz.esm.min.js","sources":["../../../../../dev/core/dist/Meshes/Compression/dracoCompressionWorker.js","../../../../../dev/core/dist/Meshes/Compression/dracoCompression.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_draco_mesh_compression.js"],"sourcesContent":["/**\n * @internal\n */\nexport function decodeMesh(decoderModule /*DecoderModule*/, data, attributes, onIndicesData, onAttributeData) {\n let decoder = null;\n let buffer = null;\n let geometry = null;\n try {\n decoder = new decoderModule.Decoder();\n buffer = new decoderModule.DecoderBuffer();\n buffer.Init(data, data.byteLength);\n let status;\n const type = decoder.GetEncodedGeometryType(buffer);\n switch (type) {\n case decoderModule.TRIANGULAR_MESH: {\n const mesh = new decoderModule.Mesh();\n status = decoder.DecodeBufferToMesh(buffer, mesh);\n if (!status.ok() || mesh.ptr === 0) {\n throw new Error(status.error_msg());\n }\n const numFaces = mesh.num_faces();\n const numIndices = numFaces * 3;\n const byteLength = numIndices * 4;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetTrianglesUInt32Array(mesh, byteLength, ptr);\n const indices = new Uint32Array(numIndices);\n indices.set(new Uint32Array(decoderModule.HEAPF32.buffer, ptr, numIndices));\n onIndicesData(indices);\n }\n finally {\n decoderModule._free(ptr);\n }\n geometry = mesh;\n break;\n }\n case decoderModule.POINT_CLOUD: {\n const pointCloud = new decoderModule.PointCloud();\n status = decoder.DecodeBufferToPointCloud(buffer, pointCloud);\n if (!status.ok() || !pointCloud.ptr) {\n throw new Error(status.error_msg());\n }\n geometry = pointCloud;\n break;\n }\n default: {\n throw new Error(`Invalid geometry type ${type}`);\n }\n }\n const numPoints = geometry.num_points();\n const processAttribute = (decoder, geometry, kind, attribute) => {\n const dataType = attribute.data_type();\n const numComponents = attribute.num_components();\n const normalized = attribute.normalized();\n const byteStride = attribute.byte_stride();\n const byteOffset = attribute.byte_offset();\n const dataTypeInfo = {\n [decoderModule.DT_FLOAT32]: { typedArrayConstructor: Float32Array, heap: decoderModule.HEAPF32 },\n [decoderModule.DT_INT8]: { typedArrayConstructor: Int8Array, heap: decoderModule.HEAP8 },\n [decoderModule.DT_INT16]: { typedArrayConstructor: Int16Array, heap: decoderModule.HEAP16 },\n [decoderModule.DT_INT32]: { typedArrayConstructor: Int32Array, heap: decoderModule.HEAP32 },\n [decoderModule.DT_UINT8]: { typedArrayConstructor: Uint8Array, heap: decoderModule.HEAPU8 },\n [decoderModule.DT_UINT16]: { typedArrayConstructor: Uint16Array, heap: decoderModule.HEAPU16 },\n [decoderModule.DT_UINT32]: { typedArrayConstructor: Uint32Array, heap: decoderModule.HEAPU32 },\n };\n const info = dataTypeInfo[dataType];\n if (!info) {\n throw new Error(`Invalid data type ${dataType}`);\n }\n const numValues = numPoints * numComponents;\n const byteLength = numValues * info.typedArrayConstructor.BYTES_PER_ELEMENT;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetAttributeDataArrayForAllPoints(geometry, attribute, dataType, byteLength, ptr);\n const data = new info.typedArrayConstructor(info.heap.buffer, ptr, numValues);\n onAttributeData(kind, data.slice(), numComponents, byteOffset, byteStride, normalized);\n }\n finally {\n decoderModule._free(ptr);\n }\n };\n if (attributes) {\n for (const kind in attributes) {\n const id = attributes[kind];\n const attribute = decoder.GetAttributeByUniqueId(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n else {\n const dracoAttributeTypes = {\n position: decoderModule.POSITION,\n normal: decoderModule.NORMAL,\n color: decoderModule.COLOR,\n uv: decoderModule.TEX_COORD,\n };\n for (const kind in dracoAttributeTypes) {\n const id = decoder.GetAttributeId(geometry, dracoAttributeTypes[kind]);\n if (id !== -1) {\n const attribute = decoder.GetAttribute(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n }\n return numPoints;\n }\n finally {\n if (geometry) {\n decoderModule.destroy(geometry);\n }\n if (buffer) {\n decoderModule.destroy(buffer);\n }\n if (decoder) {\n decoderModule.destroy(decoder);\n }\n }\n}\n/**\n * The worker function that gets converted to a blob url to pass into a worker.\n * To be used if a developer wants to create their own worker instance and inject it instead of using the default worker.\n */\nexport function workerFunction() {\n let decoderPromise;\n onmessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"init\": {\n const decoder = message.decoder;\n // if URL is provided then load the script. Otherwise expect the script to be loaded already\n if (decoder.url) {\n importScripts(decoder.url);\n }\n const initDecoderObject = decoder.wasmBinary ? { wasmBinary: decoder.wasmBinary } : {};\n decoderPromise = DracoDecoderModule(initDecoderObject);\n postMessage({ id: \"initDone\" });\n break;\n }\n case \"decodeMesh\": {\n if (!decoderPromise) {\n throw new Error(\"Draco decoder module is not available\");\n }\n decoderPromise.then((decoder) => {\n const numPoints = decodeMesh(decoder, message.dataView, message.attributes, (indices) => {\n postMessage({ id: \"indices\", data: indices }, [indices.buffer]);\n }, (kind, data, size, offset, stride, normalized) => {\n postMessage({ id: \"attribute\", kind, data, size, byteOffset: offset, byteStride: stride, normalized }, [data.buffer]);\n });\n postMessage({ id: \"decodeMeshDone\", totalVertices: numPoints });\n });\n break;\n }\n }\n };\n}\n/**\n * Initializes a worker that was created for the draco agent pool\n * @param worker The worker to initialize\n * @param decoderWasmBinary The wasm binary to load into the worker\n * @param moduleUrl The url to the draco decoder module (optional)\n * @returns A promise that resolves when the worker is initialized\n */\nexport function initializeWebWorker(worker, decoderWasmBinary, moduleUrl) {\n return new Promise((resolve, reject) => {\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n };\n const onMessage = (event) => {\n if (event.data.id === \"initDone\") {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve(worker);\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n if (!decoderWasmBinary) {\n worker.postMessage({\n id: \"init\",\n decoder: {\n url: moduleUrl,\n },\n });\n }\n else {\n // clone the array buffer to make it transferable\n const clone = decoderWasmBinary.slice(0);\n worker.postMessage({\n id: \"init\",\n decoder: {\n url: moduleUrl,\n wasmBinary: clone,\n },\n }, [clone]);\n }\n // note: no transfer list as the ArrayBuffer is shared across main thread and pool workers\n });\n}\n//# sourceMappingURL=dracoCompressionWorker.js.map","import { Tools } from \"../../Misc/tools\";\nimport { AutoReleaseWorkerPool } from \"../../Misc/workerPool\";\nimport { Geometry } from \"../geometry\";\nimport { VertexBuffer } from \"../buffer\";\nimport { VertexData } from \"../mesh.vertexData\";\nimport { Logger } from \"../../Misc/logger\";\nimport { decodeMesh, workerFunction, initializeWebWorker } from \"./dracoCompressionWorker\";\nfunction createDecoderAsync(wasmBinary, jsModule) {\n return new Promise((resolve) => {\n (jsModule || DracoDecoderModule)({ wasmBinary }).then((module) => {\n resolve({ module });\n });\n });\n}\n/**\n * Draco compression (https://google.github.io/draco/)\n *\n * This class wraps the Draco module.\n *\n * **Encoder**\n *\n * The encoder is not currently implemented.\n *\n * **Decoder**\n *\n * By default, the configuration points to a copy of the Draco decoder files for glTF from the babylon.js preview cdn https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js.\n *\n * To update the configuration, use the following code:\n * ```javascript\n * DracoCompression.Configuration = {\n * decoder: {\n * wasmUrl: \"<url to the WebAssembly library>\",\n * wasmBinaryUrl: \"<url to the WebAssembly binary>\",\n * fallbackUrl: \"<url to the fallback JavaScript library>\",\n * }\n * };\n * ```\n *\n * Draco has two versions, one for WebAssembly and one for JavaScript. The decoder configuration can be set to only support WebAssembly or only support the JavaScript version.\n * Decoding will automatically fallback to the JavaScript version if WebAssembly version is not configured or if WebAssembly is not supported by the browser.\n * Use `DracoCompression.DecoderAvailable` to determine if the decoder configuration is available for the current context.\n *\n * To decode Draco compressed data, get the default DracoCompression object and call decodeMeshToGeometryAsync:\n * ```javascript\n * var geometry = await DracoCompression.Default.decodeMeshToGeometryAsync(data);\n * ```\n *\n * @see https://playground.babylonjs.com/#DMZIBD#0\n */\nexport class DracoCompression {\n /**\n * Returns true if the decoder configuration is available.\n */\n static get DecoderAvailable() {\n const decoder = DracoCompression.Configuration.decoder;\n return !!((decoder.wasmUrl && decoder.wasmBinaryUrl && typeof WebAssembly === \"object\") || decoder.fallbackUrl);\n }\n static GetDefaultNumWorkers() {\n if (typeof navigator !== \"object\" || !navigator.hardwareConcurrency) {\n return 1;\n }\n // Use 50% of the available logical processors but capped at 4.\n return Math.min(Math.floor(navigator.hardwareConcurrency * 0.5), 4);\n }\n /**\n * Default instance for the draco compression object.\n */\n static get Default() {\n if (!DracoCompression._Default) {\n DracoCompression._Default = new DracoCompression();\n }\n return DracoCompression._Default;\n }\n /**\n * Reset the default draco compression object to null and disposing the removed default instance.\n * Note that if the workerPool is a member of the static Configuration object it is recommended not to run dispose,\n * unless the static worker pool is no longer needed.\n * @param skipDispose set to true to not dispose the removed default instance\n */\n static ResetDefault(skipDispose) {\n if (DracoCompression._Default) {\n if (!skipDispose) {\n DracoCompression._Default.dispose();\n }\n DracoCompression._Default = null;\n }\n }\n /**\n * Constructor\n * @param numWorkers The number of workers for async operations Or an options object. Specify `0` to disable web workers and run synchronously in the current context.\n */\n constructor(numWorkers = DracoCompression.DefaultNumWorkers) {\n const decoder = DracoCompression.Configuration.decoder;\n // check if the decoder binary and worker pool was injected\n // Note - it is expected that the developer checked if WebWorker, WebAssembly and the URL object are available\n if (decoder.workerPool || (typeof numWorkers === \"object\" && numWorkers.workerPool)) {\n // set the promise accordingly\n this._workerPoolPromise = Promise.resolve(decoder.workerPool || numWorkers.workerPool);\n }\n else {\n // to avoid making big changes to the decider, if wasmBinary is provided use it in the wasmBinaryPromise\n const wasmBinaryProvided = decoder.wasmBinary || (typeof numWorkers === \"object\" && numWorkers.wasmBinary);\n const numberOfWorkers = typeof numWorkers === \"number\" ? numWorkers : numWorkers.numWorkers;\n const useWorkers = numberOfWorkers && typeof Worker === \"function\" && typeof URL === \"function\";\n const urlNeeded = useWorkers || (!useWorkers && !decoder.jsModule);\n // code maintained here for back-compat with no changes\n const decoderInfo = decoder.wasmUrl && decoder.wasmBinaryUrl && typeof WebAssembly === \"object\"\n ? {\n url: urlNeeded ? Tools.GetBabylonScriptURL(decoder.wasmUrl, true) : \"\",\n wasmBinaryPromise: wasmBinaryProvided ? Promise.resolve(wasmBinaryProvided) : Tools.LoadFileAsync(Tools.GetBabylonScriptURL(decoder.wasmBinaryUrl, true)),\n }\n : {\n url: urlNeeded ? Tools.GetBabylonScriptURL(decoder.fallbackUrl) : \"\",\n wasmBinaryPromise: Promise.resolve(undefined),\n };\n if (useWorkers) {\n this._workerPoolPromise = decoderInfo.wasmBinaryPromise.then((decoderWasmBinary) => {\n const workerContent = `${decodeMesh}(${workerFunction})()`;\n const workerBlobUrl = URL.createObjectURL(new Blob([workerContent], { type: \"application/javascript\" }));\n return new AutoReleaseWorkerPool(numberOfWorkers, () => {\n const worker = new Worker(workerBlobUrl);\n return initializeWebWorker(worker, decoderWasmBinary, decoderInfo.url);\n });\n });\n }\n else {\n this._decoderModulePromise = decoderInfo.wasmBinaryPromise.then(async (decoderWasmBinary) => {\n if (typeof DracoDecoderModule === \"undefined\") {\n if (!decoder.jsModule) {\n if (!decoderInfo.url) {\n throw new Error(\"Draco decoder module is not available\");\n }\n await Tools.LoadBabylonScriptAsync(decoderInfo.url);\n }\n }\n return await createDecoderAsync(decoderWasmBinary, decoder.jsModule);\n });\n }\n }\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n if (this._workerPoolPromise) {\n this._workerPoolPromise.then((workerPool) => {\n workerPool.dispose();\n });\n }\n delete this._workerPoolPromise;\n delete this._decoderModulePromise;\n }\n /**\n * Returns a promise that resolves when ready. Call this manually to ensure draco compression is ready before use.\n * @returns a promise that resolves when ready\n */\n async whenReadyAsync() {\n if (this._workerPoolPromise) {\n await this._workerPoolPromise;\n return;\n }\n if (this._decoderModulePromise) {\n await this._decoderModulePromise;\n return;\n }\n }\n /**\n * Decode Draco compressed mesh data to mesh data.\n * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @param gltfNormalizedOverride A map of attributes from vertex buffer kinds to normalized flags to override the Draco normalization\n * @returns A promise that resolves with the decoded mesh data\n */\n decodeMeshToMeshDataAsync(data, attributes, gltfNormalizedOverride) {\n const dataView = data instanceof ArrayBuffer ? new Int8Array(data) : new Int8Array(data.buffer, data.byteOffset, data.byteLength);\n const applyGltfNormalizedOverride = (kind, normalized) => {\n if (gltfNormalizedOverride && gltfNormalizedOverride[kind] !== undefined) {\n if (normalized !== gltfNormalizedOverride[kind]) {\n Logger.Warn(`Normalized flag from Draco data (${normalized}) does not match normalized flag from glTF accessor (${gltfNormalizedOverride[kind]}). Using flag from glTF accessor.`);\n }\n return gltfNormalizedOverride[kind];\n }\n else {\n return normalized;\n }\n };\n if (this._workerPoolPromise) {\n return this._workerPoolPromise.then((workerPool) => {\n return new Promise((resolve, reject) => {\n workerPool.push((worker, onComplete) => {\n let resultIndices = null;\n const resultAttributes = [];\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n onComplete();\n };\n const onMessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"decodeMeshDone\": {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve({ indices: resultIndices, attributes: resultAttributes, totalVertices: message.totalVertices });\n onComplete();\n break;\n }\n case \"indices\": {\n resultIndices = message.data;\n break;\n }\n case \"attribute\": {\n resultAttributes.push({\n kind: message.kind,\n data: message.data,\n size: message.size,\n byteOffset: message.byteOffset,\n byteStride: message.byteStride,\n normalized: applyGltfNormalizedOverride(message.kind, message.normalized),\n });\n break;\n }\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n const dataViewCopy = dataView.slice();\n worker.postMessage({ id: \"decodeMesh\", dataView: dataViewCopy, attributes: attributes }, [dataViewCopy.buffer]);\n });\n });\n });\n }\n if (this._decoderModulePromise) {\n return this._decoderModulePromise.then((decoder) => {\n let resultIndices = null;\n const resultAttributes = [];\n const numPoints = decodeMesh(decoder.module, dataView, attributes, (indices) => {\n resultIndices = indices;\n }, (kind, data, size, byteOffset, byteStride, normalized) => {\n resultAttributes.push({\n kind,\n data,\n size,\n byteOffset,\n byteStride,\n normalized,\n });\n });\n return { indices: resultIndices, attributes: resultAttributes, totalVertices: numPoints };\n });\n }\n throw new Error(\"Draco decoder module is not available\");\n }\n /**\n * Decode Draco compressed mesh data to Babylon geometry.\n * @param name The name to use when creating the geometry\n * @param scene The scene to use when creating the geometry\n * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @returns A promise that resolves with the decoded geometry\n */\n async decodeMeshToGeometryAsync(name, scene, data, attributes) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes);\n const geometry = new Geometry(name, scene);\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n }\n /** @internal */\n async _decodeMeshToGeometryForGltfAsync(name, scene, data, attributes, gltfNormalizedOverride, boundingInfo) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes, gltfNormalizedOverride);\n const geometry = new Geometry(name, scene);\n if (boundingInfo) {\n geometry._boundingInfo = boundingInfo;\n geometry.useBoundingInfoFromGeometry = true;\n }\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n }\n /**\n * Decode Draco compressed mesh data to Babylon vertex data.\n * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @returns A promise that resolves with the decoded vertex data\n * @deprecated Use {@link decodeMeshToGeometryAsync} for better performance in some cases\n */\n async decodeMeshAsync(data, attributes) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes);\n const vertexData = new VertexData();\n if (meshData.indices) {\n vertexData.indices = meshData.indices;\n }\n for (const attribute of meshData.attributes) {\n const floatData = VertexBuffer.GetFloatData(attribute.data, attribute.size, VertexBuffer.GetDataType(attribute.data), attribute.byteOffset, attribute.byteStride, attribute.normalized, meshData.totalVertices);\n vertexData.set(floatData, attribute.kind);\n }\n return vertexData;\n }\n}\n/**\n * The configuration. Defaults to the following urls:\n * - wasmUrl: \"https://cdn.babylonjs.com/draco_wasm_wrapper_gltf.js\"\n * - wasmBinaryUrl: \"https://cdn.babylonjs.com/draco_decoder_gltf.wasm\"\n * - fallbackUrl: \"https://cdn.babylonjs.com/draco_decoder_gltf.js\"\n */\nDracoCompression.Configuration = {\n decoder: {\n wasmUrl: `${Tools._DefaultCdnUrl}/draco_wasm_wrapper_gltf.js`,\n wasmBinaryUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.wasm`,\n fallbackUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.js`,\n },\n};\n/**\n * Default number of workers to create when creating the draco compression object.\n */\nDracoCompression.DefaultNumWorkers = DracoCompression.GetDefaultNumWorkers();\nDracoCompression._Default = null;\n//# sourceMappingURL=dracoCompression.js.map","import { DracoCompression } from \"core/Meshes/Compression/dracoCompression\";\nimport { VertexBuffer } from \"core/Buffers/buffer\";\nimport { GLTFLoader, ArrayItem, LoadBoundingInfoFromPositionAccessor } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_draco_mesh_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_draco_mesh_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines whether to use the normalized flag from the glTF accessor instead of the Draco data. Defaults to true.\n */\n this.useNormalizedFlagFromAccessor = true;\n this._loader = loader;\n this.enabled = DracoCompression.DecoderAvailable && this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n delete this.dracoCompression;\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadVertexDataAsync(context, primitive, babylonMesh) {\n return GLTFLoader.LoadExtensionAsync(context, primitive, this.name, (extensionContext, extension) => {\n if (primitive.mode != undefined) {\n if (primitive.mode !== 4 /* MeshPrimitiveMode.TRIANGLES */ && primitive.mode !== 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */) {\n throw new Error(`${context}: Unsupported mode ${primitive.mode}`);\n }\n }\n const attributes = {};\n const normalized = {};\n const loadAttribute = (name, kind) => {\n const uniqueId = extension.attributes[name];\n if (uniqueId == undefined) {\n return;\n }\n babylonMesh._delayInfo = babylonMesh._delayInfo || [];\n if (babylonMesh._delayInfo.indexOf(kind) === -1) {\n babylonMesh._delayInfo.push(kind);\n }\n attributes[kind] = uniqueId;\n if (this.useNormalizedFlagFromAccessor) {\n const accessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[name]);\n if (accessor) {\n normalized[kind] = accessor.normalized || false;\n }\n }\n };\n loadAttribute(\"POSITION\", VertexBuffer.PositionKind);\n loadAttribute(\"NORMAL\", VertexBuffer.NormalKind);\n loadAttribute(\"TANGENT\", VertexBuffer.TangentKind);\n loadAttribute(\"TEXCOORD_0\", VertexBuffer.UVKind);\n loadAttribute(\"TEXCOORD_1\", VertexBuffer.UV2Kind);\n loadAttribute(\"TEXCOORD_2\", VertexBuffer.UV3Kind);\n loadAttribute(\"TEXCOORD_3\", VertexBuffer.UV4Kind);\n loadAttribute(\"TEXCOORD_4\", VertexBuffer.UV5Kind);\n loadAttribute(\"TEXCOORD_5\", VertexBuffer.UV6Kind);\n loadAttribute(\"JOINTS_0\", VertexBuffer.MatricesIndicesKind);\n loadAttribute(\"WEIGHTS_0\", VertexBuffer.MatricesWeightsKind);\n loadAttribute(\"COLOR_0\", VertexBuffer.ColorKind);\n const bufferView = ArrayItem.Get(extensionContext, this._loader.gltf.bufferViews, extension.bufferView);\n if (!bufferView._dracoBabylonGeometry) {\n bufferView._dracoBabylonGeometry = this._loader.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then((data) => {\n const dracoCompression = this.dracoCompression || DracoCompression.Default;\n const positionAccessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[\"POSITION\"]);\n const babylonBoundingInfo = !this._loader.parent.alwaysComputeBoundingBox && !babylonMesh.skeleton && positionAccessor ? LoadBoundingInfoFromPositionAccessor(positionAccessor) : null;\n return dracoCompression\n ._decodeMeshToGeometryForGltfAsync(babylonMesh.name, this._loader.babylonScene, data, attributes, normalized, babylonBoundingInfo)\n .catch((error) => {\n throw new Error(`${context}: ${error.message}`);\n });\n });\n }\n return bufferView._dracoBabylonGeometry;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_draco_mesh_compression(loader));\n//# sourceMappingURL=KHR_draco_mesh_compression.js.map"],"names":["decodeMesh","decoderModule","data","attributes","onIndicesData","onAttributeData","decoder","buffer","geometry","status","Decoder","DecoderBuffer","Init","byteLength","type","GetEncodedGeometryType","TRIANGULAR_MESH","mesh","Mesh","DecodeBufferToMesh","ok","ptr","Error","error_msg","numIndices","num_faces","_malloc","GetTrianglesUInt32Array","indices","Uint32Array","set","HEAPF32","_free","POINT_CLOUD","pointCloud","PointCloud","DecodeBufferToPointCloud","numPoints","num_points","processAttribute","kind","attribute","dataType","data_type","numComponents","num_components","normalized","byteStride","byte_stride","byteOffset","byte_offset","info","DT_FLOAT32","typedArrayConstructor","Float32Array","heap","DT_INT8","Int8Array","HEAP8","DT_INT16","Int16Array","HEAP16","DT_INT32","Int32Array","HEAP32","DT_UINT8","Uint8Array","HEAPU8","DT_UINT16","Uint16Array","HEAPU16","DT_UINT32","HEAPU32","numValues","BYTES_PER_ELEMENT","GetAttributeDataArrayForAllPoints","slice","id","GetAttributeByUniqueId","dracoAttributeTypes","position","POSITION","normal","NORMAL","color","COLOR","uv","TEX_COORD","GetAttributeId","GetAttribute","destroy","workerFunction","decoderPromise","onmessage","event","message","url","importScripts","initDecoderObject","wasmBinary","DracoDecoderModule","postMessage","then","dataView","size","offset","stride","totalVertices","DracoCompression","DecoderAvailable","Configuration","wasmUrl","wasmBinaryUrl","WebAssembly","fallbackUrl","GetDefaultNumWorkers","navigator","hardwareConcurrency","Math","min","floor","Default","_Default","ResetDefault","skipDispose","dispose","constructor","numWorkers","DefaultNumWorkers","workerPool","this","_workerPoolPromise","Promise","resolve","wasmBinaryProvided","numberOfWorkers","useWorkers","Worker","URL","urlNeeded","jsModule","decoderInfo","Tools","GetBabylonScriptURL","wasmBinaryPromise","LoadFileAsync","undefined","decoderWasmBinary","workerContent","workerBlobUrl","createObjectURL","Blob","AutoReleaseWorkerPool","worker","moduleUrl","reject","onError","error","removeEventListener","onMessage","addEventListener","clone","initializeWebWorker","_decoderModulePromise","async","LoadBabylonScriptAsync","module","whenReadyAsync","decodeMeshToMeshDataAsync","gltfNormalizedOverride","ArrayBuffer","push","onComplete","resultIndices","resultAttributes","Logger","Warn","dataViewCopy","decodeMeshToGeometryAsync","name","scene","meshData","Geometry","setIndices","setVerticesBuffer","VertexBuffer","getEngine","_decodeMeshToGeometryForGltfAsync","boundingInfo","_boundingInfo","useBoundingInfoFromGeometry","decodeMeshAsync","vertexData","VertexData","floatData","GetFloatData","GetDataType","_DefaultCdnUrl","NAME","KHR_draco_mesh_compression","loader","useNormalizedFlagFromAccessor","_loader","enabled","isExtensionUsed","dracoCompression","_loadVertexDataAsync","context","primitive","babylonMesh","GLTFLoader","LoadExtensionAsync","extensionContext","extension","mode","loadAttribute","uniqueId","_delayInfo","indexOf","accessor","ArrayItem","TryGet","gltf","accessors","PositionKind","NormalKind","TangentKind","UVKind","UV2Kind","UV3Kind","UV4Kind","UV5Kind","UV6Kind","MatricesIndicesKind","MatricesWeightsKind","ColorKind","bufferView","Get","bufferViews","_dracoBabylonGeometry","loadBufferViewAsync","index","positionAccessor","babylonBoundingInfo","parent","alwaysComputeBoundingBox","skeleton","LoadBoundingInfoFromPositionAccessor","babylonScene","catch","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"4VAGO,SAASA,EAAWC,EAAiCC,EAAMC,EAAYC,EAAeC,GACzF,IAAIC,EAAU,KACVC,EAAS,KACTC,EAAW,KACf,IAII,IAAIC,EAHJH,EAAU,IAAIL,EAAcS,QAC5BH,EAAS,IAAIN,EAAcU,cAC3BJ,EAAOK,KAAKV,EAAMA,EAAKW,YAEvB,MAAMC,EAAOR,EAAQS,uBAAuBR,GAC5C,OAAQO,GACJ,KAAKb,EAAce,gBAAiB,CAChC,MAAMC,EAAO,IAAIhB,EAAciB,KAE/B,GADAT,EAASH,EAAQa,mBAAmBZ,EAAQU,IACvCR,EAAOW,MAAqB,IAAbH,EAAKI,IACrB,MAAM,IAAIC,MAAMb,EAAOc,aAE3B,MACMC,EAAwB,EADbP,EAAKQ,YAEhBZ,EAA0B,EAAbW,EACbH,EAAMpB,E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as d,L as C,aP as _,aQ as N}from"./index-BHIM4QBr.esm.min.js";import{G as g}from"./gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js";var f;!function(e){e[e.Input=0]="Input",e[e.Output=1]="Output"}(f||(f={}));class v{constructor(s,t,a){this._ownerBlock=a,this._connectedPoint=[],this.uniqueId=e(),this.connectedPointIds=[],this.name=s,this._connectionType=t}get connectionType(){return this._connectionType}_isSingularConnection(){return!0}isConnected(){return this._connectedPoint.length>0}connectTo(e){if(this._connectionType===e._connectionType)throw new Error(`Cannot connect two points of type ${this.connectionType}`);if(this._isSingularConnection()&&this._connectedPoint.length>0||e._isSingularConnection()&&e._connectedPoint.length>0)throw new Error("Max number of connections for point reached");this._connectedPoint.push(e),e._connectedPoint.push(this)}serialize(e={}){e.uniqueId=this.uniqueId,e.name=this.name,e._connectionType=this._connectionType,e.connectedPointIds=[],e.className=this.getClassName();for(const s of this._connectedPoint)e.connectedPointIds.push(s.uniqueId)}getClassName(){return"FGConnection"}deserialize(e){this.uniqueId=e.uniqueId,this.name=e.name,this._connectionType=e._connectionType,this.connectedPointIds=e.connectedPointIds}static Parse(e={},t){const a=new(s.Instantiate(e.className))(e.name,e._connectionType,t);return a.deserialize(e),a}}class x{constructor(e){this.value=this._toInt(e)}_toInt(e){return 0|e}add(e){return new x(this.value+e.value)}subtract(e){return new x(this.value-e.value)}multiply(e){return new x(Math.imul(this.value,e.value))}divide(e){return new x(this.value/e.value)}getClassName(){return x.ClassName}equals(e){return this.value===e.value}static Parse(e){return new x(e.value)}}x.ClassName="FlowGraphInteger",t("FlowGraphInteger",x);class b{constructor(e,s){this.typeName=e,this.defaultValue=s}serialize(e){e.typeName=this.typeName,e.defaultValue=this.defaultValue}static Parse(e){return new b(e.typeName,e.defaultValue)}}const y=new b("any",void 0),w=new b("number",0),k=new b("boolean",!1),I=new b("Vector2",a.Zero()),B=new b("Vector3",n.Zero());new b("Vector4",o.Zero());const V=new b("Matrix",r.Identity());new b("Color3",i.Black()),new b("Quaternion",c.Identity());const O=new b("FlowGraphInteger",new x(0));class G extends v{constructor(e,s,t,a){super(e,s,t),this.richType=a}_isSingularConnection(){return 0===this.connectionType}setValue(e,s){s._setConnectionValue(this,e)}connectTo(e){super.connectTo(e)}_getValueOrDefault(e){return e._hasConnectionValue(this)?e._getConnectionValue(this):this.richType.defaultValue}getValue(e){return 1===this.connectionType?(e._notifyExecuteNode(this._ownerBlock),this._ownerBlock._updateOutputs(e),this._getValueOrDefault(e)):this.isConnected()?this._connectedPoint[0].getValue(e):this._getValueOrDefault(e)}getClassName(){return"FGDataConnection"}serialize(e={}){super.serialize(e),e.richType={},this.richType.serialize(e.richType)}static Parse(e,s){const t=v.Parse(e,s);return t.richType=b.Parse(e.richType),t}}function F(e){return"Mesh"===e||"AbstractMesh"===e||"GroundMesh"===e||"InstanceMesh"===e||"LinesMesh"===e||"GoldbergMesh"===e||"GreasedLineMesh"===e||"TrailMesh"===e}function E(e){return"Vector2"===e||"Vector3"===e||"Vector4"===e||"Quaternion"===e||"Color3"===e||"Color4"===e}function T(e,s,t){const a=s?.getClassName?.()??"";F(a)?t[e]={name:s.name,className:a}:E(a)?t[e]={value:s.asArray(),className:a}:t[e]=s}function P(e,s,t){const u=s[e];let h;const m=u?.className;return h=F(m)?t.getMeshByName(u.name):E(m)?function(e,s){if("Vector2"===e)return a.FromArray(s);if("Vector3"===e)return n.FromArray(s);if("Vector4"===e)return o.FromArray(s);if("Quaternion"===e)return c.FromArray(s);if("Color3"===e)return new i(s[0],s[1],s[2]);if("Color4"===e)return new l(s[0],s[1],s[2],s[3]);throw new Error(`Unknown vector class name ${e}`)}(m,u.value):"Matrix"===m?r.FromArray(u.value):m===x.ClassName?x.Parse(u):u&&void 0!==u.value?u.value:u,h}t("FGDataConnection",G);class M{constructor(s){this.config=s,this.uniqueId=e(),this.name=this.config?.name??this.getClassName(),this.dataInputs=[],this.dataOutputs=[]}_updateOutputs(e){}registerDataInput(e,s){const t=new G(e,0,this,s);return this.dataInputs.push(t),t}registerDataOutput(e,s){const t=new G(e,1,this,s);return this.dataOutputs.push(t),t}getDataInput(e){return this.dataInputs.find((s=>s.name===e))}getDataOutput(e){return this.dataOutputs.find((s=>s.name===e))}serialize(e={},s=T){e.uniqueId=this.uniqueId,e.config={},this.config&&(e.config.name=this.config.name),e.dataInputs=[],e.dataOutputs=[],e.className=this.getClassName();for(const s of this.dataInputs){const t={};s.serialize(t),e.dataInputs.push(t)}for(const s of this.dataOutputs){const t={};s.serialize(t),e.dataOutputs.push(t)}}getClassName(){return"FGBlock"}static Parse(e,t){const a=s.Instantiate(e.className),n={},o=t.valueParseFunction??P;if(e.config)for(const s in e.config)n[s]=o(s,e.config,t.scene);var r;("FGSetPropertyBlock"===(r=e.className)||"FGGetPropertyBlock"===r||"FGPlayAnimationBlock"===r||"FGMeshPickEventBlock"===r)&&(n.pathConverter=t.pathConverter);const i=new a(n);i.uniqueId=e.uniqueId;for(let s=0;s<e.dataInputs.length;s++){const t=i.getDataInput(e.dataInputs[s].name);if(!t)throw new Error("Could not find data input with name "+e.dataInputs[s].name+" in block "+e.className);t.deserialize(e.dataInputs[s])}for(let s=0;s<e.dataOutputs.length;s++){const t=i.getDataOutput(e.dataOutputs[s].name);if(!t)throw new Error("Could not find data output with name "+e.dataOutputs[s].name+" in block "+e.className);t.deserialize(e.dataOutputs[s])}return i.metadata=e.metadata,i.deserialize&&i.deserialize(e),i}}class S extends v{_isSingularConnection(){return 1===this.connectionType}_activateSignal(e){0===this.connectionType?(e._notifyExecuteNode(this._ownerBlock),this._ownerBlock._execute(e,this),e._increaseExecutionId()):this._connectedPoint[0]?._activateSignal(e)}}t("FlowGraphSignalConnection",S);class D extends M{constructor(e){super(e),this.signalInputs=[],this.signalOutputs=[],this.in=this._registerSignalInput("in")}_registerSignalInput(e){const s=new S(e,0,this);return this.signalInputs.push(s),s}_registerSignalOutput(e){const s=new S(e,1,this);return this.signalOutputs.push(s),s}getSignalInput(e){return this.signalInputs.find((s=>s.name===e))}getSignalOutput(e){return this.signalOutputs.find((s=>s.name===e))}serialize(e={}){super.serialize(e),e.signalInputs=[],e.signalOutputs=[];for(const s of this.signalInputs){const t={};s.serialize(t),e.signalInputs.push(t)}for(const s of this.signalOutputs){const t={};s.serialize(t),e.signalOutputs.push(t)}}deserialize(e){for(let s=0;s<e.signalInputs.length;s++){const t=this.getSignalInput(e.signalInputs[s].name);if(!t)throw new Error("Could not find signal input with name "+e.signalInputs[s].name+" in block "+e.className);t.deserialize(e.signalInputs[s])}for(let s=0;s<e.signalOutputs.length;s++){const t=this.getSignalOutput(e.signalOutputs[s].name);if(!t)throw new Error("Could not find signal output with name "+e.signalOutputs[s].name+" in block "+e.className);t.deserialize(e.signalOutputs[s])}}getClassName(){return"FGExecutionBlock"}}class q extends D{constructor(e){super(e),this.out=this._registerSignalOutput("out"),this.done=this._registerSignalOutput("done")}_startPendingTasks(e){this._preparePendingTasks(e),e._addPendingBlock(this)}}class z extends q{_execute(e){e._notifyExecuteNode(this),this.out._activateSignal(e)}}class R{constructor(s){this.uniqueId=e(),this._userVariables={},this._executionVariables={},this._connectionValues={},this._pendingBlocks=[],this._executionId=0,this.onNodeExecutedObservable=new m,this._configuration=s}hasVariable(e){return e in this._userVariables}setVariable(e,s){this._userVariables[e]=s}getVariable(e){return this._userVariables[e]}get userVariables(){return this._userVariables}_getUniqueIdPrefixedName(e,s){return`${e.uniqueId}_${s}`}_setExecutionVariable(e,s,t){this._executionVariables[this._getUniqueIdPrefixedName(e,s)]=t}_getExecutionVariable(e,s,t){return this._hasExecutionVariable(e,s)?this._executionVariables[this._getUniqueIdPrefixedName(e,s)]:t}_deleteExecutionVariable(e,s){delete this._executionVariables[this._getUniqueIdPrefixedName(e,s)]}_hasExecutionVariable(e,s){return this._getUniqueIdPrefixedName(e,s)in this._executionVariables}_hasConnectionValue(e){return e.uniqueId in this._connectionValues}_setConnectionValue(e,s){this._connectionValues[e.uniqueId]=s}_getConnectionValue(e){return this._connectionValues[e.uniqueId]}get configuration(){return this._configuration}_addPendingBlock(e){this._pendingBlocks.push(e)}_removePendingBlock(e){const s=this._pendingBlocks.indexOf(e);-1!==s&&this._pendingBlocks.splice(s,1)}_clearPendingBlocks(){for(const e of this._pendingBlocks)e._cancelPendingTasks(this);this._pendingBlocks.length=0}_notifyExecuteNode(e){this.onNodeExecutedObservable.notifyObservers(e)}_increaseExecutionId(){this._executionId++}get executionId(){return this._executionId}serialize(e={},s=T){e.uniqueId=this.uniqueId,e._userVariables={};for(const t in this._userVariables)s(t,this._userVariables[t],e._userVariables);e._connectionValues={};for(const t in this._connectionValues)s(t,this._connectionValues[t],e._connectionValues)}getClassName(){return"FGContext"}static Parse(e,s){const t=s.graph.createContext(),a=s.valueParseFunction??P;t.uniqueId=e.uniqueId;for(const s in e._userVariables){const n=a(s,e._userVariables,t._configuration.scene);t._userVariables[s]=n}for(const s in e._connectionValues){const n=a(s,e._connectionValues,t._configuration.scene);t._connectionValues[s]=n}return t}}function A(e,s){return!(!e.parent||e.parent!==s&&!A(e.parent,s))}u([h()],R.prototype,"uniqueId",void 0);class $ extends z{constructor(e){super(e),this.config=e}_getReferencedMesh(){const e=this.config.pathConverter.convert(this.config.path),s=e.info.getObject(e.object);if(!(s&&s instanceof p))throw new Error("Mesh pick event block requires a valid mesh");return s}_preparePendingTasks(e){let s=e._getExecutionVariable(this,"meshPickObserver");if(!s){const t=this._getReferencedMesh();e._setExecutionVariable(this,"mesh",t),s=t.getScene().onPointerObservable.add((s=>{s.type===d.POINTERPICK&&s.pickInfo?.pickedMesh&&(s.pickInfo?.pickedMesh===t||A(s.pickInfo?.pickedMesh,t))&&this._execute(e)}));const a=t.onDisposeObservable.add((()=>this._onDispose));e._setExecutionVariable(this,"meshPickObserver",s),e._setExecutionVariable(this,"meshDisposeObserver",a)}}_onDispose(e){this._cancelPendingTasks(e),e._removePendingBlock(this)}_cancelPendingTasks(e){const s=e._getExecutionVariable(this,"mesh"),t=e._getExecutionVariable(this,"meshPickObserver"),a=e._getExecutionVariable(this,"meshDisposeObserver");s.getScene().onPointerObservable.remove(t),s.onDisposeObservable.remove(a),e._deleteExecutionVariable(this,"mesh"),e._deleteExecutionVariable(this,"meshPickObserver"),e._deleteExecutionVariable(this,"meshDisposeObserver")}getClassName(){return $.ClassName}serialize(e){super.serialize(e),e.config.path=this.config.path}}var L,U;$.ClassName="FGMeshPickEventBlock",t($.ClassName,$),function(e){e[e.Stopped=0]="Stopped",e[e.Started=1]="Started"}(L||(L={}));class K{constructor(e){this._eventBlocks=[],this._executionContexts=[],this.state=0,this._scene=e.scene,this._coordinator=e.coordinator,this._sceneDisposeObserver=this._scene.onDisposeObservable.add((()=>this.dispose()))}createContext(){const e=new R({scene:this._scene,coordinator:this._coordinator});return this._executionContexts.push(e),e}getContext(e){return this._executionContexts[e]}addEventBlock(e){this._eventBlocks.push(e)}start(){if(1!==this.state){this.state=1,0===this._executionContexts.length&&this.createContext();for(const e of this._executionContexts){const s=this._getContextualOrder();for(const t of s)t._startPendingTasks(e)}}}_getContextualOrder(){const e=[];for(const s of this._eventBlocks)if(s.getClassName()===$.ClassName){const t=s._getReferencedMesh();let a=0;for(;a<e.length;a++){const s=e[a]._getReferencedMesh();if(t&&s&&A(t,s))break}e.splice(a,0,s)}else e.push(s);return e}dispose(){if(0!==this.state){this.state=0;for(const e of this._executionContexts)e._clearPendingBlocks();this._executionContexts.length=0,this._eventBlocks.length=0,this._scene.onDisposeObservable.remove(this._sceneDisposeObserver),this._sceneDisposeObserver=null}}visitAllBlocks(e){const s=[],t=new Set;for(const e of this._eventBlocks)s.push(e),t.add(e.uniqueId);for(;s.length>0;){const a=s.pop();e(a);for(const e of a.dataInputs)for(const a of e._connectedPoint)t.has(a._ownerBlock.uniqueId)||(s.push(a._ownerBlock),t.add(a._ownerBlock.uniqueId));if(a instanceof D)for(const e of a.signalOutputs)for(const a of e._connectedPoint)t.has(a._ownerBlock.uniqueId)||(s.push(a._ownerBlock),t.add(a._ownerBlock.uniqueId))}}serialize(e={},s){e.allBlocks=[],this.visitAllBlocks((s=>{const t={};s.serialize(t),e.allBlocks.push(t)})),e.executionContexts=[];for(const t of this._executionContexts){const a={};t.serialize(a,s),e.executionContexts.push(a)}}static GetDataOutConnectionByUniqueId(e,s){for(const t of e)for(const e of t.dataOutputs)if(e.uniqueId===s)return e;throw new Error("Could not find data out connection with unique id "+s)}static GetSignalInConnectionByUniqueId(e,s){for(const t of e)if(t instanceof D)for(const e of t.signalInputs)if(e.uniqueId===s)return e;throw new Error("Could not find signal in connection with unique id "+s)}static Parse(e,s){const t=s.coordinator.createGraph(),a=[],n=s.valueParseFunction??P;for(const o of e.allBlocks){const e=M.Parse(o,{scene:s.coordinator.config.scene,pathConverter:s.pathConverter,valueParseFunction:n});a.push(e),e instanceof z&&t.addEventBlock(e)}for(const e of a){for(const s of e.dataInputs)for(const e of s.connectedPointIds){const t=K.GetDataOutConnectionByUniqueId(a,e);s.connectTo(t)}if(e instanceof D)for(const s of e.signalOutputs)for(const e of s.connectedPointIds){const t=K.GetSignalInConnectionByUniqueId(a,e);s.connectTo(t)}}for(const s of e.executionContexts)R.Parse(s,{graph:t,valueParseFunction:n});return t}}class H{constructor(e){this.config=e,this._flowGraphs=[],this._customEventsMap=new Map,this.config.scene.onDisposeObservable.add((()=>{this.dispose()}));(H.SceneCoordinators.get(this.config.scene)??[]).push(this)}createGraph(){const e=new K({scene:this.config.scene,coordinator:this});return this._flowGraphs.push(e),e}removeGraph(e){const s=this._flowGraphs.indexOf(e);-1!==s&&(e.dispose(),this._flowGraphs.splice(s,1))}start(){this._flowGraphs.forEach((e=>e.start()))}dispose(){this._flowGraphs.forEach((e=>e.dispose())),this._flowGraphs.length=0;const e=H.SceneCoordinators.get(this.config.scene)??[],s=e.indexOf(this);-1!==s&&e.splice(s,1)}serialize(e,s){e._flowGraphs=[],this._flowGraphs.forEach((t=>{const a={};t.serialize(a,s),e._flowGraphs.push(a)}))}static Parse(e,s){const t=s.valueParseFunction??P,a=new H({scene:s.scene});return e._flowGraphs?.forEach((e=>{K.Parse(e,{coordinator:a,valueParseFunction:t,pathConverter:s.pathConverter})})),a}get flowGraphs(){return this._flowGraphs}getCustomEventObservable(e){let s=this._customEventsMap.get(e);return s||(s=new m,this._customEventsMap.set(e,s)),s}notifyCustomEvent(e,s){const t=this._customEventsMap.get(e);t&&t.notifyObservers(s)}}H.SceneCoordinators=new Map;class j extends z{_preparePendingTasks(e){if(!e._getExecutionVariable(this,"sceneReadyObserver")){const s=e.configuration.scene.onReadyObservable.add((()=>{this._execute(e)}));e._setExecutionVariable(this,"sceneReadyObserver",s)}}_cancelPendingTasks(e){const s=e._getExecutionVariable(this,"sceneReadyObserver");e.configuration.scene.onReadyObservable.remove(s),e._deleteExecutionVariable(this,"sceneReadyObserver")}getClassName(){return j.ClassName}}j.ClassName="FGSceneReadyEventBlock",t("FGSceneReadyEventBlock",j);class Z extends z{_preparePendingTasks(e){if(!e._getExecutionVariable(this,"sceneBeforeRender")){const s=e.configuration.scene.onBeforeRenderObservable.add((()=>{this._execute(e)}));e._setExecutionVariable(this,"sceneBeforeRender",s)}}_cancelPendingTasks(e){const s=e._getExecutionVariable(this,"sceneBeforeRender");e.configuration.scene.onBeforeRenderObservable.remove(s),e._deleteExecutionVariable(this,"sceneBeforeRender")}getClassName(){return Z.ClassName}}Z.ClassName="FGSceneTickEventBlock",t(Z.ClassName,Z);class Q extends D{constructor(e){super(e),this.out=this._registerSignalOutput("out")}}class W extends Q{constructor(e){super(e),this.message=this.registerDataInput("message",y)}_execute(e){const s=this.message.getValue(e);C.Log(s),this.out._activateSignal(e)}getClassName(){return W.ClassName}}W.ClassName="FGConsoleLogBlock",t(W.ClassName,W),function(e){e[e.INIT=0]="INIT",e[e.STARTED=1]="STARTED",e[e.ENDED=2]="ENDED"}(U||(U={}));class X{constructor(e){this.onEachCountObservable=new m,this.onTimerAbortedObservable=new m,this.onTimerEndedObservable=new m,this.onStateChangedObservable=new m,this._observer=null,this._breakOnNextTick=!1,this._tick=e=>{const s=Date.now();this._timer=s-this._startTime;const t={startTime:this._startTime,currentTime:s,deltaTime:this._timer,completeRate:this._timer/this._timeToEnd,payload:e},a=this._breakOnNextTick||this._breakCondition(t);a||this._timer>=this._timeToEnd?this._stop(t,a):this.onEachCountObservable.notifyObservers(t)},this._setState(0),this._contextObservable=e.contextObservable,this._observableParameters=e.observableParameters??{},this._breakCondition=e.breakCondition??(()=>!1),this._timeToEnd=e.timeout,e.onEnded&&this.onTimerEndedObservable.add(e.onEnded),e.onTick&&this.onEachCountObservable.add(e.onTick),e.onAborted&&this.onTimerAbortedObservable.add(e.onAborted)}set breakCondition(e){this._breakCondition=e}clearObservables(){this.onEachCountObservable.clear(),this.onTimerAbortedObservable.clear(),this.onTimerEndedObservable.clear(),this.onStateChangedObservable.clear()}start(e=this._timeToEnd){if(1===this._state)throw new Error("Timer already started. Please stop it before starting again");this._timeToEnd=e,this._startTime=Date.now(),this._timer=0,this._observer=this._contextObservable.add(this._tick,this._observableParameters.mask,this._observableParameters.insertFirst,this._observableParameters.scope),this._setState(1)}stop(){1===this._state&&(this._breakOnNextTick=!0)}dispose(){this._observer&&this._contextObservable.remove(this._observer),this.clearObservables()}_setState(e){this._state=e,this.onStateChangedObservable.notifyObservers(this._state)}_stop(e,s=!1){this._contextObservable.remove(this._observer),this._setState(2),s?this.onTimerAbortedObservable.notifyObservers(e):this.onTimerEndedObservable.notifyObservers(e)}}class Y extends q{constructor(e){super(e),this.timeout=this.registerDataInput("timeout",w)}_preparePendingTasks(e){const s=this.timeout.getValue(e);if(void 0!==s&&s>=0){const t=e._getExecutionVariable(this,"runningTimers")||[],a=e.configuration.scene,n=new X({timeout:s,contextObservable:a.onBeforeRenderObservable,onEnded:()=>this._onEnded(n,e)});n.start(),t.push(n),e._setExecutionVariable(this,"runningTimers",t)}}_execute(e){this._startPendingTasks(e),this.out._activateSignal(e)}_onEnded(e,t){const a=t._getExecutionVariable(this,"runningTimers")||[],n=a.indexOf(e);-1!==n?a.splice(n,1):s.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list"),t._removePendingBlock(this),this.done._activateSignal(t)}_cancelPendingTasks(e){const s=e._getExecutionVariable(this,"runningTimers")||[];for(const e of s)e.dispose();e._deleteExecutionVariable(this,"runningTimers")}getClassName(){return Y.ClassName}}Y.ClassName="FGTimerBlock",t("FGTimerBlock",Y);class J extends Q{constructor(e){super(e),this.config=e;for(let e=0;e<this.config.eventData.length;e++){const s=this.config.eventData[e];this.registerDataInput(s,y)}}_execute(e){const s=this.config.eventId,t=this.dataInputs.map((s=>s.getValue(e)));e.configuration.coordinator.notifyCustomEvent(s,t),this.out._activateSignal(e)}getClassName(){return J.ClassName}}J.ClassName="FGSendCustomEventBlock",t("FGSendCustomEventBlock",J);class ee extends z{constructor(e){super(e),this.config=e;for(let e=0;e<this.config.eventData.length;e++){const s=this.config.eventData[e];this.registerDataOutput(s,y)}}_preparePendingTasks(e){const s=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);this._eventObserver=s.add((s=>{for(let t=0;t<s.length;t++)this.dataOutputs[t].setValue(s[t],e);this._execute(e)}))}_cancelPendingTasks(e){const t=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);t?t.remove(this._eventObserver):s.Warn(`FlowGraphReceiveCustomEventBlock: Missing observable for event ${this.config.eventId}`)}getClassName(){return ee.ClassName}serialize(e){super.serialize(e),e.eventId=this.config.eventId,e.eventData=this.config.eventData}}ee.ClassName="FGReceiveCustomEventBlock",t(ee.ClassName,ee);class se extends D{constructor(e){super(e),this.config=e,this.outFlows=[];for(let e=0;e<this.config.numberOutputFlows;e++)this.outFlows.push(this._registerSignalOutput(`${e}`))}_execute(e){for(let s=0;s<this.config.numberOutputFlows;s++)this.outFlows[s]._activateSignal(e)}getClassName(){return se.ClassName}}se.ClassName="FGSequenceBlock",t(se.ClassName,se);const te=new RegExp(/\{(\w+)\}/g);class ae{constructor(e,s){this.path=e,this.ownerBlock=s,this.templatedInputs=[];let t=te.exec(e);for(;t;){const[,a]=t;this.templatedInputs.push(s.registerDataInput(a,O)),t=te.exec(e)}}getAccessor(e,s){let t=this.path;for(const e of this.templatedInputs){const a=e.getValue(s).value;t=t.replace(`{${e.name}}`,a.toString())}return e.convert(t)}}class ne extends M{constructor(e){super(e),this.config=e,this.value=this.registerDataOutput("value",y),this.templateComponent=new ae(e.path,this)}_updateOutputs(e){const s=this.templateComponent.getAccessor(this.config.pathConverter,e),t=s.info.get(s.object);this.value.setValue(t,e)}getClassName(){return ne.ClassName}serialize(e={}){super.serialize(e),e.config.path=this.config.path}}ne.ClassName="FGGetPropertyBlock",t(ne.ClassName,ne);class oe extends Q{constructor(e){super(e),this.config=e,this.a=this.registerDataInput("a",y),this.templateComponent=new ae(e.path,this)}_execute(e){const s=this.a.getValue(e),t=this.templateComponent.getAccessor(this.config.pathConverter,e);t.info.set(s,t.object),this.out._activateSignal(e)}serialize(e={}){super.serialize(e),e.config.path=this.config.path}getClassName(){return oe.ClassName}}oe.ClassName="FGSetPropertyBlock",t("FGSetPropertyBlock",oe);const re="cachedOperationValue",ie="cachedExecutionId";class ce extends M{constructor(e,s){super(s),this.value=this.registerDataOutput("value",e)}_updateOutputs(e){const s=e._getExecutionVariable(this,ie),t=e._getExecutionVariable(this,re);if(void 0!==t&&s===e.executionId)this.value.setValue(t,e);else{const s=this._doOperation(e);e._setExecutionVariable(this,re,s),e._setExecutionVariable(this,ie,e.executionId),this.value.setValue(s,e)}}}class le extends ce{constructor(e,s,t,a,n,o){super(t,o),this._operation=a,this._className=n,this.a=this.registerDataInput("a",e),this.b=this.registerDataInput("b",s)}_doOperation(e){return this._operation(this.a.getValue(e),this.b.getValue(e))}getClassName(){return this._className}}class ue extends ce{constructor(e,s,t,a){super(e,a),this._operation=s,this._className=t}_doOperation(e){return this._operation()}getClassName(){return this._className}}class he extends ce{constructor(e,s,t,a,n){super(s,n),this._operation=t,this._className=a,this.a=this.registerDataInput("a",e)}_doOperation(e){return this._operation(this.a.getValue(e))}getClassName(){return this._className}}class me extends ce{constructor(e,s,t,a,n,o,r){super(a,r),this._operation=n,this._className=o,this.a=this.registerDataInput("a",e),this.b=this.registerDataInput("b",s),this.c=this.registerDataInput("c",t)}_doOperation(e){return this._operation(this.a.getValue(e),this.b.getValue(e),this.c.getValue(e))}getClassName(){return this._className}}function pe(e){return e.getClassName?e.getClassName():""}function de(e,s){return"Vector2"===e&&"Vector2"===s||"Vector3"===e&&"Vector3"===s||"Vector4"===e&&"Vector4"===s}function Ce(e,s){return"Matrix"===e&&"Matrix"===s}function _e(e,s){return"FlowGraphInteger"===e&&"FlowGraphInteger"===s}class Ne extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicAdd(e,s)),Ne.ClassName,e)}_polymorphicAdd(e,s){const t=pe(e),a=pe(s);return de(t,a)||Ce(t,a)||_e(t,a)?e.add(s):e+s}}Ne.ClassName="FGAddBlock",t(Ne.ClassName,Ne);class ge extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicAdd(e,s)),ge.ClassName,e)}_polymorphicAdd(e,s){const t=pe(e),a=pe(s);return de(t,a)||_e(t,a)?e.subtract(s):Ce(t,a)?e.add(s.scale(-1)):e-s}}ge.ClassName="FGSubBlock",t(ge.ClassName,ge);class fe extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicMultiply(e,s)),fe.ClassName,e)}_polymorphicMultiply(e,s){const t=pe(e),a=pe(s);return de(t,a)||_e(t,a)?e.multiply(s):Ce(t,a)?r.FromValues(e.m[0]*s.m[0],e.m[4]*s.m[4],e.m[8]*s.m[8],e.m[12]*s.m[12],e.m[1]*s.m[1],e.m[5]*s.m[5],e.m[9]*s.m[9],e.m[13]*s.m[13],e.m[2]*s.m[2],e.m[6]*s.m[6],e.m[10]*s.m[10],e.m[14]*s.m[14],e.m[3]*s.m[3],e.m[7]*s.m[7],e.m[11]*s.m[11],e.m[15]*s.m[15]):e*s}}fe.ClassName="FGMultiplyBlock",t(fe.ClassName,fe);class ve extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicDivide(e,s)),ve.ClassName,e)}_polymorphicDivide(e,s){const t=pe(e),a=pe(s);return de(t,a)||_e(t,a)?e.divide(s):Ce(t,a)?r.FromValues(e.m[0]/s.m[0],e.m[4]/s.m[4],e.m[8]/s.m[8],e.m[12]/s.m[12],e.m[1]/s.m[1],e.m[5]/s.m[5],e.m[9]/s.m[9],e.m[13]/s.m[13],e.m[2]/s.m[2],e.m[6]/s.m[6],e.m[10]/s.m[10],e.m[14]/s.m[14],e.m[3]/s.m[3],e.m[7]/s.m[7],e.m[11]/s.m[11],e.m[15]/s.m[15]):e/s}}ve.ClassName="FGDivideBlock",t(ve.ClassName,ve);class xe extends ue{constructor(e){super(w,(()=>Math.random()),xe.ClassName,e)}}xe.ClassName="FGRandomBlock",t(xe.ClassName,xe);class be extends le{constructor(e){super(y,y,w,((e,s)=>this._polymorphicDot(e,s)),be.ClassName,e)}_polymorphicDot(e,s){switch(pe(e)){case"Vector2":return a.Dot(e,s);case"Vector3":return n.Dot(e,s);case"Vector4":return o.Dot(e,s);default:throw new Error(`Cannot get dot product of ${e} and ${s}`)}}}be.ClassName="FGDotBlock",t(be.ClassName,be);class ye extends ue{constructor(e){super(w,(()=>Math.E),ye.ClassName,e)}}ye.ClassName="FGEBlock",t(ye.ClassName,ye);class we extends ue{constructor(e){super(w,(()=>Math.PI),we.ClassName,e)}}we.ClassName="FGPIBlock",t(we.ClassName,we);class ke extends ue{constructor(e){super(w,(()=>Number.POSITIVE_INFINITY),ke.ClassName,e)}}ke.ClassName="FGInfBlock",t(ke.ClassName,ke);class Ie extends ue{constructor(e){super(w,(()=>Number.NaN),Ie.ClassName,e)}}function Be(e,s){switch(pe(e)){case"FlowGraphInteger":return new x(s(e.value));case"Vector2":return new a(s(e.x),s(e.y));case"Vector3":return new n(s(e.x),s(e.y),s(e.z));case"Vector4":return new o(s(e.x),s(e.y),s(e.z),s(e.w));case"Matrix":return r.FromValues(s(e.m[0]),s(e.m[4]),s(e.m[8]),s(e.m[12]),s(e.m[1]),s(e.m[5]),s(e.m[9]),s(e.m[13]),s(e.m[2]),s(e.m[6]),s(e.m[10]),s(e.m[14]),s(e.m[3]),s(e.m[7]),s(e.m[11]),s(e.m[15]));default:return s(e)}}Ie.ClassName="FGNaNBlock",t(Ie.ClassName,Ie);class Ve extends he{constructor(e){super(y,y,(e=>this._polymorphicAbs(e)),Ve.ClassName,e)}_polymorphicAbs(e){return Be(e,Math.abs)}}Ve.ClassName="FGAbsBlock",t(Ve.ClassName,Ve);class Oe extends he{constructor(e){super(y,y,(e=>this._polymorphicSign(e)),Oe.ClassName,e)}_polymorphicSign(e){return Be(e,Math.sign)}}Oe.ClassName="FGSignBlock",t(Oe.ClassName,Oe);class Ge extends he{constructor(e){super(y,y,(e=>this._polymorphicTrunc(e)),Ge.ClassName,e)}_polymorphicTrunc(e){return Be(e,Math.trunc)}}Ge.ClassName="FGTruncBlock",t(Ge.ClassName,Ge);class Fe extends he{constructor(e){super(y,y,(e=>this._polymorphicFloor(e)),Fe.ClassName,e)}_polymorphicFloor(e){return Be(e,Math.floor)}}Fe.ClassName="FGFloorBlock",t(Fe.ClassName,Fe);class Ee extends he{constructor(e){super(y,y,(e=>this._polymorphicCeiling(e)),Ee.ClassName,e)}_polymorphicCeiling(e){return Be(e,Math.ceil)}}Ee.ClassName="FGCeilBlock",t(Ee.ClassName,Ee);class Te extends he{constructor(e){super(y,y,(e=>this._polymorphicFract(e)),Te.ClassName,e)}_polymorphicFract(e){return Be(e,(e=>e-Math.floor(e)))}}Te.ClassName="FGFractBlock",t(Te.ClassName,Te);class Pe extends he{constructor(e){super(y,y,(e=>this._polymorphicNeg(e)),Pe.ClassName,e)}_polymorphicNeg(e){return Be(e,(e=>-e))}}function Me(e,s,t){switch(pe(e)){case"FlowGraphInteger":return new x(t(e.value,s.value));case"Vector2":return new a(t(e.x,s.x),t(e.y,s.y));case"Vector3":return new n(t(e.x,s.x),t(e.y,s.y),t(e.z,s.z));case"Vector4":return new o(t(e.x,s.x),t(e.y,s.y),t(e.z,s.z),t(e.w,s.w));case"Matrix":return r.FromValues(t(e.m[0],s.m[0]),t(e.m[4],s.m[4]),t(e.m[8],s.m[8]),t(e.m[12],s.m[12]),t(e.m[1],s.m[1]),t(e.m[5],s.m[5]),t(e.m[9],s.m[9]),t(e.m[13],s.m[13]),t(e.m[2],s.m[2]),t(e.m[6],s.m[6]),t(e.m[10],s.m[10]),t(e.m[14],s.m[14]),t(e.m[3],s.m[3]),t(e.m[7],s.m[7]),t(e.m[11],s.m[11]),t(e.m[15],s.m[15]));default:return t(e,s)}}Pe.ClassName="FGNegBlock",t(Pe.ClassName,Pe);class Se extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicRemainder(e,s)),Se.ClassName,e)}_polymorphicRemainder(e,s){return Me(e,s,((e,s)=>e%s))}}Se.ClassName="FGRemainderBlock",t(Se.ClassName,Se);class De extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicMin(e,s)),De.ClassName,e)}_polymorphicMin(e,s){return Me(e,s,Math.min)}}De.ClassName="FGMinBlock",t(De.ClassName,De);class qe extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicMax(e,s)),qe.ClassName,e)}_polymorphicMax(e,s){return Me(e,s,Math.max)}}function ze(e,s,t){return Math.min(Math.max(e,Math.min(s,t)),Math.max(s,t))}function Re(e,s,t,i){switch(pe(e)){case"FlowGraphInteger":return new x(i(e.value,s.value,t.value));case"Vector2":return new a(i(e.x,s.x,t.x),i(e.y,s.y,t.y));case"Vector3":return new n(i(e.x,s.x,t.x),i(e.y,s.y,t.y),i(e.z,s.z,t.z));case"Vector4":return new o(i(e.x,s.x,t.x),i(e.y,s.y,t.y),i(e.z,s.z,t.z),i(e.w,s.w,t.w));case"Matrix":return r.FromValues(i(e.m[0],s.m[0],t.m[0]),i(e.m[4],s.m[4],t.m[4]),i(e.m[8],s.m[8],t.m[8]),i(e.m[12],s.m[12],t.m[12]),i(e.m[1],s.m[1],t.m[1]),i(e.m[5],s.m[5],t.m[5]),i(e.m[9],s.m[9],t.m[9]),i(e.m[13],s.m[13],t.m[13]),i(e.m[2],s.m[2],t.m[2]),i(e.m[6],s.m[6],t.m[6]),i(e.m[10],s.m[10],t.m[10]),i(e.m[14],s.m[14],t.m[14]),i(e.m[3],s.m[3],t.m[3]),i(e.m[7],s.m[7],t.m[7]),i(e.m[11],s.m[11],t.m[11]),i(e.m[15],s.m[15],t.m[15]));default:return i(e,s,t)}}qe.ClassName="FGMaxBlock",t(qe.ClassName,qe);class Ae extends me{constructor(e){super(y,y,y,y,((e,s,t)=>this._polymorphicClamp(e,s,t)),Ae.ClassName,e)}_polymorphicClamp(e,s,t){return Re(e,s,t,ze)}}function $e(e){return Math.min(Math.max(e,0),1)}Ae.ClassName="FGClampBlock",t(Ae.ClassName,Ae);class Le extends he{constructor(e){super(y,y,(e=>this._polymorphicSaturate(e)),Le.ClassName,e)}_polymorphicSaturate(e){return Be(e,$e)}}Le.ClassName="FGSaturateBlock",t(Le.ClassName,Le);class Ue extends me{constructor(e){super(y,y,y,y,((e,s,t)=>this._polymorphicInterpolate(e,s,t)),Ue.ClassName,e)}_interpolate(e,s,t){return(1-t)*e+t*s}_polymorphicInterpolate(e,s,t){return Re(e,s,t,this._interpolate)}}Ue.ClassName="FGInterpolateBlock",t(Ue.ClassName,Ue);class Ke extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicEq(e,s)),Ke.ClassName,e)}_polymorphicEq(e,s){const t=pe(e),a=pe(s);return de(t,a)||Ce(t,a)||_e(t,a)?e.equals(s):e===s}}function He(e,s,t){const a=pe(e);if(a===pe(s)){if(""===a)return t(e,s);if("FlowGraphInteger"===a)return t(e.value,s.value);throw new Error(`Cannot compare ${e} and ${s}`)}throw new Error(`${e} and ${s} are of different types.`)}Ke.ClassName="FGEqBlock",t(Ke.ClassName,Ke);class je extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicLessThan(e,s)),je.ClassName,e)}_polymorphicLessThan(e,s){return He(e,s,((e,s)=>e<s))}}je.ClassName="FGLessThanBlock",t(je.ClassName,je);class Ze extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicLessThanOrEqual(e,s)),Ze.ClassName,e)}_polymorphicLessThanOrEqual(e,s){return He(e,s,((e,s)=>e<=s))}}Ze.ClassName="FGLessThanOrEqualBlock";class Qe extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicGreaterThan(e,s)),Qe.ClassName,e)}_polymorphicGreaterThan(e,s){return He(e,s,((e,s)=>e>s))}}Qe.ClassName="FGGreaterThanBlock",t(Qe.ClassName,Qe);class We extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicGreaterThanOrEqual(e,s)),We.ClassName,e)}_polymorphicGreaterThanOrEqual(e,s){return He(e,s,((e,s)=>e>=s))}}We.ClassName="FGGreaterThanOrEqualBlock",t(We.ClassName,We);class Xe extends he{constructor(e){super(y,k,(e=>this._polymorphicIsNan(e)),Xe.ClassName,e)}_polymorphicIsNan(e){const s=pe(e);if(""===s)return isNaN(e);if("FlowGraphInteger"===s)return isNaN(e.value);throw new Error(`Cannot get NaN of ${e}`)}}Xe.ClassName="FGIsNanBlock",t(Xe.ClassName,Xe);class Ye extends he{constructor(e){super(y,k,(e=>this._polymorphicIsInf(e)),Ye.ClassName,e)}_polymorphicIsInf(e){const s=pe(e);if(""===s)return!isFinite(e);if("FlowGraphInteger"===s)return!isFinite(e.value);throw new Error(`Cannot get isInf of ${e}`)}}Ye.ClassName="FGIsInfBlock";class Je extends he{constructor(e){super(y,y,(e=>this._polymorphicDegToRad(e)),Je.ClassName,e)}_degToRad(e){return e*Math.PI/180}_polymorphicDegToRad(e){return Be(e,this._degToRad)}}Je.ClassName="FGDegToRadBlock",t(Je.ClassName,Je);class es extends he{constructor(e){super(y,y,(e=>this._polymorphicRadToDeg(e)),es.ClassName,e)}_radToDeg(e){return 180*e/Math.PI}_polymorphicRadToDeg(e){return Be(e,this._radToDeg)}}es.ClassName="FGRadToDegBlock",t(es.ClassName,es);class ss extends he{constructor(e){super(y,y,(e=>this._polymorphicSin(e)),ss.ClassName,e)}_polymorphicSin(e){return Be(e,Math.sin)}}ss.ClassName="FGSinBlock",t(ss.ClassName,ss);class ts extends he{constructor(e){super(y,y,(e=>this._polymorphicCos(e)),ts.ClassName,e)}_polymorphicCos(e){return Be(e,Math.cos)}}ts.ClassName="FGCosBlock",t(ts.ClassName,ts);class as extends he{constructor(e){super(y,y,(e=>this._polymorphicTan(e)),as.ClassName,e)}_polymorphicTan(e){return Be(e,Math.tan)}}as.ClassName="FGTanBlock",t(as.ClassName,as);class ns extends he{constructor(e){super(y,y,(e=>this._polymorphicAsin(e)),ns.ClassName,e)}_polymorphicAsin(e){return Be(e,Math.asin)}}ns.ClassName="FGAsinBlock",t(ns.ClassName,ns);class os extends he{constructor(e){super(y,y,(e=>this._polymorphicAcos(e)),os.ClassName,e)}_polymorphicAcos(e){return Be(e,Math.acos)}}os.ClassName="FGAcosBlock",t(os.ClassName,os);class rs extends he{constructor(e){super(y,y,(e=>this._polymorphicAtan(e)),rs.ClassName,e)}_polymorphicAtan(e){return Be(e,Math.atan)}}rs.ClassName="FGAtanBlock",t(rs.ClassName,rs);class is extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicAtan2(e,s)),is.ClassName,e)}_polymorphicAtan2(e,s){return Me(e,s,Math.atan2)}}is.ClassName="FGAtan2Block",t(is.ClassName,is);class cs extends he{constructor(e){super(y,y,(e=>this._polymorphicSinh(e)),cs.ClassName,e)}_polymorphicSinh(e){return Be(e,Math.sinh)}}cs.ClassName="FGSinhBlock",t(cs.ClassName,cs);class ls extends he{constructor(e){super(y,y,(e=>this._polymorphicCosh(e)),ls.ClassName,e)}_polymorphicCosh(e){return Be(e,Math.cosh)}}ls.ClassName="FGCoshBlock",t(ls.ClassName,ls);class us extends he{constructor(e){super(y,y,(e=>this._polymorphicTanh(e)),us.ClassName,e)}_polymorphicTanh(e){return Be(e,Math.tanh)}}us.ClassName="FGTanhBlock",t(us.ClassName,us);class hs extends he{constructor(e){super(y,w,(e=>this._polymorphicAsinh(e)),hs.ClassName,e)}_polymorphicAsinh(e){return Be(e,Math.asinh)}}hs.ClassName="FGAsinhBlock",t(hs.ClassName,hs);class ms extends he{constructor(e){super(y,w,(e=>this._polymorphicAcosh(e)),ms.ClassName,e)}_polymorphicAcosh(e){return Be(e,Math.acosh)}}ms.ClassName="FGAcoshBlock",t(ms.ClassName,ms);class ps extends he{constructor(e){super(y,w,(e=>this._polymorphicAtanh(e)),ps.ClassName,e)}_polymorphicAtanh(e){return Be(e,Math.atanh)}}ps.ClassName="FGAtanhBlock",t(ps.ClassName,ps);class ds extends he{constructor(e){super(y,w,(e=>this._polymorphicExp(e)),ds.ClassName,e)}_polymorphicExp(e){return Be(e,Math.exp)}}ds.ClassName="FGExpBlock",t(ds.ClassName,ds);class Cs extends he{constructor(e){super(y,w,(e=>this._polymorphicLog(e)),Cs.ClassName,e)}_polymorphicLog(e){return Be(e,Math.log)}}Cs.ClassName="FGLogBlock",t(Cs.ClassName,Cs);class _s extends he{constructor(e){super(y,w,(e=>this._polymorphicLog2(e)),_s.ClassName,e)}_polymorphicLog2(e){return Be(e,Math.log2)}}_s.ClassName="FGLog2Block",t(_s.ClassName,_s);class Ns extends he{constructor(e){super(y,w,(e=>this._polymorphicLog10(e)),Ns.ClassName,e)}_polymorphicLog10(e){return Be(e,Math.log10)}}Ns.ClassName="FGLog10Block",t(Ns.ClassName,Ns);class gs extends he{constructor(e){super(y,w,(e=>this._polymorphicSqrt(e)),gs.ClassName,e)}_polymorphicSqrt(e){return Be(e,Math.sqrt)}}gs.ClassName="FGSqrtBlock",t(gs.ClassName,gs);class fs extends he{constructor(e){super(y,w,(e=>this._polymorphicCubeRoot(e)),fs.ClassName,e)}_polymorphicCubeRoot(e){return Be(e,Math.cbrt)}}fs.ClassName="FGCubeRootBlock",t(fs.ClassName,fs);class vs extends le{constructor(e){super(y,w,w,((e,s)=>this._polymorphicPow(e,s)),vs.ClassName,e)}_polymorphicPow(e,s){return Me(e,s,Math.pow)}}vs.ClassName="FGPowBlock",t(vs.ClassName,vs);class xs extends he{constructor(e){super(y,w,(e=>this._polymorphicLength(e)),xs.ClassName,e)}_polymorphicLength(e){switch(pe(e)){case"Vector2":case"Vector3":case"Vector4":return e.length();default:throw new Error(`Cannot compute length of value ${e}`)}}}xs.ClassName="FGLengthBlock",t(xs.ClassName,xs);class bs extends he{constructor(e){super(y,y,(e=>this._polymorphicNormalize(e)),bs.ClassName,e)}_polymorphicNormalize(e){switch(pe(e)){case"Vector2":case"Vector3":case"Vector4":return e.normalize();default:throw new Error(`Cannot normalize value ${e}`)}}}bs.ClassName="FGNormalizeBlock",t(bs.ClassName,bs);class ys extends le{constructor(e){super(B,B,B,((e,s)=>n.Cross(e,s)),ys.ClassName,e)}}ys.ClassName="FGCrossBlock",t(ys.ClassName,ys);class ws extends le{constructor(e){super(I,w,I,((e,s)=>a.Transform(e,r.RotationZ(s))),ws.ClassName,e)}}ws.ClassName="FGRotate2DBlock",t(ws.ClassName,ws);class ks extends me{constructor(e){super(B,B,w,B,((e,s,t)=>n.TransformCoordinates(e,r.RotationAxis(s,t))),ks.ClassName,e)}}ks.ClassName="FGRotate3DBlock",t(ks.ClassName,ks);class Is extends he{constructor(e){super(V,V,(e=>r.Transpose(e)),Is.ClassName,e)}}Is.ClassName="FGTransposeBlock",t(Is.ClassName,Is);class Bs extends he{constructor(e){super(V,w,(e=>e.determinant()),Bs.ClassName,e)}}Bs.ClassName="FGDeterminantBlock",t(Bs.ClassName,Bs);class Vs extends he{constructor(e){super(V,V,(e=>r.Invert(e)),Vs.ClassName,e)}}Vs.ClassName="FGInvertMatrixBlock",t(Vs.ClassName,Vs);class Os extends le{constructor(e){super(V,V,V,((e,s)=>s.multiply(e)),Os.ClassName,e)}}Os.ClassName="FGMatMulBlock",t(Os.ClassName,Os);class Gs extends he{constructor(e){super(O,O,(e=>new x(~e.value)),Gs.ClassName,e)}}Gs.ClassName="FGBitwiseNotBlock",t(Gs.ClassName,Gs);class Fs extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value&s.value)),Fs.ClassName,e)}}Fs.ClassName="FGBitwiseAndBlock",t(Fs.ClassName,Fs);class Es extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value|s.value)),Es.ClassName,e)}}Es.ClassName="FGBitwiseOrBlock",t(Es.ClassName,Es);class Ts extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value^s.value)),Ts.ClassName,e)}}Ts.ClassName="FGBitwiseXorBlock",t(Ts.ClassName,Ts);class Ps extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value<<s.value)),Ps.ClassName,e)}}Ps.ClassName="FGBitwiseLeftShiftBlock",t(Ps.ClassName,Ps);class Ms extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value>>s.value)),Ms.ClassName,e)}}Ms.ClassName="FGBitwiseRightShiftBlock",t(Ms.ClassName,Ms);class Ss extends he{constructor(e){super(O,O,(e=>new x(Math.clz32(e.value))),Ss.ClassName,e)}}Ss.ClassName="FGCountLeadingZerosBlock",t(Ss.ClassName,Ss);class Ds extends he{constructor(e){super(O,O,(e=>new x(e.value?31-Math.clz32(e.value&-e.value):32)),Ds.ClassName,e)}}Ds.ClassName="FGCountTrailingZerosBlock",t(Ds.ClassName,Ds);class qs extends he{constructor(e){super(O,O,(e=>new x(function(e){let s=0;for(;e;)s+=1&e,e>>=1;return s}(e.value))),qs.ClassName,e)}}qs.ClassName="FGCountOneBitsBlock",t(qs.ClassName,qs);class zs extends Q{constructor(e={startIndex:new x(0)}){super(e),this.config=e,this.reset=this._registerSignalInput("reset"),this.n=this.registerDataInput("n",O),this.value=this.registerDataOutput("value",O)}_execute(e,s){if(s===this.reset)this.value.setValue(this.config.startIndex,e);else{const s=this.value.getValue(e);s.value<this.n.getValue(e).value&&(this.value.setValue(new x(s.value+1),e),this.out._activateSignal(e))}}getClassName(){return zs.ClassName}}zs.ClassName="FGDoNBlock",t(zs.ClassName,zs);class Rs extends M{constructor(e){super(e),this.config=e,this.output=this.registerDataOutput(e.variableName,y)}_updateOutputs(e){const s=this.config.variableName;e.hasVariable(s)&&this.output.setValue(e.getVariable(s),e)}getClassName(){return Rs.ClassName}serialize(e){super.serialize(e),e.config.variableName=this.config.variableName}}Rs.ClassName="FGGetVariableBlock",t(Rs.ClassName,Rs);class As extends Q{constructor(e){super(e),this.config=e,this.input=this.registerDataInput(e.variableName,y)}_execute(e){const s=this.config.variableName,t=this.input.getValue(e);e.setVariable(s,t),this.out._activateSignal(e)}getClassName(){return As.ClassName}}As.ClassName="FGSetVariableBlock",t(As.ClassName,As);class $s extends Q{constructor(e){super(e),this.config=e,this.condition=this.registerDataInput("condition",k),this.loopBody=this._registerSignalOutput("loopBody")}_execute(e,s){let t=this.condition.getValue(e);for(this.config?.isDo&&!t&&this.loopBody._activateSignal(e);t;)this.loopBody._activateSignal(e),t=this.condition.getValue(e);this.out._activateSignal(e)}getClassName(){return $s.ClassName}serialize(e){super.serialize(e),e.isDo=this.config?.isDo}}$s.ClassName="FGWhileLoopBlock",t($s.ClassName,$s);const Ls={"lifecycle/onStart":j.ClassName,"lifecycle/onTick":Z.ClassName,log:W.ClassName,"flow/delay":Y.ClassName,"customEvent/send":J.ClassName,"customEvent/receive":ee.ClassName,"flow/sequence":se.ClassName,"world/get":ne.ClassName,"world/set":oe.ClassName,"flow/doN":zs.ClassName,"variable/get":Rs.ClassName,"variable/set":As.ClassName,"flow/whileLoop":$s.ClassName,"math/random":xe.ClassName,"math/e":ye.ClassName,"math/pi":we.ClassName,"math/inf":ke.ClassName,"math/nan":Ie.ClassName,"math/abs":Ve.ClassName,"math/sign":Oe.ClassName,"math/trunc":Ge.ClassName,"math/floor":Fe.ClassName,"math/ceil":Ee.ClassName,"math/fract":Te.ClassName,"math/neg":Pe.ClassName,"math/add":Ne.ClassName,"math/sub":ge.ClassName,"math/mul":fe.ClassName,"math/div":ve.ClassName,"math/rem":Se.ClassName,"math/min":De.ClassName,"math/max":qe.ClassName,"math/clamp":Ae.ClassName,"math/saturate":Le.ClassName,"math/mix":Ue.ClassName,"math/eq":Ke.ClassName,"math/lt":je.ClassName,"math/le":Ze.ClassName,"math/gt":Qe.ClassName,"math/ge":We.ClassName,"math/isnan":Xe.ClassName,"math/isinf":Ye.ClassName,"math/rad":Je.ClassName,"math/deg":es.ClassName,"math/sin":ss.ClassName,"math/cos":ts.ClassName,"math/tan":as.ClassName,"math/asin":ns.ClassName,"math/acos":os.ClassName,"math/atan":rs.ClassName,"math/atan2":is.ClassName,"math/sinh":cs.ClassName,"math/cosh":ls.ClassName,"math/tanh":us.ClassName,"math/asinh":hs.ClassName,"math/acosh":ms.ClassName,"math/atanh":ps.ClassName,"math/exp":ds.ClassName,"math/log":Cs.ClassName,"math/log2":_s.ClassName,"math/log10":Ns.ClassName,"math/sqrt":gs.ClassName,"math/cbrt":fs.ClassName,"math/pow":vs.ClassName,"math/length":xs.ClassName,"math/normalize":bs.ClassName,"math/dot":be.ClassName,"math/cross":ys.ClassName,"math/rotate2d":ws.ClassName,"math/rotate3d":ks.ClassName,"math/transpose":Is.ClassName,"math/determinant":Bs.ClassName,"math/inverse":Vs.ClassName,"math/matmul":Os.ClassName,"math/not":Gs.ClassName,"math/and":Fs.ClassName,"math/or":Es.ClassName,"math/xor":Ts.ClassName,"math/asr":Ms.ClassName,"math/lsl":Ps.ClassName,"math/clz":Ss.ClassName,"math/ctz":Ds.ClassName,"math/popcnt":qs.ClassName},Us={float2:"Vector2",float3:"Vector3",float4:"Vector4",float4x4:"Matrix",int:"FlowGraphInteger"};function Ks(e,s,t){if(void 0!==e.type){const a=s.types&&s.types[e.type];if(!a)throw new Error(`${t}: Unknown type: ${e.type}`);const n=a.signature;if(!n)throw new Error(`${t}: Type ${e.type} has no signature`);const o=Us[n];return{value:e.value,className:o}}return e.value}function Hs(e,s,t){const a=Ls[s.type];if(!a)throw new Error(`/extensions/KHR_interactivity/nodes/${e}: Unknown block type: ${s.type}`);const n=e.toString(),o=function(e,s,t){const a={},n=e.configuration??[];for(const e of n)if("customEvent"===e.id){const n=s.customEvents&&s.customEvents[e.value];if(!n)throw new Error(`/extensions/KHR_interactivity/nodes/${t}: Unknown custom event: ${e.value}`);a.eventId=n.id,a.eventData=n.values.map((e=>e.id))}else if("variable"===e.id){const n=s.variables&&s.variables[e.value];if(!n)throw new Error(`/extensions/KHR_interactivity/nodes/${t}: Unknown variable: ${e.value}`);a.variableName=n.id}else if("path"===e.id){const s=e.value;a.path=s}else a[e.id]=Ks(e,s,`/extensions/KHR_interactivity/nodes/${t}`);return a}(s,t,n);return{className:a,config:o,uniqueId:n,metadata:s.metadata,dataInputs:[],dataOutputs:[],signalInputs:[],signalOutputs:[]}}class js extends g{constructor(e){super(e,Zs)}}const Zs={nodes:{__array__:{__target__:!0,translation:{type:"Vector3",get:e=>e._babylonTransformNode.position,set:(e,s)=>{s._babylonTransformNode.position=e},getObject:e=>e._babylonTransformNode}}}},Qs="KHR_interactivity";class Ws{constructor(e){this._loader=e,this.name=Qs,this.enabled=this._loader.isExtensionUsed(Qs),this._pathConverter=new js(this._loader.gltf)}dispose(){this._loader=null,delete this._pathConverter}onReady(){if(!this._loader.babylonScene||!this._pathConverter)return;const s=this._loader.babylonScene,t=this._loader.gltf.extensions?.KHR_interactivity,a=function(s){const t={uniqueId:e(),_userVariables:{},_connectionValues:{}},a=[t],n=[];for(let e=0;e<s.nodes.length;e++){const t=Hs(e,s.nodes[e],s);n.push(t)}for(let a=0;a<s.nodes.length;a++){const o=s.nodes[a],r=n[a],i=o.flows??[];for(const s of i){const t=s.id,o={uniqueId:e(),name:t,_connectionType:1,connectedPointIds:[]};r.signalOutputs.push(o);const i=s.node,c=s.socket,l=n[i];if(!l)throw new Error(`/extensions/KHR_interactivity/nodes/${a}: Could not find node with id ${i} that connects its input with with node ${a}'s output ${t}`);let u=l.signalInputs.find((e=>e.name===c));u||(u={uniqueId:e(),name:c,_connectionType:0,connectedPointIds:[]},l.signalInputs.push(u)),u.connectedPointIds.push(o.uniqueId),o.connectedPointIds.push(u.uniqueId)}const c=o.values??[];for(const o of c){const i=o.id,c={uniqueId:e(),name:i,_connectionType:0,connectedPointIds:[]};if(r.dataInputs.push(c),void 0!==o.value){const e=Ks(o,s,`/extensions/KHR_interactivity/nodes/${a}`);t._connectionValues[c.uniqueId]=e}else{if(void 0===o.node||void 0===o.socket)throw new Error(`/extensions/KHR_interactivity/nodes/${a}: Invalid socket ${i} in node ${a}`);{const s=o.node,t=o.socket,r=n[s];if(!r)throw new Error(`/extensions/KHR_interactivity/nodes/${a}: Could not find node with id ${s} that connects its output with node${a}'s input ${i}`);let l=r.dataOutputs.find((e=>e.name===t));l||(l={uniqueId:e(),name:t,_connectionType:1,connectedPointIds:[]},r.dataOutputs.push(l)),c.connectedPointIds.push(l.uniqueId),l.connectedPointIds.push(c.uniqueId)}}}}const o=s.variables??[];for(let e=0;e<o.length;e++){const a=o[e],n=a.id;t._userVariables[n]=Ks(a,s,`/extensions/KHR_interactivity/variables/${e}`)}return{allBlocks:n,executionContexts:a}}(t),n=new H({scene:s});K.Parse(a,{coordinator:n,pathConverter:this._pathConverter}),n.start()}}_(Qs),N(Qs,!0,(e=>new Ws(e)));export{Ws as KHR_interactivity};
2
- //# sourceMappingURL=KHR_interactivity-C_ndoQHo.esm.min.js.map