@needle-tools/engine 4.13.0 → 4.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/README.md +37 -0
  3. package/components.needle.json +1 -1
  4. package/custom-elements.json +138 -4
  5. package/dist/{needle-engine.bundle-CxaKFQVS.min.js → needle-engine.bundle-BNIUpreS.min.js} +107 -107
  6. package/dist/{needle-engine.bundle-Dl3TFYyv.js → needle-engine.bundle-DauZUYl7.js} +2347 -1845
  7. package/dist/{needle-engine.bundle-J4k4znv8.umd.cjs → needle-engine.bundle-tjI5Fq2c.umd.cjs} +108 -108
  8. package/dist/needle-engine.d.ts +4022 -419
  9. package/dist/needle-engine.js +2 -2
  10. package/dist/needle-engine.min.js +1 -1
  11. package/dist/needle-engine.umd.cjs +1 -1
  12. package/lib/engine/engine_context.d.ts +16 -0
  13. package/lib/engine/engine_context.js +16 -0
  14. package/lib/engine/engine_context.js.map +1 -1
  15. package/lib/engine/engine_gameobject.d.ts +72 -0
  16. package/lib/engine/engine_gameobject.js +38 -0
  17. package/lib/engine/engine_gameobject.js.map +1 -1
  18. package/lib/engine/engine_input.d.ts +80 -4
  19. package/lib/engine/engine_input.js +78 -2
  20. package/lib/engine/engine_input.js.map +1 -1
  21. package/lib/engine/engine_math.d.ts +81 -2
  22. package/lib/engine/engine_math.js +68 -2
  23. package/lib/engine/engine_math.js.map +1 -1
  24. package/lib/engine/engine_networking.d.ts +181 -14
  25. package/lib/engine/engine_networking.js +181 -14
  26. package/lib/engine/engine_networking.js.map +1 -1
  27. package/lib/engine/engine_networking_auto.d.ts +35 -8
  28. package/lib/engine/engine_networking_auto.js +35 -8
  29. package/lib/engine/engine_networking_auto.js.map +1 -1
  30. package/lib/engine/engine_physics.d.ts +37 -1
  31. package/lib/engine/engine_physics.js +37 -1
  32. package/lib/engine/engine_physics.js.map +1 -1
  33. package/lib/engine/engine_physics_rapier.d.ts +78 -0
  34. package/lib/engine/engine_physics_rapier.js +78 -0
  35. package/lib/engine/engine_physics_rapier.js.map +1 -1
  36. package/lib/engine/engine_serialization_decorator.d.ts +28 -2
  37. package/lib/engine/engine_serialization_decorator.js +28 -2
  38. package/lib/engine/engine_serialization_decorator.js.map +1 -1
  39. package/lib/engine/engine_time.d.ts +23 -3
  40. package/lib/engine/engine_time.js +23 -3
  41. package/lib/engine/engine_time.js.map +1 -1
  42. package/lib/engine/engine_util_decorator.d.ts +31 -1
  43. package/lib/engine/engine_util_decorator.js +31 -1
  44. package/lib/engine/engine_util_decorator.js.map +1 -1
  45. package/lib/engine/engine_utils.d.ts +21 -5
  46. package/lib/engine/engine_utils.js +21 -5
  47. package/lib/engine/engine_utils.js.map +1 -1
  48. package/lib/engine/extensions/NEEDLE_materialx.d.ts +2 -2
  49. package/lib/engine/extensions/NEEDLE_materialx.js +2 -2
  50. package/lib/engine/extensions/NEEDLE_materialx.js.map +1 -1
  51. package/lib/engine/extensions/index.d.ts +1 -1
  52. package/lib/engine/extensions/index.js +1 -1
  53. package/lib/engine/extensions/index.js.map +1 -1
  54. package/lib/engine-components/AlignmentConstraint.d.ts +23 -3
  55. package/lib/engine-components/AlignmentConstraint.js +23 -3
  56. package/lib/engine-components/AlignmentConstraint.js.map +1 -1
  57. package/lib/engine-components/Animation.d.ts +42 -0
  58. package/lib/engine-components/Animation.js +36 -0
  59. package/lib/engine-components/Animation.js.map +1 -1
  60. package/lib/engine-components/Animator.d.ts +37 -4
  61. package/lib/engine-components/Animator.js +37 -4
  62. package/lib/engine-components/Animator.js.map +1 -1
  63. package/lib/engine-components/AudioListener.d.ts +1 -1
  64. package/lib/engine-components/AudioListener.js +1 -1
  65. package/lib/engine-components/AudioSource.d.ts +32 -10
  66. package/lib/engine-components/AudioSource.js +32 -10
  67. package/lib/engine-components/AudioSource.js.map +1 -1
  68. package/lib/engine-components/AxesHelper.d.ts +22 -3
  69. package/lib/engine-components/AxesHelper.js +22 -3
  70. package/lib/engine-components/AxesHelper.js.map +1 -1
  71. package/lib/engine-components/BasicIKConstraint.d.ts +27 -4
  72. package/lib/engine-components/BasicIKConstraint.js +27 -4
  73. package/lib/engine-components/BasicIKConstraint.js.map +1 -1
  74. package/lib/engine-components/Camera.d.ts +32 -2
  75. package/lib/engine-components/Camera.js +32 -2
  76. package/lib/engine-components/Camera.js.map +1 -1
  77. package/lib/engine-components/CharacterController.d.ts +68 -4
  78. package/lib/engine-components/CharacterController.js +68 -4
  79. package/lib/engine-components/CharacterController.js.map +1 -1
  80. package/lib/engine-components/Collider.d.ts +69 -12
  81. package/lib/engine-components/Collider.js +69 -12
  82. package/lib/engine-components/Collider.js.map +1 -1
  83. package/lib/engine-components/ContactShadows.d.ts +28 -6
  84. package/lib/engine-components/ContactShadows.js +33 -8
  85. package/lib/engine-components/ContactShadows.js.map +1 -1
  86. package/lib/engine-components/DeleteBox.d.ts +43 -2
  87. package/lib/engine-components/DeleteBox.js +43 -2
  88. package/lib/engine-components/DeleteBox.js.map +1 -1
  89. package/lib/engine-components/DeviceFlag.d.ts +21 -2
  90. package/lib/engine-components/DeviceFlag.js +21 -2
  91. package/lib/engine-components/DeviceFlag.js.map +1 -1
  92. package/lib/engine-components/DragControls.d.ts +32 -2
  93. package/lib/engine-components/DragControls.js +32 -2
  94. package/lib/engine-components/DragControls.js.map +1 -1
  95. package/lib/engine-components/DropListener.d.ts +33 -21
  96. package/lib/engine-components/DropListener.js +33 -21
  97. package/lib/engine-components/DropListener.js.map +1 -1
  98. package/lib/engine-components/Duplicatable.d.ts +36 -5
  99. package/lib/engine-components/Duplicatable.js +36 -5
  100. package/lib/engine-components/Duplicatable.js.map +1 -1
  101. package/lib/engine-components/EventList.d.ts +38 -10
  102. package/lib/engine-components/EventList.js +40 -12
  103. package/lib/engine-components/EventList.js.map +1 -1
  104. package/lib/engine-components/EventTrigger.d.ts +1 -1
  105. package/lib/engine-components/EventTrigger.js +1 -1
  106. package/lib/engine-components/Fog.d.ts +23 -1
  107. package/lib/engine-components/Fog.js +23 -1
  108. package/lib/engine-components/Fog.js.map +1 -1
  109. package/lib/engine-components/GridHelper.d.ts +18 -2
  110. package/lib/engine-components/GridHelper.js +18 -2
  111. package/lib/engine-components/GridHelper.js.map +1 -1
  112. package/lib/engine-components/GroundProjection.d.ts +24 -2
  113. package/lib/engine-components/GroundProjection.js +24 -2
  114. package/lib/engine-components/GroundProjection.js.map +1 -1
  115. package/lib/engine-components/Interactable.d.ts +17 -2
  116. package/lib/engine-components/Interactable.js +17 -2
  117. package/lib/engine-components/Interactable.js.map +1 -1
  118. package/lib/engine-components/Joints.d.ts +50 -7
  119. package/lib/engine-components/Joints.js +50 -7
  120. package/lib/engine-components/Joints.js.map +1 -1
  121. package/lib/engine-components/LODGroup.d.ts +36 -14
  122. package/lib/engine-components/LODGroup.js +43 -11
  123. package/lib/engine-components/LODGroup.js.map +1 -1
  124. package/lib/engine-components/Light.d.ts +30 -5
  125. package/lib/engine-components/Light.js +30 -5
  126. package/lib/engine-components/Light.js.map +1 -1
  127. package/lib/engine-components/LookAtConstraint.d.ts +22 -7
  128. package/lib/engine-components/LookAtConstraint.js +22 -7
  129. package/lib/engine-components/LookAtConstraint.js.map +1 -1
  130. package/lib/engine-components/NeedleMenu.d.ts +27 -5
  131. package/lib/engine-components/NeedleMenu.js +27 -5
  132. package/lib/engine-components/NeedleMenu.js.map +1 -1
  133. package/lib/engine-components/NestedGltf.d.ts +39 -4
  134. package/lib/engine-components/NestedGltf.js +42 -4
  135. package/lib/engine-components/NestedGltf.js.map +1 -1
  136. package/lib/engine-components/OffsetConstraint.d.ts +27 -3
  137. package/lib/engine-components/OffsetConstraint.js +27 -3
  138. package/lib/engine-components/OffsetConstraint.js.map +1 -1
  139. package/lib/engine-components/OrbitControls.d.ts +41 -3
  140. package/lib/engine-components/OrbitControls.js +41 -3
  141. package/lib/engine-components/OrbitControls.js.map +1 -1
  142. package/lib/engine-components/PlayerColor.d.ts +1 -1
  143. package/lib/engine-components/PlayerColor.js +1 -1
  144. package/lib/engine-components/ReflectionProbe.d.ts +17 -2
  145. package/lib/engine-components/ReflectionProbe.js +17 -3
  146. package/lib/engine-components/ReflectionProbe.js.map +1 -1
  147. package/lib/engine-components/Renderer.d.ts +35 -0
  148. package/lib/engine-components/Renderer.js +36 -2
  149. package/lib/engine-components/Renderer.js.map +1 -1
  150. package/lib/engine-components/RigidBody.d.ts +57 -5
  151. package/lib/engine-components/RigidBody.js +57 -5
  152. package/lib/engine-components/RigidBody.js.map +1 -1
  153. package/lib/engine-components/SceneSwitcher.d.ts +11 -0
  154. package/lib/engine-components/SceneSwitcher.js +11 -0
  155. package/lib/engine-components/SceneSwitcher.js.map +1 -1
  156. package/lib/engine-components/ScreenCapture.d.ts +39 -6
  157. package/lib/engine-components/ScreenCapture.js +39 -6
  158. package/lib/engine-components/ScreenCapture.js.map +1 -1
  159. package/lib/engine-components/SeeThrough.d.ts +70 -5
  160. package/lib/engine-components/SeeThrough.js +70 -5
  161. package/lib/engine-components/SeeThrough.js.map +1 -1
  162. package/lib/engine-components/ShadowCatcher.d.ts +56 -4
  163. package/lib/engine-components/ShadowCatcher.js +56 -4
  164. package/lib/engine-components/ShadowCatcher.js.map +1 -1
  165. package/lib/engine-components/Skybox.d.ts +43 -7
  166. package/lib/engine-components/Skybox.js +43 -7
  167. package/lib/engine-components/Skybox.js.map +1 -1
  168. package/lib/engine-components/SmoothFollow.d.ts +66 -7
  169. package/lib/engine-components/SmoothFollow.js +66 -7
  170. package/lib/engine-components/SmoothFollow.js.map +1 -1
  171. package/lib/engine-components/SpatialTrigger.d.ts +48 -1
  172. package/lib/engine-components/SpatialTrigger.js +48 -1
  173. package/lib/engine-components/SpatialTrigger.js.map +1 -1
  174. package/lib/engine-components/SpectatorCamera.d.ts +21 -3
  175. package/lib/engine-components/SpectatorCamera.js +21 -3
  176. package/lib/engine-components/SpectatorCamera.js.map +1 -1
  177. package/lib/engine-components/SyncedRoom.d.ts +7 -1
  178. package/lib/engine-components/SyncedRoom.js +7 -1
  179. package/lib/engine-components/SyncedRoom.js.map +1 -1
  180. package/lib/engine-components/SyncedTransform.d.ts +55 -6
  181. package/lib/engine-components/SyncedTransform.js +55 -6
  182. package/lib/engine-components/SyncedTransform.js.map +1 -1
  183. package/lib/engine-components/TransformGizmo.d.ts +30 -3
  184. package/lib/engine-components/TransformGizmo.js +30 -3
  185. package/lib/engine-components/TransformGizmo.js.map +1 -1
  186. package/lib/engine-components/VideoPlayer.d.ts +33 -6
  187. package/lib/engine-components/VideoPlayer.js +45 -6
  188. package/lib/engine-components/VideoPlayer.js.map +1 -1
  189. package/lib/engine-components/Voip.d.ts +33 -2
  190. package/lib/engine-components/Voip.js +33 -2
  191. package/lib/engine-components/Voip.js.map +1 -1
  192. package/lib/engine-components/export/usdz/USDZExporter.d.ts +47 -13
  193. package/lib/engine-components/export/usdz/USDZExporter.js +47 -13
  194. package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
  195. package/lib/engine-components/particlesystem/ParticleSystem.d.ts +82 -3
  196. package/lib/engine-components/particlesystem/ParticleSystem.js +82 -3
  197. package/lib/engine-components/particlesystem/ParticleSystem.js.map +1 -1
  198. package/lib/engine-components/postprocessing/Effects/Antialiasing.d.ts +1 -0
  199. package/lib/engine-components/postprocessing/Effects/Antialiasing.js +1 -0
  200. package/lib/engine-components/postprocessing/Effects/Antialiasing.js.map +1 -1
  201. package/lib/engine-components/postprocessing/Effects/BloomEffect.d.ts +1 -1
  202. package/lib/engine-components/postprocessing/Effects/BloomEffect.js +1 -1
  203. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.d.ts +1 -1
  204. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js +1 -1
  205. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.d.ts +1 -1
  206. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js +1 -1
  207. package/lib/engine-components/postprocessing/Effects/DepthOfField.d.ts +1 -1
  208. package/lib/engine-components/postprocessing/Effects/DepthOfField.js +1 -1
  209. package/lib/engine-components/postprocessing/Effects/EffectWrapper.d.ts +1 -0
  210. package/lib/engine-components/postprocessing/Effects/EffectWrapper.js +1 -0
  211. package/lib/engine-components/postprocessing/Effects/EffectWrapper.js.map +1 -1
  212. package/lib/engine-components/postprocessing/Effects/Pixelation.d.ts +1 -1
  213. package/lib/engine-components/postprocessing/Effects/Pixelation.js +1 -1
  214. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.d.ts +1 -1
  215. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.js +1 -1
  216. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.d.ts +1 -1
  217. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.js +1 -1
  218. package/lib/engine-components/postprocessing/Effects/Sharpening.d.ts +1 -1
  219. package/lib/engine-components/postprocessing/Effects/Sharpening.js +1 -1
  220. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.d.ts +1 -1
  221. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.js +1 -1
  222. package/lib/engine-components/postprocessing/Effects/Tonemapping.d.ts +1 -1
  223. package/lib/engine-components/postprocessing/Effects/Tonemapping.js +1 -1
  224. package/lib/engine-components/postprocessing/Effects/Vignette.d.ts +1 -1
  225. package/lib/engine-components/postprocessing/Effects/Vignette.js +1 -1
  226. package/lib/engine-components/postprocessing/PostProcessingHandler.d.ts +1 -1
  227. package/lib/engine-components/postprocessing/PostProcessingHandler.js +1 -1
  228. package/lib/engine-components/postprocessing/Volume.d.ts +1 -1
  229. package/lib/engine-components/postprocessing/Volume.js +1 -1
  230. package/lib/engine-components/splines/Spline.d.ts +409 -12
  231. package/lib/engine-components/splines/Spline.js +409 -12
  232. package/lib/engine-components/splines/Spline.js.map +1 -1
  233. package/lib/engine-components/splines/SplineUtils.d.ts +1 -0
  234. package/lib/engine-components/splines/SplineUtils.js +1 -0
  235. package/lib/engine-components/splines/SplineUtils.js.map +1 -1
  236. package/lib/engine-components/splines/SplineWalker.d.ts +3 -1
  237. package/lib/engine-components/splines/SplineWalker.js +3 -1
  238. package/lib/engine-components/splines/SplineWalker.js.map +1 -1
  239. package/lib/engine-components/timeline/PlayableDirector.d.ts +103 -14
  240. package/lib/engine-components/timeline/PlayableDirector.js +95 -25
  241. package/lib/engine-components/timeline/PlayableDirector.js.map +1 -1
  242. package/lib/engine-components/timeline/TimelineModels.d.ts +14 -0
  243. package/lib/engine-components/timeline/TimelineModels.js +4 -0
  244. package/lib/engine-components/timeline/TimelineModels.js.map +1 -1
  245. package/lib/engine-components/ui/Button.d.ts +29 -3
  246. package/lib/engine-components/ui/Button.js +29 -3
  247. package/lib/engine-components/ui/Button.js.map +1 -1
  248. package/lib/engine-components/ui/Canvas.d.ts +29 -4
  249. package/lib/engine-components/ui/Canvas.js +29 -4
  250. package/lib/engine-components/ui/Canvas.js.map +1 -1
  251. package/lib/engine-components/ui/CanvasGroup.d.ts +1 -1
  252. package/lib/engine-components/ui/CanvasGroup.js +1 -1
  253. package/lib/engine-components/ui/EventSystem.d.ts +1 -1
  254. package/lib/engine-components/ui/EventSystem.js +1 -1
  255. package/lib/engine-components/ui/Graphic.d.ts +1 -0
  256. package/lib/engine-components/ui/Graphic.js +1 -0
  257. package/lib/engine-components/ui/Graphic.js.map +1 -1
  258. package/lib/engine-components/ui/Image.d.ts +22 -3
  259. package/lib/engine-components/ui/Image.js +22 -3
  260. package/lib/engine-components/ui/Image.js.map +1 -1
  261. package/lib/engine-components/ui/InputField.d.ts +1 -1
  262. package/lib/engine-components/ui/InputField.js +1 -1
  263. package/lib/engine-components/ui/Layout.d.ts +3 -0
  264. package/lib/engine-components/ui/Layout.js +3 -0
  265. package/lib/engine-components/ui/Layout.js.map +1 -1
  266. package/lib/engine-components/ui/Outline.d.ts +1 -1
  267. package/lib/engine-components/ui/Outline.js +1 -1
  268. package/lib/engine-components/ui/PointerEvents.d.ts +1 -1
  269. package/lib/engine-components/ui/PointerEvents.js +1 -1
  270. package/lib/engine-components/ui/Raycaster.d.ts +55 -6
  271. package/lib/engine-components/ui/Raycaster.js +55 -6
  272. package/lib/engine-components/ui/Raycaster.js.map +1 -1
  273. package/lib/engine-components/ui/RectTransform.d.ts +1 -1
  274. package/lib/engine-components/ui/RectTransform.js +1 -1
  275. package/lib/engine-components/ui/SpatialHtml.d.ts +1 -1
  276. package/lib/engine-components/ui/SpatialHtml.js +1 -1
  277. package/lib/engine-components/ui/Text.d.ts +23 -1
  278. package/lib/engine-components/ui/Text.js +23 -1
  279. package/lib/engine-components/ui/Text.js.map +1 -1
  280. package/lib/engine-components/utils/LookAt.d.ts +1 -1
  281. package/lib/engine-components/utils/LookAt.js +1 -1
  282. package/lib/engine-components/utils/OpenURL.d.ts +1 -1
  283. package/lib/engine-components/utils/OpenURL.js +1 -1
  284. package/lib/engine-components/web/Clickthrough.d.ts +116 -7
  285. package/lib/engine-components/web/Clickthrough.js +116 -7
  286. package/lib/engine-components/web/Clickthrough.js.map +1 -1
  287. package/lib/engine-components/web/CursorFollow.d.ts +171 -7
  288. package/lib/engine-components/web/CursorFollow.js +171 -7
  289. package/lib/engine-components/web/CursorFollow.js.map +1 -1
  290. package/lib/engine-components/web/HoverAnimation.d.ts +140 -11
  291. package/lib/engine-components/web/HoverAnimation.js +140 -11
  292. package/lib/engine-components/web/HoverAnimation.js.map +1 -1
  293. package/lib/engine-components/web/ScrollFollow.d.ts +4 -1
  294. package/lib/engine-components/web/ScrollFollow.js +4 -1
  295. package/lib/engine-components/web/ScrollFollow.js.map +1 -1
  296. package/lib/engine-components/web/ViewBox.d.ts +116 -16
  297. package/lib/engine-components/web/ViewBox.js +110 -16
  298. package/lib/engine-components/web/ViewBox.js.map +1 -1
  299. package/lib/engine-components/webxr/TeleportTarget.d.ts +21 -2
  300. package/lib/engine-components/webxr/TeleportTarget.js +21 -2
  301. package/lib/engine-components/webxr/TeleportTarget.js.map +1 -1
  302. package/lib/engine-components/webxr/WebXR.d.ts +10 -2
  303. package/lib/engine-components/webxr/WebXR.js +10 -2
  304. package/lib/engine-components/webxr/WebXR.js.map +1 -1
  305. package/lib/engine-components/webxr/WebXRAvatar.d.ts +39 -2
  306. package/lib/engine-components/webxr/WebXRAvatar.js +35 -3
  307. package/lib/engine-components/webxr/WebXRAvatar.js.map +1 -1
  308. package/lib/engine-components/webxr/WebXRImageTracking.d.ts +266 -30
  309. package/lib/engine-components/webxr/WebXRImageTracking.js +266 -30
  310. package/lib/engine-components/webxr/WebXRImageTracking.js.map +1 -1
  311. package/lib/engine-components/webxr/WebXRPlaneTracking.d.ts +1 -1
  312. package/lib/engine-components/webxr/WebXRPlaneTracking.js +1 -1
  313. package/lib/engine-components/webxr/XRFlag.d.ts +29 -2
  314. package/lib/engine-components/webxr/XRFlag.js +29 -2
  315. package/lib/engine-components/webxr/XRFlag.js.map +1 -1
  316. package/package.json +1 -1
  317. package/plugins/vite/custom-element-data.js +128 -19
  318. package/src/engine/engine_context.ts +16 -0
  319. package/src/engine/engine_gameobject.ts +73 -0
  320. package/src/engine/engine_input.ts +83 -7
  321. package/src/engine/engine_math.ts +81 -2
  322. package/src/engine/engine_networking.ts +186 -17
  323. package/src/engine/engine_networking_auto.ts +36 -9
  324. package/src/engine/engine_physics.ts +41 -1
  325. package/src/engine/engine_physics_rapier.ts +81 -0
  326. package/src/engine/engine_serialization_decorator.ts +28 -2
  327. package/src/engine/engine_time.ts +23 -3
  328. package/src/engine/engine_util_decorator.ts +31 -1
  329. package/src/engine/engine_utils.ts +21 -5
  330. package/src/engine/extensions/NEEDLE_materialx.ts +5 -4
  331. package/src/engine/extensions/index.ts +2 -2
  332. package/src/engine-components/AlignmentConstraint.ts +24 -4
  333. package/src/engine-components/Animation.ts +44 -2
  334. package/src/engine-components/Animator.ts +40 -7
  335. package/src/engine-components/AudioListener.ts +1 -1
  336. package/src/engine-components/AudioSource.ts +37 -15
  337. package/src/engine-components/AxesHelper.ts +23 -4
  338. package/src/engine-components/BasicIKConstraint.ts +28 -5
  339. package/src/engine-components/Camera.ts +33 -3
  340. package/src/engine-components/CharacterController.ts +74 -7
  341. package/src/engine-components/Collider.ts +78 -21
  342. package/src/engine-components/ContactShadows.ts +41 -11
  343. package/src/engine-components/DeleteBox.ts +43 -2
  344. package/src/engine-components/DeviceFlag.ts +22 -3
  345. package/src/engine-components/DragControls.ts +32 -2
  346. package/src/engine-components/DropListener.ts +41 -29
  347. package/src/engine-components/Duplicatable.ts +37 -6
  348. package/src/engine-components/EventList.ts +43 -15
  349. package/src/engine-components/EventTrigger.ts +1 -1
  350. package/src/engine-components/Fog.ts +23 -1
  351. package/src/engine-components/GridHelper.ts +18 -2
  352. package/src/engine-components/GroundProjection.ts +25 -3
  353. package/src/engine-components/Interactable.ts +17 -2
  354. package/src/engine-components/Joints.ts +51 -8
  355. package/src/engine-components/LODGroup.ts +45 -11
  356. package/src/engine-components/Light.ts +35 -13
  357. package/src/engine-components/LookAtConstraint.ts +26 -8
  358. package/src/engine-components/NeedleMenu.ts +29 -7
  359. package/src/engine-components/NestedGltf.ts +40 -4
  360. package/src/engine-components/OffsetConstraint.ts +27 -3
  361. package/src/engine-components/OrbitControls.ts +41 -3
  362. package/src/engine-components/PlayerColor.ts +1 -1
  363. package/src/engine-components/ReflectionProbe.ts +19 -5
  364. package/src/engine-components/Renderer.ts +35 -1
  365. package/src/engine-components/RigidBody.ts +64 -8
  366. package/src/engine-components/SceneSwitcher.ts +11 -0
  367. package/src/engine-components/ScreenCapture.ts +42 -9
  368. package/src/engine-components/SeeThrough.ts +76 -9
  369. package/src/engine-components/ShadowCatcher.ts +61 -6
  370. package/src/engine-components/Skybox.ts +48 -12
  371. package/src/engine-components/SmoothFollow.ts +68 -7
  372. package/src/engine-components/SpatialTrigger.ts +51 -4
  373. package/src/engine-components/SpectatorCamera.ts +23 -5
  374. package/src/engine-components/SyncedRoom.ts +8 -2
  375. package/src/engine-components/SyncedTransform.ts +59 -10
  376. package/src/engine-components/TransformGizmo.ts +31 -4
  377. package/src/engine-components/VideoPlayer.ts +48 -6
  378. package/src/engine-components/Voip.ts +33 -2
  379. package/src/engine-components/export/usdz/USDZExporter.ts +47 -13
  380. package/src/engine-components/particlesystem/ParticleSystem.ts +84 -5
  381. package/src/engine-components/postprocessing/Effects/Antialiasing.ts +1 -0
  382. package/src/engine-components/postprocessing/Effects/BloomEffect.ts +1 -1
  383. package/src/engine-components/postprocessing/Effects/ChromaticAberration.ts +1 -1
  384. package/src/engine-components/postprocessing/Effects/ColorAdjustments.ts +1 -1
  385. package/src/engine-components/postprocessing/Effects/DepthOfField.ts +1 -1
  386. package/src/engine-components/postprocessing/Effects/EffectWrapper.ts +1 -0
  387. package/src/engine-components/postprocessing/Effects/Pixelation.ts +1 -1
  388. package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.ts +1 -1
  389. package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.ts +1 -1
  390. package/src/engine-components/postprocessing/Effects/Sharpening.ts +1 -1
  391. package/src/engine-components/postprocessing/Effects/TiltShiftEffect.ts +1 -1
  392. package/src/engine-components/postprocessing/Effects/Tonemapping.ts +1 -1
  393. package/src/engine-components/postprocessing/Effects/Vignette.ts +1 -1
  394. package/src/engine-components/postprocessing/PostProcessingHandler.ts +1 -1
  395. package/src/engine-components/postprocessing/Volume.ts +1 -1
  396. package/src/engine-components/splines/Spline.ts +412 -14
  397. package/src/engine-components/splines/SplineUtils.ts +1 -0
  398. package/src/engine-components/splines/SplineWalker.ts +4 -2
  399. package/src/engine-components/timeline/PlayableDirector.ts +108 -27
  400. package/src/engine-components/timeline/SignalAsset.ts +1 -1
  401. package/src/engine-components/timeline/TimelineModels.ts +18 -2
  402. package/src/engine-components/ui/Button.ts +29 -3
  403. package/src/engine-components/ui/Canvas.ts +29 -4
  404. package/src/engine-components/ui/CanvasGroup.ts +2 -2
  405. package/src/engine-components/ui/EventSystem.ts +1 -1
  406. package/src/engine-components/ui/Graphic.ts +1 -0
  407. package/src/engine-components/ui/Image.ts +22 -3
  408. package/src/engine-components/ui/InputField.ts +2 -2
  409. package/src/engine-components/ui/Layout.ts +3 -0
  410. package/src/engine-components/ui/Outline.ts +1 -1
  411. package/src/engine-components/ui/PointerEvents.ts +1 -1
  412. package/src/engine-components/ui/Raycaster.ts +57 -8
  413. package/src/engine-components/ui/RectTransform.ts +2 -2
  414. package/src/engine-components/ui/SpatialHtml.ts +1 -1
  415. package/src/engine-components/ui/Text.ts +24 -2
  416. package/src/engine-components/utils/LookAt.ts +1 -1
  417. package/src/engine-components/utils/OpenURL.ts +1 -1
  418. package/src/engine-components/web/Clickthrough.ts +119 -10
  419. package/src/engine-components/web/CursorFollow.ts +174 -9
  420. package/src/engine-components/web/HoverAnimation.ts +142 -13
  421. package/src/engine-components/web/ScrollFollow.ts +4 -1
  422. package/src/engine-components/web/ViewBox.ts +118 -18
  423. package/src/engine-components/webxr/TeleportTarget.ts +23 -4
  424. package/src/engine-components/webxr/WebXR.ts +11 -3
  425. package/src/engine-components/webxr/WebXRAvatar.ts +41 -4
  426. package/src/engine-components/webxr/WebXRImageTracking.ts +282 -38
  427. package/src/engine-components/webxr/WebXRPlaneTracking.ts +1 -1
  428. package/src/engine-components/webxr/XRFlag.ts +30 -3
@@ -17,20 +17,15 @@ import * as Tracks from "./TimelineTracks.js";
17
17
  const debug = getParam("debugtimeline");
18
18
 
19
19
  /**
20
- * The wrap mode of the {@link PlayableDirector}.
20
+ * Controls how the {@link PlayableDirector} behaves when playback reaches the end.
21
+ * @see {@link PlayableDirector.extrapolationMode}
21
22
  */
22
23
  export enum DirectorWrapMode {
23
- /// <summary>
24
- /// <para>Hold the last frame when the playable time reaches it's duration.</para>
25
- /// </summary>
24
+ /** Hold the last frame when playback reaches the end of the timeline. */
26
25
  Hold = 0,
27
- /// <summary>
28
- /// <para>Loop back to zero time and continue playing.</para>
29
- /// </summary>
26
+ /** Loop back to the start and continue playing indefinitely. */
30
27
  Loop = 1,
31
- /// <summary>
32
- /// <para>Do not keep playing when the time reaches the duration.</para>
33
- /// </summary>
28
+ /** Stop playback when the end is reached. The timeline will not loop. */
34
29
  None = 2,
35
30
  }
36
31
 
@@ -53,26 +48,80 @@ export enum ClipExtrapolation {
53
48
  export type CreateTrackFunction = (director: PlayableDirector, track: Models.TrackModel) => Tracks.TrackHandler | undefined | null;
54
49
 
55
50
  /**
56
- * The PlayableDirector component is the main component to control timelines in needle engine.
57
- * It is used to play, pause, stop and evaluate timelines.
58
- * Assign a TimelineAsset to the `playableAsset` property to start playing a timeline.
51
+ * PlayableDirector is the main component for controlling timelines in Needle Engine.
52
+ * It orchestrates playback of TimelineAssets containing animation, audio, signal,
53
+ * control, and activation tracks.
54
+ *
55
+ * ![](https://cloud.needle.tools/-/media/CkJal5dIBwFe6erA-MmiGw.webp)
56
+ * *Screenshot: Timeline in Unity*
57
+ *
58
+ * **Supported track types:**
59
+ * - Animation tracks - animate objects using AnimationClips
60
+ * - Audio tracks - play synchronized audio
61
+ * - Activation tracks - show/hide objects at specific times
62
+ * - Signal tracks - trigger events at specific points
63
+ * - Control tracks - control nested timelines or prefab instances
64
+ * - Marker tracks - add metadata and navigation points
65
+ *
66
+ * [![](https://cloud.needle.tools/-/media/HFudFwl8J8D-Kt_VPu7pRw.gif)](https://engine.needle.tools/samples/bike-scrollytelling-responsive-3d)
67
+ *
68
+ * [![](https://cloud.needle.tools/-/media/xJ1rI3STbZRnOoWJrSzqlQ.gif)](https://app.songsofcultures.com/?scene=little-brother)
69
+ *
70
+ * **Playback control:**
71
+ * Use `play()`, `pause()`, `stop()` for basic control.
72
+ * Set `time` directly and call `evaluate()` for scrubbing.
73
+ * Adjust `speed` for playback rate and `weight` for blending.
74
+ *
75
+ * @example Basic timeline playback
76
+ * ```ts
77
+ * const director = myObject.getComponent(PlayableDirector);
78
+ * director.play();
79
+ * // Jump to specific time
80
+ * director.time = 2.5;
81
+ * director.evaluate();
82
+ * ```
83
+ *
84
+ * @example Control playback speed
85
+ * ```ts
86
+ * director.speed = 0.5; // Half speed
87
+ * director.speed = -1; // Reverse playback
88
+ * ```
89
+ *
90
+ * - Example: https://engine.needle.tools/samples-uploads/product-flyover/
91
+ *
59
92
  * @summary Controls and plays TimelineAssets
60
93
  * @category Animation and Sequencing
61
94
  * @group Components
95
+ * @see {@link Animator} for playing individual AnimationClips
96
+ * @see {@link AudioSource} for standalone audio playback
97
+ * @see {@link SignalReceiver} for handling timeline signals
98
+ * @link https://engine.needle.tools/samples/?overlay=samples&tag=animation
99
+ * @link https://app.songsofcultures.com/
100
+ * @link https://engine.needle.tools/docs/blender/animation.html Blender timeline and animation export
62
101
  */
63
102
  export class PlayableDirector extends Behaviour {
64
103
 
65
104
  private static createTrackFunctions: { [key: string]: CreateTrackFunction } = {};
105
+
106
+ /**
107
+ * Register a function to create a track handler for a custom track type.
108
+ * This allows you to extend the timeline system with your own track types and handlers.
109
+ */
66
110
  static registerCreateTrack(type: string, fn: CreateTrackFunction) {
67
111
  this.createTrackFunctions[type] = fn;
68
112
  }
69
113
 
70
114
  /**
71
- * The timeline asset that is played by this director.
115
+ * The timeline asset containing tracks, clips, and markers that this director will play.
116
+ * Assign a timeline asset exported from Unity or Blender to enable playback.
72
117
  */
73
118
  playableAsset?: Models.TimelineAssetModel;
74
119
 
75
- /** Set to true to start playing the timeline when the scene starts */
120
+ /**
121
+ * When true, the timeline starts playing automatically when the component awakens.
122
+ * Set to false to control playback manually via `play()`.
123
+ * @default false
124
+ */
76
125
  @serializable()
77
126
  playOnAwake?: boolean;
78
127
 
@@ -83,11 +132,18 @@ export class PlayableDirector extends Behaviour {
83
132
  @serializable()
84
133
  extrapolationMode: DirectorWrapMode = DirectorWrapMode.Loop;
85
134
 
86
- /** @returns true if the timeline is currently playing */
135
+ /** Returns true if the timeline is currently playing (not paused or stopped). */
87
136
  get isPlaying(): boolean { return this._isPlaying; }
88
- /** @returns true if the timeline is currently paused */
137
+ /** Returns true if the timeline is currently paused. */
89
138
  get isPaused(): boolean { return this._isPaused; }
90
- /** the current time of the timeline */
139
+ /**
140
+ * The current playback time in seconds. Set this and call `evaluate()` to scrub.
141
+ * @example Scrub to a specific time
142
+ * ```ts
143
+ * director.time = 5.0;
144
+ * director.evaluate();
145
+ * ```
146
+ */
91
147
  get time(): number { return this._time; }
92
148
  set time(value: number) {
93
149
  if (typeof value === "number" && !Number.isNaN(value))
@@ -96,17 +152,32 @@ export class PlayableDirector extends Behaviour {
96
152
  console.error("INVALID TIMELINE.TIME VALUE", value, this.name)
97
153
  };
98
154
  }
99
- /** the duration of the timeline */
155
+ /** The total duration of the timeline in seconds (read from the longest track/clip). */
100
156
  get duration(): number { return this._duration; }
101
157
  set duration(value: number) { this._duration = value; }
102
- /** the weight of the timeline. Set to a value below 1 to blend with other timelines */
158
+ /**
159
+ * The blend weight of the timeline (0-1). Use values below 1 to blend
160
+ * timeline animations with other animations like those from an Animator.
161
+ */
103
162
  get weight(): number { return this._weight; };
104
163
  set weight(value: number) { this._weight = value; }
105
- /** the playback speed of the timeline */
164
+ /**
165
+ * The playback speed multiplier. Set to negative values for reverse playback.
166
+ * @example Reverse playback at double speed
167
+ * ```ts
168
+ * director.speed = -2;
169
+ * ```
170
+ */
106
171
  get speed(): number { return this._speed; }
107
172
  set speed(value: number) { this._speed = value; }
108
173
 
109
- /** When enabled the timeline will wait for audio tracks to load at the current time before starting to play */
174
+ /**
175
+ * When true, `play()` will wait for audio tracks to load and for user interaction
176
+ * before starting playback. Web browsers require user interaction (click/tap) before
177
+ * allowing audio to play - this ensures audio is synchronized with the timeline.
178
+ * Set to false if you need immediate visual playback and can tolerate audio delay.
179
+ * @default true
180
+ */
110
181
  waitForAudio: boolean = true;
111
182
 
112
183
  private _visibilityChangeEvt?: any;
@@ -223,9 +294,9 @@ export class PlayableDirector extends Behaviour {
223
294
  await delay(200);
224
295
  }
225
296
  this.invokeStateChangedMethodsOnTracks();
226
- // Update timeline in LateUpdate to give other scripts time to react to the updated state
227
- // e.g. if we animate OrbitControls look at target we want those changes to be applied in onBeforeRender
228
- // if we use onBeforeRender here it will be called *after* the regular onBeforeRender events
297
+ // Update timeline in LateUpdate to give other scripts time to react to the updated state
298
+ // e.g. if we animate OrbitControls look at target we want those changes to be applied in onBeforeRender
299
+ // if we use onBeforeRender here it will be called *after* the regular onBeforeRender events
229
300
  // which is too late
230
301
  this._internalUpdateRoutine = this.startCoroutine(this.internalUpdate(), FrameEvent.LateUpdate);
231
302
  }
@@ -762,8 +833,18 @@ export class PlayableDirector extends Behaviour {
762
833
  }
763
834
  }
764
835
 
765
- /**
766
- * Experimental interface for receiving timeline animation callbacks. Register at the PlayableDirector
836
+ /**
837
+ * Interface for receiving callbacks during timeline animation evaluation.
838
+ * Allows modification of position/rotation values before they are applied.
839
+ *
840
+ * **Registration:**
841
+ * ```ts
842
+ * director.registerAnimationCallback(this);
843
+ * // Later: director.unregisterAnimationCallback(this);
844
+ * ```
845
+ *
846
+ * @experimental This interface may change in future versions
847
+ * @see {@link PlayableDirector.registerAnimationCallback}
767
848
  */
768
849
  export interface ITimelineAnimationCallbacks {
769
850
  /**
@@ -8,7 +8,7 @@ const debug = getParam("debugsignals")
8
8
 
9
9
 
10
10
  /**
11
- * Used to reference a signal asset in a SignalReceiver. This is internally used by the {@link SignalReceiverEvent}.
11
+ * Used to reference a signal asset in a SignalReceiver. This is internally used by the {@link SignalReceiverEvent}.
12
12
  */
13
13
  export class SignalAsset {
14
14
  @serializable()
@@ -1,7 +1,10 @@
1
- import { AnimationClip, Object3D, Quaternion, Vector3 } from "three";
1
+ import { AnimationClip, Object3D, Quaternion, Vector3 } from "three";
2
+
3
+ import type { PlayableDirector } from "./PlayableDirector";
2
4
 
3
5
  /**
4
6
  * @category Animation and Sequencing
7
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
5
8
  */
6
9
  export declare type TimelineAssetModel = {
7
10
  name: string;
@@ -10,6 +13,8 @@ export declare type TimelineAssetModel = {
10
13
 
11
14
  /**
12
15
  * @category Animation and Sequencing
16
+ * @see {@link TimelineAssetModel} for the data structure of a timeline asset, which can be played using the PlayableDirector component.
17
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
13
18
  */
14
19
  export enum TrackType {
15
20
  Activation = "ActivationTrack",
@@ -21,7 +26,9 @@ export enum TrackType {
21
26
  }
22
27
 
23
28
  /**
24
- * @category Animation and Sequencing
29
+ * @category Animation and Sequencing
30
+ * @see {@link TimelineAssetModel} for the data structure of a timeline asset, which can be played using the PlayableDirector component.
31
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
25
32
  */
26
33
  export enum ClipExtrapolation {
27
34
  None = 0,
@@ -33,6 +40,7 @@ export enum ClipExtrapolation {
33
40
 
34
41
  /**
35
42
  * @category Animation and Sequencing
43
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
36
44
  */
37
45
  export declare type TrackModel = {
38
46
  name: string;
@@ -50,6 +58,7 @@ declare type Quat = { x: number, y: number, z: number, w: number };
50
58
 
51
59
  /**
52
60
  * @category Animation and Sequencing
61
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
53
62
  */
54
63
  export declare type TrackOffset = {
55
64
  position: Vec3 | Vector3;
@@ -58,6 +67,7 @@ export declare type TrackOffset = {
58
67
 
59
68
  /**
60
69
  * @category Animation and Sequencing
70
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
61
71
  */
62
72
  export declare type ClipModel = {
63
73
  start: number;
@@ -75,6 +85,7 @@ export declare type ClipModel = {
75
85
 
76
86
  /**
77
87
  * @category Animation and Sequencing
88
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
78
89
  */
79
90
  export declare type AnimationClipModel = {
80
91
  clip: string | number | AnimationClip;
@@ -87,6 +98,7 @@ export declare type AnimationClipModel = {
87
98
 
88
99
  /**
89
100
  * @category Animation and Sequencing
101
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
90
102
  */
91
103
  export declare type AudioClipModel = {
92
104
  clip: string;
@@ -96,6 +108,7 @@ export declare type AudioClipModel = {
96
108
 
97
109
  /**
98
110
  * @category Animation and Sequencing
111
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
99
112
  */
100
113
  export declare type ControlClipModel = {
101
114
  sourceObject: string | Object3D;
@@ -109,6 +122,7 @@ export enum MarkerType {
109
122
 
110
123
  /**
111
124
  * @category Animation and Sequencing
125
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
112
126
  */export declare class MarkerModel {
113
127
  type: MarkerType;
114
128
  time: number;
@@ -116,6 +130,7 @@ export enum MarkerType {
116
130
 
117
131
  /**
118
132
  * @category Animation and Sequencing
133
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
119
134
  */
120
135
  export declare class SignalMarkerModel extends MarkerModel {
121
136
  retroActive: boolean;
@@ -133,5 +148,6 @@ export declare class SignalMarkerModel extends MarkerModel {
133
148
  *
134
149
  * @link [Example Project using ScrollMarker](https://scrollytelling-bike-z23hmxb2gnu5a.needle.run/)
135
150
  * @category Animation and Sequencing
151
+ * @see {@link PlayableDirector} for the main component to control timelines in Needle Engine.
136
152
  */
137
153
  export type ScrollMarkerModel = MarkerModel & { name?: string };
@@ -61,12 +61,38 @@ 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.
64
+ * [Button](https://engine.needle.tools/docs/api/Button) is a UI component that can be clicked to trigger actions.
65
+ * Supports visual states (normal, highlighted, pressed, disabled) with
66
+ * color tints or animation transitions.
67
+ *
68
+ * **Visual transitions:**
69
+ * - `ColorTint` - Tint the button image with state colors
70
+ * - `Animation` - Trigger animator states for each button state
71
+ * - `SpriteSwap` - Swap sprites for each state (not fully supported)
72
+ *
73
+ * **Requirements:**
74
+ * - Typically paired with an {@link Image} component for visuals or any 3D object
75
+ *
76
+ * @example Listen to button clicks
77
+ * ```ts
78
+ * const button = myButton.getComponent(Button);
79
+ * button.onClick.addEventListener(() => {
80
+ * console.log("Button clicked!");
81
+ * });
82
+ * ```
83
+ *
84
+ * @example Programmatically click a button
85
+ * ```ts
86
+ * button.click(); // Triggers onClick event
87
+ * ```
88
+ *
67
89
  * @summary UI Button that can be clicked to perform actions
68
90
  * @category User Interface
69
91
  * @group Components
92
+ * @see {@link EventList} for onClick callback handling
93
+ * @see {@link Image} for button visuals
94
+ * @see {@link GraphicRaycaster} for UI interaction
95
+ * @see {@link Transition} for visual state options
70
96
  */
71
97
  export class Button extends Behaviour implements IPointerEventHandler {
72
98
 
@@ -25,13 +25,38 @@ 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.
28
+ * [Canvas](https://engine.needle.tools/docs/api/Canvas) is the root component for all UI elements in a scene.
29
+ * Defines the rendering area and manages layout for child UI elements.
30
+ *
31
+ * **Render modes:**
32
+ * - `WorldSpace` - UI exists in 3D space, can be viewed from any angle
33
+ * - `ScreenSpaceOverlay` - UI rendered on top of everything (HUD)
34
+ * - `ScreenSpaceCamera` - UI rendered at a distance from a specific camera
35
+ *
36
+ * **Usage:**
37
+ * All UI components ({@link Button}, {@link Text}, {@link Image}) must be
38
+ * children of a Canvas to render correctly. Multiple canvases can exist
39
+ * in a scene with different settings.
40
+ *
41
+ * **Rendering options:**
42
+ * - `renderOnTop` - Always render above other objects
43
+ * - `depthWrite` - Write to depth buffer (affects occlusion)
44
+ * - `doubleSided` - Render both sides of UI elements
45
+ *
46
+ * @example Create a world-space UI panel
47
+ * ```ts
48
+ * const canvas = panel.getComponent(Canvas);
49
+ * canvas.renderMode = RenderMode.WorldSpace;
50
+ * canvas.doubleSided = true;
51
+ * ```
52
+ *
32
53
  * @summary Root component for UI elements, managing layout and rendering settings
33
54
  * @category User Interface
34
55
  * @group Components
56
+ * @see {@link RenderMode} for rendering options
57
+ * @see {@link RectTransform} for UI layout
58
+ * @see {@link Button} for clickable UI elements
59
+ * @see {@link Text} for UI text rendering
35
60
  */
36
61
  export class Canvas extends UIRootComponent implements ICanvas {
37
62
 
@@ -7,8 +7,8 @@ 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.
10
+ * [CanvasGroup](https://engine.needle.tools/docs/api/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
12
  * The interactable and blocksRaycasts properties let you enable or disable user interaction for the entire group.
13
13
  * @summary Group UI elements to control transparency and interactivity
14
14
  * @category User Interface
@@ -36,7 +36,7 @@ onInitialized((ctx) => {
36
36
  })
37
37
 
38
38
  /**
39
- * The EventSystem is responsible for managing and dispatching input events to UI components within the scene.
39
+ * [EventSystem](https://engine.needle.tools/docs/api/EventSystem) is responsible for managing and dispatching input events to UI components within the scene.
40
40
  * @summary Manages and dispatches input events to UI components
41
41
  * @category User Interface
42
42
  * @group Components
@@ -22,6 +22,7 @@ const _colorStateObject: { backgroundColor: Color, backgroundOpacity: number, bo
22
22
  };
23
23
 
24
24
  /**
25
+ * [Graphic](https://engine.needle.tools/docs/api/Graphic) provides basic rendering for UI elements with color, opacity, and texture support.
25
26
  * @category User Interface
26
27
  * @group Components
27
28
  */
@@ -12,12 +12,31 @@ class Sprite {
12
12
  }
13
13
 
14
14
  /**
15
- * Image is a UI component that displays a sprite (2D image) in the user interface.
16
- * You can set the image property to assign a texture to be displayed.
17
- * The sprite can be customized with various properties such as color tinting and pixel density.
15
+ * [Image](https://engine.needle.tools/docs/api/Image) displays a sprite (2D texture) in the UI. Can be used for icons,
16
+ * backgrounds, or any visual element that needs a texture.
17
+ *
18
+ * **Properties:**
19
+ * - `image` - Direct texture assignment (convenience property)
20
+ * - `sprite` - Sprite object containing texture and rect info
21
+ * - `color` - Tint color applied to the image (inherited from Graphic)
22
+ *
23
+ * **Usage with Button:**
24
+ * Image is commonly paired with {@link Button} to create clickable
25
+ * UI elements with visual feedback via color tinting.
26
+ *
27
+ * @example Set an image texture
28
+ * ```ts
29
+ * const img = myIcon.getComponent(Image);
30
+ * img.image = myTexture;
31
+ * img.color = new RGBAColor(1, 0.5, 0.5, 1); // Red tint
32
+ * ```
33
+ *
18
34
  * @summary Display a 2D image in the UI
19
35
  * @category User Interface
20
36
  * @group Components
37
+ * @see {@link Canvas} for the UI root
38
+ * @see {@link Button} for clickable images
39
+ * @see {@link RawImage} for non-UI image display
21
40
  */
22
41
  export class Image extends MaskableGraphic {
23
42
 
@@ -10,8 +10,8 @@ import { tryGetUIComponent } from "./Utils.js";
10
10
  const debug = getParam("debuginputfield");
11
11
 
12
12
  /**
13
- * InputField is a UI component that allows users to enter and edit text.
14
- * It provides a text input area where users can type, delete, and modify text.
13
+ * [InputField](https://engine.needle.tools/docs/api/InputField) is a UI component that allows users to enter and edit text.
14
+ * It provides a text input area where users can type, delete, and modify text.
15
15
  * The InputField supports placeholder text, events for value changes, and end edit actions.
16
16
  * @summary Text field for user input
17
17
  * @category User Interface
@@ -301,6 +301,7 @@ export abstract class HorizontalOrVerticalLayoutGroup extends LayoutGroup {
301
301
  }
302
302
 
303
303
  /**
304
+ * [VerticalLayoutGroup](https://engine.needle.tools/docs/api/VerticalLayoutGroup) arranges child UI elements vertically with spacing, padding, and alignment options.
304
305
  * @category User Interface
305
306
  * @group Components
306
307
  */
@@ -313,6 +314,7 @@ export class VerticalLayoutGroup extends HorizontalOrVerticalLayoutGroup {
313
314
  }
314
315
 
315
316
  /**
317
+ * [HorizontalLayoutGroup](https://engine.needle.tools/docs/api/HorizontalLayoutGroup) arranges child UI elements horizontally with spacing, padding, and alignment options.
316
318
  * @category User Interface
317
319
  * @group Components
318
320
  */
@@ -325,6 +327,7 @@ export class HorizontalLayoutGroup extends HorizontalOrVerticalLayoutGroup {
325
327
  }
326
328
 
327
329
  /**
330
+ * [GridLayoutGroup](https://engine.needle.tools/docs/api/GridLayoutGroup) arranges child UI elements in a grid pattern.
328
331
  * @category User Interface
329
332
  * @group Components
330
333
  */
@@ -5,7 +5,7 @@ import { RGBAColor } from "../../engine/js-extensions/index.js";
5
5
  import { Behaviour } from "../Component.js";
6
6
 
7
7
  /**
8
- * Outline is a UI component that adds an outline effect to UI elements.
8
+ * [Outline](https://engine.needle.tools/docs/api/Outline) is a UI component that adds an outline effect to UI elements.
9
9
  * You can customize the outline color and distance to create a visual border around the UI element.
10
10
  * @summary Add an outline effect to UI elements
11
11
  * @category User Interface
@@ -10,7 +10,7 @@ export interface IInputEventArgs {
10
10
  stopImmediatePropagation?(): void;
11
11
  }
12
12
 
13
- /** This pointer event data object is passed to all event receivers that are currently active
13
+ /** [PointerEventData](https://engine.needle.tools/docs/api/PointerEventData) This pointer event data object is passed to all event receivers that are currently active
14
14
  * It contains hit information if an object was hovered or clicked
15
15
  * If the event is received in onPointerDown or onPointerMove, you can call `setPointerCapture` to receive onPointerMove events even when the pointer has left the object until you call `releasePointerCapture` or when the pointerUp event happens
16
16
  * You can get additional information about the event or event source via the `event` property (of type `NEPointerEvent`)
@@ -7,9 +7,21 @@ import { Behaviour } from "../Component.js";
7
7
  import { EventSystem } from "./EventSystem.js";
8
8
 
9
9
 
10
- /** Derive from this class to create your own custom Raycaster
11
- * If you override awake, onEnable or onDisable, be sure to call the base class methods
12
- * Implement `performRaycast` to perform your custom raycasting logic
10
+ /**
11
+ * [ObjectRaycaster](https://engine.needle.tools/docs/api/ObjectRaycaster) Base class for raycasters that detect pointer interactions.
12
+ * Derive from this class to create custom raycasting logic.
13
+ *
14
+ * **Built-in raycasters:**
15
+ * - {@link ObjectRaycaster} - Raycasts against 3D objects
16
+ * - {@link GraphicRaycaster} - Raycasts against UI elements
17
+ * - {@link SpatialGrabRaycaster} - Sphere overlap for XR grab
18
+ *
19
+ * **Important:** If you override `awake`, `onEnable`, or `onDisable`,
20
+ * call the base class methods to ensure proper registration with {@link EventSystem}.
21
+ *
22
+ * @category Interactivity
23
+ * @group Components
24
+ * @see {@link EventSystem} for the event dispatch system
13
25
  */
14
26
  export abstract class Raycaster extends Behaviour {
15
27
  awake(): void {
@@ -29,10 +41,22 @@ export abstract class Raycaster extends Behaviour {
29
41
 
30
42
 
31
43
  /**
32
- * A Raycaster that performs raycasting against its own GameObject.
44
+ * ObjectRaycaster enables pointer interactions with 3D objects.
45
+ * Add this component to any object that needs click/hover detection.
46
+ *
47
+ * **Usage:**
48
+ * Objects with ObjectRaycaster will receive pointer events when
49
+ * they implement interfaces like {@link IPointerClickHandler}.
33
50
  *
51
+ * **Note:**
52
+ * In older Needle Engine versions the ObjectRaycaster was required to be added to the Scene.
53
+ * This is no longer the case - the EventSystem will automatically handle raycasts.
54
+ *
55
+ *
34
56
  * @category Interactivity
35
57
  * @group Components
58
+ * @see {@link IPointerClickHandler} for click events
59
+ * @see {@link DragControls} for drag interactions
36
60
  */
37
61
  export class ObjectRaycaster extends Raycaster {
38
62
  private targets: Object3D[] | null = null;
@@ -73,11 +97,27 @@ export class ObjectRaycaster extends Raycaster {
73
97
 
74
98
 
75
99
  /**
76
- * A Raycaster that performs raycasting against UI elements (objects with a CanvasRenderer component).
77
- *
100
+ * GraphicRaycaster enables pointer interactions with UI elements.
101
+ * Add this to a {@link Canvas} or UI hierarchy to enable button clicks,
102
+ * hover effects, and other UI interactions.
103
+ *
104
+ * **Requirements:**
105
+ * - Must be on the same object as a Canvas or on a parent
106
+ * - UI elements need proper RectTransform setup
107
+ *
108
+ * @example Enable UI interaction
109
+ * ```ts
110
+ * // Add to Canvas object
111
+ * canvas.addComponent(GraphicRaycaster);
112
+ * // Now buttons and other UI elements will respond to clicks
113
+ * ```
114
+ *
78
115
  * @summary Raycaster for UI elements
79
116
  * @category User Interface
80
117
  * @group Components
118
+ * @see {@link Canvas} for UI root
119
+ * @see {@link Button} for clickable UI
120
+ * @see {@link EventSystem} for event handling
81
121
  */
82
122
  export class GraphicRaycaster extends ObjectRaycaster {
83
123
  // eventCamera: Camera | null = null;
@@ -91,10 +131,19 @@ export class GraphicRaycaster extends ObjectRaycaster {
91
131
  }
92
132
 
93
133
  /**
94
- * A Raycaster that performs sphere overlap raycasting for spatial grab interactions in XR.
95
- *
134
+ * SpatialGrabRaycaster enables direct grab interactions in VR/AR.
135
+ * Uses sphere overlap detection around the controller/hand position
136
+ * to allow grabbing objects by reaching into them.
137
+ *
138
+ * **Features:**
139
+ * - Active only during XR sessions
140
+ * - Can be globally disabled via `SpatialGrabRaycaster.allow`
141
+ * - Works alongside ray-based interaction
142
+ *
96
143
  * @category XR
97
144
  * @group Components
145
+ * @see {@link WebXR} for XR session management
146
+ * @see {@link DragControls} for object manipulation
98
147
  */
99
148
  export class SpatialGrabRaycaster extends Raycaster {
100
149
 
@@ -29,8 +29,8 @@ const tempVec = new Vector3();
29
29
  const tempMatrix = new Matrix4();
30
30
  const tempQuaternion = new Quaternion();
31
31
 
32
- /**
33
- * RectTransform is a component that defines a rectangle for UI layout.
32
+ /**
33
+ * [RectTransform](https://engine.needle.tools/docs/api/RectTransform) defines a rectangle for UI layout with anchoring, pivoting, and positioning capabilities.
34
34
  * @summary UI Rectangle Transform
35
35
  * @category User Interface
36
36
  * @group Components
@@ -7,7 +7,7 @@ import { getWorldRotation, setWorldRotationXYZ } from '../../engine/engine_three
7
7
  import { Behaviour } from '../Component.js';
8
8
 
9
9
  /**
10
- * SpatialHtml is a component that allows you to integrate HTML elements into a 3D scene.
10
+ * [SpatialHtml](https://engine.needle.tools/docs/api/SpatialHtml) is a component that allows you to integrate HTML elements into a 3D scene.
11
11
  * By specifying the ID of an existing HTML element, you can render it as a 3D object within the scene.
12
12
  * @summary Render HTML elements as 3D objects in the scene
13
13
  * @category User Interface