leiting-bim 2.2.10 → 2.2.12
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/{index-DQ7bdiLh.js → index-AzntTdyV.js} +6 -14
- package/{index-OHI-KYsZ.js → index-BKyNWjh5.js} +182 -288
- package/leiting-bim.es.js +1 -54
- package/leiting-bim.umd.js +11 -11
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as To } from "./index-
|
|
1
|
+
import { g as To } from "./index-BKyNWjh5.js";
|
|
2
2
|
function R(n, e) {
|
|
3
3
|
this.x = n, this.y = e;
|
|
4
4
|
}
|
|
@@ -3841,7 +3841,7 @@ class Fc {
|
|
|
3841
3841
|
if (i && console.time("preprocess data"), t.maxZoom < 0 || t.maxZoom > 24) throw new Error("maxZoom should be in the 0-24 range");
|
|
3842
3842
|
if (t.promoteId && t.generateId) throw new Error("promoteId and generateId cannot be used together.");
|
|
3843
3843
|
let r = Cc(e, t);
|
|
3844
|
-
this.tiles = {}, this.tileCoords = [], i && (console.timeEnd("preprocess data"),
|
|
3844
|
+
this.tiles = {}, this.tileCoords = [], i && (console.timeEnd("preprocess data"), t.indexMaxZoom, t.indexMaxPoints, console.time("generate tiles"), this.stats = {}, this.total = 0), r = Sc(r, t), r.length && this.splitTile(r, 0, 0, 0), i && (r.length && (this.tiles[0].numFeatures, this.tiles[0].numPoints), console.timeEnd("generate tiles"), this.total, JSON.stringify(this.stats));
|
|
3845
3845
|
}
|
|
3846
3846
|
// splits features from a parent tile to sub-tiles.
|
|
3847
3847
|
// z, x, and y are the coordinates of the parent tile
|
|
@@ -3856,15 +3856,7 @@ class Fc {
|
|
|
3856
3856
|
const f = 1 << t, h = En(t, i, r);
|
|
3857
3857
|
let p = this.tiles[h];
|
|
3858
3858
|
if (!p && (u > 1 && console.time("creation"), p = this.tiles[h] = Ec(e, t, i, r, c), this.tileCoords.push({ z: t, x: i, y: r }), u)) {
|
|
3859
|
-
u > 1 && (console.
|
|
3860
|
-
"tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",
|
|
3861
|
-
t,
|
|
3862
|
-
i,
|
|
3863
|
-
r,
|
|
3864
|
-
p.numFeatures,
|
|
3865
|
-
p.numPoints,
|
|
3866
|
-
p.numSimplified
|
|
3867
|
-
), console.timeEnd("creation"));
|
|
3859
|
+
u > 1 && (p.numFeatures, p.numPoints, p.numSimplified, console.timeEnd("creation"));
|
|
3868
3860
|
const _ = `z${t}`;
|
|
3869
3861
|
this.stats[_] = (this.stats[_] || 0) + 1, this.total++;
|
|
3870
3862
|
}
|
|
@@ -3894,11 +3886,11 @@ class Fc {
|
|
|
3894
3886
|
t = t + a & a - 1;
|
|
3895
3887
|
const l = En(e, t, i);
|
|
3896
3888
|
if (this.tiles[l]) return oi(this.tiles[l], s);
|
|
3897
|
-
o > 1
|
|
3889
|
+
o > 1;
|
|
3898
3890
|
let c = e, u = t, f = i, h;
|
|
3899
3891
|
for (; !h && c > 0; )
|
|
3900
3892
|
c--, u = u >> 1, f = f >> 1, h = this.tiles[En(c, u, f)];
|
|
3901
|
-
return !h || !h.source ? null : (o > 1 &&
|
|
3893
|
+
return !h || !h.source ? null : (o > 1 && console.time("drilling down"), this.splitTile(h.source, c, u, f, e, t, i), o > 1 && console.timeEnd("drilling down"), this.tiles[l] ? oi(this.tiles[l], s) : null);
|
|
3902
3894
|
}
|
|
3903
3895
|
}
|
|
3904
3896
|
function En(n, e, t) {
|
|
@@ -14098,7 +14090,7 @@ class fh extends xn {
|
|
|
14098
14090
|
for (const y of d)
|
|
14099
14091
|
a(y, u, f);
|
|
14100
14092
|
else
|
|
14101
|
-
|
|
14093
|
+
"" + h;
|
|
14102
14094
|
}
|
|
14103
14095
|
this.primitive = i;
|
|
14104
14096
|
}
|