mapspinner 0.1.7 → 0.1.8
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
|
@@ -168,7 +168,7 @@ export async function initMapspinnerPlanet(gl, opts = {}) {
|
|
|
168
168
|
// quadtree levels (L14/L15/L16, ~28m/~14m/~7m cells) -- the close-approach overdraw tail -- so the deepest
|
|
169
169
|
// LOD is now L13 (~56m cell). Pairs with the LOD_STEP push (each region still resolves levels-finer-per-
|
|
170
170
|
// distance, just capped three steps shallower). Live override window.__maxLevel.
|
|
171
|
-
const maxLevel = opts.maxLevel ??
|
|
171
|
+
const maxLevel = opts.maxLevel ?? 12;
|
|
172
172
|
// splitFactor 2.0 over-subdivided ~5-20x: the baseline measured px/poly edge median
|
|
173
173
|
// 0.73 (orbit) / 1.56 (lowalt), far below the user's 4-50 px target, which also
|
|
174
174
|
// saturated the atlas (1920/1920) and drove tileGenMs to ~950ms. The live sweep
|
|
@@ -541,11 +541,11 @@ export async function initMapspinnerPlanet(gl, opts = {}) {
|
|
|
541
541
|
// subdivide to L16 (~7m cells, the vtxDisplace floor) while flat tiles stay capped at L14 -> the
|
|
542
542
|
// polygon budget follows the relief, within the existing quadtree spatial index. nadir-only sample
|
|
543
543
|
// so the foreground the user is descending toward drives it.
|
|
544
|
-
let DECK_CAP_LEVEL =
|
|
544
|
+
let DECK_CAP_LEVEL = 12;
|
|
545
545
|
if (hpf && hpf.sampleDir) {
|
|
546
546
|
const nA = hpf.sampleDir([camWorldPos[0]/camDist, camWorldPos[1]/camDist, camWorldPos[2]/camDist]);
|
|
547
547
|
const mtn = Math.max(0, Math.min(1, (nA.elevAmp - 16.8) / (18.6 - 16.8))); // mountain-belt weight 0..1
|
|
548
|
-
DECK_CAP_LEVEL =
|
|
548
|
+
DECK_CAP_LEVEL = 12 + Math.round(2 * mtn); // flat L12 -> rugged L14, adaptive
|
|
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;
|