@needle-tools/engine 4.11.5 → 4.12.0-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 (442) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/components.needle.json +1 -1
  3. package/custom-elements.json +420 -0
  4. package/dist/generateMeshBVH.worker-mO20N_b8.js +21 -0
  5. package/dist/{gltf-progressive-GwdQV1Qx.umd.cjs → gltf-progressive-DWcmTMCh.umd.cjs} +1 -1
  6. package/dist/{gltf-progressive-CftVUJy3.min.js → gltf-progressive-DZrY8VT6.min.js} +2 -2
  7. package/dist/{gltf-progressive-BvlZQAkt.js → gltf-progressive-DgYz5BYa.js} +19 -19
  8. package/dist/loader.worker-Dip-PthR.js +23 -0
  9. package/dist/{needle-engine.bundle-DSm5itjo.js → needle-engine.bundle-DBdgyYGK.js} +4368 -4241
  10. package/dist/{needle-engine.bundle-DYdft7n9.min.js → needle-engine.bundle-DhdNodjw.min.js} +130 -135
  11. package/dist/{needle-engine.bundle-DMqWdPzL.umd.cjs → needle-engine.bundle-DmY4g6s0.umd.cjs} +138 -143
  12. package/dist/needle-engine.d.ts +18164 -1
  13. package/dist/needle-engine.js +336 -335
  14. package/dist/needle-engine.min.js +1 -1
  15. package/dist/needle-engine.umd.cjs +1 -1
  16. package/dist/{postprocessing-CJC0Npcd.js → postprocessing-BTW9pD_s.js} +1822 -1723
  17. package/dist/{postprocessing-DrM4PWU3.umd.cjs → postprocessing-CMgoN5t5.umd.cjs} +229 -158
  18. package/dist/{postprocessing-l7zsdO_Q.min.js → postprocessing-DYDtB188.min.js} +227 -156
  19. package/dist/rapier-B3oL1ap-.js +5217 -0
  20. package/dist/rapier-DJ-luMxr.min.js +1 -0
  21. package/dist/rapier-DQltNJbN.umd.cjs +1 -0
  22. package/dist/{three-BDW9I486.min.js → three-B7CT31Bt.min.js} +1 -5
  23. package/dist/{three-MHVqtJYj.js → three-DfMvBzXi.js} +0 -5
  24. package/dist/{three-examples-CgwGHSgz.umd.cjs → three-examples-CsW4_6LI.umd.cjs} +2 -7
  25. package/dist/{three-examples-fvEPSC8L.min.js → three-examples-D1P7eEhn.min.js} +2 -7
  26. package/dist/{three-examples-C5Ht-QFN.js → three-examples-D1SK93ek.js} +1 -7
  27. package/dist/{three-mesh-ui-BjWTTk1R.js → three-mesh-ui-C_uSB5dD.js} +1 -1
  28. package/dist/{three-mesh-ui-Bm32sS2a.umd.cjs → three-mesh-ui-DpATDXwU.umd.cjs} +1 -1
  29. package/dist/{three-mesh-ui-CLdkp21K.min.js → three-mesh-ui-LQ44s0AL.min.js} +1 -1
  30. package/dist/{three-iFaDq9U3.umd.cjs → three-qj71I7J3.umd.cjs} +2 -6
  31. package/dist/{vendor-CsyK1CFs.min.js → vendor-BKGa4GE0.min.js} +34 -39
  32. package/dist/{vendor-petGQl0N.js → vendor-D0zoswDa.js} +1626 -1605
  33. package/dist/{vendor-6kAXU6fm.umd.cjs → vendor-UCpFAwt1.umd.cjs} +30 -35
  34. package/lib/engine/api.d.ts +0 -1
  35. package/lib/engine/api.js +0 -1
  36. package/lib/engine/api.js.map +1 -1
  37. package/lib/engine/debug/debug_spector.d.ts +16 -0
  38. package/lib/engine/debug/debug_spector.js +28 -0
  39. package/lib/engine/debug/debug_spector.js.map +1 -0
  40. package/lib/engine/engine_application.d.ts +7 -0
  41. package/lib/engine/engine_application.js +8 -1
  42. package/lib/engine/engine_application.js.map +1 -1
  43. package/lib/engine/engine_context.js +4 -1
  44. package/lib/engine/engine_context.js.map +1 -1
  45. package/lib/engine/engine_license.js +1 -1
  46. package/lib/engine/engine_license.js.map +1 -1
  47. package/lib/engine/engine_physics.js +6 -2
  48. package/lib/engine/engine_physics.js.map +1 -1
  49. package/lib/engine/engine_physics_rapier.d.ts +11 -2
  50. package/lib/engine/engine_physics_rapier.js +9 -0
  51. package/lib/engine/engine_physics_rapier.js.map +1 -1
  52. package/lib/engine/engine_texture.d.ts +1 -1
  53. package/lib/engine/engine_tonemapping.d.ts +1 -1
  54. package/lib/engine/engine_types.d.ts +16 -0
  55. package/lib/engine/engine_typestore.d.ts +1 -0
  56. package/lib/engine/engine_typestore.js +5 -6
  57. package/lib/engine/engine_typestore.js.map +1 -1
  58. package/lib/engine/webcomponents/logo-element.d.ts +11 -0
  59. package/lib/engine/webcomponents/logo-element.js +6 -0
  60. package/lib/engine/webcomponents/logo-element.js.map +1 -1
  61. package/lib/engine/webcomponents/needle menu/needle-menu.d.ts +24 -3
  62. package/lib/engine/webcomponents/needle menu/needle-menu.js +18 -3
  63. package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
  64. package/lib/engine/webcomponents/needle-button.d.ts +5 -0
  65. package/lib/engine/webcomponents/needle-button.js.map +1 -1
  66. package/lib/engine/webcomponents/needle-engine.d.ts +220 -8
  67. package/lib/engine/webcomponents/needle-engine.js +94 -13
  68. package/lib/engine/webcomponents/needle-engine.js.map +1 -1
  69. package/lib/engine/xr/NeedleXRSession.js +2 -1
  70. package/lib/engine/xr/NeedleXRSession.js.map +1 -1
  71. package/lib/engine-components/AlignmentConstraint.d.ts +9 -0
  72. package/lib/engine-components/AlignmentConstraint.js +9 -0
  73. package/lib/engine-components/AlignmentConstraint.js.map +1 -1
  74. package/lib/engine-components/Animator.d.ts +1 -0
  75. package/lib/engine-components/Animator.js.map +1 -1
  76. package/lib/engine-components/AudioListener.d.ts +2 -0
  77. package/lib/engine-components/AudioListener.js +2 -0
  78. package/lib/engine-components/AudioListener.js.map +1 -1
  79. package/lib/engine-components/AudioSource.d.ts +1 -0
  80. package/lib/engine-components/AudioSource.js +1 -0
  81. package/lib/engine-components/AudioSource.js.map +1 -1
  82. package/lib/engine-components/AxesHelper.d.ts +2 -0
  83. package/lib/engine-components/AxesHelper.js +2 -0
  84. package/lib/engine-components/AxesHelper.js.map +1 -1
  85. package/lib/engine-components/Camera.d.ts +1 -0
  86. package/lib/engine-components/Camera.js +1 -0
  87. package/lib/engine-components/Camera.js.map +1 -1
  88. package/lib/engine-components/CharacterController.d.ts +4 -1
  89. package/lib/engine-components/CharacterController.js +4 -1
  90. package/lib/engine-components/CharacterController.js.map +1 -1
  91. package/lib/engine-components/Component.d.ts +5 -0
  92. package/lib/engine-components/Component.js +7 -0
  93. package/lib/engine-components/Component.js.map +1 -1
  94. package/lib/engine-components/DeleteBox.d.ts +2 -0
  95. package/lib/engine-components/DeleteBox.js +2 -0
  96. package/lib/engine-components/DeleteBox.js.map +1 -1
  97. package/lib/engine-components/DeviceFlag.d.ts +4 -0
  98. package/lib/engine-components/DeviceFlag.js +4 -0
  99. package/lib/engine-components/DeviceFlag.js.map +1 -1
  100. package/lib/engine-components/DragControls.d.ts +1 -0
  101. package/lib/engine-components/DragControls.js +1 -0
  102. package/lib/engine-components/DragControls.js.map +1 -1
  103. package/lib/engine-components/DropListener.d.ts +1 -0
  104. package/lib/engine-components/DropListener.js +1 -0
  105. package/lib/engine-components/DropListener.js.map +1 -1
  106. package/lib/engine-components/Duplicatable.d.ts +1 -0
  107. package/lib/engine-components/Duplicatable.js +1 -0
  108. package/lib/engine-components/Duplicatable.js.map +1 -1
  109. package/lib/engine-components/EventTrigger.d.ts +2 -0
  110. package/lib/engine-components/EventTrigger.js +2 -0
  111. package/lib/engine-components/EventTrigger.js.map +1 -1
  112. package/lib/engine-components/GridHelper.d.ts +2 -0
  113. package/lib/engine-components/GridHelper.js +2 -0
  114. package/lib/engine-components/GridHelper.js.map +1 -1
  115. package/lib/engine-components/GroundProjection.d.ts +1 -0
  116. package/lib/engine-components/GroundProjection.js +1 -0
  117. package/lib/engine-components/GroundProjection.js.map +1 -1
  118. package/lib/engine-components/LODGroup.d.ts +2 -0
  119. package/lib/engine-components/LODGroup.js +2 -0
  120. package/lib/engine-components/LODGroup.js.map +1 -1
  121. package/lib/engine-components/Light.d.ts +1 -0
  122. package/lib/engine-components/Light.js +1 -0
  123. package/lib/engine-components/Light.js.map +1 -1
  124. package/lib/engine-components/LookAtConstraint.d.ts +1 -0
  125. package/lib/engine-components/LookAtConstraint.js +1 -0
  126. package/lib/engine-components/LookAtConstraint.js.map +1 -1
  127. package/lib/engine-components/NeedleMenu.d.ts +1 -0
  128. package/lib/engine-components/NeedleMenu.js +1 -0
  129. package/lib/engine-components/NeedleMenu.js.map +1 -1
  130. package/lib/engine-components/NestedGltf.d.ts +1 -0
  131. package/lib/engine-components/NestedGltf.js +1 -0
  132. package/lib/engine-components/NestedGltf.js.map +1 -1
  133. package/lib/engine-components/Networking.d.ts +1 -0
  134. package/lib/engine-components/Networking.js +1 -0
  135. package/lib/engine-components/Networking.js.map +1 -1
  136. package/lib/engine-components/OffsetConstraint.d.ts +7 -0
  137. package/lib/engine-components/OffsetConstraint.js +7 -0
  138. package/lib/engine-components/OffsetConstraint.js.map +1 -1
  139. package/lib/engine-components/OrbitControls.d.ts +1 -0
  140. package/lib/engine-components/OrbitControls.js +1 -0
  141. package/lib/engine-components/OrbitControls.js.map +1 -1
  142. package/lib/engine-components/PlayerColor.d.ts +2 -0
  143. package/lib/engine-components/PlayerColor.js +2 -0
  144. package/lib/engine-components/PlayerColor.js.map +1 -1
  145. package/lib/engine-components/ReflectionProbe.d.ts +1 -0
  146. package/lib/engine-components/ReflectionProbe.js +1 -0
  147. package/lib/engine-components/ReflectionProbe.js.map +1 -1
  148. package/lib/engine-components/RendererInstancing.d.ts +5 -3
  149. package/lib/engine-components/RendererInstancing.js +64 -31
  150. package/lib/engine-components/RendererInstancing.js.map +1 -1
  151. package/lib/engine-components/RigidBody.d.ts +1 -0
  152. package/lib/engine-components/RigidBody.js +1 -0
  153. package/lib/engine-components/RigidBody.js.map +1 -1
  154. package/lib/engine-components/SceneSwitcher.d.ts +1 -0
  155. package/lib/engine-components/SceneSwitcher.js +1 -0
  156. package/lib/engine-components/SceneSwitcher.js.map +1 -1
  157. package/lib/engine-components/ScreenCapture.d.ts +1 -0
  158. package/lib/engine-components/ScreenCapture.js +1 -0
  159. package/lib/engine-components/ScreenCapture.js.map +1 -1
  160. package/lib/engine-components/SeeThrough.d.ts +1 -0
  161. package/lib/engine-components/SeeThrough.js +1 -0
  162. package/lib/engine-components/SeeThrough.js.map +1 -1
  163. package/lib/engine-components/ShadowCatcher.d.ts +2 -0
  164. package/lib/engine-components/ShadowCatcher.js +2 -0
  165. package/lib/engine-components/ShadowCatcher.js.map +1 -1
  166. package/lib/engine-components/Skybox.d.ts +16 -5
  167. package/lib/engine-components/Skybox.js +38 -25
  168. package/lib/engine-components/Skybox.js.map +1 -1
  169. package/lib/engine-components/SmoothFollow.d.ts +1 -0
  170. package/lib/engine-components/SmoothFollow.js +1 -0
  171. package/lib/engine-components/SmoothFollow.js.map +1 -1
  172. package/lib/engine-components/SpatialTrigger.d.ts +1 -0
  173. package/lib/engine-components/SpatialTrigger.js +1 -0
  174. package/lib/engine-components/SpatialTrigger.js.map +1 -1
  175. package/lib/engine-components/SpectatorCamera.d.ts +1 -0
  176. package/lib/engine-components/SpectatorCamera.js +1 -0
  177. package/lib/engine-components/SpectatorCamera.js.map +1 -1
  178. package/lib/engine-components/SpriteRenderer.d.ts +1 -0
  179. package/lib/engine-components/SpriteRenderer.js +1 -0
  180. package/lib/engine-components/SpriteRenderer.js.map +1 -1
  181. package/lib/engine-components/SyncedCamera.d.ts +2 -0
  182. package/lib/engine-components/SyncedCamera.js +2 -0
  183. package/lib/engine-components/SyncedCamera.js.map +1 -1
  184. package/lib/engine-components/SyncedRoom.d.ts +1 -0
  185. package/lib/engine-components/SyncedRoom.js +1 -0
  186. package/lib/engine-components/SyncedRoom.js.map +1 -1
  187. package/lib/engine-components/SyncedTransform.d.ts +2 -0
  188. package/lib/engine-components/SyncedTransform.js +2 -0
  189. package/lib/engine-components/SyncedTransform.js.map +1 -1
  190. package/lib/engine-components/TransformGizmo.d.ts +2 -0
  191. package/lib/engine-components/TransformGizmo.js +2 -0
  192. package/lib/engine-components/TransformGizmo.js.map +1 -1
  193. package/lib/engine-components/VideoPlayer.d.ts +1 -0
  194. package/lib/engine-components/VideoPlayer.js +1 -0
  195. package/lib/engine-components/VideoPlayer.js.map +1 -1
  196. package/lib/engine-components/Voip.d.ts +1 -0
  197. package/lib/engine-components/Voip.js +1 -0
  198. package/lib/engine-components/Voip.js.map +1 -1
  199. package/lib/engine-components/export/usdz/USDZExporter.d.ts +24 -3
  200. package/lib/engine-components/export/usdz/USDZExporter.js +36 -2
  201. package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
  202. package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.d.ts +18 -0
  203. package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js +18 -0
  204. package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js.map +1 -1
  205. package/lib/engine-components/particlesystem/ParticleSystem.d.ts +1 -0
  206. package/lib/engine-components/particlesystem/ParticleSystem.js +1 -0
  207. package/lib/engine-components/particlesystem/ParticleSystem.js.map +1 -1
  208. package/lib/engine-components/physics/Attractor.d.ts +3 -0
  209. package/lib/engine-components/physics/Attractor.js +3 -0
  210. package/lib/engine-components/physics/Attractor.js.map +1 -1
  211. package/lib/engine-components/postprocessing/Effects/BloomEffect.d.ts +1 -0
  212. package/lib/engine-components/postprocessing/Effects/BloomEffect.js +1 -0
  213. package/lib/engine-components/postprocessing/Effects/BloomEffect.js.map +1 -1
  214. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.d.ts +4 -0
  215. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js +4 -0
  216. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js.map +1 -1
  217. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.d.ts +3 -0
  218. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js +3 -0
  219. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js.map +1 -1
  220. package/lib/engine-components/postprocessing/Effects/DepthOfField.d.ts +4 -0
  221. package/lib/engine-components/postprocessing/Effects/DepthOfField.js +4 -0
  222. package/lib/engine-components/postprocessing/Effects/DepthOfField.js.map +1 -1
  223. package/lib/engine-components/postprocessing/Effects/EffectWrapper.d.ts +1 -0
  224. package/lib/engine-components/postprocessing/Effects/EffectWrapper.js +1 -0
  225. package/lib/engine-components/postprocessing/Effects/EffectWrapper.js.map +1 -1
  226. package/lib/engine-components/postprocessing/Effects/Pixelation.d.ts +3 -0
  227. package/lib/engine-components/postprocessing/Effects/Pixelation.js +3 -0
  228. package/lib/engine-components/postprocessing/Effects/Pixelation.js.map +1 -1
  229. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.d.ts +4 -0
  230. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.js +4 -0
  231. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.js.map +1 -1
  232. package/lib/engine-components/postprocessing/Effects/Sharpening.d.ts +4 -0
  233. package/lib/engine-components/postprocessing/Effects/Sharpening.js +4 -0
  234. package/lib/engine-components/postprocessing/Effects/Sharpening.js.map +1 -1
  235. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.d.ts +4 -0
  236. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.js +4 -0
  237. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.js.map +1 -1
  238. package/lib/engine-components/postprocessing/Effects/Tonemapping.d.ts +4 -0
  239. package/lib/engine-components/postprocessing/Effects/Tonemapping.js +4 -0
  240. package/lib/engine-components/postprocessing/Effects/Tonemapping.js.map +1 -1
  241. package/lib/engine-components/postprocessing/Effects/Vignette.d.ts +4 -0
  242. package/lib/engine-components/postprocessing/Effects/Vignette.js +4 -0
  243. package/lib/engine-components/postprocessing/Effects/Vignette.js.map +1 -1
  244. package/lib/engine-components/postprocessing/Volume.d.ts +1 -0
  245. package/lib/engine-components/postprocessing/Volume.js +1 -0
  246. package/lib/engine-components/postprocessing/Volume.js.map +1 -1
  247. package/lib/engine-components/splines/Spline.d.ts +1 -0
  248. package/lib/engine-components/splines/Spline.js +1 -0
  249. package/lib/engine-components/splines/Spline.js.map +1 -1
  250. package/lib/engine-components/splines/SplineWalker.d.ts +1 -0
  251. package/lib/engine-components/splines/SplineWalker.js +1 -0
  252. package/lib/engine-components/splines/SplineWalker.js.map +1 -1
  253. package/lib/engine-components/timeline/PlayableDirector.d.ts +1 -0
  254. package/lib/engine-components/timeline/PlayableDirector.js +1 -0
  255. package/lib/engine-components/timeline/PlayableDirector.js.map +1 -1
  256. package/lib/engine-components/timeline/SignalAsset.d.ts +1 -0
  257. package/lib/engine-components/timeline/SignalAsset.js +1 -0
  258. package/lib/engine-components/timeline/SignalAsset.js.map +1 -1
  259. package/lib/engine-components/ui/Button.d.ts +4 -0
  260. package/lib/engine-components/ui/Button.js +4 -0
  261. package/lib/engine-components/ui/Button.js.map +1 -1
  262. package/lib/engine-components/ui/Canvas.d.ts +5 -0
  263. package/lib/engine-components/ui/Canvas.js +5 -0
  264. package/lib/engine-components/ui/Canvas.js.map +1 -1
  265. package/lib/engine-components/ui/CanvasGroup.d.ts +4 -0
  266. package/lib/engine-components/ui/CanvasGroup.js +4 -0
  267. package/lib/engine-components/ui/CanvasGroup.js.map +1 -1
  268. package/lib/engine-components/ui/EventSystem.d.ts +2 -0
  269. package/lib/engine-components/ui/EventSystem.js +2 -0
  270. package/lib/engine-components/ui/EventSystem.js.map +1 -1
  271. package/lib/engine-components/ui/Image.d.ts +4 -0
  272. package/lib/engine-components/ui/Image.js +4 -0
  273. package/lib/engine-components/ui/Image.js.map +1 -1
  274. package/lib/engine-components/ui/InputField.d.ts +4 -0
  275. package/lib/engine-components/ui/InputField.js +4 -0
  276. package/lib/engine-components/ui/InputField.js.map +1 -1
  277. package/lib/engine-components/ui/Outline.d.ts +7 -0
  278. package/lib/engine-components/ui/Outline.js +7 -0
  279. package/lib/engine-components/ui/Outline.js.map +1 -1
  280. package/lib/engine-components/ui/Text.d.ts +1 -0
  281. package/lib/engine-components/ui/Text.js +1 -0
  282. package/lib/engine-components/ui/Text.js.map +1 -1
  283. package/lib/engine-components/utils/LookAt.d.ts +1 -0
  284. package/lib/engine-components/utils/LookAt.js +1 -0
  285. package/lib/engine-components/utils/LookAt.js.map +1 -1
  286. package/lib/engine-components/web/Clickthrough.d.ts +1 -1
  287. package/lib/engine-components/web/Clickthrough.js +1 -1
  288. package/lib/engine-components/web/CursorFollow.d.ts +2 -0
  289. package/lib/engine-components/web/CursorFollow.js +3 -0
  290. package/lib/engine-components/web/CursorFollow.js.map +1 -1
  291. package/lib/engine-components/web/HoverAnimation.d.ts +1 -0
  292. package/lib/engine-components/web/HoverAnimation.js +1 -0
  293. package/lib/engine-components/web/HoverAnimation.js.map +1 -1
  294. package/lib/engine-components/web/ScrollFollow.d.ts +2 -0
  295. package/lib/engine-components/web/ScrollFollow.js +2 -0
  296. package/lib/engine-components/web/ScrollFollow.js.map +1 -1
  297. package/lib/engine-components/web/ViewBox.d.ts +1 -0
  298. package/lib/engine-components/web/ViewBox.js +1 -0
  299. package/lib/engine-components/web/ViewBox.js.map +1 -1
  300. package/lib/engine-components/webxr/Avatar.d.ts +5 -0
  301. package/lib/engine-components/webxr/Avatar.js +5 -0
  302. package/lib/engine-components/webxr/Avatar.js.map +1 -1
  303. package/lib/engine-components/webxr/WebARCameraBackground.d.ts +1 -0
  304. package/lib/engine-components/webxr/WebARCameraBackground.js +1 -0
  305. package/lib/engine-components/webxr/WebARCameraBackground.js.map +1 -1
  306. package/lib/engine-components/webxr/WebARSessionRoot.d.ts +1 -0
  307. package/lib/engine-components/webxr/WebARSessionRoot.js +1 -0
  308. package/lib/engine-components/webxr/WebARSessionRoot.js.map +1 -1
  309. package/lib/engine-components/webxr/WebXR.d.ts +1 -1
  310. package/lib/engine-components/webxr/WebXR.js +5 -1
  311. package/lib/engine-components/webxr/WebXR.js.map +1 -1
  312. package/lib/engine-components/webxr/controllers/XRControllerFollow.d.ts +1 -0
  313. package/lib/engine-components/webxr/controllers/XRControllerFollow.js +1 -0
  314. package/lib/engine-components/webxr/controllers/XRControllerFollow.js.map +1 -1
  315. package/lib/engine-components/webxr/controllers/XRControllerModel.d.ts +4 -0
  316. package/lib/engine-components/webxr/controllers/XRControllerModel.js +4 -0
  317. package/lib/engine-components/webxr/controllers/XRControllerModel.js.map +1 -1
  318. package/lib/engine-components/webxr/controllers/XRControllerMovement.d.ts +1 -0
  319. package/lib/engine-components/webxr/controllers/XRControllerMovement.js +1 -0
  320. package/lib/engine-components/webxr/controllers/XRControllerMovement.js.map +1 -1
  321. package/lib/engine-components-experimental/networking/PlayerSync.d.ts +2 -0
  322. package/lib/engine-components-experimental/networking/PlayerSync.js +2 -0
  323. package/lib/engine-components-experimental/networking/PlayerSync.js.map +1 -1
  324. package/lib/needle-engine.js +2 -1
  325. package/lib/needle-engine.js.map +1 -1
  326. package/package.json +19 -12
  327. package/plugins/types/needleConfig.d.ts +1 -1
  328. package/plugins/types/next.d.ts +1 -1
  329. package/plugins/types/userconfig.d.ts +4 -1
  330. package/plugins/vite/custom-element-data.js +80 -0
  331. package/plugins/vite/index.js +4 -0
  332. package/src/engine/api.ts +0 -1
  333. package/src/engine/debug/debug_spector.ts +43 -0
  334. package/src/engine/engine_application.ts +16 -1
  335. package/src/engine/engine_context.ts +5 -1
  336. package/src/engine/engine_license.ts +1 -1
  337. package/src/engine/engine_physics.ts +6 -2
  338. package/src/engine/engine_physics_rapier.ts +11 -2
  339. package/src/engine/engine_texture.ts +1 -1
  340. package/src/engine/engine_tonemapping.ts +1 -1
  341. package/src/engine/engine_types.ts +17 -0
  342. package/src/engine/engine_typestore.ts +5 -6
  343. package/src/engine/webcomponents/logo-element.ts +12 -0
  344. package/src/engine/webcomponents/needle menu/needle-menu.ts +24 -3
  345. package/src/engine/webcomponents/needle-button.ts +6 -0
  346. package/src/engine/webcomponents/needle-engine.ts +331 -22
  347. package/src/engine/xr/NeedleXRSession.ts +3 -1
  348. package/src/engine-components/AlignmentConstraint.ts +9 -0
  349. package/src/engine-components/Animator.ts +1 -0
  350. package/src/engine-components/AudioListener.ts +2 -0
  351. package/src/engine-components/AudioSource.ts +1 -0
  352. package/src/engine-components/AxesHelper.ts +2 -0
  353. package/src/engine-components/Camera.ts +1 -0
  354. package/src/engine-components/CharacterController.ts +4 -1
  355. package/src/engine-components/Component.ts +9 -1
  356. package/src/engine-components/DeleteBox.ts +2 -0
  357. package/src/engine-components/DeviceFlag.ts +4 -0
  358. package/src/engine-components/DragControls.ts +1 -0
  359. package/src/engine-components/DropListener.ts +1 -0
  360. package/src/engine-components/Duplicatable.ts +1 -0
  361. package/src/engine-components/EventTrigger.ts +2 -0
  362. package/src/engine-components/GridHelper.ts +2 -0
  363. package/src/engine-components/GroundProjection.ts +1 -0
  364. package/src/engine-components/LODGroup.ts +2 -0
  365. package/src/engine-components/Light.ts +1 -0
  366. package/src/engine-components/LookAtConstraint.ts +1 -0
  367. package/src/engine-components/NeedleMenu.ts +1 -0
  368. package/src/engine-components/NestedGltf.ts +1 -0
  369. package/src/engine-components/Networking.ts +1 -0
  370. package/src/engine-components/OffsetConstraint.ts +7 -0
  371. package/src/engine-components/OrbitControls.ts +1 -0
  372. package/src/engine-components/PlayerColor.ts +2 -0
  373. package/src/engine-components/ReflectionProbe.ts +1 -0
  374. package/src/engine-components/RendererInstancing.ts +69 -33
  375. package/src/engine-components/RigidBody.ts +1 -0
  376. package/src/engine-components/SceneSwitcher.ts +1 -0
  377. package/src/engine-components/ScreenCapture.ts +1 -0
  378. package/src/engine-components/SeeThrough.ts +1 -0
  379. package/src/engine-components/ShadowCatcher.ts +2 -0
  380. package/src/engine-components/Skybox.ts +48 -36
  381. package/src/engine-components/SmoothFollow.ts +1 -0
  382. package/src/engine-components/SpatialTrigger.ts +1 -0
  383. package/src/engine-components/SpectatorCamera.ts +1 -0
  384. package/src/engine-components/SpriteRenderer.ts +1 -0
  385. package/src/engine-components/SyncedCamera.ts +2 -0
  386. package/src/engine-components/SyncedRoom.ts +1 -0
  387. package/src/engine-components/SyncedTransform.ts +2 -0
  388. package/src/engine-components/TransformGizmo.ts +2 -0
  389. package/src/engine-components/VideoPlayer.ts +1 -0
  390. package/src/engine-components/Voip.ts +1 -0
  391. package/src/engine-components/export/usdz/USDZExporter.ts +52 -5
  392. package/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts +18 -0
  393. package/src/engine-components/particlesystem/ParticleSystem.ts +1 -0
  394. package/src/engine-components/physics/Attractor.ts +3 -0
  395. package/src/engine-components/postprocessing/Effects/BloomEffect.ts +1 -0
  396. package/src/engine-components/postprocessing/Effects/ChromaticAberration.ts +4 -0
  397. package/src/engine-components/postprocessing/Effects/ColorAdjustments.ts +3 -0
  398. package/src/engine-components/postprocessing/Effects/DepthOfField.ts +4 -0
  399. package/src/engine-components/postprocessing/Effects/EffectWrapper.ts +1 -0
  400. package/src/engine-components/postprocessing/Effects/Pixelation.ts +3 -0
  401. package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.ts +4 -0
  402. package/src/engine-components/postprocessing/Effects/Sharpening.ts +4 -0
  403. package/src/engine-components/postprocessing/Effects/TiltShiftEffect.ts +4 -0
  404. package/src/engine-components/postprocessing/Effects/Tonemapping.ts +4 -0
  405. package/src/engine-components/postprocessing/Effects/Vignette.ts +4 -0
  406. package/src/engine-components/postprocessing/Volume.ts +1 -0
  407. package/src/engine-components/splines/Spline.ts +1 -0
  408. package/src/engine-components/splines/SplineWalker.ts +1 -0
  409. package/src/engine-components/timeline/PlayableDirector.ts +1 -0
  410. package/src/engine-components/timeline/SignalAsset.ts +1 -0
  411. package/src/engine-components/ui/Button.ts +4 -0
  412. package/src/engine-components/ui/Canvas.ts +5 -0
  413. package/src/engine-components/ui/CanvasGroup.ts +4 -0
  414. package/src/engine-components/ui/EventSystem.ts +2 -0
  415. package/src/engine-components/ui/Image.ts +4 -0
  416. package/src/engine-components/ui/InputField.ts +4 -0
  417. package/src/engine-components/ui/Outline.ts +7 -0
  418. package/src/engine-components/ui/Text.ts +1 -0
  419. package/src/engine-components/utils/LookAt.ts +1 -0
  420. package/src/engine-components/web/Clickthrough.ts +1 -1
  421. package/src/engine-components/web/CursorFollow.ts +4 -0
  422. package/src/engine-components/web/HoverAnimation.ts +1 -0
  423. package/src/engine-components/web/ScrollFollow.ts +2 -0
  424. package/src/engine-components/web/ViewBox.ts +1 -0
  425. package/src/engine-components/webxr/Avatar.ts +5 -0
  426. package/src/engine-components/webxr/WebARCameraBackground.ts +1 -0
  427. package/src/engine-components/webxr/WebARSessionRoot.ts +1 -0
  428. package/src/engine-components/webxr/WebXR.ts +5 -1
  429. package/src/engine-components/webxr/controllers/XRControllerFollow.ts +1 -0
  430. package/src/engine-components/webxr/controllers/XRControllerModel.ts +4 -0
  431. package/src/engine-components/webxr/controllers/XRControllerMovement.ts +1 -0
  432. package/src/engine-components-experimental/networking/PlayerSync.ts +2 -0
  433. package/src/needle-engine.ts +4 -2
  434. package/dist/generateMeshBVH.worker-B9bjdr6J.js +0 -25
  435. package/dist/loader.worker-CiTwpNPW.js +0 -27
  436. package/dist/rapier-BqdcSmKY.umd.cjs +0 -1
  437. package/dist/rapier-Cg3w3nFI.min.js +0 -1
  438. package/dist/rapier-sU12SWAs.js +0 -5217
  439. package/lib/engine/webcomponents/needle-engine.attributes.d.ts +0 -70
  440. package/lib/engine/webcomponents/needle-engine.attributes.js +0 -2
  441. package/lib/engine/webcomponents/needle-engine.attributes.js.map +0 -1
  442. package/src/engine/webcomponents/needle-engine.attributes.ts +0 -85
@@ -1,16 +1,14 @@
1
- import { CompressedCubeTexture, CubeRefractionMapping, CubeTexture, CubeUVReflectionMapping, EquirectangularRefractionMapping, SRGBColorSpace, Texture, TextureLoader } from "three"
2
- import { EXRLoader } from "three/examples/jsm/loaders/EXRLoader.js";
3
- import { KTX2Loader } from "three/examples/jsm/loaders/KTX2Loader.js";
4
- import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';
1
+ import { CompressedCubeTexture, CubeTexture, CubeUVReflectionMapping, EquirectangularRefractionMapping, Texture } from "three"
5
2
 
3
+ import { isDevEnvironment } from "../engine/debug/debug.js";
6
4
  import { ContextEvent, ContextRegistry } from "../engine/engine_context_registry.js";
7
5
  import { syncField } from "../engine/engine_networking_auto.js";
8
6
  import { loadPMREM } from "../engine/engine_pmrem.js";
9
7
  import { serializable } from "../engine/engine_serialization_decorator.js";
10
8
  import { type IContext } from "../engine/engine_types.js";
11
- import { addAttributeChangeCallback, getParam, PromiseAllWithErrors, removeAttributeChangeCallback, toSourceId } from "../engine/engine_utils.js";
9
+ import { addAttributeChangeCallback, getParam, removeAttributeChangeCallback, toSourceId } from "../engine/engine_utils.js";
12
10
  import { registerObservableAttribute } from "../engine/webcomponents/needle-engine.extras.js";
13
- import { Camera, ClearFlags } from "./Camera.js";
11
+ import { Camera } from "./Camera.js";
14
12
  import { Behaviour, GameObject } from "./Component.js";
15
13
 
16
14
  const debug = getParam("debugskybox");
@@ -18,6 +16,29 @@ const debug = getParam("debugskybox");
18
16
  registerObservableAttribute("background-image");
19
17
  registerObservableAttribute("environment-image");
20
18
 
19
+
20
+ type MagicSkyboxName = "studio" | "blurred-skybox" | "quicklook-ar" | "quicklook";
21
+ const MagicSkyboxNames: Record<MagicSkyboxName, { url: string, url_low: string }> = {
22
+ "studio": {
23
+ url: "https://cdn.needle.tools/static/skybox/modelviewer-Neutral.pmrem4x4.ktx2?pmrem",
24
+ url_low: "https://cdn.needle.tools/static/skybox/modelviewer-Neutral-small.pmrem4x4.ktx2?pmrem"
25
+ },
26
+ "blurred-skybox": {
27
+ url: "https://cdn.needle.tools/static/skybox/blurred-skybox.pmrem4x4.ktx2?pmrem",
28
+ url_low: "https://cdn.needle.tools/static/skybox/blurred-skybox-small.pmrem4x4.ktx2?pmrem"
29
+ },
30
+ "quicklook-ar": {
31
+ url: "https://cdn.needle.tools/static/skybox/QuickLook-ARMode.pmrem4x4.ktx2?pmrem",
32
+ url_low: "https://cdn.needle.tools/static/skybox/QuickLook-ARMode-small.pmrem4x4.ktx2?pmrem"
33
+ },
34
+ "quicklook": {
35
+ url: "https://cdn.needle.tools/static/skybox/QuickLook-ObjectMode.pmrem4x4.ktx2?pmrem",
36
+ url_low: "https://cdn.needle.tools/static/skybox/QuickLook-ObjectMode-small.pmrem4x4.ktx2?pmrem"
37
+ }
38
+ } as const;
39
+ type AnyString = string & { _brand?: never };
40
+
41
+
21
42
  function createRemoteSkyboxComponent(context: IContext, url: string, skybox: boolean, environment: boolean, attribute: "background-image" | "environment-image") {
22
43
 
23
44
  // when the user sets the attribute to a color we can not handle it as a skybox url.
@@ -91,8 +112,9 @@ ContextRegistry.registerCallback(ContextEvent.ContextCreationStart, () => {
91
112
  });
92
113
 
93
114
 
115
+
94
116
  /**
95
- * RemoteSkybox is a component that allows you to set the skybox of a scene from a URL or a local file.
117
+ * RemoteSkybox is a component that allows you to set the skybox or environment texture of a scene from a URL, a local file or a static skybox name.
96
118
  * It supports .hdr, .exr, .jpg, .png files.
97
119
  *
98
120
  * ### Events
@@ -121,14 +143,20 @@ ContextRegistry.registerCallback(ContextEvent.ContextCreationStart, () => {
121
143
  * skybox.setSkybox("https://example.com/skybox.hdr");
122
144
  * ```
123
145
  *
146
+ * @summary Sets the skybox or environment texture of a scene
124
147
  * @category Rendering
125
148
  * @group Components
126
149
  */
127
150
  export class RemoteSkybox extends Behaviour {
128
151
 
129
152
  /**
130
- * URL to a remote skybox. This value can also use a magic skybox name. Options are "quicklook", "quicklook-ar", "studio", "blurred-skybox".
131
- * To update the skybox/environment map use `setSkybox(url)`
153
+ * URL to a remote skybox.
154
+ * To update the skybox/environment map use `setSkybox(url)`.
155
+ *
156
+ * The url can also be set to a magic skybox name.
157
+ * Magic name options are: "quicklook", "quicklook-ar", "studio", "blurred-skybox".
158
+ * These will resolve to built-in skyboxes hosted on the Needle CDN that are static, optimized for the web and will never change.
159
+ *
132
160
  * @example
133
161
  * ```ts
134
162
  * skybox.url = "https://example.com/skybox.hdr";
@@ -136,7 +164,7 @@ export class RemoteSkybox extends Behaviour {
136
164
  */
137
165
  @syncField(RemoteSkybox.prototype.urlChangedSyncField)
138
166
  @serializable(URL)
139
- url?: string;
167
+ url: MagicSkyboxName | AnyString = "studio";
140
168
 
141
169
  /**
142
170
  * When enabled a user can drop a link to a skybox image on the scene to set the skybox.
@@ -208,7 +236,7 @@ export class RemoteSkybox extends Behaviour {
208
236
  * @param name Define name of the file with extension if it isn't apart of the url
209
237
  * @returns Whether the skybox was successfully set
210
238
  */
211
- async setSkybox(url: string | undefined | null, name?: string) {
239
+ async setSkybox(url: MagicSkyboxName | AnyString | undefined | null, name?: string) {
212
240
  if (!this.activeAndEnabled) return false;
213
241
 
214
242
  url = tryParseMagicSkyboxName(url, this.environment, this.background);
@@ -404,38 +432,22 @@ export class RemoteSkybox extends Behaviour {
404
432
 
405
433
 
406
434
 
407
-
408
435
  function tryParseMagicSkyboxName(str: string | null | undefined, environment: boolean, background: boolean): string | null {
409
436
 
410
437
  if (str === null || str === undefined) return null;
411
438
 
412
439
  const useLowRes = environment && !background;
413
440
 
414
- switch (str.toLowerCase()) {
415
- case "studio":
416
- if (useLowRes) {
417
- return "https://cdn.needle.tools/static/skybox/modelviewer-Neutral-small.pmrem4x4.ktx2?pmrem";
418
- }
419
- return "https://cdn.needle.tools/static/skybox/modelviewer-Neutral.pmrem4x4.ktx2?pmrem";
420
-
421
- case "blurred-skybox":
422
- if (useLowRes) {
423
- return "https://cdn.needle.tools/static/skybox/blurred-skybox-small.pmrem4x4.ktx2?pmrem";
424
- }
425
- return "https://cdn.needle.tools/static/skybox/blurred-skybox.pmrem4x4.ktx2?pmrem";
426
- case "quicklook-ar":
427
- if (useLowRes) {
428
- return "https://cdn.needle.tools/static/skybox/QuickLook-ARMode-small.pmrem4x4.ktx2?pmrem";
429
- }
430
- return "https://cdn.needle.tools/static/skybox/QuickLook-ARMode.pmrem4x4.ktx2?pmrem";
431
- case "quicklook":
432
- if (useLowRes) {
433
- return "https://cdn.needle.tools/static/skybox/QuickLook-ObjectMode-small.pmrem4x4.ktx2?pmrem";
434
- }
435
- return "https://cdn.needle.tools/static/skybox/QuickLook-ObjectMode.pmrem4x4.ktx2?pmrem";
441
+ const value = MagicSkyboxNames[str.toLowerCase() as MagicSkyboxName];
442
+ if (value) {
443
+ return useLowRes ? value.url_low : value.url;
444
+ }
445
+ else if (typeof str === "string" && str?.length && (isDevEnvironment() || debug)) {
446
+ const noUrlOrFile = !str.startsWith("http") && !str.startsWith("file:") && !str.startsWith("blob:") && !str.startsWith("data:");
447
+ if(noUrlOrFile) {
448
+ console.warn(`RemoteSkybox: Unknown magic skybox name "${str}". Valid names are: ${Object.keys(MagicSkyboxNames).map(n => `"${n}"`).join(", ")}`);
449
+ }
436
450
  }
437
-
438
-
439
451
 
440
452
  return str;
441
453
  }
@@ -9,6 +9,7 @@ import { Behaviour } from "./Component.js";
9
9
  /**
10
10
  * SmoothFollow makes the {@link Object3D} (`GameObject`) smoothly follow another target {@link Object3D}.
11
11
  * It can follow the target's position, rotation, or both.
12
+ * @summary Smoothly follows a target object
12
13
  * @category Interactivity
13
14
  * @group Components
14
15
  */
@@ -26,6 +26,7 @@ function testMask(mask1, mask2) {
26
26
  /**
27
27
  * Component that receives and responds to spatial events, like entering or exiting a trigger zone.
28
28
  * Used in conjunction with {@link SpatialTrigger} to create interactive spatial events.
29
+ * @summary Receives spatial trigger events
29
30
  * @category Interactivity
30
31
  * @group Components
31
32
  */
@@ -35,6 +35,7 @@ const debug = getParam("debugspectator");
35
35
  *
36
36
  * Debug mode can be enabled with the URL parameter `?debugspectator`, which provides additional console output.
37
37
  *
38
+ * @summary Follow other users in a networked room
38
39
  * @category Networking
39
40
  * @group Components
40
41
  */
@@ -86,6 +86,7 @@ function updateTextureIfNecessary(tex: Texture) {
86
86
 
87
87
  /**
88
88
  * A sprite is a mesh that represents a 2D image. Used by the {@link SpriteRenderer} to render 2D images in the scene.
89
+ * @summary 2D image renderer
89
90
  * @category Rendering
90
91
  * @group Components
91
92
  */
@@ -63,6 +63,8 @@ declare type UserCamInfo = {
63
63
  /**
64
64
  * SyncedCamera is a component that syncs the camera position and rotation of all users in the room.
65
65
  * A prefab can be set to represent the remote cameras visually in the scene.
66
+ *
67
+ * @summary Syncs camera position and rotation of users in a networked room
66
68
  * @category Networking
67
69
  * @group Components
68
70
  */
@@ -33,6 +33,7 @@ const debug = utils.getParam("debugsyncedroom");
33
33
  * myObject.addComponent(SyncedRoom, { joinRandomRoom: true, roomPrefix: "myApp_" });
34
34
  * ```
35
35
  *
36
+ * @summary Joins a networked room based on URL parameters or a random room
36
37
  * @category Networking
37
38
  * @group Components
38
39
  */
@@ -57,6 +57,8 @@ onUpdate((ctx) => {
57
57
  /**
58
58
  * SyncedTransform synchronizes the position and rotation of a game object over the network.
59
59
  * It handles ownership transfer, interpolation, and network state updates automatically.
60
+ *
61
+ * @summary Synchronizes object transform over the network with ownership management
60
62
  * @category Networking
61
63
  * @group Components
62
64
  */
@@ -10,6 +10,8 @@ import { SyncedTransform } from "./SyncedTransform.js";
10
10
  /**
11
11
  * TransformGizmo displays manipulation controls for translating, rotating, and scaling objects in the scene.
12
12
  * It wraps three.js {@link TransformControls} and provides keyboard shortcuts for changing modes and settings.
13
+ *
14
+ * @summary Object manipulation gizmo for translating, rotating, and scaling
13
15
  * @category Helpers
14
16
  * @group Components
15
17
  */
@@ -54,6 +54,7 @@ export enum VideoRenderMode {
54
54
  * playOnAwake: true,
55
55
  * });
56
56
  * ```
57
+ * @summary Plays video clips from URLs or streams
57
58
  * @category Multimedia
58
59
  * @group Components
59
60
  */
@@ -14,6 +14,7 @@ const debugParam = getParam("debugvoip");
14
14
  /**
15
15
  * The Voice over IP component (VoIP) allows you to send and receive audio streams to other users in the same networked room.
16
16
  * It requires a networking connection to be working (e.g. by having an active SyncedRoom component in the scene or by connecting to a room manually).
17
+ * @summary Voice over IP (VoIP) for networked audio communication
17
18
  * @category Networking
18
19
  * @group Components
19
20
  */
@@ -1,5 +1,5 @@
1
1
  import { NEEDLE_progressive } from "@needle-tools/gltf-progressive";
2
- import { Euler, EventDispatcher, Matrix4, Mesh, Object3D, Quaternion, Vector3 } from "three";
2
+ import { Euler, Material, Matrix4, Mesh, Object3D, Quaternion, Vector3 } from "three";
3
3
 
4
4
  import { isDevEnvironment, showBalloonMessage, showBalloonWarning } from "../../../engine/debug/index.js";
5
5
  import { hasProLicense } from "../../../engine/engine_license.js";
@@ -53,6 +53,23 @@ export class CustomBranding {
53
53
  callToActionURL?: string;
54
54
  }
55
55
 
56
+ type BeforeLODExportArguments = {
57
+ readonly exporter: USDZExporter;
58
+ /** The type of LOD being exported, either a texture or a mesh */
59
+ readonly type: "texture" | "mesh";
60
+ /** The Renderer gameobject */
61
+ readonly object: Object3D;
62
+ /** The mesh being exported, if applicable */
63
+ readonly mesh?: Mesh;
64
+ /** The material being exported, if applicable */
65
+ readonly material?: Material;
66
+ /** By default LOD 0 will be exported (highest quality).
67
+ * Set to a different LOD level if needed.
68
+ * Set to -1 to disable LOD export and simply export the current version.
69
+ */
70
+ overrideLevel?: number;
71
+ }
72
+
56
73
  /**
57
74
  * Exports the current scene or a specific object as USDZ file and opens it in QuickLook on iOS/iPadOS/visionOS.
58
75
  * The USDZ file is generated using the Needle Engine ThreeUSDZExporter.
@@ -72,8 +89,12 @@ export class CustomBranding {
72
89
  */
73
90
  export class USDZExporter extends Behaviour {
74
91
 
75
- static readonly beforeExport = new EventList<{ exporter: USDZExporter }>();
76
- static readonly afterExport = new EventList<{ exporter: USDZExporter }>();
92
+ /** Called before the USDZ file is exported */
93
+ static readonly beforeExport = new EventList<{ readonly exporter: USDZExporter }>();
94
+ /** Called after the USDZ file has been exported */
95
+ static readonly afterExport = new EventList<{ readonly exporter: USDZExporter }>();
96
+ /** Called before LOD level are exported. Can be used to override the LOD export settings */
97
+ static readonly beforeLODExport = new EventList<BeforeLODExportArguments>();
77
98
 
78
99
  /**
79
100
  * Assign the object to export as USDZ file. If undefined or null, the whole scene will be exported.
@@ -329,7 +350,20 @@ export class USDZExporter extends Behaviour {
329
350
  for (const rend of renderers) {
330
351
  for (const mesh of rend.sharedMeshes) {
331
352
  if (mesh) {
332
- const task = NEEDLE_progressive.assignMeshLOD(mesh, 0);
353
+ let lodLevel = 0;
354
+ const args: BeforeLODExportArguments = { exporter: this, type: "mesh" as const, object: rend.gameObject, mesh: mesh, };
355
+ USDZExporter.beforeLODExport.invoke(args);
356
+ if (args.overrideLevel !== undefined) {
357
+ if (args.overrideLevel === -1) {
358
+ if (debug) console.warn("Skipping LOD export for mesh due to overrideLevel -1", rend.gameObject, mesh);
359
+ continue; // skip LOD assignment
360
+ }
361
+ else if (args.overrideLevel >= 0) {
362
+ lodLevel = args.overrideLevel;
363
+ if (debug) console.log("Overriding LOD level for mesh export to level " + lodLevel + " " + mesh.name);
364
+ }
365
+ }
366
+ const task = NEEDLE_progressive.assignMeshLOD(mesh, lodLevel);
333
367
  if (task instanceof Promise)
334
368
  progressiveLoading.push(new Promise<void>((resolve, reject) => {
335
369
  task.then(() => {
@@ -342,7 +376,20 @@ export class USDZExporter extends Behaviour {
342
376
  }
343
377
  for (const mat of rend.sharedMaterials) {
344
378
  if (mat) {
345
- const task = NEEDLE_progressive.assignTextureLOD(mat, 0);
379
+ let lodLevel = 0;
380
+ const args: BeforeLODExportArguments = { exporter: this, type: "texture" as const, object: rend.gameObject, material: mat };
381
+ USDZExporter.beforeLODExport.invoke(args);
382
+ if (args.overrideLevel !== undefined) {
383
+ if (args.overrideLevel === -1) {
384
+ if (debug) console.warn("Skipping LOD assignment due to overrideLevel -1", rend.gameObject, mat);
385
+ continue; // skip LOD assignment
386
+ }
387
+ else if (args.overrideLevel >= 0) {
388
+ lodLevel = args.overrideLevel;
389
+ if (debug) console.log("Overriding LOD level for texture export to level " + lodLevel + " " + mat.name);
390
+ }
391
+ }
392
+ const task = NEEDLE_progressive.assignTextureLOD(mat, lodLevel);
346
393
  if (task instanceof Promise)
347
394
  progressiveLoading.push(new Promise<void>((resolve, reject) => {
348
395
  task.then(() => {
@@ -31,6 +31,8 @@ function ensureRaycaster(obj: GameObject) {
31
31
  }
32
32
 
33
33
  /**
34
+ * Make the object move to the target object's transform when clicked.
35
+ * @summary Moves an object to a target transform upon click
34
36
  * @category Everywhere Actions
35
37
  * @group Components
36
38
  */
@@ -176,6 +178,8 @@ export class ChangeTransformOnClick extends Behaviour implements IPointerClickHa
176
178
  }
177
179
 
178
180
  /**
181
+ * Change the material of objects when clicked.
182
+ * @summary Changes the material of objects when clicked
179
183
  * @category Everywhere Actions
180
184
  * @group Components
181
185
  */
@@ -366,6 +370,8 @@ export class ChangeMaterialOnClick extends Behaviour implements IPointerClickHan
366
370
  }
367
371
 
368
372
  /**
373
+ * Set the active state of an object when clicked.
374
+ * @summary Sets the active state of an object when clicked
369
375
  * @category Everywhere Actions
370
376
  * @group Components
371
377
  */
@@ -604,6 +610,8 @@ export class SetActiveOnClick extends Behaviour implements IPointerClickHandler,
604
610
  }
605
611
 
606
612
  /**
613
+ * Hides the object on scene start.
614
+ * @summary Hides the object on scene start
607
615
  * @category Everywhere Actions
608
616
  * @group Components
609
617
  */
@@ -651,6 +659,8 @@ export class HideOnStart extends Behaviour implements UsdzBehaviour {
651
659
  }
652
660
 
653
661
  /**
662
+ * Emphasize the target object when clicked.
663
+ * @summary Emphasizes the target object when clicked
654
664
  * @category Everywhere Actions
655
665
  * @group Components
656
666
  */
@@ -683,6 +693,8 @@ export class EmphasizeOnClick extends Behaviour implements UsdzBehaviour {
683
693
  }
684
694
 
685
695
  /**
696
+ * Plays an audio clip when clicked.
697
+ * @summary Plays an audio clip when clicked
686
698
  * @category Everywhere Actions
687
699
  * @group Components
688
700
  */
@@ -808,6 +820,8 @@ export class PlayAudioOnClick extends Behaviour implements IPointerClickHandler,
808
820
  }
809
821
 
810
822
  /**
823
+ * Plays an animation when clicked.
824
+ * @summary Plays an animation when clicked
811
825
  * @category Everywhere Actions
812
826
  * @group Components
813
827
  */
@@ -1216,6 +1230,8 @@ export class PreliminaryTrigger extends Behaviour {
1216
1230
  }
1217
1231
 
1218
1232
  /**
1233
+ * Hides or shows the object when clicked.
1234
+ * @summary Hides or shows the object when clicked
1219
1235
  * @category Everywhere Actions
1220
1236
  * @group Components
1221
1237
  */
@@ -1241,6 +1257,8 @@ export class VisibilityAction extends PreliminaryAction {
1241
1257
  }
1242
1258
 
1243
1259
  /**
1260
+ * Triggers an action when the object is tapped/clicked.
1261
+ * @summary Triggers an action when the object is tapped/clicked
1244
1262
  * @category Everywhere Actions
1245
1263
  * @group Components
1246
1264
  */
@@ -692,6 +692,7 @@ class ParticlesEmissionState implements EmissionState {
692
692
  *
693
693
  * Needle Engine uses [three.quarks](https://github.com/Alchemist0823/three.quarks) under the hood to handle particles.
694
694
  *
695
+ * @summary Particle System
695
696
  * @category Rendering
696
697
  * @group Components
697
698
  */
@@ -14,6 +14,9 @@ import { Rigidbody } from "../RigidBody.js";
14
14
  * attractor.strength = 5; // positive value to attract
15
15
  * attractor.radius = 10; // only attract within 10 units
16
16
  * attractor.targets.push(rigidbody); // add the Rigidbody to be attracted
17
+ * @summary Attract Rigidbodies towards the position of this component
18
+ * @category Physics
19
+ * @group Components
17
20
  */
18
21
  export class Attractor extends Behaviour {
19
22
 
@@ -19,6 +19,7 @@ import { registerCustomEffectType } from "../VolumeProfile.js";
19
19
  * volume.add(bloom);
20
20
  * ```
21
21
  *
22
+ * @summary Bloom Post-Processing Effect
22
23
  * @category Effects
23
24
  * @group Components
24
25
  */
@@ -7,6 +7,10 @@ import { VolumeParameter } from "../VolumeParameter.js";
7
7
  import { registerCustomEffectType, VolumeProfile } from "../VolumeProfile.js";
8
8
 
9
9
  /**
10
+ * Chromatic Aberration effect simulates the color fringing effect seen in real-world cameras.
11
+ * It offsets the red, green, and blue color channels to create a distorted, colorful edge around objects.
12
+ * This effect can enhance the visual appeal of scenes by adding a subtle or pronounced chromatic distortion.
13
+ * @summary Chromatic Aberration Post-Processing Effect
10
14
  * @category Effects
11
15
  * @group Components
12
16
  */
@@ -8,6 +8,9 @@ import { registerCustomEffectType } from "../VolumeProfile.js";
8
8
  import { ToneMappingEffect } from "./Tonemapping.js";
9
9
 
10
10
  /**
11
+ * Color Adjustments effect allows you to modify the overall color properties of the rendered scene, including post-exposure, contrast, hue shift, and saturation.
12
+ * These adjustments can be used to enhance the visual aesthetics of the scene or to achieve specific artistic effects.
13
+ * @summary Color Adjustments Post-Processing Effect
11
14
  * @category Effects
12
15
  * @group Components
13
16
  */
@@ -17,6 +17,10 @@ export enum DepthOfFieldMode {
17
17
  const debug = getParam("debugpost");
18
18
 
19
19
  /**
20
+ * Depth of Field effect simulates the focusing behavior of real-world cameras by blurring objects that are outside the focal plane.
21
+ * This effect enhances the sense of depth in a scene by mimicking how cameras focus on subjects at varying distances, creating a more immersive visual experience.
22
+ * It can be adjusted to achieve different artistic effects, from subtle background blurring to pronounced bokeh effects.
23
+ * @summary Depth of Field Post-Processing Effect
20
24
  * @category Effects
21
25
  * @group Components
22
26
  */
@@ -3,6 +3,7 @@ import type { Effect } from "postprocessing";
3
3
  import { EffectProviderResult, PostProcessingEffect } from "../PostProcessingEffect.js";
4
4
 
5
5
  /**
6
+ *
6
7
  * @category Effects
7
8
  * @group Components
8
9
  */
@@ -7,6 +7,9 @@ import { VolumeParameter } from "../VolumeParameter.js";
7
7
  import { registerCustomEffectType } from "../VolumeProfile.js";
8
8
 
9
9
  /**
10
+ * Pixelation effect simulates a pixelated look by enlarging pixels in the rendered scene.
11
+ * This effect can be used to achieve a retro or stylized visual aesthetic, reminiscent of early video games or low-resolution graphics.
12
+ * @summary Pixelation Post-Processing Effect
10
13
  * @category Effects
11
14
  * @group Components
12
15
  */
@@ -23,6 +23,10 @@ export enum ScreenSpaceAmbientOcclusionN8QualityMode {
23
23
  }
24
24
 
25
25
  /** Screen Space Ambient Occlusion (SSAO) effect.
26
+ * Ambient Occlusion is a shading method used to calculate how exposed each point in a scene is to ambient lighting.
27
+ * The effect enhances the depth and realism of 3D scenes by simulating the soft shadows that occur in crevices, corners, and areas where objects are close to each other.
28
+ * This implementation uses the N8AO library to provide high-quality SSAO with various quality settings.
29
+ * @summary Screen Space Ambient Occlusion (SSAO) Post-Processing Effect
26
30
  * @category Effects
27
31
  * @group Components
28
32
  * @link [N8AO documentation](https://github.com/N8python/n8ao)
@@ -14,6 +14,10 @@ import { PostProcessingEffectOrder } from "../utils.js";
14
14
  // }
15
15
 
16
16
  /**
17
+ * Sharpening effect enhances the details and edges in the rendered scene by increasing the contrast between adjacent pixels.
18
+ * This effect can make textures and fine details appear clearer and more defined, improving the overall visual quality of the scene.
19
+ * It is particularly useful in scenes where details may be lost due to blurriness or low resolution.
20
+ * @summary Sharpening Post-Processing Effect
17
21
  * @category Effects
18
22
  * @group Components
19
23
  */
@@ -5,6 +5,10 @@ import { VolumeParameter } from "../VolumeParameter.js";
5
5
  import { registerCustomEffectType } from "../VolumeProfile.js";
6
6
 
7
7
  /**
8
+ * Tilt Shift effect simulates a miniature scene by applying a selective focus blur to the rendered image.
9
+ * This effect creates a shallow depth of field, making real-world scenes appear as if they are small-scale models.
10
+ * It is often used in photography and cinematography to draw attention to specific areas of the scene while blurring out the rest.
11
+ * @summary Tilt Shift Post-Processing Effect
8
12
  * @category Effects
9
13
  * @group Components
10
14
  */
@@ -14,6 +14,10 @@ const debug = getParam("debugpost");
14
14
 
15
15
 
16
16
  /**
17
+ * Tonemapping effect adjusts the brightness and contrast of the rendered scene to map high dynamic range (HDR) colors to a displayable range.
18
+ * This effect is essential for achieving realistic lighting and color representation in 3D scenes, as it helps to preserve details in both bright and dark areas.
19
+ * Various tonemapping algorithms can be applied to achieve different visual styles and effects.
20
+ * @summary Tonemapping Post-Processing Effect
17
21
  * @category Effects
18
22
  * @group Components
19
23
  */
@@ -7,6 +7,10 @@ import { VolumeParameter } from "../VolumeParameter.js";
7
7
  import { registerCustomEffectType } from "../VolumeProfile.js";
8
8
 
9
9
  /**
10
+ * Vignette effect darkens the edges of the rendered scene to draw attention to the center.
11
+ * This effect simulates the natural vignetting that occurs in photography and cinematography, where the corners of an image are darker than the center.
12
+ * It can be used to enhance the visual focus on the main subject of the scene and create a more immersive viewing experience.
13
+ * @summary Vignette Post-Processing Effect
10
14
  * @category Effects
11
15
  * @group Components
12
16
  */
@@ -41,6 +41,7 @@ const debug = getParam("debugpost");
41
41
  * volume.addEffect(pixelation);
42
42
  * ```
43
43
  *
44
+ * @summary Manage Post-Processing Effects
44
45
  * @category Rendering
45
46
  * @category Effects
46
47
  * @group Components
@@ -37,6 +37,7 @@ export class SplineData {
37
37
  *
38
38
  * You can create a SplineContainer from an array of points using the static method 'createFromPoints'.
39
39
  *
40
+ * @summary Holds spline data and generates a spline curve.
40
41
  * @category Splines
41
42
  * @group Components
42
43
  */
@@ -12,6 +12,7 @@ import { SplineContainer } from "./Spline.js";
12
12
  *
13
13
  * - Example http://samples.needle.tools/splines
14
14
  *
15
+ * @summary Moves an object along a spline
15
16
  * @category Splines
16
17
  * @group Components
17
18
  */
@@ -56,6 +56,7 @@ export type CreateTrackFunction = (director: PlayableDirector, track: Models.Tra
56
56
  * The PlayableDirector component is the main component to control timelines in needle engine.
57
57
  * It is used to play, pause, stop and evaluate timelines.
58
58
  * Assign a TimelineAsset to the `playableAsset` property to start playing a timeline.
59
+ * @summary Controls and plays TimelineAssets
59
60
  * @category Animation and Sequencing
60
61
  * @group Components
61
62
  */
@@ -29,6 +29,7 @@ export class SignalReceiverEvent {
29
29
  /** SignalReceiver is a component that listens for signals and invokes a reaction when a signal is received.
30
30
  * Signals can be added to a signal track on a {@link PlayableDirector}
31
31
  *
32
+ * @summary Receives signals and invokes reactions
32
33
  * @category Sequencing and Timelines
33
34
  * @group Components
34
35
  */
@@ -61,6 +61,10 @@ class AnimationTriggers {
61
61
  }
62
62
 
63
63
  /**
64
+ * Button is a UI component that can be clicked by the user to perform an action.
65
+ * It supports different visual states such as normal, highlighted, pressed, and disabled.
66
+ * You can customize the button's appearance using colors or animations for each state.
67
+ * @summary Button UI Component
64
68
  * @category User Interface
65
69
  * @group Components
66
70
  */
@@ -25,6 +25,11 @@ export enum RenderMode {
25
25
  const debugLayout = getParam("debuguilayout");
26
26
 
27
27
  /**
28
+ * Canvas is the root component for all UI elements in a scene.
29
+ * It defines the area where UI elements are rendered and manages their layout and rendering settings.
30
+ * Canvases can be set to render in world space or screen space (overlay or camera).
31
+ * Multiple canvases can exist in a scene, each with its own settings and hierarchy of UI elements.
32
+ * @summary Canvas UI Component
28
33
  * @category User Interface
29
34
  * @group Components
30
35
  */
@@ -7,6 +7,10 @@ import { type ICanvasGroup, type IHasAlphaFactor } from "./Interfaces.js";
7
7
 
8
8
 
9
9
  /**
10
+ * CanvasGroup is a UI component that allows you to control the transparency and interactivity of a group of UI elements.
11
+ * By adjusting the alpha property, you can fade in or out all child UI elements simultaneously.
12
+ * The interactable and blocksRaycasts properties let you enable or disable user interaction for the entire group.
13
+ * @summary CanvasGroup UI Component
10
14
  * @category User Interface
11
15
  * @group Components
12
16
  */