spoint 0.1.679 → 0.1.681
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/apps/world/tps-game.js +10 -10
- package/client/app.js +9 -1
- package/package.json +1 -1
package/apps/world/tps-game.js
CHANGED
|
@@ -72,18 +72,18 @@ export default {
|
|
|
72
72
|
feetOffset: 0.212
|
|
73
73
|
},
|
|
74
74
|
scene: {
|
|
75
|
-
skyColor:
|
|
76
|
-
fogColor:
|
|
75
|
+
skyColor: 0xff9a5c,
|
|
76
|
+
fogColor: 0xffb389,
|
|
77
77
|
fogNear: 10000,
|
|
78
78
|
fogFar: 20000,
|
|
79
|
-
ambientColor:
|
|
80
|
-
ambientIntensity: 0.
|
|
81
|
-
sunColor:
|
|
82
|
-
sunIntensity: 1.
|
|
83
|
-
sunPosition: [
|
|
84
|
-
fillColor:
|
|
85
|
-
fillIntensity: 0.
|
|
86
|
-
fillPosition: [-
|
|
79
|
+
ambientColor: 0xffcf9e,
|
|
80
|
+
ambientIntensity: 0.55,
|
|
81
|
+
sunColor: 0xffa552,
|
|
82
|
+
sunIntensity: 1.8,
|
|
83
|
+
sunPosition: [65, 8, 20],
|
|
84
|
+
fillColor: 0xff5f8e,
|
|
85
|
+
fillIntensity: 0.6,
|
|
86
|
+
fillPosition: [-65, 14, -20],
|
|
87
87
|
shadowMapSize: 1024,
|
|
88
88
|
shadowBias: -0.0005,
|
|
89
89
|
shadowNormalBias: 0.05,
|
package/client/app.js
CHANGED
|
@@ -2422,7 +2422,15 @@ function startInputLoop() {
|
|
|
2422
2422
|
ams.dispatchInput(sendInput,engineCtx); client.sendInput(sendInput)
|
|
2423
2423
|
}, 1000/60)
|
|
2424
2424
|
}
|
|
2425
|
-
renderer.domElement.addEventListener('click', ()=>{
|
|
2425
|
+
renderer.domElement.addEventListener('click', ()=>{
|
|
2426
|
+
if (!inputConfig.pointerLock || document.pointerLockElement) return
|
|
2427
|
+
// requestPointerLock() can throw synchronously (not just reject) in some browser/automation
|
|
2428
|
+
// contexts -- e.g. "The root document of this element is not valid for pointer lock" when the
|
|
2429
|
+
// element's document isn't the active top-level document at click time. Left unguarded this was
|
|
2430
|
+
// an uncaught exception that tripped the app's global error boundary, converting a benign
|
|
2431
|
+
// lock-denial into a full page crash. The keydown fallback below still recovers gameplay either way.
|
|
2432
|
+
try { renderer.domElement.requestPointerLock() } catch (e) { console.warn('[input] requestPointerLock failed:', e?.message || e) }
|
|
2433
|
+
})
|
|
2426
2434
|
// requestPointerLock() is a trusted-gesture-gated browser API that can silently reject (denied
|
|
2427
2435
|
// engagement heuristic, automation-driven click, embedded/iframe context) with no visible error --
|
|
2428
2436
|
// the click-prompt overlay then never dismisses and gameplay looks permanently blocked even though
|