docs
Getting Started
Tutorials
How-To Guides
Explanation
Reference
Help
Getting Started
Tutorials
How-To Guides
Explanation
Reference
Help

Needle Core Components

Built-in components that map to Unity, Blender, and three.js functionality.

Complete Reference

For the full API documentation, see engine.needle.tools/docs/api

Custom Components

You can always create your own components or add wrappers for components we haven't provided yet.

Learn scripting • For Unity Developers

🔊 Audio

ComponentDescription
AudioListenerReceives audio in the scene (attach to camera)
AudioSourcePlays audio clips with spatial audio support

🎬 Animation

ComponentDescription
AnimatorState machine with AnimatorController, transitions, and conditions
AnimationBasic animation playback (single clip)
PlayableDirectorTimeline sequences for animation, audio, state control

📷 Camera & Controls

ComponentDescription
CameraScene rendering viewpoint (perspective/orthographic)
OrbitControlsRotate, zoom, and pan around target • Sample
ViewBoxDefines visible area bounds

🎨 Rendering

ComponentDescription
LightDirectional, Point, Spot lights with shadow support and baking
MeshRendererRenders meshes with lightmapping and instancing
SkinnedMeshRendererRenders animated/deformable meshes
SpriteRendererRenders 2D sprites and animations • Sample
ParticleSystemParticle effects system • Sample
VideoPlayerVideo playback, streaming (MediaStream, M3U8) • Sample
XRFlagControl visibility by mode (VR/AR/Desktop)
DeviceFlagControl visibility by device type
GroundProjectionProject environment texture on ground • Sample
SeeThroughFade objects obscuring view • Sample
ShadowCatcherInvisible shadow receiver • Sample
ContactShadowsRealtime contact shadows • Sample
VolumePost-processing effects (see below) • Sample

Postprocessing

Postprocessing effects use the pmndrs postprocessing library under the hood. This means you can also easily add your own custom effects and get an automatically optimized postprocessing pass.

For Unity Users

For Needle Engine Postprocessing in Unity you need to use URP (Universal Render Pipeline)

VolumeAdd effects below
Effects
Antialiasingextra Unity Component
BloomEffectvia Volume asset
Chromatic Aberrationvia Volume asset
Color Adjustments / Color Correctionvia Volume asset
Depth Of Fieldvia Volume asset
Tilt Shift Effectvia Volume asset or separate component
Vignettevia Volume asset
ToneMappingEffectvia Volume asset or separate component
PixelationEffectvia Volume asset or separate component
Screenspace Ambient Occlusion N8via Volume asset or separate component
Screenspace Ambient Occlusionvia Volume asset or separate component
SharpeningEffectvia Volume asset or separate component
Your custom effectExample on Stackblitz, Example in docs

🌐 Networking & Multiplayer

ComponentDescription
SyncedRoomEnable multiplayer networking (required for all networked features)
NetworkingConfigure custom backend server (defaults to Needle servers)
SyncedTransformSync object position, rotation, scale across clients
SyncedCameraSync camera view to other users with custom rendering
PlayerSyncInstantiate object per connected user (avatars, etc.)
VoipVoice chat with spatial audio • Sample
ScreenCaptureScreen sharing capabilities • Sample

🖱️ Interaction

ComponentDescription
DragControlsDrag objects in scene (requires raycaster in parent, e.g. ObjectRaycaster)
DuplicatableDuplicate objects by dragging (requires DragControls)
OrbitControlsCamera orbit, zoom, and pan controls
SmoothFollowSmooth interpolation to another object's transform
DeleteBoxDestroys Deletable objects entering the box
DeletableObject can be deleted when entering DeleteBox
DropListenerReceive file drop events for uploads
SpatialTriggerRaise events when objects enter space/area
SpatialTriggerReceiverReceive events from SpatialTrigger
CursorFollowMake object follow cursor • Sample
ScrollFollowBind scroll to animations/timeline • Sample
HoverAnimationAnimate on hover

RapierPhysics

Powered by Rapier physics engine.

ComponentDescription
RigidbodyPhysical body with gravity, mass, drag (dynamic/kinematic/static)
BoxColliderBox-shaped collision volume
SphereColliderSphere-shaped collision volume
CapsuleColliderCapsule-shaped collision volume
MeshColliderComplex collision matching mesh geometry
Physics MaterialsControl friction, bounciness, and other physical properties
AttractorAttract or repel rigidbodies • Sample

Colliders as Triggers

Set any collider to isTrigger = true to detect overlaps without physical collision response.

🥽 XR / WebXR

Read the full XR documentation

ComponentDescription
WebXREnable VR, AR, passthrough, and avatar rendering
USDZExporterEnable QuickLook AR on iOS (USDZ format)
WebARSessionRootAR scene placement and scale (defines center/alignment)
XRRigDefine user start position in VR
WebARCameraBackgroundAccess AR camera feed for effects/rendering
WebXRImageTrackingTrack images and instantiate objects • Sample
WebXRPlaneTrackingCreate meshes/colliders for tracked planes
XRControllerModelRender VR controllers or hand models
XRControllerMovementDefault movement and teleport controls
XRControllerFollowMake objects follow hands or controllers
XRFlagControl visibility by mode (VR/AR/FirstPerson/ThirdPerson)

🔧 Debugging

ComponentDescription
GridHelperDraws debug grid
BoxGizmoDraws debug box
AxesHelperDraws XYZ axes

Gizmos in Code

Use static Gizmos methods for drawing debug lines and shapes in your scripts. See Gizmos API

📁 Runtime File Input/Output

ComponentDescription
GltfExportExport glTF from runtime (experimental)
DropListenerReceive file drop events for uploads and networking

🖼️ UI

Spatial UI components map from Unity UI (Canvas, not UI Toolkit) to three-mesh-ui. UI can be animated.

ComponentDescription
CanvasUnity UI system (World Space mode required)
TextRender text with custom fonts (auto-generated atlas). Use Legacy/Text, not TextMeshPro
ButtonClick events with onClick. Works in 3D and UI. Use Legacy/Text for labels
ImageRenders sprite images
RawImageRenders textures
InputFieldText input field

HTML + Spatial UI

For cross-platform projects (VR, AR, desktop), mix spatial and HTML UI:

  • HTML: 2D interfaces for best accessibility
  • Spatial UI: 3D interfaces with depth (e.g., button hover states)

🔀 Scene Management

ComponentDescription
SceneSwitcherLoad/unload scenes, prefabs, glTF files with preload, swipe, keyboard, URL navigation

🛠️ Editor Only (Unity/Blender)

ComponentDescription
Needle EngineMain component for managing web project(s) (install, start, deploy)
EditorSyncSync material/component changes to runtime without reload (hot reload)

Complete API Documentation

For detailed TypeScript API documentation with all methods, properties, and types:

📖 View Complete API Reference →

The API documentation includes:

  • All component classes and their methods
  • Component lifecycle hooks
  • Event handlers and callbacks
  • Type definitions and interfaces
  • Code examples and usage patterns

Related Documentation

Learn How to Use Components

  • Create Custom Components - Build your own interactive components
  • Component Lifecycle Methods - awake, start, update, onEnable, etc.
  • Input Event Methods - Handle pointer, touch, and keyboard input
  • Physics Event Methods - Collision and trigger callbacks
  • XR Event Methods - WebXR-specific events

Integration Guides

  • Unity Integration - Using components in Unity
  • Blender Integration - Using components in Blender
  • three.js Integration - Using components in web projects

Tutorials

  • TypeScript Essentials - Learn TypeScript for components
  • For Unity Developers - Component system differences from Unity

How-To Guides

  • Handle User Input - Mouse, touch, keyboard, VR controllers
  • Enable Networking - Multiplayer and sync
  • Enable WebXR - VR and AR experiences
  • Export 3D Content - Meshes, materials, animations

Additional Reference

  • Scripting Examples - Common code patterns
  • TypeScript Decorators - @serializable and more
  • Time API - deltaTime and time management
Suggest changes
Last Updated: 1/28/26, 10:33 AM

Extras

ChatGPT Ask ChatGPT Claude Ask Claude
Copy Markdown

Navigation

  • Getting Started
  • Tutorials
  • How-To Guides
  • Explanation
  • Reference
  • Help

Extras

ChatGPT Ask ChatGPT Claude Ask Claude
Copy Markdown