@pirireis/webglobeplugins 1.1.17 → 1.1.18

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.
@@ -289,7 +289,7 @@ export function partialTessellation(triangleMeta, limits, innerCuts, calculateRe
289
289
  const _f32 = /*@__PURE__*/ new Float32Array(1);
290
290
  const _u32 = /*@__PURE__*/ new Uint32Array(_f32.buffer);
291
291
  const float32Bits = (n) => {
292
- _f32[0] = Math.fround(n);
292
+ _f32[0] = n;
293
293
  return _u32[0];
294
294
  };
295
295
  const addPoint = (longLat, vec3, edgeIndex) => {
@@ -297,8 +297,8 @@ export function partialTessellation(triangleMeta, limits, innerCuts, calculateRe
297
297
  const x = Math.fround(xy[0]);
298
298
  const y = Math.fround(xy[1]);
299
299
  // Use float32 bit patterns for an exact, stable key.
300
- const key = `${xy[0].toFixed(8)},${xy[1].toFixed(8)}`;
301
- // const key = `${float32Bits(x),${float32Bits(y)}`;
300
+ // const key = `${xy[0].toFixed(12)},${xy[1].toFixed(12)}`;
301
+ const key = `${float32Bits(x)},${float32Bits(y)}`;
302
302
  let index = pointMap.get(key);
303
303
  if (index !== undefined) {
304
304
  if (edgeIndex !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pirireis/webglobeplugins",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT",
@@ -461,6 +461,7 @@ function getGlStates(gl) {
461
461
  function roundTo7(n) {
462
462
  // Keep at most 7 digits after the decimal (degrees), then quantize to float32
463
463
  // to match GPU attribute precision and make identity comparisons stable.
464
- const rounded = Math.round(n * 1e7) / 1e7;
465
- return Math.fround(rounded);
464
+ // const rounded = Math.round(n * 1e7) / 1e7;
465
+ // return Math.fround(rounded);
466
+ return Math.fround(n);
466
467
  }
@@ -94,7 +94,7 @@ const setConstantAttribute = (gl, index, size, values, typeInfo) => {
94
94
  gl.vertexAttrib4f(index, v[0], v[1], v[2], v[3]);
95
95
  };
96
96
  function resetAttributeDefault(gl, index) {
97
- gl.vertexAttrib4f(index, 0, 0, 0, 1);
97
+ gl.vertexAttrib4f(index, 1, 0, 0, 1);
98
98
  }
99
99
  function setDefaultAttributeValues(gl, index, size, escapeValues, typeInfo) {
100
100
  // gl.disableVertexAttribArray(index);