@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.
- package/CHANGELOG.md +8 -1
- package/README.md +37 -0
- package/components.needle.json +1 -1
- package/custom-elements.json +138 -4
- package/dist/{needle-engine.bundle-CxaKFQVS.min.js → needle-engine.bundle-BNIUpreS.min.js} +107 -107
- package/dist/{needle-engine.bundle-Dl3TFYyv.js → needle-engine.bundle-DauZUYl7.js} +2347 -1845
- package/dist/{needle-engine.bundle-J4k4znv8.umd.cjs → needle-engine.bundle-tjI5Fq2c.umd.cjs} +108 -108
- package/dist/needle-engine.d.ts +4022 -419
- package/dist/needle-engine.js +2 -2
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/lib/engine/engine_context.d.ts +16 -0
- package/lib/engine/engine_context.js +16 -0
- package/lib/engine/engine_context.js.map +1 -1
- package/lib/engine/engine_gameobject.d.ts +72 -0
- package/lib/engine/engine_gameobject.js +38 -0
- package/lib/engine/engine_gameobject.js.map +1 -1
- package/lib/engine/engine_input.d.ts +80 -4
- package/lib/engine/engine_input.js +78 -2
- package/lib/engine/engine_input.js.map +1 -1
- package/lib/engine/engine_math.d.ts +81 -2
- package/lib/engine/engine_math.js +68 -2
- package/lib/engine/engine_math.js.map +1 -1
- package/lib/engine/engine_networking.d.ts +181 -14
- package/lib/engine/engine_networking.js +181 -14
- package/lib/engine/engine_networking.js.map +1 -1
- package/lib/engine/engine_networking_auto.d.ts +35 -8
- package/lib/engine/engine_networking_auto.js +35 -8
- package/lib/engine/engine_networking_auto.js.map +1 -1
- package/lib/engine/engine_physics.d.ts +37 -1
- package/lib/engine/engine_physics.js +37 -1
- package/lib/engine/engine_physics.js.map +1 -1
- package/lib/engine/engine_physics_rapier.d.ts +78 -0
- package/lib/engine/engine_physics_rapier.js +78 -0
- package/lib/engine/engine_physics_rapier.js.map +1 -1
- package/lib/engine/engine_serialization_decorator.d.ts +28 -2
- package/lib/engine/engine_serialization_decorator.js +28 -2
- package/lib/engine/engine_serialization_decorator.js.map +1 -1
- package/lib/engine/engine_time.d.ts +23 -3
- package/lib/engine/engine_time.js +23 -3
- package/lib/engine/engine_time.js.map +1 -1
- package/lib/engine/engine_util_decorator.d.ts +31 -1
- package/lib/engine/engine_util_decorator.js +31 -1
- package/lib/engine/engine_util_decorator.js.map +1 -1
- package/lib/engine/engine_utils.d.ts +21 -5
- package/lib/engine/engine_utils.js +21 -5
- package/lib/engine/engine_utils.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_materialx.d.ts +2 -2
- package/lib/engine/extensions/NEEDLE_materialx.js +2 -2
- package/lib/engine/extensions/NEEDLE_materialx.js.map +1 -1
- package/lib/engine/extensions/index.d.ts +1 -1
- package/lib/engine/extensions/index.js +1 -1
- package/lib/engine/extensions/index.js.map +1 -1
- package/lib/engine-components/AlignmentConstraint.d.ts +23 -3
- package/lib/engine-components/AlignmentConstraint.js +23 -3
- package/lib/engine-components/AlignmentConstraint.js.map +1 -1
- package/lib/engine-components/Animation.d.ts +42 -0
- package/lib/engine-components/Animation.js +36 -0
- package/lib/engine-components/Animation.js.map +1 -1
- package/lib/engine-components/Animator.d.ts +37 -4
- package/lib/engine-components/Animator.js +37 -4
- package/lib/engine-components/Animator.js.map +1 -1
- package/lib/engine-components/AudioListener.d.ts +1 -1
- package/lib/engine-components/AudioListener.js +1 -1
- package/lib/engine-components/AudioSource.d.ts +32 -10
- package/lib/engine-components/AudioSource.js +32 -10
- package/lib/engine-components/AudioSource.js.map +1 -1
- package/lib/engine-components/AxesHelper.d.ts +22 -3
- package/lib/engine-components/AxesHelper.js +22 -3
- package/lib/engine-components/AxesHelper.js.map +1 -1
- package/lib/engine-components/BasicIKConstraint.d.ts +27 -4
- package/lib/engine-components/BasicIKConstraint.js +27 -4
- package/lib/engine-components/BasicIKConstraint.js.map +1 -1
- package/lib/engine-components/Camera.d.ts +32 -2
- package/lib/engine-components/Camera.js +32 -2
- package/lib/engine-components/Camera.js.map +1 -1
- package/lib/engine-components/CharacterController.d.ts +68 -4
- package/lib/engine-components/CharacterController.js +68 -4
- package/lib/engine-components/CharacterController.js.map +1 -1
- package/lib/engine-components/Collider.d.ts +69 -12
- package/lib/engine-components/Collider.js +69 -12
- package/lib/engine-components/Collider.js.map +1 -1
- package/lib/engine-components/ContactShadows.d.ts +28 -6
- package/lib/engine-components/ContactShadows.js +33 -8
- package/lib/engine-components/ContactShadows.js.map +1 -1
- package/lib/engine-components/DeleteBox.d.ts +43 -2
- package/lib/engine-components/DeleteBox.js +43 -2
- package/lib/engine-components/DeleteBox.js.map +1 -1
- package/lib/engine-components/DeviceFlag.d.ts +21 -2
- package/lib/engine-components/DeviceFlag.js +21 -2
- package/lib/engine-components/DeviceFlag.js.map +1 -1
- package/lib/engine-components/DragControls.d.ts +32 -2
- package/lib/engine-components/DragControls.js +32 -2
- package/lib/engine-components/DragControls.js.map +1 -1
- package/lib/engine-components/DropListener.d.ts +33 -21
- package/lib/engine-components/DropListener.js +33 -21
- package/lib/engine-components/DropListener.js.map +1 -1
- package/lib/engine-components/Duplicatable.d.ts +36 -5
- package/lib/engine-components/Duplicatable.js +36 -5
- package/lib/engine-components/Duplicatable.js.map +1 -1
- package/lib/engine-components/EventList.d.ts +38 -10
- package/lib/engine-components/EventList.js +40 -12
- package/lib/engine-components/EventList.js.map +1 -1
- package/lib/engine-components/EventTrigger.d.ts +1 -1
- package/lib/engine-components/EventTrigger.js +1 -1
- package/lib/engine-components/Fog.d.ts +23 -1
- package/lib/engine-components/Fog.js +23 -1
- package/lib/engine-components/Fog.js.map +1 -1
- package/lib/engine-components/GridHelper.d.ts +18 -2
- package/lib/engine-components/GridHelper.js +18 -2
- package/lib/engine-components/GridHelper.js.map +1 -1
- package/lib/engine-components/GroundProjection.d.ts +24 -2
- package/lib/engine-components/GroundProjection.js +24 -2
- package/lib/engine-components/GroundProjection.js.map +1 -1
- package/lib/engine-components/Interactable.d.ts +17 -2
- package/lib/engine-components/Interactable.js +17 -2
- package/lib/engine-components/Interactable.js.map +1 -1
- package/lib/engine-components/Joints.d.ts +50 -7
- package/lib/engine-components/Joints.js +50 -7
- package/lib/engine-components/Joints.js.map +1 -1
- package/lib/engine-components/LODGroup.d.ts +36 -14
- package/lib/engine-components/LODGroup.js +43 -11
- package/lib/engine-components/LODGroup.js.map +1 -1
- package/lib/engine-components/Light.d.ts +30 -5
- package/lib/engine-components/Light.js +30 -5
- package/lib/engine-components/Light.js.map +1 -1
- package/lib/engine-components/LookAtConstraint.d.ts +22 -7
- package/lib/engine-components/LookAtConstraint.js +22 -7
- package/lib/engine-components/LookAtConstraint.js.map +1 -1
- package/lib/engine-components/NeedleMenu.d.ts +27 -5
- package/lib/engine-components/NeedleMenu.js +27 -5
- package/lib/engine-components/NeedleMenu.js.map +1 -1
- package/lib/engine-components/NestedGltf.d.ts +39 -4
- package/lib/engine-components/NestedGltf.js +42 -4
- package/lib/engine-components/NestedGltf.js.map +1 -1
- package/lib/engine-components/OffsetConstraint.d.ts +27 -3
- package/lib/engine-components/OffsetConstraint.js +27 -3
- package/lib/engine-components/OffsetConstraint.js.map +1 -1
- package/lib/engine-components/OrbitControls.d.ts +41 -3
- package/lib/engine-components/OrbitControls.js +41 -3
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/PlayerColor.d.ts +1 -1
- package/lib/engine-components/PlayerColor.js +1 -1
- package/lib/engine-components/ReflectionProbe.d.ts +17 -2
- package/lib/engine-components/ReflectionProbe.js +17 -3
- package/lib/engine-components/ReflectionProbe.js.map +1 -1
- package/lib/engine-components/Renderer.d.ts +35 -0
- package/lib/engine-components/Renderer.js +36 -2
- package/lib/engine-components/Renderer.js.map +1 -1
- package/lib/engine-components/RigidBody.d.ts +57 -5
- package/lib/engine-components/RigidBody.js +57 -5
- package/lib/engine-components/RigidBody.js.map +1 -1
- package/lib/engine-components/SceneSwitcher.d.ts +11 -0
- package/lib/engine-components/SceneSwitcher.js +11 -0
- package/lib/engine-components/SceneSwitcher.js.map +1 -1
- package/lib/engine-components/ScreenCapture.d.ts +39 -6
- package/lib/engine-components/ScreenCapture.js +39 -6
- package/lib/engine-components/ScreenCapture.js.map +1 -1
- package/lib/engine-components/SeeThrough.d.ts +70 -5
- package/lib/engine-components/SeeThrough.js +70 -5
- package/lib/engine-components/SeeThrough.js.map +1 -1
- package/lib/engine-components/ShadowCatcher.d.ts +56 -4
- package/lib/engine-components/ShadowCatcher.js +56 -4
- package/lib/engine-components/ShadowCatcher.js.map +1 -1
- package/lib/engine-components/Skybox.d.ts +43 -7
- package/lib/engine-components/Skybox.js +43 -7
- package/lib/engine-components/Skybox.js.map +1 -1
- package/lib/engine-components/SmoothFollow.d.ts +66 -7
- package/lib/engine-components/SmoothFollow.js +66 -7
- package/lib/engine-components/SmoothFollow.js.map +1 -1
- package/lib/engine-components/SpatialTrigger.d.ts +48 -1
- package/lib/engine-components/SpatialTrigger.js +48 -1
- package/lib/engine-components/SpatialTrigger.js.map +1 -1
- package/lib/engine-components/SpectatorCamera.d.ts +21 -3
- package/lib/engine-components/SpectatorCamera.js +21 -3
- package/lib/engine-components/SpectatorCamera.js.map +1 -1
- package/lib/engine-components/SyncedRoom.d.ts +7 -1
- package/lib/engine-components/SyncedRoom.js +7 -1
- package/lib/engine-components/SyncedRoom.js.map +1 -1
- package/lib/engine-components/SyncedTransform.d.ts +55 -6
- package/lib/engine-components/SyncedTransform.js +55 -6
- package/lib/engine-components/SyncedTransform.js.map +1 -1
- package/lib/engine-components/TransformGizmo.d.ts +30 -3
- package/lib/engine-components/TransformGizmo.js +30 -3
- package/lib/engine-components/TransformGizmo.js.map +1 -1
- package/lib/engine-components/VideoPlayer.d.ts +33 -6
- package/lib/engine-components/VideoPlayer.js +45 -6
- package/lib/engine-components/VideoPlayer.js.map +1 -1
- package/lib/engine-components/Voip.d.ts +33 -2
- package/lib/engine-components/Voip.js +33 -2
- package/lib/engine-components/Voip.js.map +1 -1
- package/lib/engine-components/export/usdz/USDZExporter.d.ts +47 -13
- package/lib/engine-components/export/usdz/USDZExporter.js +47 -13
- package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
- package/lib/engine-components/particlesystem/ParticleSystem.d.ts +82 -3
- package/lib/engine-components/particlesystem/ParticleSystem.js +82 -3
- package/lib/engine-components/particlesystem/ParticleSystem.js.map +1 -1
- package/lib/engine-components/postprocessing/Effects/Antialiasing.d.ts +1 -0
- package/lib/engine-components/postprocessing/Effects/Antialiasing.js +1 -0
- package/lib/engine-components/postprocessing/Effects/Antialiasing.js.map +1 -1
- package/lib/engine-components/postprocessing/Effects/BloomEffect.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/BloomEffect.js +1 -1
- package/lib/engine-components/postprocessing/Effects/ChromaticAberration.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js +1 -1
- package/lib/engine-components/postprocessing/Effects/ColorAdjustments.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js +1 -1
- package/lib/engine-components/postprocessing/Effects/DepthOfField.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/DepthOfField.js +1 -1
- package/lib/engine-components/postprocessing/Effects/EffectWrapper.d.ts +1 -0
- package/lib/engine-components/postprocessing/Effects/EffectWrapper.js +1 -0
- package/lib/engine-components/postprocessing/Effects/EffectWrapper.js.map +1 -1
- package/lib/engine-components/postprocessing/Effects/Pixelation.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/Pixelation.js +1 -1
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.js +1 -1
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.js +1 -1
- package/lib/engine-components/postprocessing/Effects/Sharpening.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/Sharpening.js +1 -1
- package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.js +1 -1
- package/lib/engine-components/postprocessing/Effects/Tonemapping.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/Tonemapping.js +1 -1
- package/lib/engine-components/postprocessing/Effects/Vignette.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/Vignette.js +1 -1
- package/lib/engine-components/postprocessing/PostProcessingHandler.d.ts +1 -1
- package/lib/engine-components/postprocessing/PostProcessingHandler.js +1 -1
- package/lib/engine-components/postprocessing/Volume.d.ts +1 -1
- package/lib/engine-components/postprocessing/Volume.js +1 -1
- package/lib/engine-components/splines/Spline.d.ts +409 -12
- package/lib/engine-components/splines/Spline.js +409 -12
- package/lib/engine-components/splines/Spline.js.map +1 -1
- package/lib/engine-components/splines/SplineUtils.d.ts +1 -0
- package/lib/engine-components/splines/SplineUtils.js +1 -0
- package/lib/engine-components/splines/SplineUtils.js.map +1 -1
- package/lib/engine-components/splines/SplineWalker.d.ts +3 -1
- package/lib/engine-components/splines/SplineWalker.js +3 -1
- package/lib/engine-components/splines/SplineWalker.js.map +1 -1
- package/lib/engine-components/timeline/PlayableDirector.d.ts +103 -14
- package/lib/engine-components/timeline/PlayableDirector.js +95 -25
- package/lib/engine-components/timeline/PlayableDirector.js.map +1 -1
- package/lib/engine-components/timeline/TimelineModels.d.ts +14 -0
- package/lib/engine-components/timeline/TimelineModels.js +4 -0
- package/lib/engine-components/timeline/TimelineModels.js.map +1 -1
- package/lib/engine-components/ui/Button.d.ts +29 -3
- package/lib/engine-components/ui/Button.js +29 -3
- package/lib/engine-components/ui/Button.js.map +1 -1
- package/lib/engine-components/ui/Canvas.d.ts +29 -4
- package/lib/engine-components/ui/Canvas.js +29 -4
- package/lib/engine-components/ui/Canvas.js.map +1 -1
- package/lib/engine-components/ui/CanvasGroup.d.ts +1 -1
- package/lib/engine-components/ui/CanvasGroup.js +1 -1
- package/lib/engine-components/ui/EventSystem.d.ts +1 -1
- package/lib/engine-components/ui/EventSystem.js +1 -1
- package/lib/engine-components/ui/Graphic.d.ts +1 -0
- package/lib/engine-components/ui/Graphic.js +1 -0
- package/lib/engine-components/ui/Graphic.js.map +1 -1
- package/lib/engine-components/ui/Image.d.ts +22 -3
- package/lib/engine-components/ui/Image.js +22 -3
- package/lib/engine-components/ui/Image.js.map +1 -1
- package/lib/engine-components/ui/InputField.d.ts +1 -1
- package/lib/engine-components/ui/InputField.js +1 -1
- package/lib/engine-components/ui/Layout.d.ts +3 -0
- package/lib/engine-components/ui/Layout.js +3 -0
- package/lib/engine-components/ui/Layout.js.map +1 -1
- package/lib/engine-components/ui/Outline.d.ts +1 -1
- package/lib/engine-components/ui/Outline.js +1 -1
- package/lib/engine-components/ui/PointerEvents.d.ts +1 -1
- package/lib/engine-components/ui/PointerEvents.js +1 -1
- package/lib/engine-components/ui/Raycaster.d.ts +55 -6
- package/lib/engine-components/ui/Raycaster.js +55 -6
- package/lib/engine-components/ui/Raycaster.js.map +1 -1
- package/lib/engine-components/ui/RectTransform.d.ts +1 -1
- package/lib/engine-components/ui/RectTransform.js +1 -1
- package/lib/engine-components/ui/SpatialHtml.d.ts +1 -1
- package/lib/engine-components/ui/SpatialHtml.js +1 -1
- package/lib/engine-components/ui/Text.d.ts +23 -1
- package/lib/engine-components/ui/Text.js +23 -1
- package/lib/engine-components/ui/Text.js.map +1 -1
- package/lib/engine-components/utils/LookAt.d.ts +1 -1
- package/lib/engine-components/utils/LookAt.js +1 -1
- package/lib/engine-components/utils/OpenURL.d.ts +1 -1
- package/lib/engine-components/utils/OpenURL.js +1 -1
- package/lib/engine-components/web/Clickthrough.d.ts +116 -7
- package/lib/engine-components/web/Clickthrough.js +116 -7
- package/lib/engine-components/web/Clickthrough.js.map +1 -1
- package/lib/engine-components/web/CursorFollow.d.ts +171 -7
- package/lib/engine-components/web/CursorFollow.js +171 -7
- package/lib/engine-components/web/CursorFollow.js.map +1 -1
- package/lib/engine-components/web/HoverAnimation.d.ts +140 -11
- package/lib/engine-components/web/HoverAnimation.js +140 -11
- package/lib/engine-components/web/HoverAnimation.js.map +1 -1
- package/lib/engine-components/web/ScrollFollow.d.ts +4 -1
- package/lib/engine-components/web/ScrollFollow.js +4 -1
- package/lib/engine-components/web/ScrollFollow.js.map +1 -1
- package/lib/engine-components/web/ViewBox.d.ts +116 -16
- package/lib/engine-components/web/ViewBox.js +110 -16
- package/lib/engine-components/web/ViewBox.js.map +1 -1
- package/lib/engine-components/webxr/TeleportTarget.d.ts +21 -2
- package/lib/engine-components/webxr/TeleportTarget.js +21 -2
- package/lib/engine-components/webxr/TeleportTarget.js.map +1 -1
- package/lib/engine-components/webxr/WebXR.d.ts +10 -2
- package/lib/engine-components/webxr/WebXR.js +10 -2
- package/lib/engine-components/webxr/WebXR.js.map +1 -1
- package/lib/engine-components/webxr/WebXRAvatar.d.ts +39 -2
- package/lib/engine-components/webxr/WebXRAvatar.js +35 -3
- package/lib/engine-components/webxr/WebXRAvatar.js.map +1 -1
- package/lib/engine-components/webxr/WebXRImageTracking.d.ts +266 -30
- package/lib/engine-components/webxr/WebXRImageTracking.js +266 -30
- package/lib/engine-components/webxr/WebXRImageTracking.js.map +1 -1
- package/lib/engine-components/webxr/WebXRPlaneTracking.d.ts +1 -1
- package/lib/engine-components/webxr/WebXRPlaneTracking.js +1 -1
- package/lib/engine-components/webxr/XRFlag.d.ts +29 -2
- package/lib/engine-components/webxr/XRFlag.js +29 -2
- package/lib/engine-components/webxr/XRFlag.js.map +1 -1
- package/package.json +1 -1
- package/plugins/vite/custom-element-data.js +128 -19
- package/src/engine/engine_context.ts +16 -0
- package/src/engine/engine_gameobject.ts +73 -0
- package/src/engine/engine_input.ts +83 -7
- package/src/engine/engine_math.ts +81 -2
- package/src/engine/engine_networking.ts +186 -17
- package/src/engine/engine_networking_auto.ts +36 -9
- package/src/engine/engine_physics.ts +41 -1
- package/src/engine/engine_physics_rapier.ts +81 -0
- package/src/engine/engine_serialization_decorator.ts +28 -2
- package/src/engine/engine_time.ts +23 -3
- package/src/engine/engine_util_decorator.ts +31 -1
- package/src/engine/engine_utils.ts +21 -5
- package/src/engine/extensions/NEEDLE_materialx.ts +5 -4
- package/src/engine/extensions/index.ts +2 -2
- package/src/engine-components/AlignmentConstraint.ts +24 -4
- package/src/engine-components/Animation.ts +44 -2
- package/src/engine-components/Animator.ts +40 -7
- package/src/engine-components/AudioListener.ts +1 -1
- package/src/engine-components/AudioSource.ts +37 -15
- package/src/engine-components/AxesHelper.ts +23 -4
- package/src/engine-components/BasicIKConstraint.ts +28 -5
- package/src/engine-components/Camera.ts +33 -3
- package/src/engine-components/CharacterController.ts +74 -7
- package/src/engine-components/Collider.ts +78 -21
- package/src/engine-components/ContactShadows.ts +41 -11
- package/src/engine-components/DeleteBox.ts +43 -2
- package/src/engine-components/DeviceFlag.ts +22 -3
- package/src/engine-components/DragControls.ts +32 -2
- package/src/engine-components/DropListener.ts +41 -29
- package/src/engine-components/Duplicatable.ts +37 -6
- package/src/engine-components/EventList.ts +43 -15
- package/src/engine-components/EventTrigger.ts +1 -1
- package/src/engine-components/Fog.ts +23 -1
- package/src/engine-components/GridHelper.ts +18 -2
- package/src/engine-components/GroundProjection.ts +25 -3
- package/src/engine-components/Interactable.ts +17 -2
- package/src/engine-components/Joints.ts +51 -8
- package/src/engine-components/LODGroup.ts +45 -11
- package/src/engine-components/Light.ts +35 -13
- package/src/engine-components/LookAtConstraint.ts +26 -8
- package/src/engine-components/NeedleMenu.ts +29 -7
- package/src/engine-components/NestedGltf.ts +40 -4
- package/src/engine-components/OffsetConstraint.ts +27 -3
- package/src/engine-components/OrbitControls.ts +41 -3
- package/src/engine-components/PlayerColor.ts +1 -1
- package/src/engine-components/ReflectionProbe.ts +19 -5
- package/src/engine-components/Renderer.ts +35 -1
- package/src/engine-components/RigidBody.ts +64 -8
- package/src/engine-components/SceneSwitcher.ts +11 -0
- package/src/engine-components/ScreenCapture.ts +42 -9
- package/src/engine-components/SeeThrough.ts +76 -9
- package/src/engine-components/ShadowCatcher.ts +61 -6
- package/src/engine-components/Skybox.ts +48 -12
- package/src/engine-components/SmoothFollow.ts +68 -7
- package/src/engine-components/SpatialTrigger.ts +51 -4
- package/src/engine-components/SpectatorCamera.ts +23 -5
- package/src/engine-components/SyncedRoom.ts +8 -2
- package/src/engine-components/SyncedTransform.ts +59 -10
- package/src/engine-components/TransformGizmo.ts +31 -4
- package/src/engine-components/VideoPlayer.ts +48 -6
- package/src/engine-components/Voip.ts +33 -2
- package/src/engine-components/export/usdz/USDZExporter.ts +47 -13
- package/src/engine-components/particlesystem/ParticleSystem.ts +84 -5
- package/src/engine-components/postprocessing/Effects/Antialiasing.ts +1 -0
- package/src/engine-components/postprocessing/Effects/BloomEffect.ts +1 -1
- package/src/engine-components/postprocessing/Effects/ChromaticAberration.ts +1 -1
- package/src/engine-components/postprocessing/Effects/ColorAdjustments.ts +1 -1
- package/src/engine-components/postprocessing/Effects/DepthOfField.ts +1 -1
- package/src/engine-components/postprocessing/Effects/EffectWrapper.ts +1 -0
- package/src/engine-components/postprocessing/Effects/Pixelation.ts +1 -1
- package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.ts +1 -1
- package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.ts +1 -1
- package/src/engine-components/postprocessing/Effects/Sharpening.ts +1 -1
- package/src/engine-components/postprocessing/Effects/TiltShiftEffect.ts +1 -1
- package/src/engine-components/postprocessing/Effects/Tonemapping.ts +1 -1
- package/src/engine-components/postprocessing/Effects/Vignette.ts +1 -1
- package/src/engine-components/postprocessing/PostProcessingHandler.ts +1 -1
- package/src/engine-components/postprocessing/Volume.ts +1 -1
- package/src/engine-components/splines/Spline.ts +412 -14
- package/src/engine-components/splines/SplineUtils.ts +1 -0
- package/src/engine-components/splines/SplineWalker.ts +4 -2
- package/src/engine-components/timeline/PlayableDirector.ts +108 -27
- package/src/engine-components/timeline/SignalAsset.ts +1 -1
- package/src/engine-components/timeline/TimelineModels.ts +18 -2
- package/src/engine-components/ui/Button.ts +29 -3
- package/src/engine-components/ui/Canvas.ts +29 -4
- package/src/engine-components/ui/CanvasGroup.ts +2 -2
- package/src/engine-components/ui/EventSystem.ts +1 -1
- package/src/engine-components/ui/Graphic.ts +1 -0
- package/src/engine-components/ui/Image.ts +22 -3
- package/src/engine-components/ui/InputField.ts +2 -2
- package/src/engine-components/ui/Layout.ts +3 -0
- package/src/engine-components/ui/Outline.ts +1 -1
- package/src/engine-components/ui/PointerEvents.ts +1 -1
- package/src/engine-components/ui/Raycaster.ts +57 -8
- package/src/engine-components/ui/RectTransform.ts +2 -2
- package/src/engine-components/ui/SpatialHtml.ts +1 -1
- package/src/engine-components/ui/Text.ts +24 -2
- package/src/engine-components/utils/LookAt.ts +1 -1
- package/src/engine-components/utils/OpenURL.ts +1 -1
- package/src/engine-components/web/Clickthrough.ts +119 -10
- package/src/engine-components/web/CursorFollow.ts +174 -9
- package/src/engine-components/web/HoverAnimation.ts +142 -13
- package/src/engine-components/web/ScrollFollow.ts +4 -1
- package/src/engine-components/web/ViewBox.ts +118 -18
- package/src/engine-components/webxr/TeleportTarget.ts +23 -4
- package/src/engine-components/webxr/WebXR.ts +11 -3
- package/src/engine-components/webxr/WebXRAvatar.ts +41 -4
- package/src/engine-components/webxr/WebXRImageTracking.ts +282 -38
- package/src/engine-components/webxr/WebXRPlaneTracking.ts +1 -1
- package/src/engine-components/webxr/XRFlag.ts +30 -3
|
@@ -17,16 +17,125 @@ onStart(ctx => {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
/**
|
|
20
|
-
* ClickThrough
|
|
20
|
+
* [ClickThrough](https://engine.needle.tools/docs/api/ClickThrough) enables pointer events to pass through the 3D canvas to HTML elements positioned behind it.
|
|
21
|
+
* This component dynamically toggles `pointer-events: none` on the canvas when no 3D objects are hit by raycasts, allowing interaction with underlying HTML content.
|
|
21
22
|
*
|
|
22
|
-
*
|
|
23
|
+
* 
|
|
23
24
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* -
|
|
25
|
+
* **How It Works:**
|
|
26
|
+
* The component listens to pointer events and performs raycasts to detect if any 3D objects are under the cursor:
|
|
27
|
+
* - **When 3D objects are hit**: Canvas has `pointer-events: all` (normal 3D interaction)
|
|
28
|
+
* - **When nothing is hit**: Canvas has `pointer-events: none` (clicks pass through to HTML)
|
|
27
29
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
+
* This creates a seamless experience where users can interact with both 3D objects and underlying HTML elements
|
|
31
|
+
* through the same canvas area, depending on what's under the cursor.
|
|
32
|
+
*
|
|
33
|
+
* **Key Features:**
|
|
34
|
+
* - Automatic pointer event routing based on 3D hit detection
|
|
35
|
+
* - Works with both mouse and touch input
|
|
36
|
+
* - Supports transparent or semi-transparent canvases
|
|
37
|
+
* - Can be enabled via component or HTML attribute
|
|
38
|
+
* - No performance impact when disabled
|
|
39
|
+
* - Handles multi-touch scenarios correctly
|
|
40
|
+
*
|
|
41
|
+
* **Common Use Cases:**
|
|
42
|
+
* - Overlaying 3D elements on top of HTML content (headers, hero sections)
|
|
43
|
+
* - Creating "floating" 3D objects that don't block underlying UI
|
|
44
|
+
* - Mixed 2D/3D interfaces where both need to be interactive
|
|
45
|
+
* - Transparent 3D overlays on websites
|
|
46
|
+
* - Product showcases with clickable text/buttons beneath the 3D view
|
|
47
|
+
* - Interactive storytelling with mixed HTML and 3D content
|
|
48
|
+
*
|
|
49
|
+
* **Setup Options:**
|
|
50
|
+
*
|
|
51
|
+
* **Option 1: Component-based** (programmatic setup)
|
|
52
|
+
* ```ts
|
|
53
|
+
* // Add to any GameObject in your scene
|
|
54
|
+
* scene.addComponent(ClickThrough);
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* **Option 2: HTML attribute** (declarative setup, recommended)
|
|
58
|
+
* ```html
|
|
59
|
+
* <!-- Enable clickthrough via HTML attribute -->
|
|
60
|
+
* <needle-engine clickthrough></needle-engine>
|
|
61
|
+
*
|
|
62
|
+
* <!-- Dynamically toggle clickthrough -->
|
|
63
|
+
* <needle-engine id="engine" clickthrough="true"></needle-engine>
|
|
64
|
+
* <script>
|
|
65
|
+
* // Disable clickthrough
|
|
66
|
+
* document.getElementById('engine').setAttribute('clickthrough', 'false');
|
|
67
|
+
* </script>
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @example Basic transparent canvas over HTML
|
|
71
|
+
* ```html
|
|
72
|
+
* <style>
|
|
73
|
+
* .container { position: relative; }
|
|
74
|
+
* needle-engine { position: absolute; top: 0; left: 0; }
|
|
75
|
+
* .html-content { position: absolute; top: 0; left: 0; }
|
|
76
|
+
* </style>
|
|
77
|
+
*
|
|
78
|
+
* <div class="container">
|
|
79
|
+
* <div class="html-content">
|
|
80
|
+
* <h1>Click me!</h1>
|
|
81
|
+
* <button>I'm clickable through the 3D canvas</button>
|
|
82
|
+
* </div>
|
|
83
|
+
* <needle-engine clickthrough src="scene.glb"></needle-engine>
|
|
84
|
+
* </div>
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* @example Programmatic setup with toggle
|
|
88
|
+
* ```ts
|
|
89
|
+
* const clickthrough = scene.addComponent(ClickThrough);
|
|
90
|
+
*
|
|
91
|
+
* // Toggle clickthrough based on some condition
|
|
92
|
+
* function setInteractiveMode(mode: 'html' | '3d' | 'mixed') {
|
|
93
|
+
* switch(mode) {
|
|
94
|
+
* case 'html':
|
|
95
|
+
* clickthrough.enabled = false; // 3D blocks HTML
|
|
96
|
+
* break;
|
|
97
|
+
* case '3d':
|
|
98
|
+
* clickthrough.enabled = false; // 3D only
|
|
99
|
+
* break;
|
|
100
|
+
* case 'mixed':
|
|
101
|
+
* clickthrough.enabled = true; // Smart switching
|
|
102
|
+
* break;
|
|
103
|
+
* }
|
|
104
|
+
* }
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* @example 3D header with clickable logo beneath
|
|
108
|
+
* ```html
|
|
109
|
+
* <!-- 3D animated object over a clickable logo -->
|
|
110
|
+
* <div class="header">
|
|
111
|
+
* <a href="/" class="logo">My Brand</a>
|
|
112
|
+
* <needle-engine clickthrough src="header-animation.glb"></needle-engine>
|
|
113
|
+
* </div>
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
116
|
+
* **Technical Notes:**
|
|
117
|
+
* - The component uses `pointer-events` CSS property for passthrough
|
|
118
|
+
* - Touch events are handled separately with a special timing mechanism
|
|
119
|
+
* - Only pointer ID 0 is tracked to avoid multi-touch issues
|
|
120
|
+
* - The component stores the previous `pointer-events` value and restores it on disable
|
|
121
|
+
* - Raycasts are performed on both `pointerdown` and `pointermove` events
|
|
122
|
+
*
|
|
123
|
+
* **Troubleshooting:**
|
|
124
|
+
* - Ensure your canvas has a transparent background if you want to see HTML beneath
|
|
125
|
+
* - Make sure 3D objects have colliders or are raycastable
|
|
126
|
+
* - If clicks aren't passing through, check that no invisible objects are blocking raycasts
|
|
127
|
+
* - HTML elements must be properly positioned (z-index) behind the canvas
|
|
128
|
+
*
|
|
129
|
+
* **Live Example:**
|
|
130
|
+
* - [3D Over HTML Sample on Stackblitz](https://stackblitz.com/~/github.com/needle-engine/sample-3d-over-html)
|
|
131
|
+
*
|
|
132
|
+
* @see {@link Context.input} - The input system used for pointer event detection
|
|
133
|
+
* @see {@link Context.physics.raycast} - Used to detect 3D object hits
|
|
134
|
+
* @see {@link ObjectRaycaster} - Controls which objects are raycastable
|
|
135
|
+
* @see {@link PointerEvents} - For more complex pointer interaction handling
|
|
136
|
+
* @see {@link NEPointerEvent} - The pointer event type used internally
|
|
137
|
+
*
|
|
138
|
+
* @summary Enables pointer events to pass through canvas to HTML elements behind it
|
|
30
139
|
* @category Web
|
|
31
140
|
* @group Components
|
|
32
141
|
* @component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Clickthrough.js","sourceRoot":"","sources":["../../../src/engine-components/web/Clickthrough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AC,CAAC;QAC9B,IAAI,CAAC,KAAK;YAAE,OAAO;QAEnB,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;QACtD,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC1D,yBAAyB;QACzB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;YACtC,WAAW,EAAE,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;SACrC,CAAC,CAAA;QACF,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACjB,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;SACpC;IACL,CAAC,CAAA;IAEO,UAAU,GAAG,CAAC,IAAgB,EAAE,EAAE;QACtC,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC;QAC1C,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;QAClC,UAAU,CAAC,GAAG,EAAE;YACZ,IAAI,OAAO;gBAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC;QACrE,CAAC,EAAE,GAAG,CAAC,CAAC;IACZ,CAAC,CAAA;CACJ"}
|
|
@@ -1,10 +1,81 @@
|
|
|
1
1
|
import { Behaviour } from "../Component.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* [CursorFollow](https://engine.needle.tools/docs/api/CursorFollow) makes an object smoothly follow the cursor or touch position in 3D space.
|
|
4
|
+
* The component tracks pointer movement and updates the object's position to follow it, with optional damping for smooth motion.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
+
* 
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
+
* **How It Works:**
|
|
9
|
+
* The component creates a ray from the camera through the cursor position and places the object along that ray.
|
|
10
|
+
* By default, it maintains the object's initial distance from the camera, creating a natural cursor-following effect
|
|
11
|
+
* that works consistently regardless of camera movement.
|
|
12
|
+
*
|
|
13
|
+
* **Key Features:**
|
|
14
|
+
* - Smooth cursor following with configurable damping
|
|
15
|
+
* - Works with both mouse and touch input
|
|
16
|
+
* - Can follow cursor across the entire page or just within the canvas
|
|
17
|
+
* - Maintains consistent distance from camera by default
|
|
18
|
+
* - Optional surface snapping using raycasts
|
|
19
|
+
* - Responds to camera movement automatically
|
|
20
|
+
*
|
|
21
|
+
* **Common Use Cases:**
|
|
22
|
+
* - Interactive 3D cursors or pointers
|
|
23
|
+
* - Look-at effects combined with {@link LookAtConstraint}
|
|
24
|
+
* - Floating UI elements that track cursor
|
|
25
|
+
* - Interactive product showcases
|
|
26
|
+
* - 3D header effects and hero sections
|
|
27
|
+
* - Virtual laser pointers in XR experiences
|
|
28
|
+
*
|
|
29
|
+
* @example Basic cursor follow with smooth damping
|
|
30
|
+
* ```ts
|
|
31
|
+
* const follower = new Object3D();
|
|
32
|
+
* follower.position.set(0, 0, -5); // Initial position 5 units from camera
|
|
33
|
+
* follower.addComponent(CursorFollow, {
|
|
34
|
+
* damping: 0.2, // Smooth following with 200ms damping
|
|
35
|
+
* keepDistance: true, // Maintain initial distance
|
|
36
|
+
* useFullPage: true // Track cursor across entire page
|
|
37
|
+
* });
|
|
38
|
+
* scene.add(follower);
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @example Surface-snapping cursor with raycast
|
|
42
|
+
* ```ts
|
|
43
|
+
* const cursor = new Object3D();
|
|
44
|
+
* cursor.addComponent(CursorFollow, {
|
|
45
|
+
* snapToSurface: true, // Snap to surfaces in the scene
|
|
46
|
+
* keepDistance: false, // Don't maintain distance when snapping
|
|
47
|
+
* damping: 0.1 // Quick, responsive movement
|
|
48
|
+
* });
|
|
49
|
+
* scene.add(cursor);
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example Instant cursor following (no damping)
|
|
53
|
+
* ```ts
|
|
54
|
+
* gameObject.addComponent(CursorFollow, {
|
|
55
|
+
* damping: 0, // Instant movement
|
|
56
|
+
* useFullPage: false // Only track within canvas
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @example Interactive 3D header that looks at cursor
|
|
61
|
+
* ```ts
|
|
62
|
+
* const character = loadModel("character.glb");
|
|
63
|
+
* const lookTarget = new Object3D();
|
|
64
|
+
* lookTarget.addComponent(CursorFollow, { damping: 0.3 });
|
|
65
|
+
* character.addComponent(LookAtConstraint, { target: lookTarget });
|
|
66
|
+
* scene.add(lookTarget, character);
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* - Example: [Look At Cursor sample](https://engine.needle.tools/samples/look-at-cursor-interactive-3d-header/) - Combines CursorFollow with LookAt for an interactive 3D header
|
|
70
|
+
*
|
|
71
|
+
* @see {@link LookAtConstraint} - Commonly combined with CursorFollow for look-at effects
|
|
72
|
+
* @see {@link PointerEvents} - For more complex pointer interaction handling
|
|
73
|
+
* @see {@link DragControls} - For dragging objects in 3D space
|
|
74
|
+
* @see {@link OrbitControls} - For camera controls that work alongside CursorFollow
|
|
75
|
+
* @see {@link Context.input} - The input system that provides cursor position
|
|
76
|
+
* @see {@link Context.physics.raycastFromRay} - Used when snapToSurface is enabled
|
|
77
|
+
*
|
|
78
|
+
* @summary Makes objects follow the cursor/touch position in 3D space
|
|
8
79
|
* @category Interactivity
|
|
9
80
|
* @group Components
|
|
10
81
|
* @component
|
|
@@ -12,25 +83,118 @@ import { Behaviour } from "../Component.js";
|
|
|
12
83
|
export declare class CursorFollow extends Behaviour {
|
|
13
84
|
static readonly NAME = "CursorFollow";
|
|
14
85
|
/**
|
|
15
|
-
* Damping
|
|
86
|
+
* Damping factor controlling how smoothly the object follows the cursor (in seconds).
|
|
87
|
+
*
|
|
88
|
+
* This value determines the "lag" or smoothness of the following motion:
|
|
89
|
+
* - `0`: Instant movement, no damping (object snaps directly to cursor position)
|
|
90
|
+
* - `0.1-0.2`: Quick, responsive following with slight smoothing
|
|
91
|
+
* - `0.3-0.5`: Noticeable smooth trailing effect
|
|
92
|
+
* - `1.0+`: Slow, heavily damped movement
|
|
93
|
+
*
|
|
94
|
+
* The damping uses delta time, so the movement speed is framerate-independent and
|
|
95
|
+
* provides consistent behavior across different devices.
|
|
96
|
+
*
|
|
97
|
+
* **Tip:** For look-at effects, values between 0.2-0.4 typically feel most natural.
|
|
98
|
+
* For cursor indicators, 0.1 or less provides better responsiveness.
|
|
99
|
+
*
|
|
16
100
|
* @default 0
|
|
17
101
|
*/
|
|
18
102
|
damping: number;
|
|
19
103
|
/**
|
|
20
|
-
*
|
|
104
|
+
* Whether the object should track the cursor across the entire webpage or only within the canvas.
|
|
105
|
+
*
|
|
106
|
+
* **When `true` (default):**
|
|
107
|
+
* - The object follows the cursor anywhere on the page, even outside the canvas bounds
|
|
108
|
+
* - Perfect for look-at effects where you want continuous tracking
|
|
109
|
+
* - Great for embedded 3D elements that should feel aware of the whole page
|
|
110
|
+
* - Example: A 3D character in a hero section that watches the cursor as you scroll
|
|
111
|
+
*
|
|
112
|
+
* **When `false`:**
|
|
113
|
+
* - The object only follows the cursor when it's inside the Needle Engine canvas
|
|
114
|
+
* - Useful for contained experiences where the 3D element shouldn't react to external cursor movement
|
|
115
|
+
* - Better for multi-canvas scenarios or when you want isolated 3D interactions
|
|
116
|
+
*
|
|
117
|
+
* **Note:** When enabled, the component listens to `window.pointermove` events to track the
|
|
118
|
+
* full-page cursor position. When disabled, it uses the context's input system which is
|
|
119
|
+
* canvas-relative.
|
|
120
|
+
*
|
|
121
|
+
* @see {@link Context.input.mousePositionRC} for canvas-relative cursor position
|
|
21
122
|
* @default true
|
|
22
123
|
*/
|
|
23
124
|
useFullPage: boolean;
|
|
24
125
|
/**
|
|
25
|
-
*
|
|
126
|
+
* Whether to maintain the object's initial distance from the camera while following the cursor.
|
|
127
|
+
*
|
|
128
|
+
* **When `true` (default):**
|
|
129
|
+
* - The object stays at a constant distance from the camera, moving in a spherical arc around it
|
|
130
|
+
* - Creates a natural "floating at cursor position" effect
|
|
131
|
+
* - The object's depth remains consistent as you move the cursor around
|
|
132
|
+
* - Perfect for cursors, pointers, or look-at targets
|
|
133
|
+
*
|
|
134
|
+
* **When `false`:**
|
|
135
|
+
* - The object's distance can change based on where the cursor projects in 3D space
|
|
136
|
+
* - More useful when combined with {@link snapToSurface} to follow surface geometry
|
|
137
|
+
* - Can create unusual depth behavior if not carefully configured
|
|
138
|
+
*
|
|
139
|
+
* **How it works:**
|
|
140
|
+
* On the first update, the component measures the distance from the object to the camera.
|
|
141
|
+
* This initial distance is then maintained throughout the object's lifetime (unless {@link updateDistance} is called).
|
|
142
|
+
* The object moves along a ray from the camera through the cursor, staying at this fixed distance.
|
|
143
|
+
*
|
|
144
|
+
* @see {@link updateDistance} to manually recalculate the distance
|
|
26
145
|
* @default true
|
|
27
146
|
*/
|
|
28
147
|
keepDistance: boolean;
|
|
29
148
|
/**
|
|
30
|
-
*
|
|
149
|
+
* When enabled, the object snaps to the surfaces of other objects in the scene using raycasting.
|
|
150
|
+
*
|
|
151
|
+
* **How it works:**
|
|
152
|
+
* After positioning the object at the cursor location, a raycast is performed backwards toward the camera.
|
|
153
|
+
* If the ray hits any surface, the object is moved to that hit point, effectively "snapping" to the surface.
|
|
154
|
+
*
|
|
155
|
+
* **Use cases:**
|
|
156
|
+
* - 3D paint or decal placement tools
|
|
157
|
+
* - Surface markers or waypoints
|
|
158
|
+
* - Interactive object placement in AR/VR
|
|
159
|
+
* - Cursor that follows terrain or mesh surfaces
|
|
160
|
+
*
|
|
161
|
+
* **Important notes:**
|
|
162
|
+
* - Requires objects in the scene to have colliders for raycasting to work
|
|
163
|
+
* - Works best with {@link keepDistance} set to `false` to allow depth changes
|
|
164
|
+
* - Can be combined with {@link damping} for smooth surface following
|
|
165
|
+
* - The raycast uses the physics system's raycast functionality
|
|
166
|
+
*
|
|
167
|
+
* **Debug mode:**
|
|
168
|
+
* Add `?debugcursor` to your URL to visualize the raycast hits with green debug lines.
|
|
169
|
+
*
|
|
170
|
+
* @see {@link Context.physics.raycastFromRay} for the underlying raycast implementation
|
|
171
|
+
* @see {@link keepDistance} should typically be false when using surface snapping
|
|
172
|
+
* @default false
|
|
31
173
|
*/
|
|
32
174
|
snapToSurface: boolean;
|
|
33
175
|
private _distance;
|
|
176
|
+
/**
|
|
177
|
+
* Manually recalculates the distance between the object and the camera.
|
|
178
|
+
*
|
|
179
|
+
* By default, the distance is calculated once when the component starts and then maintained
|
|
180
|
+
* when {@link keepDistance} is enabled. Use this method to update the reference distance
|
|
181
|
+
* if the camera or object has moved significantly.
|
|
182
|
+
*
|
|
183
|
+
* **Use cases:**
|
|
184
|
+
* - After teleporting the camera or object
|
|
185
|
+
* - When switching between different camera positions
|
|
186
|
+
* - After zoom operations that change the desired following distance
|
|
187
|
+
* - Dynamically adjusting the cursor's depth in response to user input
|
|
188
|
+
*
|
|
189
|
+
* @param force - If `true`, forces a recalculation even if {@link keepDistance} is enabled and distance was already set
|
|
190
|
+
*
|
|
191
|
+
* @example Recalculate distance after camera movement
|
|
192
|
+
* ```ts
|
|
193
|
+
* const cursorFollow = gameObject.getComponent(CursorFollow);
|
|
194
|
+
* camera.position.set(0, 0, 10); // Move camera
|
|
195
|
+
* cursorFollow?.updateDistance(true); // Update the reference distance
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
34
198
|
updateDistance(force?: boolean): void;
|
|
35
199
|
/** @internal */
|
|
36
200
|
awake(): void;
|
|
@@ -12,11 +12,82 @@ import { getParam } from "../../engine/engine_utils.js";
|
|
|
12
12
|
import { Behaviour } from "../Component.js";
|
|
13
13
|
const debug = getParam("debugcursor");
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* [CursorFollow](https://engine.needle.tools/docs/api/CursorFollow) makes an object smoothly follow the cursor or touch position in 3D space.
|
|
16
|
+
* The component tracks pointer movement and updates the object's position to follow it, with optional damping for smooth motion.
|
|
16
17
|
*
|
|
17
|
-
*
|
|
18
|
+
* 
|
|
18
19
|
*
|
|
19
|
-
*
|
|
20
|
+
* **How It Works:**
|
|
21
|
+
* The component creates a ray from the camera through the cursor position and places the object along that ray.
|
|
22
|
+
* By default, it maintains the object's initial distance from the camera, creating a natural cursor-following effect
|
|
23
|
+
* that works consistently regardless of camera movement.
|
|
24
|
+
*
|
|
25
|
+
* **Key Features:**
|
|
26
|
+
* - Smooth cursor following with configurable damping
|
|
27
|
+
* - Works with both mouse and touch input
|
|
28
|
+
* - Can follow cursor across the entire page or just within the canvas
|
|
29
|
+
* - Maintains consistent distance from camera by default
|
|
30
|
+
* - Optional surface snapping using raycasts
|
|
31
|
+
* - Responds to camera movement automatically
|
|
32
|
+
*
|
|
33
|
+
* **Common Use Cases:**
|
|
34
|
+
* - Interactive 3D cursors or pointers
|
|
35
|
+
* - Look-at effects combined with {@link LookAtConstraint}
|
|
36
|
+
* - Floating UI elements that track cursor
|
|
37
|
+
* - Interactive product showcases
|
|
38
|
+
* - 3D header effects and hero sections
|
|
39
|
+
* - Virtual laser pointers in XR experiences
|
|
40
|
+
*
|
|
41
|
+
* @example Basic cursor follow with smooth damping
|
|
42
|
+
* ```ts
|
|
43
|
+
* const follower = new Object3D();
|
|
44
|
+
* follower.position.set(0, 0, -5); // Initial position 5 units from camera
|
|
45
|
+
* follower.addComponent(CursorFollow, {
|
|
46
|
+
* damping: 0.2, // Smooth following with 200ms damping
|
|
47
|
+
* keepDistance: true, // Maintain initial distance
|
|
48
|
+
* useFullPage: true // Track cursor across entire page
|
|
49
|
+
* });
|
|
50
|
+
* scene.add(follower);
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @example Surface-snapping cursor with raycast
|
|
54
|
+
* ```ts
|
|
55
|
+
* const cursor = new Object3D();
|
|
56
|
+
* cursor.addComponent(CursorFollow, {
|
|
57
|
+
* snapToSurface: true, // Snap to surfaces in the scene
|
|
58
|
+
* keepDistance: false, // Don't maintain distance when snapping
|
|
59
|
+
* damping: 0.1 // Quick, responsive movement
|
|
60
|
+
* });
|
|
61
|
+
* scene.add(cursor);
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @example Instant cursor following (no damping)
|
|
65
|
+
* ```ts
|
|
66
|
+
* gameObject.addComponent(CursorFollow, {
|
|
67
|
+
* damping: 0, // Instant movement
|
|
68
|
+
* useFullPage: false // Only track within canvas
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @example Interactive 3D header that looks at cursor
|
|
73
|
+
* ```ts
|
|
74
|
+
* const character = loadModel("character.glb");
|
|
75
|
+
* const lookTarget = new Object3D();
|
|
76
|
+
* lookTarget.addComponent(CursorFollow, { damping: 0.3 });
|
|
77
|
+
* character.addComponent(LookAtConstraint, { target: lookTarget });
|
|
78
|
+
* scene.add(lookTarget, character);
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* - Example: [Look At Cursor sample](https://engine.needle.tools/samples/look-at-cursor-interactive-3d-header/) - Combines CursorFollow with LookAt for an interactive 3D header
|
|
82
|
+
*
|
|
83
|
+
* @see {@link LookAtConstraint} - Commonly combined with CursorFollow for look-at effects
|
|
84
|
+
* @see {@link PointerEvents} - For more complex pointer interaction handling
|
|
85
|
+
* @see {@link DragControls} - For dragging objects in 3D space
|
|
86
|
+
* @see {@link OrbitControls} - For camera controls that work alongside CursorFollow
|
|
87
|
+
* @see {@link Context.input} - The input system that provides cursor position
|
|
88
|
+
* @see {@link Context.physics.raycastFromRay} - Used when snapToSurface is enabled
|
|
89
|
+
*
|
|
90
|
+
* @summary Makes objects follow the cursor/touch position in 3D space
|
|
20
91
|
* @category Interactivity
|
|
21
92
|
* @group Components
|
|
22
93
|
* @component
|
|
@@ -25,25 +96,118 @@ export class CursorFollow extends Behaviour {
|
|
|
25
96
|
// testing this for compilation
|
|
26
97
|
static NAME = "CursorFollow";
|
|
27
98
|
/**
|
|
28
|
-
* Damping
|
|
99
|
+
* Damping factor controlling how smoothly the object follows the cursor (in seconds).
|
|
100
|
+
*
|
|
101
|
+
* This value determines the "lag" or smoothness of the following motion:
|
|
102
|
+
* - `0`: Instant movement, no damping (object snaps directly to cursor position)
|
|
103
|
+
* - `0.1-0.2`: Quick, responsive following with slight smoothing
|
|
104
|
+
* - `0.3-0.5`: Noticeable smooth trailing effect
|
|
105
|
+
* - `1.0+`: Slow, heavily damped movement
|
|
106
|
+
*
|
|
107
|
+
* The damping uses delta time, so the movement speed is framerate-independent and
|
|
108
|
+
* provides consistent behavior across different devices.
|
|
109
|
+
*
|
|
110
|
+
* **Tip:** For look-at effects, values between 0.2-0.4 typically feel most natural.
|
|
111
|
+
* For cursor indicators, 0.1 or less provides better responsiveness.
|
|
112
|
+
*
|
|
29
113
|
* @default 0
|
|
30
114
|
*/
|
|
31
115
|
damping = 0;
|
|
32
116
|
/**
|
|
33
|
-
*
|
|
117
|
+
* Whether the object should track the cursor across the entire webpage or only within the canvas.
|
|
118
|
+
*
|
|
119
|
+
* **When `true` (default):**
|
|
120
|
+
* - The object follows the cursor anywhere on the page, even outside the canvas bounds
|
|
121
|
+
* - Perfect for look-at effects where you want continuous tracking
|
|
122
|
+
* - Great for embedded 3D elements that should feel aware of the whole page
|
|
123
|
+
* - Example: A 3D character in a hero section that watches the cursor as you scroll
|
|
124
|
+
*
|
|
125
|
+
* **When `false`:**
|
|
126
|
+
* - The object only follows the cursor when it's inside the Needle Engine canvas
|
|
127
|
+
* - Useful for contained experiences where the 3D element shouldn't react to external cursor movement
|
|
128
|
+
* - Better for multi-canvas scenarios or when you want isolated 3D interactions
|
|
129
|
+
*
|
|
130
|
+
* **Note:** When enabled, the component listens to `window.pointermove` events to track the
|
|
131
|
+
* full-page cursor position. When disabled, it uses the context's input system which is
|
|
132
|
+
* canvas-relative.
|
|
133
|
+
*
|
|
134
|
+
* @see {@link Context.input.mousePositionRC} for canvas-relative cursor position
|
|
34
135
|
* @default true
|
|
35
136
|
*/
|
|
36
137
|
useFullPage = true;
|
|
37
138
|
/**
|
|
38
|
-
*
|
|
139
|
+
* Whether to maintain the object's initial distance from the camera while following the cursor.
|
|
140
|
+
*
|
|
141
|
+
* **When `true` (default):**
|
|
142
|
+
* - The object stays at a constant distance from the camera, moving in a spherical arc around it
|
|
143
|
+
* - Creates a natural "floating at cursor position" effect
|
|
144
|
+
* - The object's depth remains consistent as you move the cursor around
|
|
145
|
+
* - Perfect for cursors, pointers, or look-at targets
|
|
146
|
+
*
|
|
147
|
+
* **When `false`:**
|
|
148
|
+
* - The object's distance can change based on where the cursor projects in 3D space
|
|
149
|
+
* - More useful when combined with {@link snapToSurface} to follow surface geometry
|
|
150
|
+
* - Can create unusual depth behavior if not carefully configured
|
|
151
|
+
*
|
|
152
|
+
* **How it works:**
|
|
153
|
+
* On the first update, the component measures the distance from the object to the camera.
|
|
154
|
+
* This initial distance is then maintained throughout the object's lifetime (unless {@link updateDistance} is called).
|
|
155
|
+
* The object moves along a ray from the camera through the cursor, staying at this fixed distance.
|
|
156
|
+
*
|
|
157
|
+
* @see {@link updateDistance} to manually recalculate the distance
|
|
39
158
|
* @default true
|
|
40
159
|
*/
|
|
41
160
|
keepDistance = true;
|
|
42
161
|
/**
|
|
43
|
-
*
|
|
162
|
+
* When enabled, the object snaps to the surfaces of other objects in the scene using raycasting.
|
|
163
|
+
*
|
|
164
|
+
* **How it works:**
|
|
165
|
+
* After positioning the object at the cursor location, a raycast is performed backwards toward the camera.
|
|
166
|
+
* If the ray hits any surface, the object is moved to that hit point, effectively "snapping" to the surface.
|
|
167
|
+
*
|
|
168
|
+
* **Use cases:**
|
|
169
|
+
* - 3D paint or decal placement tools
|
|
170
|
+
* - Surface markers or waypoints
|
|
171
|
+
* - Interactive object placement in AR/VR
|
|
172
|
+
* - Cursor that follows terrain or mesh surfaces
|
|
173
|
+
*
|
|
174
|
+
* **Important notes:**
|
|
175
|
+
* - Requires objects in the scene to have colliders for raycasting to work
|
|
176
|
+
* - Works best with {@link keepDistance} set to `false` to allow depth changes
|
|
177
|
+
* - Can be combined with {@link damping} for smooth surface following
|
|
178
|
+
* - The raycast uses the physics system's raycast functionality
|
|
179
|
+
*
|
|
180
|
+
* **Debug mode:**
|
|
181
|
+
* Add `?debugcursor` to your URL to visualize the raycast hits with green debug lines.
|
|
182
|
+
*
|
|
183
|
+
* @see {@link Context.physics.raycastFromRay} for the underlying raycast implementation
|
|
184
|
+
* @see {@link keepDistance} should typically be false when using surface snapping
|
|
185
|
+
* @default false
|
|
44
186
|
*/
|
|
45
187
|
snapToSurface = false;
|
|
46
188
|
_distance = -1;
|
|
189
|
+
/**
|
|
190
|
+
* Manually recalculates the distance between the object and the camera.
|
|
191
|
+
*
|
|
192
|
+
* By default, the distance is calculated once when the component starts and then maintained
|
|
193
|
+
* when {@link keepDistance} is enabled. Use this method to update the reference distance
|
|
194
|
+
* if the camera or object has moved significantly.
|
|
195
|
+
*
|
|
196
|
+
* **Use cases:**
|
|
197
|
+
* - After teleporting the camera or object
|
|
198
|
+
* - When switching between different camera positions
|
|
199
|
+
* - After zoom operations that change the desired following distance
|
|
200
|
+
* - Dynamically adjusting the cursor's depth in response to user input
|
|
201
|
+
*
|
|
202
|
+
* @param force - If `true`, forces a recalculation even if {@link keepDistance} is enabled and distance was already set
|
|
203
|
+
*
|
|
204
|
+
* @example Recalculate distance after camera movement
|
|
205
|
+
* ```ts
|
|
206
|
+
* const cursorFollow = gameObject.getComponent(CursorFollow);
|
|
207
|
+
* camera.position.set(0, 0, 10); // Move camera
|
|
208
|
+
* cursorFollow?.updateDistance(true); // Update the reference distance
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
47
211
|
updateDistance(force = false) {
|
|
48
212
|
if (!force && (this.keepDistance && this._distance !== -1)) {
|
|
49
213
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CursorFollow.js","sourceRoot":"","sources":["../../../src/engine-components/web/CursorFollow.ts"],"names":[],"mappings":";;;;;;AAAA,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