@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
|
@@ -24,11 +24,20 @@ const debugProgressiveLoading = getParam("debugprogressive");
|
|
|
24
24
|
|
|
25
25
|
export type { Particle as QParticle, Behavior as QParticleBehaviour, TrailParticle as QTrailParticle } from "three.quarks"
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Defines when a sub-emitter spawns particles relative to the parent particle's lifecycle.
|
|
29
|
+
* Used to create complex effects like explosions on impact or trails following particles.
|
|
30
|
+
*/
|
|
27
31
|
export enum SubEmitterType {
|
|
32
|
+
/** Sub-emitter triggers when the parent particle is born */
|
|
28
33
|
Birth = 0,
|
|
34
|
+
/** Sub-emitter triggers when the parent particle collides */
|
|
29
35
|
Collision = 1,
|
|
36
|
+
/** Sub-emitter triggers when the parent particle dies */
|
|
30
37
|
Death = 2,
|
|
38
|
+
/** Sub-emitter triggers when the parent particle enters a trigger zone */
|
|
31
39
|
Trigger = 3,
|
|
40
|
+
/** Sub-emitter is triggered manually via code */
|
|
32
41
|
Manual = 4,
|
|
33
42
|
}
|
|
34
43
|
|
|
@@ -274,9 +283,33 @@ class ParticleSystemEmissionOverDistance extends BaseValueGenerator {
|
|
|
274
283
|
}
|
|
275
284
|
}
|
|
276
285
|
|
|
286
|
+
/**
|
|
287
|
+
* Base class for custom particle behaviors. Extend this to create custom particle logic.
|
|
288
|
+
*
|
|
289
|
+
* Override `initialize()` to set up per-particle state when particles spawn.
|
|
290
|
+
* Override `update()` to modify particles each frame (position, velocity, color, size, etc.).
|
|
291
|
+
* Override `frameUpdate()` for logic that runs once per frame (not per particle).
|
|
292
|
+
*
|
|
293
|
+
* @example Custom wind effect
|
|
294
|
+
* ```ts
|
|
295
|
+
* class WindBehaviour extends ParticleSystemBaseBehaviour {
|
|
296
|
+
* windStrength = 2;
|
|
297
|
+
* windDirection = new Vector3(1, 0, 0);
|
|
298
|
+
*
|
|
299
|
+
* update(particle: Particle, delta: number) {
|
|
300
|
+
* particle.velocity.addScaledVector(this.windDirection, this.windStrength * delta);
|
|
301
|
+
* }
|
|
302
|
+
* }
|
|
303
|
+
* ```
|
|
304
|
+
*
|
|
305
|
+
* @see {@link ParticleSystem.addBehaviour} to register your custom behavior
|
|
306
|
+
* @link https://github.com/Alchemist0823/three.quarks
|
|
307
|
+
*/
|
|
277
308
|
export abstract class ParticleSystemBaseBehaviour implements Behavior {
|
|
278
309
|
|
|
310
|
+
/** Reference to the particle system this behavior belongs to */
|
|
279
311
|
system!: ParticleSystem;
|
|
312
|
+
/** Access to the engine context for timing, input, etc. */
|
|
280
313
|
get context() { return this.system.context; }
|
|
281
314
|
|
|
282
315
|
constructor(ps?: ParticleSystem) {
|
|
@@ -285,13 +318,18 @@ export abstract class ParticleSystemBaseBehaviour implements Behavior {
|
|
|
285
318
|
this.system = ps;
|
|
286
319
|
}
|
|
287
320
|
|
|
321
|
+
/** Behavior type identifier used by three.quarks */
|
|
288
322
|
type: string;
|
|
289
323
|
|
|
324
|
+
/** Called once when a particle is spawned. Use to initialize per-particle state. */
|
|
290
325
|
initialize(_particle: Particle): void { }
|
|
326
|
+
/** Called every frame for each active particle. Use to update particle properties. */
|
|
291
327
|
update(_particle: Particle, _delta: number): void { }
|
|
328
|
+
/** Called once per frame before particle updates. Use for shared calculations. */
|
|
292
329
|
frameUpdate(_delta: number): void { }
|
|
293
330
|
toJSON() { throw new Error("Method not implemented."); }
|
|
294
331
|
clone(): Behavior { throw new Error("Method not implemented."); }
|
|
332
|
+
/** Called when the particle system is reset. */
|
|
295
333
|
reset() { }
|
|
296
334
|
}
|
|
297
335
|
|
|
@@ -686,15 +724,56 @@ class ParticlesEmissionState implements EmissionState {
|
|
|
686
724
|
}
|
|
687
725
|
|
|
688
726
|
/**
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
* You can add custom behaviours to the particle system to fully customize the behaviour of the particles. See {@link ParticleSystemBaseBehaviour} and {@link ParticleSystem.addBehaviour} for more information.
|
|
692
|
-
*
|
|
693
|
-
* Needle Engine uses [three.quarks](https://github.com/Alchemist0823/three.quarks) under the hood to handle particles.
|
|
727
|
+
* ParticleSystem efficiently handles the motion and rendering of many individual particles.
|
|
728
|
+
* Use it for visual effects like fire, smoke, sparks, rain, magic spells, and more.
|
|
694
729
|
*
|
|
730
|
+
* 
|
|
731
|
+
* 
|
|
732
|
+
*
|
|
733
|
+
* **Modules:**
|
|
734
|
+
* Configure particle behavior through modules like {@link EmissionModule}, {@link ShapeModule},
|
|
735
|
+
* {@link ColorOverLifetimeModule}, {@link SizeOverLifetimeModule}, {@link VelocityOverLifetimeModule},
|
|
736
|
+
* {@link NoiseModule}, and {@link TrailModule}.
|
|
737
|
+
*
|
|
738
|
+
* **Custom behaviors:**
|
|
739
|
+
* Add custom particle behaviors by extending {@link ParticleSystemBaseBehaviour} and
|
|
740
|
+
* calling `addBehaviour()`. This gives you full control over particle initialization and updates.
|
|
741
|
+
*
|
|
742
|
+
* **Performance:**
|
|
743
|
+
* Particles are batched together for fast, performant rendering even on low-end devices.
|
|
744
|
+
* Needle Engine uses [three.quarks](https://github.com/Alchemist0823/three.quarks) internally.
|
|
745
|
+
*
|
|
746
|
+
* @example Basic playback control
|
|
747
|
+
* ```ts
|
|
748
|
+
* const ps = myObject.getComponent(ParticleSystem);
|
|
749
|
+
* ps.play();
|
|
750
|
+
* ps.emit(10); // Emit 10 particles immediately
|
|
751
|
+
* ps.pause();
|
|
752
|
+
* ps.stop(true, true); // Stop and clear all particles
|
|
753
|
+
* ```
|
|
754
|
+
*
|
|
755
|
+
* @example Custom particle behavior
|
|
756
|
+
* ```ts
|
|
757
|
+
* class GravityBehaviour extends ParticleSystemBaseBehaviour {
|
|
758
|
+
* update(particle: Particle, delta: number) {
|
|
759
|
+
* particle.velocity.y -= 9.8 * delta;
|
|
760
|
+
* }
|
|
761
|
+
* }
|
|
762
|
+
* particleSystem.addBehaviour(new GravityBehaviour());
|
|
763
|
+
* ```
|
|
764
|
+
*
|
|
765
|
+
* - Example: https://engine.needle.tools/samples/particles
|
|
766
|
+
* - Example: https://engine.needle.tools/samples/particle-bursts
|
|
767
|
+
* - Example: https://engine.needle.tools/samples/particles-on-collision
|
|
768
|
+
*
|
|
695
769
|
* @summary Handles the motion and rendering of many individual particles
|
|
696
770
|
* @category Rendering
|
|
697
771
|
* @group Components
|
|
772
|
+
* @see {@link ParticleSystemBaseBehaviour} for custom particle behaviors
|
|
773
|
+
* @see {@link EmissionModule} for emission configuration
|
|
774
|
+
* @see {@link ShapeModule} for emission shape control
|
|
775
|
+
* @see {@link TrailModule} for particle trails
|
|
776
|
+
* @link https://engine.needle.tools/docs/features/particles.html
|
|
698
777
|
*/
|
|
699
778
|
export class ParticleSystem extends Behaviour implements IParticleSystem {
|
|
700
779
|
|
|
@@ -17,6 +17,7 @@ export enum QualityLevel {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
+
* [Antialiasing](https://engine.needle.tools/docs/api/Antialiasing) provides SMAA (Subpixel Morphological Antialiasing) post-processing effect to smooth edges in the rendered scene.
|
|
20
21
|
* @category Effects
|
|
21
22
|
* @group Components
|
|
22
23
|
*/
|
|
@@ -8,7 +8,7 @@ import { VolumeParameter } from "../VolumeParameter.js";
|
|
|
8
8
|
import { registerCustomEffectType } from "../VolumeProfile.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* [BloomEffect](https://engine.needle.tools/docs/api/BloomEffect) can be used to make bright areas in the scene glow.
|
|
12
12
|
* @link Sample https://engine.needle.tools/samples/postprocessing
|
|
13
13
|
* @example
|
|
14
14
|
* ```typescript
|
|
@@ -7,7 +7,7 @@ import { VolumeParameter } from "../VolumeParameter.js";
|
|
|
7
7
|
import { registerCustomEffectType, VolumeProfile } from "../VolumeProfile.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* [ChromaticAberration](https://engine.needle.tools/docs/api/ChromaticAberration) simulates the color fringing effect seen in real-world cameras.
|
|
11
11
|
* It offsets the red, green, and blue color channels to create a distorted, colorful edge around objects.
|
|
12
12
|
* This effect can enhance the visual appeal of scenes by adding a subtle or pronounced chromatic distortion.
|
|
13
13
|
* @summary Chromatic Aberration Post-Processing Effect
|
|
@@ -8,7 +8,7 @@ import { registerCustomEffectType } from "../VolumeProfile.js";
|
|
|
8
8
|
import { ToneMappingEffect } from "./Tonemapping.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* [ColorAdjustments](https://engine.needle.tools/docs/api/ColorAdjustments) allows you to modify the overall color properties of the rendered scene, including post-exposure, contrast, hue shift, and saturation.
|
|
12
12
|
* These adjustments can be used to enhance the visual aesthetics of the scene or to achieve specific artistic effects.
|
|
13
13
|
* @summary Color Adjustments Post-Processing Effect
|
|
14
14
|
* @category Effects
|
|
@@ -17,7 +17,7 @@ export enum DepthOfFieldMode {
|
|
|
17
17
|
const debug = getParam("debugpost");
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* [DepthOfField](https://engine.needle.tools/docs/api/DepthOfField) simulates the focusing behavior of real-world cameras by blurring objects that are outside the focal plane.
|
|
21
21
|
* This effect enhances the sense of depth in a scene by mimicking how cameras focus on subjects at varying distances, creating a more immersive visual experience.
|
|
22
22
|
* It can be adjusted to achieve different artistic effects, from subtle background blurring to pronounced bokeh effects.
|
|
23
23
|
* @summary Depth of Field Post-Processing Effect
|
|
@@ -3,6 +3,7 @@ import type { Effect } from "postprocessing";
|
|
|
3
3
|
import { EffectProviderResult, PostProcessingEffect } from "../PostProcessingEffect.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
+
* [EffectWrapper](https://engine.needle.tools/docs/api/EffectWrapper) wraps a custom postprocessing effect to integrate it with the Needle Engine post-processing pipeline.
|
|
6
7
|
*
|
|
7
8
|
* @category Effects
|
|
8
9
|
* @group Components
|
|
@@ -7,7 +7,7 @@ import { VolumeParameter } from "../VolumeParameter.js";
|
|
|
7
7
|
import { registerCustomEffectType } from "../VolumeProfile.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Pixelation effect simulates a pixelated look by enlarging pixels in the rendered scene.
|
|
10
|
+
* [PixelationEffect](https://engine.needle.tools/docs/api/PixelationEffect) Pixelation effect simulates a pixelated look by enlarging pixels in the rendered scene.
|
|
11
11
|
* This effect can be used to achieve a retro or stylized visual aesthetic, reminiscent of early video games or low-resolution graphics.
|
|
12
12
|
* @summary Pixelation Post-Processing Effect
|
|
13
13
|
* @category Effects
|
|
@@ -7,7 +7,7 @@ import { type EffectProviderResult, PostProcessingEffect } from "../PostProcessi
|
|
|
7
7
|
import { VolumeParameter } from "../VolumeParameter.js";
|
|
8
8
|
import { registerCustomEffectType } from "../VolumeProfile.js";
|
|
9
9
|
|
|
10
|
-
/**
|
|
10
|
+
/** [ScreenSpaceAmbientOcclusion](https://engine.needle.tools/docs/api/ScreenSpaceAmbientOcclusion) is a screenspace ambient occlusion post-processing effect.
|
|
11
11
|
* We recommend using ScreenSpaceAmbientOcclusionN8 instead.
|
|
12
12
|
* @category Effects
|
|
13
13
|
* @group Components
|
|
@@ -22,7 +22,7 @@ export enum ScreenSpaceAmbientOcclusionN8QualityMode {
|
|
|
22
22
|
Ultra = 4,
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
/**
|
|
25
|
+
/** [ScreenSpaceAmbientOcclusionN8](https://engine.needle.tools/docs/api/ScreenSpaceAmbientOcclusionN8) is a screen space ambient occlusion (SSAO) effect.
|
|
26
26
|
* Ambient Occlusion is a shading method used to calculate how exposed each point in a scene is to ambient lighting.
|
|
27
27
|
* The effect enhances the depth and realism of 3D scenes by simulating the soft shadows that occur in crevices, corners, and areas where objects are close to each other.
|
|
28
28
|
* This implementation uses the N8AO library to provide high-quality SSAO with various quality settings.
|
|
@@ -14,7 +14,7 @@ import { PostProcessingEffectOrder } from "../utils.js";
|
|
|
14
14
|
// }
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Sharpening effect enhances the details and edges in the rendered scene by increasing the contrast between adjacent pixels.
|
|
17
|
+
* [SharpeningEffect](https://engine.needle.tools/docs/api/SharpeningEffect) Sharpening effect enhances the details and edges in the rendered scene by increasing the contrast between adjacent pixels.
|
|
18
18
|
* This effect can make textures and fine details appear clearer and more defined, improving the overall visual quality of the scene.
|
|
19
19
|
* It is particularly useful in scenes where details may be lost due to blurriness or low resolution.
|
|
20
20
|
* @summary Sharpening Post-Processing Effect
|
|
@@ -5,7 +5,7 @@ import { VolumeParameter } from "../VolumeParameter.js";
|
|
|
5
5
|
import { registerCustomEffectType } from "../VolumeProfile.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Tilt Shift effect simulates a miniature scene by applying a selective focus blur to the rendered image.
|
|
8
|
+
* [TiltShiftEffect](https://engine.needle.tools/docs/api/TiltShiftEffect) Tilt Shift effect simulates a miniature scene by applying a selective focus blur to the rendered image.
|
|
9
9
|
* This effect creates a shallow depth of field, making real-world scenes appear as if they are small-scale models.
|
|
10
10
|
* It is often used in photography and cinematography to draw attention to specific areas of the scene while blurring out the rest.
|
|
11
11
|
* @summary Tilt Shift Post-Processing Effect
|
|
@@ -14,7 +14,7 @@ const debug = getParam("debugpost");
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* [ToneMappingEffect](https://engine.needle.tools/docs/api/ToneMappingEffect) adjusts the brightness and contrast of the rendered scene to map high dynamic range (HDR) colors to a displayable range.
|
|
18
18
|
* This effect is essential for achieving realistic lighting and color representation in 3D scenes, as it helps to preserve details in both bright and dark areas.
|
|
19
19
|
* Various tonemapping algorithms can be applied to achieve different visual styles and effects.
|
|
20
20
|
* @summary Tonemapping Post-Processing Effect
|
|
@@ -7,7 +7,7 @@ import { VolumeParameter } from "../VolumeParameter.js";
|
|
|
7
7
|
import { registerCustomEffectType } from "../VolumeProfile.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Vignette
|
|
10
|
+
* [Vignette](https://engine.needle.tools/docs/api/Vignette) darkens the edges of the rendered scene to draw attention to the center.
|
|
11
11
|
* This effect simulates the natural vignetting that occurs in photography and cinematography, where the corners of an image are darker than the center.
|
|
12
12
|
* It can be used to enhance the visual focus on the main subject of the scene and create a more immersive viewing experience.
|
|
13
13
|
* @summary Vignette Post-Processing Effect
|
|
@@ -24,7 +24,7 @@ const autoclearSetting = Symbol("needle:previous-autoclear-state");
|
|
|
24
24
|
const previousToneMapping = Symbol("needle:previous-tone-mapping");
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* PostProcessingHandler
|
|
27
|
+
* [PostProcessingHandler](https://engine.needle.tools/docs/api/PostProcessingHandler) Is responsible for applying post processing effects to the scene. It is internally used by the {@link Volume} component
|
|
28
28
|
*/
|
|
29
29
|
export class PostProcessingHandler {
|
|
30
30
|
|
|
@@ -16,7 +16,7 @@ import { VolumeProfile } from "./VolumeProfile.js";
|
|
|
16
16
|
const debug = getParam("debugpost");
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
/** The Volume/PostprocessingManager component is responsible for managing post processing effects.
|
|
19
|
+
/** [Volume](https://engine.needle.tools/docs/api/Volume) The Volume/PostprocessingManager component is responsible for managing post processing effects.
|
|
20
20
|
* Add this component to any object in your scene to enable post processing effects.
|
|
21
21
|
*
|
|
22
22
|
* @example Add bloom
|