@needle-tools/engine 4.0.2-alpha → 4.0.2-alpha.1
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/dist/needle-engine.js +313 -297
- package/dist/needle-engine.light.js +23 -7
- package/dist/needle-engine.light.min.js +23 -23
- package/dist/needle-engine.light.umd.cjs +2 -2
- package/dist/needle-engine.min.js +2 -2
- package/dist/needle-engine.umd.cjs +2 -2
- package/lib/engine-components/OrbitControls.js +8 -2
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/package.json +1 -1
- package/src/engine-components/OrbitControls.ts +6 -2
|
@@ -29770,15 +29770,15 @@ function rre() {
|
|
|
29770
29770
|
return s || null;
|
|
29771
29771
|
}
|
|
29772
29772
|
const R4 = ie("debugdefines");
|
|
29773
|
-
zd('if(!globalThis[""4.0.2-alpha""]) globalThis[""4.0.2-alpha""] = "0.0.0";');
|
|
29773
|
+
zd('if(!globalThis[""4.0.2-alpha.1""]) globalThis[""4.0.2-alpha.1""] = "0.0.0";');
|
|
29774
29774
|
zd('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
29775
|
-
zd('if(!globalThis[""Thu Dec 12 2024 16:
|
|
29775
|
+
zd('if(!globalThis[""Thu Dec 12 2024 16:54:57 GMT+0100 (Central European Standard Time)""]) globalThis[""Thu Dec 12 2024 16:54:57 GMT+0100 (Central European Standard Time)""] = "unknown";');
|
|
29776
29776
|
zd('if(!globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""]) globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""] = "unknown";');
|
|
29777
|
-
zd('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.0.2-alpha";');
|
|
29777
|
+
zd('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.0.2-alpha.1";');
|
|
29778
29778
|
zd('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
29779
|
-
zd('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Thu Dec 12 2024 16:
|
|
29779
|
+
zd('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Thu Dec 12 2024 16:54:57 GMT+0100 (Central European Standard Time)";');
|
|
29780
29780
|
zd('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9";');
|
|
29781
|
-
const Tc = "4.0.2-alpha", pD = "undefined", I4 = "Thu Dec 12 2024 16:
|
|
29781
|
+
const Tc = "4.0.2-alpha.1", pD = "undefined", I4 = "Thu Dec 12 2024 16:54:57 GMT+0100 (Central European Standard Time)";
|
|
29782
29782
|
R4 && console.log(`Engine version: ${Tc} (generator: ${pD})
|
|
29783
29783
|
Project built at ${I4}`);
|
|
29784
29784
|
const h1 = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9", xd = "needle_isActiveInHierarchy", Eg = "builtin_components", u1 = "needle_editor_guid";
|
|
@@ -76139,12 +76139,28 @@ class ki extends Ie {
|
|
|
76139
76139
|
const n = this.targetElement ?? this.context.renderer.domElement, r = i == null ? void 0 : i.quaternion.clone();
|
|
76140
76140
|
this._controls = new VZ(i, n), i == null || i.quaternion.copy(r), VI === void 0 && (VI = { ...this._controls.keys });
|
|
76141
76141
|
}
|
|
76142
|
-
|
|
76142
|
+
if (this._controls)
|
|
76143
|
+
if (UI && (this.enablePan = !0, this.enableZoom = !0, this.middleClickToFocus = !0, St.isMobileDevice() && (this.doubleClickToFocus = !0)), this._controls.addEventListener("start", this.onControlsChangeStarted), !this._startedListeningToKeyEvents && this.enableKeys)
|
|
76144
|
+
this._startedListeningToKeyEvents = !0, this._controls.listenToKeyEvents(this.context.domElement);
|
|
76145
|
+
else
|
|
76146
|
+
try {
|
|
76147
|
+
this._controls.stopListenToKeyEvents();
|
|
76148
|
+
} catch {
|
|
76149
|
+
}
|
|
76150
|
+
this._syncedTransform = ne.getComponent(this.gameObject, su) ?? void 0, this.context.pre_render_callbacks.push(this.__onPreRender), this._activePointerEvents = [], this.context.input.addEventListener("pointerdown", this._onPointerDown, { queue: Ha.Early }), this.context.input.addEventListener("pointerup", this._onPointerUp, { queue: Ha.Early }), this.context.input.addEventListener("pointerup", this._onPointerUpLate, { queue: Ha.Late });
|
|
76143
76151
|
}
|
|
76144
76152
|
/** @internal */
|
|
76145
76153
|
onDisable() {
|
|
76146
76154
|
var t;
|
|
76147
|
-
(t = this._camera) != null && t.threeCamera && SN(this._camera.threeCamera, this, !1), this._controls
|
|
76155
|
+
if ((t = this._camera) != null && t.threeCamera && SN(this._camera.threeCamera, this, !1), this._controls) {
|
|
76156
|
+
this._controls.enabled = !1, this._controls.autoRotate = !1, this._controls.removeEventListener("start", this.onControlsChangeStarted);
|
|
76157
|
+
try {
|
|
76158
|
+
this._controls.stopListenToKeyEvents();
|
|
76159
|
+
} catch {
|
|
76160
|
+
}
|
|
76161
|
+
this._startedListeningToKeyEvents = !1;
|
|
76162
|
+
}
|
|
76163
|
+
this._activePointerEvents.length = 0, this.context.input.removeEventListener("pointerdown", this._onPointerDown), this.context.input.removeEventListener("pointerup", this._onPointerUp), this.context.input.removeEventListener("pointerup", this._onPointerUpLate);
|
|
76148
76164
|
}
|
|
76149
76165
|
afterHandleInput(t) {
|
|
76150
76166
|
t.detail.args.pointerId === 0 && (t.detail.args.isDown ? this._controls && this._eventSystem && (this._shouldDisable = this._eventSystem.hasActiveUI) : (!t.detail.args.isPressed || t.detail.args.isUp) && (this._shouldDisable = !1));
|