@needle-tools/engine 4.8.8-next.e80f4d7 → 4.8.9
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 +10 -0
- package/README.md +50 -49
- package/dist/{needle-engine.bundle-DfWoUjQM.js → needle-engine.bundle-BdgNRB4B.js} +4 -4
- package/dist/{needle-engine.bundle-DK1r3WiC.umd.cjs → needle-engine.bundle-DGca1cic.umd.cjs} +3 -3
- package/dist/{needle-engine.bundle-IGziSts0.min.js → needle-engine.bundle-TQyyn3pE.min.js} +2 -2
- 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/js-extensions/index.d.ts +2 -1
- package/lib/engine/js-extensions/index.js +1 -1
- package/lib/engine/js-extensions/index.js.map +1 -1
- package/lib/engine-components/Camera.d.ts +1 -1
- package/lib/engine-components/Camera.js.map +1 -1
- package/lib/engine-components/OrbitControls.js +2 -2
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/api.d.ts +1 -1
- package/package.json +2 -2
- package/src/engine/js-extensions/index.ts +3 -2
- package/src/engine-components/Camera.ts +1 -1
- package/src/engine-components/OrbitControls.ts +2 -5
- package/src/engine-components/api.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to this package will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [4.8.9] - 2025-09-05
|
|
8
|
+
- Add: OrbitControls `fitCamera` has now additional options for `fitDirection`, `cameraOffset`, `relativeCameraOffset`, `targetOffset` and `relativeTargetOffset` giving more fine-grained control over the final camera view where necessary ([Stackblitz](<https://stackblitz.com/edit/needle-engine-fit-camera-options?file=src%2Fscripts%2FPanelsAndText.ts,index.html,src%2Fmain.ts>)).
|
|
9
|
+
- Add: ContactShadows properties to `fitShadows` and static `ContactShadows.auto()` for more fine-grained control over which objects to fit the shadow to or to apply slight offsets to the shadow plane
|
|
10
|
+
- Add: NestedGltf component `loaded` event property
|
|
11
|
+
- Fix: OrbitControls should not override the camera FOV
|
|
12
|
+
- Fix: Updating the `scene.background` when setting both <needle-engine> `background-color` and `background-image` or switching between one or the other
|
|
13
|
+
- Fix: When setting `<needle-engine environment-image="url">` the assigned image should be respected by the engine and loaded glTF files (even if they bring their own skybox and environment images)
|
|
14
|
+
- Fix: Issue with `<needle-engine autoplay>` animation speed and when using the AnimationUtils.autoplay feature where animations would play faster than expected
|
|
15
|
+
- Fix: Minor fixes in Vite plugins
|
|
16
|
+
- Change: ReflectionProbes are not applied on Objects that use lightmapping
|
|
7
17
|
|
|
8
18
|
## [4.8.8] - 2025-08-29
|
|
9
19
|
- Fix: iOS AR image tracking bug where having multiple `WebXRImageTracking` components in the scene cause unexpected behaviour or invalid USDZ files
|
package/README.md
CHANGED
|
@@ -1,73 +1,75 @@
|
|
|
1
1
|
# Needle Engine
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
**[Needle Engine](https://needle.tools)** is a fast web engine for complex and simple 3D applications alike.
|
|
6
|
-
It is flexible, extensible and has built-in support for collaboration and XR! It is built around the **glTF standard** for 3D assets and is using three.js under the hood - so all your existing knowledge applies.
|
|
7
|
-
|
|
8
|
-
→ 📑 [Documentation](https://docs.needle.tools)
|
|
9
|
-
→ 💎 [Samples](https://samples.needle.tools)
|
|
10
|
-
→ 🏓 [Changelog](https://github.com/needle-tools/needle-engine-support/releases)
|
|
11
|
-
|
|
12
|
-
## Features
|
|
13
|
-
- Components System: Add your custom components with easy
|
|
14
|
-
- WebXR support & iOS Quicklook support for interactive AR
|
|
15
|
-
- Networking is built-in
|
|
16
|
-
- Advanced PBR Rendering
|
|
17
|
-
- Animate Anything
|
|
18
|
-
- Animation Statemachines & Timeline Animations
|
|
19
|
-
- Lightmaps
|
|
20
|
-
- Physics
|
|
21
|
-
- Postprocessing
|
|
22
|
-
- Texture & Mesh LOD Generation
|
|
23
|
-
- Progressive Texture and Mesh Loading
|
|
24
|
-
*Higher resolution assets are loaded on demand*
|
|
25
|
-
- Dynamic Content Loading & Multi-Scene support
|
|
26
|
-
- Integrations for Unity or Blender
|
|
27
|
-
- Commercial & Educational Licenses
|
|
28
|
-
- [↪ more features](https://docs.needle.tools/features)
|
|
3
|
+
**Needle Engine** is a web engine for high quality 3D applications with performance in mind.
|
|
29
4
|
|
|
5
|
+
Built on three.js and the glTF standard, Needle Engine delivers flexible, extensible web experiences with built-in collaboration and XR support.
|
|
30
6
|
|
|
31
|
-
|
|
7
|
+
## Quick Links
|
|
8
|
+
🏓 [Changelog](https://github.com/needle-tools/needle-engine-support/releases) • 📑 [Documentation](https://docs.needle.tools) • 🧠 [Sample Scenes](https://samples.needle.tools) • 💎 [Showcase](https://engine.needle.tools/samples/?overlay=showcase)
|
|
9
|
+
|
|
10
|
+
## Key Features
|
|
11
|
+
|
|
12
|
+
**🎮 Development Experience**
|
|
13
|
+
- Component system with easy custom component creation
|
|
14
|
+
- Unity and Blender integrations for familiar workflows
|
|
15
|
+
- Multi-scene support with dynamic content loading
|
|
16
|
+
|
|
17
|
+
**🌐 Web & XR Ready**
|
|
18
|
+
- WebXR support for immersive experiences
|
|
19
|
+
- iOS QuickLook support for interactive AR
|
|
20
|
+
- Built-in networking and collaboration
|
|
32
21
|
|
|
22
|
+
**⚡ Performance Optimized**
|
|
23
|
+
- Progressive texture and mesh loading
|
|
24
|
+
- Automatic LOD generation for textures and meshes
|
|
25
|
+
- Advanced PBR rendering with lightmap support
|
|
33
26
|
|
|
27
|
+
**🎬 Animation & Effects**
|
|
28
|
+
- Animation state machines and timeline animations
|
|
29
|
+
- Physics simulation
|
|
30
|
+
- Post-processing effects
|
|
31
|
+
- Animate anything with ease
|
|
32
|
+
|
|
33
|
+
[→ See all features](https://docs.needle.tools/features)
|
|
34
34
|
|
|
35
35
|
## Editor Integrations
|
|
36
36
|
|
|
37
37
|
**Powerful integrations for Unity and Blender** allow artists and developers to collaborate and manage web applications inside battle-tested 3d editors. Needle Engine integrations allow you to use editor features for exporting models, author materials, animate and sequence animations, bake lightmaps and more.
|
|
38
38
|
- 🎲 [Download Unity Integration](https://engine.needle.tools/downloads/unity)
|
|
39
39
|
- 🐵 [Download Blender Integration](https://engine.needle.tools/downloads/blender)
|
|
40
|
-
- 📜 [Code
|
|
41
|
-
|
|
40
|
+
- 📜 [Use with Code](https://engine.needle.tools/docs/three/)
|
|
42
41
|
|
|
43
42
|
## Getting Started
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
**Quick Start with npm:**
|
|
45
|
+
```bash
|
|
46
|
+
npm install @needle-tools/engine
|
|
47
|
+
```
|
|
46
48
|
|
|
49
|
+
**Or use our Editor Integrations:** Follow the [Getting Started Guide](https://docs.needle.tools/getting-started) to download and install Needle Engine with Unity or Blender.
|
|
47
50
|
|
|
48
|
-
|
|
51
|
+
**Explore Examples:** [Try our interactive samples](https://engine.needle.tools/samples) to see what's possible ⚡
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
---
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
[](https://responsive-layout-click-example-z23hmxbzuyk6y.needle.run/)
|
|
55
|
+
*Available under commercial and educational licenses*
|
|
54
56
|
|
|
55
|
-
|
|
56
|
-
[](https://antialiasing-and-postprocessing-zubcksz1o8daw.needle.run/)
|
|
57
|
-
|
|
58
|
-
### [AR Restaurant Example](https://ar-restaurant-example-zubcks1t14le.needle.run/) | [Code on Github](https://github.com/needle-engine/ar-restaurant-example)
|
|
59
|
-
|
|
60
|
-
### [Camera Focus DIV Example 1](https://responsive-layout-z23hmxb22no6t.needle.run/) | [Code on Stackblitz](<https://stackblitz.com/edit/needle-engine-camera-focus-rect?file=src%2Fsidebar.ts,index.html,src%2Fmain.ts>)
|
|
61
|
-
[](https://responsive-layout-z23hmxb22no6t.needle.run/)
|
|
62
|
-
|
|
63
|
-
### [Camera Focus DIV Example 2](https://responsive-layout-click-example-z23hmxbzuyk6y.needle.run/) | [Code on Stackblitz](<https://stackblitz.com/edit/needle-engine-camera-focus-rect-click-to-move?file=index.html,src%2Fmain.ts>)
|
|
64
|
-
[](https://responsive-layout-click-example-z23hmxbzuyk6y.needle.run/)
|
|
65
|
-
|
|
66
|
-
### [Motors & More Shop Example with React](https://reactshoppingcart-z23hmxbzcfkmf.needle.run/) | [Code on Stackblitz](https://stackblitz.com/edit/needle-react-shopping-cart-2)
|
|
57
|
+
## Examples
|
|
67
58
|
|
|
59
|
+
| Preview | Example | Description | Links |
|
|
60
|
+
|---------|---------|-------------|-------|
|
|
61
|
+
| [](https://khr-animation-pointer-zubcksz2dgy3k.needle.run/) | [Animate Anything](https://khr-animation-pointer-zubcksz2dgy3k.needle.run/) | Interactive animation system | [Code on Stackblitz](https://stackblitz.com/edit/needle-engine-animate-anything?file=src%2Fmain.ts) • [three.js Example](https://threejs.org/examples/?q=gltf#webgl_loader_gltf_animation_pointer) |
|
|
62
|
+
| [](https://antialiasing-and-postprocessing-zubcksz1o8daw.needle.run/) | [Postprocessing Effects](https://antialiasing-and-postprocessing-zubcksz1o8daw.needle.run/) | Custom magnifier effect with post-processing | [Code on Stackblitz](https://stackblitz.com/edit/needle-engine-postprocessing) |
|
|
63
|
+
| [](https://responsive-layout-z23hmxb22no6t.needle.run/) | [Camera Focus DIV 1](https://responsive-layout-z23hmxb22no6t.needle.run/) | Responsive layout with camera focus | [Code on Stackblitz](https://stackblitz.com/edit/needle-engine-camera-focus-rect?file=src%2Fsidebar.ts,index.html,src%2Fmain.ts) |
|
|
64
|
+
| [](https://responsive-layout-click-example-z23hmxbzuyk6y.needle.run/) | [Camera Focus DIV 2](https://responsive-layout-click-example-z23hmxbzuyk6y.needle.run/) | Click-to-move camera focus example | [Code on Stackblitz](https://stackblitz.com/edit/needle-engine-camera-focus-rect-click-to-move?file=index.html,src%2Fmain.ts) |
|
|
65
|
+
| [](https://fasthdr-needle-engine-zubcks1li2iy.needle.run/) | [FastHDR Loading](https://fasthdr-needle-engine-zubcks1li2iy.needle.run/) | 10x faster than EXR, non-blocking, 95% less GPU memory | [Code on Stackblitz](https://stackblitz.com/edit/needle-fast-hdri-needle-engine) • [Learn more](https://cloud.needle.tools/hdris) |
|
|
66
|
+
| | [AR Restaurant](https://ar-restaurant-example-zubcks1t14le.needle.run/) | Interactive AR restaurant experience | [Code on Github](https://github.com/needle-engine/ar-restaurant-example) |
|
|
67
|
+
| | [Custom Loading Overlay](https://lods-loading-overlay-z23hmxbz29h8vr.needle.run/) | Wait for LODs with custom loading states | [Code on Stackblitz](https://stackblitz.com/edit/needle-engine-wait-for-lods) |
|
|
68
|
+
| | [React Shopping Cart](https://reactshoppingcart-z23hmxbzcfkmf.needle.run/) | E-commerce integration with React | [Code on Stackblitz](https://stackblitz.com/edit/needle-react-shopping-cart-2) |
|
|
68
69
|
|
|
70
|
+
<br/>
|
|
69
71
|
|
|
70
|
-
👋
|
|
72
|
+
👋 More examples on [samples.needle.tools](https://samples.needle.tools/), [docs.needle.tools](https://docs.needle.tools) and in the [Needle Engine Stackblitz Collection](https://stackblitz.com/@marwie/collections/needle-engine)
|
|
71
73
|
|
|
72
74
|
<br />
|
|
73
75
|
|
|
@@ -77,5 +79,4 @@ Follow the [Getting Started Guide](https://docs.needle.tools/getting-started) to
|
|
|
77
79
|
[Twitter](https://twitter.com/NeedleTools) •
|
|
78
80
|
[Discord](https://discord.needle.tools) •
|
|
79
81
|
[Forum](https://forum.needle.tools) •
|
|
80
|
-
[Youtube](https://www.youtube.com/@needle-tools)
|
|
81
|
-
|
|
82
|
+
[Youtube](https://www.youtube.com/@needle-tools)
|
|
@@ -1763,11 +1763,11 @@ fo('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"]
|
|
|
1763
1763
|
fo('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";');
|
|
1764
1764
|
fo('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";');
|
|
1765
1765
|
fo('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
|
|
1766
|
-
fo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.8.
|
|
1766
|
+
fo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.8.9";');
|
|
1767
1767
|
fo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1768
|
-
fo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri Sep 05 2025
|
|
1768
|
+
fo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri Sep 05 2025 14:43:18 GMT+0000 (Coordinated Universal Time)";');
|
|
1769
1769
|
fo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
|
|
1770
|
-
const En = "4.8.
|
|
1770
|
+
const En = "4.8.9", Cm = "undefined", Gb = "Fri Sep 05 2025 14:43:18 GMT+0000 (Coordinated Universal Time)";
|
|
1771
1771
|
Hb && console.log(`Engine version: ${En} (generator: ${Cm})
|
|
1772
1772
|
Project built at ${Gb}`);
|
|
1773
1773
|
const bl = NEEDLE_PUBLIC_KEY, oo = "needle_isActiveInHierarchy", Br = "builtin_components", Mh = "needle_editor_guid";
|
|
@@ -16337,7 +16337,7 @@ class ye extends T {
|
|
|
16337
16337
|
return;
|
|
16338
16338
|
}
|
|
16339
16339
|
let i;
|
|
16340
|
-
if (Array.isArray(e)
|
|
16340
|
+
if (Array.isArray(e) || e && "type" in e ? i = e : e && typeof e == "object" && !(e instanceof M) && !Array.isArray(e) && (t = e, i = t.objects), i && !Array.isArray(i) && (i = [i]), (!Array.isArray(i) || i && i.length <= 0) && (i = this.context.scene.children), !Array.isArray(i) || i.length <= 0) {
|
|
16341
16341
|
console.warn("No objects to fit camera to...");
|
|
16342
16342
|
return;
|
|
16343
16343
|
}
|