From f7d6244fa50aa7e37ff69aa2c01d655344874218 Mon Sep 17 00:00:00 2001 From: goynov Date: Sun, 30 Nov 2025 11:44:18 +0200 Subject: [PATCH] fix PointerLockControls erratic behaviour --- package-lock.json | 12 ++++++------ package.json | 2 +- src/lib/Hero.js | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index f46c140..47c0eb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pronature-platform", - "version": "0.2.0", + "version": "0.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pronature-platform", - "version": "0.2.0", + "version": "0.7.0", "dependencies": { "@mdi/font": "7.4.47", "@vitejs/plugin-basic-ssl": "^1.1.0", @@ -24,7 +24,6 @@ "mongodb": "^6.10.0", "roboto-fontface": "*", "sharp": "^0.33.5", - "three": "^0.169.0", "three-viewport-gizmo": "^2.2.0", "uuid": "^11.0.2", "vue": "^3.5.13", @@ -43,6 +42,7 @@ "eslint-plugin-vue": "^9.27.0", "pinia": "^2.1.7", "sass": "1.77.6", + "three": "^0.181.2", "troika-three-text": "^0.52.4", "unplugin-auto-import": "^0.17.6", "unplugin-fonts": "^1.1.1", @@ -7169,9 +7169,9 @@ "license": "MIT" }, "node_modules/three": { - "version": "0.169.0", - "resolved": "https://registry.npmjs.org/three/-/three-0.169.0.tgz", - "integrity": "sha512-Ed906MA3dR4TS5riErd4QBsRGPcx+HBDX2O5yYE5GqJeFQTPU+M56Va/f/Oph9X7uZo3W3o4l2ZhBZ6f6qUv0w==", + "version": "0.181.2", + "resolved": "https://registry.npmjs.org/three/-/three-0.181.2.tgz", + "integrity": "sha512-k/CjiZ80bYss6Qs7/ex1TBlPD11whT9oKfT8oTGiHa34W4JRd1NiH/Tr1DbHWQ2/vMUypxksLnF2CfmlmM5XFQ==", "license": "MIT" }, "node_modules/three-viewport-gizmo": { diff --git a/package.json b/package.json index 7739b23..2adb048 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "mongodb": "^6.10.0", "roboto-fontface": "*", "sharp": "^0.33.5", - "three": "^0.169.0", "three-viewport-gizmo": "^2.2.0", "uuid": "^11.0.2", "vue": "^3.5.13", @@ -45,6 +44,7 @@ "eslint-plugin-vue": "^9.27.0", "pinia": "^2.1.7", "sass": "1.77.6", + "three": "^0.181.2", "troika-three-text": "^0.52.4", "unplugin-auto-import": "^0.17.6", "unplugin-fonts": "^1.1.1", diff --git a/src/lib/Hero.js b/src/lib/Hero.js index 424bfce..7502a09 100644 --- a/src/lib/Hero.js +++ b/src/lib/Hero.js @@ -87,7 +87,7 @@ class Hero{ } lockControls(){ - this.pointerControls.controls.lock(); + this.pointerControls.controls.lock(true); } update(delta){ @@ -107,7 +107,7 @@ class Hero{ let pc = this.pointerControls; if (pc.controls.isLocked && this.model.visible){ this.model.visible = false; - this.camera.rotation.reorder('YXZ'); + this.camera.rotation.reorder('YZX'); } if (!pc.controls.isLocked && !this.model.visible){ this.model.visible = true;