spoint 0.1.52 → 0.1.54
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/client/MobileControls.js +2 -2
- package/client/app.js +9 -7
- package/package.json +1 -1
package/client/MobileControls.js
CHANGED
|
@@ -141,8 +141,8 @@ export class MobileControls {
|
|
|
141
141
|
const buttonsRightOffset = Math.max(10, margin)
|
|
142
142
|
const buttonsBottomOffset = bottomMargin + 60
|
|
143
143
|
|
|
144
|
-
const lookRight = Math.min(
|
|
145
|
-
const lookBottom = bottomMargin + joystickDiameter / 2
|
|
144
|
+
const lookRight = Math.min(80, w * 0.15)
|
|
145
|
+
const lookBottom = bottomMargin + joystickDiameter / 2
|
|
146
146
|
|
|
147
147
|
const lookJoystickPos = {
|
|
148
148
|
x: w - lookRight - joystickDiameter,
|
package/client/app.js
CHANGED
|
@@ -94,13 +94,15 @@ let arButton = null
|
|
|
94
94
|
let arEnabled = false
|
|
95
95
|
const deviceInfo = detectDevice()
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
if (deviceInfo.isMobile) {
|
|
98
|
+
mobileControls = new MobileControls({
|
|
99
|
+
joystickRadius: 45,
|
|
100
|
+
rotationSensitivity: 0.003,
|
|
101
|
+
zoomSensitivity: 0.008
|
|
102
|
+
})
|
|
103
|
+
inputConfig.pointerLock = false
|
|
104
|
+
console.log('[Mobile] Touch controls initialized:', deviceInfo)
|
|
105
|
+
}
|
|
104
106
|
|
|
105
107
|
arControls = new ARControls({ placementMode: true, planeDetection: true })
|
|
106
108
|
const arReticle = arControls.createReticle()
|