mapspinner 0.1.29 → 0.1.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapspinner",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "WebGL2 Earth-scale terrain rendering SDK for interactive globe applications",
5
5
  "main": "src/index.js",
6
6
  "exports": {
package/src/gl-render.js CHANGED
@@ -797,7 +797,7 @@ export async function initMapspinnerRender(gl, opts = {}) {
797
797
  }
798
798
  gl.uniform1f(U('uHasSurfTex'), hasSurf ? 1.0 : 0.0);
799
799
  gl.uniform1f(U('uTexTileM'), _g('texTile', 2400.0)); // metres per repeat (user: 24m read as noise/rock -- 100x bigger)
800
- gl.uniform1f(U('uTexNrmK'), _g('texNrmK', 3.0)); // 0.8 -> 3.0 (user 2026-06-11 'displacement normals must be THE texture normals': A/B-measured -- 0.8 was visually NIL (0% of px changed >10 on toggle), 2.0 gave 1.3%, 5.0 gave 22%; the normalize(nLit+texDn) compresses the response so visibility is non-linear in K. 3.0 makes the displacement-derived relief clearly read; the loader's per-texel 0.9 tilt cap keeps the historical saturation/scramble class structurally impossible at any apply strength)
800
+ gl.uniform1f(U('uTexNrmK'), _g('texNrmK', 1.5)); // 0.8 -> 3.0 (user 2026-06-11 'displacement normals must be THE texture normals'), 3.0->1.5 (2026-06-13 'texture displacement far too obvious vs elevation')
801
801
  gl.uniform1f(U('uTexMix'), _g('texMix', 0.85)); // splat blend amount (0 = off)
802
802
  gl.uniform1f(U('uTexWarp'), _g('texWarp', 0.325)); // anti-repetition warp amplitude (+30% from 0.25, grass needed more visible warping)
803
803
  gl.uniform1f(U('uTexPhoto'), _g('texPhoto', 0.0)); // raw photo-color fraction (0 = patch matches the macro shade exactly)
@@ -37,13 +37,13 @@ const DEFAULTS = {
37
37
  bcLowland: [0.20,0.34,0.15], bcGrass: [0.26,0.40,0.17], bcRock: [0.52,0.43,0.34], // bcRock -> a clearly WARMER TAN-GREY (R>G>B) so it reads as ROCK when lit, not olive-green (the [0.46,0.42,0.37] near-grey read green next to the biome). state.biome OVERRIDES gl-render defaults via window.__gen.
38
38
  bcSnow: [0.92,0.94,0.97],
39
39
  bandEdgesLo: [150.0,1200.0], bandEdgesHi: [3500.0,6500.0], snowEdges: [6000.0,8500.0], // 8000/10500->6000/8500 (user 2026-06-11 'snowy mountains disappeared' -- see gl-render snowEdges note) // snowEdges 5200/7000->8000/10500 (user 2026-06-10 'entire terrain white': the rock-by-height fix unmasked snow gates tuned pre-4x; full snow from 5.2km whitened the 11.6km massifs; coldSnow onset = snowEdges.x*0.5 follows) // bandEdgesHi 1600/3200->3500/6500 (user 2026-06-10 'rockface everywhere'): tuned on the pre-4x terrain; with 11.6km peaks everything above 3200m read rock BY HEIGHT alone -- rescale the treeline to the new elevation range
40
- seaDepthM: 3000.0, slopeRock: [0.25,0.55], // [0.25,0.55] USER-SET 2026-06-12
40
+ seaDepthM: 3000.0, slopeRock: [0.0,0.3], // [0.0,0.3] USER-SET 2026-06-13
41
41
  },
42
42
  // REAL-WORLD LOOK overhaul (terraformable lighting/shading levers; applyShaderGlobals sets window
43
43
  // globals; gl-render reads them via _g()). Beer-Lambert ocean, biome sat, mottle, sky-fill relief,
44
44
  // terminator glow, night floor + earthshine, exposure + post-ACES Look.
45
45
  look: {
46
- exposure: 1.0, skyFill: 0.45, biomeSat: 0.72, variationAmt: 0.04, colorVar: 0.5, vertexAO: 1.0, // variationAmt 0.08->0.04 (user 2026-06-10 'blotchy': the ~50km value mottle painted light/dark patches across the massifs)
46
+ exposure: 1.0, skyFill: 0.45, biomeSat: 0.72, variationAmt: 0.04, colorVar: 0.5, vertexAO: 1.0, reliefShade: 2.5, // variationAmt 0.08->0.04 (user 2026-06-10 'blotchy': the ~50km value mottle painted light/dark patches across the massifs)
47
47
  nightFloor: 0.16, termWidth: 0.25, terminatorGlow: 0.30, lookSat: 1.15, lookContrast: 1.08, // nightFloor 0.05->0.16: no black night terrain (2026-06-09)
48
48
  detailOverlay: 6.0, hazeMul: 0.65, // 2026-06-10 'pale hazy + featureless': perlin-everywhere albedo+elevation fbm (user-tuned 6) + aerial-perspective strength cut
49
49
  ocean: { deep: [0.008,0.025,0.06], shallow: [0.07,0.22,0.26], k: [0.030,0.012,0.0045] },
@@ -74,6 +74,7 @@ function applyShaderGlobals(state){
74
74
  if(L.detailOverlay != null) window.__detailOverlay = L.detailOverlay;
75
75
  if(L.hazeMul != null) window.__hazeMul = L.hazeMul;
76
76
  if(L.vertexAO != null) window.__vertexAO = L.vertexAO;
77
+ if(L.reliefShade != null) window.__reliefShade = L.reliefShade;
77
78
  window.__terminatorGlow = L.terminatorGlow; window.__lookSat = L.lookSat; window.__lookContrast = L.lookContrast;
78
79
  // gl-render reads window['__'+uniformName] (gl-render.js o3 helper) -> the globals must carry
79
80
  // the 'u' prefix (__uOceanDeep, not __oceanDeep); the unprefixed names were dead levers.