@pirireis/webglobeplugins 1.2.4 → 1.2.5

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": "@pirireis/webglobeplugins",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT",
@@ -167,7 +167,7 @@ export class TerrainPolygonSemiPlugin {
167
167
  ...p,
168
168
  geometry: p.geometry.map((g) => ({
169
169
  ...g,
170
- vertices: g.vertices.map((v) => roundTo7(v)),
170
+ vertices: g.vertices.map((v) => roundTo6(v)),
171
171
  })),
172
172
  }));
173
173
  filteredPolygons = this._indexPolygonMap.insertBulk(filteredPolygons);
@@ -485,11 +485,9 @@ function getGlStates(gl) {
485
485
  texture2DArray: gl.getParameter(gl.TEXTURE_BINDING_2D_ARRAY),
486
486
  };
487
487
  }
488
- function roundTo7(n) {
489
- // Keep at most 7 digits after the decimal (degrees), then quantize to float32
488
+ function roundTo6(n) {
489
+ // Keep at most 6 digits after the decimal (degrees), then quantize to float32
490
490
  // to match GPU attribute precision and make identity comparisons stable.
491
- const rounded = Math.round(n * 1e7) / 1e7;
491
+ const rounded = Math.round(n * 1e6) / 1e6;
492
492
  return rounded;
493
- // return Math.round(rounded);
494
- // return Math.fround(n);
495
493
  }