@needle-tools/engine 3.37.12-alpha.3 → 3.37.12-alpha.5
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 -0
- package/dist/needle-engine.js +28 -20
- package/dist/needle-engine.light.js +28 -20
- package/dist/needle-engine.light.min.js +3 -3
- package/dist/needle-engine.light.umd.cjs +3 -3
- package/dist/needle-engine.min.js +3 -3
- package/dist/needle-engine.umd.cjs +3 -3
- package/lib/engine-components/webxr/WebARSessionRoot.js +4 -2
- package/lib/engine-components/webxr/WebARSessionRoot.js.map +1 -1
- package/package.json +2 -2
- package/plugins/vite/config.js +4 -4
- package/plugins/vite/meta.js +2 -2
- package/src/engine-components/webxr/WebARSessionRoot.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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.37.12-alpha.5] - 2024-05-19
|
|
8
|
+
- Fix: Bump `gltf-progressive` package to support updating LODs when using postprocessing effects
|
|
9
|
+
|
|
10
|
+
## [3.37.12-alpha.4] - 2024-05-18
|
|
11
|
+
- Fix: AR placement being prevented by other scripts that caused the event being `used`
|
|
12
|
+
|
|
7
13
|
## [3.37.12-alpha.1] - 2024-05-17
|
|
8
14
|
- Fix: USDZ rel arrays must contain no duplicate entries
|
|
9
15
|
- Change: Renderer now manually calls reset for stats at the very end of a frame
|
package/dist/needle-engine.js
CHANGED
|
@@ -29513,13 +29513,13 @@ function EwA(g) {
|
|
|
29513
29513
|
WU = g;
|
|
29514
29514
|
}
|
|
29515
29515
|
const AP = IA("debugdefines");
|
|
29516
|
-
bh('if(!globalThis[""3.37.12-alpha.
|
|
29516
|
+
bh('if(!globalThis[""3.37.12-alpha.5""]) globalThis[""3.37.12-alpha.5""] = "0.0.0";');
|
|
29517
29517
|
bh('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
29518
|
-
bh('if(!globalThis[""
|
|
29519
|
-
bh('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.37.12-alpha.
|
|
29518
|
+
bh('if(!globalThis[""Sun May 19 2024 11:30:57 GMT+0200 (Central European Summer Time)""]) globalThis[""Sun May 19 2024 11:30:57 GMT+0200 (Central European Summer Time)""] = "unknown";');
|
|
29519
|
+
bh('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.37.12-alpha.5";');
|
|
29520
29520
|
bh('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
29521
|
-
bh('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
29522
|
-
const en = "3.37.12-alpha.
|
|
29521
|
+
bh('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Sun May 19 2024 11:30:57 GMT+0200 (Central European Summer Time)";');
|
|
29522
|
+
const en = "3.37.12-alpha.5", Xb = "undefined", eP = "Sun May 19 2024 11:30:57 GMT+0200 (Central European Summer Time)";
|
|
29523
29523
|
AP && console.log(`Engine version: ${en} (generator: ${Xb})
|
|
29524
29524
|
Project built at ${eP}`);
|
|
29525
29525
|
const Jr = "needle_isActiveInHierarchy", Ec = "builtin_components", Cy = "needle_editor_guid";
|
|
@@ -38952,24 +38952,32 @@ const pM = QK("debugprogressive"), AIA = QK("noprogressive"), Fn = class {
|
|
|
38952
38952
|
onBeforeRender(g, A, e, t) {
|
|
38953
38953
|
}
|
|
38954
38954
|
onAfterRender(g, A, e, t) {
|
|
38955
|
-
var
|
|
38956
|
-
if (
|
|
38955
|
+
var s, n;
|
|
38956
|
+
if (this.pause)
|
|
38957
|
+
return;
|
|
38958
|
+
const i = this.renderer.renderLists.get(g, 0), I = i.opaque;
|
|
38959
|
+
let o = !0;
|
|
38960
|
+
if (I.length === 1) {
|
|
38961
|
+
const C = I[0].material;
|
|
38962
|
+
(C.name === "EffectMaterial" || C.name === "CopyShader") && (o = !1);
|
|
38963
|
+
}
|
|
38964
|
+
if (o) {
|
|
38957
38965
|
if (AIA || this.updateInterval > 0 && t % this.updateInterval != 0)
|
|
38958
38966
|
return;
|
|
38959
38967
|
this.projectionScreenMatrix.multiplyMatrices(A.projectionMatrix, A.matrixWorldInverse), this.cameraFrustrum.setFromProjectionMatrix(this.projectionScreenMatrix, this.renderer.coordinateSystem);
|
|
38960
|
-
const
|
|
38961
|
-
for (const
|
|
38962
|
-
if (
|
|
38963
|
-
pM && (
|
|
38968
|
+
const C = 1e5;
|
|
38969
|
+
for (const r of I) {
|
|
38970
|
+
if (r.material && (((s = r.geometry) == null ? void 0 : s.type) === "BoxGeometry" || ((n = r.geometry) == null ? void 0 : n.type) === "BufferGeometry") && (r.material.name === "SphericalGaussianBlur" || r.material.name == "BackgroundCubeMaterial" || r.material.name === "CubemapFromEquirect" || r.material.name === "EquirectangularToCubeUV")) {
|
|
38971
|
+
pM && (r.material["NEEDLE_PROGRESSIVE:IGNORE-WARNING"] || (r.material["NEEDLE_PROGRESSIVE:IGNORE-WARNING"] = !0, console.warn("Ignoring skybox or BLIT object", r, r.material.name, r.material.type)));
|
|
38964
38972
|
continue;
|
|
38965
38973
|
}
|
|
38966
|
-
const
|
|
38967
|
-
(
|
|
38974
|
+
const Q = r.object;
|
|
38975
|
+
(Q instanceof Wr || Q.isMesh) && this.updateLODs(g, A, Q, C);
|
|
38968
38976
|
}
|
|
38969
|
-
const
|
|
38970
|
-
for (const
|
|
38971
|
-
const
|
|
38972
|
-
(
|
|
38977
|
+
const a = i.transparent;
|
|
38978
|
+
for (const r of a) {
|
|
38979
|
+
const Q = r.object;
|
|
38980
|
+
(Q instanceof Wr || Q.isMesh) && this.updateLODs(g, A, Q, C);
|
|
38973
38981
|
}
|
|
38974
38982
|
}
|
|
38975
38983
|
}
|
|
@@ -83158,7 +83166,7 @@ class ks extends FA {
|
|
|
83158
83166
|
console.warn("Scene Placement is disabled while images are being tracked");
|
|
83159
83167
|
return;
|
|
83160
83168
|
}
|
|
83161
|
-
e.stopImmediatePropagation(), e.use(), this._isPlacing = !1, this.context.input.removeEventListener("pointerup", this.onPlaceScene), this.onRevertSceneChanges(), t.position.copy(t.lastPos), t.quaternion.copy(t.lastQuat), this.onApplyPose(t), this.useXRAnchor && this.onCreateAnchor(we.active, i);
|
|
83169
|
+
e.stopImmediatePropagation(), e.stopPropagation(), e.use(), this._isPlacing = !1, this.context.input.removeEventListener("pointerup", this.onPlaceScene), this.onRevertSceneChanges(), t.position.copy(t.lastPos), t.quaternion.copy(t.lastQuat), this.onApplyPose(t), this.useXRAnchor && this.onCreateAnchor(we.active, i);
|
|
83162
83170
|
});
|
|
83163
83171
|
B(this, "upVec", new S(0, 1, 0));
|
|
83164
83172
|
B(this, "lookPoint", new S());
|
|
@@ -83188,10 +83196,10 @@ class ks extends FA {
|
|
|
83188
83196
|
this.context.scene.add(t), this._reparentedComponents.length = 0, this._reparentedComponents.push({ comp: this, originalObject: this.gameObject }), nA.addComponent(t, this);
|
|
83189
83197
|
for (const i of this._reticle)
|
|
83190
83198
|
CC(i);
|
|
83191
|
-
this._reticle.length = 0, this._isPlacing = !0, this.context.input.addEventListener("pointerup", this.onPlaceScene, { queue: jC.
|
|
83199
|
+
this._reticle.length = 0, this._isPlacing = !0, this.context.input.addEventListener("pointerup", this.onPlaceScene, { queue: jC.Early });
|
|
83192
83200
|
}
|
|
83193
83201
|
onLeaveXR() {
|
|
83194
|
-
this.context.input.removeEventListener("pointerup", this.onPlaceScene, { queue: jC.
|
|
83202
|
+
this.context.input.removeEventListener("pointerup", this.onPlaceScene, { queue: jC.Early }), this.onRevertSceneChanges(), this._anchor = null, this._rigPlacementMatrix = void 0;
|
|
83195
83203
|
}
|
|
83196
83204
|
onUpdateXR(e) {
|
|
83197
83205
|
var t, i, I, o;
|
|
@@ -29513,13 +29513,13 @@ function Ube(s) {
|
|
|
29513
29513
|
DT = s;
|
|
29514
29514
|
}
|
|
29515
29515
|
const yG = ne("debugdefines");
|
|
29516
|
-
rm('if(!globalThis[""3.37.12-alpha.
|
|
29516
|
+
rm('if(!globalThis[""3.37.12-alpha.5""]) globalThis[""3.37.12-alpha.5""] = "0.0.0";');
|
|
29517
29517
|
rm('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
29518
|
-
rm('if(!globalThis[""
|
|
29519
|
-
rm('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.37.12-alpha.
|
|
29518
|
+
rm('if(!globalThis[""Sun May 19 2024 11:31:08 GMT+0200 (Central European Summer Time)""]) globalThis[""Sun May 19 2024 11:31:08 GMT+0200 (Central European Summer Time)""] = "unknown";');
|
|
29519
|
+
rm('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.37.12-alpha.5";');
|
|
29520
29520
|
rm('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
29521
|
-
rm('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
29522
|
-
const za = "3.37.12-alpha.
|
|
29521
|
+
rm('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Sun May 19 2024 11:31:08 GMT+0200 (Central European Summer Time)";');
|
|
29522
|
+
const za = "3.37.12-alpha.5", zP = "undefined", vG = "Sun May 19 2024 11:31:08 GMT+0200 (Central European Summer Time)";
|
|
29523
29523
|
yG && console.log(`Engine version: ${za} (generator: ${zP})
|
|
29524
29524
|
Project built at ${vG}`);
|
|
29525
29525
|
const mu = "needle_isActiveInHierarchy", Vp = "builtin_components", wx = "needle_editor_guid";
|
|
@@ -38952,24 +38952,32 @@ const a1 = iD("debugprogressive"), wne = iD("noprogressive"), Ac = class {
|
|
|
38952
38952
|
onBeforeRender(s, e, t, i) {
|
|
38953
38953
|
}
|
|
38954
38954
|
onAfterRender(s, e, t, i) {
|
|
38955
|
-
var
|
|
38956
|
-
if (
|
|
38955
|
+
var a, c;
|
|
38956
|
+
if (this.pause)
|
|
38957
|
+
return;
|
|
38958
|
+
const n = this.renderer.renderLists.get(s, 0), r = n.opaque;
|
|
38959
|
+
let o = !0;
|
|
38960
|
+
if (r.length === 1) {
|
|
38961
|
+
const l = r[0].material;
|
|
38962
|
+
(l.name === "EffectMaterial" || l.name === "CopyShader") && (o = !1);
|
|
38963
|
+
}
|
|
38964
|
+
if (o) {
|
|
38957
38965
|
if (wne || this.updateInterval > 0 && i % this.updateInterval != 0)
|
|
38958
38966
|
return;
|
|
38959
38967
|
this.projectionScreenMatrix.multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse), this.cameraFrustrum.setFromProjectionMatrix(this.projectionScreenMatrix, this.renderer.coordinateSystem);
|
|
38960
|
-
const
|
|
38961
|
-
for (const
|
|
38962
|
-
if (
|
|
38963
|
-
a1 && (
|
|
38968
|
+
const l = 1e5;
|
|
38969
|
+
for (const d of r) {
|
|
38970
|
+
if (d.material && (((a = d.geometry) == null ? void 0 : a.type) === "BoxGeometry" || ((c = d.geometry) == null ? void 0 : c.type) === "BufferGeometry") && (d.material.name === "SphericalGaussianBlur" || d.material.name == "BackgroundCubeMaterial" || d.material.name === "CubemapFromEquirect" || d.material.name === "EquirectangularToCubeUV")) {
|
|
38971
|
+
a1 && (d.material["NEEDLE_PROGRESSIVE:IGNORE-WARNING"] || (d.material["NEEDLE_PROGRESSIVE:IGNORE-WARNING"] = !0, console.warn("Ignoring skybox or BLIT object", d, d.material.name, d.material.type)));
|
|
38964
38972
|
continue;
|
|
38965
38973
|
}
|
|
38966
|
-
const
|
|
38967
|
-
(
|
|
38974
|
+
const f = d.object;
|
|
38975
|
+
(f instanceof Iu || f.isMesh) && this.updateLODs(s, e, f, l);
|
|
38968
38976
|
}
|
|
38969
|
-
const
|
|
38970
|
-
for (const
|
|
38971
|
-
const
|
|
38972
|
-
(
|
|
38977
|
+
const h = n.transparent;
|
|
38978
|
+
for (const d of h) {
|
|
38979
|
+
const f = d.object;
|
|
38980
|
+
(f instanceof Iu || f.isMesh) && this.updateLODs(s, e, f, l);
|
|
38973
38981
|
}
|
|
38974
38982
|
}
|
|
38975
38983
|
}
|
|
@@ -83158,7 +83166,7 @@ class Aa extends Te {
|
|
|
83158
83166
|
console.warn("Scene Placement is disabled while images are being tracked");
|
|
83159
83167
|
return;
|
|
83160
83168
|
}
|
|
83161
|
-
t.stopImmediatePropagation(), t.use(), this._isPlacing = !1, this.context.input.removeEventListener("pointerup", this.onPlaceScene), this.onRevertSceneChanges(), i.position.copy(i.lastPos), i.quaternion.copy(i.lastQuat), this.onApplyPose(i), this.useXRAnchor && this.onCreateAnchor(xt.active, n);
|
|
83169
|
+
t.stopImmediatePropagation(), t.stopPropagation(), t.use(), this._isPlacing = !1, this.context.input.removeEventListener("pointerup", this.onPlaceScene), this.onRevertSceneChanges(), i.position.copy(i.lastPos), i.quaternion.copy(i.lastQuat), this.onApplyPose(i), this.useXRAnchor && this.onCreateAnchor(xt.active, n);
|
|
83162
83170
|
});
|
|
83163
83171
|
u(this, "upVec", new S(0, 1, 0));
|
|
83164
83172
|
u(this, "lookPoint", new S());
|
|
@@ -83188,10 +83196,10 @@ class Aa extends Te {
|
|
|
83188
83196
|
this.context.scene.add(i), this._reparentedComponents.length = 0, this._reparentedComponents.push({ comp: this, originalObject: this.gameObject }), oe.addComponent(i, this);
|
|
83189
83197
|
for (const n of this._reticle)
|
|
83190
83198
|
Xc(n);
|
|
83191
|
-
this._reticle.length = 0, this._isPlacing = !0, this.context.input.addEventListener("pointerup", this.onPlaceScene, { queue: Dl.
|
|
83199
|
+
this._reticle.length = 0, this._isPlacing = !0, this.context.input.addEventListener("pointerup", this.onPlaceScene, { queue: Dl.Early });
|
|
83192
83200
|
}
|
|
83193
83201
|
onLeaveXR() {
|
|
83194
|
-
this.context.input.removeEventListener("pointerup", this.onPlaceScene, { queue: Dl.
|
|
83202
|
+
this.context.input.removeEventListener("pointerup", this.onPlaceScene, { queue: Dl.Early }), this.onRevertSceneChanges(), this._anchor = null, this._rigPlacementMatrix = void 0;
|
|
83195
83203
|
}
|
|
83196
83204
|
onUpdateXR(t) {
|
|
83197
83205
|
var i, n, r, o;
|