@pirireis/webglobeplugins 1.1.1 → 1.1.3
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.
|
@@ -285,7 +285,7 @@ export function partialTessellation(triangleMeta, limits, innerCuts, calculateRe
|
|
|
285
285
|
* Returns the index of the point (new or existing).
|
|
286
286
|
*/
|
|
287
287
|
const addPoint = (longLat, vec3, edgeIndex) => {
|
|
288
|
-
const key = `${Math.round(longLat[0] *
|
|
288
|
+
const key = `${Math.round(longLat[0] * 1e8)}|${Math.round(longLat[1] * 1e8)}`;
|
|
289
289
|
let index = pointMap.get(key);
|
|
290
290
|
if (index !== undefined) {
|
|
291
291
|
if (edgeIndex !== undefined) {
|
package/package.json
CHANGED
|
@@ -121,7 +121,7 @@ export class TerrainPolygonSemiPlugin {
|
|
|
121
121
|
...p,
|
|
122
122
|
geometry: p.geometry.map((g) => ({
|
|
123
123
|
...g,
|
|
124
|
-
vertices: g.vertices.map((v) =>
|
|
124
|
+
vertices: g.vertices.map((v) => roundTo7(v)),
|
|
125
125
|
})),
|
|
126
126
|
}));
|
|
127
127
|
filteredPolygons = this._indexPolygonMap.insertBulk(filteredPolygons);
|
|
@@ -356,6 +356,6 @@ function getGlStates(gl) {
|
|
|
356
356
|
texture2DArray: gl.getParameter(gl.TEXTURE_BINDING_2D_ARRAY),
|
|
357
357
|
};
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
return Math.round(n *
|
|
359
|
+
function roundTo7(n) {
|
|
360
|
+
return Math.round(n * 1e7) / 1e7;
|
|
361
361
|
}
|