vis-core 0.21.58 → 0.21.60
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.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/index.module.js +86 -80
- package/dist/version.d.ts +1 -1
- package/dist/vis/map/index.d.ts +2 -1
- package/package.json +2 -2
package/dist/index.module.js
CHANGED
|
@@ -55,9 +55,9 @@ import CryptoJS from "crypto-js";
|
|
|
55
55
|
import { makePromiseCreator, WorkerPool, generateUUID as generateUUID$1 } from "esus-lite";
|
|
56
56
|
import { EventEmitter } from "events";
|
|
57
57
|
import { throttle } from "lodash-es";
|
|
58
|
+
import { union, centroid, booleanPointInPolygon as booleanPointInPolygon$1, point, polygon, bbox, center, flatten as flatten$3, explode, inside, intersect as intersect$1, booleanContains, lineString, booleanCrosses } from "@turf/turf";
|
|
58
59
|
import json100000 from "geojson-cn/extra/100000-lite-next.json";
|
|
59
60
|
import countries from "geojson-cn/extra/countries-next.json";
|
|
60
|
-
import { union, centroid, booleanPointInPolygon as booleanPointInPolygon$1, point, polygon, center, flatten as flatten$3, explode, inside, intersect as intersect$1, booleanContains, lineString, booleanCrosses, bbox } from "@turf/turf";
|
|
61
61
|
import continents from "geojson-cn/extra/continents.json";
|
|
62
62
|
import { adcodeMap, findLevelJsonItem, allArr } from "geojson-cn";
|
|
63
63
|
import chinaJson from "geojson-cn/extra/100000-next.json";
|
|
@@ -89,7 +89,7 @@ const publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRz
|
|
|
89
89
|
).toString(CryptoJS.enc.Utf8), Jt = JSON.parse(Tt), $t = Date.now();
|
|
90
90
|
return !Jt.s || Jt.s > $t ? (this.token = void 0, "") : Jt.e && Jt.e < $t ? (this.token = void 0, "") : (Jt.isValid = Yt, Jt);
|
|
91
91
|
}
|
|
92
|
-
}, version = "0.21.
|
|
92
|
+
}, version = "0.21.60";
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
|
95
95
|
* Copyright 2010-2024 Three.js Authors
|
|
@@ -22805,7 +22805,7 @@ a$1 && typeof a$1.ownKeys == "function" ? l$1 = a$1.ownKeys : Object.getOwnPrope
|
|
|
22805
22805
|
} : l$1 = function(c) {
|
|
22806
22806
|
return Object.getOwnPropertyNames(c);
|
|
22807
22807
|
};
|
|
22808
|
-
function C$
|
|
22808
|
+
function C$2(c) {
|
|
22809
22809
|
console && console.warn && console.warn(c);
|
|
22810
22810
|
}
|
|
22811
22811
|
var m = Number.isNaN || function(c) {
|
|
@@ -22885,7 +22885,7 @@ function g(c, e, s, r) {
|
|
|
22885
22885
|
else if (typeof ct == "function" ? ct = st[e] = r ? [s, ct] : [ct, s] : r ? ct.unshift(s) : ct.push(s), f = y$1(c), f > 0 && ct.length > f && !ct.warned) {
|
|
22886
22886
|
ct.warned = !0;
|
|
22887
22887
|
var Zt = new Error("Possible EventEmitter memory leak detected. " + ct.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
22888
|
-
Zt.name = "MaxListenersExceededWarning", Zt.emitter = c, Zt.type = e, Zt.count = ct.length, C$
|
|
22888
|
+
Zt.name = "MaxListenersExceededWarning", Zt.emitter = c, Zt.type = e, Zt.count = ct.length, C$2(Zt);
|
|
22889
22889
|
}
|
|
22890
22890
|
return c;
|
|
22891
22891
|
}
|
|
@@ -28384,7 +28384,7 @@ function estimate(c, e) {
|
|
|
28384
28384
|
function vec(c) {
|
|
28385
28385
|
return new Float64Array(c);
|
|
28386
28386
|
}
|
|
28387
|
-
const ccwerrboundA = (3 + 16 * epsilon$1) * epsilon$1, ccwerrboundB = (2 + 12 * epsilon$1) * epsilon$1, ccwerrboundC = (9 + 64 * epsilon$1) * epsilon$1 * epsilon$1, B$3 = vec(4), C1 = vec(8), C2 = vec(12), D$
|
|
28387
|
+
const ccwerrboundA = (3 + 16 * epsilon$1) * epsilon$1, ccwerrboundB = (2 + 12 * epsilon$1) * epsilon$1, ccwerrboundC = (9 + 64 * epsilon$1) * epsilon$1 * epsilon$1, B$3 = vec(4), C1 = vec(8), C2 = vec(12), D$1 = vec(16), u$1 = vec(4);
|
|
28388
28388
|
function orient2dadapt(c, e, s, r, f, st, ct) {
|
|
28389
28389
|
let Zt, Wt, Yt, vt, Tt, Jt, $t, Xe, Qe, Je, de, Ke, _e, $e, qe, t0, e0, i0;
|
|
28390
28390
|
const n0 = c - f, s0 = s - f, a0 = e - st, h0 = r - st;
|
|
@@ -28396,8 +28396,8 @@ function orient2dadapt(c, e, s, r, f, st, ct) {
|
|
|
28396
28396
|
$e = n0 * vt, Jt = splitter * n0, $t = Jt - (Jt - n0), Xe = n0 - $t, Jt = splitter * vt, Qe = Jt - (Jt - vt), Je = vt - Qe, qe = Xe * Je - ($e - $t * Qe - Xe * Qe - $t * Je), t0 = a0 * Yt, Jt = splitter * a0, $t = Jt - (Jt - a0), Xe = a0 - $t, Jt = splitter * Yt, Qe = Jt - (Jt - Yt), Je = Yt - Qe, e0 = Xe * Je - (t0 - $t * Qe - Xe * Qe - $t * Je), de = qe - e0, Tt = qe - de, u$1[0] = qe - (de + Tt) + (Tt - e0), Ke = $e + de, Tt = Ke - $e, _e = $e - (Ke - Tt) + (de - Tt), de = _e - t0, Tt = _e - de, u$1[1] = _e - (de + Tt) + (Tt - t0), i0 = Ke + de, Tt = i0 - Ke, u$1[2] = Ke - (i0 - Tt) + (de - Tt), u$1[3] = i0;
|
|
28397
28397
|
const r0 = sum(u0, C1, 4, u$1, C2);
|
|
28398
28398
|
$e = Zt * vt, Jt = splitter * Zt, $t = Jt - (Jt - Zt), Xe = Zt - $t, Jt = splitter * vt, Qe = Jt - (Jt - vt), Je = vt - Qe, qe = Xe * Je - ($e - $t * Qe - Xe * Qe - $t * Je), t0 = Wt * Yt, Jt = splitter * Wt, $t = Jt - (Jt - Wt), Xe = Wt - $t, Jt = splitter * Yt, Qe = Jt - (Jt - Yt), Je = Yt - Qe, e0 = Xe * Je - (t0 - $t * Qe - Xe * Qe - $t * Je), de = qe - e0, Tt = qe - de, u$1[0] = qe - (de + Tt) + (Tt - e0), Ke = $e + de, Tt = Ke - $e, _e = $e - (Ke - Tt) + (de - Tt), de = _e - t0, Tt = _e - de, u$1[1] = _e - (de + Tt) + (Tt - t0), i0 = Ke + de, Tt = i0 - Ke, u$1[2] = Ke - (i0 - Tt) + (de - Tt), u$1[3] = i0;
|
|
28399
|
-
const d0 = sum(r0, C2, 4, u$1, D$
|
|
28400
|
-
return D$
|
|
28399
|
+
const d0 = sum(r0, C2, 4, u$1, D$1);
|
|
28400
|
+
return D$1[d0 - 1];
|
|
28401
28401
|
}
|
|
28402
28402
|
function orient2d(c, e, s, r, f, st) {
|
|
28403
28403
|
const ct = (e - st) * (s - f), Zt = (c - f) * (r - st), Wt = ct - Zt, Yt = Math.abs(ct + Zt);
|
|
@@ -33590,7 +33590,7 @@ function n$1(c) {
|
|
|
33590
33590
|
const s = e.prototype;
|
|
33591
33591
|
return !(o(s) === !1 || s.hasOwnProperty("isPrototypeOf") === !1);
|
|
33592
33592
|
}
|
|
33593
|
-
let
|
|
33593
|
+
let C$1 = class {
|
|
33594
33594
|
constructor() {
|
|
33595
33595
|
this.objectType = "BaseObject", this.userData = {}, this.prefab = !1, this.isInstantiate = !1, this.pm = makePromiseCreator(), this.materialList = {}, this.useMaterialType = "origin", this.onPointerIndex = [];
|
|
33596
33596
|
}
|
|
@@ -33669,7 +33669,8 @@ let D$1 = class {
|
|
|
33669
33669
|
return {
|
|
33670
33670
|
min: e.min,
|
|
33671
33671
|
max: e.max,
|
|
33672
|
-
size: e.getSize(new Vector3())
|
|
33672
|
+
size: e.getSize(new Vector3()),
|
|
33673
|
+
center: e.getCenter(new Vector3())
|
|
33673
33674
|
};
|
|
33674
33675
|
}
|
|
33675
33676
|
traverse(e) {
|
|
@@ -36731,7 +36732,7 @@ ht$1.options = {
|
|
|
36731
36732
|
};
|
|
36732
36733
|
let kt$1 = ht$1;
|
|
36733
36734
|
const Ts = Y.ACTION;
|
|
36734
|
-
class t extends
|
|
36735
|
+
class t extends C$1 {
|
|
36735
36736
|
create() {
|
|
36736
36737
|
this.createGroup();
|
|
36737
36738
|
}
|
|
@@ -36844,7 +36845,7 @@ var kt = Object.defineProperty, Ft = Object.defineProperties, qt = Object.getOwn
|
|
|
36844
36845
|
}, Zt = (Wt) => Wt.done ? r(Wt.value) : Promise.resolve(Wt.value).then(st, ct);
|
|
36845
36846
|
Zt((s = s.apply(c, e)).next());
|
|
36846
36847
|
});
|
|
36847
|
-
class Se extends
|
|
36848
|
+
class Se extends C$1 {
|
|
36848
36849
|
constructor(e) {
|
|
36849
36850
|
super(), this.objectType = "BaseObject#Node", this.onNodePointerIndex = [], this.options = P({
|
|
36850
36851
|
type: "2d"
|
|
@@ -36891,7 +36892,7 @@ class Se extends D$1 {
|
|
|
36891
36892
|
}), super.dispose();
|
|
36892
36893
|
}
|
|
36893
36894
|
}
|
|
36894
|
-
class Me extends
|
|
36895
|
+
class Me extends C$1 {
|
|
36895
36896
|
constructor(e) {
|
|
36896
36897
|
super(), this.rectAreaLightUniformsLibInit = !1, this.options = e;
|
|
36897
36898
|
}
|
|
@@ -37124,7 +37125,7 @@ const Vt = (c) => {
|
|
|
37124
37125
|
const { points: e } = c, s = e.reduce((r, f, st) => (st < e.length - 1 && r.push(f, e[st + 1]), r), []);
|
|
37125
37126
|
return new BufferGeometry().setFromPoints(s);
|
|
37126
37127
|
};
|
|
37127
|
-
let Te = class extends
|
|
37128
|
+
let Te = class extends C$1 {
|
|
37128
37129
|
constructor(c = {}) {
|
|
37129
37130
|
super(), this.options = P({}, c);
|
|
37130
37131
|
}
|
|
@@ -37281,7 +37282,7 @@ const gt = (c) => {
|
|
|
37281
37282
|
const { setPointWidth: e, nodes: s } = c, r = new he();
|
|
37282
37283
|
return r.setPoints(s, e), r;
|
|
37283
37284
|
};
|
|
37284
|
-
class Ge extends
|
|
37285
|
+
class Ge extends C$1 {
|
|
37285
37286
|
constructor(e = {}) {
|
|
37286
37287
|
super(), this.options = P({}, e);
|
|
37287
37288
|
}
|
|
@@ -37395,7 +37396,7 @@ const zt = (c) => {
|
|
|
37395
37396
|
endHeight: ct
|
|
37396
37397
|
}));
|
|
37397
37398
|
};
|
|
37398
|
-
class Be extends
|
|
37399
|
+
class Be extends C$1 {
|
|
37399
37400
|
constructor(e) {
|
|
37400
37401
|
super(), this.options = P({}, e);
|
|
37401
37402
|
}
|
|
@@ -37780,7 +37781,7 @@ const Rt = (c) => {
|
|
|
37780
37781
|
});
|
|
37781
37782
|
return E(), Tt;
|
|
37782
37783
|
};
|
|
37783
|
-
class je extends
|
|
37784
|
+
class je extends C$1 {
|
|
37784
37785
|
constructor(e) {
|
|
37785
37786
|
super(), this.options = P({
|
|
37786
37787
|
depth: 1
|
|
@@ -37874,7 +37875,7 @@ class Light extends Me {
|
|
|
37874
37875
|
ct.isPointLight && (ct.shadow.mapSize.width = 2048, ct.shadow.mapSize.height = 2048);
|
|
37875
37876
|
}
|
|
37876
37877
|
}
|
|
37877
|
-
class Point extends
|
|
37878
|
+
class Point extends C$1 {
|
|
37878
37879
|
constructor(s) {
|
|
37879
37880
|
super();
|
|
37880
37881
|
H0(this, "options");
|
|
@@ -37952,7 +37953,7 @@ const M$1 = {
|
|
|
37952
37953
|
return e * c.renderer.getPixelRatio() / ct.width / (1 / Wt);
|
|
37953
37954
|
};
|
|
37954
37955
|
let map;
|
|
37955
|
-
class Arc extends
|
|
37956
|
+
class Arc extends C$1 {
|
|
37956
37957
|
constructor(s) {
|
|
37957
37958
|
super();
|
|
37958
37959
|
H0(this, "options");
|
|
@@ -38112,7 +38113,7 @@ class Arc extends D$1 {
|
|
|
38112
38113
|
});
|
|
38113
38114
|
}
|
|
38114
38115
|
}
|
|
38115
|
-
class CrossPlane extends
|
|
38116
|
+
class CrossPlane extends C$1 {
|
|
38116
38117
|
constructor(s) {
|
|
38117
38118
|
super();
|
|
38118
38119
|
H0(this, "options");
|
|
@@ -38132,7 +38133,7 @@ class CrossPlane extends D$1 {
|
|
|
38132
38133
|
});
|
|
38133
38134
|
}
|
|
38134
38135
|
}
|
|
38135
|
-
class PlaneShadow extends
|
|
38136
|
+
class PlaneShadow extends C$1 {
|
|
38136
38137
|
create() {
|
|
38137
38138
|
return ti(this, null, function* () {
|
|
38138
38139
|
const e = new PlaneGeometry(100, 100, 2, 2), s = new ShadowMaterial();
|
|
@@ -38140,7 +38141,7 @@ class PlaneShadow extends D$1 {
|
|
|
38140
38141
|
});
|
|
38141
38142
|
}
|
|
38142
38143
|
}
|
|
38143
|
-
class Model extends
|
|
38144
|
+
class Model extends C$1 {
|
|
38144
38145
|
constructor(s) {
|
|
38145
38146
|
super();
|
|
38146
38147
|
H0(this, "options");
|
|
@@ -38168,25 +38169,25 @@ class Model extends D$1 {
|
|
|
38168
38169
|
});
|
|
38169
38170
|
}
|
|
38170
38171
|
}
|
|
38171
|
-
class Box extends
|
|
38172
|
+
class Box extends C$1 {
|
|
38172
38173
|
create() {
|
|
38173
38174
|
const e = new BoxGeometry(1, 1, 1, 1, 1, 1);
|
|
38174
38175
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38175
38176
|
}
|
|
38176
38177
|
}
|
|
38177
|
-
class Capsule extends
|
|
38178
|
+
class Capsule extends C$1 {
|
|
38178
38179
|
create() {
|
|
38179
38180
|
const e = new CapsuleGeometry(1, 1, 4, 8);
|
|
38180
38181
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38181
38182
|
}
|
|
38182
38183
|
}
|
|
38183
|
-
class Circle extends
|
|
38184
|
+
class Circle extends C$1 {
|
|
38184
38185
|
create() {
|
|
38185
38186
|
const e = new CircleGeometry(1, 32, 0, Math.PI * 2);
|
|
38186
38187
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38187
38188
|
}
|
|
38188
38189
|
}
|
|
38189
|
-
class Cylinder extends
|
|
38190
|
+
class Cylinder extends C$1 {
|
|
38190
38191
|
create() {
|
|
38191
38192
|
const e = new CylinderGeometry(
|
|
38192
38193
|
1,
|
|
@@ -38201,19 +38202,19 @@ class Cylinder extends D$1 {
|
|
|
38201
38202
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38202
38203
|
}
|
|
38203
38204
|
}
|
|
38204
|
-
class Dodecahedron extends
|
|
38205
|
+
class Dodecahedron extends C$1 {
|
|
38205
38206
|
create() {
|
|
38206
38207
|
const e = new DodecahedronGeometry(1, 0);
|
|
38207
38208
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38208
38209
|
}
|
|
38209
38210
|
}
|
|
38210
|
-
class Icosahedron extends
|
|
38211
|
+
class Icosahedron extends C$1 {
|
|
38211
38212
|
create() {
|
|
38212
38213
|
const e = new IcosahedronGeometry(1, 0);
|
|
38213
38214
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38214
38215
|
}
|
|
38215
38216
|
}
|
|
38216
|
-
class Lathe extends
|
|
38217
|
+
class Lathe extends C$1 {
|
|
38217
38218
|
create() {
|
|
38218
38219
|
const e = new LatheGeometry();
|
|
38219
38220
|
this.createMesh(
|
|
@@ -38222,25 +38223,25 @@ class Lathe extends D$1 {
|
|
|
38222
38223
|
), this.scale.multiplyScalar(20);
|
|
38223
38224
|
}
|
|
38224
38225
|
}
|
|
38225
|
-
class Octahedron extends
|
|
38226
|
+
class Octahedron extends C$1 {
|
|
38226
38227
|
create() {
|
|
38227
38228
|
const e = new OctahedronGeometry(1, 0);
|
|
38228
38229
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38229
38230
|
}
|
|
38230
38231
|
}
|
|
38231
|
-
class Plane extends
|
|
38232
|
+
class Plane extends C$1 {
|
|
38232
38233
|
create() {
|
|
38233
38234
|
const e = new PlaneGeometry(1, 1, 2, 2);
|
|
38234
38235
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38235
38236
|
}
|
|
38236
38237
|
}
|
|
38237
|
-
class Ring extends
|
|
38238
|
+
class Ring extends C$1 {
|
|
38238
38239
|
create() {
|
|
38239
38240
|
const e = new RingGeometry(0.5, 1, 32, 1, 0, Math.PI * 2);
|
|
38240
38241
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38241
38242
|
}
|
|
38242
38243
|
}
|
|
38243
|
-
class Sphere extends
|
|
38244
|
+
class Sphere extends C$1 {
|
|
38244
38245
|
constructor() {
|
|
38245
38246
|
super(...arguments);
|
|
38246
38247
|
H0(this, "radius", 100);
|
|
@@ -38254,7 +38255,7 @@ class Sphere extends D$1 {
|
|
|
38254
38255
|
this.createMesh(s, this.material), this.object3d.rotation.y = Math.PI / 180 * 90;
|
|
38255
38256
|
}
|
|
38256
38257
|
}
|
|
38257
|
-
class Sprite extends
|
|
38258
|
+
class Sprite extends C$1 {
|
|
38258
38259
|
create() {
|
|
38259
38260
|
this.createSprite(new SpriteMaterial()), this.scale.multiplyScalar(20);
|
|
38260
38261
|
}
|
|
@@ -38273,25 +38274,25 @@ class Sprite extends D$1 {
|
|
|
38273
38274
|
}
|
|
38274
38275
|
}
|
|
38275
38276
|
}
|
|
38276
|
-
class Tetrahedron extends
|
|
38277
|
+
class Tetrahedron extends C$1 {
|
|
38277
38278
|
create() {
|
|
38278
38279
|
const e = new TetrahedronGeometry(1, 0);
|
|
38279
38280
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38280
38281
|
}
|
|
38281
38282
|
}
|
|
38282
|
-
class Torus extends
|
|
38283
|
+
class Torus extends C$1 {
|
|
38283
38284
|
create() {
|
|
38284
38285
|
const e = new TorusGeometry(1, 0.4, 12, 48, Math.PI * 2);
|
|
38285
38286
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38286
38287
|
}
|
|
38287
38288
|
}
|
|
38288
|
-
class TorusKnot extends
|
|
38289
|
+
class TorusKnot extends C$1 {
|
|
38289
38290
|
create() {
|
|
38290
38291
|
const e = new TorusKnotGeometry(1, 0.4, 64, 8, 2, 3);
|
|
38291
38292
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38292
38293
|
}
|
|
38293
38294
|
}
|
|
38294
|
-
class Tube extends
|
|
38295
|
+
class Tube extends C$1 {
|
|
38295
38296
|
create() {
|
|
38296
38297
|
const e = new CatmullRomCurve3([
|
|
38297
38298
|
new Vector3(2, 2, -2),
|
|
@@ -50540,7 +50541,7 @@ const getCountriesJsonExclATA = () => countriesJsonExclATALite || (countriesJson
|
|
|
50540
50541
|
colorWrite: !1,
|
|
50541
50542
|
transparent: !0
|
|
50542
50543
|
});
|
|
50543
|
-
let PlaneMap$1 = class extends
|
|
50544
|
+
let PlaneMap$1 = class extends C$1 {
|
|
50544
50545
|
constructor(s) {
|
|
50545
50546
|
super();
|
|
50546
50547
|
H0(this, "options");
|
|
@@ -50969,7 +50970,7 @@ let PlaneMap$1 = class extends D$1 {
|
|
|
50969
50970
|
// };
|
|
50970
50971
|
// }
|
|
50971
50972
|
};
|
|
50972
|
-
class ContinentsBg extends
|
|
50973
|
+
class ContinentsBg extends C$1 {
|
|
50973
50974
|
constructor(s) {
|
|
50974
50975
|
super();
|
|
50975
50976
|
H0(this, "options");
|
|
@@ -51054,7 +51055,7 @@ class ContinentsBg extends D$1 {
|
|
|
51054
51055
|
}), this.mapArr.length = 0;
|
|
51055
51056
|
}
|
|
51056
51057
|
}
|
|
51057
|
-
class PlaneMap extends
|
|
51058
|
+
class PlaneMap extends C$1 {
|
|
51058
51059
|
constructor(s) {
|
|
51059
51060
|
super();
|
|
51060
51061
|
H0(this, "options");
|
|
@@ -51836,16 +51837,23 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
51836
51837
|
shadowMapDisabled() {
|
|
51837
51838
|
this.pencil.scene.userData.shadowMapEnabled && (this.pencil.scene.userData.shadowMapEnabled = !1, this.shadowMapLight && (this.shadowMapLight.erase(), this.mList.delObject3d(this.shadowMapLight.object3d), this.shadowMapLight = void 0), this.planeShadow && (this.mList.delObject3d(this.planeShadow.object3d), this.planeShadow.erase(), this.planeShadow = void 0));
|
|
51838
51839
|
}
|
|
51839
|
-
getDepth(s) {
|
|
51840
|
-
const
|
|
51841
|
-
let
|
|
51842
|
-
Array.isArray(
|
|
51843
|
-
let
|
|
51844
|
-
if (
|
|
51845
|
-
const
|
|
51846
|
-
|
|
51840
|
+
getDepth(s, r) {
|
|
51841
|
+
const f = this.getAdcodeShowLevel(s);
|
|
51842
|
+
let st = this.options.mapDepth;
|
|
51843
|
+
Array.isArray(st) || (st = new Array(3).fill(st));
|
|
51844
|
+
let ct;
|
|
51845
|
+
if (f === "country" ? ct = st[0] : f === "province" ? ct = st[1] : ct = st[2], this.options.depthReference && this.options.bboxMap[s]) {
|
|
51846
|
+
const Zt = this.options.depthReference, Wt = this.options.bboxMap[s];
|
|
51847
|
+
ct = ct * this.getReferenceScale(Zt, Wt);
|
|
51848
|
+
} else if (this.mapHistory.length && this.options.bboxMap[this.mapHistory[0].mapInfo.adcode]) {
|
|
51849
|
+
const Zt = this.options.bboxMap[this.mapHistory[0].mapInfo.adcode], Wt = bbox(r), Yt = this.getReferenceScale(Zt, Wt);
|
|
51850
|
+
ct = ct * Yt;
|
|
51847
51851
|
}
|
|
51848
|
-
return
|
|
51852
|
+
return ct;
|
|
51853
|
+
}
|
|
51854
|
+
getReferenceScale(s, r) {
|
|
51855
|
+
const f = Math.abs(r[3] - r[1]) / Math.abs(s[3] - s[1]), st = Math.abs(r[2] - r[0]) / Math.abs(s[2] - s[0]);
|
|
51856
|
+
return Math.max(f, st);
|
|
51849
51857
|
}
|
|
51850
51858
|
getAdcodeShowLevel(s) {
|
|
51851
51859
|
var r;
|
|
@@ -51986,7 +51994,7 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
51986
51994
|
}), this.eraseLabels(), this.map && (this.options.drillDownHideParent && this.parentBg.forEach((r0) => {
|
|
51987
51995
|
r0.hide();
|
|
51988
51996
|
}), this.options.showOneLevel ? this.map.hide() : this.map.deactive(), this.options.handleBackKeepCamvasState && this.saveBackCamvasState(-1));
|
|
51989
|
-
const qe = this.mapHistory.length, t0 = qe - 1, e0 = this.getDepth(s), i0 = (Jt = this.mapHistory[t0]) == null ? void 0 : Jt.depth, n0 = qe === 0 ? 0 : this.mapHistory[t0].z + (this.options.showOneLevel ? 0 : i0), s0 = qe === 0 ? 0 : n0 - e0, a0 = center(Je).geometry.coordinates, [h0, m0] = this.projection(a0), V0 = yield this.drawPlaneMap({
|
|
51997
|
+
const qe = this.mapHistory.length, t0 = qe - 1, e0 = this.getDepth(s, de || Je), i0 = (Jt = this.mapHistory[t0]) == null ? void 0 : Jt.depth, n0 = qe === 0 ? 0 : this.mapHistory[t0].z + (this.options.showOneLevel ? 0 : i0), s0 = qe === 0 ? 0 : n0 - e0, a0 = center(Je).geometry.coordinates, [h0, m0] = this.projection(a0), V0 = yield this.drawPlaneMap({
|
|
51990
51998
|
geojson: Je,
|
|
51991
51999
|
extrudeLineGeojson: de,
|
|
51992
52000
|
depth: e0,
|
|
@@ -52039,42 +52047,40 @@ const objs$4 = Ui(hi({}, objs$5), {
|
|
|
52039
52047
|
azimuthAngle: f,
|
|
52040
52048
|
enableTransition: st = !0
|
|
52041
52049
|
} = {}) {
|
|
52042
|
-
var Je, de
|
|
52050
|
+
var Qe, Je, de;
|
|
52043
52051
|
if (!(s != null && s.object3d)) return;
|
|
52044
|
-
const Zt = (
|
|
52052
|
+
const Zt = (Je = this.options.lookAtMap) == null ? void 0 : Je[(Qe = this.mapInfo) == null ? void 0 : Qe.adcode];
|
|
52045
52053
|
if (Zt) {
|
|
52046
|
-
const [_e, $e, qe, t0, e0
|
|
52047
|
-
yield (
|
|
52054
|
+
const [Ke, _e, $e, qe, t0, e0] = Zt;
|
|
52055
|
+
yield (de = this.pencil.controls) == null ? void 0 : de.setLookAt(
|
|
52056
|
+
Ke,
|
|
52048
52057
|
_e,
|
|
52049
52058
|
$e,
|
|
52050
52059
|
qe,
|
|
52051
52060
|
t0,
|
|
52052
52061
|
e0,
|
|
52053
|
-
i0,
|
|
52054
52062
|
st
|
|
52055
52063
|
);
|
|
52056
52064
|
return;
|
|
52057
52065
|
}
|
|
52058
52066
|
const Wt = this.options.mapPadding, { height: Yt, width: vt } = this.pencil.getSize();
|
|
52059
52067
|
Yt < Wt[0] + Wt[2] + 100 && (Wt[0] = 0, Wt[2] = 0), vt < Wt[1] + Wt[3] + 100 && (Wt[1] = 0, Wt[3] = 0);
|
|
52060
|
-
const Tt = r || this.options.polarAngle, Jt = f || this.options.azimuthAngle, $t = this.pencil.controls.azimuthAngle, Xe = this.pencil.controls.polarAngle
|
|
52061
|
-
yield Promise.all(
|
|
52062
|
-
|
|
52063
|
-
|
|
52064
|
-
|
|
52065
|
-
|
|
52066
|
-
|
|
52067
|
-
|
|
52068
|
-
|
|
52069
|
-
|
|
52070
|
-
|
|
52071
|
-
|
|
52072
|
-
|
|
52073
|
-
|
|
52074
|
-
|
|
52075
|
-
|
|
52076
|
-
].filter(Boolean)
|
|
52077
|
-
);
|
|
52068
|
+
const Tt = r || this.options.polarAngle, Jt = f || this.options.azimuthAngle, $t = this.pencil.controls.azimuthAngle, Xe = this.pencil.controls.polarAngle;
|
|
52069
|
+
yield Promise.all([
|
|
52070
|
+
this.paddingInCssPixel(
|
|
52071
|
+
s,
|
|
52072
|
+
Wt[0],
|
|
52073
|
+
Wt[1],
|
|
52074
|
+
Wt[2],
|
|
52075
|
+
Wt[3],
|
|
52076
|
+
st
|
|
52077
|
+
),
|
|
52078
|
+
this.pencil.controls.rotateTo(
|
|
52079
|
+
$t + this.absoluteAngle(Jt, $t),
|
|
52080
|
+
Xe + this.absoluteAngle(Tt, Xe),
|
|
52081
|
+
st
|
|
52082
|
+
)
|
|
52083
|
+
]);
|
|
52078
52084
|
});
|
|
52079
52085
|
}
|
|
52080
52086
|
paddingInCssPixel(s, r, f, st, ct, Zt) {
|
|
@@ -52731,7 +52737,7 @@ Water.WaterShader = {
|
|
|
52731
52737
|
}`
|
|
52732
52738
|
)
|
|
52733
52739
|
};
|
|
52734
|
-
class CityPlane extends
|
|
52740
|
+
class CityPlane extends C$1 {
|
|
52735
52741
|
constructor(s) {
|
|
52736
52742
|
super();
|
|
52737
52743
|
H0(this, "options");
|
|
@@ -52803,7 +52809,7 @@ const getBoxMultiPoly = (c) => {
|
|
|
52803
52809
|
const e = c.features.map((s) => s.geometry.type === "Polygon" ? [s.geometry.coordinates] : s.geometry.coordinates).flat();
|
|
52804
52810
|
return Array.from({ length: e.length }, (s, r) => polygon(e[r]));
|
|
52805
52811
|
};
|
|
52806
|
-
class Building extends
|
|
52812
|
+
class Building extends C$1 {
|
|
52807
52813
|
constructor(s) {
|
|
52808
52814
|
super();
|
|
52809
52815
|
H0(this, "options");
|
|
@@ -52948,7 +52954,7 @@ class Building extends D$1 {
|
|
|
52948
52954
|
super.dispose(), this.outJson.clear();
|
|
52949
52955
|
}
|
|
52950
52956
|
}
|
|
52951
|
-
class Area extends
|
|
52957
|
+
class Area extends C$1 {
|
|
52952
52958
|
constructor(s) {
|
|
52953
52959
|
super();
|
|
52954
52960
|
H0(this, "options");
|
|
@@ -53036,7 +53042,7 @@ class Area extends D$1 {
|
|
|
53036
53042
|
super.dispose(), this.outJson.clear();
|
|
53037
53043
|
}
|
|
53038
53044
|
}
|
|
53039
|
-
class Road extends
|
|
53045
|
+
class Road extends C$1 {
|
|
53040
53046
|
constructor(s) {
|
|
53041
53047
|
super();
|
|
53042
53048
|
H0(this, "options");
|
|
@@ -53148,7 +53154,7 @@ function getCanvasTexture(c) {
|
|
|
53148
53154
|
const f = new CanvasTexture(e);
|
|
53149
53155
|
return f.colorSpace = SRGBColorSpace, f.wrapT = RepeatWrapping, f.magFilter = NearestFilter, f.minFilter = NearestFilter, e.remove(), f;
|
|
53150
53156
|
}
|
|
53151
|
-
class Target extends
|
|
53157
|
+
class Target extends C$1 {
|
|
53152
53158
|
constructor(s) {
|
|
53153
53159
|
super();
|
|
53154
53160
|
H0(this, "options");
|
|
@@ -54699,7 +54705,7 @@ class Earth$1 extends Sphere {
|
|
|
54699
54705
|
this.material = r, super.create(), this.rotation.y = Math.PI / 180 * -90, this.object3d.name = "地球", s.setObject3d(this.object3d, "earth");
|
|
54700
54706
|
}
|
|
54701
54707
|
}
|
|
54702
|
-
class Countries extends
|
|
54708
|
+
class Countries extends C$1 {
|
|
54703
54709
|
constructor(s) {
|
|
54704
54710
|
super();
|
|
54705
54711
|
H0(this, "options");
|
|
@@ -54820,7 +54826,7 @@ class Countries extends D$1 {
|
|
|
54820
54826
|
return ct.emissive.set(r), ct.emissiveIntensity = f, s.useMaterial(st), ct;
|
|
54821
54827
|
}
|
|
54822
54828
|
}
|
|
54823
|
-
class SphereShadow extends
|
|
54829
|
+
class SphereShadow extends C$1 {
|
|
54824
54830
|
constructor(s) {
|
|
54825
54831
|
super();
|
|
54826
54832
|
H0(this, "options");
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.21.
|
|
1
|
+
declare const _default: "0.21.60";
|
|
2
2
|
export default _default;
|
package/dist/vis/map/index.d.ts
CHANGED
|
@@ -148,7 +148,8 @@ export default class extends Base {
|
|
|
148
148
|
planeShadow?: BaseObject;
|
|
149
149
|
shadowMapEnabled(): Promise<void>;
|
|
150
150
|
shadowMapDisabled(): void;
|
|
151
|
-
getDepth(adcode: number): number;
|
|
151
|
+
getDepth(adcode: number, geojson: GeoJSON): number;
|
|
152
|
+
getReferenceScale(bboxa: number[], bboxb: number[]): number;
|
|
152
153
|
getAdcodeShowLevel(adcode: number): string;
|
|
153
154
|
handleClick(e: MouseEvent): void;
|
|
154
155
|
beforeClickArea(adcodes: number[]): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vis-core",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.60",
|
|
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",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"esus-lite": "^0.2.8",
|
|
68
68
|
"events": "^3.3.0",
|
|
69
69
|
"geojson-cn": "^0.1.29",
|
|
70
|
-
"gl-draw": "0.11.
|
|
70
|
+
"gl-draw": "0.11.41",
|
|
71
71
|
"jsrsasign": "^11.1.0",
|
|
72
72
|
"lodash-es": "^4.17.21"
|
|
73
73
|
},
|