@needle-tools/engine 4.10.0-beta.7 → 4.10.0-beta.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 +6 -1
- package/README.md +2 -1
- package/dist/{needle-engine.bundle-B4omM_bc.js → needle-engine.bundle-B_wUQWD9.js} +9 -9
- package/dist/{needle-engine.bundle-DktO3ijZ.umd.cjs → needle-engine.bundle-CrO5PE4u.umd.cjs} +8 -8
- package/dist/{needle-engine.bundle-Cp615Jh0.min.js → needle-engine.bundle-DjiUOI9O.min.js} +7 -7
- package/dist/needle-engine.js +2 -2
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/vendor-CPuBPspY.umd.cjs +1121 -0
- package/dist/vendor-DPCU8cUF.min.js +1121 -0
- package/dist/vendor-MBoqSyFm.js +16240 -0
- package/lib/engine-components/web/ScrollFollow.d.ts +1 -0
- package/lib/engine-components/web/ScrollFollow.js +2 -0
- package/lib/engine-components/web/ScrollFollow.js.map +1 -1
- package/lib/engine-components/web/ViewBox.js +1 -1
- package/lib/engine-components/web/ViewBox.js.map +1 -1
- package/package.json +2 -1
- package/src/engine-components/web/ScrollFollow.ts +3 -2
- package/src/engine-components/web/ViewBox.ts +1 -1
- package/dist/vendor-D0Yvltn9.umd.cjs +0 -1121
- package/dist/vendor-DU8tJyl_.js +0 -14366
- package/dist/vendor-JyrX4DVM.min.js +0 -1121
package/CHANGELOG.md
CHANGED
|
@@ -4,15 +4,20 @@ 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.10.0
|
|
7
|
+
## [4.10.0] - 2025-09-29
|
|
8
|
+
- **NEW**: [**Scrollytelling Bike Example**](<https://scrollytelling-bike-z23hmxb2gnu5a.needle.run/>) - [Github Project](https://github.com/needle-engine/needle-engine-bike-scrollytelling)
|
|
8
9
|
- **NEW**: HoverAnimation component. Use this component to get a scale hover animation of an object when the cursor is hovering over the object or one of it's children.
|
|
10
|
+
- **NEW**: ViewBox component. Use this component to automatically perfectly fit your 3D scene into the camera view.
|
|
9
11
|
- Add: `fitCamera` function
|
|
10
12
|
- Add: `<needle-engine poster>` attribute. It works with an URL to an image that should be shown as a poster image. If no URL is assigned then the poster that is automatically generated during the first frame will be used
|
|
13
|
+
- Add: `<needle-engine focus-rect="<html_selector">` attribute. Assign a HTML selector to the attribute to use a specific HTML element on screen offset the 3D camera center to the center of the HTML element. (The same can be done programmatically using `ctx.setCameraFocusRect(<html_element|DOMRect>)`)
|
|
14
|
+
- Add: Timeline ScrollMarker for Unity and Blender timeline animations to control timing based on HTML visibility.
|
|
11
15
|
- Fix: Renderer `material` accessing error when component was not yet initialized
|
|
12
16
|
- Fix: Poster screenshot glitch during the first frame (development only)
|
|
13
17
|
- Change: Loading display does not show Needle logo anymore by default
|
|
14
18
|
- Change: Use fallback raycast method for lowpoly meshes while BVH is being generated
|
|
15
19
|
|
|
20
|
+
|
|
16
21
|
## [4.9.3] - 2025-09-15
|
|
17
22
|
- Fix: SpriteRenderer index issue when animated where animation precision issue was causing the wrong sprite to be selected ([issue](<https://forum.needle.tools/t/switching-sprite-images-via-timeline-causes-ghosting-glitches-when-exported/2709>))
|
|
18
23
|
- Fix: Scaling scene in AR with multitouch causing camera projection issue for a frame ([issue](<https://forum.needle.tools/t/3d-assets-warping-on-rotation-in-ar>))
|
package/README.md
CHANGED
|
@@ -63,7 +63,8 @@ npm install @needle-tools/engine
|
|
|
63
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
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
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
|
-
| [](https://scrollytelling-2-z23hmxby7c6x.needle.run/) | [Scrollytelling Example](https://scrollytelling-2-z23hmxby7c6x.needle.run/) |
|
|
66
|
+
| [](https://scrollytelling-2-z23hmxby7c6x.needle.run/) | [Scrollytelling Example](https://scrollytelling-2-z23hmxby7c6x.needle.run/) | Scroll, physics and cursor interaction: a playful 3D interactive scrollytelling website | [Included in Samples Package](https://samples.needle.tools) |
|
|
67
|
+
| [](https://scrollytelling-bike-z23hmxb2gnu5a.needle.run/) | [Scrollytelling Bike Example](https://scrollytelling-bike-z23hmxb2gnu5a.needle.run/) | Timeline Animation using ScrollFollow, ViewBox and FocusRect | [Project on Github](https://github.com/needle-engine/needle-engine-bike-scrollytelling) |
|
|
67
68
|
| | [AR Restaurant](https://ar-restaurant-example-zubcks1t14le.needle.run/) | Interactive AR restaurant experience | [Code on Github](https://github.com/needle-engine/ar-restaurant-example) |
|
|
68
69
|
| | [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) |
|
|
69
70
|
| | [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) |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vector2 as J, Vector3 as _, Vector4 as fe, Quaternion as U, PlaneGeometry as Gn, WebGLRenderer as xr, PerspectiveCamera as le, OrthographicCamera as Qd, Scene as wi, Mesh as G, Texture as Te, Uniform$1 as Wi, Color as se, ShaderMaterial as zn, Box3 as bi, ShadowMaterial as Db, Euler as ot, MeshStandardMaterial as ut, Box3Helper as Sx, GridHelper as Mm, Object3D as M, Material as _e, Matrix3 as jb, Matrix4 as ee, Layers as po, Ray as mo, MathUtils as ws, AxesHelper as vi, MeshBasicMaterial as we, DoubleSide as xi, BufferGeometry as dn, Group as lo, CylinderGeometry as Bb, SphereGeometry as Yd, BoxGeometry as wa, SpriteMaterial as Cx, Sprite as Px, Shape as Ox, ExtrudeGeometry as kx, Fog as Fb, DirectionalLight as Sp, PointLight as Rm, EdgesGeometry as Mx, LineSegments as zb, LineBasicMaterial as Tm, Line as xa, BufferAttribute as ft, Raycaster as Kd, Sphere as Zd, ArrayCamera as Rx, Plane as ur, SkinnedMesh as co, InterleavedBufferAttribute as Ub, Skeleton as Tx, Bone as Ex, WebGLCubeRenderTarget as Ax, CubeCamera as Ix, AnimationClip as Gi, FileLoader as Em, TextureLoader as pc, PropertyBinding as Sa, KeyframeTrack as Lx, LinearSRGBColorSpace as Os, ShaderChunk as Ht, UniformsLib as Dx, DataTexture as Am, RGBAFormat as Jd, EquirectangularReflectionMapping as xs, SRGBColorSpace as ks, Clock as jx, NeutralToneMapping as Ca, AgXToneMapping as eu, ACESFilmicToneMapping as tu, NoToneMapping as dd, PCFSoftShadowMap$1 as Bx, BasicNodeLibrary as Fx, WebGLRenderTarget as Un, DepthTexture as Nb, NearestFilter as ud, LoopRepeat as zx, LoopOnce as Cp, AnimationMixer as Im, CompressedTexture as Ux, FrontSide as go, Camera as Nx, Frustum as _y, AudioListener as $x, PositionalAudio as Wx, AudioLoader as Pp, EventDispatcher as Lm, BackSide as iu, MeshDepthMaterial as Vx, CustomBlending as Hx, MaxEquation as Gx, AmbientLight as qx, HemisphereLight as Xx, AlwaysStencilFunc as Qx, GreaterEqualStencilFunc as Yx, NotEqualStencilFunc as Kx, GreaterStencilFunc as Zx, LessEqualStencilFunc as Jx, EqualStencilFunc as eS, LessStencilFunc as tS, NeverStencilFunc as by, InvertStencilOp as iS, DecrementWrapStencilOp as nS, IncrementWrapStencilOp as sS, DecrementStencilOp as oS, IncrementStencilOp as rS, ReplaceStencilOp as aS, ZeroStencilOp as lS, KeepStencilOp as cS, RawShaderMaterial as $b, GLSL3 as hS, AlwaysDepth as dS, GreaterEqualDepth as uS, GreaterDepth as fS, LessEqualDepth as pS, LessDepth as mS, NotEqualDepth as gS, EqualDepth as yS, BatchedMesh as vy, MeshPhysicalMaterial as Op, LinearFilter as fd, UnsignedByteType as _S, RingGeometry as bS, Line3 as vS, AdditiveBlending as Wb, BoxHelper as wS, SpotLight as xS, DirectionalLightHelper as SS, CameraHelper as CS, LOD as PS, Triangle as OS, NormalBlending as kS, ReinhardToneMapping as Dm, LinearToneMapping as jm, HalfFloatType as hf, VideoTexture as MS, CubeUVReflectionMapping as Vb, CubeTexture as RS, CompressedCubeTexture as TS, EquirectangularRefractionMapping as ES, CatmullRomCurve3 as AS, VectorKeyframeTrack as IS, QuaternionKeyframeTrack as LS, Audio as DS, ShaderLib as pd, UniformsUtils as Hb, MirroredRepeatWrapping as wy, MeshNormalMaterial as jS, AudioContext as BS, PMREMGenerator$1 as FS } from "./three-CJSAehtG.js";
|
|
2
2
|
import { createLoaders as Bm, getRaycastMesh as Gb, LODsManager as zo, NEEDLE_progressive as Ve, addDracoAndKTX2Loaders as zS, configureLoader as US, setKTX2TranscoderLocation as NS, setDracoDecoderLocation as $S } from "./gltf-progressive-DUR9TuAH.js";
|
|
3
3
|
import { GroundedSkybox as Pa, Font as WS, TextGeometry as VS, FontLoader as HS, GLTFLoader as Ms, TransformControlsGizmo as qb, EXRLoader as Fm, RGBELoader as Xb, Stats as GS, nodeFrame as qS, OrbitControls as Qb, PositionalAudioHelper as XS, HorizontalBlurShader as QS, VerticalBlurShader as YS, GLTFExporter as Yb, strToU8 as Kb, zipSync as KS, XRControllerModelFactory as ZS, XRHandMeshModel as JS, Line2 as e1, LineGeometry as t1, LineMaterial as i1, TransformControls as n1, InteractiveGroup as s1, HTMLMesh as o1, VertexNormalsHelper as r1, OBJLoader as zm, FBXLoader as Zb, mergeVertices as a1 } from "./three-examples-Doq0rvFU.js";
|
|
4
|
-
import { fetchProfile as l1, MotionController as c1, $70d766613f57b014$export$2e2bcd8739ae039 as xy, ByteBuffer as h1, v5 as Sy, md5 as Cy, SIZE_PREFIX_LENGTH as Jb, Builder as Um, createNoise4D as d1, Matrix4 as df, BatchedParticleRenderer as u1, ParticleSystem as f1, RenderMode as us, ConstantColor as p1, Vector4 as m1, ConstantValue as g1, TrailParticle as Py, WorkerBase as y1, MeshBVH as _1 } from "./vendor-
|
|
4
|
+
import { fetchProfile as l1, MotionController as c1, $70d766613f57b014$export$2e2bcd8739ae039 as xy, ByteBuffer as h1, v5 as Sy, md5 as Cy, SIZE_PREFIX_LENGTH as Jb, Builder as Um, createNoise4D as d1, Matrix4 as df, BatchedParticleRenderer as u1, ParticleSystem as f1, RenderMode as us, ConstantColor as p1, Vector4 as m1, ConstantValue as g1, TrailParticle as Py, WorkerBase as y1, MeshBVH as _1 } from "./vendor-MBoqSyFm.js";
|
|
5
5
|
import { __webpack_exports__default as Ce, __webpack_exports__Text as e0, __webpack_exports__Block as t0, __webpack_exports__update as b1, SimpleStateBehavior as v1, __webpack_exports__Inline as uf, __webpack_exports__FontLibrary as Oy, ThreeMeshUI as ky } from "./three-mesh-ui-CktOi6oI.js";
|
|
6
6
|
import { EffectAttribute as w1 } from "./postprocessing-DQ2pynXW.js";
|
|
7
7
|
const ff = /* @__PURE__ */ new Map();
|
|
@@ -1775,11 +1775,11 @@ bo('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"]
|
|
|
1775
1775
|
bo('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";');
|
|
1776
1776
|
bo('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";');
|
|
1777
1777
|
bo('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
|
|
1778
|
-
bo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.10.0-beta.
|
|
1778
|
+
bo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.10.0-beta.9";');
|
|
1779
1779
|
bo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1780
|
-
bo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
1780
|
+
bo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Sep 29 2025 12:36:40 GMT+0000 (Coordinated Universal Time)";');
|
|
1781
1781
|
bo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
|
|
1782
|
-
const jn = "4.10.0-beta.
|
|
1782
|
+
const jn = "4.10.0-beta.9", Gm = "undefined", x0 = "Mon Sep 29 2025 12:36:40 GMT+0000 (Coordinated Universal Time)";
|
|
1783
1783
|
w0 && console.log(`Engine version: ${jn} (generator: ${Gm})
|
|
1784
1784
|
Project built at ${x0}`);
|
|
1785
1785
|
const Dl = NEEDLE_PUBLIC_KEY, uo = "needle_isActiveInHierarchy", Qr = "builtin_components", qh = "needle_editor_guid";
|
|
@@ -3494,7 +3494,7 @@ function YC(s, e) {
|
|
|
3494
3494
|
}, s ? new xy(s, e) : new xy(e);
|
|
3495
3495
|
}
|
|
3496
3496
|
async function Zy() {
|
|
3497
|
-
const s = await import("./vendor-
|
|
3497
|
+
const s = await import("./vendor-MBoqSyFm.js").then((e) => e.bundler);
|
|
3498
3498
|
return console.log(s), s.default === void 0 ? s : s.default;
|
|
3499
3499
|
}
|
|
3500
3500
|
class KC {
|
|
@@ -3907,7 +3907,7 @@ class iP {
|
|
|
3907
3907
|
}
|
|
3908
3908
|
console.debug(`⊡ Connecting to networking backend on
|
|
3909
3909
|
` + Ai);
|
|
3910
|
-
const o = await import("./vendor-
|
|
3910
|
+
const o = await import("./vendor-MBoqSyFm.js").then((c) => c.index), r = o.default?.WebsocketBuilder ?? o.WebsocketBuilder, a = o.default?.ExponentialBackoff ?? o.ExponentialBackoff, l = new r(Ai).withMaxRetries(10).withBackoff(new a(2e3, 4)).onOpen(() => {
|
|
3911
3911
|
this._connectingToWebsocketPromise = null, this._ws = l, this.connected = !0, L() || ci ? console.log(`⊞ Connected to networking backend
|
|
3912
3912
|
` + Ai) : console.debug("⊞ Connected to networking backend", Ai), n(!0), this.onSendQueued(On.OnConnection);
|
|
3913
3913
|
}).onClose((c) => {
|
|
@@ -6108,7 +6108,7 @@ var vd;
|
|
|
6108
6108
|
s.runMeshBVHRaycast = e;
|
|
6109
6109
|
let t = !1, i = null, n = null, o = null, r = null;
|
|
6110
6110
|
function a() {
|
|
6111
|
-
t || (t = !0, import("./vendor-
|
|
6111
|
+
t || (t = !0, import("./vendor-MBoqSyFm.js").then((v) => v.index$1).then((v) => {
|
|
6112
6112
|
i = v.acceleratedRaycast, n = v.MeshBVH, o = v.StaticGeometryGenerator, r = v.computeBoundsTree;
|
|
6113
6113
|
}).catch((v) => {
|
|
6114
6114
|
(Vt || L()) && console.error("Failed to load BVH library...", v.message);
|
|
@@ -21244,7 +21244,7 @@ function Nv(s) {
|
|
|
21244
21244
|
}
|
|
21245
21245
|
const JM = w("debugextensions");
|
|
21246
21246
|
let jd;
|
|
21247
|
-
const eR = import("./vendor-
|
|
21247
|
+
const eR = import("./vendor-MBoqSyFm.js").then((s) => s.index$2).then(async (s) => (jd = s.GLTFAnimationPointerExtension, jd)).catch((s) => {
|
|
21248
21248
|
console.warn("Failed to import GLTFLoaderAnimationPointer. Please use @needle-tools/three-animationpointer for full KHR_animation support", s);
|
|
21249
21249
|
}), mr = new Array();
|
|
21250
21250
|
function i2(s) {
|
|
@@ -39353,7 +39353,7 @@ let $i = class extends R {
|
|
|
39353
39353
|
(this.debug || Go) && console.warn("[ViewBox] Moving camera out of bounds", m, "<", v);
|
|
39354
39354
|
const I = z(b);
|
|
39355
39355
|
I.y *= 1e-8, I.normalize();
|
|
39356
|
-
const $ =
|
|
39356
|
+
const $ = v - m, V = y.add(I.multiplyScalar($));
|
|
39357
39357
|
e.worldPosition = V.lerp(y, 1 - this.context.time.deltaTime);
|
|
39358
39358
|
}
|
|
39359
39359
|
const x = z(p);
|