Needle Engine 5.1.0
Highlights
Scene Bindings β Fully Typed Scenes (preview)
Your glTF and GLB scenes now come with auto-generated TypeScript types. Access nodes, components, and properties with full autocomplete and type checking via ctx.sceneData or the new needle shorthand β no configuration required. Types regenerate automatically whenever your scene files change, and it works with local files, remote URLs, and Needle Cloud assets alike.
const cam = ctx.sceneData.MyScene.MainCamera.$object; // THREE.PerspectiveCamera
const orbit = ctx.sceneData.MyScene.MainCamera.$components.OrbitControls; // typed!
orbit.autoRotate = true;
First-Class Framework Support (preview)
Needle Engine now feels at home in any modern web stack. SSR support lets you import the engine in SvelteKit, Next.js, and Nuxt without crashes, JSX type declarations bring full autocomplete to React, Preact, SolidJS, and friends, and the new needle shorthand gives you instant access to the current context from anywhere β components, button handlers, or plain JavaScript.
import { needle } from "@needle-tools/engine";
needle.scene.traverse(obj => { ... }); // access the three.js scene
needle.renderer; // access the WebGLRenderer
Embed Anywhere with <needle-app>
Drop a published Needle Engine app into any web page with a single element β no build setup, custom code, or framework required. It handles cross-origin loading for you and works inside iframes.
<needle-app src="https://your-app.needle.run"></needle-app>
Animation & Timelines from Code (preview)
A new set of builder APIs lets you create animations, animator controllers, and timelines entirely in code, with typed keyframes and inline track definitions. Great for procedural content, runtime-generated sequences, and tooling.
const timeline = TimelineBuilder.create("MyTimeline")
.animationTrack("Walk", animator).clip(walkClip, { duration: 2 })
.activationTrack("FX", vfxObject).activate({ start: 1, duration: 0.5 })
.build();
director.playableAsset = timeline;
A More Powerful Compression Pipeline
The build pipeline gets a major upgrade with new ways to shrink your builds automatically. Audio compression turns heavy WAV files into compact, web-friendly clips, and HDRi β PMREM (FastHDR) compression converts environment maps into a format that loads up to 10Γ faster and uses a fraction of the GPU memory β all on top of the existing Draco/meshopt geometry and KTX2 texture compression. Smaller downloads, faster loads, no manual work.
DragControls β A Big Upgrade
DragControls received a major overhaul with a new constraint system: keep-scale, two-touch scaling with min/max limits, refined hit regions, and a dedicated screen-space drag mode for AR. Single-touch dragging is now more predictable, and reliability is improved across snapping, side views, and multi-input scenarios.
MaterialX β Faster & Richer
The bundled MaterialX runtime jumps to 1.7.0 with faster environment lighting (new radiance sampling modes and PMREM support), better Three.js integration, and overall performance improvements. MaterialX export from Needle Engine projects no longer requires a PRO license.
Needle AI in the Editor
Needle AI is integrated directly into the Unity inspector and hierarchy, with awareness of your local Unity and web project so its assistance is relevant to what youβre actually building.
Needle Engine
Added
Changed
OrbitControls now uses lookAtTarget / lockLookAtTarget, with smoother focus and camera transitions
- Postprocessing moved to core (
context.postprocessing); tonemapping-only setups skip the extra pass
- Timeline track classes renamed for consistency (e.g.
AnimationTrackHandler β TimelineAnimationTrack)
GroundProjectionEnv.applyOnAwake now defaults to true, matching Unity and Blender
Fixed & Improved
- Major
DragControls reliability improvements across snap points, AR drag, side views, and multi-input handover
- More reliable camera handling (fallback camera,
fitCamera, scene clearing)
- More efficient
Skybox attribute handling and load deduplication
- Smoother, more reliable progressive LOD loading and disposal, including texture-only LODs that update correctly with camera distance
AudioSource on iOS now survives a device lock / audio-session interruption and resumes automatically
SceneSwitcher: ?scene= honored for in-scene object references, with prefab preview support
VoIP improvements including better iOS mic handling and shared AudioContext
- Faster initial loading via improved dependency chunking
- General reliability and stability improvements throughout the engine and Vite plugin
MaterialX
- Updated bundled MaterialX runtime to 1.7.0 β faster environment lighting (new radiance sampling modes, PMREM support), better Three.js integration (texture sampling, environment rotation, alpha modes), and overall performance improvements
- MaterialX export in Needle Engine projects no longer requires a PRO license
Unity Integration
Download Unity Plugin
Install from NPM
Changelog on Github
Needle Engine API
Get started
Samples