spoint 0.1.680 → 0.1.682
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 +1 -1
- package/client/app.js +9 -1
- package/client/core/TimeOfDay.js +1 -1
- package/package.json +1 -1
package/apps/world/tps-game.js
CHANGED
|
@@ -18,7 +18,7 @@ const TERRAIN = {
|
|
|
18
18
|
// they stay a single source of truth. Singleplayer (WorkerEntry.js's in-Worker boot of this same world
|
|
19
19
|
// def) also reads serverAuthoritative, but with no other client to sync to it's a no-op there in
|
|
20
20
|
// practice -- the local clock behaves identically to before this feature.
|
|
21
|
-
timeOfDay: { serverAuthoritative: true, dayLengthSec: 600, startFraction: 0.
|
|
21
|
+
timeOfDay: { serverAuthoritative: true, dayLengthSec: 600, startFraction: 0.27 },
|
|
22
22
|
// weather-server-driven-state-and-multiplayer-sync: same real-multiplayer-test-world rationale as
|
|
23
23
|
// timeOfDay.serverAuthoritative immediately above -- every connected client's weather state
|
|
24
24
|
// (client/core/Weather.js) stays a server-pushed value (src/sdk/ServerWeather.js, MSG.WEATHER_SYNC)
|
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
|
package/client/core/TimeOfDay.js
CHANGED
|
@@ -40,7 +40,7 @@ const KEYFRAMES = [
|
|
|
40
40
|
{ deg: -90, sunColor: 0x0a1030, sunIntensity: 0.0, ambientColor: 0x0d1428, ambientIntensity: 0.10 }, // deep night
|
|
41
41
|
{ deg: -6, sunColor: 0x1a2550, sunIntensity: 0.0, ambientColor: 0x1a2440, ambientIntensity: 0.14 }, // astronomical twilight, sun still below horizon (no direct light)
|
|
42
42
|
{ deg: 0, sunColor: 0xff7a3c, sunIntensity: 0.55, ambientColor: 0x4a4060, ambientIntensity: 0.22 }, // horizon: warm orange sunrise/sunset
|
|
43
|
-
{ deg: 8, sunColor:
|
|
43
|
+
{ deg: 8, sunColor: 0xffa552, sunIntensity: 1.8, ambientColor: 0xffcf9e, ambientIntensity: 0.55 }, // low sun: golden hour (matches tps-game.js's intended fill-light-visible palette)
|
|
44
44
|
{ deg: 30, sunColor: 0xfff0dc, sunIntensity: 1.45, ambientColor: 0xc9d4e8, ambientIntensity: 0.32 }, // mid-morning/afternoon
|
|
45
45
|
{ deg: 70, sunColor: 0xffffff, sunIntensity: 1.6, ambientColor: 0xfff4d6, ambientIntensity: 0.3 }, // near-noon, matches SceneSetup's original static values
|
|
46
46
|
{ deg: 90, sunColor: 0xffffff, sunIntensity: 1.55, ambientColor: 0xfff4d6, ambientIntensity: 0.3 }, // straight overhead
|