@needle-tools/engine 3.32.26-alpha → 3.32.27-alpha
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 +5 -0
- package/dist/needle-engine.js +2031 -2029
- package/dist/needle-engine.light.js +21 -19
- package/dist/needle-engine.light.min.js +5 -5
- package/dist/needle-engine.light.umd.cjs +5 -5
- package/dist/needle-engine.min.js +157 -157
- package/dist/needle-engine.umd.cjs +5 -5
- package/lib/engine/engine_input.d.ts +10 -4
- package/lib/engine/engine_input.js +9 -6
- package/lib/engine/engine_input.js.map +1 -1
- package/lib/engine-components/export/usdz/USDZExporter.js +1 -1
- package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
- package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js +3 -0
- package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js.map +1 -1
- package/lib/engine-components/webxr/WebARSessionRoot.js +8 -8
- package/lib/engine-components/webxr/WebARSessionRoot.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/engine_input.ts +17 -6
- package/src/engine-components/export/usdz/USDZExporter.ts +1 -1
- package/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts +3 -0
- package/src/engine-components/webxr/WebARSessionRoot.ts +10 -10
|
@@ -32838,13 +32838,13 @@ class _x {
|
|
|
32838
32838
|
}
|
|
32839
32839
|
h(_x, "eventListeners", /* @__PURE__ */ new Map());
|
|
32840
32840
|
const j3 = ne("debugdefines");
|
|
32841
|
-
Tp('if(!globalThis[""3.32.
|
|
32841
|
+
Tp('if(!globalThis[""3.32.27-alpha""]) globalThis[""3.32.27-alpha""] = "0.0.0";');
|
|
32842
32842
|
Tp('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
32843
|
-
Tp('if(!globalThis[""
|
|
32844
|
-
Tp('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.32.
|
|
32843
|
+
Tp('if(!globalThis[""Mon Feb 26 2024 22:30:25 GMT+0800 (Pacific Standard Time)""]) globalThis[""Mon Feb 26 2024 22:30:25 GMT+0800 (Pacific Standard Time)""] = "unknown";');
|
|
32844
|
+
Tp('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.32.27-alpha";');
|
|
32845
32845
|
Tp('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
32846
|
-
Tp('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
32847
|
-
const ll = "3.32.
|
|
32846
|
+
Tp('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Feb 26 2024 22:30:25 GMT+0800 (Pacific Standard Time)";');
|
|
32847
|
+
const ll = "3.32.27-alpha", AI = "undefined", LY = "Mon Feb 26 2024 22:30:25 GMT+0800 (Pacific Standard Time)";
|
|
32848
32848
|
j3 && console.log(`Engine version: ${ll} (generator: ${AI})
|
|
32849
32849
|
Project built at ${LY}`);
|
|
32850
32850
|
const Sh = "needle_isActiveInHierarchy", gf = "builtin_components", Fy = "needle_editor_guid";
|
|
@@ -43174,24 +43174,26 @@ class LZ {
|
|
|
43174
43174
|
/** Adds an event listener for the specified event type. The callback will be called when the event is triggered.
|
|
43175
43175
|
* @param type The event type to listen for
|
|
43176
43176
|
* @param callback The callback to call when the event is triggered
|
|
43177
|
-
* @param
|
|
43177
|
+
* @param options The options for adding the event listener
|
|
43178
43178
|
*/
|
|
43179
|
-
addEventListener(e, t, i
|
|
43179
|
+
addEventListener(e, t, i) {
|
|
43180
43180
|
this._eventListeners[e] || (this._eventListeners[e] = []);
|
|
43181
|
-
|
|
43182
|
-
|
|
43181
|
+
let s = 0;
|
|
43182
|
+
(i == null ? void 0 : i.queue) != null && (s = i.queue);
|
|
43183
|
+
const r = this._eventListeners[e], o = r.find((a) => a.priority === s);
|
|
43184
|
+
o ? o.listeners.push(t) : (r.push({ priority: s, listeners: [t] }), r.sort((a, c) => a.priority - c.priority));
|
|
43183
43185
|
}
|
|
43184
43186
|
/** Removes the event listener from the specified event type. If no queue is specified the listener will be removed from all queues.
|
|
43185
43187
|
* @param type The event type to remove the listener from
|
|
43186
43188
|
* @param callback The callback to remove
|
|
43187
|
-
* @param
|
|
43189
|
+
* @param options The options for removing the event listener
|
|
43188
43190
|
*/
|
|
43189
43191
|
removeEventListener(e, t, i) {
|
|
43190
43192
|
if (!this._eventListeners[e])
|
|
43191
43193
|
return;
|
|
43192
43194
|
const s = this._eventListeners[e];
|
|
43193
|
-
if (i
|
|
43194
|
-
const r = s.find((a) => a.priority === i);
|
|
43195
|
+
if ((i == null ? void 0 : i.queue) != null) {
|
|
43196
|
+
const r = s.find((a) => a.priority === i.queue);
|
|
43195
43197
|
if (!r)
|
|
43196
43198
|
return;
|
|
43197
43199
|
const o = r.listeners.indexOf(t);
|
|
@@ -70436,7 +70438,7 @@ class hd extends Ie {
|
|
|
70436
70438
|
let u = !1;
|
|
70437
70439
|
if (this.gameObject.traverse((d) => {
|
|
70438
70440
|
d instanceof me && d.visible && (u = !0);
|
|
70439
|
-
}), u) {
|
|
70441
|
+
}), u = !0, u) {
|
|
70440
70442
|
let d = mi.playAudioAction(o, "audio/" + a, eM.Play, c, l);
|
|
70441
70443
|
this.toggleOnClick && (d.multiplePerformOperation = pz.Stop), this.target && this.target.loop && (d = mi.sequence(d).makeLooping());
|
|
70442
70444
|
const f = new fs(
|
|
@@ -71801,7 +71803,7 @@ void main() {
|
|
|
71801
71803
|
void main() {
|
|
71802
71804
|
vec2 uv = vUv - vec2(0.5) / resolution;
|
|
71803
71805
|
vec2 pixelSize = vec2(1.0) / resolution;
|
|
71804
|
-
vec2[4] uvSamples;
|
|
71806
|
+
highp vec2[4] uvSamples;
|
|
71805
71807
|
uvSamples[0] = uv;
|
|
71806
71808
|
uvSamples[1] = uv + vec2(pixelSize.x, 0.0);
|
|
71807
71809
|
uvSamples[2] = uv + vec2(0.0, pixelSize.y);
|
|
@@ -74316,10 +74318,10 @@ class Zo extends Ie {
|
|
|
74316
74318
|
this.context.scene.add(i), this._reparentedComponents.length = 0, this._reparentedComponents.push({ comp: this, originalObject: this.gameObject }), le.addComponent(i, this);
|
|
74317
74319
|
for (const s of this._reticle)
|
|
74318
74320
|
yc(s);
|
|
74319
|
-
this._reticle.length = 0, this._isPlacing = !0, this.context.input.addEventListener("pointerup", this.onPlaceScene, Kc.Early);
|
|
74321
|
+
this._reticle.length = 0, this._isPlacing = !0, this.context.input.addEventListener("pointerup", this.onPlaceScene, { queue: Kc.Early });
|
|
74320
74322
|
}
|
|
74321
74323
|
onLeaveXR() {
|
|
74322
|
-
this.context.input.removeEventListener("pointerup", this.onPlaceScene, Kc.Early), this.onRevertSceneChanges(), this._anchor = null, this._rigPlacementMatrix = void 0;
|
|
74324
|
+
this.context.input.removeEventListener("pointerup", this.onPlaceScene, { queue: Kc.Early }), this.onRevertSceneChanges(), this._anchor = null, this._rigPlacementMatrix = void 0;
|
|
74323
74325
|
}
|
|
74324
74326
|
onUpdateXR(t) {
|
|
74325
74327
|
var i, s, r, o;
|
|
@@ -74550,10 +74552,10 @@ const yb = class {
|
|
|
74550
74552
|
return this.currentlyUsedPointerIds.size <= 0 && this.currentlyUnusedPointerIds.size > 0;
|
|
74551
74553
|
}
|
|
74552
74554
|
enable() {
|
|
74553
|
-
this._enabled || (this._enabled = !0, this.context.input.addEventListener("pointerdown", this.onPointerDownEarly, Kc.Early), this.context.input.addEventListener("pointerdown", this.onPointerDownLate, Kc.Late), this.context.input.addEventListener("pointerup", this.onPointerUpEarly, Kc.Early), window.addEventListener("touchstart", this.touchStart, { passive: !1 }), window.addEventListener("touchmove", this.touchMove, { passive: !1 }), window.addEventListener("touchend", this.touchEnd, { passive: !1 }));
|
|
74555
|
+
this._enabled || (this._enabled = !0, this.context.input.addEventListener("pointerdown", this.onPointerDownEarly, { queue: Kc.Early }), this.context.input.addEventListener("pointerdown", this.onPointerDownLate, { queue: Kc.Late }), this.context.input.addEventListener("pointerup", this.onPointerUpEarly, { queue: Kc.Early }), window.addEventListener("touchstart", this.touchStart, { passive: !1 }), window.addEventListener("touchmove", this.touchMove, { passive: !1 }), window.addEventListener("touchend", this.touchEnd, { passive: !1 }));
|
|
74554
74556
|
}
|
|
74555
74557
|
disable() {
|
|
74556
|
-
this._enabled && (this._enabled = !1, this.context.input.removeEventListener("pointerdown", this.onPointerDownEarly, Kc.Early), this.context.input.removeEventListener("pointerdown", this.onPointerDownLate, Kc.Late), this.context.input.removeEventListener("pointerup", this.onPointerUpEarly, Kc.Early), window.removeEventListener("touchstart", this.touchStart), window.removeEventListener("touchmove", this.touchMove), window.removeEventListener("touchend", this.touchEnd));
|
|
74558
|
+
this._enabled && (this._enabled = !1, this.context.input.removeEventListener("pointerdown", this.onPointerDownEarly, { queue: Kc.Early }), this.context.input.removeEventListener("pointerdown", this.onPointerDownLate, { queue: Kc.Late }), this.context.input.removeEventListener("pointerup", this.onPointerUpEarly, { queue: Kc.Early }), window.removeEventListener("touchstart", this.touchStart), window.removeEventListener("touchmove", this.touchMove), window.removeEventListener("touchend", this.touchEnd));
|
|
74557
74559
|
}
|
|
74558
74560
|
getPositionOnPlane(e, t) {
|
|
74559
74561
|
const i = this.context.mainCamera;
|
|
@@ -75470,7 +75472,7 @@ const hM = (d1 = class extends Ie {
|
|
|
75470
75472
|
extensions: a,
|
|
75471
75473
|
quickLookCompatible: this.quickLookCompatible,
|
|
75472
75474
|
maxTextureSize: this.maxTextureSize
|
|
75473
|
-
}), p = new Blob([f], { type: "vnd.usdz+zip" });
|
|
75475
|
+
}), p = new Blob([f], { type: "model/vnd.usdz+zip" });
|
|
75474
75476
|
for (const m of u)
|
|
75475
75477
|
le.destroy(m);
|
|
75476
75478
|
return ai.report("export-usdz", "Invoking after-export"), this.dispatchEvent(new CustomEvent("after-export", { detail: l })), tr.Global.Set(r), ai.end("export-usdz"), p;
|