@needle-tools/engine 3.45.2-beta.1 → 3.45.2-beta.4
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/dist/needle-engine.js +13 -8
- package/dist/needle-engine.light.js +13 -8
- package/dist/needle-engine.light.min.js +6 -6
- package/dist/needle-engine.light.umd.cjs +6 -6
- package/dist/needle-engine.min.js +6 -6
- package/dist/needle-engine.umd.cjs +6 -6
- package/lib/engine/engine_input.d.ts +5 -0
- package/lib/engine/engine_input.js +7 -0
- package/lib/engine/engine_input.js.map +1 -1
- package/lib/engine/engine_physics.js +3 -0
- package/lib/engine/engine_physics.js.map +1 -1
- package/lib/engine/xr/NeedleXRSession.js +1 -1
- package/lib/engine/xr/NeedleXRSession.js.map +1 -1
- package/lib/engine-components/DragControls.js +9 -0
- package/lib/engine-components/DragControls.js.map +1 -1
- package/lib/engine-components/ui/Raycaster.js +1 -1
- package/lib/engine-components/ui/Raycaster.js.map +1 -1
- package/package.json +2 -2
- package/plugins/common/license.cjs +1 -1
- package/plugins/types/userconfig.d.ts +6 -0
- package/plugins/vite/alias.js +38 -17
- package/src/engine/engine_input.ts +9 -0
- package/src/engine/engine_physics.ts +2 -0
- package/src/engine/xr/NeedleXRSession.ts +1 -1
- package/src/engine-components/DragControls.ts +10 -0
- package/src/engine-components/ui/Raycaster.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
|
+
## [3.45.2-beta.4] - 2024-07-19
|
|
8
|
+
- Fix: DragControls `Snap To Surface` when starting to drag
|
|
9
|
+
- Change: Minimal increase of close distance for SpatialGrab in WebXR
|
|
10
|
+
|
|
11
|
+
## [3.45.2-beta.3] - 2024-07-18
|
|
12
|
+
- Add: Support for immersive-ar `unbounded` session for unlimited passthrough experiences (enabled by default).
|
|
13
|
+
This is currently an experimental feature in the Quest browser. To enable it go to `chrome://flags` and check `WebXR experiments`, then restart the Browser. The next time you start an immersive-ar session on quest the WebXR experience will run without guardian boundaries.
|
|
14
|
+
- Add: NEPointerEvent `isSpatial` getter to easily determine if an input event was generated by a spatial device
|
|
15
|
+
- Fix: Raycast handle null or empty objects in targets array
|
|
16
|
+
|
|
7
17
|
## [3.45.2-beta.1] - 2024-07-17
|
|
8
18
|
- Add: Object `static:true` does now disable `matrixAutoUpdate`
|
|
9
19
|
- Fix: Animation component `play()` issue where previous animations were not always stopped/faded out
|
package/dist/needle-engine.js
CHANGED
|
@@ -29626,13 +29626,13 @@ function tiA() {
|
|
|
29626
29626
|
return g || null;
|
|
29627
29627
|
}
|
|
29628
29628
|
const t4 = gA("debugdefines");
|
|
29629
|
-
Sh('if(!globalThis[""3.45.2-beta.
|
|
29629
|
+
Sh('if(!globalThis[""3.45.2-beta.4""]) globalThis[""3.45.2-beta.4""] = "0.0.0";');
|
|
29630
29630
|
Sh('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
29631
|
-
Sh('if(!globalThis[""
|
|
29632
|
-
Sh('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.45.2-beta.
|
|
29631
|
+
Sh('if(!globalThis[""Fri Jul 19 2024 19:15:04 GMT+0200 (Central European Summer Time)""]) globalThis[""Fri Jul 19 2024 19:15:04 GMT+0200 (Central European Summer Time)""] = "unknown";');
|
|
29632
|
+
Sh('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.45.2-beta.4";');
|
|
29633
29633
|
Sh('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
29634
|
-
Sh('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
29635
|
-
const un = "3.45.2-beta.
|
|
29634
|
+
Sh('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri Jul 19 2024 19:15:04 GMT+0200 (Central European Summer Time)";');
|
|
29635
|
+
const un = "3.45.2-beta.4", AJ = "undefined", i4 = "Fri Jul 19 2024 19:15:04 GMT+0200 (Central European Summer Time)";
|
|
29636
29636
|
t4 && console.log(`Engine version: ${un} (generator: ${AJ})
|
|
29637
29637
|
Project built at ${i4}`);
|
|
29638
29638
|
const oB = "needle_isActiveInHierarchy", $E = "builtin_components", sS = "needle_editor_guid";
|
|
@@ -56268,6 +56268,10 @@ class xC extends PointerEvent {
|
|
|
56268
56268
|
B(this, "_propagationStopped", !1);
|
|
56269
56269
|
this._pointerid = i.pointerId, this._pointerType = i.pointerType, this._type = e, this.deviceIndex = i.deviceIndex, this.origin = i.origin, this.source = t, this.mode = i.mode, this._ray = i.ray, this.space = i.device;
|
|
56270
56270
|
}
|
|
56271
|
+
/** Returns true if the input was emitted in 3D space (and not by e.g. clicking on a 2D screen). You can use {@link mode} if you need more information about the input source */
|
|
56272
|
+
get isSpatial() {
|
|
56273
|
+
return this.mode != "screen";
|
|
56274
|
+
}
|
|
56271
56275
|
/** A ray in worldspace for the event.
|
|
56272
56276
|
* If the ray is undefined you can also use `space.worldForward` and `space.worldPosition` */
|
|
56273
56277
|
get ray() {
|
|
@@ -64348,7 +64352,7 @@ const Ba = class {
|
|
|
64348
64352
|
switch (A) {
|
|
64349
64353
|
case "immersive-ar":
|
|
64350
64354
|
return {
|
|
64351
|
-
optionalFeatures: ["anchors", "local-floor", "hand-tracking", "layers", "dom-overlay", "hit-test"]
|
|
64355
|
+
optionalFeatures: ["anchors", "local-floor", "hand-tracking", "layers", "dom-overlay", "hit-test", "unbounded"]
|
|
64352
64356
|
};
|
|
64353
64357
|
case "immersive-vr":
|
|
64354
64358
|
return {
|
|
@@ -66187,7 +66191,7 @@ class JBA {
|
|
|
66187
66191
|
intersect(A, e, t, i) {
|
|
66188
66192
|
var I;
|
|
66189
66193
|
for (const o of e) {
|
|
66190
|
-
if (o.visible === !1 || fe.isGizmo(o) || i.lineThreshold !== void 0 && i.lineThreshold < 0 && o instanceof Hi)
|
|
66194
|
+
if (!o || o.visible === !1 || fe.isGizmo(o) || i.lineThreshold !== void 0 && i.lineThreshold < 0 && o instanceof Hi)
|
|
66191
66195
|
continue;
|
|
66192
66196
|
const s = (I = i.testObject) == null ? void 0 : I.call(i, o);
|
|
66193
66197
|
if (s === !1)
|
|
@@ -72183,7 +72187,7 @@ class f0 extends Tf {
|
|
|
72183
72187
|
performRaycast(A) {
|
|
72184
72188
|
if (!ke.active || !(A != null && A.ray))
|
|
72185
72189
|
return null;
|
|
72186
|
-
const e = A.ray.origin, t = 0.
|
|
72190
|
+
const e = A.ray.origin, t = 0.015;
|
|
72187
72191
|
return this.context.physics.sphereOverlap(e, t);
|
|
72188
72192
|
}
|
|
72189
72193
|
}
|
|
@@ -87891,6 +87895,7 @@ class XhA {
|
|
|
87891
87895
|
case 1:
|
|
87892
87896
|
this._dragPlane.setFromNormalAndCoplanarPoint(t, o);
|
|
87893
87897
|
break;
|
|
87898
|
+
case 4:
|
|
87894
87899
|
case 3:
|
|
87895
87900
|
const d = new y(0, 1, 0), p = t, u = d.angleTo(p), f = 0.5;
|
|
87896
87901
|
u > Math.PI / 2 + f || u < Math.PI / 2 - f ? this._dragPlane.setFromNormalAndCoplanarPoint(new y(0, 1, 0), o) : this._dragPlane.setFromNormalAndCoplanarPoint(t, o);
|
|
@@ -29626,13 +29626,13 @@ function Cte() {
|
|
|
29626
29626
|
return s || null;
|
|
29627
29627
|
}
|
|
29628
29628
|
const _V = ie("debugdefines");
|
|
29629
|
-
Kg('if(!globalThis[""3.45.2-beta.
|
|
29629
|
+
Kg('if(!globalThis[""3.45.2-beta.4""]) globalThis[""3.45.2-beta.4""] = "0.0.0";');
|
|
29630
29630
|
Kg('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
29631
|
-
Kg('if(!globalThis[""
|
|
29632
|
-
Kg('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.45.2-beta.
|
|
29631
|
+
Kg('if(!globalThis[""Fri Jul 19 2024 19:15:17 GMT+0200 (Central European Summer Time)""]) globalThis[""Fri Jul 19 2024 19:15:17 GMT+0200 (Central European Summer Time)""] = "unknown";');
|
|
29632
|
+
Kg('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.45.2-beta.4";');
|
|
29633
29633
|
Kg('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
29634
|
-
Kg('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
29635
|
-
const sl = "3.45.2-beta.
|
|
29634
|
+
Kg('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri Jul 19 2024 19:15:17 GMT+0200 (Central European Summer Time)";');
|
|
29635
|
+
const sl = "3.45.2-beta.4", V2 = "undefined", bV = "Fri Jul 19 2024 19:15:17 GMT+0200 (Central European Summer Time)";
|
|
29636
29636
|
_V && console.log(`Engine version: ${sl} (generator: ${V2})
|
|
29637
29637
|
Project built at ${bV}`);
|
|
29638
29638
|
const zu = "needle_isActiveInHierarchy", Im = "builtin_components", bw = "needle_editor_guid";
|
|
@@ -56268,6 +56268,10 @@ class vu extends PointerEvent {
|
|
|
56268
56268
|
d(this, "_propagationStopped", !1);
|
|
56269
56269
|
this._pointerid = n.pointerId, this._pointerType = n.pointerType, this._type = t, this.deviceIndex = n.deviceIndex, this.origin = n.origin, this.source = i, this.mode = n.mode, this._ray = n.ray, this.space = n.device;
|
|
56270
56270
|
}
|
|
56271
|
+
/** Returns true if the input was emitted in 3D space (and not by e.g. clicking on a 2D screen). You can use {@link mode} if you need more information about the input source */
|
|
56272
|
+
get isSpatial() {
|
|
56273
|
+
return this.mode != "screen";
|
|
56274
|
+
}
|
|
56271
56275
|
/** A ray in worldspace for the event.
|
|
56272
56276
|
* If the ray is undefined you can also use `space.worldForward` and `space.worldPosition` */
|
|
56273
56277
|
get ray() {
|
|
@@ -64348,7 +64352,7 @@ const Jc = class {
|
|
|
64348
64352
|
switch (e) {
|
|
64349
64353
|
case "immersive-ar":
|
|
64350
64354
|
return {
|
|
64351
|
-
optionalFeatures: ["anchors", "local-floor", "hand-tracking", "layers", "dom-overlay", "hit-test"]
|
|
64355
|
+
optionalFeatures: ["anchors", "local-floor", "hand-tracking", "layers", "dom-overlay", "hit-test", "unbounded"]
|
|
64352
64356
|
};
|
|
64353
64357
|
case "immersive-vr":
|
|
64354
64358
|
return {
|
|
@@ -66187,7 +66191,7 @@ class rue {
|
|
|
66187
66191
|
intersect(e, t, i, n) {
|
|
66188
66192
|
var r;
|
|
66189
66193
|
for (const o of t) {
|
|
66190
|
-
if (o.visible === !1 || _t.isGizmo(o) || n.lineThreshold !== void 0 && n.lineThreshold < 0 && o instanceof Pn)
|
|
66194
|
+
if (!o || o.visible === !1 || _t.isGizmo(o) || n.lineThreshold !== void 0 && n.lineThreshold < 0 && o instanceof Pn)
|
|
66191
66195
|
continue;
|
|
66192
66196
|
const a = (r = n.testObject) == null ? void 0 : r.call(n, o);
|
|
66193
66197
|
if (a === !1)
|
|
@@ -72183,7 +72187,7 @@ class LS extends e_ {
|
|
|
72183
72187
|
performRaycast(e) {
|
|
72184
72188
|
if (!Et.active || !(e != null && e.ray))
|
|
72185
72189
|
return null;
|
|
72186
|
-
const t = e.ray.origin, i = 0.
|
|
72190
|
+
const t = e.ray.origin, i = 0.015;
|
|
72187
72191
|
return this.context.physics.sphereOverlap(t, i);
|
|
72188
72192
|
}
|
|
72189
72193
|
}
|
|
@@ -87891,6 +87895,7 @@ class bge {
|
|
|
87891
87895
|
case 1:
|
|
87892
87896
|
this._dragPlane.setFromNormalAndCoplanarPoint(i, o);
|
|
87893
87897
|
break;
|
|
87898
|
+
case 4:
|
|
87894
87899
|
case 3:
|
|
87895
87900
|
const v = new w(0, 1, 0), _ = i, A = v.angleTo(_), b = 0.5;
|
|
87896
87901
|
A > Math.PI / 2 + b || A < Math.PI / 2 - b ? this._dragPlane.setFromNormalAndCoplanarPoint(new w(0, 1, 0), o) : this._dragPlane.setFromNormalAndCoplanarPoint(i, o);
|