spoint 0.1.693 → 0.1.694
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.
|
@@ -34,18 +34,32 @@ export function buildRenderSectionNodes() {
|
|
|
34
34
|
// THREE's camera far floor: max of every THREE-drawn subsystem's own configured visibility
|
|
35
35
|
// radius, with margin -- the bound THREE's frustum cull needs, independent of mapspinner's
|
|
36
36
|
// terrain-horizon far plane.
|
|
37
|
+
//
|
|
38
|
+
// MODEL_VISIBILITY_FLOOR_M (live-fixed 2026-08-10): this max previously included ONLY
|
|
39
|
+
// vegetation/rocks/grass renderDistance -- placed-model/entity meshes (buildings, props, other
|
|
40
|
+
// players) have no equivalent per-subsystem distance config, so a world tuned for short-range
|
|
41
|
+
// vegetation (e.g. tps-game.js's renderDistance:640/rockRenderDistance:320, capped here at
|
|
42
|
+
// ~736m with the 1.15 margin) silently far-clipped every model beyond that range through
|
|
43
|
+
// camera.far (see the 'apply-projection' node below, which sets ctx.camera.far straight from
|
|
44
|
+
// this value) -- entirely unrelated to vegetation, but sharing the same floor by construction.
|
|
45
|
+
// User-witnessed live: 'the far plane is too close on the model layer causing them to disappear'.
|
|
46
|
+
// Floored at 2000m (matches tps-game.js's own terrain.treeline:4000 order of magnitude for what
|
|
47
|
+
// a scene at this planet scale expects to keep visible) until a real per-entity max-draw-distance
|
|
48
|
+
// computation replaces this fixed floor.
|
|
37
49
|
{
|
|
38
50
|
id: 'vegetation-render-distance',
|
|
39
51
|
reads: [],
|
|
40
52
|
writes: ['vegetationRenderDistance'],
|
|
41
53
|
run(ctx) {
|
|
42
54
|
const margin = 1.15
|
|
55
|
+
const MODEL_VISIBILITY_FLOOR_M = 2000
|
|
43
56
|
ctx.res.vegetationRenderDistance = Math.max(
|
|
44
57
|
ctx.vegetation ? ctx.vegetation.renderDistance || 0 : 0,
|
|
45
58
|
ctx.rocks ? ctx.rocks.renderDistance || 0 : 0,
|
|
46
59
|
ctx.grass ? ctx.grass.renderDistance || 0 : 0,
|
|
47
60
|
100,
|
|
48
61
|
) * margin
|
|
62
|
+
ctx.res.vegetationRenderDistance = Math.max(ctx.res.vegetationRenderDistance, MODEL_VISIBILITY_FLOOR_M)
|
|
49
63
|
},
|
|
50
64
|
},
|
|
51
65
|
|