spoint 0.1.686 → 0.1.688
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.
|
@@ -136,7 +136,7 @@ export const tpsGameClient = {
|
|
|
136
136
|
if (lp && lp.velocity && dir) { lp.velocity[0] -= dir[0] * 2; lp.velocity[2] -= dir[2] * 2 }
|
|
137
137
|
const animator = engine.players.getAnimator(engine.playerId)
|
|
138
138
|
if (animator) animator.shoot()
|
|
139
|
-
tps.flash.color.setHex(0xffaa00); tps.flash.position.set(pos[0], pos[1] + 0.5, pos[2]); tps.flash.intensity =
|
|
139
|
+
tps.flash.color.setHex(0xffaa00); tps.flash.position.set(pos[0], pos[1] + 0.5, pos[2]); tps.flash.intensity = 0; tps.flash.distance = 0; tps.flashOff = Date.now() + 60
|
|
140
140
|
tps.ammo = Math.max(0, tps.ammo - 1)
|
|
141
141
|
if (tps.juice) tps.juice.tone(160, 0.05, 0.22, 90)
|
|
142
142
|
// tracer: origin -> full weapon range along dir; a real 'hit' event (below) shortens it to the actual impact point once the server responds, but the muzzle-to-somewhere streak reads correctly even before that RTT.
|
|
@@ -170,7 +170,7 @@ export const tpsGameClient = {
|
|
|
170
170
|
tps._predHitAt = 0
|
|
171
171
|
if (payload.headshot) { tps.headshotMarkerTime = now; if (window.__funJuice) window.__funJuice.headshot++; if (!justPredicted) tps.juice?.tone(1100, 0.08, 0.2); mobileVibrate(engine, [15, 30, 15]) }
|
|
172
172
|
else { if (window.__funJuice) window.__funJuice.hit++; if (!justPredicted) tps.juice?.tone(820, 0.06, 0.18); mobileVibrate(engine, 20) }
|
|
173
|
-
if (payload.pos && tps.flash) { tps.flash.position.set(payload.pos[0], payload.pos[1], payload.pos[2]); tps.flash.color.setHex(0xffffff); tps.flash.intensity =
|
|
173
|
+
if (payload.pos && tps.flash) { tps.flash.position.set(payload.pos[0], payload.pos[1], payload.pos[2]); tps.flash.color.setHex(0xffffff); tps.flash.intensity = 0; tps.flashOff = now + 80 }
|
|
174
174
|
// A player hit doesn't get a scorch decal (blood-optional per roadmap #48 -- this engine has no
|
|
175
175
|
// gore toggle yet, so player hits stay decal-free; only a miss against world geometry decals below).
|
|
176
176
|
// celebrate the kill now on the lethal 'hit' (RTT sooner); the 'death' path below de-dupes against this
|
package/apps/world/tps-game.js
CHANGED
|
@@ -18,7 +18,14 @@ 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
|
-
|
|
21
|
+
// AAA-push cross-piece regression (found live, round 5 of the open-landscape piece): startFraction
|
|
22
|
+
// was bumped 0.3->0.27 by the low-sun/golden-hour piece's own round 3 so the world would boot AT
|
|
23
|
+
// that piece's target lighting for easy iteration -- but this is the WORLD'S shared default time,
|
|
24
|
+
// so every OTHER piece (open-landscape-midday included) got tested against golden-hour lighting by
|
|
25
|
+
// accident, not midday. Reverted to the original near-midday default; per-piece lighting states
|
|
26
|
+
// belong in each piece's own test setup (e.g. a critic-driven time override), never in the shared
|
|
27
|
+
// world config that every piece's test inherits.
|
|
28
|
+
timeOfDay: { serverAuthoritative: true, dayLengthSec: 600, startFraction: 0.3 },
|
|
22
29
|
// weather-server-driven-state-and-multiplayer-sync: same real-multiplayer-test-world rationale as
|
|
23
30
|
// timeOfDay.serverAuthoritative immediately above -- every connected client's weather state
|
|
24
31
|
// (client/core/Weather.js) stays a server-pushed value (src/sdk/ServerWeather.js, MSG.WEATHER_SYNC)
|
package/client/core/Grass.js
CHANGED
|
@@ -57,7 +57,7 @@ export async function createGrass(opts = {}) {
|
|
|
57
57
|
// terrain-shader shell/noise band) would duplicate work the streaming ring + fade already do, for a
|
|
58
58
|
// regime (grass blades near the world's own draw-distance edge) that's rarely on-screen densely enough
|
|
59
59
|
// to matter. This is the documented "simpler, safely achievable" branch named in the task.
|
|
60
|
-
const LOD_NEAR_DIST = Number.isFinite(cfg.grassLodNearDistance) ? cfg.grassLodNearDistance :
|
|
60
|
+
const LOD_NEAR_DIST = Number.isFinite(cfg.grassLodNearDistance) ? cfg.grassLodNearDistance : 8
|
|
61
61
|
const geoNear = makeBladeGeo(5) // full 5-segment curved blade, 20 tris/blade (10 quads x 2 tris)
|
|
62
62
|
const geoMid = makeBladeGeo(1) // flat single-segment crossed quad, 4 tris/blade
|
|
63
63
|
const mat = makeGrassMaterial(wind)
|
|
@@ -290,7 +290,7 @@ export async function probeAndCreateWebGPURenderer(isMobile) {
|
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
export function setupLights(scene) {
|
|
293
|
-
const ambient = new THREE.AmbientLight(0xfff4d6, 0.
|
|
293
|
+
const ambient = new THREE.AmbientLight(0xfff4d6, 0.5)
|
|
294
294
|
scene.add(ambient)
|
|
295
295
|
ambient.updateMatrix(); ambient.matrixAutoUpdate = false
|
|
296
296
|
const studio = new THREE.DirectionalLight(0x4488ff, 0.4)
|
package/client/core/TimeOfDay.js
CHANGED
|
@@ -39,11 +39,11 @@ const _DEG = Math.PI / 180
|
|
|
39
39
|
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
|
-
{ deg: 0, sunColor: 0xff7a3c, sunIntensity: 0.55, ambientColor: 0x4a4060, ambientIntensity: 0.
|
|
43
|
-
{ deg: 8, sunColor: 0xffa552, sunIntensity: 1.8, ambientColor: 0xffcf9e, ambientIntensity: 0.
|
|
44
|
-
{ deg: 30, sunColor: 0xfff0dc, sunIntensity: 1.45, ambientColor: 0xc9d4e8, ambientIntensity: 0.
|
|
45
|
-
{ deg: 70, sunColor: 0xffffff, sunIntensity: 1.6, ambientColor: 0xfff4d6, ambientIntensity: 0.
|
|
46
|
-
{ deg: 90, sunColor: 0xffffff, sunIntensity: 1.55, ambientColor: 0xfff4d6, ambientIntensity: 0.
|
|
42
|
+
{ deg: 0, sunColor: 0xff7a3c, sunIntensity: 0.55, ambientColor: 0x4a4060, ambientIntensity: 0.34 }, // horizon: warm orange sunrise/sunset
|
|
43
|
+
{ deg: 8, sunColor: 0xffa552, sunIntensity: 1.8, ambientColor: 0xffcf9e, ambientIntensity: 0.65 }, // low sun: golden hour (matches tps-game.js's intended fill-light-visible palette)
|
|
44
|
+
{ deg: 30, sunColor: 0xfff0dc, sunIntensity: 1.45, ambientColor: 0xc9d4e8, ambientIntensity: 0.48 }, // mid-morning/afternoon
|
|
45
|
+
{ deg: 70, sunColor: 0xffffff, sunIntensity: 1.6, ambientColor: 0xfff4d6, ambientIntensity: 0.5 }, // near-noon, Performance-Mode flat-ambient interior floor (was 0.3, too dark indoors with no bounce/GI)
|
|
46
|
+
{ deg: 90, sunColor: 0xffffff, sunIntensity: 1.55, ambientColor: 0xfff4d6, ambientIntensity: 0.5 }, // straight overhead
|
|
47
47
|
]
|
|
48
48
|
|
|
49
49
|
const _c1 = new THREE.Color(), _c2 = new THREE.Color(), _cOut = new THREE.Color()
|