@needle-tools/engine 4.4.1 → 4.4.3-beta

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 (1046) hide show
  1. package/CHANGELOG.md +3678 -3667
  2. package/LICENSE.md +10 -10
  3. package/README.md +64 -64
  4. package/components.needle.json +1 -1
  5. package/dist/needle-engine.bundle.js +364 -237
  6. package/dist/needle-engine.bundle.light.js +364 -237
  7. package/dist/needle-engine.bundle.light.min.js +6 -6
  8. package/dist/needle-engine.bundle.light.umd.cjs +6 -6
  9. package/dist/needle-engine.bundle.min.js +6 -6
  10. package/dist/needle-engine.bundle.umd.cjs +56 -56
  11. package/dist/needle-engine.d.ts +130 -129
  12. package/dist/needle-engine.light.d.ts +130 -129
  13. package/lib/asap/needle-asap.d.ts +1 -1
  14. package/lib/asap/needle-asap.js +95 -95
  15. package/lib/asap/sessiongranted.d.ts +3 -3
  16. package/lib/asap/sessiongranted.js +65 -65
  17. package/lib/asap/utils.d.ts +1 -1
  18. package/lib/asap/utils.js +3 -3
  19. package/lib/engine/analytics/index.d.ts +6 -6
  20. package/lib/engine/analytics/index.js +12 -12
  21. package/lib/engine/analytics/lcp.d.ts +3 -3
  22. package/lib/engine/analytics/lcp.js +34 -34
  23. package/lib/engine/api.d.ts +81 -81
  24. package/lib/engine/api.js +80 -80
  25. package/lib/engine/assets/index.d.ts +11 -11
  26. package/lib/engine/assets/index.js +47 -47
  27. package/lib/engine/assets/static.d.ts +1 -1
  28. package/lib/engine/assets/static.js +4 -4
  29. package/lib/engine/codegen/register_types.d.ts +1 -1
  30. package/lib/engine/codegen/register_types.js +300 -300
  31. package/lib/engine/debug/debug.d.ts +15 -15
  32. package/lib/engine/debug/debug.js +44 -44
  33. package/lib/engine/debug/debug_console.d.ts +2 -2
  34. package/lib/engine/debug/debug_console.js +307 -307
  35. package/lib/engine/debug/debug_overlay.d.ts +22 -22
  36. package/lib/engine/debug/debug_overlay.js +316 -316
  37. package/lib/engine/debug/debug_spatial_console.d.ts +2 -2
  38. package/lib/engine/debug/debug_spatial_console.js +390 -390
  39. package/lib/engine/debug/index.d.ts +2 -2
  40. package/lib/engine/debug/index.js +2 -2
  41. package/lib/engine/engine_addressables.d.ts +166 -166
  42. package/lib/engine/engine_addressables.js +608 -608
  43. package/lib/engine/engine_animation.d.ts +43 -43
  44. package/lib/engine/engine_animation.js +133 -133
  45. package/lib/engine/engine_application.d.ts +40 -40
  46. package/lib/engine/engine_application.js +104 -104
  47. package/lib/engine/engine_assetdatabase.d.ts +25 -25
  48. package/lib/engine/engine_assetdatabase.js +344 -344
  49. package/lib/engine/engine_audio.d.ts +4 -4
  50. package/lib/engine/engine_audio.js +23 -23
  51. package/lib/engine/engine_camera.d.ts +13 -13
  52. package/lib/engine/engine_camera.js +30 -30
  53. package/lib/engine/engine_components.d.ts +110 -110
  54. package/lib/engine/engine_components.js +382 -382
  55. package/lib/engine/engine_components_internal.d.ts +9 -9
  56. package/lib/engine/engine_components_internal.js +36 -36
  57. package/lib/engine/engine_constants.d.ts +10 -10
  58. package/lib/engine/engine_constants.js +41 -41
  59. package/lib/engine/engine_context.d.ts +472 -354
  60. package/lib/engine/engine_context.js +1653 -1536
  61. package/lib/engine/engine_context.js.map +1 -1
  62. package/lib/engine/engine_context_registry.d.ts +71 -71
  63. package/lib/engine/engine_context_registry.js +117 -117
  64. package/lib/engine/engine_coroutine.d.ts +35 -35
  65. package/lib/engine/engine_coroutine.js +52 -52
  66. package/lib/engine/engine_create_objects.d.ts +118 -118
  67. package/lib/engine/engine_create_objects.js +308 -308
  68. package/lib/engine/engine_default_parameters.d.ts +2 -2
  69. package/lib/engine/engine_default_parameters.js +3 -3
  70. package/lib/engine/engine_editor-sync.d.ts +21 -21
  71. package/lib/engine/engine_editor-sync.js +4 -4
  72. package/lib/engine/engine_element.d.ts +113 -113
  73. package/lib/engine/engine_element.js +832 -832
  74. package/lib/engine/engine_element_attributes.d.ts +72 -72
  75. package/lib/engine/engine_element_attributes.js +1 -1
  76. package/lib/engine/engine_element_extras.d.ts +6 -6
  77. package/lib/engine/engine_element_extras.js +13 -13
  78. package/lib/engine/engine_element_loading.d.ts +44 -44
  79. package/lib/engine/engine_element_loading.js +349 -349
  80. package/lib/engine/engine_element_overlay.d.ts +21 -21
  81. package/lib/engine/engine_element_overlay.js +166 -166
  82. package/lib/engine/engine_fileloader.d.ts +2 -2
  83. package/lib/engine/engine_fileloader.js +8 -8
  84. package/lib/engine/engine_gameobject.d.ts +68 -68
  85. package/lib/engine/engine_gameobject.js +596 -596
  86. package/lib/engine/engine_generic_utils.d.ts +1 -1
  87. package/lib/engine/engine_generic_utils.js +13 -13
  88. package/lib/engine/engine_gizmos.d.ts +149 -149
  89. package/lib/engine/engine_gizmos.js +530 -530
  90. package/lib/engine/engine_gltf.d.ts +12 -12
  91. package/lib/engine/engine_gltf.js +15 -15
  92. package/lib/engine/engine_gltf_builtin_components.d.ts +7 -7
  93. package/lib/engine/engine_gltf_builtin_components.js +341 -341
  94. package/lib/engine/engine_hot_reload.d.ts +7 -7
  95. package/lib/engine/engine_hot_reload.js +184 -184
  96. package/lib/engine/engine_input.d.ts +362 -352
  97. package/lib/engine/engine_input.js +1294 -1265
  98. package/lib/engine/engine_input.js.map +1 -1
  99. package/lib/engine/engine_input_utils.d.ts +2 -2
  100. package/lib/engine/engine_input_utils.js +22 -22
  101. package/lib/engine/engine_instancing.d.ts +19 -19
  102. package/lib/engine/engine_instancing.js +39 -39
  103. package/lib/engine/engine_license.d.ts +11 -11
  104. package/lib/engine/engine_license.js +361 -361
  105. package/lib/engine/engine_license.js.map +1 -1
  106. package/lib/engine/engine_lifecycle_api.d.ts +76 -76
  107. package/lib/engine/engine_lifecycle_api.js +99 -99
  108. package/lib/engine/engine_lifecycle_functions_internal.d.ts +32 -32
  109. package/lib/engine/engine_lifecycle_functions_internal.js +146 -146
  110. package/lib/engine/engine_lightdata.d.ts +23 -23
  111. package/lib/engine/engine_lightdata.js +91 -91
  112. package/lib/engine/engine_loaders.d.ts +13 -13
  113. package/lib/engine/engine_loaders.js +62 -62
  114. package/lib/engine/engine_lods.d.ts +31 -31
  115. package/lib/engine/engine_lods.js +146 -146
  116. package/lib/engine/engine_mainloop_utils.d.ts +32 -32
  117. package/lib/engine/engine_mainloop_utils.js +466 -466
  118. package/lib/engine/engine_math.d.ts +114 -114
  119. package/lib/engine/engine_math.js +247 -247
  120. package/lib/engine/engine_modules.d.ts +36 -36
  121. package/lib/engine/engine_modules.js +85 -85
  122. package/lib/engine/engine_networking.d.ts +252 -252
  123. package/lib/engine/engine_networking.js +743 -743
  124. package/lib/engine/engine_networking_auto.d.ts +24 -24
  125. package/lib/engine/engine_networking_auto.js +310 -310
  126. package/lib/engine/engine_networking_blob.d.ts +48 -48
  127. package/lib/engine/engine_networking_blob.js +228 -228
  128. package/lib/engine/engine_networking_files.d.ts +35 -35
  129. package/lib/engine/engine_networking_files.js +172 -172
  130. package/lib/engine/engine_networking_files_default_components.d.ts +6 -6
  131. package/lib/engine/engine_networking_files_default_components.js +42 -42
  132. package/lib/engine/engine_networking_instantiate.d.ts +100 -100
  133. package/lib/engine/engine_networking_instantiate.js +345 -345
  134. package/lib/engine/engine_networking_peer.d.ts +15 -15
  135. package/lib/engine/engine_networking_peer.js +132 -132
  136. package/lib/engine/engine_networking_streams.d.ts +123 -123
  137. package/lib/engine/engine_networking_streams.js +645 -645
  138. package/lib/engine/engine_networking_types.d.ts +22 -22
  139. package/lib/engine/engine_networking_types.js +7 -7
  140. package/lib/engine/engine_networking_utils.d.ts +2 -2
  141. package/lib/engine/engine_networking_utils.js +20 -20
  142. package/lib/engine/engine_networking_websocket.d.ts +1 -1
  143. package/lib/engine/engine_networking_websocket.js +2 -2
  144. package/lib/engine/engine_patcher.d.ts +10 -10
  145. package/lib/engine/engine_patcher.js +142 -142
  146. package/lib/engine/engine_physics.d.ts +152 -152
  147. package/lib/engine/engine_physics.js +645 -645
  148. package/lib/engine/engine_physics.types.d.ts +40 -40
  149. package/lib/engine/engine_physics.types.js +33 -33
  150. package/lib/engine/engine_physics_rapier.d.ts +147 -147
  151. package/lib/engine/engine_physics_rapier.js +1433 -1433
  152. package/lib/engine/engine_playerview.d.ts +26 -26
  153. package/lib/engine/engine_playerview.js +64 -64
  154. package/lib/engine/engine_scenelighting.d.ts +71 -71
  155. package/lib/engine/engine_scenelighting.js +226 -226
  156. package/lib/engine/engine_scenetools.d.ts +50 -50
  157. package/lib/engine/engine_scenetools.js +321 -321
  158. package/lib/engine/engine_serialization.d.ts +3 -3
  159. package/lib/engine/engine_serialization.js +3 -3
  160. package/lib/engine/engine_serialization_builtin_serializer.d.ts +72 -72
  161. package/lib/engine/engine_serialization_builtin_serializer.js +403 -403
  162. package/lib/engine/engine_serialization_core.d.ts +85 -85
  163. package/lib/engine/engine_serialization_core.js +606 -606
  164. package/lib/engine/engine_serialization_decorator.d.ts +23 -23
  165. package/lib/engine/engine_serialization_decorator.js +66 -66
  166. package/lib/engine/engine_setup.d.ts +1 -1
  167. package/lib/engine/engine_setup.js +2 -2
  168. package/lib/engine/engine_shaders.d.ts +53 -53
  169. package/lib/engine/engine_shaders.js +252 -252
  170. package/lib/engine/engine_shims.d.ts +4 -4
  171. package/lib/engine/engine_shims.js +24 -24
  172. package/lib/engine/engine_test_utils.d.ts +39 -39
  173. package/lib/engine/engine_test_utils.js +83 -83
  174. package/lib/engine/engine_texture.d.ts +28 -28
  175. package/lib/engine/engine_texture.js +64 -64
  176. package/lib/engine/engine_three_utils.d.ts +201 -201
  177. package/lib/engine/engine_three_utils.js +731 -731
  178. package/lib/engine/engine_time.d.ts +51 -51
  179. package/lib/engine/engine_time.js +82 -82
  180. package/lib/engine/engine_time_utils.d.ts +88 -88
  181. package/lib/engine/engine_time_utils.js +215 -215
  182. package/lib/engine/engine_tonemapping.d.ts +2 -2
  183. package/lib/engine/engine_tonemapping.js +194 -194
  184. package/lib/engine/engine_types.d.ts +572 -572
  185. package/lib/engine/engine_types.js +88 -88
  186. package/lib/engine/engine_typestore.d.ts +28 -28
  187. package/lib/engine/engine_typestore.js +55 -55
  188. package/lib/engine/engine_util_decorator.d.ts +13 -13
  189. package/lib/engine/engine_util_decorator.js +116 -116
  190. package/lib/engine/engine_utils.d.ts +266 -266
  191. package/lib/engine/engine_utils.js +878 -878
  192. package/lib/engine/engine_utils_format.d.ts +21 -21
  193. package/lib/engine/engine_utils_format.js +193 -193
  194. package/lib/engine/engine_utils_screenshot.d.ts +159 -159
  195. package/lib/engine/engine_utils_screenshot.js +513 -513
  196. package/lib/engine/engine_utils_screenshot.xr.d.ts +5 -5
  197. package/lib/engine/engine_utils_screenshot.xr.js +90 -90
  198. package/lib/engine/engine_xr.d.ts +1 -1
  199. package/lib/engine/engine_xr.js +1 -1
  200. package/lib/engine/export/gltf/Writers.d.ts +19 -19
  201. package/lib/engine/export/gltf/Writers.js +24 -24
  202. package/lib/engine/export/gltf/index.d.ts +11 -11
  203. package/lib/engine/export/gltf/index.js +123 -123
  204. package/lib/engine/export/index.d.ts +2 -2
  205. package/lib/engine/export/index.js +2 -2
  206. package/lib/engine/export/state.d.ts +7 -7
  207. package/lib/engine/export/state.js +17 -17
  208. package/lib/engine/export/utils.d.ts +2 -2
  209. package/lib/engine/export/utils.js +7 -7
  210. package/lib/engine/extensions/EXT_texture_exr.d.ts +8 -8
  211. package/lib/engine/extensions/EXT_texture_exr.js +32 -32
  212. package/lib/engine/extensions/NEEDLE_animator_controller_model.d.ts +122 -122
  213. package/lib/engine/extensions/NEEDLE_animator_controller_model.js +95 -95
  214. package/lib/engine/extensions/NEEDLE_components.d.ts +35 -35
  215. package/lib/engine/extensions/NEEDLE_components.js +220 -220
  216. package/lib/engine/extensions/NEEDLE_gameobject_data.d.ts +10 -10
  217. package/lib/engine/extensions/NEEDLE_gameobject_data.js +57 -57
  218. package/lib/engine/extensions/NEEDLE_lighting_settings.d.ts +37 -37
  219. package/lib/engine/extensions/NEEDLE_lighting_settings.js +157 -157
  220. package/lib/engine/extensions/NEEDLE_lightmaps.d.ts +18 -18
  221. package/lib/engine/extensions/NEEDLE_lightmaps.js +99 -99
  222. package/lib/engine/extensions/NEEDLE_persistent_assets.d.ts +11 -11
  223. package/lib/engine/extensions/NEEDLE_persistent_assets.js +63 -63
  224. package/lib/engine/extensions/NEEDLE_progressive.d.ts +1 -1
  225. package/lib/engine/extensions/NEEDLE_progressive.js +1 -1
  226. package/lib/engine/extensions/NEEDLE_render_objects.d.ts +13 -13
  227. package/lib/engine/extensions/NEEDLE_render_objects.js +159 -159
  228. package/lib/engine/extensions/NEEDLE_techniques_webgl.d.ts +38 -38
  229. package/lib/engine/extensions/NEEDLE_techniques_webgl.js +564 -564
  230. package/lib/engine/extensions/extension_resolver.d.ts +4 -4
  231. package/lib/engine/extensions/extension_resolver.js +1 -1
  232. package/lib/engine/extensions/extension_utils.d.ts +12 -12
  233. package/lib/engine/extensions/extension_utils.js +152 -152
  234. package/lib/engine/extensions/extensions.d.ts +31 -31
  235. package/lib/engine/extensions/extensions.js +103 -103
  236. package/lib/engine/extensions/index.d.ts +6 -6
  237. package/lib/engine/extensions/index.js +6 -6
  238. package/lib/engine/extensions/usage_tracker.d.ts +13 -13
  239. package/lib/engine/extensions/usage_tracker.js +65 -65
  240. package/lib/engine/js-extensions/Camera.d.ts +1 -1
  241. package/lib/engine/js-extensions/Camera.js +39 -39
  242. package/lib/engine/js-extensions/ExtensionUtils.d.ts +9 -9
  243. package/lib/engine/js-extensions/ExtensionUtils.js +67 -67
  244. package/lib/engine/js-extensions/Layers.d.ts +6 -6
  245. package/lib/engine/js-extensions/Layers.js +22 -22
  246. package/lib/engine/js-extensions/Object3D.d.ts +120 -120
  247. package/lib/engine/js-extensions/Object3D.js +136 -136
  248. package/lib/engine/js-extensions/RGBAColor.d.ts +23 -23
  249. package/lib/engine/js-extensions/RGBAColor.js +111 -110
  250. package/lib/engine/js-extensions/RGBAColor.js.map +1 -1
  251. package/lib/engine/js-extensions/Vector.d.ts +3 -3
  252. package/lib/engine/js-extensions/Vector.js +13 -13
  253. package/lib/engine/js-extensions/index.d.ts +5 -5
  254. package/lib/engine/js-extensions/index.js +5 -5
  255. package/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.d.ts +4 -4
  256. package/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js +76 -76
  257. package/lib/engine/shaders/shaderData.d.ts +55 -55
  258. package/lib/engine/shaders/shaderData.js +58 -58
  259. package/lib/engine/tests/test_utils.d.ts +2 -2
  260. package/lib/engine/tests/test_utils.js +53 -53
  261. package/lib/engine/webcomponents/WebXRButtons.d.ts +56 -56
  262. package/lib/engine/webcomponents/WebXRButtons.js +230 -230
  263. package/lib/engine/webcomponents/api.d.ts +5 -5
  264. package/lib/engine/webcomponents/api.js +4 -4
  265. package/lib/engine/webcomponents/buttons.d.ts +39 -39
  266. package/lib/engine/webcomponents/buttons.js +237 -237
  267. package/lib/engine/webcomponents/fonts.d.ts +9 -9
  268. package/lib/engine/webcomponents/fonts.js +32 -32
  269. package/lib/engine/webcomponents/icons.d.ts +9 -9
  270. package/lib/engine/webcomponents/icons.js +52 -52
  271. package/lib/engine/webcomponents/index.d.ts +1 -1
  272. package/lib/engine/webcomponents/index.js +1 -1
  273. package/lib/engine/webcomponents/logo-element.d.ts +10 -10
  274. package/lib/engine/webcomponents/logo-element.js +67 -67
  275. package/lib/engine/webcomponents/needle menu/needle-menu-spatial.d.ts +37 -37
  276. package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js +513 -513
  277. package/lib/engine/webcomponents/needle menu/needle-menu.d.ts +155 -155
  278. package/lib/engine/webcomponents/needle menu/needle-menu.js +1029 -1029
  279. package/lib/engine/webcomponents/needle-button.d.ts +34 -34
  280. package/lib/engine/webcomponents/needle-button.js +161 -161
  281. package/lib/engine/xr/NeedleXRController.d.ts +313 -313
  282. package/lib/engine/xr/NeedleXRController.js +1007 -1007
  283. package/lib/engine/xr/NeedleXRSession.d.ts +339 -339
  284. package/lib/engine/xr/NeedleXRSession.js +1427 -1427
  285. package/lib/engine/xr/NeedleXRSync.d.ts +22 -22
  286. package/lib/engine/xr/NeedleXRSync.js +188 -188
  287. package/lib/engine/xr/SceneTransition.d.ts +18 -18
  288. package/lib/engine/xr/SceneTransition.js +69 -69
  289. package/lib/engine/xr/TempXRContext.d.ts +34 -34
  290. package/lib/engine/xr/TempXRContext.js +187 -187
  291. package/lib/engine/xr/XRRig.d.ts +7 -7
  292. package/lib/engine/xr/XRRig.js +1 -1
  293. package/lib/engine/xr/api.d.ts +6 -6
  294. package/lib/engine/xr/api.js +6 -6
  295. package/lib/engine/xr/events.d.ts +66 -66
  296. package/lib/engine/xr/events.js +93 -93
  297. package/lib/engine/xr/internal.d.ts +12 -12
  298. package/lib/engine/xr/internal.js +25 -25
  299. package/lib/engine/xr/usdz.d.ts +12 -12
  300. package/lib/engine/xr/usdz.js +29 -29
  301. package/lib/engine/xr/utils.d.ts +11 -11
  302. package/lib/engine/xr/utils.js +34 -34
  303. package/lib/engine-components/AlignmentConstraint.d.ts +10 -10
  304. package/lib/engine-components/AlignmentConstraint.js +39 -39
  305. package/lib/engine-components/Animation.d.ts +156 -156
  306. package/lib/engine-components/Animation.js +508 -508
  307. package/lib/engine-components/AnimationCurve.d.ts +40 -40
  308. package/lib/engine-components/AnimationCurve.js +159 -159
  309. package/lib/engine-components/AnimationUtils.d.ts +8 -8
  310. package/lib/engine-components/AnimationUtils.js +27 -27
  311. package/lib/engine-components/AnimationUtilsAutoplay.d.ts +1 -1
  312. package/lib/engine-components/AnimationUtilsAutoplay.js +39 -39
  313. package/lib/engine-components/Animator.d.ts +217 -217
  314. package/lib/engine-components/Animator.js +354 -354
  315. package/lib/engine-components/AnimatorController.d.ts +227 -227
  316. package/lib/engine-components/AnimatorController.js +1152 -1152
  317. package/lib/engine-components/AudioListener.d.ts +33 -33
  318. package/lib/engine-components/AudioListener.js +86 -86
  319. package/lib/engine-components/AudioSource.d.ts +217 -217
  320. package/lib/engine-components/AudioSource.js +634 -634
  321. package/lib/engine-components/AvatarLoader.d.ts +80 -80
  322. package/lib/engine-components/AvatarLoader.js +231 -231
  323. package/lib/engine-components/AxesHelper.d.ts +32 -32
  324. package/lib/engine-components/AxesHelper.js +67 -67
  325. package/lib/engine-components/BasicIKConstraint.d.ts +9 -9
  326. package/lib/engine-components/BasicIKConstraint.js +43 -43
  327. package/lib/engine-components/BoxCollider.d.ts +2 -2
  328. package/lib/engine-components/BoxCollider.js +2 -2
  329. package/lib/engine-components/BoxHelperComponent.d.ts +47 -47
  330. package/lib/engine-components/BoxHelperComponent.js +102 -102
  331. package/lib/engine-components/Camera.d.ts +231 -231
  332. package/lib/engine-components/Camera.js +700 -700
  333. package/lib/engine-components/CameraUtils.d.ts +1 -1
  334. package/lib/engine-components/CameraUtils.js +121 -121
  335. package/lib/engine-components/CharacterController.d.ts +55 -55
  336. package/lib/engine-components/CharacterController.js +236 -236
  337. package/lib/engine-components/Collider.d.ts +188 -188
  338. package/lib/engine-components/Collider.js +369 -369
  339. package/lib/engine-components/Component.d.ts +792 -792
  340. package/lib/engine-components/Component.js +915 -915
  341. package/lib/engine-components/ContactShadows.d.ts +82 -82
  342. package/lib/engine-components/ContactShadows.js +430 -430
  343. package/lib/engine-components/DeleteBox.d.ts +19 -19
  344. package/lib/engine-components/DeleteBox.js +58 -58
  345. package/lib/engine-components/DeviceFlag.d.ts +16 -16
  346. package/lib/engine-components/DeviceFlag.js +47 -47
  347. package/lib/engine-components/DragControls.d.ts +170 -170
  348. package/lib/engine-components/DragControls.js +1421 -1421
  349. package/lib/engine-components/DropListener.d.ts +215 -215
  350. package/lib/engine-components/DropListener.js +630 -630
  351. package/lib/engine-components/Duplicatable.d.ts +35 -35
  352. package/lib/engine-components/Duplicatable.js +202 -202
  353. package/lib/engine-components/EventList.d.ts +54 -54
  354. package/lib/engine-components/EventList.js +232 -232
  355. package/lib/engine-components/EventTrigger.d.ts +33 -33
  356. package/lib/engine-components/EventTrigger.js +75 -75
  357. package/lib/engine-components/EventType.d.ts +22 -22
  358. package/lib/engine-components/EventType.js +23 -23
  359. package/lib/engine-components/Fog.d.ts +22 -22
  360. package/lib/engine-components/Fog.js +61 -61
  361. package/lib/engine-components/Gizmos.d.ts +17 -17
  362. package/lib/engine-components/Gizmos.js +64 -64
  363. package/lib/engine-components/GridHelper.d.ts +20 -20
  364. package/lib/engine-components/GridHelper.js +54 -54
  365. package/lib/engine-components/GroundProjection.d.ts +67 -67
  366. package/lib/engine-components/GroundProjection.js +343 -343
  367. package/lib/engine-components/Interactable.d.ts +12 -12
  368. package/lib/engine-components/Interactable.js +12 -12
  369. package/lib/engine-components/Joints.d.ts +19 -19
  370. package/lib/engine-components/Joints.js +51 -51
  371. package/lib/engine-components/LODGroup.d.ts +35 -35
  372. package/lib/engine-components/LODGroup.js +152 -152
  373. package/lib/engine-components/Light.d.ts +180 -180
  374. package/lib/engine-components/Light.js +535 -535
  375. package/lib/engine-components/LookAtConstraint.d.ts +19 -19
  376. package/lib/engine-components/LookAtConstraint.js +35 -35
  377. package/lib/engine-components/NeedleMenu.d.ts +50 -50
  378. package/lib/engine-components/NeedleMenu.js +92 -92
  379. package/lib/engine-components/NestedGltf.d.ts +25 -25
  380. package/lib/engine-components/NestedGltf.js +88 -88
  381. package/lib/engine-components/Networking.d.ts +54 -54
  382. package/lib/engine-components/Networking.js +112 -112
  383. package/lib/engine-components/OffsetConstraint.d.ts +14 -14
  384. package/lib/engine-components/OffsetConstraint.js +65 -65
  385. package/lib/engine-components/OrbitControls.d.ts +266 -266
  386. package/lib/engine-components/OrbitControls.js +1011 -1011
  387. package/lib/engine-components/PlayerColor.d.ts +19 -19
  388. package/lib/engine-components/PlayerColor.js +94 -94
  389. package/lib/engine-components/ReflectionProbe.d.ts +27 -27
  390. package/lib/engine-components/ReflectionProbe.js +201 -201
  391. package/lib/engine-components/Renderer.d.ts +153 -153
  392. package/lib/engine-components/Renderer.js +830 -830
  393. package/lib/engine-components/RendererInstancing.d.ts +140 -140
  394. package/lib/engine-components/RendererInstancing.js +744 -744
  395. package/lib/engine-components/RendererLightmap.d.ts +24 -24
  396. package/lib/engine-components/RendererLightmap.js +182 -182
  397. package/lib/engine-components/RigidBody.d.ts +155 -155
  398. package/lib/engine-components/RigidBody.js +517 -517
  399. package/lib/engine-components/SceneSwitcher.d.ts +263 -263
  400. package/lib/engine-components/SceneSwitcher.js +972 -972
  401. package/lib/engine-components/ScreenCapture.d.ts +144 -144
  402. package/lib/engine-components/ScreenCapture.js +547 -547
  403. package/lib/engine-components/ShadowCatcher.d.ts +33 -33
  404. package/lib/engine-components/ShadowCatcher.js +166 -166
  405. package/lib/engine-components/Skybox.d.ts +82 -82
  406. package/lib/engine-components/Skybox.js +448 -448
  407. package/lib/engine-components/SmoothFollow.d.ts +34 -34
  408. package/lib/engine-components/SmoothFollow.js +82 -82
  409. package/lib/engine-components/SpatialTrigger.d.ts +102 -102
  410. package/lib/engine-components/SpatialTrigger.js +225 -225
  411. package/lib/engine-components/SpectatorCamera.d.ts +111 -111
  412. package/lib/engine-components/SpectatorCamera.js +715 -715
  413. package/lib/engine-components/SphereCollider.d.ts +2 -2
  414. package/lib/engine-components/SphereCollider.js +2 -2
  415. package/lib/engine-components/SpriteRenderer.d.ts +132 -132
  416. package/lib/engine-components/SpriteRenderer.js +472 -472
  417. package/lib/engine-components/SyncedCamera.d.ts +41 -41
  418. package/lib/engine-components/SyncedCamera.js +199 -199
  419. package/lib/engine-components/SyncedRoom.d.ts +106 -106
  420. package/lib/engine-components/SyncedRoom.js +371 -371
  421. package/lib/engine-components/SyncedTransform.d.ts +94 -94
  422. package/lib/engine-components/SyncedTransform.js +331 -331
  423. package/lib/engine-components/SyncedTransform.js.map +1 -1
  424. package/lib/engine-components/TestRunner.d.ts +16 -16
  425. package/lib/engine-components/TestRunner.js +102 -102
  426. package/lib/engine-components/TransformGizmo.d.ts +75 -75
  427. package/lib/engine-components/TransformGizmo.js +209 -209
  428. package/lib/engine-components/VideoPlayer.d.ts +184 -184
  429. package/lib/engine-components/VideoPlayer.js +978 -978
  430. package/lib/engine-components/Voip.d.ts +67 -67
  431. package/lib/engine-components/Voip.js +360 -360
  432. package/lib/engine-components/api.d.ts +51 -51
  433. package/lib/engine-components/api.js +50 -50
  434. package/lib/engine-components/avatar/AvatarBlink_Simple.d.ts +11 -11
  435. package/lib/engine-components/avatar/AvatarBlink_Simple.js +76 -76
  436. package/lib/engine-components/avatar/AvatarEyeLook_Rotation.d.ts +14 -14
  437. package/lib/engine-components/avatar/AvatarEyeLook_Rotation.js +68 -68
  438. package/lib/engine-components/avatar/Avatar_Brain_LookAt.d.ts +29 -29
  439. package/lib/engine-components/avatar/Avatar_Brain_LookAt.js +121 -121
  440. package/lib/engine-components/avatar/Avatar_MouthShapes.d.ts +15 -15
  441. package/lib/engine-components/avatar/Avatar_MouthShapes.js +79 -79
  442. package/lib/engine-components/avatar/Avatar_MustacheShake.d.ts +9 -9
  443. package/lib/engine-components/avatar/Avatar_MustacheShake.js +29 -29
  444. package/lib/engine-components/codegen/components.d.ts +216 -216
  445. package/lib/engine-components/codegen/components.js +218 -218
  446. package/lib/engine-components/debug/LogStats.d.ts +5 -5
  447. package/lib/engine-components/debug/LogStats.js +18 -18
  448. package/lib/engine-components/export/gltf/GltfExport.d.ts +30 -30
  449. package/lib/engine-components/export/gltf/GltfExport.js +246 -246
  450. package/lib/engine-components/export/gltf/index.d.ts +1 -1
  451. package/lib/engine-components/export/gltf/index.js +1 -1
  452. package/lib/engine-components/export/index.d.ts +1 -1
  453. package/lib/engine-components/export/index.js +1 -1
  454. package/lib/engine-components/export/usdz/Extension.d.ts +22 -22
  455. package/lib/engine-components/export/usdz/Extension.js +1 -1
  456. package/lib/engine-components/export/usdz/ThreeUSDZExporter.d.ts +160 -160
  457. package/lib/engine-components/export/usdz/ThreeUSDZExporter.js +1782 -1782
  458. package/lib/engine-components/export/usdz/USDZExporter.d.ts +130 -130
  459. package/lib/engine-components/export/usdz/USDZExporter.js +663 -663
  460. package/lib/engine-components/export/usdz/extensions/Animation.d.ts +106 -106
  461. package/lib/engine-components/export/usdz/extensions/Animation.js +1071 -1071
  462. package/lib/engine-components/export/usdz/extensions/DocumentExtension.d.ts +5 -5
  463. package/lib/engine-components/export/usdz/extensions/DocumentExtension.js +6 -6
  464. package/lib/engine-components/export/usdz/extensions/USDZText.d.ts +54 -54
  465. package/lib/engine-components/export/usdz/extensions/USDZText.js +203 -203
  466. package/lib/engine-components/export/usdz/extensions/USDZUI.d.ts +8 -8
  467. package/lib/engine-components/export/usdz/extensions/USDZUI.js +158 -158
  468. package/lib/engine-components/export/usdz/extensions/behavior/Actions.d.ts +30 -30
  469. package/lib/engine-components/export/usdz/extensions/behavior/Actions.js +88 -88
  470. package/lib/engine-components/export/usdz/extensions/behavior/AudioExtension.d.ts +10 -10
  471. package/lib/engine-components/export/usdz/extensions/behavior/AudioExtension.js +86 -86
  472. package/lib/engine-components/export/usdz/extensions/behavior/Behaviour.d.ts +28 -28
  473. package/lib/engine-components/export/usdz/extensions/behavior/Behaviour.js +290 -290
  474. package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.d.ts +190 -190
  475. package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js +1060 -1060
  476. package/lib/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.d.ts +135 -135
  477. package/lib/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.js +548 -548
  478. package/lib/engine-components/export/usdz/extensions/behavior/PhysicsExtension.d.ts +7 -7
  479. package/lib/engine-components/export/usdz/extensions/behavior/PhysicsExtension.js +115 -115
  480. package/lib/engine-components/export/usdz/index.d.ts +3 -3
  481. package/lib/engine-components/export/usdz/index.js +2 -2
  482. package/lib/engine-components/export/usdz/utils/animationutils.d.ts +7 -7
  483. package/lib/engine-components/export/usdz/utils/animationutils.js +163 -163
  484. package/lib/engine-components/export/usdz/utils/quicklook.d.ts +2 -2
  485. package/lib/engine-components/export/usdz/utils/quicklook.js +43 -43
  486. package/lib/engine-components/particlesystem/ParticleSystem.d.ts +177 -177
  487. package/lib/engine-components/particlesystem/ParticleSystem.js +1176 -1176
  488. package/lib/engine-components/particlesystem/ParticleSystemModules.d.ts +526 -526
  489. package/lib/engine-components/particlesystem/ParticleSystemModules.js +1930 -1930
  490. package/lib/engine-components/particlesystem/ParticleSystemSubEmitter.d.ts +25 -25
  491. package/lib/engine-components/particlesystem/ParticleSystemSubEmitter.js +87 -87
  492. package/lib/engine-components/particlesystem/api.d.ts +2 -2
  493. package/lib/engine-components/particlesystem/api.js +2 -2
  494. package/lib/engine-components/postprocessing/Effects/Antialiasing.d.ts +17 -17
  495. package/lib/engine-components/postprocessing/Effects/Antialiasing.js +50 -50
  496. package/lib/engine-components/postprocessing/Effects/BloomEffect.d.ts +46 -46
  497. package/lib/engine-components/postprocessing/Effects/BloomEffect.js +113 -113
  498. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.d.ts +11 -11
  499. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js +39 -39
  500. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.d.ts +15 -15
  501. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js +92 -92
  502. package/lib/engine-components/postprocessing/Effects/DepthOfField.d.ts +25 -25
  503. package/lib/engine-components/postprocessing/Effects/DepthOfField.js +104 -104
  504. package/lib/engine-components/postprocessing/Effects/EffectWrapper.d.ts +12 -12
  505. package/lib/engine-components/postprocessing/Effects/EffectWrapper.js +18 -18
  506. package/lib/engine-components/postprocessing/Effects/Pixelation.d.ts +11 -11
  507. package/lib/engine-components/postprocessing/Effects/Pixelation.js +32 -32
  508. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.d.ts +18 -18
  509. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.js +91 -91
  510. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.d.ts +70 -70
  511. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.js +175 -175
  512. package/lib/engine-components/postprocessing/Effects/Sharpening.d.ts +17 -17
  513. package/lib/engine-components/postprocessing/Effects/Sharpening.js +123 -123
  514. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.d.ts +17 -17
  515. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.js +70 -70
  516. package/lib/engine-components/postprocessing/Effects/Tonemapping.d.ts +26 -26
  517. package/lib/engine-components/postprocessing/Effects/Tonemapping.js +138 -138
  518. package/lib/engine-components/postprocessing/Effects/Vignette.d.ts +15 -15
  519. package/lib/engine-components/postprocessing/Effects/Vignette.js +60 -60
  520. package/lib/engine-components/postprocessing/PostProcessingEffect.d.ts +72 -72
  521. package/lib/engine-components/postprocessing/PostProcessingEffect.js +149 -149
  522. package/lib/engine-components/postprocessing/PostProcessingHandler.d.ts +25 -25
  523. package/lib/engine-components/postprocessing/PostProcessingHandler.js +350 -350
  524. package/lib/engine-components/postprocessing/Volume.d.ts +89 -89
  525. package/lib/engine-components/postprocessing/Volume.js +367 -367
  526. package/lib/engine-components/postprocessing/VolumeParameter.d.ts +26 -26
  527. package/lib/engine-components/postprocessing/VolumeParameter.js +136 -136
  528. package/lib/engine-components/postprocessing/VolumeProfile.d.ts +15 -15
  529. package/lib/engine-components/postprocessing/VolumeProfile.js +60 -60
  530. package/lib/engine-components/postprocessing/index.d.ts +5 -5
  531. package/lib/engine-components/postprocessing/index.js +5 -5
  532. package/lib/engine-components/postprocessing/utils.d.ts +11 -11
  533. package/lib/engine-components/postprocessing/utils.js +37 -37
  534. package/lib/engine-components/timeline/PlayableDirector.d.ts +163 -163
  535. package/lib/engine-components/timeline/PlayableDirector.js +686 -686
  536. package/lib/engine-components/timeline/SignalAsset.d.ts +24 -24
  537. package/lib/engine-components/timeline/SignalAsset.js +130 -130
  538. package/lib/engine-components/timeline/TimelineModels.d.ts +89 -89
  539. package/lib/engine-components/timeline/TimelineModels.js +22 -22
  540. package/lib/engine-components/timeline/TimelineTracks.d.ts +110 -110
  541. package/lib/engine-components/timeline/TimelineTracks.js +879 -879
  542. package/lib/engine-components/timeline/index.d.ts +4 -4
  543. package/lib/engine-components/timeline/index.js +3 -3
  544. package/lib/engine-components/ui/BaseUIComponent.d.ts +48 -48
  545. package/lib/engine-components/ui/BaseUIComponent.js +170 -170
  546. package/lib/engine-components/ui/Button.d.ts +64 -64
  547. package/lib/engine-components/ui/Button.js +315 -315
  548. package/lib/engine-components/ui/Canvas.d.ts +74 -74
  549. package/lib/engine-components/ui/Canvas.js +407 -407
  550. package/lib/engine-components/ui/CanvasGroup.d.ts +19 -19
  551. package/lib/engine-components/ui/CanvasGroup.js +58 -58
  552. package/lib/engine-components/ui/EventSystem.d.ts +125 -125
  553. package/lib/engine-components/ui/EventSystem.js +764 -764
  554. package/lib/engine-components/ui/Graphic.d.ts +55 -55
  555. package/lib/engine-components/ui/Graphic.js +255 -255
  556. package/lib/engine-components/ui/Image.d.ts +35 -35
  557. package/lib/engine-components/ui/Image.js +116 -116
  558. package/lib/engine-components/ui/InputField.d.ts +42 -42
  559. package/lib/engine-components/ui/InputField.js +268 -268
  560. package/lib/engine-components/ui/Interfaces.d.ts +38 -38
  561. package/lib/engine-components/ui/Interfaces.js +12 -12
  562. package/lib/engine-components/ui/Layout.d.ts +84 -84
  563. package/lib/engine-components/ui/Layout.js +330 -330
  564. package/lib/engine-components/ui/Outline.d.ts +7 -7
  565. package/lib/engine-components/ui/Outline.js +20 -20
  566. package/lib/engine-components/ui/PointerEvents.d.ts +115 -115
  567. package/lib/engine-components/ui/PointerEvents.js +145 -145
  568. package/lib/engine-components/ui/RaycastUtils.d.ts +11 -11
  569. package/lib/engine-components/ui/RaycastUtils.js +67 -67
  570. package/lib/engine-components/ui/Raycaster.d.ts +30 -30
  571. package/lib/engine-components/ui/Raycaster.js +95 -95
  572. package/lib/engine-components/ui/RectTransform.d.ts +61 -61
  573. package/lib/engine-components/ui/RectTransform.js +356 -356
  574. package/lib/engine-components/ui/SpatialHtml.d.ts +8 -8
  575. package/lib/engine-components/ui/SpatialHtml.js +79 -79
  576. package/lib/engine-components/ui/Symbols.d.ts +1 -1
  577. package/lib/engine-components/ui/Symbols.js +1 -1
  578. package/lib/engine-components/ui/Text.d.ts +78 -78
  579. package/lib/engine-components/ui/Text.js +539 -539
  580. package/lib/engine-components/ui/Utils.d.ts +24 -24
  581. package/lib/engine-components/ui/Utils.js +90 -90
  582. package/lib/engine-components/ui/index.d.ts +1 -1
  583. package/lib/engine-components/ui/index.js +1 -1
  584. package/lib/engine-components/utils/EnvironmentScene.d.ts +5 -5
  585. package/lib/engine-components/utils/EnvironmentScene.js +205 -205
  586. package/lib/engine-components/utils/LookAt.d.ts +31 -31
  587. package/lib/engine-components/utils/LookAt.js +82 -82
  588. package/lib/engine-components/utils/OpenURL.d.ts +42 -42
  589. package/lib/engine-components/utils/OpenURL.js +119 -119
  590. package/lib/engine-components/webxr/Avatar.d.ts +25 -25
  591. package/lib/engine-components/webxr/Avatar.js +255 -255
  592. package/lib/engine-components/webxr/TeleportTarget.d.ts +7 -7
  593. package/lib/engine-components/webxr/TeleportTarget.js +7 -7
  594. package/lib/engine-components/webxr/WebARCameraBackground.d.ts +30 -30
  595. package/lib/engine-components/webxr/WebARCameraBackground.js +155 -155
  596. package/lib/engine-components/webxr/WebARSessionRoot.d.ts +98 -98
  597. package/lib/engine-components/webxr/WebARSessionRoot.js +770 -770
  598. package/lib/engine-components/webxr/WebXR.d.ts +232 -232
  599. package/lib/engine-components/webxr/WebXR.js +561 -561
  600. package/lib/engine-components/webxr/WebXRAvatar.d.ts +27 -27
  601. package/lib/engine-components/webxr/WebXRAvatar.js +44 -44
  602. package/lib/engine-components/webxr/WebXRImageTracking.d.ts +86 -86
  603. package/lib/engine-components/webxr/WebXRImageTracking.js +470 -470
  604. package/lib/engine-components/webxr/WebXRPlaneTracking.d.ts +92 -92
  605. package/lib/engine-components/webxr/WebXRPlaneTracking.js +500 -500
  606. package/lib/engine-components/webxr/WebXRRig.d.ts +32 -32
  607. package/lib/engine-components/webxr/WebXRRig.js +72 -72
  608. package/lib/engine-components/webxr/XRFlag.d.ts +38 -38
  609. package/lib/engine-components/webxr/XRFlag.js +139 -139
  610. package/lib/engine-components/webxr/controllers/XRControllerFollow.d.ts +47 -47
  611. package/lib/engine-components/webxr/controllers/XRControllerFollow.js +120 -120
  612. package/lib/engine-components/webxr/controllers/XRControllerModel.d.ts +43 -43
  613. package/lib/engine-components/webxr/controllers/XRControllerModel.js +351 -351
  614. package/lib/engine-components/webxr/controllers/XRControllerMovement.d.ts +78 -78
  615. package/lib/engine-components/webxr/controllers/XRControllerMovement.js +506 -506
  616. package/lib/engine-components/webxr/index.d.ts +3 -3
  617. package/lib/engine-components/webxr/index.js +3 -3
  618. package/lib/engine-components/webxr/types.d.ts +3 -3
  619. package/lib/engine-components/webxr/types.js +1 -1
  620. package/lib/engine-components-experimental/Presentation.d.ts +6 -6
  621. package/lib/engine-components-experimental/Presentation.js +9 -9
  622. package/lib/engine-components-experimental/api.d.ts +4 -4
  623. package/lib/engine-components-experimental/api.js +4 -4
  624. package/lib/engine-components-experimental/networking/PlayerSync.d.ts +156 -156
  625. package/lib/engine-components-experimental/networking/PlayerSync.js +377 -377
  626. package/lib/engine-schemes/api.d.ts +12 -12
  627. package/lib/engine-schemes/api.js +12 -12
  628. package/lib/engine-schemes/schemes.d.ts +7 -7
  629. package/lib/engine-schemes/schemes.js +19 -19
  630. package/lib/engine-schemes/synced-camera-model.d.ts +25 -25
  631. package/lib/engine-schemes/synced-camera-model.js +67 -67
  632. package/lib/engine-schemes/synced-transform-model.d.ts +31 -31
  633. package/lib/engine-schemes/synced-transform-model.js +66 -66
  634. package/lib/engine-schemes/transform.d.ts +12 -12
  635. package/lib/engine-schemes/transform.js +39 -39
  636. package/lib/engine-schemes/vec2.d.ts +10 -10
  637. package/lib/engine-schemes/vec2.js +25 -25
  638. package/lib/engine-schemes/vec3.d.ts +11 -11
  639. package/lib/engine-schemes/vec3.js +29 -29
  640. package/lib/engine-schemes/vec4.d.ts +12 -12
  641. package/lib/engine-schemes/vec4.js +33 -33
  642. package/lib/engine-schemes/vr-user-state-buffer.d.ts +37 -37
  643. package/lib/engine-schemes/vr-user-state-buffer.js +110 -110
  644. package/lib/include/three/EXT_mesh_gpu_instancing_exporter.d.ts +6 -6
  645. package/lib/include/three/EXT_mesh_gpu_instancing_exporter.js +45 -45
  646. package/lib/needle-engine.d.ts +7 -7
  647. package/lib/needle-engine.js +64 -64
  648. package/package.json +1 -1
  649. package/plugins/common/buildinfo.js +64 -64
  650. package/plugins/common/cloud.js +1 -1
  651. package/plugins/common/config.cjs +31 -31
  652. package/plugins/common/config.js +35 -35
  653. package/plugins/common/files.js +31 -31
  654. package/plugins/common/generator.js +10 -10
  655. package/plugins/common/license.js +415 -365
  656. package/plugins/common/npm.js +15 -15
  657. package/plugins/common/timers.js +7 -7
  658. package/plugins/common/version.js +37 -37
  659. package/plugins/gltf-packer.mjs +1 -1
  660. package/plugins/next/alias.cjs +39 -39
  661. package/plugins/next/license.cjs +24 -18
  662. package/plugins/next/meshbvhworker.cjs +18 -18
  663. package/plugins/next/next.js +136 -128
  664. package/plugins/types/index.d.ts +2 -2
  665. package/plugins/types/license.d.ts +24 -24
  666. package/plugins/types/needleConfig.d.ts +27 -27
  667. package/plugins/types/userconfig.d.ts +113 -110
  668. package/plugins/types/webmanifest.d.ts +32 -32
  669. package/plugins/vite/alias.js +174 -174
  670. package/plugins/vite/asap.js +245 -245
  671. package/plugins/vite/build-pipeline.js +355 -355
  672. package/plugins/vite/build.js +19 -19
  673. package/plugins/vite/buildinfo.js +41 -41
  674. package/plugins/vite/config.js +106 -106
  675. package/plugins/vite/copyfiles.js +138 -138
  676. package/plugins/vite/defines.js +68 -66
  677. package/plugins/vite/dependencies.js +232 -223
  678. package/plugins/vite/dependency-watcher.js +231 -231
  679. package/plugins/vite/drop-client.js +76 -76
  680. package/plugins/vite/drop.js +87 -87
  681. package/plugins/vite/editor-connection.js +124 -124
  682. package/plugins/vite/facebook-instant-games.js +102 -102
  683. package/plugins/vite/gzip.js +5 -5
  684. package/plugins/vite/imports-logger.js +143 -143
  685. package/plugins/vite/index.js +139 -139
  686. package/plugins/vite/license.js +56 -55
  687. package/plugins/vite/meta.js +163 -163
  688. package/plugins/vite/npm.js +7 -7
  689. package/plugins/vite/peer.js +29 -29
  690. package/plugins/vite/poster-client.js +73 -73
  691. package/plugins/vite/poster.js +79 -79
  692. package/plugins/vite/pwa.js +604 -604
  693. package/plugins/vite/reload-client.js +15 -15
  694. package/plugins/vite/reload.js +363 -363
  695. package/plugins/vite/server.js +66 -66
  696. package/plugins/vite/transform-codegen.js +55 -55
  697. package/plugins/vite/transform.js +31 -31
  698. package/plugins/vite/vite-4.4-hack.js +31 -31
  699. package/src/asap/needle-asap.ts +111 -111
  700. package/src/asap/sessiongranted.ts +75 -75
  701. package/src/asap/utils.ts +4 -4
  702. package/src/engine/analytics/index.ts +10 -10
  703. package/src/engine/analytics/lcp.ts +35 -35
  704. package/src/engine/api.ts +81 -81
  705. package/src/engine/assets/index.ts +59 -59
  706. package/src/engine/assets/static.js +5 -5
  707. package/src/engine/codegen/register_types.ts +300 -300
  708. package/src/engine/debug/debug.ts +51 -51
  709. package/src/engine/debug/debug_console.ts +333 -333
  710. package/src/engine/debug/debug_overlay.ts +332 -332
  711. package/src/engine/debug/debug_spatial_console.ts +429 -429
  712. package/src/engine/debug/index.ts +1 -1
  713. package/src/engine/engine_addressables.ts +680 -680
  714. package/src/engine/engine_animation.ts +145 -145
  715. package/src/engine/engine_application.ts +113 -113
  716. package/src/engine/engine_assetdatabase.ts +387 -387
  717. package/src/engine/engine_audio.ts +24 -24
  718. package/src/engine/engine_camera.ts +39 -39
  719. package/src/engine/engine_components.ts +374 -374
  720. package/src/engine/engine_components_internal.ts +40 -40
  721. package/src/engine/engine_constants.ts +52 -52
  722. package/src/engine/engine_context.ts +1798 -1686
  723. package/src/engine/engine_context_registry.ts +129 -129
  724. package/src/engine/engine_coroutine.ts +54 -54
  725. package/src/engine/engine_create_objects.ts +398 -398
  726. package/src/engine/engine_default_parameters.ts +3 -3
  727. package/src/engine/engine_editor-sync.ts +28 -28
  728. package/src/engine/engine_element.ts +872 -872
  729. package/src/engine/engine_element_attributes.ts +85 -85
  730. package/src/engine/engine_element_extras.ts +16 -16
  731. package/src/engine/engine_element_loading.ts +381 -381
  732. package/src/engine/engine_element_overlay.ts +186 -186
  733. package/src/engine/engine_fileloader.js +9 -9
  734. package/src/engine/engine_gameobject.ts +691 -691
  735. package/src/engine/engine_generic_utils.js +13 -13
  736. package/src/engine/engine_gizmos.ts +577 -577
  737. package/src/engine/engine_gltf.ts +29 -29
  738. package/src/engine/engine_gltf_builtin_components.ts +403 -403
  739. package/src/engine/engine_hot_reload.ts +198 -198
  740. package/src/engine/engine_input.ts +1500 -1460
  741. package/src/engine/engine_input_utils.ts +23 -23
  742. package/src/engine/engine_instancing.ts +45 -45
  743. package/src/engine/engine_license.ts +378 -378
  744. package/src/engine/engine_lifecycle_api.ts +106 -106
  745. package/src/engine/engine_lifecycle_functions_internal.ts +193 -193
  746. package/src/engine/engine_lightdata.ts +117 -117
  747. package/src/engine/engine_loaders.ts +82 -82
  748. package/src/engine/engine_lods.ts +168 -168
  749. package/src/engine/engine_mainloop_utils.ts +472 -472
  750. package/src/engine/engine_math.ts +282 -282
  751. package/src/engine/engine_modules.ts +83 -83
  752. package/src/engine/engine_networking.ts +841 -841
  753. package/src/engine/engine_networking_auto.ts +352 -352
  754. package/src/engine/engine_networking_blob.ts +275 -275
  755. package/src/engine/engine_networking_files.ts +217 -217
  756. package/src/engine/engine_networking_files_default_components.ts +58 -58
  757. package/src/engine/engine_networking_instantiate.ts +419 -419
  758. package/src/engine/engine_networking_peer.ts +159 -159
  759. package/src/engine/engine_networking_streams.ts +713 -713
  760. package/src/engine/engine_networking_types.ts +24 -24
  761. package/src/engine/engine_networking_utils.ts +23 -23
  762. package/src/engine/engine_networking_websocket.ts +2 -2
  763. package/src/engine/engine_patcher.ts +199 -199
  764. package/src/engine/engine_physics.ts +783 -783
  765. package/src/engine/engine_physics.types.ts +46 -46
  766. package/src/engine/engine_physics_rapier.ts +1577 -1577
  767. package/src/engine/engine_playerview.ts +80 -80
  768. package/src/engine/engine_scenelighting.ts +294 -294
  769. package/src/engine/engine_scenetools.ts +365 -365
  770. package/src/engine/engine_serialization.ts +2 -2
  771. package/src/engine/engine_serialization_builtin_serializer.ts +473 -473
  772. package/src/engine/engine_serialization_core.ts +710 -710
  773. package/src/engine/engine_serialization_decorator.ts +80 -80
  774. package/src/engine/engine_setup.ts +1 -1
  775. package/src/engine/engine_shaders.ts +267 -267
  776. package/src/engine/engine_shims.ts +32 -32
  777. package/src/engine/engine_test_utils.ts +109 -109
  778. package/src/engine/engine_texture.ts +82 -82
  779. package/src/engine/engine_three_utils.ts +849 -849
  780. package/src/engine/engine_time.ts +94 -94
  781. package/src/engine/engine_time_utils.ts +237 -237
  782. package/src/engine/engine_tonemapping.ts +210 -210
  783. package/src/engine/engine_types.ts +714 -714
  784. package/src/engine/engine_typestore.ts +63 -63
  785. package/src/engine/engine_util_decorator.ts +136 -136
  786. package/src/engine/engine_utils.ts +972 -972
  787. package/src/engine/engine_utils_format.ts +212 -212
  788. package/src/engine/engine_utils_screenshot.ts +698 -698
  789. package/src/engine/engine_utils_screenshot.xr.ts +103 -103
  790. package/src/engine/export/gltf/Writers.ts +34 -34
  791. package/src/engine/export/gltf/index.ts +158 -158
  792. package/src/engine/export/index.ts +2 -2
  793. package/src/engine/export/state.ts +19 -19
  794. package/src/engine/export/utils.ts +9 -9
  795. package/src/engine/extensions/EXT_texture_exr.ts +50 -50
  796. package/src/engine/extensions/NEEDLE_animator_controller_model.ts +195 -195
  797. package/src/engine/extensions/NEEDLE_components.ts +268 -268
  798. package/src/engine/extensions/NEEDLE_gameobject_data.ts +81 -81
  799. package/src/engine/extensions/NEEDLE_lighting_settings.ts +185 -185
  800. package/src/engine/extensions/NEEDLE_lightmaps.ts +119 -119
  801. package/src/engine/extensions/NEEDLE_persistent_assets.ts +76 -76
  802. package/src/engine/extensions/NEEDLE_render_objects.ts +209 -209
  803. package/src/engine/extensions/NEEDLE_techniques_webgl.ts +640 -640
  804. package/src/engine/extensions/extension_resolver.ts +4 -4
  805. package/src/engine/extensions/extension_utils.ts +166 -166
  806. package/src/engine/extensions/extensions.ts +135 -135
  807. package/src/engine/extensions/index.ts +5 -5
  808. package/src/engine/extensions/usage_tracker.ts +100 -100
  809. package/src/engine/js-extensions/Camera.ts +37 -37
  810. package/src/engine/js-extensions/ExtensionUtils.ts +85 -85
  811. package/src/engine/js-extensions/Layers.ts +23 -23
  812. package/src/engine/js-extensions/Object3D.ts +296 -296
  813. package/src/engine/js-extensions/RGBAColor.ts +126 -125
  814. package/src/engine/js-extensions/Vector.ts +18 -18
  815. package/src/engine/js-extensions/index.ts +4 -4
  816. package/src/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js +122 -122
  817. package/src/engine/shaders/shaderData.ts +67 -67
  818. package/src/engine/tests/test_utils.ts +63 -63
  819. package/src/engine/webcomponents/WebXRButtons.ts +260 -260
  820. package/src/engine/webcomponents/api.ts +6 -6
  821. package/src/engine/webcomponents/buttons.ts +262 -262
  822. package/src/engine/webcomponents/fonts.ts +41 -41
  823. package/src/engine/webcomponents/icons.ts +57 -57
  824. package/src/engine/webcomponents/index.ts +1 -1
  825. package/src/engine/webcomponents/logo-element.ts +78 -78
  826. package/src/engine/webcomponents/needle menu/needle-menu-spatial.ts +573 -573
  827. package/src/engine/webcomponents/needle menu/needle-menu.ts +1118 -1118
  828. package/src/engine/webcomponents/needle-button.ts +181 -181
  829. package/src/engine/xr/NeedleXRController.ts +1125 -1125
  830. package/src/engine/xr/NeedleXRSession.ts +1585 -1585
  831. package/src/engine/xr/NeedleXRSync.ts +220 -220
  832. package/src/engine/xr/SceneTransition.ts +78 -78
  833. package/src/engine/xr/TempXRContext.ts +216 -216
  834. package/src/engine/xr/XRRig.ts +9 -9
  835. package/src/engine/xr/api.ts +5 -5
  836. package/src/engine/xr/events.ts +102 -102
  837. package/src/engine/xr/internal.ts +34 -34
  838. package/src/engine/xr/usdz.ts +30 -30
  839. package/src/engine/xr/utils.ts +39 -39
  840. package/src/engine-components/AlignmentConstraint.ts +36 -36
  841. package/src/engine-components/Animation.ts +557 -557
  842. package/src/engine-components/AnimationCurve.ts +150 -150
  843. package/src/engine-components/AnimationUtils.ts +28 -28
  844. package/src/engine-components/AnimationUtilsAutoplay.ts +43 -43
  845. package/src/engine-components/Animator.ts +397 -397
  846. package/src/engine-components/AnimatorController.ts +1293 -1293
  847. package/src/engine-components/AudioListener.ts +92 -92
  848. package/src/engine-components/AudioSource.ts +644 -644
  849. package/src/engine-components/AvatarLoader.ts +263 -263
  850. package/src/engine-components/AxesHelper.ts +59 -59
  851. package/src/engine-components/BasicIKConstraint.ts +54 -54
  852. package/src/engine-components/BoxCollider.ts +1 -1
  853. package/src/engine-components/BoxHelperComponent.ts +114 -114
  854. package/src/engine-components/Camera.ts +719 -719
  855. package/src/engine-components/CameraUtils.ts +136 -136
  856. package/src/engine-components/CharacterController.ts +253 -253
  857. package/src/engine-components/Collider.ts +374 -374
  858. package/src/engine-components/Component.ts +1294 -1294
  859. package/src/engine-components/ContactShadows.ts +482 -482
  860. package/src/engine-components/DeleteBox.ts +62 -62
  861. package/src/engine-components/DeviceFlag.ts +46 -46
  862. package/src/engine-components/DragControls.ts +1623 -1623
  863. package/src/engine-components/DropListener.ts +698 -698
  864. package/src/engine-components/Duplicatable.ts +198 -198
  865. package/src/engine-components/EventList.ts +266 -266
  866. package/src/engine-components/EventTrigger.ts +74 -74
  867. package/src/engine-components/EventType.ts +22 -22
  868. package/src/engine-components/Fog.ts +60 -60
  869. package/src/engine-components/Gizmos.ts +56 -56
  870. package/src/engine-components/GridHelper.ts +48 -48
  871. package/src/engine-components/GroundProjection.ts +356 -356
  872. package/src/engine-components/Interactable.ts +14 -14
  873. package/src/engine-components/Joints.ts +52 -52
  874. package/src/engine-components/LODGroup.ts +153 -153
  875. package/src/engine-components/Light.ts +558 -558
  876. package/src/engine-components/LookAtConstraint.ts +25 -25
  877. package/src/engine-components/NeedleMenu.ts +84 -84
  878. package/src/engine-components/NestedGltf.ts +86 -86
  879. package/src/engine-components/Networking.ts +114 -114
  880. package/src/engine-components/OffsetConstraint.ts +60 -60
  881. package/src/engine-components/OrbitControls.ts +1069 -1069
  882. package/src/engine-components/PlayerColor.ts +103 -103
  883. package/src/engine-components/ReflectionProbe.ts +216 -216
  884. package/src/engine-components/Renderer.ts +900 -900
  885. package/src/engine-components/RendererInstancing.ts +855 -855
  886. package/src/engine-components/RendererLightmap.ts +198 -198
  887. package/src/engine-components/RigidBody.ts +526 -526
  888. package/src/engine-components/SceneSwitcher.ts +1030 -1030
  889. package/src/engine-components/ScreenCapture.ts +592 -592
  890. package/src/engine-components/ShadowCatcher.ts +172 -172
  891. package/src/engine-components/Skybox.ts +455 -455
  892. package/src/engine-components/SmoothFollow.ts +76 -76
  893. package/src/engine-components/SpatialTrigger.ts +229 -229
  894. package/src/engine-components/SpectatorCamera.ts +787 -787
  895. package/src/engine-components/SphereCollider.ts +1 -1
  896. package/src/engine-components/SpriteRenderer.ts +468 -468
  897. package/src/engine-components/SyncedCamera.ts +220 -220
  898. package/src/engine-components/SyncedRoom.ts +380 -380
  899. package/src/engine-components/SyncedTransform.ts +383 -383
  900. package/src/engine-components/TestRunner.ts +118 -118
  901. package/src/engine-components/TransformGizmo.ts +219 -219
  902. package/src/engine-components/VideoPlayer.ts +1025 -1025
  903. package/src/engine-components/Voip.ts +363 -363
  904. package/src/engine-components/api.ts +60 -60
  905. package/src/engine-components/avatar/AvatarBlink_Simple.ts +69 -69
  906. package/src/engine-components/avatar/AvatarEyeLook_Rotation.ts +63 -63
  907. package/src/engine-components/avatar/Avatar_Brain_LookAt.ts +139 -139
  908. package/src/engine-components/avatar/Avatar_MouthShapes.ts +83 -83
  909. package/src/engine-components/avatar/Avatar_MustacheShake.ts +31 -31
  910. package/src/engine-components/codegen/components.ts +217 -217
  911. package/src/engine-components/debug/LogStats.ts +21 -21
  912. package/src/engine-components/export/gltf/GltfExport.ts +265 -265
  913. package/src/engine-components/export/usdz/Extension.ts +24 -24
  914. package/src/engine-components/export/usdz/ThreeUSDZExporter.ts +2413 -2413
  915. package/src/engine-components/export/usdz/USDZExporter.ts +705 -705
  916. package/src/engine-components/export/usdz/extensions/Animation.ts +1204 -1204
  917. package/src/engine-components/export/usdz/extensions/DocumentExtension.ts +9 -9
  918. package/src/engine-components/export/usdz/extensions/USDZText.ts +240 -240
  919. package/src/engine-components/export/usdz/extensions/USDZUI.ts +189 -189
  920. package/src/engine-components/export/usdz/extensions/behavior/Actions.ts +99 -99
  921. package/src/engine-components/export/usdz/extensions/behavior/AudioExtension.ts +102 -102
  922. package/src/engine-components/export/usdz/extensions/behavior/Behaviour.ts +320 -320
  923. package/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts +1225 -1225
  924. package/src/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.ts +646 -646
  925. package/src/engine-components/export/usdz/extensions/behavior/PhysicsExtension.ts +132 -132
  926. package/src/engine-components/export/usdz/index.ts +2 -2
  927. package/src/engine-components/export/usdz/utils/animationutils.ts +191 -191
  928. package/src/engine-components/export/usdz/utils/quicklook.ts +50 -50
  929. package/src/engine-components/particlesystem/ParticleSystem.ts +1287 -1287
  930. package/src/engine-components/particlesystem/ParticleSystemModules.ts +1765 -1765
  931. package/src/engine-components/particlesystem/ParticleSystemSubEmitter.ts +111 -111
  932. package/src/engine-components/particlesystem/api.ts +1 -1
  933. package/src/engine-components/postprocessing/Effects/Antialiasing.ts +55 -55
  934. package/src/engine-components/postprocessing/Effects/BloomEffect.ts +116 -116
  935. package/src/engine-components/postprocessing/Effects/ChromaticAberration.ts +37 -37
  936. package/src/engine-components/postprocessing/Effects/ColorAdjustments.ts +95 -95
  937. package/src/engine-components/postprocessing/Effects/DepthOfField.ts +103 -103
  938. package/src/engine-components/postprocessing/Effects/EffectWrapper.ts +25 -25
  939. package/src/engine-components/postprocessing/Effects/Pixelation.ts +32 -32
  940. package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.ts +90 -90
  941. package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.ts +191 -191
  942. package/src/engine-components/postprocessing/Effects/Sharpening.ts +138 -138
  943. package/src/engine-components/postprocessing/Effects/TiltShiftEffect.ts +61 -61
  944. package/src/engine-components/postprocessing/Effects/Tonemapping.ts +155 -155
  945. package/src/engine-components/postprocessing/Effects/Vignette.ts +59 -59
  946. package/src/engine-components/postprocessing/PostProcessingEffect.ts +172 -172
  947. package/src/engine-components/postprocessing/PostProcessingHandler.ts +398 -398
  948. package/src/engine-components/postprocessing/Volume.ts +410 -410
  949. package/src/engine-components/postprocessing/VolumeParameter.ts +158 -158
  950. package/src/engine-components/postprocessing/VolumeProfile.ts +61 -61
  951. package/src/engine-components/postprocessing/index.ts +5 -5
  952. package/src/engine-components/postprocessing/utils.ts +52 -52
  953. package/src/engine-components/timeline/PlayableDirector.ts +722 -722
  954. package/src/engine-components/timeline/SignalAsset.ts +144 -144
  955. package/src/engine-components/timeline/TimelineModels.ts +92 -92
  956. package/src/engine-components/timeline/TimelineTracks.ts +967 -967
  957. package/src/engine-components/timeline/index.ts +3 -3
  958. package/src/engine-components/ui/BaseUIComponent.ts +203 -203
  959. package/src/engine-components/ui/Button.ts +307 -307
  960. package/src/engine-components/ui/Canvas.ts +419 -419
  961. package/src/engine-components/ui/CanvasGroup.ts +54 -54
  962. package/src/engine-components/ui/EventSystem.ts +853 -853
  963. package/src/engine-components/ui/Graphic.ts +275 -275
  964. package/src/engine-components/ui/Image.ts +112 -112
  965. package/src/engine-components/ui/InputField.ts +321 -321
  966. package/src/engine-components/ui/Interfaces.ts +57 -57
  967. package/src/engine-components/ui/Layout.ts +334 -334
  968. package/src/engine-components/ui/Outline.ts +13 -13
  969. package/src/engine-components/ui/PointerEvents.ts +206 -206
  970. package/src/engine-components/ui/RaycastUtils.ts +69 -69
  971. package/src/engine-components/ui/Raycaster.ts +102 -102
  972. package/src/engine-components/ui/RectTransform.ts +375 -375
  973. package/src/engine-components/ui/SpatialHtml.ts +79 -79
  974. package/src/engine-components/ui/Symbols.ts +1 -1
  975. package/src/engine-components/ui/Text.ts +578 -578
  976. package/src/engine-components/ui/Utils.ts +113 -113
  977. package/src/engine-components/utils/EnvironmentScene.ts +245 -245
  978. package/src/engine-components/utils/LookAt.ts +88 -88
  979. package/src/engine-components/utils/OpenURL.ts +114 -114
  980. package/src/engine-components/webxr/Avatar.ts +265 -265
  981. package/src/engine-components/webxr/TeleportTarget.ts +9 -9
  982. package/src/engine-components/webxr/WebARCameraBackground.ts +175 -175
  983. package/src/engine-components/webxr/WebARSessionRoot.ts +880 -880
  984. package/src/engine-components/webxr/WebXR.ts +585 -585
  985. package/src/engine-components/webxr/WebXRAvatar.ts +66 -66
  986. package/src/engine-components/webxr/WebXRImageTracking.ts +518 -518
  987. package/src/engine-components/webxr/WebXRPlaneTracking.ts +570 -570
  988. package/src/engine-components/webxr/WebXRRig.ts +77 -77
  989. package/src/engine-components/webxr/XRFlag.ts +147 -147
  990. package/src/engine-components/webxr/controllers/XRControllerFollow.ts +118 -118
  991. package/src/engine-components/webxr/controllers/XRControllerModel.ts +374 -374
  992. package/src/engine-components/webxr/controllers/XRControllerMovement.ts +550 -550
  993. package/src/engine-components/webxr/index.ts +2 -2
  994. package/src/engine-components/webxr/types.ts +3 -3
  995. package/src/engine-components-experimental/Presentation.ts +12 -12
  996. package/src/engine-components-experimental/api.ts +4 -4
  997. package/src/engine-components-experimental/networking/PlayerSync.ts +401 -401
  998. package/src/engine-schemes/COMPILE_SCHEMES.bat +3 -3
  999. package/src/engine-schemes/COMPILE_TS.bat +11 -11
  1000. package/src/engine-schemes/README.md +1 -1
  1001. package/src/engine-schemes/api.ts +12 -12
  1002. package/src/engine-schemes/schemes.ts +28 -28
  1003. package/src/engine-schemes/synced-camera-model.ts +92 -92
  1004. package/src/engine-schemes/synced-transform-model.ts +90 -90
  1005. package/src/engine-schemes/syncedCamera.fbs +10 -10
  1006. package/src/engine-schemes/transform.ts +50 -50
  1007. package/src/engine-schemes/transforms.fbs +25 -25
  1008. package/src/engine-schemes/vec.fbs +19 -19
  1009. package/src/engine-schemes/vec2.ts +33 -33
  1010. package/src/engine-schemes/vec3.ts +38 -38
  1011. package/src/engine-schemes/vec4.ts +43 -43
  1012. package/src/engine-schemes/vr-user-state-buffer.ts +145 -145
  1013. package/src/engine-schemes/vrUserStateBuffer.fbs +17 -17
  1014. package/src/include/draco/draco_decoder.js +34 -34
  1015. package/src/include/ktx2/basis_transcoder.js +21 -21
  1016. package/src/include/needle/arial-msdf.json +1471 -1471
  1017. package/src/include/three/DragControls.js +231 -231
  1018. package/src/include/three/EXT_mesh_gpu_instancing_exporter.js +66 -66
  1019. package/src/needle-engine.ts +70 -70
  1020. package/lib/engine/engine.d.ts +0 -4
  1021. package/lib/engine/engine.js +0 -12
  1022. package/lib/engine/engine.js.map +0 -1
  1023. package/lib/engine/engine_web_api.d.ts +0 -12
  1024. package/lib/engine/engine_web_api.js +0 -113
  1025. package/lib/engine/engine_web_api.js.map +0 -1
  1026. package/lib/engine-components/FlyControls.d.ts +0 -10
  1027. package/lib/engine-components/FlyControls.js +0 -29
  1028. package/lib/engine-components/FlyControls.js.map +0 -1
  1029. package/src/engine-schemes/dist/api.js +0 -17
  1030. package/src/engine-schemes/dist/api.js.meta +0 -7
  1031. package/src/engine-schemes/dist/schemes.js +0 -25
  1032. package/src/engine-schemes/dist/schemes.js.meta +0 -7
  1033. package/src/engine-schemes/dist/synced-camera-model.js +0 -74
  1034. package/src/engine-schemes/dist/synced-camera-model.js.meta +0 -7
  1035. package/src/engine-schemes/dist/synced-transform-model.js +0 -73
  1036. package/src/engine-schemes/dist/synced-transform-model.js.meta +0 -7
  1037. package/src/engine-schemes/dist/transform.js +0 -46
  1038. package/src/engine-schemes/dist/transform.js.meta +0 -7
  1039. package/src/engine-schemes/dist/vec2.js +0 -32
  1040. package/src/engine-schemes/dist/vec2.js.meta +0 -7
  1041. package/src/engine-schemes/dist/vec3.js +0 -36
  1042. package/src/engine-schemes/dist/vec3.js.meta +0 -7
  1043. package/src/engine-schemes/dist/vec4.js +0 -40
  1044. package/src/engine-schemes/dist/vec4.js.meta +0 -7
  1045. package/src/engine-schemes/dist/vr-user-state-buffer.js +0 -110
  1046. package/src/engine-schemes/dist/vr-user-state-buffer.js.meta +0 -7
@@ -1803,18 +1803,18 @@ function AC() {
1803
1803
  return s || null;
1804
1804
  }
1805
1805
  const $0 = x("debugdefines");
1806
- Mo('if(!globalThis[""4.4.1""]) globalThis[""4.4.1""] = "0.0.0";');
1806
+ Mo('if(!globalThis[""4.4.3-beta""]) globalThis[""4.4.3-beta""] = "0.0.0";');
1807
1807
  Mo('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
1808
- Mo('if(!globalThis[""Thu Apr 17 2025 16:58:15 GMT+0200 (Central European Summer Time)""]) globalThis[""Thu Apr 17 2025 16:58:15 GMT+0200 (Central European Summer Time)""] = "unknown";');
1809
- Mo('if(!globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""]) globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""] = "unknown";');
1810
- Mo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.1";');
1808
+ Mo('if(!globalThis[""Mon Apr 28 2025 23:14:12 GMT+0700 (Indochina Time)""]) globalThis[""Mon Apr 28 2025 23:14:12 GMT+0700 (Indochina Time)""] = "unknown";');
1809
+ Mo('if(!globalThis[""npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd""]) globalThis[""npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd""] = "unknown";');
1810
+ Mo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.3-beta";');
1811
1811
  Mo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1812
- Mo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Thu Apr 17 2025 16:58:15 GMT+0200 (Central European Summer Time)";');
1813
- Mo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9";');
1814
- const Nn = "4.4.1", vg = "undefined", W0 = "Thu Apr 17 2025 16:58:15 GMT+0200 (Central European Summer Time)";
1812
+ Mo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Apr 28 2025 23:14:12 GMT+0700 (Indochina Time)";');
1813
+ Mo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd";');
1814
+ const Nn = "4.4.3-beta", vg = "undefined", W0 = "Mon Apr 28 2025 23:14:12 GMT+0700 (Indochina Time)";
1815
1815
  $0 && console.log(`Engine version: ${Nn} (generator: ${vg})
1816
1816
  Project built at ${W0}`);
1817
- const fd = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9", yo = "needle_isActiveInHierarchy", sa = "builtin_components", pd = "needle_editor_guid";
1817
+ const fd = "npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd", yo = "needle_isActiveInHierarchy", sa = "builtin_components", pd = "needle_editor_guid";
1818
1818
  function Mo(s) {
1819
1819
  try {
1820
1820
  (0, eval)(s);
@@ -2470,24 +2470,36 @@ class HC {
2470
2470
  if (e)
2471
2471
  return e[e.length - 1];
2472
2472
  }
2473
- getKeyDown() {
2474
- for (const t in this.keysPressed) {
2475
- const e = this.keysPressed[t];
2476
- if (e.startFrame === this.context.time.frameCount)
2477
- return e.key;
2473
+ getKeyDown(t) {
2474
+ if (t !== void 0)
2475
+ return this.isKeyDown(t);
2476
+ for (const e in this.keysPressed) {
2477
+ const i = this.keysPressed[e];
2478
+ if (i.startFrame === this.context.time.frameCount)
2479
+ return i.key;
2478
2480
  }
2479
2481
  return null;
2480
2482
  }
2481
- getKeyPressed() {
2482
- for (const t in this.keysPressed) {
2483
- const e = this.keysPressed[t];
2484
- if (e.pressed)
2485
- return e.key;
2483
+ getKeyPressed(t) {
2484
+ if (t !== void 0)
2485
+ return this.isKeyPressed(t);
2486
+ for (const e in this.keysPressed) {
2487
+ const i = this.keysPressed[e];
2488
+ if (i.pressed)
2489
+ return i.key;
2490
+ }
2491
+ return null;
2492
+ }
2493
+ getKeyUp(t) {
2494
+ if (t !== void 0)
2495
+ return this.isKeyUp(t);
2496
+ for (const e in this.keysPressed) {
2497
+ const i = this.keysPressed[e];
2498
+ return i.pressed === !1 && i.frame === this.context.time.frameCount;
2486
2499
  }
2487
2500
  return null;
2488
2501
  }
2489
2502
  isKeyDown(t) {
2490
- var i;
2491
2503
  if (!this.context.application.isVisible || !this.context.application.hasFocus)
2492
2504
  return !1;
2493
2505
  const e = this.getCodeForCommonKeyName(t);
@@ -2497,10 +2509,10 @@ class HC {
2497
2509
  return !0;
2498
2510
  return !1;
2499
2511
  }
2500
- return ((i = this.keysPressed[t]) == null ? void 0 : i.startFrame) === this.context.time.frameCount && this.keysPressed[t].pressed;
2512
+ const i = this.keysPressed[t];
2513
+ return i ? i.startFrame === this.context.time.frameCount && i.pressed : !1;
2501
2514
  }
2502
2515
  isKeyUp(t) {
2503
- var i;
2504
2516
  if (!this.context.application.isVisible || !this.context.application.hasFocus)
2505
2517
  return !1;
2506
2518
  const e = this.getCodeForCommonKeyName(t);
@@ -2510,10 +2522,10 @@ class HC {
2510
2522
  return !0;
2511
2523
  return !1;
2512
2524
  }
2513
- return ((i = this.keysPressed[t]) == null ? void 0 : i.frame) === this.context.time.frameCount && !this.keysPressed[t].pressed;
2525
+ const i = this.keysPressed[t];
2526
+ return i ? i.frame === this.context.time.frameCount && i.pressed === !1 : !1;
2514
2527
  }
2515
2528
  isKeyPressed(t) {
2516
- var i;
2517
2529
  if (!this.context.application.isVisible || !this.context.application.hasFocus)
2518
2530
  return !1;
2519
2531
  const e = this.getCodeForCommonKeyName(t);
@@ -2523,7 +2535,8 @@ class HC {
2523
2535
  return !0;
2524
2536
  return !1;
2525
2537
  }
2526
- return (i = this.keysPressed[t]) == null ? void 0 : i.pressed;
2538
+ const i = this.keysPressed[t];
2539
+ return i && i.pressed || !1;
2527
2540
  }
2528
2541
  // utility helper for mapping common names to actual codes; e.g. "Shift" -> "ShiftLeft" and "ShiftRight" or "a" -> "KeyA"
2529
2542
  getCodeForCommonKeyName(t) {
@@ -7549,11 +7562,9 @@ Object.getOwnPropertyDescriptor(L.prototype, "worldUp") || Object.defineProperty
7549
7562
  aO(L);
7550
7563
  class le extends ce {
7551
7564
  constructor(e, i, n, o) {
7552
- var t = (...args) => {
7553
- super(...args);
7554
- r(this, "alpha", 1);
7555
- };
7556
- i != null && n != null ? (t(e, i, n), this.alpha = o) : (t(e), this.alpha = 1);
7565
+ super();
7566
+ r(this, "alpha", 1);
7567
+ typeof e == "number" && typeof i == "number" && typeof n == "number" ? (this.set(e, i, n), this.alpha = typeof o == "number" ? o : 1) : e !== void 0 && (this.set(e), this.alpha = 1);
7557
7568
  }
7558
7569
  get isRGBAColor() {
7559
7570
  return !0;
@@ -10692,21 +10703,61 @@ const ke = class {
10692
10703
  r(this, "xr", null);
10693
10704
  r(this, "_xrFrame", null);
10694
10705
  r(this, "_currentFrameEvent", -1);
10706
+ /**
10707
+ * The scene contains all objects in the hierarchy and is automatically rendered by the context every frane.
10708
+ */
10695
10709
  r(this, "scene");
10710
+ /**
10711
+ * The renderer is used to render the scene. It is automatically created when the context is created.
10712
+ */
10696
10713
  r(this, "renderer");
10714
+ /**
10715
+ * The effect composer can be used to render postprocessing effects. If assigned then it will automatically render the scene every frame.
10716
+ */
10697
10717
  r(this, "composer", null);
10698
- // all scripts
10718
+ /**
10719
+ * @internal All known components. Don't use directly
10720
+ */
10699
10721
  r(this, "scripts", []);
10722
+ /**
10723
+ * @internal All paused components. Don't use directly
10724
+ */
10700
10725
  r(this, "scripts_pausedChanged", []);
10701
- // scripts with update event
10726
+ /**
10727
+ * @internal All components that have a early update event. Don't use directly
10728
+ */
10702
10729
  r(this, "scripts_earlyUpdate", []);
10730
+ /**
10731
+ * @internal All components that have a update event. Don't use directly
10732
+ */
10703
10733
  r(this, "scripts_update", []);
10734
+ /**
10735
+ * @internal All components that have a late update event. Don't use directly
10736
+ */
10704
10737
  r(this, "scripts_lateUpdate", []);
10738
+ /**
10739
+ * @internal All components that have a onBeforeRender event. Don't use directly
10740
+ */
10705
10741
  r(this, "scripts_onBeforeRender", []);
10742
+ /**
10743
+ * @internal All components that have a onAfterRender event. Don't use directly
10744
+ */
10706
10745
  r(this, "scripts_onAfterRender", []);
10746
+ /**
10747
+ * @internal All components that have coroutines. Don't use directly
10748
+ */
10707
10749
  r(this, "scripts_WithCorroutines", []);
10750
+ /**
10751
+ * @internal Components with immersive-vr event methods. Don't use directly
10752
+ */
10708
10753
  r(this, "scripts_immersive_vr", []);
10754
+ /**
10755
+ * @internal Components with immersive-ar event methods. Don't use directly
10756
+ */
10709
10757
  r(this, "scripts_immersive_ar", []);
10758
+ /**
10759
+ * @internal Coroutine data
10760
+ */
10710
10761
  r(this, "coroutines", {});
10711
10762
  /** callbacks called once after the context has been created */
10712
10763
  r(this, "post_setup_callbacks", []);
@@ -10718,20 +10769,30 @@ const ke = class {
10718
10769
  r(this, "post_render_callbacks", []);
10719
10770
  /** called every frame befroe update (this list is emptied every frame) */
10720
10771
  r(this, "pre_update_oneshot_callbacks", []);
10772
+ /** @internal */
10721
10773
  r(this, "new_scripts", []);
10774
+ /** @internal */
10722
10775
  r(this, "new_script_start", []);
10776
+ /** @internal */
10723
10777
  r(this, "new_scripts_pre_setup_callbacks", []);
10778
+ /** @internal */
10724
10779
  r(this, "new_scripts_post_setup_callbacks", []);
10780
+ /** @internal */
10725
10781
  r(this, "new_scripts_xr", []);
10726
- /** The main camera component of the scene - this camera is used for rendering */
10782
+ /**
10783
+ * The **main camera component** of the scene - this camera is used for rendering.
10784
+ * Use `setCurrentCamera` for updating the main camera.
10785
+ */
10727
10786
  r(this, "mainCameraComponent");
10728
10787
  r(this, "_mainCamera", null);
10729
10788
  r(this, "_fallbackCamera", null);
10789
+ /** access application state (e.g. if all audio should be muted) */
10730
10790
  r(this, "application");
10731
10791
  /** access animation mixer used by components in the scene */
10732
10792
  r(this, "animations");
10733
10793
  /** access timings (current frame number, deltaTime, timeScale, ...) */
10734
10794
  r(this, "time");
10795
+ /** access input data (e.g. click or touch events) */
10735
10796
  r(this, "input");
10736
10797
  /** access physics related methods (e.g. raycasting). To access the phyiscs engine use `context.physics.engine` */
10737
10798
  r(this, "physics");
@@ -10741,12 +10802,14 @@ const ke = class {
10741
10802
  * @deprecated AssetDataBase is deprecated
10742
10803
  */
10743
10804
  r(this, "assets");
10805
+ /** The main light in the scene */
10744
10806
  r(this, "mainLight", null);
10745
10807
  r(this, "sceneLighting");
10746
10808
  r(this, "addressables");
10747
10809
  r(this, "lightmaps");
10748
10810
  r(this, "players");
10749
10811
  r(this, "lodsManager");
10812
+ /** Access the needle menu to add or remove buttons to the menu element */
10750
10813
  r(this, "menu");
10751
10814
  r(this, "_needsUpdateSize", !1);
10752
10815
  r(this, "_isCreated", !1);
@@ -10854,29 +10917,46 @@ const ke = class {
10854
10917
  get domHeight() {
10855
10918
  return this.isInAR ? window.innerHeight : this.domElement.clientHeight;
10856
10919
  }
10857
- /** the X position of the Needle Engine element on the website */
10920
+ /** the X position of the `<needle-engine>` element on the website */
10858
10921
  get domX() {
10859
10922
  return this.calculateBoundingClientRect(), this._domX;
10860
10923
  }
10861
- /** the Y position of the Needlee Engine element on the website */
10924
+ /** the Y position of the `<needle-engine>` element on the website */
10862
10925
  get domY() {
10863
10926
  return this.calculateBoundingClientRect(), this._domY;
10864
10927
  }
10928
+ /**
10929
+ * Is a XR session currently active and presenting?
10930
+ * @returns true if the xr renderer is currently presenting
10931
+ */
10865
10932
  get isInXR() {
10866
10933
  var t, e;
10867
10934
  return ((e = (t = this.renderer) == null ? void 0 : t.xr) == null ? void 0 : e.isPresenting) || !1;
10868
10935
  }
10936
+ /**
10937
+ * Shorthand for `this.xr?.mode`. AR or VR
10938
+ * @returns the current XR session mode (immersive-vr or immersive-ar)
10939
+ */
10869
10940
  get xrSessionMode() {
10870
10941
  var t;
10871
10942
  return (t = this.xr) == null ? void 0 : t.mode;
10872
10943
  }
10944
+ /** Shorthand for `this.xrSessionMode === "immersive-vr"`
10945
+ * @returns true if a webxr VR session is currently active.
10946
+ */
10873
10947
  get isInVR() {
10874
10948
  return this.xrSessionMode === "immersive-vr";
10875
10949
  }
10950
+ /**
10951
+ * Shorthand for `this.xrSessionMode === "immersive-ar"`
10952
+ * @returns true if a webxr AR session is currently active.
10953
+ */
10876
10954
  get isInAR() {
10877
10955
  return this.xrSessionMode === "immersive-ar";
10878
10956
  }
10879
- /** If a XR session is active and in pass through mode (immersive-ar on e.g. Quest) */
10957
+ /** If a XR session is active and in pass through mode (immersive-ar on e.g. Quest)
10958
+ * @returns true if the XR session is in pass through mode
10959
+ */
10880
10960
  get isInPassThrough() {
10881
10961
  return this.xr ? this.xr.isPassThrough : !1;
10882
10962
  }
@@ -10896,15 +10976,23 @@ const ke = class {
10896
10976
  var t, e;
10897
10977
  return this.renderer.xr.isPresenting ? (e = (t = this.renderer) == null ? void 0 : t.xr) == null ? void 0 : e.getCamera() : void 0;
10898
10978
  }
10979
+ /**
10980
+ * The AR overlay element is used to display 2D HTML elements while a AR session is active.
10981
+ */
10899
10982
  get arOverlayElement() {
10900
10983
  const t = this.domElement;
10901
10984
  return typeof t.getAROverlayContainer == "function" ? t.getAROverlayContainer() : this.domElement;
10902
10985
  }
10903
- /** Current event of the update cycle */
10986
+ /**
10987
+ * Current event of the update cycle (e.g. `FrameEvent.EarlyUpdate` or `FrameEvent.OnBeforeRender`)
10988
+ */
10904
10989
  get currentFrameEvent() {
10905
10990
  return this._currentFrameEvent;
10906
10991
  }
10907
- /** The main camera of the scene - this camera is used for rendering */
10992
+ /**
10993
+ * The main camera of the scene - this camera is used for rendering
10994
+ * Use `setCurrentCamera` for updating the main camera.
10995
+ */
10908
10996
  get mainCamera() {
10909
10997
  if (this._mainCamera)
10910
10998
  return this._mainCamera;
@@ -10922,21 +11010,27 @@ const ke = class {
10922
11010
  get rendererData() {
10923
11011
  return this.sceneLighting;
10924
11012
  }
11013
+ /** @returns true if the context is fully created and ready */
10925
11014
  get isCreated() {
10926
11015
  return this._isCreated;
10927
11016
  }
10928
- /** calling this function will dispose the current renderer and create a new one */
11017
+ /**
11018
+ * Calling this function will dispose the current renderer and create a new one which will then be assigned to the context. It can be used to create a new renderer with custom WebGLRendererParameters.
11019
+ * **Note**: Instead you can also modify the static `Context.DefaultWebGlRendererParameters` before the context is created.
11020
+ * **Note**: This method is recommended because it re-uses an potentially already existing canvas element. This is necessary to keep input event handlers from working (e.g. components like OrbitControls subscribe to input events on the canvas)
11021
+ * @returns {WebGLRenderer} the newly created renderer
11022
+ */
10929
11023
  createNewRenderer(t) {
10930
11024
  var e, i, n;
10931
11025
  if ((e = this.renderer) == null || e.dispose(), t = { ...ke.DefaultWebGLRendererParameters, ...t }, !t.canvas) {
10932
11026
  const o = (n = (i = this.domElement) == null ? void 0 : i.shadowRoot) == null ? void 0 : n.querySelector("canvas");
10933
11027
  o && (t.canvas = o, st && console.log("Using canvas from shadow root", o));
10934
11028
  }
10935
- st && console.log("Using Renderer Parameters:", t, this.domElement), this.renderer = new kr(t), this.renderer.debug.checkShaderErrors = z() || x("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = ja, this.renderer.setClearColor(new ce("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = Gx, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = Es, this.renderer.nodes = {
11029
+ return st && console.log("Using Renderer Parameters:", t, this.domElement), this.renderer = new kr(t), this.renderer.debug.checkShaderErrors = z() || x("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = ja, this.renderer.setClearColor(new ce("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = Gx, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = Es, this.renderer.nodes = {
10936
11030
  library: new qx(),
10937
11031
  modelViewMatrix: null,
10938
11032
  modelNormalViewMatrix: null
10939
- }, this.lodsManager.setRenderer(this.renderer), this.input.bindEvents();
11033
+ }, this.lodsManager.setRenderer(this.renderer), this.input.bindEvents(), this.renderer;
10940
11034
  }
10941
11035
  internalOnUpdateVisible() {
10942
11036
  var t, e;
@@ -10958,7 +11052,9 @@ const ke = class {
10958
11052
  set devicePixelRatio(t) {
10959
11053
  t !== this._devicePixelRatio && (this._devicePixelRatio = t, this._needsUpdateSize = !0);
10960
11054
  }
10961
- /** update the renderer and canvas size */
11055
+ /**
11056
+ * Update the renderer and canvas size. This is also automatically called when a DOM size change is detected.
11057
+ */
10962
11058
  updateSize(t = !1) {
10963
11059
  var e, i, n;
10964
11060
  if (t || !this.isManagedExternally && ((e = this.renderer.xr) == null ? void 0 : e.isPresenting) === !1) {
@@ -10972,6 +11068,9 @@ const ke = class {
10972
11068
  h !== void 0 && this.renderer.setPixelRatio(h), this.composer && ((i = this.composer.setSize) == null || i.call(this.composer, a, l), h !== void 0 && "setPixelRatio" in this.composer && typeof this.composer.setPixelRatio == "function" && ((n = this.composer.setPixelRatio) == null || n.call(this.composer, window.devicePixelRatio)));
10973
11069
  }
10974
11070
  }
11071
+ /**
11072
+ * Update the camera aspect ratio or orthorgraphic camera size. This is automatically called when a DOM size change is detected.
11073
+ */
10975
11074
  updateAspect(t, e, i) {
10976
11075
  if (!t)
10977
11076
  return;
@@ -10995,6 +11094,7 @@ const ke = class {
10995
11094
  async onCreate(t) {
10996
11095
  return this.create(t);
10997
11096
  }
11097
+ /** @internal */
10998
11098
  async create(t) {
10999
11099
  try {
11000
11100
  this._isCreating = !0, t !== this._originalCreationArgs && (this._originalCreationArgs = ku(t)), window.addEventListener("unhandledrejection", this.onUnhandledRejection);
@@ -11008,12 +11108,19 @@ const ke = class {
11008
11108
  onError(t) {
11009
11109
  this.domElement.dispatchEvent(new CustomEvent("error", { detail: t }));
11010
11110
  }
11011
- /** Will destroy all scenes and objects in the scene
11111
+ /**
11112
+ * Clears the context and destroys all scenes and objects in the scene.
11113
+ * The ContextCleared event is called at the end.
11114
+ * This is automatically called when e.g. the `src` attribute changes on `<needle-engine>`
11115
+ * or when the web component is removed from the DOM
11012
11116
  */
11013
11117
  clear() {
11014
11118
  var t, e, i, n;
11015
11119
  pe.dispatchCallback(me.ContextClearing, this), On(this, me.ContextClearing), nn(this.scene, !0, !0), this.scene = new Ri(), (t = this.addressables) == null || t.dispose(), (e = this.lightmaps) == null || e.clear(), (n = (i = this.physics) == null ? void 0 : i.engine) == null || n.clearCaches(), this.lodsManager.disable(), this.isManagedExternally || this.renderer && (this.renderer.renderLists.dispose(), this.renderer.state.reset(), this.renderer.resetState()), pe.dispatchCallback(me.ContextCleared, this);
11016
11120
  }
11121
+ /**
11122
+ * Dispose all allocated resources and clears the scene. This is automatically called e.g. when the `<needle-engine>` component is removed from the DOM.
11123
+ */
11017
11124
  dispose() {
11018
11125
  this.internalOnDestroy();
11019
11126
  }
@@ -11032,17 +11139,20 @@ const ke = class {
11032
11139
  }
11033
11140
  (e = this.domElement) != null && e.parentElement && this.domElement.parentElement.removeChild(this.domElement), this._isCreated = !1, pe.dispatchCallback(me.ContextDestroyed, this), On(this, me.ContextDestroyed), pe.unregister(this), ke.Current === this && (ke.Current = null);
11034
11141
  }
11142
+ /** @internal Automatically called by components when you call `startCoroutine`. Use `startCoroutine` instead */
11035
11143
  registerCoroutineUpdate(t, e, i) {
11036
11144
  return typeof (e == null ? void 0 : e.next) != "function" ? (console.error("Registered invalid coroutine function from " + t.name + `
11037
11145
  Coroutine functions must be generators: "*myCoroutine() {...}"
11038
11146
  Start a coroutine from a component by calling "this.startCoroutine(myCoroutine())"`), e) : (this.coroutines[i] || (this.coroutines[i] = []), this.coroutines[i].push({ comp: t, main: e }), e);
11039
11147
  }
11148
+ /** @internal Automatically called by components. */
11040
11149
  unregisterCoroutineUpdate(t, e) {
11041
11150
  if (!this.coroutines[e])
11042
11151
  return;
11043
11152
  const i = this.coroutines[e].findIndex((n) => n.main === t);
11044
11153
  i >= 0 && this.coroutines[e].splice(i, 1);
11045
11154
  }
11155
+ /** @internal Automatically called */
11046
11156
  stopAllCoroutinesFrom(t) {
11047
11157
  for (const e in this.coroutines) {
11048
11158
  const i = this.coroutines[e];
@@ -11050,6 +11160,7 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
11050
11160
  i[n].comp === t && i.splice(n, 1);
11051
11161
  }
11052
11162
  }
11163
+ /** Change the main camera */
11053
11164
  setCurrentCamera(t) {
11054
11165
  var n;
11055
11166
  if (!t)
@@ -11063,6 +11174,9 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
11063
11174
  const i = t.threeCamera;
11064
11175
  i.isPerspectiveCamera && this.updateAspect(i), (n = this.mainCameraComponent) == null || n.applyClearFlagsIfIsActiveCamera();
11065
11176
  }
11177
+ /**
11178
+ * Remove the camera from the mainCamera stack (if it has been set before with `setCurrentCamera`)
11179
+ */
11066
11180
  removeCamera(t) {
11067
11181
  if (!t)
11068
11182
  return;
@@ -11072,21 +11186,33 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
11072
11186
  this.setCurrentCamera(i);
11073
11187
  }
11074
11188
  }
11075
- /** use this to subscribe to onBeforeRender events on threejs objects */
11189
+ /** Use to subscribe to onBeforeRender events on threejs objects.
11190
+ * @link https://threejs.org/docs/#api/en/core/Object3D.onBeforeRender
11191
+ */
11076
11192
  addBeforeRenderListener(t, e) {
11077
11193
  this._onBeforeRenderListeners.has(t.uuid) || (this._onBeforeRenderListeners.set(t.uuid, []), t.onBeforeRender = this._createRenderCallbackWrapper(t, this._onBeforeRenderListeners)), this._onBeforeRenderListeners.get(t.uuid).push(e);
11078
11194
  }
11195
+ /** Remove callback from three `onBeforeRender` event (if it has been added with `addBeforeRenderListener(...)`)
11196
+ * @link https://threejs.org/docs/#api/en/core/Object3D.onBeforeRender
11197
+ */
11079
11198
  removeBeforeRenderListener(t, e) {
11080
11199
  if (this._onBeforeRenderListeners.has(t.uuid)) {
11081
11200
  const i = this._onBeforeRenderListeners.get(t.uuid), n = i.indexOf(e);
11082
11201
  n >= 0 && i.splice(n, 1);
11083
11202
  }
11084
11203
  }
11085
- /** use this to subscribe to onAfterRender events on threejs objects */
11204
+ /**
11205
+ * Subscribe to onAfterRender events on threejs objects
11206
+ * @link https://threejs.org/docs/#api/en/core/Object3D.onAfterRender
11207
+ */
11086
11208
  addAfterRenderListener(t, e) {
11087
11209
  var i;
11088
11210
  this._onAfterRenderListeners.has(t.uuid) || (this._onAfterRenderListeners.set(t.uuid, []), t.onAfterRender = this._createRenderCallbackWrapper(t, this._onAfterRenderListeners)), (i = this._onAfterRenderListeners.get(t.uuid)) == null || i.push(e);
11089
11211
  }
11212
+ /**
11213
+ * Remove from onAfterRender events on threejs objects
11214
+ * @link https://threejs.org/docs/#api/en/core/Object3D.onAfterRender
11215
+ */
11090
11216
  removeAfterRenderListener(t, e) {
11091
11217
  if (this._onAfterRenderListeners.has(t.uuid)) {
11092
11218
  const i = this._onAfterRenderListeners.get(t.uuid), n = i.indexOf(e);
@@ -11103,6 +11229,7 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
11103
11229
  }
11104
11230
  };
11105
11231
  }
11232
+ /** @returns true while the WebGL renderer is rendering (between onBeforeRender and onAfterRender events) */
11106
11233
  get isRendering() {
11107
11234
  return this._isRendering;
11108
11235
  }
@@ -11120,7 +11247,7 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
11120
11247
  var t;
11121
11248
  return ((t = this._renderTarget) == null ? void 0 : t.texture) || null;
11122
11249
  }
11123
- /** returns true if the dom element is visible on screen */
11250
+ /** @returns true if the `<needle-engine>` DOM element is visible on screen (`context.domElement`) */
11124
11251
  get isVisibleToUser() {
11125
11252
  if (this.isInXR)
11126
11253
  return !0;
@@ -11654,7 +11781,7 @@ function Tm(s) {
11654
11781
  padding-left: 30px;
11655
11782
  `;
11656
11783
  if (Ms === "edu")
11657
- console.log("%c Supported by Needle for Education – https://needle.tools", t);
11784
+ console.log("%c This project is supported by Needle for Education – https://needle.tools", t);
11658
11785
  else
11659
11786
  return;
11660
11787
  const e = document.createElement("div");
@@ -15250,7 +15377,7 @@ class Ds extends I {
15250
15377
  (e.distanceTo(this.lastPosition) > l || i.angleTo(this.lastRotation) > l || n.distanceTo(this.lastScale) > l) && (this._model.hasOwnership ? this._needsUpdate = !0 : (eo && console.log(this.guid, "reset because not owned but", this.gameObject.name, this.lastPosition), this.worldPosition = this.lastPosition, e.copy(this.lastPosition), this.worldQuaternion = this.lastRotation, i.copy(this.lastRotation), this.gameObject.scale.copy(this.lastScale), yn.markDirty(this.gameObject, !0), this._needsUpdate = !1));
15251
15378
  }
15252
15379
  if (this._model && !this._model.hasOwnership && this._model.isOwned && this._receivedDataBefore) {
15253
- const l = this._receivedFastUpdate || this.fastMode ? 0.05 : 0.3;
15380
+ const l = this._receivedFastUpdate || this.fastMode ? 0.5 : 0.3;
15254
15381
  let c = !1;
15255
15382
  if (this.interpolatePosition && this._targetPosition) {
15256
15383
  const h = this.worldPosition;
@@ -20745,13 +20872,13 @@ typeof window < "u" && window.addEventListener("unhandledrejection", (s) => {
20745
20872
  });
20746
20873
  const ss = gt, Hh = "$___Export_Components", JR = "NEEDLE_components";
20747
20874
  var jI;
20748
- class ek {
20875
+ class e2 {
20749
20876
  constructor() {
20750
20877
  r(this, jI);
20751
20878
  }
20752
20879
  }
20753
20880
  jI = sa;
20754
- class tk {
20881
+ class t2 {
20755
20882
  constructor(t, e, i) {
20756
20883
  r(this, "node");
20757
20884
  r(this, "nodeIndex");
@@ -20808,7 +20935,7 @@ class tw {
20808
20935
  writeNode(t, e) {
20809
20936
  const i = this.writer.json.nodes.length;
20810
20937
  ss && console.log(t.name, i, t.uuid);
20811
- const n = new tk(t, i, e);
20938
+ const n = new t2(t, i, e);
20812
20939
  this.exportContext[i] = n, this.objectToNodeMap[t.uuid] = i;
20813
20940
  }
20814
20941
  afterParse(t) {
@@ -20818,7 +20945,7 @@ class tw {
20818
20945
  const n = this.exportContext[i], o = n.node, a = n.nodeDef, l = n.nodeIndex, c = (e = o.userData) == null ? void 0 : e.components;
20819
20946
  if (!c || c.length <= 0)
20820
20947
  continue;
20821
- const h = new ek();
20948
+ const h = new e2();
20822
20949
  a.extensions = a.extensions || {}, a.extensions[this.name] = h, this.context.object = o, this.context.nodeId = l, this.context.objectToNode = this.objectToNodeMap;
20823
20950
  const d = [];
20824
20951
  for (const u of c) {
@@ -20913,7 +21040,7 @@ class tw {
20913
21040
  // }
20914
21041
  }
20915
21042
  const ub = "NEEDLE_gameobject_data";
20916
- class ik {
21043
+ class i2 {
20917
21044
  constructor(t) {
20918
21045
  r(this, "parser");
20919
21046
  this.parser = t;
@@ -20958,7 +21085,7 @@ class ik {
20958
21085
  }
20959
21086
  }
20960
21087
  const fb = "NEEDLE_lighting_settings", la = x("debugenvlight");
20961
- class nk {
21088
+ class n2 {
20962
21089
  constructor(t, e, i) {
20963
21090
  r(this, "parser");
20964
21091
  r(this, "sourceId");
@@ -21052,10 +21179,10 @@ class Dm extends I {
21052
21179
  }
21053
21180
  }
21054
21181
  const lp = x("debugstencil");
21055
- function sk(s, t) {
21182
+ function s2(s, t) {
21056
21183
  return (s & 1 << t.layer) != 0;
21057
21184
  }
21058
- const ok = Symbol("stencils"), nr = class {
21185
+ const o2 = Symbol("stencils"), nr = class {
21059
21186
  constructor(t, e) {
21060
21187
  r(this, "parser");
21061
21188
  r(this, "source");
@@ -21074,13 +21201,13 @@ const ok = Symbol("stencils"), nr = class {
21074
21201
  if (i)
21075
21202
  for (let n = i.length - 1; n >= 0; n--) {
21076
21203
  const o = i[n];
21077
- if (sk(o.layer, t)) {
21204
+ if (s2(o.layer, t)) {
21078
21205
  lp && console.log(o), setTimeout(() => {
21079
21206
  ui() && Ig(t.gameObject) && (ve("Stencil not supported on instanced objects"), console.warn("Stencil not supported on instanced objects", t));
21080
21207
  }, 500);
21081
21208
  for (let a = 0; a < t.sharedMaterials.length; a++) {
21082
21209
  let l = t.sharedMaterials[a];
21083
- l && (l = l.clone(), l[ok] = !0, l.stencilWrite = !0, l.stencilWriteMask = 255, l.stencilFuncMask = 255, l.stencilRef = o.value, l.stencilFunc = o.compareFunc, l.stencilZPass = o.passOp, l.stencilFail = o.failOp, l.stencilZFail = o.zFailOp, t.sharedMaterials[a] = l);
21210
+ l && (l = l.clone(), l[o2] = !0, l.stencilWrite = !0, l.stencilWriteMask = 255, l.stencilFuncMask = 255, l.stencilRef = o.value, l.stencilFunc = o.compareFunc, l.stencilZPass = o.passOp, l.stencilFail = o.failOp, l.stencilZFail = o.zFailOp, t.sharedMaterials[a] = l);
21084
21211
  }
21085
21212
  t.gameObject.renderOrder = o.event * 1e3 + o.index * 50;
21086
21213
  break;
@@ -21090,14 +21217,14 @@ const ok = Symbol("stencils"), nr = class {
21090
21217
  afterRoot(t) {
21091
21218
  const e = this.parser.json.extensions;
21092
21219
  if (e) {
21093
- const i = e[ak];
21220
+ const i = e[a2];
21094
21221
  if (i) {
21095
21222
  lp && console.log(i);
21096
21223
  const n = i.stencil;
21097
21224
  if (n && Array.isArray(n))
21098
21225
  for (const o of n) {
21099
21226
  const a = { ...o };
21100
- a.compareFunc = rk(a.compareFunc), a.passOp = cp(a.passOp), a.failOp = cp(a.failOp), a.zFailOp = cp(a.zFailOp), nr.stencils[this.source] || (nr.stencils[this.source] = []), nr.stencils[this.source].push(a);
21227
+ a.compareFunc = r2(a.compareFunc), a.passOp = cp(a.passOp), a.failOp = cp(a.failOp), a.zFailOp = cp(a.zFailOp), nr.stencils[this.source] || (nr.stencils[this.source] = []), nr.stencils[this.source].push(a);
21101
21228
  }
21102
21229
  }
21103
21230
  }
@@ -21127,7 +21254,7 @@ function cp(s) {
21127
21254
  }
21128
21255
  return 0;
21129
21256
  }
21130
- function rk(s) {
21257
+ function r2(s) {
21131
21258
  switch (s) {
21132
21259
  case 1:
21133
21260
  return Uy;
@@ -21148,10 +21275,10 @@ function rk(s) {
21148
21275
  }
21149
21276
  return Uy;
21150
21277
  }
21151
- const ak = "NEEDLE_render_objects";
21278
+ const a2 = "NEEDLE_render_objects";
21152
21279
  var iw = /* @__PURE__ */ ((s) => (s[s.INT = 5124] = "INT", s[s.FLOAT = 5126] = "FLOAT", s[s.FLOAT_VEC2 = 35664] = "FLOAT_VEC2", s[s.FLOAT_VEC3 = 35665] = "FLOAT_VEC3", s[s.FLOAT_VEC4 = 35666] = "FLOAT_VEC4", s[s.INT_VEC2 = 35667] = "INT_VEC2", s[s.INT_VEC3 = 35668] = "INT_VEC3", s[s.INT_VEC4 = 35669] = "INT_VEC4", s[s.BOOL = 35670] = "BOOL", s[s.BOOL_VEC2 = 35671] = "BOOL_VEC2", s[s.BOOL_VEC3 = 35672] = "BOOL_VEC3", s[s.BOOL_VEC4 = 35673] = "BOOL_VEC4", s[s.FLOAT_MAT2 = 35674] = "FLOAT_MAT2", s[s.FLOAT_MAT3 = 35675] = "FLOAT_MAT3", s[s.FLOAT_MAT4 = 35676] = "FLOAT_MAT4", s[s.SAMPLER_2D = 35678] = "SAMPLER_2D", s[s.SAMPLER_3D = 35680] = "SAMPLER_3D", s[s.SAMPLER_CUBE = 35681] = "SAMPLER_CUBE", s[s.UNKNOWN = 0] = "UNKNOWN", s))(iw || {});
21153
21280
  const Tn = x("debugcustomshader"), qr = "NEEDLE_techniques_webgl";
21154
- class lk {
21281
+ class l2 {
21155
21282
  constructor() {
21156
21283
  r(this, "objectToWorldMatrix", new se());
21157
21284
  r(this, "worldToObjectMatrix", new se());
@@ -21198,7 +21325,7 @@ const Be = class extends a0 {
21198
21325
  r(this, "_worldToObjectName", "hlslcc_mtx4x4unity_WorldToObject");
21199
21326
  r(this, "_viewProjectionName", "hlslcc_mtx4x4unity_MatrixVP");
21200
21327
  r(this, "_viewMatrixName", "hlslcc_mtx4x4unity_MatrixV");
21201
- r(this, "_rendererData", new lk());
21328
+ r(this, "_rendererData", new l2());
21202
21329
  this.identifier = e, Tn && console.log(this), this.type = "NEEDLE_CUSTOM_SHADER", this.uniforms[this._objToWorldName] || (this.uniforms[this._objToWorldName] = { value: [] }), this.uniforms[this._worldToObjectName] || (this.uniforms[this._worldToObjectName] = { value: [] }), this.uniforms[this._viewProjectionName] || (this.uniforms[this._viewProjectionName] = { value: [] }), this.uniforms[this._sphericalHarmonicsName], (this.depthTextureUniform || this.opaqueTextureUniform) && ee.Current.pre_render_callbacks.push(this.onBeforeRenderSceneCallback);
21203
21330
  }
21204
21331
  clone() {
@@ -21279,7 +21406,7 @@ const Be = class extends a0 {
21279
21406
  };
21280
21407
  let Vi = Be;
21281
21408
  r(Vi, "viewProjection", new se()), r(Vi, "_viewProjectionValues", []), r(Vi, "viewMatrix", new se()), r(Vi, "_viewMatrixValues", []), r(Vi, "_worldSpaceCameraPosName", "_WorldSpaceCameraPos"), r(Vi, "_worldSpaceCameraPos", new v()), r(Vi, "_mainLightColor", new ge()), r(Vi, "_mainLightPosition", new v()), r(Vi, "_lightData", new ge());
21282
- class ck {
21409
+ class c2 {
21283
21410
  constructor(t, e) {
21284
21411
  r(this, "parser");
21285
21412
  r(this, "identifier");
@@ -21460,9 +21587,9 @@ function nw(s) {
21460
21587
  });
21461
21588
  }
21462
21589
  }
21463
- const hk = x("debugextensions");
21590
+ const h2 = x("debugextensions");
21464
21591
  let iu;
21465
- const dk = import("./three-examples.js").then((s) => s.GLTFLoaderAnimationPointer).then(async (s) => (iu = s.GLTFAnimationPointerExtension, iu)).catch((s) => {
21592
+ const d2 = import("./three-examples.js").then((s) => s.GLTFLoaderAnimationPointer).then(async (s) => (iu = s.GLTFAnimationPointerExtension, iu)).catch((s) => {
21466
21593
  console.warn("Failed to import GLTFLoaderAnimationPointer. Please use @needle-tools/three for full KHR_animation support", s);
21467
21594
  }), Sr = new Array();
21468
21595
  function KL(s) {
@@ -21476,20 +21603,20 @@ function Zg(s) {
21476
21603
  const t = new tw();
21477
21604
  return s.register((e) => (t.parser = e, t)), t;
21478
21605
  }
21479
- class uk {
21606
+ class u2 {
21480
21607
  resolvePath(t) {
21481
21608
  return t.includes("/extensions/builtin_components/") ? t.replace("/extensions/builtin_components/", "/userData/components/") : t.includes("extensions/builtin_components/") ? t.replace("extensions/builtin_components/", "/userData/components/") : t;
21482
21609
  }
21483
21610
  }
21484
21611
  async function jm(s, t, e) {
21485
21612
  const i = e.indexOf("?");
21486
- i >= 0 && (e = e.substring(0, i)), s.register((n) => new ik(n)), s.register((n) => new QP(n)), s.register((n) => new OO(n, t.lightmaps, e)), s.register((n) => new nk(n, e, t)), s.register((n) => new ck(n, e)), s.register((n) => new _c(n, e)), s.register((n) => new Ze(n, e)), s.register((n) => new ZR(n)), SP() && s.register((n) => new dc(n)), await dk.catch((n) => {
21613
+ i >= 0 && (e = e.substring(0, i)), s.register((n) => new i2(n)), s.register((n) => new QP(n)), s.register((n) => new OO(n, t.lightmaps, e)), s.register((n) => new n2(n, e, t)), s.register((n) => new c2(n, e)), s.register((n) => new _c(n, e)), s.register((n) => new Ze(n, e)), s.register((n) => new ZR(n)), SP() && s.register((n) => new dc(n)), await d2.catch((n) => {
21487
21614
  }), s.register((n) => {
21488
21615
  if (iu) {
21489
21616
  const o = new iu(n);
21490
- return o.setAnimationPointerResolver.bind(o)(new uk()), o;
21617
+ return o.setAnimationPointerResolver.bind(o)(new u2()), o;
21491
21618
  } else
21492
- return (hk || z()) && console.error("Missing KHR_animation_pointer extension..."), {
21619
+ return (h2 || z()) && console.error("Missing KHR_animation_pointer extension..."), {
21493
21620
  name: "KHR_animation_pointer_NOT_AVAILABLE"
21494
21621
  };
21495
21622
  });
@@ -21528,12 +21655,12 @@ class rw {
21528
21655
  }, n[this.name] = !0;
21529
21656
  }
21530
21657
  }
21531
- var fk = Object.defineProperty, pk = Object.getOwnPropertyDescriptor, aw = (s, t, e, i) => {
21532
- for (var n = i > 1 ? void 0 : i ? pk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
21658
+ var f2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, aw = (s, t, e, i) => {
21659
+ for (var n = i > 1 ? void 0 : i ? p2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
21533
21660
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
21534
- return i && n && fk(t, e, n), n;
21661
+ return i && n && f2(t, e, n), n;
21535
21662
  };
21536
- const Ll = x("debugreflectionprobe"), pb = x("noreflectionprobe"), mk = Symbol("reflectionProbeKey"), gk = Symbol("original material");
21663
+ const Ll = x("debugreflectionprobe"), pb = x("noreflectionprobe"), m2 = Symbol("reflectionProbeKey"), g2 = Symbol("original material");
21537
21664
  var ad;
21538
21665
  const cs = (ad = class extends I {
21539
21666
  constructor() {
@@ -21613,7 +21740,7 @@ const cs = (ad = class extends I {
21613
21740
  d.version = o.version, a ? (a.copy = d, a.material = o) : (a = {
21614
21741
  material: o,
21615
21742
  copy: d
21616
- }, e.push(a)), d[mk] = this, d[gk] = o, Ll && console.log("Set reflection", t.name, t.guid);
21743
+ }, e.push(a)), d[m2] = this, d[g2] = o, Ll && console.log("Set reflection", t.name, t.guid);
21617
21744
  }
21618
21745
  a && a.copy && (a.copy.onBeforeCompile = o.onBeforeCompile);
21619
21746
  const h = a == null ? void 0 : a.copy;
@@ -22122,20 +22249,20 @@ Texture:`, i), this.setLightmapDebugMaterial()) : Xr && console.log("Use debugli
22122
22249
  });
22123
22250
  }
22124
22251
  }
22125
- var yk = Object.defineProperty, _k = Object.getOwnPropertyDescriptor, Ns = (s, t, e, i) => {
22126
- for (var n = i > 1 ? void 0 : i ? _k(t, e) : t, o = s.length - 1, a; o >= 0; o--)
22252
+ var y2 = Object.defineProperty, _2 = Object.getOwnPropertyDescriptor, Ns = (s, t, e, i) => {
22253
+ for (var n = i > 1 ? void 0 : i ? _2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
22127
22254
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
22128
- return i && n && yk(t, e, n), n;
22255
+ return i && n && y2(t, e, n), n;
22129
22256
  };
22130
- const Jl = x("debugrenderer"), gb = x("debugskinnedmesh"), yb = x("noinstancing"), bk = x("wireframe");
22131
- class vk {
22257
+ const Jl = x("debugrenderer"), gb = x("debugskinnedmesh"), yb = x("noinstancing"), b2 = x("wireframe");
22258
+ class v2 {
22132
22259
  constructor() {
22133
22260
  r(this, "path", null);
22134
22261
  r(this, "asset", null);
22135
22262
  r(this, "default");
22136
22263
  }
22137
22264
  }
22138
- class wk {
22265
+ class w2 {
22139
22266
  constructor(t, e) {
22140
22267
  r(this, "_renderer");
22141
22268
  r(this, "_targets", []);
@@ -22348,7 +22475,7 @@ const Od = class extends I {
22348
22475
  }
22349
22476
  //@ts-ignore
22350
22477
  get sharedMaterials() {
22351
- return (!this._sharedMaterials || !this._sharedMaterials.is(this)) && (this._originalMaterials || (this._originalMaterials = []), this._sharedMaterials = new wk(this, this._originalMaterials)), this._sharedMaterials;
22478
+ return (!this._sharedMaterials || !this._sharedMaterials.is(this)) && (this._originalMaterials || (this._originalMaterials = []), this._sharedMaterials = new w2(this, this._originalMaterials)), this._sharedMaterials;
22352
22479
  }
22353
22480
  static get shouldSuppressInstancing() {
22354
22481
  return yb;
@@ -22390,7 +22517,7 @@ const Od = class extends I {
22390
22517
  }
22391
22518
  } else
22392
22519
  this.isMeshOrSkinnedMesh(this.gameObject) ? (this.context.addBeforeRenderListener(this.gameObject, this.onBeforeRenderThree), this.renderOrder !== void 0 && this.renderOrder.length > 0 && (this.gameObject.renderOrder = this.renderOrder[0])) : this.context.addBeforeRenderListener(this.gameObject, this.onBeforeRenderThree);
22393
- if (this.applyLightmapping(), bk)
22520
+ if (this.applyLightmapping(), b2)
22394
22521
  for (let t = 0; t < this.sharedMaterials.length; t++) {
22395
22522
  const e = this.sharedMaterials[t];
22396
22523
  e && (e.wireframe = !0);
@@ -22624,10 +22751,10 @@ class cw extends Ku {
22624
22751
  this._needUpdateBoundingSphere = !0;
22625
22752
  }
22626
22753
  }
22627
- var xk = Object.defineProperty, Sk = Object.getOwnPropertyDescriptor, hw = (s, t, e, i) => {
22628
- for (var n = i > 1 ? void 0 : i ? Sk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
22754
+ var x2 = Object.defineProperty, S2 = Object.getOwnPropertyDescriptor, hw = (s, t, e, i) => {
22755
+ for (var n = i > 1 ? void 0 : i ? S2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
22629
22756
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
22630
- return i && n && xk(t, e, n), n;
22757
+ return i && n && x2(t, e, n), n;
22631
22758
  };
22632
22759
  const Gh = x("debuggltfexport");
22633
22760
  class dw extends wi {
@@ -22770,8 +22897,8 @@ typeof globalThis !== void 0 && !("OffscreenCanvas" in globalThis) && (globalThi
22770
22897
  }), this.canvas;
22771
22898
  }
22772
22899
  });
22773
- const Ck = x("debugprogress");
22774
- function Pk(s) {
22900
+ const C2 = x("debugprogress");
22901
+ function P2(s) {
22775
22902
  s = s || /* @__PURE__ */ new Date();
22776
22903
  const t = s.getMonth() + 1, e = s.getDate(), i = s.getHours(), n = s.getMinutes(), o = s.getSeconds(), a = (t < 10 ? "0" : "") + t, l = (e < 10 ? "0" : "") + e, c = (i < 10 ? "0" : "") + i, h = (n < 10 ? "0" : "") + n, d = (o < 10 ? "0" : "") + o;
22777
22904
  return s.getFullYear() + a + l + "-" + c + h + d;
@@ -22819,7 +22946,7 @@ class de {
22819
22946
  */
22820
22947
  static start(t, e) {
22821
22948
  typeof e == "string" && (e = { parentScope: e });
22822
- const i = new Ok(t, e);
22949
+ const i = new O2(t, e);
22823
22950
  ec.set(t, i);
22824
22951
  }
22825
22952
  /** Report progress for a formerly started scope.
@@ -22858,7 +22985,7 @@ class de {
22858
22985
  }
22859
22986
  }
22860
22987
  const ec = /* @__PURE__ */ new Map();
22861
- class Ok {
22988
+ class O2 {
22862
22989
  constructor(t, e) {
22863
22990
  r(this, "scopeLabel");
22864
22991
  r(this, "parentScope");
@@ -22873,7 +23000,7 @@ class Ok {
22873
23000
  r(this, "totalProgress", 0);
22874
23001
  r(this, "selfReports", 0);
22875
23002
  r(this, "totalReports", 0);
22876
- this.parentScope = e != null && e.parentScope ? ec.get(e.parentScope) : void 0, this.parentScope && (this.parentScope.childScopes.push(this), this.parentDepth = this.parentScope.parentDepth + 1), this.scopeLabel = " ".repeat(this.parentDepth * 2) + t, this.showLogs = (e == null ? void 0 : e.logTimings) ?? !!Ck, this.showLogs && console.time(this.scopeLabel), this.onProgress = e == null ? void 0 : e.onProgress;
23003
+ this.parentScope = e != null && e.parentScope ? ec.get(e.parentScope) : void 0, this.parentScope && (this.parentScope.childScopes.push(this), this.parentDepth = this.parentScope.parentDepth + 1), this.scopeLabel = " ".repeat(this.parentDepth * 2) + t, this.showLogs = (e == null ? void 0 : e.logTimings) ?? !!C2, this.showLogs && console.time(this.scopeLabel), this.onProgress = e == null ? void 0 : e.onProgress;
22877
23004
  }
22878
23005
  report(t, e = !1) {
22879
23006
  if (t) {
@@ -22937,7 +23064,7 @@ function pw(s) {
22937
23064
  }
22938
23065
  return e;
22939
23066
  }
22940
- const Mk = new v(), Rk = new W(), kk = new v(1, 1, 1), sr = class {
23067
+ const M2 = new v(), R2 = new W(), k2 = new v(1, 1, 1), sr = class {
22941
23068
  constructor(t, e, i = null, n = null, o = null, a = null, l = null, c = null) {
22942
23069
  r(this, "uuid");
22943
23070
  r(this, "name");
@@ -22973,7 +23100,7 @@ const Mk = new v(), Rk = new W(), kk = new v(1, 1, 1), sr = class {
22973
23100
  if (!this.transform)
22974
23101
  return new se();
22975
23102
  const { position: t, quaternion: e, scale: i } = this.transform, n = new se();
22976
- return n.compose(t || Mk, e || Rk, i || kk), n;
23103
+ return n.compose(t || M2, e || R2, i || k2), n;
22977
23104
  }
22978
23105
  setMatrix(t) {
22979
23106
  if (!t || !(t instanceof se)) {
@@ -23128,7 +23255,7 @@ ${d}
23128
23255
  }
23129
23256
  const Qr = `
23130
23257
  `, Ht = "</StageRoot/Materials";
23131
- class Tk {
23258
+ class T2 {
23132
23259
  constructor() {
23133
23260
  r(this, "str");
23134
23261
  r(this, "indent");
@@ -23162,7 +23289,7 @@ class Tk {
23162
23289
  return e + t;
23163
23290
  }
23164
23291
  }
23165
- class Ak {
23292
+ class A2 {
23166
23293
  constructor(t, e, i) {
23167
23294
  r(this, "root");
23168
23295
  r(this, "exporter");
@@ -23190,7 +23317,7 @@ class hp {
23190
23317
  r(this, "exportInvisible", !1);
23191
23318
  }
23192
23319
  }
23193
- let Ek = class {
23320
+ let E2 = class {
23194
23321
  constructor() {
23195
23322
  r(this, "debug");
23196
23323
  r(this, "pruneUnusedNodes");
@@ -23203,7 +23330,7 @@ let Ek = class {
23203
23330
  async parse(t, e = new hp()) {
23204
23331
  var w, P;
23205
23332
  e = Object.assign(new hp(), e), this.sceneAnchoringOptions = e;
23206
- const i = new Ak(t, this, e);
23333
+ const i = new A2(t, this, e);
23207
23334
  this.extensions = i.extensions;
23208
23335
  const n = i.files, o = "model.usda";
23209
23336
  n[o] = null;
@@ -23235,7 +23362,7 @@ let Ek = class {
23235
23362
  this.debug && _b(i.document, "Hierarchy BEFORE pruning", k), yw(i.document, k), this.debug && _b(i.document, "Hierarchy AFTER pruning");
23236
23363
  } else
23237
23364
  this.debug && console.log("Pruning of empty nodes is disabled. This may result in a larger USDZ file.");
23238
- de.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await Ik(i, () => (de.report("export-usdz", "Building materials"), Wk(a, l, e.quickLookCompatible))), de.report("export-usdz", "Invoking onAfterSerialize"), await Md(i, "onAfterSerialize");
23365
+ de.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await I2(i, () => (de.report("export-usdz", "Building materials"), W2(a, l, e.quickLookCompatible))), de.report("export-usdz", "Invoking onAfterSerialize"), await Md(i, "onAfterSerialize");
23239
23366
  for (const k of c) {
23240
23367
  const { object: O, originalParent: R, newParent: E } = k;
23241
23368
  R && R.add(O);
@@ -23258,8 +23385,8 @@ let Ek = class {
23258
23385
  };
23259
23386
  de.report("export-usdz-textures", { message: "read back texture", autoStep: !0 });
23260
23387
  const A = O.scale !== void 0 && O.scale.x !== 1 && O.scale.y !== 1 && O.scale.z !== 1 && O.scale.w !== 1;
23261
- (R.isCompressedTexture || R.isRenderTargetTexture || A) && (B = await Lk(R, e.maxTextureSize, g, O.scale)), de.report("export-usdz-textures", { message: "convert texture to canvas", autoStep: !0 });
23262
- const F = await jk(B.imageBitmap || B.imageData, e.maxTextureSize).catch((U) => {
23388
+ (R.isCompressedTexture || R.isRenderTargetTexture || A) && (B = await L2(R, e.maxTextureSize, g, O.scale)), de.report("export-usdz-textures", { message: "convert texture to canvas", autoStep: !0 });
23389
+ const F = await j2(B.imageBitmap || B.imageData, e.maxTextureSize).catch((U) => {
23263
23390
  console.error("Error converting texture to canvas", R, U);
23264
23391
  });
23265
23392
  if (F) {
@@ -23360,7 +23487,7 @@ function yw(s, t) {
23360
23487
  keptChilds: n
23361
23488
  }), c;
23362
23489
  }
23363
- async function Ik(s, t) {
23490
+ async function I2(s, t) {
23364
23491
  de.start("export-usdz-resources", "export-usdz");
23365
23492
  const e = [];
23366
23493
  for (const c of s.document.children)
@@ -23371,7 +23498,7 @@ async function Ik(s, t) {
23371
23498
  e[c](), h();
23372
23499
  });
23373
23500
  de.end("export-usdz-resources");
23374
- const n = new Tk(), o = s.exporter.sceneAnchoringOptions.ar;
23501
+ const n = new T2(), o = s.exporter.sceneAnchoringOptions.ar;
23375
23502
  n.beginBlock(`def Xform "${s.document.name}"`), n.beginBlock(`def Scope "Scenes" (
23376
23503
  kind = "sceneLibrary"
23377
23504
  )`), n.beginBlock('def Xform "Scene"', "(", !1), n.appendLine('apiSchemas = ["Preliminary_AnchoringAPI"]'), n.appendLine("customData = {"), n.appendLine(" bool preliminary_collidesWithEnvironment = 0"), n.appendLine(' string sceneName = "Scene"'), n.appendLine("}"), n.appendLine('sceneName = "Scene"'), n.closeBlock(")"), n.beginBlock(), n.appendLine(`token preliminary:anchoring:type = "${o.anchoring.type}"`), o.anchoring.type === "plane" && n.appendLine(`token preliminary:planeAnchoring:alignment = "${o.planeAnchoring.alignment}"`), o.anchoring.type === "image" && n.appendLine(`rel preliminary:imageAnchoring:referenceImage = </${s.document.name}/Scenes/Scene/AnchoringReferenceImage>`), n.appendLine();
@@ -23398,8 +23525,8 @@ function _w(s, t, e) {
23398
23525
  if (!(o in t.files)) {
23399
23526
  const a = () => {
23400
23527
  var c, h;
23401
- const l = Uk(i, (h = (c = s.skinnedMesh) == null ? void 0 : c.skeleton) == null ? void 0 : h.bones, t.quickLookCompatible);
23402
- t.files[o] = zk(l);
23528
+ const l = U2(i, (h = (c = s.skinnedMesh) == null ? void 0 : c.skeleton) == null ? void 0 : h.bones, t.quickLookCompatible);
23529
+ t.files[o] = z2(l);
23403
23530
  };
23404
23531
  e.push(a);
23405
23532
  }
@@ -23419,7 +23546,7 @@ async function Md(s, t, e = null) {
23419
23546
  }
23420
23547
  }
23421
23548
  let qh = null, Gt = null, dp, Yr, Xh;
23422
- async function Lk(s, t = 1 / 0, e = null, i = void 0) {
23549
+ async function L2(s, t = 1 / 0, e = null, i = void 0) {
23423
23550
  dp || (dp = new Gn(2, 2, 1, 1)), Yr || (Yr = new bn({
23424
23551
  uniforms: {
23425
23552
  blitTexture: new fo(s),
@@ -23466,17 +23593,17 @@ async function Lk(s, t = 1 / 0, e = null, i = void 0) {
23466
23593
  imageBitmap: u
23467
23594
  };
23468
23595
  }
23469
- function Dk(s) {
23596
+ function D2(s) {
23470
23597
  return typeof HTMLImageElement < "u" && s instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && s instanceof HTMLCanvasElement || typeof OffscreenCanvas < "u" && s instanceof OffscreenCanvas || typeof ImageBitmap < "u" && s instanceof ImageBitmap;
23471
23598
  }
23472
- async function jk(s, t = 4096) {
23599
+ async function j2(s, t = 4096) {
23473
23600
  const e = t / Math.max(s.width, s.height), i = s.width * Math.min(1, e), n = s.height * Math.min(1, e), o = new OffscreenCanvas(i, n), a = { premultiplyAlpha: "none" };
23474
23601
  s.width !== i && (a.resizeWidth = i), s.height !== n && (a.resizeHeight = n);
23475
23602
  const l = await createImageBitmap(s, a), c = o.getContext("bitmaprenderer");
23476
23603
  return c && c.transferFromImageBitmap(l), o;
23477
23604
  }
23478
- async function Bk(s, t = void 0, e = !1, i = 4096) {
23479
- if (Dk(s)) {
23605
+ async function B2(s, t = void 0, e = !1, i = 4096) {
23606
+ if (D2(s)) {
23480
23607
  const n = i / Math.max(s.width, s.height), o = new OffscreenCanvas(s.width * Math.min(1, n), s.height * Math.min(1, n)), a = o.getContext("2d", { alpha: !0, premultipliedAlpha: !1 });
23481
23608
  if (!a)
23482
23609
  throw new Error("Could not get canvas 2D context");
@@ -23491,7 +23618,7 @@ async function Bk(s, t = void 0, e = !1, i = 4096) {
23491
23618
  throw new Error("NeedleUSDZExporter: No valid image data found. Unable to process texture.");
23492
23619
  }
23493
23620
  const Le = 7;
23494
- function Fk() {
23621
+ function F2() {
23495
23622
  return `#usda 1.0
23496
23623
  (
23497
23624
  customLayerData = {
@@ -23502,8 +23629,8 @@ function Fk() {
23502
23629
  )
23503
23630
  `;
23504
23631
  }
23505
- function zk(s, t) {
23506
- let e = Fk();
23632
+ function z2(s, t) {
23633
+ let e = F2();
23507
23634
  return e += s, p0(e);
23508
23635
  }
23509
23636
  function Qh(s) {
@@ -23563,13 +23690,13 @@ function vb(s) {
23563
23690
  function Yh(s, t) {
23564
23691
  return `(${he(s[t + 0])}, ${he(s[t + 1])}, ${he(s[t + 2])}, ${he(s[t + 3])})`;
23565
23692
  }
23566
- function Uk(s, t = [], e = !0) {
23693
+ function U2(s, t = [], e = !0) {
23567
23694
  return `
23568
23695
  def "Geometry"
23569
- ${Nk(s, t, e)}
23696
+ ${N2(s, t, e)}
23570
23697
  `;
23571
23698
  }
23572
- function Nk(s, t = [], e = !0) {
23699
+ function N2(s, t = [], e = !0) {
23573
23700
  const i = "Geometry", n = s.attributes, o = n.position.count, a = t && t.length > 0, l = [], c = [];
23574
23701
  let h = new Array(), d = n.skinIndex;
23575
23702
  if (a) {
@@ -23686,7 +23813,7 @@ function pp(s, t) {
23686
23813
  interpolation = "vertex"
23687
23814
  )`;
23688
23815
  case 4:
23689
- return `double4[] primvars:${s} = [${$k(t, e)}] (
23816
+ return `double4[] primvars:${s} = [${$2(t, e)}] (
23690
23817
  interpolation = "vertex"
23691
23818
  )`;
23692
23819
  default:
@@ -23703,7 +23830,7 @@ function Rd(s, t) {
23703
23830
  }
23704
23831
  return e.join(", ");
23705
23832
  }
23706
- function $k(s, t) {
23833
+ function $2(s, t) {
23707
23834
  if (s === void 0)
23708
23835
  return console.warn("USDZExporter: Attribute is missing. Results may be undefined."), Array(t).fill("(0, 0, 0, 0)").join(", ");
23709
23836
  const e = [];
@@ -23732,11 +23859,11 @@ function vw(s, t, e = !1) {
23732
23859
  }
23733
23860
  return i.join(", ");
23734
23861
  }
23735
- function Wk(s, t, e = !1) {
23862
+ function W2(s, t, e = !1) {
23736
23863
  const i = [];
23737
23864
  for (const n in s) {
23738
23865
  const o = s[n];
23739
- i.push(Vk(o, t, e));
23866
+ i.push(V2(o, t, e));
23740
23867
  }
23741
23868
  return `
23742
23869
  def "Materials"
@@ -23744,7 +23871,7 @@ function Wk(s, t, e = !1) {
23744
23871
  ${i.join("")}
23745
23872
  }`;
23746
23873
  }
23747
- function Vk(s, t, e = !1) {
23874
+ function V2(s, t, e = !1) {
23748
23875
  var g, y, _;
23749
23876
  const i = Jg(s);
23750
23877
  if (s.colorWrite === !1 || ((g = s.userData) == null ? void 0 : g.isShadowCatcherMaterial) || ((y = s.userData) == null ? void 0 : y.isLightBlendMaterial)) {
@@ -24216,7 +24343,7 @@ class ye {
24216
24343
  }
24217
24344
  */
24218
24345
  }
24219
- class Hk {
24346
+ class H2 {
24220
24347
  constructor(t) {
24221
24348
  r(this, "object");
24222
24349
  r(this, "model");
@@ -24233,7 +24360,7 @@ class Hk {
24233
24360
  this.onApply(t);
24234
24361
  }
24235
24362
  }
24236
- class xw extends Hk {
24363
+ class xw extends H2 {
24237
24364
  constructor(e, i, n, o) {
24238
24365
  super(e);
24239
24366
  r(this, "matrix");
@@ -24259,7 +24386,7 @@ class xw extends Hk {
24259
24386
  return this._disableAction ? this._disableAction : (this._disableAction = ye.fadeAction(this.object, 0, !1), this._disableAction);
24260
24387
  }
24261
24388
  }
24262
- class Gk {
24389
+ class G2 {
24263
24390
  constructor(t) {
24264
24391
  r(this, "actions");
24265
24392
  r(this, "sortedActions");
@@ -24640,11 +24767,11 @@ class ey {
24640
24767
  const a = o;
24641
24768
  typeof a.createAnimation == "function" && a.createAnimation(this, e, i);
24642
24769
  }, !1);
24643
- const n = new qk(t, this);
24770
+ const n = new q2(t, this);
24644
24771
  this.serializers.push(n), n.registerCallback(e);
24645
24772
  }
24646
24773
  }
24647
- class qk {
24774
+ class q2 {
24648
24775
  constructor(t, e) {
24649
24776
  r(this, "model");
24650
24777
  r(this, "object");
@@ -24896,7 +25023,7 @@ class qk {
24896
25023
  h(l, "position"), h(l, "rotation"), h(l, "scale");
24897
25024
  }
24898
25025
  }
24899
- const Xk = x("debugusdz");
25026
+ const X2 = x("debugusdz");
24900
25027
  class nl {
24901
25028
  constructor() {
24902
25029
  r(this, "files", new Array());
@@ -24931,7 +25058,7 @@ class nl {
24931
25058
  for (const e of this.files) {
24932
25059
  const i = "audio/" + e.name;
24933
25060
  if (t.files[i]) {
24934
- Xk && console.warn("Audio file with name " + i + " already exists in the context. Skipping.");
25061
+ X2 && console.warn("Audio file with name " + i + " already exists in the context. Skipping.");
24935
25062
  continue;
24936
25063
  }
24937
25064
  const a = await (await (await fetch(e.path)).blob()).arrayBuffer(), l = new Uint8Array(a);
@@ -24939,10 +25066,10 @@ class nl {
24939
25066
  }
24940
25067
  }
24941
25068
  }
24942
- var Qk = Object.defineProperty, Yk = Object.getOwnPropertyDescriptor, Ve = (s, t, e, i) => {
24943
- for (var n = i > 1 ? void 0 : i ? Yk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
25069
+ var Q2 = Object.defineProperty, Y2 = Object.getOwnPropertyDescriptor, Ve = (s, t, e, i) => {
25070
+ for (var n = i > 1 ? void 0 : i ? Y2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
24944
25071
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
24945
- return i && n && Qk(t, e, n), n;
25072
+ return i && n && Q2(t, e, n), n;
24946
25073
  };
24947
25074
  const Pb = x("debugusdzbehaviours");
24948
25075
  function rh(s) {
@@ -25740,12 +25867,12 @@ const By = class {
25740
25867
  };
25741
25868
  let wo = By;
25742
25869
  r(wo, "_instance");
25743
- var Kk = Object.defineProperty, Zk = Object.getOwnPropertyDescriptor, vt = (s, t, e, i) => {
25744
- for (var n = i > 1 ? void 0 : i ? Zk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
25870
+ var K2 = Object.defineProperty, Z2 = Object.getOwnPropertyDescriptor, vt = (s, t, e, i) => {
25871
+ for (var n = i > 1 ? void 0 : i ? Z2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
25745
25872
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
25746
- return i && n && Kk(t, e, n), n;
25873
+ return i && n && K2(t, e, n), n;
25747
25874
  };
25748
- const nu = x("debugspriterenderer"), Jk = x("wireframe"), gu = class {
25875
+ const nu = x("debugspriterenderer"), J2 = x("wireframe"), gu = class {
25749
25876
  static getOrCreateGeometry(t) {
25750
25877
  if (t.__cached_geometry)
25751
25878
  return t.__cached_geometry;
@@ -25765,7 +25892,7 @@ const nu = x("debugspriterenderer"), Jk = x("wireframe"), gu = class {
25765
25892
  };
25766
25893
  let br = gu;
25767
25894
  r(br, "cache", {});
25768
- class e2 {
25895
+ class ek {
25769
25896
  constructor() {
25770
25897
  r(this, "x");
25771
25898
  r(this, "y");
@@ -25990,7 +26117,7 @@ class Ii extends I {
25990
26117
  this._currentSprite.geometry = br.getOrCreateGeometry(n), this._currentSprite.material.map = n.texture;
25991
26118
  else {
25992
26119
  const a = new Me({ color: 16777215, side: ki });
25993
- if (Jk && (a.wireframe = !0), this.color && (a.color || (a.color = new ce()), a.color.copy(this.color), a.opacity = this.color.alpha), a.transparent = !0, a.toneMapped = this.toneMapped, a.depthWrite = !1, n.texture && !a.wireframe) {
26120
+ if (J2 && (a.wireframe = !0), this.color && (a.color || (a.color = new ce()), a.color.copy(this.color), a.opacity = this.color.alpha), a.transparent = !0, a.toneMapped = this.toneMapped, a.depthWrite = !1, n.texture && !a.wireframe) {
25994
26121
  let l = n.texture;
25995
26122
  l[mp] !== void 0 && l[mp] !== this && this.spriteFrames > 1 && (l = n.texture = l.clone()), l[mp] = this, a.map = l;
25996
26123
  }
@@ -26003,7 +26130,7 @@ vt([
26003
26130
  f()
26004
26131
  ], Ii.prototype, "drawMode", 2);
26005
26132
  vt([
26006
- f(e2)
26133
+ f(ek)
26007
26134
  ], Ii.prototype, "size", 2);
26008
26135
  vt([
26009
26136
  f(le)
@@ -26029,7 +26156,7 @@ vt([
26029
26156
  vt([
26030
26157
  f(vr)
26031
26158
  ], Ii.prototype, "sprite", 1);
26032
- const Ob = x("debugwebxr"), t2 = new se().makeRotationY(Math.PI), ba = class extends I {
26159
+ const Ob = x("debugwebxr"), tk = new se().makeRotationY(Math.PI), ba = class extends I {
26033
26160
  constructor() {
26034
26161
  super(...arguments);
26035
26162
  r(this, "_arScale", 1);
@@ -26278,7 +26405,7 @@ const Ob = x("debugwebxr"), t2 = new se().makeRotationY(Math.PI), ba = class ext
26278
26405
  return;
26279
26406
  }
26280
26407
  const n = i.parent || this.context.scene;
26281
- this._rigPlacementMatrix ? (l = this._rigPlacementMatrix) == null || l.decompose(i.position, i.quaternion, i.scale) : this._rigPlacementMatrix = i.matrix.clone(), this.applyViewBasedTransform(e), e.updateMatrix(), this.context.scene.add(e), e.attach(i), e.removeFromParent(), i.scale.set(this.arScale, this.arScale, this.arScale), i.position.multiplyScalar(this.arScale), i.updateMatrix(), this.invertForward && i.matrix.premultiply(t2), i.matrix.premultiply(this._startOffset), i.matrix.decompose(i.position, i.quaternion, i.scale), n.add(i);
26408
+ this._rigPlacementMatrix ? (l = this._rigPlacementMatrix) == null || l.decompose(i.position, i.quaternion, i.scale) : this._rigPlacementMatrix = i.matrix.clone(), this.applyViewBasedTransform(e), e.updateMatrix(), this.context.scene.add(e), e.attach(i), e.removeFromParent(), i.scale.set(this.arScale, this.arScale, this.arScale), i.position.multiplyScalar(this.arScale), i.updateMatrix(), this.invertForward && i.matrix.premultiply(tk), i.matrix.premultiply(this._startOffset), i.matrix.decompose(i.position, i.quaternion, i.scale), n.add(i);
26282
26409
  }
26283
26410
  };
26284
26411
  let gn = ba;
@@ -26430,7 +26557,7 @@ const yu = class {
26430
26557
  let ha = yu;
26431
26558
  r(ha, "up", new v(0, 1, 0)), r(ha, "zero", new v(0, 0, 0)), r(ha, "one", new v(1, 1, 1));
26432
26559
  const ao = x("debugautosync"), gp = Symbol("syncerId");
26433
- class i2 {
26560
+ class ik {
26434
26561
  constructor() {
26435
26562
  r(this, "_syncers", {});
26436
26563
  }
@@ -26439,15 +26566,15 @@ class i2 {
26439
26566
  return null;
26440
26567
  if (this._syncers[t.guid])
26441
26568
  return this._syncers[t.guid];
26442
- const e = new n2(t);
26569
+ const e = new nk(t);
26443
26570
  return e[gp] = t.guid, this._syncers[e[gp]] = e, e;
26444
26571
  }
26445
26572
  removeSyncer(t) {
26446
26573
  delete this._syncers[t[gp]];
26447
26574
  }
26448
26575
  }
26449
- const ty = new i2();
26450
- class n2 {
26576
+ const ty = new ik();
26577
+ class nk {
26451
26578
  constructor(t) {
26452
26579
  r(this, "comp");
26453
26580
  // private getters: { [key: string]: Function } = {};
@@ -26500,18 +26627,18 @@ class n2 {
26500
26627
  this._isReceiving || (ao && console.log("Property changed: " + t, e), this.hasChanges = !0, this.changedProperties[t] = e);
26501
26628
  }
26502
26629
  }
26503
- function s2(s, t) {
26630
+ function sk(s, t) {
26504
26631
  let e = t !== s;
26505
26632
  return !e && s && t && (Array.isArray(s) && Array.isArray(t) || typeof s == "object" && typeof t == "object") && (e = !0), e;
26506
26633
  }
26507
26634
  const vc = Symbol("AutoSyncHandler");
26508
- function o2(s) {
26635
+ function ok(s) {
26509
26636
  if (s[vc])
26510
26637
  return s[vc];
26511
26638
  const t = ty.getOrCreateSyncer(s);
26512
26639
  return t == null || t.init(s), s[vc] = t, t;
26513
26640
  }
26514
- function r2(s) {
26641
+ function rk(s) {
26515
26642
  const t = s[vc];
26516
26643
  t && (ty.removeSyncer(t), t.destroy(), delete s[vc]);
26517
26644
  }
@@ -26546,8 +26673,8 @@ const Pw = function(s = null) {
26546
26673
  }
26547
26674
  p = !0;
26548
26675
  try {
26549
- const _ = s2(m, g);
26550
- ao && console.log("SyncField assignment", i, "changed?", _, m, o), _ && (o == null ? void 0 : o.call(this, m, g)) !== !1 && ((y = o2(this)) == null || y.notifyChanged(i, m));
26676
+ const _ = sk(m, g);
26677
+ ao && console.log("SyncField assignment", i, "changed?", _, m, o), _ && (o == null ? void 0 : o.call(this, m, g)) !== !1 && ((y = ok(this)) == null || y.notifyChanged(i, m));
26551
26678
  } finally {
26552
26679
  p = !1;
26553
26680
  }
@@ -26563,14 +26690,14 @@ const Pw = function(s = null) {
26563
26690
  };
26564
26691
  const h = a.__internalDestroy;
26565
26692
  a.__internalDestroy = function() {
26566
- r2(this), h.call(this);
26693
+ rk(this), h.call(this);
26567
26694
  };
26568
26695
  };
26569
26696
  };
26570
- var a2 = Object.defineProperty, l2 = Object.getOwnPropertyDescriptor, tf = (s, t, e, i) => {
26571
- for (var n = i > 1 ? void 0 : i ? l2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
26697
+ var ak = Object.defineProperty, lk = Object.getOwnPropertyDescriptor, tf = (s, t, e, i) => {
26698
+ for (var n = i > 1 ? void 0 : i ? lk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
26572
26699
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
26573
- return i && n && a2(t, e, n), n;
26700
+ return i && n && ak(t, e, n), n;
26574
26701
  };
26575
26702
  const Yt = x("debugplayersync"), Ow = class extends I {
26576
26703
  constructor() {
@@ -26673,7 +26800,7 @@ tf([
26673
26800
  tf([
26674
26801
  f(xe)
26675
26802
  ], hh.prototype, "onPlayerSpawned", 2);
26676
- var c2 = /* @__PURE__ */ ((s) => (s.OwnerChanged = "ownerChanged", s))(c2 || {}), Hl;
26803
+ var ck = /* @__PURE__ */ ((s) => (s.OwnerChanged = "ownerChanged", s))(ck || {}), Hl;
26677
26804
  const Rt = (Hl = class extends I {
26678
26805
  constructor() {
26679
26806
  super(...arguments);
@@ -26807,10 +26934,10 @@ let Ji = Rt;
26807
26934
  tf([
26808
26935
  Pw(Ji.prototype.onOwnerChange)
26809
26936
  ], Ji.prototype, "owner", 2);
26810
- var h2 = Object.defineProperty, d2 = Object.getOwnPropertyDescriptor, rl = (s, t, e, i) => {
26811
- for (var n = i > 1 ? void 0 : i ? d2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
26937
+ var hk = Object.defineProperty, dk = Object.getOwnPropertyDescriptor, rl = (s, t, e, i) => {
26938
+ for (var n = i > 1 ? void 0 : i ? dk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
26812
26939
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
26813
- return i && n && h2(t, e, n), n;
26940
+ return i && n && hk(t, e, n), n;
26814
26941
  };
26815
26942
  class $s extends I {
26816
26943
  constructor() {
@@ -26854,10 +26981,10 @@ rl([
26854
26981
  rl([
26855
26982
  f()
26856
26983
  ], $s.prototype, "createQRCodeButton", 2);
26857
- var u2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, iy = (s, t, e, i) => {
26858
- for (var n = i > 1 ? void 0 : i ? f2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
26984
+ var uk = Object.defineProperty, fk = Object.getOwnPropertyDescriptor, iy = (s, t, e, i) => {
26985
+ for (var n = i > 1 ? void 0 : i ? fk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
26859
26986
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
26860
- return i && n && u2(t, e, n), n;
26987
+ return i && n && uk(t, e, n), n;
26861
26988
  };
26862
26989
  const Dl = x("debugwebxr"), Mb = new W().setFromAxisAngle(new v(0, 1, 0), Math.PI);
26863
26990
  class Pr extends I {
@@ -26991,10 +27118,10 @@ iy([
26991
27118
  iy([
26992
27119
  f(re)
26993
27120
  ], Pr.prototype, "rightHand", 2);
26994
- var p2 = Object.defineProperty, m2 = Object.getOwnPropertyDescriptor, nf = (s, t, e, i) => {
26995
- for (var n = i > 1 ? void 0 : i ? m2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
27121
+ var pk = Object.defineProperty, mk = Object.getOwnPropertyDescriptor, nf = (s, t, e, i) => {
27122
+ for (var n = i > 1 ? void 0 : i ? mk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
26996
27123
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
26997
- return i && n && p2(t, e, n), n;
27124
+ return i && n && pk(t, e, n), n;
26998
27125
  };
26999
27126
  const os = x("debugwebxr"), Xs = new Array();
27000
27127
  class js extends I {
@@ -27150,10 +27277,10 @@ nf([
27150
27277
  ], js.prototype, "customRightHand", 2);
27151
27278
  class ny extends I {
27152
27279
  }
27153
- var g2 = Object.defineProperty, y2 = Object.getOwnPropertyDescriptor, Eo = (s, t, e, i) => {
27154
- for (var n = i > 1 ? void 0 : i ? y2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
27280
+ var gk = Object.defineProperty, yk = Object.getOwnPropertyDescriptor, Eo = (s, t, e, i) => {
27281
+ for (var n = i > 1 ? void 0 : i ? yk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
27155
27282
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
27156
- return i && n && g2(t, e, n), n;
27283
+ return i && n && gk(t, e, n), n;
27157
27284
  };
27158
27285
  const yp = x("debugwebxr");
27159
27286
  class on extends I {
@@ -27327,7 +27454,7 @@ class on extends I {
27327
27454
  if (u.normal) {
27328
27455
  this.updateHitPointerPosition(o, a, u.distance);
27329
27456
  const _ = u.normal.applyQuaternion(Ce(u.object));
27330
- a.quaternion.setFromUnitVectors(_2, _);
27457
+ a.quaternion.setFromUnitVectors(_k, _);
27331
27458
  } else
27332
27459
  this.updateHitPointerPosition(o, a, u.distance);
27333
27460
  a.parent !== this.context.scene && this.context.scene.add(a);
@@ -27408,13 +27535,13 @@ Eo([
27408
27535
  Eo([
27409
27536
  f()
27410
27537
  ], on.prototype, "showHits", 2);
27411
- const _2 = new v(0, 1, 0);
27412
- var b2 = Object.defineProperty, v2 = Object.getOwnPropertyDescriptor, wt = (s, t, e, i) => {
27413
- for (var n = i > 1 ? void 0 : i ? v2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
27538
+ const _k = new v(0, 1, 0);
27539
+ var bk = Object.defineProperty, vk = Object.getOwnPropertyDescriptor, wt = (s, t, e, i) => {
27540
+ for (var n = i > 1 ? void 0 : i ? vk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
27414
27541
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
27415
- return i && n && b2(t, e, n), n;
27542
+ return i && n && bk(t, e, n), n;
27416
27543
  };
27417
- const jl = x("debugwebxr"), w2 = x("debugusdz");
27544
+ const jl = x("debugwebxr"), wk = x("debugusdz");
27418
27545
  var $p;
27419
27546
  const da = ($p = class extends I {
27420
27547
  constructor() {
@@ -27637,7 +27764,7 @@ const da = ($p = class extends I {
27637
27764
  */
27638
27765
  handleCreatingHTML() {
27639
27766
  if (this.createARButton || this.createVRButton || this.useQuicklookExport) {
27640
- if ((X.isiOS() && X.isSafari() || w2) && this.useQuicklookExport) {
27767
+ if ((X.isiOS() && X.isSafari() || wk) && this.useQuicklookExport) {
27641
27768
  const e = S.findObjectOfType(Ge);
27642
27769
  if (!e || e && e.allowCreateQuicklookButton) {
27643
27770
  const i = this.getButtonsFactory().createQuicklookButton();
@@ -27955,7 +28082,7 @@ class Rw {
27955
28082
  }), o.length > 1 && console.log("WARNING: Multiple colliders detected. visionOS / iOS can only support objects with a single collider, only exporting the first collider: ", l));
27956
28083
  }
27957
28084
  }
27958
- const x2 = x("debugshadowcomponents");
28085
+ const xk = x("debugshadowcomponents");
27959
28086
  _0.prototype.interactable = {
27960
28087
  get() {
27961
28088
  return this.interactive;
@@ -28035,7 +28162,7 @@ class wn extends I {
28035
28162
  const l = this._parentComponent.shadowComponent;
28036
28163
  l && (l == null || l.add(e), o = !0);
28037
28164
  }
28038
- this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent), Qc && e.add(new Mi(0.5)), this.onAfterAddedToScene(), o && kS(), x2 && console.warn("Added shadow component", this.shadowComponent);
28165
+ this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent), Qc && e.add(new Mi(0.5)), this.onAfterAddedToScene(), o && kS(), xk && console.warn("Added shadow component", this.shadowComponent);
28039
28166
  }
28040
28167
  setShadowComponentOwner(e) {
28041
28168
  if (e && (e[xi] === void 0 || e[xi] === this) && (e[xi] = this, e.children))
@@ -28064,19 +28191,19 @@ class sf extends wn {
28064
28191
  super.awake();
28065
28192
  }
28066
28193
  }
28067
- var S2 = Object.defineProperty, C2 = Object.getOwnPropertyDescriptor, dh = (s, t, e, i) => {
28068
- for (var n = i > 1 ? void 0 : i ? C2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
28194
+ var Sk = Object.defineProperty, Ck = Object.getOwnPropertyDescriptor, dh = (s, t, e, i) => {
28195
+ for (var n = i > 1 ? void 0 : i ? Ck(t, e) : t, o = s.length - 1, a; o >= 0; o--)
28069
28196
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
28070
- return i && n && S2(t, e, n), n;
28197
+ return i && n && Sk(t, e, n), n;
28071
28198
  };
28072
28199
  const _p = x("debugui"), bp = x("debuguilayout");
28073
- class P2 {
28200
+ class Pk {
28074
28201
  constructor() {
28075
28202
  r(this, "width");
28076
28203
  r(this, "height");
28077
28204
  }
28078
28205
  }
28079
- class O2 {
28206
+ class Ok {
28080
28207
  constructor() {
28081
28208
  r(this, "x");
28082
28209
  r(this, "y");
@@ -28288,10 +28415,10 @@ dh([
28288
28415
  dh([
28289
28416
  f(oe)
28290
28417
  ], ii.prototype, "anchorMax", 2);
28291
- var M2 = Object.defineProperty, R2 = Object.getOwnPropertyDescriptor, Tw = (s, t, e, i) => {
28292
- for (var n = i > 1 ? void 0 : i ? R2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
28418
+ var Mk = Object.defineProperty, Rk = Object.getOwnPropertyDescriptor, Tw = (s, t, e, i) => {
28419
+ for (var n = i > 1 ? void 0 : i ? Rk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
28293
28420
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
28294
- return i && n && M2(t, e, n), n;
28421
+ return i && n && Mk(t, e, n), n;
28295
28422
  };
28296
28423
  class uh extends I {
28297
28424
  constructor() {
@@ -28306,10 +28433,10 @@ Tw([
28306
28433
  Tw([
28307
28434
  f(oe)
28308
28435
  ], uh.prototype, "effectDistance", 2);
28309
- var k2 = Object.defineProperty, T2 = Object.getOwnPropertyDescriptor, Aw = (s, t, e, i) => {
28310
- for (var n = i > 1 ? void 0 : i ? T2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
28436
+ var kk = Object.defineProperty, Tk = Object.getOwnPropertyDescriptor, Aw = (s, t, e, i) => {
28437
+ for (var n = i > 1 ? void 0 : i ? Tk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
28311
28438
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
28312
- return i && n && k2(t, e, n), n;
28439
+ return i && n && kk(t, e, n), n;
28313
28440
  };
28314
28441
  const Jh = {
28315
28442
  backgroundColor: new ce(1, 1, 1),
@@ -28443,10 +28570,10 @@ class of extends al {
28443
28570
  this.uiObject && !this._flippedObject && (this._flippedObject = !0, this.uiObject.scale.y *= -1);
28444
28571
  }
28445
28572
  }
28446
- var A2 = Object.defineProperty, E2 = Object.getOwnPropertyDescriptor, Ws = (s, t, e, i) => {
28447
- for (var n = i > 1 ? void 0 : i ? E2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
28573
+ var Ak = Object.defineProperty, Ek = Object.getOwnPropertyDescriptor, Ws = (s, t, e, i) => {
28574
+ for (var n = i > 1 ? void 0 : i ? Ek(t, e) : t, o = s.length - 1, a; o >= 0; o--)
28448
28575
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
28449
- return i && n && A2(t, e, n), n;
28576
+ return i && n && Ak(t, e, n), n;
28450
28577
  };
28451
28578
  const Ho = x("debugtext");
28452
28579
  var ct = /* @__PURE__ */ ((s) => (s[s.UpperLeft = 0] = "UpperLeft", s[s.UpperCenter = 1] = "UpperCenter", s[s.UpperRight = 2] = "UpperRight", s[s.MiddleLeft = 3] = "MiddleLeft", s[s.MiddleCenter = 4] = "MiddleCenter", s[s.MiddleRight = 5] = "MiddleRight", s[s.LowerLeft = 6] = "LowerLeft", s[s.LowerCenter = 7] = "LowerCenter", s[s.LowerRight = 8] = "LowerRight", s))(ct || {}), Ew = /* @__PURE__ */ ((s) => (s[s.Normal = 0] = "Normal", s[s.Bold = 1] = "Bold", s[s.Italic = 2] = "Italic", s[s.BoldAndItalic = 3] = "BoldAndItalic", s))(Ew || {});
@@ -28729,7 +28856,7 @@ class si extends al {
28729
28856
  if (n < 0)
28730
28857
  return e;
28731
28858
  const o = (d = e.substring(n + 1)) == null ? void 0 : d.toLowerCase();
28732
- if (I2.includes(o))
28859
+ if (Ik.includes(o))
28733
28860
  return Ho && console.warn("Unsupported font style: " + o), e;
28734
28861
  const a = e.lastIndexOf("/");
28735
28862
  let l = e;
@@ -28783,7 +28910,7 @@ class vp {
28783
28910
  this.tag = t, this.previousValues = e;
28784
28911
  }
28785
28912
  }
28786
- const I2 = [
28913
+ const Ik = [
28787
28914
  "medium",
28788
28915
  "mediumitalic",
28789
28916
  "black",
@@ -28843,7 +28970,7 @@ class Iw {
28843
28970
  return l.content = t, l.width = e, l.height = i, l.horizontalAlignment = n, l.verticalAlignment = o, a !== void 0 && (l.wrapMode = a), l;
28844
28971
  }
28845
28972
  }
28846
- const L2 = new se().makeRotationY(Math.PI), D2 = new se().makeScale(-1, 1, -1);
28973
+ const Lk = new se().makeRotationY(Math.PI), Dk = new se().makeScale(-1, 1, -1);
28847
28974
  class sy {
28848
28975
  get extensionName() {
28849
28976
  return "text";
@@ -28855,8 +28982,8 @@ class sy {
28855
28982
  const o = S.getComponent(t, ii);
28856
28983
  let a = 100, l = 100;
28857
28984
  o && (a = o.width, l = o.height);
28858
- const c = L2.clone();
28859
- o && c.premultiply(D2), e.setMatrix(c);
28985
+ const c = Lk.clone();
28986
+ o && c.premultiply(Dk), e.setMatrix(c);
28860
28987
  const h = n.color.clone();
28861
28988
  e.material = new Lt({ color: h, emissive: h }), e.addEventListener("serialize", (d, u) => {
28862
28989
  let p = n.text;
@@ -28916,10 +29043,10 @@ class sy {
28916
29043
  }
28917
29044
  }
28918
29045
  }
28919
- var j2 = Object.defineProperty, B2 = Object.getOwnPropertyDescriptor, ot = (s, t, e, i) => {
28920
- for (var n = i > 1 ? void 0 : i ? B2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29046
+ var jk = Object.defineProperty, Bk = Object.getOwnPropertyDescriptor, ot = (s, t, e, i) => {
29047
+ for (var n = i > 1 ? void 0 : i ? Bk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
28921
29048
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
28922
- return i && n && j2(t, e, n), n;
29049
+ return i && n && jk(t, e, n), n;
28923
29050
  };
28924
29051
  const Rb = x("debuguilayout");
28925
29052
  class ll {
@@ -29114,10 +29241,10 @@ class jw extends Li {
29114
29241
  onCalculateLayout() {
29115
29242
  }
29116
29243
  }
29117
- var F2 = Object.defineProperty, z2 = Object.getOwnPropertyDescriptor, Qn = (s, t, e, i) => {
29118
- for (var n = i > 1 ? void 0 : i ? z2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29244
+ var Fk = Object.defineProperty, zk = Object.getOwnPropertyDescriptor, Qn = (s, t, e, i) => {
29245
+ for (var n = i > 1 ? void 0 : i ? zk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29119
29246
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
29120
- return i && n && F2(t, e, n), n;
29247
+ return i && n && Fk(t, e, n), n;
29121
29248
  }, Bw = /* @__PURE__ */ ((s) => (s[s.ScreenSpaceOverlay = 0] = "ScreenSpaceOverlay", s[s.ScreenSpaceCamera = 1] = "ScreenSpaceCamera", s[s.WorldSpace = 2] = "WorldSpace", s[s.Undefined = -1] = "Undefined", s))(Bw || {});
29122
29249
  const wp = x("debuguilayout"), Fw = class extends sf {
29123
29250
  constructor() {
@@ -29353,10 +29480,10 @@ Qn([
29353
29480
  Qn([
29354
29481
  f()
29355
29482
  ], Nt.prototype, "planeDistance", 2);
29356
- var U2 = Object.defineProperty, N2 = Object.getOwnPropertyDescriptor, oy = (s, t, e, i) => {
29357
- for (var n = i > 1 ? void 0 : i ? N2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29483
+ var Uk = Object.defineProperty, Nk = Object.getOwnPropertyDescriptor, oy = (s, t, e, i) => {
29484
+ for (var n = i > 1 ? void 0 : i ? Nk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29358
29485
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
29359
- return i && n && U2(t, e, n), n;
29486
+ return i && n && Uk(t, e, n), n;
29360
29487
  };
29361
29488
  class Or extends I {
29362
29489
  constructor() {
@@ -29488,7 +29615,7 @@ class zw {
29488
29615
  }
29489
29616
  }
29490
29617
  const ic = x("debugusdz");
29491
- function $2(s, t) {
29618
+ function $k(s, t) {
29492
29619
  var l;
29493
29620
  const e = [], i = S.getComponentsInChildren(s, Ut), n = S.getComponentsInChildren(s, ti), o = new Array(), a = new Array();
29494
29621
  if (t.injectImplicitBehaviours)
@@ -29539,7 +29666,7 @@ function $2(s, t) {
29539
29666
  t.registerAnimation(c.root, h);
29540
29667
  return a;
29541
29668
  }
29542
- function W2(s, t) {
29669
+ function Wk(s, t) {
29543
29670
  const e = S.getComponentsInChildren(s, qe), i = S.getComponentsInChildren(s, Cr), n = new Array(), o = new Array();
29544
29671
  ic && console.log({ audioSources: e, playAudioOnClicks: i });
29545
29672
  for (const a of i) {
@@ -29558,7 +29685,7 @@ function W2(s, t) {
29558
29685
  }
29559
29686
  return o;
29560
29687
  }
29561
- function V2(s) {
29688
+ function Vk(s) {
29562
29689
  return new Tt(
29563
29690
  "DisableAtStart",
29564
29691
  zt.sceneStartTrigger(),
@@ -29578,12 +29705,12 @@ function kb(s, t) {
29578
29705
  const a = document.createElement("img");
29579
29706
  return a.id = "button", o.appendChild(a), s.domElement.shadowRoot.appendChild(i), o;
29580
29707
  }
29581
- var H2 = Object.defineProperty, G2 = Object.getOwnPropertyDescriptor, At = (s, t, e, i) => {
29582
- for (var n = i > 1 ? void 0 : i ? G2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29708
+ var Hk = Object.defineProperty, Gk = Object.getOwnPropertyDescriptor, At = (s, t, e, i) => {
29709
+ for (var n = i > 1 ? void 0 : i ? Gk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29583
29710
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
29584
- return i && n && H2(t, e, n), n;
29711
+ return i && n && Hk(t, e, n), n;
29585
29712
  };
29586
- const pi = x("debugusdz"), q2 = x("debugusdzpruning");
29713
+ const pi = x("debugusdz"), qk = x("debugusdzpruning");
29587
29714
  class cl {
29588
29715
  constructor() {
29589
29716
  r(this, "callToAction");
@@ -29676,7 +29803,7 @@ const $m = (cd = class extends I {
29676
29803
  async exportAndOpen() {
29677
29804
  var i;
29678
29805
  let t = this.exportFileName ?? ((i = this.objectToExport) == null ? void 0 : i.name) ?? this.name;
29679
- if (t += "-" + Pk(), Rs() || (t !== "" && (t += "-"), t += "MadeWithNeedle"), this.link || (this.link = kb(this.context, X.supportsQuickLookAR())), this.customUsdzFile)
29806
+ if (t += "-" + P2(), Rs() || (t !== "" && (t += "-"), t += "MadeWithNeedle"), this.link || (this.link = kb(this.context, X.supportsQuickLookAR())), this.customUsdzFile)
29680
29807
  return pi && console.log("Exporting custom usdz", this.customUsdzFile), this.openInQuickLook(this.customUsdzFile, t), null;
29681
29808
  if (!this.objectToExport)
29682
29809
  return console.warn("No object to export", this), null;
@@ -29730,14 +29857,14 @@ const $m = (cd = class extends I {
29730
29857
  pi && We("Progressive Loading: " + n.length), await Promise.all(n), pi && We("Progressive Loading: done"), de.end("export-usdz-textures");
29731
29858
  const a = ei.Global.Mask;
29732
29859
  ei.Global.Set(vs.AR);
29733
- const l = new Ek(), c = new ey(this.quickLookCompatible);
29860
+ const l = new E2(), c = new ey(this.quickLookCompatible);
29734
29861
  let h;
29735
29862
  const d = [];
29736
29863
  this.interactive && (d.push(new Mw()), d.push(new nl()), globalThis.true && S.getComponentsInChildren(t, _e).length > 0 && (this.physics ? (h = new Rw(), d.push(h)) : z() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), d.push(new sy()), d.push(new zw()));
29737
29864
  const u = [c, ...d, ...this.extensions], p = { self: this, exporter: l, extensions: u, object: t };
29738
29865
  de.report("export-usdz", "Invoking before-export"), this.dispatchEvent(new CustomEvent("before-export", { detail: p })), this.applyWebARSessionRoot(), this._previousTimeScale = this.context.time.timeScale, this.context.time.timeScale = 0, de.report("export-usdz", "auto export animations and audio sources");
29739
29866
  const m = new Array();
29740
- this.autoExportAnimations && m.push(...$2(t, c)), u.find((O) => O.extensionName === "Audio") && this.autoExportAudioSources && m.push(...W2(t)), l.debug = pi, l.pruneUnusedNodes = !q2;
29867
+ this.autoExportAnimations && m.push(...$k(t, c)), u.find((O) => O.extensionName === "Audio") && this.autoExportAudioSources && m.push(...Wk(t)), l.debug = pi, l.pruneUnusedNodes = !qk;
29741
29868
  const y = or.instance.objs.map((O) => O.batchedMesh);
29742
29869
  l.keepObject = (O) => {
29743
29870
  let R = !0;
@@ -29757,7 +29884,7 @@ const $m = (cd = class extends I {
29757
29884
  O.visible || _.push(O);
29758
29885
  });
29759
29886
  const b = u.find((O) => O.extensionName === "Behaviour");
29760
- this.interactive && b && _.length > 0 && b.addBehavior(V2(_));
29887
+ this.interactive && b && _.length > 0 && b.addBehavior(Vk(_));
29761
29888
  let w = !0;
29762
29889
  this.quickLookCompatible && !this.interactive && (w = !1), this.anchoringType !== "plane" && this.anchoringType !== "none" && this.anchoringType !== "image" && this.anchoringType !== "face" && (this.anchoringType = "plane"), this.planeAnchoringAlignment !== "horizontal" && this.planeAnchoringAlignment !== "vertical" && this.planeAnchoringAlignment !== "any" && (this.planeAnchoringAlignment = "horizontal"), de.report("export-usdz", "Invoking exporter.parse");
29763
29890
  const P = await l.parse(this.objectToExport, {
@@ -29886,10 +30013,10 @@ At([
29886
30013
  At([
29887
30014
  f()
29888
30015
  ], Ge.prototype, "quickLookCompatible", 2);
29889
- var X2 = Object.defineProperty, Q2 = Object.getOwnPropertyDescriptor, ry = (s, t, e, i) => {
29890
- for (var n = i > 1 ? void 0 : i ? Q2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
30016
+ var Xk = Object.defineProperty, Qk = Object.getOwnPropertyDescriptor, ry = (s, t, e, i) => {
30017
+ for (var n = i > 1 ? void 0 : i ? Qk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29891
30018
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
29892
- return i && n && X2(t, e, n), n;
30019
+ return i && n && Xk(t, e, n), n;
29893
30020
  };
29894
30021
  class fh extends I {
29895
30022
  constructor() {
@@ -29936,10 +30063,10 @@ ry([
29936
30063
  ry([
29937
30064
  f(ce)
29938
30065
  ], fh.prototype, "color", 1);
29939
- var Y2 = Object.defineProperty, K2 = Object.getOwnPropertyDescriptor, ay = (s, t, e, i) => {
29940
- for (var n = i > 1 ? void 0 : i ? K2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
30066
+ var Yk = Object.defineProperty, Kk = Object.getOwnPropertyDescriptor, ay = (s, t, e, i) => {
30067
+ for (var n = i > 1 ? void 0 : i ? Kk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29941
30068
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
29942
- return i && n && Y2(t, e, n), n;
30069
+ return i && n && Yk(t, e, n), n;
29943
30070
  };
29944
30071
  class hl extends I {
29945
30072
  constructor() {
@@ -29971,10 +30098,10 @@ ay([
29971
30098
  ay([
29972
30099
  f()
29973
30100
  ], hl.prototype, "isGizmo", 2);
29974
- var Z2 = Object.defineProperty, J2 = Object.getOwnPropertyDescriptor, ly = (s, t, e, i) => {
29975
- for (var n = i > 1 ? void 0 : i ? J2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
30101
+ var Zk = Object.defineProperty, Jk = Object.getOwnPropertyDescriptor, ly = (s, t, e, i) => {
30102
+ for (var n = i > 1 ? void 0 : i ? Jk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
29976
30103
  (a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
29977
- return i && n && Z2(t, e, n), n;
30104
+ return i && n && Zk(t, e, n), n;
29978
30105
  };
29979
30106
  class ph extends I {
29980
30107
  constructor() {
@@ -39958,7 +40085,7 @@ const rc = (Kp = class extends I {
39958
40085
  i.src = e, i.addEventListener("load", async () => {
39959
40086
  const n = await createImageBitmap(i);
39960
40087
  rc._imageElements.set(e, n);
39961
- const o = await Bk(n);
40088
+ const o = await B2(n);
39962
40089
  if (o) {
39963
40090
  const l = await (await o.convertToBlob({ type: "image/png" })).arrayBuffer(), c = S.findObjectOfType(Ge);
39964
40091
  c && this.trackedImages && (c.extensions.push(
@@ -42723,7 +42850,7 @@ class II {
42723
42850
  const fD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42724
42851
  __proto__: null,
42725
42852
  ActionBuilder: ye,
42726
- ActionCollection: Gk,
42853
+ ActionCollection: G2,
42727
42854
  ActionModel: bi,
42728
42855
  AlignmentConstraint: Vu,
42729
42856
  Animation: ti,
@@ -42791,7 +42918,7 @@ const fD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42791
42918
  EventListEvent: Ug,
42792
42919
  EventSystem: di,
42793
42920
  EventTrigger: Kg,
42794
- FieldWithDefault: vk,
42921
+ FieldWithDefault: v2,
42795
42922
  FixedJoint: Uw,
42796
42923
  Fog: fh,
42797
42924
  GltfExport: Zu,
@@ -42851,7 +42978,7 @@ const fD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42851
42978
  PreliminaryAction: ch,
42852
42979
  PreliminaryTrigger: Ju,
42853
42980
  RawImage: Py,
42854
- Rect: O2,
42981
+ Rect: Ok,
42855
42982
  RectTransform: ii,
42856
42983
  ReflectionProbe: oh,
42857
42984
  RegisteredAnimationInfo: ar,
@@ -42873,7 +43000,7 @@ const fD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42873
43000
  SignalReceiver: Ph,
42874
43001
  SignalReceiverEvent: _f,
42875
43002
  SignalTrackHandler: au,
42876
- Size: P2,
43003
+ Size: Pk,
42877
43004
  SizeBySpeedModule: Bi,
42878
43005
  SizeOverLifetimeModule: fl,
42879
43006
  SkinnedMeshRenderer: cw,
@@ -43061,7 +43188,7 @@ const DI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
43061
43188
  export {
43062
43189
  QL as $physicsKey,
43063
43190
  ye as ActionBuilder,
43064
- Gk as ActionCollection,
43191
+ G2 as ActionCollection,
43065
43192
  bi as ActionModel,
43066
43193
  bO as Addressables,
43067
43194
  Vu as AlignmentConstraint,
@@ -43164,7 +43291,7 @@ export {
43164
43291
  Ug as EventListEvent,
43165
43292
  di as EventSystem,
43166
43293
  Kg as EventTrigger,
43167
- vk as FieldWithDefault,
43294
+ v2 as FieldWithDefault,
43168
43295
  pc as FileReference,
43169
43296
  SO as FileReferenceSerializer,
43170
43297
  YL as FileSpawnModel,
@@ -43278,7 +43405,7 @@ export {
43278
43405
  Rr as PlayableDirector,
43279
43406
  Vc as PlayerColor,
43280
43407
  Ji as PlayerState,
43281
- c2 as PlayerStateEvent,
43408
+ ck as PlayerStateEvent,
43282
43409
  hh as PlayerSync,
43283
43410
  TO as PlayerView,
43284
43411
  AO as PlayerViewManager,
@@ -43297,7 +43424,7 @@ export {
43297
43424
  Yo as RapierPhysics,
43298
43425
  Py as RawImage,
43299
43426
  Ls as RaycastOptions,
43300
- O2 as Rect,
43427
+ Ok as Rect,
43301
43428
  ii as RectTransform,
43302
43429
  oh as ReflectionProbe,
43303
43430
  ar as RegisteredAnimationInfo,
@@ -43327,7 +43454,7 @@ export {
43327
43454
  Ph as SignalReceiver,
43328
43455
  _f as SignalReceiverEvent,
43329
43456
  au as SignalTrackHandler,
43330
- P2 as Size,
43457
+ Pk as Size,
43331
43458
  Bi as SizeBySpeedModule,
43332
43459
  fl as SizeOverLifetimeModule,
43333
43460
  cw as SkinnedMeshRenderer,
@@ -43375,9 +43502,9 @@ export {
43375
43502
  sf as UIRootComponent,
43376
43503
  mw as USDDocument,
43377
43504
  jt as USDObject,
43378
- Tk as USDWriter,
43505
+ T2 as USDWriter,
43379
43506
  Ge as USDZExporter,
43380
- Ek as USDZExporter$1,
43507
+ E2 as USDZExporter$1,
43381
43508
  pa as USDZText,
43382
43509
  zw as USDZUIExtension,
43383
43510
  zM as UriSerializer,
@@ -43441,7 +43568,7 @@ export {
43441
43568
  uM as createMotion,
43442
43569
  gi as debugNet,
43443
43570
  Ih as debugOwner,
43444
- Lk as decompressGpuTexture,
43571
+ L2 as decompressGpuTexture,
43445
43572
  ku as deepClone,
43446
43573
  Vn as delay,
43447
43574
  Tu as delayForFrames,
@@ -43473,7 +43600,7 @@ export {
43473
43600
  zu as getComponents,
43474
43601
  Yc as getComponentsInChildren,
43475
43602
  Ag as getComponentsInParent,
43476
- Pk as getFormattedDate,
43603
+ P2 as getFormattedDate,
43477
43604
  Dt as getIconElement,
43478
43605
  q_ as getIconTexture,
43479
43606
  aL as getIp,
@@ -43503,7 +43630,7 @@ export {
43503
43630
  Em as hasPointerEventComponent,
43504
43631
  Rs as hasProLicense,
43505
43632
  CC as hideDebugConsole,
43506
- Bk as imageToCanvas,
43633
+ B2 as imageToCanvas,
43507
43634
  Ha as instantiate,
43508
43635
  ow as invokeAfterImportPluginHooks,
43509
43636
  VC as invokeXRSessionEnd,