vis-core 0.13.8 → 0.13.10
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/dist/index.js +10 -10
- package/dist/index.module.js +87 -81
- package/dist/version.d.ts +1 -1
- package/dist/vis/map/index.d.ts +1 -0
- package/dist/vis/map2/index.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.module.js
CHANGED
|
@@ -9,7 +9,7 @@ var va = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n), ml = Math.po
|
|
|
9
9
|
for (var e of q2(t))
|
|
10
10
|
wX.call(t, e) && kh(n, e, t[e]);
|
|
11
11
|
return n;
|
|
12
|
-
},
|
|
12
|
+
}, y0 = (n, t) => TX(n, vX(t));
|
|
13
13
|
var D = (n, t, e) => (kh(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
14
|
var qi = (n, t, e) => zX(FX(n), e, t);
|
|
15
15
|
var Zt = (n, t, e) => new Promise((i, s) => {
|
|
@@ -1701,7 +1701,7 @@ class Y {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
1703
|
const Ah = /* @__PURE__ */ new Y(), c9 = /* @__PURE__ */ new Be();
|
|
1704
|
-
class
|
|
1704
|
+
class W0 {
|
|
1705
1705
|
constructor(t = new Y(1 / 0, 1 / 0, 1 / 0), e = new Y(-1 / 0, -1 / 0, -1 / 0)) {
|
|
1706
1706
|
this.isBox3 = !0, this.min = t, this.max = e;
|
|
1707
1707
|
}
|
|
@@ -1868,7 +1868,7 @@ const Gn = [
|
|
|
1868
1868
|
/* @__PURE__ */ new Y(),
|
|
1869
1869
|
/* @__PURE__ */ new Y(),
|
|
1870
1870
|
/* @__PURE__ */ new Y()
|
|
1871
|
-
], vi = /* @__PURE__ */ new Y(), Kc = /* @__PURE__ */ new
|
|
1871
|
+
], vi = /* @__PURE__ */ new Y(), Kc = /* @__PURE__ */ new W0(), bl = /* @__PURE__ */ new Y(), Zl = /* @__PURE__ */ new Y(), Gl = /* @__PURE__ */ new Y(), Jn = /* @__PURE__ */ new Y(), kn = /* @__PURE__ */ new Y(), ps = /* @__PURE__ */ new Y(), Fa = /* @__PURE__ */ new Y(), Jc = /* @__PURE__ */ new Y(), kc = /* @__PURE__ */ new Y(), bs = /* @__PURE__ */ new Y();
|
|
1872
1872
|
function jh(n, t, e, i, s) {
|
|
1873
1873
|
for (let l = 0, a = n.length - 3; l <= a; l += 3) {
|
|
1874
1874
|
bs.fromArray(n, l);
|
|
@@ -1878,7 +1878,7 @@ function jh(n, t, e, i, s) {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
return !0;
|
|
1880
1880
|
}
|
|
1881
|
-
const _W = /* @__PURE__ */ new
|
|
1881
|
+
const _W = /* @__PURE__ */ new W0(), Ha = /* @__PURE__ */ new Y(), Dh = /* @__PURE__ */ new Y();
|
|
1882
1882
|
let I0 = class {
|
|
1883
1883
|
constructor(t = new Y(), e = -1) {
|
|
1884
1884
|
this.isSphere = !0, this.center = t, this.radius = e;
|
|
@@ -3693,7 +3693,7 @@ class Ut extends ee {
|
|
|
3693
3693
|
}
|
|
3694
3694
|
}
|
|
3695
3695
|
let uy = 0;
|
|
3696
|
-
const xi = /* @__PURE__ */ new Bt(), lu = /* @__PURE__ */ new We(), fl = /* @__PURE__ */ new Y(), ui = /* @__PURE__ */ new
|
|
3696
|
+
const xi = /* @__PURE__ */ new Bt(), lu = /* @__PURE__ */ new We(), fl = /* @__PURE__ */ new Y(), ui = /* @__PURE__ */ new W0(), za = /* @__PURE__ */ new W0(), Y0 = /* @__PURE__ */ new Y();
|
|
3697
3697
|
class Ot extends Mi {
|
|
3698
3698
|
constructor() {
|
|
3699
3699
|
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: uy++ }), this.uuid = yi(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
|
|
@@ -3773,7 +3773,7 @@ class Ot extends Mi {
|
|
|
3773
3773
|
return this.setAttribute("position", new Ut(e, 3)), this;
|
|
3774
3774
|
}
|
|
3775
3775
|
computeBoundingBox() {
|
|
3776
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
3776
|
+
this.boundingBox === null && (this.boundingBox = new W0());
|
|
3777
3777
|
const t = this.attributes.position, e = this.morphAttributes.position;
|
|
3778
3778
|
if (t && t.isGLBufferAttribute) {
|
|
3779
3779
|
console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this), this.boundingBox.set(
|
|
@@ -14453,7 +14453,7 @@ class e2 extends Xt {
|
|
|
14453
14453
|
}
|
|
14454
14454
|
computeBoundingBox() {
|
|
14455
14455
|
const t = this.geometry;
|
|
14456
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
14456
|
+
this.boundingBox === null && (this.boundingBox = new W0()), this.boundingBox.makeEmpty();
|
|
14457
14457
|
const e = t.getAttribute("position");
|
|
14458
14458
|
for (let i = 0; i < e.count; i++)
|
|
14459
14459
|
this.getVertexPosition(i, dd), this.boundingBox.expandByPoint(dd);
|
|
@@ -14618,7 +14618,7 @@ class _s extends ee {
|
|
|
14618
14618
|
return t.meshPerAttribute = this.meshPerAttribute, t.isInstancedBufferAttribute = !0, t;
|
|
14619
14619
|
}
|
|
14620
14620
|
}
|
|
14621
|
-
const vl = /* @__PURE__ */ new Bt(), tp = /* @__PURE__ */ new Bt(), rd = [], ep = /* @__PURE__ */ new
|
|
14621
|
+
const vl = /* @__PURE__ */ new Bt(), tp = /* @__PURE__ */ new Bt(), rd = [], ep = /* @__PURE__ */ new W0(), tR = /* @__PURE__ */ new Bt(), Ua = /* @__PURE__ */ new Xt(), Ba = /* @__PURE__ */ new I0();
|
|
14622
14622
|
class Mo extends Xt {
|
|
14623
14623
|
constructor(t, e, i) {
|
|
14624
14624
|
super(t, e), this.isInstancedMesh = !0, this.instanceMatrix = new _s(new Float32Array(i * 16), 16), this.instanceColor = null, this.morphTexture = null, this.count = i, this.boundingBox = null, this.boundingSphere = null;
|
|
@@ -14627,7 +14627,7 @@ class Mo extends Xt {
|
|
|
14627
14627
|
}
|
|
14628
14628
|
computeBoundingBox() {
|
|
14629
14629
|
const t = this.geometry, e = this.count;
|
|
14630
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
14630
|
+
this.boundingBox === null && (this.boundingBox = new W0()), t.boundingBox === null && t.computeBoundingBox(), this.boundingBox.makeEmpty();
|
|
14631
14631
|
for (let i = 0; i < e; i++)
|
|
14632
14632
|
this.getMatrixAt(i, vl), ep.copy(t.boundingBox).applyMatrix4(vl), this.boundingBox.union(ep);
|
|
14633
14633
|
}
|
|
@@ -14709,7 +14709,7 @@ class nR {
|
|
|
14709
14709
|
this.list.length = 0, this.index = 0;
|
|
14710
14710
|
}
|
|
14711
14711
|
}
|
|
14712
|
-
const Fl = "batchId", Qn = /* @__PURE__ */ new Bt(), Xu = /* @__PURE__ */ new Bt(), sR = /* @__PURE__ */ new Bt(), lR = /* @__PURE__ */ new rt(1, 1, 1), ip = /* @__PURE__ */ new Bt(), Wu = /* @__PURE__ */ new oc(), hd = /* @__PURE__ */ new
|
|
14712
|
+
const Fl = "batchId", Qn = /* @__PURE__ */ new Bt(), Xu = /* @__PURE__ */ new Bt(), sR = /* @__PURE__ */ new Bt(), lR = /* @__PURE__ */ new rt(1, 1, 1), ip = /* @__PURE__ */ new Bt(), Wu = /* @__PURE__ */ new oc(), hd = /* @__PURE__ */ new W0(), ys = /* @__PURE__ */ new I0(), Pa = /* @__PURE__ */ new Y(), np = /* @__PURE__ */ new Y(), aR = /* @__PURE__ */ new Y(), yu = /* @__PURE__ */ new nR(), k0 = /* @__PURE__ */ new Xt(), ud = [];
|
|
14713
14713
|
function oR(n, t, e = 0) {
|
|
14714
14714
|
const i = t.itemSize;
|
|
14715
14715
|
if (n.isInterleavedBufferAttribute || n.array.constructor !== t.array.constructor) {
|
|
@@ -14776,7 +14776,7 @@ class d3 extends Xt {
|
|
|
14776
14776
|
return this.customSort = t, this;
|
|
14777
14777
|
}
|
|
14778
14778
|
computeBoundingBox() {
|
|
14779
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
14779
|
+
this.boundingBox === null && (this.boundingBox = new W0());
|
|
14780
14780
|
const t = this._geometryCount, e = this.boundingBox, i = this._active;
|
|
14781
14781
|
e.makeEmpty();
|
|
14782
14782
|
for (let s = 0; s < t; s++)
|
|
@@ -14812,7 +14812,7 @@ class d3 extends Xt {
|
|
|
14812
14812
|
count: -1
|
|
14813
14813
|
}), c.push({
|
|
14814
14814
|
boxInitialized: !1,
|
|
14815
|
-
box: new
|
|
14815
|
+
box: new W0(),
|
|
14816
14816
|
sphereInitialized: !1,
|
|
14817
14817
|
sphere: new I0()
|
|
14818
14818
|
});
|
|
@@ -14925,7 +14925,7 @@ class d3 extends Xt {
|
|
|
14925
14925
|
}
|
|
14926
14926
|
raycast(t, e) {
|
|
14927
14927
|
const i = this._visibility, s = this._active, l = this._drawRanges, a = this._geometryCount, o = this.matrixWorld, c = this.geometry;
|
|
14928
|
-
k0.material = this.material, k0.geometry.index = c.index, k0.geometry.attributes = c.attributes, k0.geometry.boundingBox === null && (k0.geometry.boundingBox = new
|
|
14928
|
+
k0.material = this.material, k0.geometry.index = c.index, k0.geometry.attributes = c.attributes, k0.geometry.boundingBox === null && (k0.geometry.boundingBox = new W0()), k0.geometry.boundingSphere === null && (k0.geometry.boundingSphere = new I0());
|
|
14929
14929
|
for (let d = 0; d < a; d++) {
|
|
14930
14930
|
if (!i[d] || !s[d])
|
|
14931
14931
|
continue;
|
|
@@ -19339,7 +19339,7 @@ class X2 extends S0 {
|
|
|
19339
19339
|
break;
|
|
19340
19340
|
case "BatchedMesh":
|
|
19341
19341
|
h = o(t.geometry), r = c(t.material), a = new d3(t.maxGeometryCount, t.maxVertexCount, t.maxIndexCount, r), a.geometry = h, a.perObjectFrustumCulled = t.perObjectFrustumCulled, a.sortObjects = t.sortObjects, a._drawRanges = t.drawRanges, a._reservedRanges = t.reservedRanges, a._visibility = t.visibility, a._active = t.active, a._bounds = t.bounds.map((G) => {
|
|
19342
|
-
const Z = new
|
|
19342
|
+
const Z = new W0();
|
|
19343
19343
|
Z.min.fromArray(G.boxMin), Z.max.fromArray(G.boxMax);
|
|
19344
19344
|
const p = new I0();
|
|
19345
19345
|
return p.radius = G.sphereRadius, p.center.fromArray(G.sphereCenter), {
|
|
@@ -21287,13 +21287,13 @@ class E3 extends Ii {
|
|
|
21287
21287
|
}
|
|
21288
21288
|
update() {
|
|
21289
21289
|
const t = this.geometry, e = this.pointMap, i = 1, s = 1;
|
|
21290
|
-
u0.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),
|
|
21290
|
+
u0.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), V0("c", e, t, u0, 0, 0, -1), V0("t", e, t, u0, 0, 0, 1), V0("n1", e, t, u0, -i, -s, -1), V0("n2", e, t, u0, i, -s, -1), V0("n3", e, t, u0, -i, s, -1), V0("n4", e, t, u0, i, s, -1), V0("f1", e, t, u0, -i, -s, 1), V0("f2", e, t, u0, i, -s, 1), V0("f3", e, t, u0, -i, s, 1), V0("f4", e, t, u0, i, s, 1), V0("u1", e, t, u0, i * 0.7, s * 1.1, -1), V0("u2", e, t, u0, -i * 0.7, s * 1.1, -1), V0("u3", e, t, u0, 0, s * 2, -1), V0("cf1", e, t, u0, -i, 0, 1), V0("cf2", e, t, u0, i, 0, 1), V0("cf3", e, t, u0, 0, -s, 1), V0("cf4", e, t, u0, 0, s, 1), V0("cn1", e, t, u0, -i, 0, -1), V0("cn2", e, t, u0, i, 0, -1), V0("cn3", e, t, u0, 0, -s, -1), V0("cn4", e, t, u0, 0, s, -1), t.getAttribute("position").needsUpdate = !0;
|
|
21291
21291
|
}
|
|
21292
21292
|
dispose() {
|
|
21293
21293
|
this.geometry.dispose(), this.material.dispose();
|
|
21294
21294
|
}
|
|
21295
21295
|
}
|
|
21296
|
-
function
|
|
21296
|
+
function V0(n, t, e, i, s, l, a) {
|
|
21297
21297
|
Cd.set(s, l, a).unproject(i);
|
|
21298
21298
|
const o = t[n];
|
|
21299
21299
|
if (o !== void 0) {
|
|
@@ -21302,7 +21302,7 @@ function y0(n, t, e, i, s, l, a) {
|
|
|
21302
21302
|
c.setXYZ(o[d], Cd.x, Cd.y, Cd.z);
|
|
21303
21303
|
}
|
|
21304
21304
|
}
|
|
21305
|
-
const Sd = /* @__PURE__ */ new
|
|
21305
|
+
const Sd = /* @__PURE__ */ new W0();
|
|
21306
21306
|
class S4 extends Ii {
|
|
21307
21307
|
constructor(t, e = 16776960) {
|
|
21308
21308
|
const i = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), s = new Float32Array(8 * 3), l = new Ot();
|
|
@@ -21535,7 +21535,7 @@ class M4 {
|
|
|
21535
21535
|
class I4 extends $e {
|
|
21536
21536
|
// @deprecated, r162
|
|
21537
21537
|
constructor(t = 1, e = 1, i = 1, s = {}) {
|
|
21538
|
-
console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'), super(t, e,
|
|
21538
|
+
console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'), super(t, e, y0(Et({}, s), { count: i })), this.isWebGLMultipleRenderTargets = !0;
|
|
21539
21539
|
}
|
|
21540
21540
|
get texture() {
|
|
21541
21541
|
return this.textures;
|
|
@@ -21581,7 +21581,7 @@ const Yh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
21581
21581
|
Bone: Zh,
|
|
21582
21582
|
BooleanKeyframeTrack: cl,
|
|
21583
21583
|
Box2: g4,
|
|
21584
|
-
Box3:
|
|
21584
|
+
Box3: W0,
|
|
21585
21585
|
Box3Helper: ar,
|
|
21586
21586
|
BoxGeometry: e0,
|
|
21587
21587
|
BoxHelper: S4,
|
|
@@ -32422,7 +32422,7 @@ let ye = class {
|
|
|
32422
32422
|
}), this;
|
|
32423
32423
|
}
|
|
32424
32424
|
getSize() {
|
|
32425
|
-
const t = new
|
|
32425
|
+
const t = new W0().setFromObject(this.object3d);
|
|
32426
32426
|
return {
|
|
32427
32427
|
min: t.min,
|
|
32428
32428
|
max: t.max,
|
|
@@ -32440,7 +32440,7 @@ let ye = class {
|
|
|
32440
32440
|
instantiate(t) {
|
|
32441
32441
|
return this.drawController.instantiate(this, {
|
|
32442
32442
|
create: (e) => {
|
|
32443
|
-
this.object3d && (e.object3d = this.object3d.clone(!0)), typeof t == "number" &&
|
|
32443
|
+
this.object3d && (e.object3d = this.object3d.clone(!0)), typeof t == "number" && (e.object3d = new Mo(
|
|
32444
32444
|
e.object3d.geometry,
|
|
32445
32445
|
e.object3d.material,
|
|
32446
32446
|
t
|
|
@@ -32764,7 +32764,7 @@ let wY = class {
|
|
|
32764
32764
|
else if (t.isRectAreaLight)
|
|
32765
32765
|
s = new UC(t);
|
|
32766
32766
|
else {
|
|
32767
|
-
const l = new
|
|
32767
|
+
const l = new W0();
|
|
32768
32768
|
if (l.setFromObject(t, !0), l.isEmpty() === !1) {
|
|
32769
32769
|
s = new ar(l);
|
|
32770
32770
|
const a = s.material;
|
|
@@ -34991,7 +34991,7 @@ class C7 {
|
|
|
34991
34991
|
}
|
|
34992
34992
|
}
|
|
34993
34993
|
function S7(n, t, e) {
|
|
34994
|
-
const i = t.attributes, s = new
|
|
34994
|
+
const i = t.attributes, s = new W0();
|
|
34995
34995
|
if (i.POSITION !== void 0) {
|
|
34996
34996
|
const o = e.json.accessors[i.POSITION], c = o.min, d = o.max;
|
|
34997
34997
|
if (c !== void 0 && d !== void 0) {
|
|
@@ -37459,7 +37459,7 @@ const vs = /* @__PURE__ */ new Map(), LN = (n = {}) => ({
|
|
|
37459
37459
|
else {
|
|
37460
37460
|
let Z = n.box3;
|
|
37461
37461
|
if (!Z) {
|
|
37462
|
-
Z = new
|
|
37462
|
+
Z = new W0();
|
|
37463
37463
|
const W = t.parameters.shapes.getPoints().map((X) => [X.x, X.y, 0]).flat();
|
|
37464
37464
|
Z.setFromArray(W);
|
|
37465
37465
|
}
|
|
@@ -37491,7 +37491,7 @@ const vs = /* @__PURE__ */ new Map(), LN = (n = {}) => ({
|
|
|
37491
37491
|
if (vs.has(e))
|
|
37492
37492
|
X = vs.get(e);
|
|
37493
37493
|
else {
|
|
37494
|
-
const x = new
|
|
37494
|
+
const x = new W0();
|
|
37495
37495
|
x.setFromArray(e);
|
|
37496
37496
|
const C = x.getSize(new Y());
|
|
37497
37497
|
n.split && (C.z /= 1 - n.split), n.sideRepeat && (C.z /= n.sideRepeat), X = {
|
|
@@ -41145,7 +41145,7 @@ function Bl(n) {
|
|
|
41145
41145
|
const t = new qt();
|
|
41146
41146
|
return t.color.setScalar(n), t;
|
|
41147
41147
|
}
|
|
41148
|
-
const pX = "0.13.
|
|
41148
|
+
const pX = "0.13.9", o1 = !1;
|
|
41149
41149
|
class Na {
|
|
41150
41150
|
constructor(t, e = {}) {
|
|
41151
41151
|
D(this, "container");
|
|
@@ -41291,7 +41291,7 @@ class Na {
|
|
|
41291
41291
|
mouseRight: this.leftTruck ? ti.ROTATE : ti.TRUCK,
|
|
41292
41292
|
mouseWheel: ti.DOLLY
|
|
41293
41293
|
}, this.settings = new Proxy(
|
|
41294
|
-
|
|
41294
|
+
y0(Et(Et({}, this.initSettingsObj), this.mouseButtonsActiveStore), {
|
|
41295
41295
|
mouseNone: !1
|
|
41296
41296
|
}),
|
|
41297
41297
|
{
|
|
@@ -41989,7 +41989,7 @@ const DI = {
|
|
|
41989
41989
|
};
|
|
41990
41990
|
});
|
|
41991
41991
|
}), l = Et(Et({}, l), i == null ? void 0 : i.extrudeLineGeojsonMap);
|
|
41992
|
-
super(e,
|
|
41992
|
+
super(e, y0(Et({
|
|
41993
41993
|
parentBg: !1,
|
|
41994
41994
|
continentsBg: !1,
|
|
41995
41995
|
continentsBgDepth: 0,
|
|
@@ -42012,7 +42012,8 @@ const DI = {
|
|
|
42012
42012
|
showOneLevel: !1,
|
|
42013
42013
|
handleBackKeepCamvasState: !0,
|
|
42014
42014
|
curvatureResolution: 0,
|
|
42015
|
-
worldPacificCentre: !1
|
|
42015
|
+
worldPacificCentre: !1,
|
|
42016
|
+
mapBoundary: !0
|
|
42016
42017
|
}, i), {
|
|
42017
42018
|
geojsonMap: s,
|
|
42018
42019
|
extrudeLineGeojsonMap: l,
|
|
@@ -42033,7 +42034,8 @@ const DI = {
|
|
|
42033
42034
|
D(this, "extendsOptions", {
|
|
42034
42035
|
mapDepth: () => this.mapObj.depth,
|
|
42035
42036
|
equirectangular: () => this.options.equirectangular,
|
|
42036
|
-
handleBackKeepCamvasState: () => this.options.handleBackKeepCamvasState
|
|
42037
|
+
handleBackKeepCamvasState: () => this.options.handleBackKeepCamvasState,
|
|
42038
|
+
mapBoundary: () => this.options.mapBoundary
|
|
42037
42039
|
});
|
|
42038
42040
|
D(this, "initSettingsObj", {
|
|
42039
42041
|
label: !1,
|
|
@@ -42097,14 +42099,15 @@ const DI = {
|
|
|
42097
42099
|
}
|
|
42098
42100
|
initMap(e) {
|
|
42099
42101
|
return Zt(this, null, function* () {
|
|
42102
|
+
var a;
|
|
42100
42103
|
if (yield this.initMaterial(e), this.options.parentBg) {
|
|
42101
|
-
const
|
|
42102
|
-
this.mList.showMaterialList.set(
|
|
42104
|
+
const o = Z0[e].parent || 0, c = this.options.geojsonMap[o], d = this.options.bboxMap[o], h = this.mList.getMaterialObj("parentPlane"), r = o === 0 ? "world" : `${o}`;
|
|
42105
|
+
this.mList.showMaterialList.set(r + "area", [
|
|
42103
42106
|
"parentPlane#topMat",
|
|
42104
42107
|
"parentPlane#sideMat"
|
|
42105
|
-
]), this.mList.showMaterialList.set(
|
|
42106
|
-
const
|
|
42107
|
-
geojson:
|
|
42108
|
+
]), this.mList.showMaterialList.set(r + "line", "parentPlane#lineMat"), this.mList.showMaterialListTitle.set(r + "area", "背景板块"), this.mList.showMaterialListTitle.set(r + "line", "背景线");
|
|
42109
|
+
const u = yield this.drawController.draw("PlaneMap", {
|
|
42110
|
+
geojson: c,
|
|
42108
42111
|
projection: {
|
|
42109
42112
|
center: this.pcenter,
|
|
42110
42113
|
scale: this.pscale,
|
|
@@ -42112,11 +42115,11 @@ const DI = {
|
|
|
42112
42115
|
equirectangular: this.options.equirectangular
|
|
42113
42116
|
},
|
|
42114
42117
|
areaGroup: !1,
|
|
42115
|
-
bbox:
|
|
42118
|
+
bbox: d,
|
|
42116
42119
|
depth: this.options.parentBgDepth,
|
|
42117
|
-
materialOptions: Et({},
|
|
42120
|
+
materialOptions: Et({}, h)
|
|
42118
42121
|
});
|
|
42119
|
-
|
|
42122
|
+
u.position.z = -this.options.parentBgDepth, this.parentBg.push(u);
|
|
42120
42123
|
}
|
|
42121
42124
|
this.options.continentsBg && (this.continentsBg = yield this.drawController.draw("ContinentsBg", {
|
|
42122
42125
|
depth: this.options.continentsBgDepth,
|
|
@@ -42142,7 +42145,10 @@ const DI = {
|
|
|
42142
42145
|
new Y(),
|
|
42143
42146
|
!1
|
|
42144
42147
|
), l = this.pencil.cameraControls.getTarget(new Y(), !1);
|
|
42145
|
-
i == null || i.spotLight.position.copy(s), i == null || i.spotLight.target.position.copy(l)
|
|
42148
|
+
if (i == null || i.spotLight.position.copy(s), i == null || i.spotLight.target.position.copy(l), this.options.mapBoundary) {
|
|
42149
|
+
const o = new W0().setFromObject((a = this.map) == null ? void 0 : a.object3d);
|
|
42150
|
+
this.pencil.cameraControls.setBoundary(o);
|
|
42151
|
+
}
|
|
42146
42152
|
});
|
|
42147
42153
|
}
|
|
42148
42154
|
loaderAdd(e) {
|
|
@@ -42998,8 +43004,8 @@ class WX extends ye {
|
|
|
42998
43004
|
const x = [
|
|
42999
43005
|
Z.geometry.coordinates[0].filter((C) => Mm(C, X))
|
|
43000
43006
|
];
|
|
43001
|
-
return x[0].length && m[p].push(
|
|
43002
|
-
geometry:
|
|
43007
|
+
return x[0].length && m[p].push(y0(Et({}, Z), {
|
|
43008
|
+
geometry: y0(Et({}, Z.geometry), {
|
|
43003
43009
|
coordinates: x
|
|
43004
43010
|
})
|
|
43005
43011
|
})), !0;
|
|
@@ -43086,8 +43092,8 @@ class yX extends ye {
|
|
|
43086
43092
|
const g = B5(G.geometry.coordinates[0]);
|
|
43087
43093
|
if (jX(W, g)) {
|
|
43088
43094
|
const C = eT(W, G);
|
|
43089
|
-
C.features[0] && u[Z].push(
|
|
43090
|
-
geometry:
|
|
43095
|
+
C.features[0] && u[Z].push(y0(Et({}, G), {
|
|
43096
|
+
geometry: y0(Et({}, G.geometry), {
|
|
43091
43097
|
coordinates: C.features[0].geometry.coordinates
|
|
43092
43098
|
})
|
|
43093
43099
|
}));
|
|
@@ -44863,7 +44869,7 @@ class xT extends Oo {
|
|
|
44863
44869
|
labelLite: !1,
|
|
44864
44870
|
shadowMap: !1
|
|
44865
44871
|
});
|
|
44866
|
-
this.extendsOptions =
|
|
44872
|
+
this.extendsOptions = y0(Et({}, this.extendsOptions), {
|
|
44867
44873
|
mapDepth: () => this.options.mapDepth,
|
|
44868
44874
|
clickOusideBack: this.options.clickOusideBack,
|
|
44869
44875
|
clickHandleDrillDown: this.options.clickHandleDrillDown,
|
|
@@ -45013,11 +45019,12 @@ class xT extends Oo {
|
|
|
45013
45019
|
}
|
|
45014
45020
|
initMap(e) {
|
|
45015
45021
|
return Zt(this, null, function* () {
|
|
45022
|
+
var a;
|
|
45016
45023
|
yield this.initMaterial();
|
|
45017
45024
|
let i = 1e3, s = 1e3;
|
|
45018
45025
|
const l = new Y(0, 0, 0);
|
|
45019
45026
|
if (this.options.parentBg) {
|
|
45020
|
-
const
|
|
45027
|
+
const o = Z0[e].parent || 0, c = this.options.geojsonMap[o], d = this.options.bboxMap[o], h = {
|
|
45021
45028
|
projection: {
|
|
45022
45029
|
center: this.pcenter,
|
|
45023
45030
|
scale: this.pscale,
|
|
@@ -45025,37 +45032,37 @@ class xT extends Oo {
|
|
|
45025
45032
|
equirectangular: this.options.equirectangular
|
|
45026
45033
|
},
|
|
45027
45034
|
areaGroup: !1,
|
|
45028
|
-
bbox:
|
|
45035
|
+
bbox: d,
|
|
45029
45036
|
depth: 0
|
|
45030
45037
|
};
|
|
45031
45038
|
if (this.options.adcode !== 1e5) {
|
|
45032
|
-
const
|
|
45039
|
+
const G = this.mList.getMaterialObj("parentPlane"), Z = yield ln.draw(
|
|
45033
45040
|
"PlaneMap",
|
|
45034
45041
|
Et({
|
|
45035
|
-
geojson:
|
|
45042
|
+
geojson: y0(Et({}, c), {
|
|
45036
45043
|
features: [
|
|
45037
|
-
...
|
|
45044
|
+
...c.features.filter((p) => p.properties.adcode !== e)
|
|
45038
45045
|
]
|
|
45039
45046
|
}),
|
|
45040
|
-
materialOptions: Et({},
|
|
45041
|
-
},
|
|
45047
|
+
materialOptions: Et({}, G)
|
|
45048
|
+
}, h),
|
|
45042
45049
|
this.group
|
|
45043
45050
|
);
|
|
45044
|
-
this.parentBg.push(
|
|
45051
|
+
this.parentBg.push(Z);
|
|
45045
45052
|
}
|
|
45046
|
-
const
|
|
45053
|
+
const r = this.mList.getMaterialObj("worldPlane"), u = yield ln.draw(
|
|
45047
45054
|
"PlaneMap",
|
|
45048
45055
|
Et({
|
|
45049
|
-
geojson:
|
|
45056
|
+
geojson: y0(Et({}, c), {
|
|
45050
45057
|
features: [
|
|
45051
|
-
...this.options.geojsonMap[0].features.filter((
|
|
45058
|
+
...this.options.geojsonMap[0].features.filter((G) => G.properties.ISO_A3 !== "CHN")
|
|
45052
45059
|
]
|
|
45053
45060
|
}),
|
|
45054
|
-
materialOptions: Et({},
|
|
45055
|
-
},
|
|
45061
|
+
materialOptions: Et({}, r)
|
|
45062
|
+
}, h),
|
|
45056
45063
|
this.group
|
|
45057
|
-
), { min:
|
|
45058
|
-
i =
|
|
45064
|
+
), { min: m, max: b } = u.getSize();
|
|
45065
|
+
i = b.x - m.x, s = b.y - m.y, l.set((b.x + m.x) / 2, (b.y + m.y) / 2, 0), this.parentBg.push(u);
|
|
45059
45066
|
}
|
|
45060
45067
|
if (this.options.continentsBg && (this.continentsBg = yield ln.draw(
|
|
45061
45068
|
"ContinentsBg",
|
|
@@ -45069,7 +45076,7 @@ class xT extends Oo {
|
|
|
45069
45076
|
adcodes: [e],
|
|
45070
45077
|
duration: 0
|
|
45071
45078
|
}), this.options.bottomPlane) {
|
|
45072
|
-
const
|
|
45079
|
+
const o = yield ln.draw(
|
|
45073
45080
|
"Plane",
|
|
45074
45081
|
{
|
|
45075
45082
|
width: i,
|
|
@@ -45078,7 +45085,11 @@ class xT extends Oo {
|
|
|
45078
45085
|
},
|
|
45079
45086
|
this.group
|
|
45080
45087
|
);
|
|
45081
|
-
this.options.bottomPlaneWater &&
|
|
45088
|
+
this.options.bottomPlaneWater && o.addWater(), this.mList.changeObject3dName(o.object3d, "map-$1"), o.position.copy(l), o.position.z -= 0.1;
|
|
45089
|
+
}
|
|
45090
|
+
if (this.options.mapBoundary) {
|
|
45091
|
+
const o = new W0().setFromObject((a = this.map) == null ? void 0 : a.object3d);
|
|
45092
|
+
this.pencil.cameraControls.setBoundary(o);
|
|
45082
45093
|
}
|
|
45083
45094
|
});
|
|
45084
45095
|
}
|
|
@@ -45233,7 +45244,7 @@ const RT = (n) => {
|
|
|
45233
45244
|
const l = Z0[t].parent || 0, a = n.options.geojsonMap[l], o = n.options.bboxMap[l], c = n.mList.getMaterialObj("parentPlane"), d = yield ln.draw(
|
|
45234
45245
|
"PlaneMap",
|
|
45235
45246
|
{
|
|
45236
|
-
geojson:
|
|
45247
|
+
geojson: y0(Et({}, a), {
|
|
45237
45248
|
features: a.features.filter((u) => u.properties.adcode !== t)
|
|
45238
45249
|
}),
|
|
45239
45250
|
projection: {
|
|
@@ -45398,7 +45409,6 @@ const nh = class nh extends xT {
|
|
|
45398
45409
|
initCity: !1,
|
|
45399
45410
|
cityOnMap: !1,
|
|
45400
45411
|
clipOutShow: !0,
|
|
45401
|
-
mapBoundary: !0,
|
|
45402
45412
|
allCity: !1,
|
|
45403
45413
|
bloom: !1,
|
|
45404
45414
|
showBuilding: !0,
|
|
@@ -45422,7 +45432,7 @@ const nh = class nh extends xT {
|
|
|
45422
45432
|
showRiver: this.options.showRiver
|
|
45423
45433
|
// ...this.extendsOptions,
|
|
45424
45434
|
// initCity: this.options.initCity,
|
|
45425
|
-
} : this.extendsOptions =
|
|
45435
|
+
} : this.extendsOptions = y0(Et({}, this.extendsOptions), {
|
|
45426
45436
|
initCity: this.options.initCity
|
|
45427
45437
|
}), this.pencilConfig = fT, this.pencilConfig.bloom = this.options.bloom;
|
|
45428
45438
|
}
|
|
@@ -45514,10 +45524,9 @@ const nh = class nh extends xT {
|
|
|
45514
45524
|
}
|
|
45515
45525
|
initCityOnMap(e) {
|
|
45516
45526
|
return Zt(this, null, function* () {
|
|
45517
|
-
var l;
|
|
45518
45527
|
if (this.getAdcodeShowLevel(e) !== "city") {
|
|
45519
|
-
const
|
|
45520
|
-
this.getAdcodeShowLevel(
|
|
45528
|
+
const l = Z0[e].parent;
|
|
45529
|
+
this.getAdcodeShowLevel(l) === "city" && (yield this.initCityOnMap(l));
|
|
45521
45530
|
return;
|
|
45522
45531
|
}
|
|
45523
45532
|
const i = e === this.mapInfo.adcode || Z0[this.mapInfo.adcode].parent === e || Z0[e].parent === this.mapInfo.adcode;
|
|
@@ -45527,14 +45536,11 @@ const nh = class nh extends xT {
|
|
|
45527
45536
|
}), yield this.cityVisObj[e].state.promise;
|
|
45528
45537
|
const s = this.cityVisObj[e].city;
|
|
45529
45538
|
if (i) {
|
|
45530
|
-
const
|
|
45531
|
-
s.group.position.z = this.mapObj.z +
|
|
45539
|
+
const l = this.mapObj.depth + 1e-5;
|
|
45540
|
+
s.group.position.z = this.mapObj.z + l, s.outAreaGroup && (s.outAreaGroup.position.z -= l / s.multiplyScalar);
|
|
45532
45541
|
} else
|
|
45533
45542
|
s.group.position.z = this.mapObj.z;
|
|
45534
|
-
|
|
45535
|
-
const a = new V0().setFromObject((l = this.map) == null ? void 0 : l.object3d);
|
|
45536
|
-
this.pencil.cameraControls.setBoundary(a);
|
|
45537
|
-
}
|
|
45543
|
+
this.pencil.camera.near = 0.01, this.pencil.camera.far = 7, this.pencil.camera.updateProjectionMatrix(), s.group.show(), this.verticalDragToForward = !0;
|
|
45538
45544
|
});
|
|
45539
45545
|
}
|
|
45540
45546
|
showCity(e, i) {
|
|
@@ -46028,7 +46034,7 @@ class CX extends z0 {
|
|
|
46028
46034
|
execute() {
|
|
46029
46035
|
return Zt(this, null, function* () {
|
|
46030
46036
|
var s, l;
|
|
46031
|
-
if (this.obj = yield an.draw(this.objectType,
|
|
46037
|
+
if (this.obj = yield an.draw(this.objectType, y0(Et({}, this.objectOptions), {
|
|
46032
46038
|
key: `${this.id}`
|
|
46033
46039
|
})), this.editor.viewport.vis.mList.objectList.has(this.obj.object3d))
|
|
46034
46040
|
(s = this.editor.viewport.vis) == null || s.mList.changeObject3dName(
|
|
@@ -46390,14 +46396,14 @@ class BT {
|
|
|
46390
46396
|
return {
|
|
46391
46397
|
eo: this.extendsOptions,
|
|
46392
46398
|
delLoadObj: t,
|
|
46393
|
-
bg: this.bg.texture ?
|
|
46399
|
+
bg: this.bg.texture ? y0(Et({}, this.bg), {
|
|
46394
46400
|
texture: Ym(this.bg.texture)
|
|
46395
46401
|
}) : {}
|
|
46396
46402
|
};
|
|
46397
46403
|
}
|
|
46398
46404
|
fromJSON(t) {
|
|
46399
46405
|
var e;
|
|
46400
|
-
this.extendsOptions = t.eo || {}, (e = t.bg) != null && e.texture && this.setBgOptions(
|
|
46406
|
+
this.extendsOptions = t.eo || {}, (e = t.bg) != null && e.texture && this.setBgOptions(y0(Et({}, t.bg), {
|
|
46401
46407
|
texture: Sm(t.bg.texture)
|
|
46402
46408
|
})), t.delLoadObj && t.delLoadObj.length && (this.delLoadObj = t.delLoadObj.reduce((i, s) => (i[s] = !0, i), {}));
|
|
46403
46409
|
}
|
|
@@ -46521,7 +46527,7 @@ const ro = (n, t) => {
|
|
|
46521
46527
|
}), n.h.u[0] && n.h.u[0].visType === "city" && (n.h.u[0].visOptions.jsonName || (n.h.u = [])), n.h.u[0] && n.h.u[0].visType === "map") {
|
|
46522
46528
|
if (n.h.u[0].visOptions.geojson) {
|
|
46523
46529
|
const { geojson: i, adcode: s, geojsonLite: l } = n.h.u[0].visOptions;
|
|
46524
|
-
n.h.u[0].visOptions =
|
|
46530
|
+
n.h.u[0].visOptions = y0(Et({}, n.h.u[0].visOptions), {
|
|
46525
46531
|
geojsonMap: {
|
|
46526
46532
|
[s]: i
|
|
46527
46533
|
},
|
|
@@ -46532,7 +46538,7 @@ const ro = (n, t) => {
|
|
|
46532
46538
|
}
|
|
46533
46539
|
if (n.h.u[0].visOptions.bbox) {
|
|
46534
46540
|
const { bbox: i, bboxMap: s, adcode: l } = n.h.u[0].visOptions;
|
|
46535
|
-
n.h.u[0].visOptions =
|
|
46541
|
+
n.h.u[0].visOptions = y0(Et({}, n.h.u[0].visOptions), {
|
|
46536
46542
|
bboxMap: s || {
|
|
46537
46543
|
[l]: i
|
|
46538
46544
|
}
|
|
@@ -46540,7 +46546,7 @@ const ro = (n, t) => {
|
|
|
46540
46546
|
}
|
|
46541
46547
|
if (n.h.u[0].visOptions.worldBg) {
|
|
46542
46548
|
const { worldBg: i } = n.h.u[0].visOptions;
|
|
46543
|
-
n.h.u[0].visOptions =
|
|
46549
|
+
n.h.u[0].visOptions = y0(Et({}, n.h.u[0].visOptions), {
|
|
46544
46550
|
parentBg: i
|
|
46545
46551
|
}), delete n.h.u[0].visOptions.worldBg;
|
|
46546
46552
|
}
|
|
@@ -46628,7 +46634,7 @@ const QT = (e, ...i) => Zt(void 0, [e, ...i], function* (n, t = sl) {
|
|
|
46628
46634
|
);
|
|
46629
46635
|
const { res: r } = yield is(
|
|
46630
46636
|
e + `/geojson/${d || "json-lite"}/${t.adcode}.json`
|
|
46631
|
-
), u = qd(r), m = t.adcode, b =
|
|
46637
|
+
), u = qd(r), m = t.adcode, b = y0(Et({}, t), {
|
|
46632
46638
|
geojsonMap: {
|
|
46633
46639
|
[m]: t.cityOnMap ? r : h
|
|
46634
46640
|
},
|
|
@@ -46785,7 +46791,7 @@ class L8 {
|
|
|
46785
46791
|
(c) => {
|
|
46786
46792
|
const { name: d, meta: h } = i.objectList.get(c);
|
|
46787
46793
|
let r = !1;
|
|
46788
|
-
return h != null && h.baseObject && h.remove !== !1 && (r = !0),
|
|
46794
|
+
return h != null && h.baseObject && h.remove !== !1 && (r = !0), y0(Et({
|
|
46789
46795
|
uuid: d.replace(d[0], d[0].toLowerCase()),
|
|
46790
46796
|
object: c,
|
|
46791
46797
|
name: c.name
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.13.
|
|
1
|
+
declare const _default: "0.13.9";
|
|
2
2
|
export default _default;
|
package/dist/vis/map/index.d.ts
CHANGED
package/dist/vis/map2/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ interface MapCityOptions extends Map2Options {
|
|
|
5
5
|
initCity?: boolean;
|
|
6
6
|
cityOnMap?: boolean;
|
|
7
7
|
clipOutShow?: boolean;
|
|
8
|
-
mapBoundary?: boolean;
|
|
9
8
|
cityBboxMap?: Record<number, [number, number, number, number]>;
|
|
10
9
|
jsonNameObj?: Record<number, string>;
|
|
11
10
|
allCity?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vis-core",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.10",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "npm run version && PORT=5173 bundler-dev",
|
|
6
6
|
"build:site": "npm run version &&PUBLIC_EXCLUDE=public/city bundler",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"eslint-config-bundler": "^0.4.0",
|
|
47
47
|
"esus": "^0.4.27",
|
|
48
48
|
"fs-extra": "^11.1.1",
|
|
49
|
-
"gl-draw": "0.9.0-beta.
|
|
49
|
+
"gl-draw": "0.9.0-beta.406",
|
|
50
50
|
"idb-keyval": "^6.2.1",
|
|
51
51
|
"pinia": "^2.1.7",
|
|
52
52
|
"prettier-config-bundler": "^0.4.1",
|