@needle-tools/engine 4.13.0 → 4.13.1-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -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-6774fXoY.min.js} +107 -107
- package/dist/{needle-engine.bundle-Dl3TFYyv.js → needle-engine.bundle-CGtsEhyJ.js} +2346 -1844
- package/dist/{needle-engine.bundle-J4k4znv8.umd.cjs → needle-engine.bundle-fbFZTOKP.umd.cjs} +108 -108
- package/dist/needle-engine.d.ts +3769 -397
- 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 +35 -1
- package/lib/engine/engine_physics.js +35 -1
- package/lib/engine/engine_physics.js.map +1 -1
- package/lib/engine/engine_physics_rapier.d.ts +76 -0
- package/lib/engine/engine_physics_rapier.js +76 -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 +26 -6
- package/lib/engine-components/ContactShadows.js +31 -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 +38 -10
- 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 +34 -0
- package/lib/engine-components/Renderer.js +35 -2
- package/lib/engine-components/Renderer.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 +38 -6
- package/lib/engine-components/ScreenCapture.js +38 -6
- package/lib/engine-components/ScreenCapture.js.map +1 -1
- package/lib/engine-components/Skybox.d.ts +1 -1
- package/lib/engine-components/Skybox.js +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 +99 -14
- package/lib/engine-components/timeline/PlayableDirector.js +91 -25
- package/lib/engine-components/timeline/PlayableDirector.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 +37 -1
- package/src/engine/engine_physics_rapier.ts +77 -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 +36 -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 +41 -13
- 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 +34 -1
- package/src/engine-components/SceneSwitcher.ts +11 -0
- package/src/engine-components/ScreenCapture.ts +41 -9
- package/src/engine-components/Skybox.ts +1 -1
- 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 +104 -27
- 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
|
@@ -11,39 +11,168 @@ import { registerType } from "../../engine/engine_typestore.js";
|
|
|
11
11
|
import { Animation } from "../Animation.js";
|
|
12
12
|
import { Behaviour } from "../Component.js";
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* [HoverAnimation](https://engine.needle.tools/docs/api/HoverAnimation) plays animations in response to pointer hover events on the object this component is attached to.
|
|
15
|
+
* The component automatically detects when the mouse pointer or touch enters/exits the object or any of its children, triggering the corresponding animations.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
+
* **How It Works:**
|
|
18
|
+
* The component listens to pointer enter and exit events and switches between two animation states:
|
|
19
|
+
* - **Hover state**: Plays when the pointer enters the object (default: scale up to 110%)
|
|
20
|
+
* - **Idle state**: Plays when the pointer exits the object (default: returns to original scale)
|
|
17
21
|
*
|
|
18
|
-
*
|
|
22
|
+
* **Default Behavior:**
|
|
23
|
+
* If no custom animation clips are provided, the component automatically creates a smooth scale-up animation using the
|
|
24
|
+
* {@link type}, {@link duration}, and {@link scaleFactor} properties. This provides instant hover feedback without
|
|
25
|
+
* requiring any animation setup.
|
|
26
|
+
*
|
|
27
|
+
* **Custom Animations:**
|
|
28
|
+
* You can provide your own animation clips for complete control over the hover effect. This allows you to create
|
|
29
|
+
* complex animations involving position, rotation, color changes, or any other animated property.
|
|
30
|
+
*
|
|
31
|
+
* **Common Use Cases:**
|
|
32
|
+
* - Interactive buttons with scale feedback
|
|
33
|
+
* - Product showcases with highlight animations
|
|
34
|
+
* - Menu items with hover effects
|
|
35
|
+
* - Interactive 3D objects in AR/VR experiences
|
|
36
|
+
* - Call-to-action elements with attention-grabbing animations
|
|
37
|
+
*
|
|
38
|
+
* @example Basic usage with default scale animation
|
|
39
|
+
* ```ts
|
|
40
|
+
* const button = new Object3D();
|
|
41
|
+
* button.addComponent(HoverAnimation, {
|
|
42
|
+
* scaleFactor: 1.2, // Scale to 120% on hover
|
|
43
|
+
* duration: 0.2, // 200ms animation
|
|
44
|
+
* type: "ease-in-out" // Smooth easing
|
|
45
|
+
* });
|
|
46
|
+
* scene.add(button);
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @example Custom hover animations
|
|
50
|
+
* ```ts
|
|
51
|
+
* const obj = new Object3D();
|
|
52
|
+
* const hoverAnim = loadAnimationClip("hover-glow.anim");
|
|
53
|
+
* const idleAnim = loadAnimationClip("idle-pulse.anim");
|
|
54
|
+
*
|
|
55
|
+
* obj.addComponent(HoverAnimation, {
|
|
56
|
+
* hovered: hoverAnim, // Custom hover animation
|
|
57
|
+
* idle: idleAnim // Custom idle animation
|
|
58
|
+
* });
|
|
59
|
+
* scene.add(obj);
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @example Quick scale animation with custom settings
|
|
63
|
+
* ```ts
|
|
64
|
+
* gameObject.addComponent(HoverAnimation, {
|
|
65
|
+
* scaleFactor: 1.15,
|
|
66
|
+
* duration: 0.15,
|
|
67
|
+
* type: "ease-out"
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @see {@link Animation} - The underlying animation component used to play clips
|
|
72
|
+
* @see {@link AnimationClip} - For creating custom animation clips
|
|
73
|
+
* @see {@link AnimationUtils} - Utility functions for creating animations programmatically
|
|
74
|
+
* @see {@link ScaleClipType} - Available easing types for the default scale animation
|
|
75
|
+
* @see {@link ObjectRaycaster} - Controls which objects receive pointer events
|
|
76
|
+
* @see {@link PointerEvents} - For more complex pointer interaction handling
|
|
77
|
+
*
|
|
78
|
+
* @summary Plays animations on pointer hover enter/exit events
|
|
19
79
|
* @category Interactivity
|
|
20
80
|
* @group Components
|
|
81
|
+
* @component
|
|
21
82
|
*/
|
|
22
83
|
let HoverAnimation = class HoverAnimation extends Behaviour {
|
|
23
84
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
85
|
+
* The easing type for the default scale animation.
|
|
86
|
+
*
|
|
87
|
+
* This property controls how the scale animation interpolates from the start to end value.
|
|
88
|
+
* Different easing types create different "feels" for the hover effect.
|
|
89
|
+
*
|
|
90
|
+
* **Available types:**
|
|
91
|
+
* - `"linear"`: Constant speed throughout the animation
|
|
92
|
+
* - `"ease-in"`: Starts slow, ends fast
|
|
93
|
+
* - `"ease-out"`: Starts fast, ends slow (good for responsive feel)
|
|
94
|
+
* - `"ease-in-out"`: Starts slow, fast in middle, ends slow (smooth and natural)
|
|
95
|
+
*
|
|
96
|
+
* **Note:** This is only used when no custom {@link hovered} animation clip is provided.
|
|
97
|
+
* If you provide a custom animation clip, this property is ignored.
|
|
98
|
+
*
|
|
99
|
+
* @see {@link ScaleClipType} for all available easing types
|
|
26
100
|
* @default "linear"
|
|
27
101
|
*/
|
|
28
102
|
type = "linear";
|
|
29
103
|
/**
|
|
30
|
-
* Duration of the hover animation in seconds.
|
|
31
|
-
*
|
|
104
|
+
* Duration of the default hover animation in seconds.
|
|
105
|
+
*
|
|
106
|
+
* This controls how long it takes for the object to scale up when hovered.
|
|
107
|
+
* Shorter durations feel more responsive, while longer durations feel smoother.
|
|
108
|
+
*
|
|
109
|
+
* **Recommendations:**
|
|
110
|
+
* - `0.1-0.15s`: Snappy, responsive feel (good for buttons)
|
|
111
|
+
* - `0.2-0.3s`: Smooth, noticeable animation
|
|
112
|
+
* - `0.4s+`: Slow, emphasized effect
|
|
113
|
+
*
|
|
114
|
+
* **Note:** This is only used when no custom {@link hovered} animation clip is provided.
|
|
115
|
+
* If you provide a custom animation clip, this property is ignored.
|
|
116
|
+
*
|
|
32
117
|
* @default 0.1
|
|
33
118
|
*/
|
|
34
119
|
duration = 0.1;
|
|
35
120
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
121
|
+
* The scale multiplier to apply when the object is hovered.
|
|
122
|
+
*
|
|
123
|
+
* This value is multiplied with the object's original scale to determine the hover size.
|
|
124
|
+
* A value of `1.0` means no change, values greater than `1.0` scale up, and values less than `1.0` scale down.
|
|
125
|
+
*
|
|
126
|
+
* **Examples:**
|
|
127
|
+
* - `1.0`: No scale change
|
|
128
|
+
* - `1.1`: Scale to 110% (subtle effect, default)
|
|
129
|
+
* - `1.2`: Scale to 120% (noticeable effect)
|
|
130
|
+
* - `1.5`: Scale to 150% (dramatic effect)
|
|
131
|
+
* - `0.9`: Scale to 90% (shrink on hover)
|
|
132
|
+
*
|
|
133
|
+
* **Note:** This is only used when no custom {@link hovered} animation clip is provided.
|
|
134
|
+
* If you provide a custom animation clip, this property is ignored.
|
|
135
|
+
*
|
|
38
136
|
* @default 1.1
|
|
39
137
|
*/
|
|
40
138
|
scaleFactor = 1.1;
|
|
41
139
|
/**
|
|
42
|
-
*
|
|
140
|
+
* Custom animation clip to play when the pointer hovers over the object.
|
|
141
|
+
*
|
|
142
|
+
* If `null`, the component automatically generates a scale-up animation based on the
|
|
143
|
+
* {@link type}, {@link duration}, and {@link scaleFactor} properties.
|
|
144
|
+
*
|
|
145
|
+
* Provide a custom animation clip if you want more complex hover effects such as:
|
|
146
|
+
* - Color changes or material property animations
|
|
147
|
+
* - Position or rotation changes
|
|
148
|
+
* - Multi-property animations
|
|
149
|
+
* - Animations affecting child objects
|
|
150
|
+
*
|
|
151
|
+
* **Tip:** The animation plays with a 0.1s fade duration for smooth transitions.
|
|
152
|
+
*
|
|
153
|
+
* @see {@link AnimationClip} for creating custom animation clips
|
|
154
|
+
* @see {@link AnimationUtils.createScaleClip} for programmatically creating scale animations
|
|
155
|
+
* @default null (generates default scale animation)
|
|
43
156
|
*/
|
|
44
157
|
hovered = null;
|
|
45
158
|
/**
|
|
46
|
-
*
|
|
159
|
+
* Custom animation clip to play when the pointer is not hovering over the object (idle state).
|
|
160
|
+
*
|
|
161
|
+
* If `null`, an empty animation clip is used, which returns the object to its original state
|
|
162
|
+
* when the hover animation ends.
|
|
163
|
+
*
|
|
164
|
+
* You can provide a custom idle animation for effects such as:
|
|
165
|
+
* - Subtle breathing or floating motion when not hovered
|
|
166
|
+
* - Pulsing or glowing effects in idle state
|
|
167
|
+
* - Return-to-normal animations with custom easing
|
|
168
|
+
* - Looping ambient animations
|
|
169
|
+
*
|
|
170
|
+
* **Tip:** The idle animation is played with `loop: true`, so it will repeat continuously
|
|
171
|
+
* until the object is hovered again.
|
|
172
|
+
*
|
|
173
|
+
* @see {@link AnimationClip} for creating custom animation clips
|
|
174
|
+
* @see {@link AnimationUtils.emptyClip} to see how the default empty clip is created
|
|
175
|
+
* @default null (uses empty clip that returns to original state)
|
|
47
176
|
*/
|
|
48
177
|
idle = null;
|
|
49
178
|
animation = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoverAnimation.js","sourceRoot":"","sources":["../../../src/engine-components/web/HoverAnimation.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C
|
|
1
|
+
{"version":3,"file":"HoverAnimation.js","sourceRoot":"","sources":["../../../src/engine-components/web/HoverAnimation.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO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AzGzB,cAAc;IAD1B,YAAY;GACA,cAAc,CAsJ1B;SAtJY,cAAc"}
|
|
@@ -13,10 +13,13 @@ type ScrollFollowEvent = {
|
|
|
13
13
|
defaultPrevented: boolean;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* The ScrollFollow component allows you to link the scroll position of the page (or a specific element) to one or more target objects.
|
|
16
|
+
* The [ScrollFollow](https://engine.needle.tools/docs/api/ScrollFollow) component allows you to link the scroll position of the page (or a specific element) to one or more target objects.
|
|
17
17
|
|
|
18
18
|
* This can be used to create scroll-based animations, audio playback, or other effects. For example you can link the scroll position to a timeline (PlayableDirector) to create scroll-based storytelling effects or to an Animator component to change the animation state based on scroll.
|
|
19
19
|
*
|
|
20
|
+
* 
|
|
21
|
+
* 
|
|
22
|
+
*
|
|
20
23
|
* Assign {@link target} objects to the component to have them updated based on the current scroll position (check the 'target' property for supported types).
|
|
21
24
|
*
|
|
22
25
|
* @link Example at https://scrollytelling-2-z23hmxby7c6x-u30ld.needle.run/
|
|
@@ -22,10 +22,13 @@ import { SplineWalker } from "../splines/SplineWalker.js";
|
|
|
22
22
|
import { PlayableDirector } from "../timeline/PlayableDirector.js";
|
|
23
23
|
const debug = getParam("debugscroll");
|
|
24
24
|
/**
|
|
25
|
-
* The ScrollFollow component allows you to link the scroll position of the page (or a specific element) to one or more target objects.
|
|
25
|
+
* The [ScrollFollow](https://engine.needle.tools/docs/api/ScrollFollow) component allows you to link the scroll position of the page (or a specific element) to one or more target objects.
|
|
26
26
|
|
|
27
27
|
* This can be used to create scroll-based animations, audio playback, or other effects. For example you can link the scroll position to a timeline (PlayableDirector) to create scroll-based storytelling effects or to an Animator component to change the animation state based on scroll.
|
|
28
28
|
*
|
|
29
|
+
* 
|
|
30
|
+
* 
|
|
31
|
+
*
|
|
29
32
|
* Assign {@link target} objects to the component to have them updated based on the current scroll position (check the 'target' property for supported types).
|
|
30
33
|
*
|
|
31
34
|
* @link Example at https://scrollytelling-2-z23hmxby7c6x-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AyB,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC;AAGD,yBAAyB;AAEzB,SAAS,mCAAmC,CAAC,QAAsB;IAC/D,IAAI,CAAC,QAAQ,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;IACzC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;IACnC,IAAI,aAAa,GAAG,CAAC,CAAC;IACtB,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE;QAC7B,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;KAClC;SACI,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE;QAClC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;KAClC;IACD,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;IAC7G,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -1,21 +1,82 @@
|
|
|
1
1
|
import { Behaviour } from "../Component.js";
|
|
2
|
+
/**
|
|
3
|
+
* Defines how the {@link ViewBox} component applies camera framing adjustments.
|
|
4
|
+
*
|
|
5
|
+
* - `"continuous"`: Camera framing is continuously updated while the ViewBox is active. Use for animated or dynamic ViewBoxes.
|
|
6
|
+
* - `"once"`: Camera framing is applied once when the ViewBox becomes active, then updates stop. Use for initial framing with subsequent user control.
|
|
7
|
+
*/
|
|
2
8
|
export type ViewBoxMode = "continuous" | "once";
|
|
3
9
|
/**
|
|
4
|
-
*
|
|
5
|
-
* This is useful for
|
|
10
|
+
* [ViewBox](https://engine.needle.tools/docs/api/ViewBox) automatically fits a defined box area into the camera view regardless of screen size or aspect ratio.
|
|
11
|
+
* This component is useful for framing characters, objects, or scenes in the center of the view while ensuring they remain fully visible.
|
|
12
|
+
* You can animate or scale the viewbox to create dynamic zoom effects, cinematic transitions, or responsive framing.
|
|
13
|
+
*
|
|
14
|
+
* [](https://engine.needle.tools/samples/bike-scrollytelling-responsive-3d)
|
|
15
|
+
*
|
|
16
|
+
* The ViewBox component works by adjusting the camera's focus rect settings (offset and zoom) to ensure that the box defined by the
|
|
17
|
+
* GameObject's position, rotation, and scale fits perfectly within the visible viewport. It supports different modes for one-time
|
|
18
|
+
* fitting or continuous adjustment, making it versatile for both static compositions and animated sequences.
|
|
19
|
+
*
|
|
20
|
+
* **Key Features:**
|
|
21
|
+
* - Automatically adjusts camera framing to fit the box area
|
|
22
|
+
* - Works with any screen size and aspect ratio
|
|
23
|
+
* - Supports one-time fitting or continuous updates
|
|
24
|
+
* - Can be animated for dynamic zoom and framing effects
|
|
25
|
+
* - Multiple ViewBoxes can be active, with the most recently enabled taking priority
|
|
26
|
+
* - Handles camera positioning to ensure the box is visible (moves camera if inside the box)
|
|
27
|
+
*
|
|
28
|
+
* **Common Use Cases:**
|
|
29
|
+
* - Character framing in cutscenes or dialogue
|
|
30
|
+
* - Product showcases with guaranteed visibility
|
|
31
|
+
* - Scrollytelling experiences with animated camera movements
|
|
32
|
+
* - Responsive layouts that adapt to different screen sizes
|
|
33
|
+
* - UI-driven camera transitions
|
|
6
34
|
*
|
|
7
35
|
* - [Example on needle.run](https://viewbox-demo-z23hmxbz2gkayo-z1nyzm6.needle.run/)
|
|
8
36
|
* - [Scrollytelling Demo using animated Viewbox](https://scrollytelling-bike-z23hmxb2gnu5a.needle.run/)
|
|
9
37
|
* - [Example on Stackblitz](https://stackblitz.com/edit/needle-engine-view-box-example)
|
|
10
38
|
*
|
|
11
|
-
* @example Add a
|
|
39
|
+
* @example Basic setup - Add a ViewBox component to frame an object
|
|
40
|
+
* ```ts
|
|
41
|
+
* const viewBox = new Object3D();
|
|
42
|
+
* viewBox.position.set(0, 1, 0); // Position the viewbox center
|
|
43
|
+
* viewBox.scale.set(2, 2, 2); // Define the box size
|
|
44
|
+
* viewBox.addComponent(ViewBox, { debug: true });
|
|
45
|
+
* scene.add(viewBox);
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example Animated ViewBox for zoom effects
|
|
49
|
+
* ```ts
|
|
50
|
+
* const viewBox = new Object3D();
|
|
51
|
+
* viewBox.addComponent(ViewBox, { mode: "continuous" });
|
|
52
|
+
* scene.add(viewBox);
|
|
53
|
+
*
|
|
54
|
+
* // Animate the viewbox scale over time
|
|
55
|
+
* function update() {
|
|
56
|
+
* const scale = 1 + Math.sin(Date.now() * 0.001) * 0.5;
|
|
57
|
+
* viewBox.scale.setScalar(scale);
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @example One-time fitting with user control afterwards
|
|
12
62
|
* ```ts
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
63
|
+
* const viewBox = new Object3D();
|
|
64
|
+
* viewBox.addComponent(ViewBox, {
|
|
65
|
+
* mode: "once", // Fit once, then allow free camera control
|
|
66
|
+
* referenceFieldOfView: 60
|
|
67
|
+
* });
|
|
68
|
+
* scene.add(viewBox);
|
|
17
69
|
* ```
|
|
18
|
-
|
|
70
|
+
*
|
|
71
|
+
* @see {@link Camera} - The camera component that ViewBox controls
|
|
72
|
+
* @see {@link OrbitControls} - Camera controls that work alongside ViewBox
|
|
73
|
+
* @see {@link DragControls} - Alternative camera controls compatible with ViewBox
|
|
74
|
+
* @see {@link LookAtConstraint} - Another way to control camera targeting
|
|
75
|
+
* @see {@link SceneSwitcher} - Can be combined with ViewBox for scene transitions
|
|
76
|
+
* @see {@link Context.setCameraFocusRect} - The underlying focus rect API used by ViewBox
|
|
77
|
+
* @see {@link Context.focusRectSettings} - Manual control of focus rect settings
|
|
78
|
+
* @see {@link ViewBoxMode} - The mode type for controlling ViewBox behavior
|
|
79
|
+
*
|
|
19
80
|
* @summary Automatically fits a box area into the camera view
|
|
20
81
|
* @category Camera and Controls
|
|
21
82
|
* @group Components
|
|
@@ -23,25 +84,64 @@ export type ViewBoxMode = "continuous" | "once";
|
|
|
23
84
|
*/
|
|
24
85
|
export declare class ViewBox extends Behaviour {
|
|
25
86
|
/**
|
|
26
|
-
*
|
|
87
|
+
* Array of all active ViewBox instances in the scene.
|
|
88
|
+
* When multiple ViewBoxes are enabled, the last one in the array (most recently enabled) takes priority and controls the camera.
|
|
89
|
+
* Other ViewBoxes remain registered but inactive, displayed with a dimmed gizmo color when debug visualization is enabled.
|
|
27
90
|
*/
|
|
28
91
|
static readonly instances: ViewBox[];
|
|
29
92
|
/**
|
|
30
|
-
* The reference field of view
|
|
31
|
-
*
|
|
93
|
+
* The reference field of view (in degrees) used to calculate how the box should fit within the camera view.
|
|
94
|
+
* This determines the baseline camera FOV for fitting calculations.
|
|
95
|
+
*
|
|
96
|
+
* **Behavior:**
|
|
97
|
+
* - If set to `-1` (default), the component will automatically use the camera's FOV on the first frame
|
|
98
|
+
* - Should typically match your camera's FOV for predictable framing
|
|
99
|
+
* - Can be set to a different value to create specific framing effects
|
|
100
|
+
*
|
|
101
|
+
* **Example:**
|
|
102
|
+
* If your camera has an FOV of 60° and you set `referenceFieldOfView` to 60, the ViewBox will fit objects
|
|
103
|
+
* as they would appear with that field of view. Setting it to a wider FOV (e.g., 90) makes objects appear
|
|
104
|
+
* smaller, while a narrower FOV (e.g., 30) makes them appear larger.
|
|
105
|
+
*
|
|
106
|
+
* @see {@link Camera} for the camera component and its FOV property
|
|
107
|
+
* @default -1 (automatically uses the camera's FOV on the first frame)
|
|
32
108
|
*/
|
|
33
109
|
referenceFieldOfView: number;
|
|
34
110
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* - "
|
|
111
|
+
* Controls how the ViewBox applies camera adjustments.
|
|
112
|
+
*
|
|
113
|
+
* **Modes:**
|
|
114
|
+
* - `"once"`: Applies the framing adjustment once when the ViewBox becomes active, then stops updating.
|
|
115
|
+
* This is ideal when you want to frame the view initially but allow users to freely zoom, pan, or orbit afterwards.
|
|
116
|
+
* Perfect for interactive scenes where you want a good starting view but full user control.
|
|
117
|
+
*
|
|
118
|
+
* - `"continuous"`: Continuously updates the camera framing while this ViewBox is active.
|
|
119
|
+
* Use this when animating or scaling the ViewBox over time, or when you need the framing to constantly adjust.
|
|
120
|
+
* Great for cutscenes, scrollytelling, or any scenario with animated ViewBoxes.
|
|
121
|
+
*
|
|
122
|
+
* **Example Use Cases:**
|
|
123
|
+
* - Set to `"once"` for: Initial scene framing, product showcases where users explore freely after initial framing
|
|
124
|
+
* - Set to `"continuous"` for: Animated zoom effects, scrollytelling sequences, dynamic camera movements tied to ViewBox transforms
|
|
125
|
+
*
|
|
126
|
+
* @see {@link ViewBoxMode} for the type definition
|
|
127
|
+
* @default "continuous"
|
|
39
128
|
*/
|
|
40
129
|
get mode(): ViewBoxMode;
|
|
41
130
|
set mode(v: ViewBoxMode);
|
|
42
131
|
private _mode;
|
|
43
132
|
/**
|
|
44
|
-
*
|
|
133
|
+
* Enables debug visualization and logging for this ViewBox instance.
|
|
134
|
+
*
|
|
135
|
+
* **When enabled, you will see:**
|
|
136
|
+
* - A yellow wireframe box showing the active ViewBox bounds in 3D space
|
|
137
|
+
* - Gray wireframe boxes for inactive ViewBox instances
|
|
138
|
+
* - A red dashed outline on screen showing the projected box in 2D (when using `?debugviewbox` URL parameter)
|
|
139
|
+
* - Console logs for mode changes, FOV settings, and camera adjustments
|
|
140
|
+
*
|
|
141
|
+
* **Tip:** You can also enable debug visualization globally for all ViewBoxes by adding `?debugviewbox` to your URL.
|
|
142
|
+
*
|
|
143
|
+
* @see {@link Gizmos} for the gizmo rendering system used for debug visualization
|
|
144
|
+
* @default false
|
|
45
145
|
*/
|
|
46
146
|
debug: boolean;
|
|
47
147
|
/** @internal */
|
|
@@ -17,21 +17,76 @@ import { Behaviour } from "../Component.js";
|
|
|
17
17
|
const debugParam = getParam("debugviewbox");
|
|
18
18
|
const disabledGizmoColor = new RGBAColor(.5, .5, .5, .5);
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
* This is useful for
|
|
20
|
+
* [ViewBox](https://engine.needle.tools/docs/api/ViewBox) automatically fits a defined box area into the camera view regardless of screen size or aspect ratio.
|
|
21
|
+
* This component is useful for framing characters, objects, or scenes in the center of the view while ensuring they remain fully visible.
|
|
22
|
+
* You can animate or scale the viewbox to create dynamic zoom effects, cinematic transitions, or responsive framing.
|
|
23
|
+
*
|
|
24
|
+
* [](https://engine.needle.tools/samples/bike-scrollytelling-responsive-3d)
|
|
25
|
+
*
|
|
26
|
+
* The ViewBox component works by adjusting the camera's focus rect settings (offset and zoom) to ensure that the box defined by the
|
|
27
|
+
* GameObject's position, rotation, and scale fits perfectly within the visible viewport. It supports different modes for one-time
|
|
28
|
+
* fitting or continuous adjustment, making it versatile for both static compositions and animated sequences.
|
|
29
|
+
*
|
|
30
|
+
* **Key Features:**
|
|
31
|
+
* - Automatically adjusts camera framing to fit the box area
|
|
32
|
+
* - Works with any screen size and aspect ratio
|
|
33
|
+
* - Supports one-time fitting or continuous updates
|
|
34
|
+
* - Can be animated for dynamic zoom and framing effects
|
|
35
|
+
* - Multiple ViewBoxes can be active, with the most recently enabled taking priority
|
|
36
|
+
* - Handles camera positioning to ensure the box is visible (moves camera if inside the box)
|
|
37
|
+
*
|
|
38
|
+
* **Common Use Cases:**
|
|
39
|
+
* - Character framing in cutscenes or dialogue
|
|
40
|
+
* - Product showcases with guaranteed visibility
|
|
41
|
+
* - Scrollytelling experiences with animated camera movements
|
|
42
|
+
* - Responsive layouts that adapt to different screen sizes
|
|
43
|
+
* - UI-driven camera transitions
|
|
22
44
|
*
|
|
23
45
|
* - [Example on needle.run](https://viewbox-demo-z23hmxbz2gkayo-z1nyzm6.needle.run/)
|
|
24
46
|
* - [Scrollytelling Demo using animated Viewbox](https://scrollytelling-bike-z23hmxb2gnu5a.needle.run/)
|
|
25
47
|
* - [Example on Stackblitz](https://stackblitz.com/edit/needle-engine-view-box-example)
|
|
26
48
|
*
|
|
27
|
-
* @example Add a
|
|
49
|
+
* @example Basic setup - Add a ViewBox component to frame an object
|
|
28
50
|
* ```ts
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
51
|
+
* const viewBox = new Object3D();
|
|
52
|
+
* viewBox.position.set(0, 1, 0); // Position the viewbox center
|
|
53
|
+
* viewBox.scale.set(2, 2, 2); // Define the box size
|
|
54
|
+
* viewBox.addComponent(ViewBox, { debug: true });
|
|
55
|
+
* scene.add(viewBox);
|
|
33
56
|
* ```
|
|
34
|
-
|
|
57
|
+
*
|
|
58
|
+
* @example Animated ViewBox for zoom effects
|
|
59
|
+
* ```ts
|
|
60
|
+
* const viewBox = new Object3D();
|
|
61
|
+
* viewBox.addComponent(ViewBox, { mode: "continuous" });
|
|
62
|
+
* scene.add(viewBox);
|
|
63
|
+
*
|
|
64
|
+
* // Animate the viewbox scale over time
|
|
65
|
+
* function update() {
|
|
66
|
+
* const scale = 1 + Math.sin(Date.now() * 0.001) * 0.5;
|
|
67
|
+
* viewBox.scale.setScalar(scale);
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @example One-time fitting with user control afterwards
|
|
72
|
+
* ```ts
|
|
73
|
+
* const viewBox = new Object3D();
|
|
74
|
+
* viewBox.addComponent(ViewBox, {
|
|
75
|
+
* mode: "once", // Fit once, then allow free camera control
|
|
76
|
+
* referenceFieldOfView: 60
|
|
77
|
+
* });
|
|
78
|
+
* scene.add(viewBox);
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @see {@link Camera} - The camera component that ViewBox controls
|
|
82
|
+
* @see {@link OrbitControls} - Camera controls that work alongside ViewBox
|
|
83
|
+
* @see {@link DragControls} - Alternative camera controls compatible with ViewBox
|
|
84
|
+
* @see {@link LookAtConstraint} - Another way to control camera targeting
|
|
85
|
+
* @see {@link SceneSwitcher} - Can be combined with ViewBox for scene transitions
|
|
86
|
+
* @see {@link Context.setCameraFocusRect} - The underlying focus rect API used by ViewBox
|
|
87
|
+
* @see {@link Context.focusRectSettings} - Manual control of focus rect settings
|
|
88
|
+
* @see {@link ViewBoxMode} - The mode type for controlling ViewBox behavior
|
|
89
|
+
*
|
|
35
90
|
* @summary Automatically fits a box area into the camera view
|
|
36
91
|
* @category Camera and Controls
|
|
37
92
|
* @group Components
|
|
@@ -39,19 +94,47 @@ const disabledGizmoColor = new RGBAColor(.5, .5, .5, .5);
|
|
|
39
94
|
*/
|
|
40
95
|
let ViewBox = ViewBox_1 = class ViewBox extends Behaviour {
|
|
41
96
|
/**
|
|
42
|
-
*
|
|
97
|
+
* Array of all active ViewBox instances in the scene.
|
|
98
|
+
* When multiple ViewBoxes are enabled, the last one in the array (most recently enabled) takes priority and controls the camera.
|
|
99
|
+
* Other ViewBoxes remain registered but inactive, displayed with a dimmed gizmo color when debug visualization is enabled.
|
|
43
100
|
*/
|
|
44
101
|
static instances = [];
|
|
45
102
|
/**
|
|
46
|
-
* The reference field of view
|
|
47
|
-
*
|
|
103
|
+
* The reference field of view (in degrees) used to calculate how the box should fit within the camera view.
|
|
104
|
+
* This determines the baseline camera FOV for fitting calculations.
|
|
105
|
+
*
|
|
106
|
+
* **Behavior:**
|
|
107
|
+
* - If set to `-1` (default), the component will automatically use the camera's FOV on the first frame
|
|
108
|
+
* - Should typically match your camera's FOV for predictable framing
|
|
109
|
+
* - Can be set to a different value to create specific framing effects
|
|
110
|
+
*
|
|
111
|
+
* **Example:**
|
|
112
|
+
* If your camera has an FOV of 60° and you set `referenceFieldOfView` to 60, the ViewBox will fit objects
|
|
113
|
+
* as they would appear with that field of view. Setting it to a wider FOV (e.g., 90) makes objects appear
|
|
114
|
+
* smaller, while a narrower FOV (e.g., 30) makes them appear larger.
|
|
115
|
+
*
|
|
116
|
+
* @see {@link Camera} for the camera component and its FOV property
|
|
117
|
+
* @default -1 (automatically uses the camera's FOV on the first frame)
|
|
48
118
|
*/
|
|
49
119
|
referenceFieldOfView = -1;
|
|
50
120
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* - "
|
|
121
|
+
* Controls how the ViewBox applies camera adjustments.
|
|
122
|
+
*
|
|
123
|
+
* **Modes:**
|
|
124
|
+
* - `"once"`: Applies the framing adjustment once when the ViewBox becomes active, then stops updating.
|
|
125
|
+
* This is ideal when you want to frame the view initially but allow users to freely zoom, pan, or orbit afterwards.
|
|
126
|
+
* Perfect for interactive scenes where you want a good starting view but full user control.
|
|
127
|
+
*
|
|
128
|
+
* - `"continuous"`: Continuously updates the camera framing while this ViewBox is active.
|
|
129
|
+
* Use this when animating or scaling the ViewBox over time, or when you need the framing to constantly adjust.
|
|
130
|
+
* Great for cutscenes, scrollytelling, or any scenario with animated ViewBoxes.
|
|
131
|
+
*
|
|
132
|
+
* **Example Use Cases:**
|
|
133
|
+
* - Set to `"once"` for: Initial scene framing, product showcases where users explore freely after initial framing
|
|
134
|
+
* - Set to `"continuous"` for: Animated zoom effects, scrollytelling sequences, dynamic camera movements tied to ViewBox transforms
|
|
135
|
+
*
|
|
136
|
+
* @see {@link ViewBoxMode} for the type definition
|
|
137
|
+
* @default "continuous"
|
|
55
138
|
*/
|
|
56
139
|
get mode() { return this._mode; }
|
|
57
140
|
set mode(v) {
|
|
@@ -65,7 +148,18 @@ let ViewBox = ViewBox_1 = class ViewBox extends Behaviour {
|
|
|
65
148
|
}
|
|
66
149
|
_mode = "continuous";
|
|
67
150
|
/**
|
|
68
|
-
*
|
|
151
|
+
* Enables debug visualization and logging for this ViewBox instance.
|
|
152
|
+
*
|
|
153
|
+
* **When enabled, you will see:**
|
|
154
|
+
* - A yellow wireframe box showing the active ViewBox bounds in 3D space
|
|
155
|
+
* - Gray wireframe boxes for inactive ViewBox instances
|
|
156
|
+
* - A red dashed outline on screen showing the projected box in 2D (when using `?debugviewbox` URL parameter)
|
|
157
|
+
* - Console logs for mode changes, FOV settings, and camera adjustments
|
|
158
|
+
*
|
|
159
|
+
* **Tip:** You can also enable debug visualization globally for all ViewBoxes by adding `?debugviewbox` to your URL.
|
|
160
|
+
*
|
|
161
|
+
* @see {@link Gizmos} for the gizmo rendering system used for debug visualization
|
|
162
|
+
* @default false
|
|
69
163
|
*/
|
|
70
164
|
debug = false;
|
|
71
165
|
/** @internal */
|