Needle Core Components
Complete catalog of 100+ built-in components for audio, animation, physics, networking, XR, UI, and more - ready to use in your projects.
Built-in components that map to Unity, Blender, and three.js functionality.
:::tip Complete Reference For the full API documentation, see engine.needle.tools/docs/api :::
:::tip 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
Receives audio in the scene (attach to camera)
Plays audio clips with spatial audio support
🎬 Animation
State machine with AnimatorController, transitions, and conditions
Basic animation playback (single clip)
Timeline sequences for animation, audio, state control
📷 Camera & Controls
Scene rendering viewpoint (perspective/orthographic)
Rotate, zoom, and pan around target • Sample
Defines visible area bounds
🎨 Rendering
Directional, Point, Spot lights with shadow support and baking
Renders meshes with lightmapping and instancing
Renders animated/deformable meshes
Renders 2D sprites and animations • Sample
Particle effects system • Sample
Video playback, streaming (MediaStream, M3U8) • Sample
Control visibility by mode (VR/AR/Desktop)
Control visibility by device type
Project environment texture on ground • Sample
Fade objects obscuring view • Sample
Invisible shadow receiver • Sample
Realtime contact shadows • 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.
:::tip For Unity Users For Needle Engine Postprocessing in Unity you need to use URP (Universal Render Pipeline) :::
Add effects below
Effects
extra Unity Component
via Volume asset
via Volume asset
via Volume asset
via Volume asset
via Volume asset or separate component
via Volume asset
via Volume asset or separate component
via Volume asset or separate component
via Volume asset or separate component
via Volume asset or separate component
via Volume asset or separate component
Your custom effect
🌐 Networking & Multiplayer
Enable multiplayer networking (required for all networked features)
Configure custom backend server (defaults to Needle servers)
Sync object position, rotation, scale across clients
Sync camera view to other users with custom rendering
Instantiate object per connected user (avatars, etc.)
Screen sharing capabilities • Sample
🖱️ Interaction
Drag objects in scene (requires raycaster in parent, e.g. ObjectRaycaster)
Duplicate objects by dragging (requires DragControls)
Camera orbit, zoom, and pan controls
Smooth interpolation to another object's transform
Destroys Deletable objects entering the box
Object can be deleted when entering DeleteBox
Receive file drop events for uploads
Raise events when objects enter space/area
Receive events from SpatialTrigger
Make object follow cursor • Sample
Bind scroll to animations/timeline • Sample
Animate on hover
Physics
Powered by Rapier physics engine.
Physical body with gravity, mass, drag (dynamic/kinematic/static)
Box-shaped collision volume
Sphere-shaped collision volume
Capsule-shaped collision volume
Complex collision matching mesh geometry
Physics Materials
Control friction, bounciness, and other physical properties
:::tip Colliders as Triggers Set any collider to isTrigger = true to detect overlaps without physical collision response. :::
🥽 XR / WebXR
Read the full XR documentation
Enable VR, AR, passthrough, and avatar rendering
Enable QuickLook AR on iOS (USDZ format)
AR scene placement and scale (defines center/alignment)
Define user start position in VR
Access AR camera feed for effects/rendering
Track images and instantiate objects • Sample
Create meshes/colliders for tracked planes
Render VR controllers or hand models
Default movement and teleport controls
Make objects follow hands or controllers
Control visibility by mode (VR/AR/FirstPerson/ThirdPerson)
🔧 Debugging
:::tip Gizmos in Code Use static Gizmos methods for drawing debug lines and shapes in your scripts. See Gizmos API :::
📁 Runtime File Input/Output
Export glTF from runtime (experimental)
Receive 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.
:::tip 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
Load/unload scenes, prefabs, glTF files with preload, swipe, keyboard, URL navigation
🛠️ Editor Only (Unity/Blender)
Needle Engine
Main component for managing web project(s) (install, start, deploy)
EditorSync
Sync 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
Last updated