mapspinner 0.1.5 → 0.1.7

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.5",
3
+ "version": "0.1.7",
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
@@ -326,7 +326,7 @@ export async function initMapspinnerRender(gl, opts = {}) {
326
326
  const albAll = new Uint8Array(SZ * SZ * 4 * MATS.length);
327
327
  const nrmAll = new Uint8Array(SZ * SZ * 4 * MATS.length);
328
328
  for (let m = 0; m < MATS.length; m++) {
329
- const [ci, di] = await Promise.all([img('/textures/' + MATS[m] + '-color.jpg'), img('/textures/' + MATS[m] + '-displacement.jpg')]);
329
+ const [ci, di] = await Promise.all([img('./textures/' + MATS[m] + '-color.jpg'), img('./textures/' + MATS[m] + '-displacement.jpg')]);
330
330
  const c = px(ci), d = px(di);
331
331
  // DE-SHADE (user 2026-06-11 'flat, unangled bowls of rock'): the photos carry baked large-scale
332
332
  // shading (shadowed depressions), which at a 2.4km tile pastes bowl-shaped shadows onto geometry
@@ -961,9 +961,8 @@ void main() {
961
961
  float dHdvN = float(hFD2 - h) / nStep;
962
962
  vNrm = normalize(uxN * (-dHduN) + uyN * (-dHdvN) + uzN); // n = normalize([-dz/du,-dz/dv,1]) in the (ux,uy,uz) frame
963
963
  }
964
- // DIRECT per-vertex sphere projection (replaces the
965
- deformedCorners*alphaPrime blend,
966
- // which bilinearly interpolated 4 deformed corners -> FLAT quad interior -> faceted at high GRID).
964
+ // DIRECT per-vertex sphere projection (replaces the old corner-blend deform, which
965
+ // bilinearly interpolated 4 deformed corners -> FLAT quad interior -> faceted at high GRID).
967
966
  // dir0 is THIS vertex's world direction (faceWarp'd, defLocalToWorld-mapped); place it on the
968
967
  // sphere at radius R+h and project. Every vertex curves -> round at any tessellation.
969
968
  // SKIRT: outer-ring verts (vertex.z==1, xy clamped to the true edge) drop radially below the