mapspinner 0.1.26 → 0.1.28
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
|
@@ -461,7 +461,7 @@ export async function initMapspinnerPlanet(gl, opts = {}) {
|
|
|
461
461
|
// so the L8 swap can land at 700km (the <boundary ramp begins below the lowest knot).
|
|
462
462
|
// (the src/lab altSplitMul mirror was deleted 2026-06-12; this is the only copy now.)
|
|
463
463
|
// knots [altKm, sf]; sf log-interpolated. Outside the range clamps to the end knot.
|
|
464
|
-
const KN = [[700,0.865],[900,1.009],[1200,0.966],[1700,0.898],[2400,1.19],[3200,0.865],[5000,0.86],[
|
|
464
|
+
const KN = [[700,0.865],[900,1.009],[1200,0.966],[1700,0.898],[2400,1.19],[3200,0.865],[5000,0.86],[12000,0.72],[20000,0.60],[40000,0.45]];
|
|
465
465
|
if (altKm <= KN[0][0]) { mul = KN[0][1]; }
|
|
466
466
|
else if (altKm >= KN[KN.length-1][0]) { mul = KN[KN.length-1][1]; }
|
|
467
467
|
else { for (let i = 1; i < KN.length; i++) { if (altKm <= KN[i][0]) {
|
|
@@ -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 = 3
|
|
500
|
+
const LOD_STEP = 2.3; // push ALL LODs ~0.6 step (reduced from 3.0 to target ~600 quads at all alts):
|
|
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
|
|
@@ -549,6 +549,12 @@ export async function initMapspinnerPlanet(gl, opts = {}) {
|
|
|
549
549
|
}
|
|
550
550
|
const _maxLevelOverridden = (typeof window !== 'undefined' && window.__maxLevel != null);
|
|
551
551
|
if (!_maxLevelOverridden && altKm < DECK_CAP_ALT_KM && mxl > DECK_CAP_LEVEL) mxl = DECK_CAP_LEVEL;
|
|
552
|
+
// HIGH-ALT LOD DROP (user 2026-06-13): at 30km+ the finest LOD is sub-pixel.
|
|
553
|
+
// Drop 1 level at 30km, 2 levels at 700km+ so the next-coarser LOD naturally expands
|
|
554
|
+
// (cells 2x larger). Skipped when window.__maxLevel is set.
|
|
555
|
+
if (!_maxLevelOverridden && altKm >= 30 && mxl > 4) {
|
|
556
|
+
mxl -= (altKm >= 700) ? 2 : 1;
|
|
557
|
+
}
|
|
552
558
|
qt.setConfig(R, mxl, distF);
|
|
553
559
|
const splitDist = sf + 1.0;
|
|
554
560
|
|