mapspinner 0.1.8 → 0.1.10

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.8",
3
+ "version": "0.1.10",
4
4
  "description": "WebGL2 Earth-scale terrain rendering SDK for interactive globe applications",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -497,7 +497,7 @@ export async function initMapspinnerPlanet(gl, opts = {}) {
497
497
  // ONLY to splitDist (NOT distF below): distF = sf*8.0 is the altitude-weighting term, and scaling sf
498
498
  // into BOTH compounds into ~2 levels at altitude (witnessed: base sf*2 gave mx 5->7 at 8000km). Keep
499
499
  // distF on the original sf so the push is a clean ONE step. maxLevel (16) is untouched -- no new LOD.
500
- const LOD_STEP = 4.0; // push ALL LODs out ANOTHER step (user 2026-06-09 #2, after the 1.0->2.0 first step):
500
+ const LOD_STEP = 8.0; // push ALL LODs out TWO steps: compensates for maxLevel 13->12 and steeper far falloff, targets ~600 quads deck
501
501
  qt.computeSplitDist(sf * LOD_STEP, gl.drawingBufferHeight || 480, fovy);
502
502
  // DETAIL-FARTHER (user 2026-06-01h: each LOD pop should happen ~3x farther out -- 6km detail at
503
503
  // 24km, etc.). A quad subdivides when camAlt < l * splitDist * distFactor, so tripling distFactor
package/src/quadtree.js CHANGED
@@ -94,7 +94,7 @@ export class Quadtree {
94
94
  const near = Math.max(this._camAlt * 6.0, horizon * 0.9, 20000.0);
95
95
  // floor 0.5 (was 0.18): past the horizon the split may HALVE, not crush to ~1/5 (which was
96
96
  // collapsing near-field detail on descent). Foreground (latC<near) stays fall=1 -> full LOD.
97
- const fall = 1.0 / (1.0 + Math.max(0.0, latC - near) / (near * 2.0));
97
+ const fall = 1.0 / (1.0 + Math.max(0.0, latC - near) / near);
98
98
  // ALTITUDE-DETAIL-GRADIENT-SWAP (user: 'above fps height, swap more near detail for far detail so the
99
99
  // higher we get the less of a detail gradient there is to the land center'). The far-coarsening floor
100
100
  // is normally 0.5 (far quads split at half the near rate = a radial detail gradient around the
@@ -104,7 +104,7 @@ export class Quadtree {
104
104
  // stays sharp (floor 0.5) so the deck keeps its near-field detail. fpsAltM live via this.fpsAltM.
105
105
  const fpsAltM = this.fpsAltM || 5000.0;
106
106
  const aboveFps = Math.min(1.0, Math.max(0.0, (this._camAlt - fpsAltM) / (fpsAltM * 8.0))); // 0 at fps height -> 1 by ~45km
107
- const floor = 0.5 + 0.5 * (aboveFps * aboveFps * (3 - 2 * aboveFps)); // 0.5 (fps deck) -> 1.0 (high alt, flat gradient)
107
+ const floor = 0.25 + 0.75 * (aboveFps * aboveFps * (3 - 2 * aboveFps)); // 0.25 (fps deck) -> 1.0 (high alt, flat gradient)
108
108
  const effSplit = this.splitDist * Math.max(floor, fall);
109
109
  if (dist < l * effSplit && level < this.maxLevel) {
110
110
  const hl = l / 2.0;
@@ -37,7 +37,7 @@ 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.5], // [0.25,0.5] USER-SET 2026-06-11 (explicit: 'set __gen.state.biome.slopeRock = [0.25,0.5]'); supersedes the [0.22,0.6] anti-rock-patch revert and the earlier [-0.6,1] calibration
40
+ seaDepthM: 3000.0, slopeRock: [-0.1,0.1], // [-0.1,0.1] USER-SET 2026-06-12
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,