@pirireis/webglobeplugins 1.1.16 → 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] =
|
|
292
|
+
_f32[0] = n;
|
|
293
293
|
return _u32[0];
|
|
294
294
|
};
|
|
295
295
|
const addPoint = (longLat, vec3, edgeIndex) => {
|
|
@@ -297,6 +297,7 @@ 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(12)},${xy[1].toFixed(12)}`;
|
|
300
301
|
const key = `${float32Bits(x)},${float32Bits(y)}`;
|
|
301
302
|
let index = pointMap.get(key);
|
|
302
303
|
if (index !== undefined) {
|
package/package.json
CHANGED
|
@@ -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,
|
|
97
|
+
gl.vertexAttrib4f(index, 1, 0, 0, 1);
|
|
98
98
|
}
|
|
99
99
|
function setDefaultAttributeValues(gl, index, size, escapeValues, typeInfo) {
|
|
100
100
|
// gl.disableVertexAttribArray(index);
|