fix PointerLockControls erratic behaviour
This commit is contained in:
Generated
+6
-6
@@ -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": {
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user