vis-core 0.22.11 → 0.22.13
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/editor/history.d.ts +1 -1
- package/dist/editor/index.d.ts +7 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/index.module.js +92 -68
- package/dist/version.d.ts +1 -1
- package/dist/vis/base/index.d.ts +1 -1
- package/dist/vis/map/index.d.ts +3 -0
- package/dist/vis/map/objects/PlaneMap.d.ts +1 -1
- package/dist/vis/map2/index.d.ts +1 -0
- package/dist/vis/map2/map.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -90,7 +90,7 @@ const publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRz
|
|
|
90
90
|
).toString(CryptoJS.enc.Utf8), qe = JSON.parse($e), st = Date.now();
|
|
91
91
|
return !qe.s || qe.s > st ? (this.token = void 0, "") : qe.e && qe.e < st ? (this.token = void 0, "") : (qe.isValid = Qe, qe);
|
|
92
92
|
}
|
|
93
|
-
}, version = "0.22.
|
|
93
|
+
}, version = "0.22.13";
|
|
94
94
|
/**
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright 2010-2024 Three.js Authors
|
|
@@ -49327,27 +49327,27 @@ class History {
|
|
|
49327
49327
|
}
|
|
49328
49328
|
return e;
|
|
49329
49329
|
}
|
|
49330
|
-
fromJSON(e
|
|
49331
|
-
var
|
|
49330
|
+
fromJSON(e) {
|
|
49331
|
+
var T;
|
|
49332
49332
|
if (e === void 0) return;
|
|
49333
|
-
let
|
|
49334
|
-
const
|
|
49335
|
-
for (let
|
|
49336
|
-
const
|
|
49337
|
-
if (
|
|
49338
|
-
if (
|
|
49339
|
-
const
|
|
49340
|
-
|
|
49333
|
+
let s = -1;
|
|
49334
|
+
const r = e.i;
|
|
49335
|
+
for (let de = 0; de < e.u.length; de++) {
|
|
49336
|
+
const Xe = e.u[de];
|
|
49337
|
+
if (r != null && r.length && ((T = Xe.newMap) != null && T.images) && Xe.newMap.images.forEach((Je) => {
|
|
49338
|
+
if (Je.url.startsWith("$rp-")) {
|
|
49339
|
+
const Qe = parseInt(Je.url.replace("$rp-", ""));
|
|
49340
|
+
Je.url = r[Qe];
|
|
49341
49341
|
}
|
|
49342
|
-
}),
|
|
49342
|
+
}), Xe.id <= s) {
|
|
49343
49343
|
console.error("历史记录id错误");
|
|
49344
49344
|
continue;
|
|
49345
49345
|
}
|
|
49346
|
-
if (
|
|
49346
|
+
if (Xe.type === "SetOption" || !Xe.type)
|
|
49347
49347
|
continue;
|
|
49348
|
-
|
|
49349
|
-
const
|
|
49350
|
-
|
|
49348
|
+
Xe.type.endsWith("Command") && (Xe.type = Xe.type.replace("Command", ""));
|
|
49349
|
+
const Ke = new Commands[Xe.type](this.editor);
|
|
49350
|
+
Ke.json = Xe, Ke.id = Xe.id, Ke.name = Xe.name, this.undos.push(Ke), this.idCounter = Xe.id > this.idCounter ? Xe.id : this.idCounter, s = Xe.id;
|
|
49351
49351
|
}
|
|
49352
49352
|
this.editor.emit("historyChanged", this.undos[this.undos.length - 1]);
|
|
49353
49353
|
}
|
|
@@ -49356,14 +49356,15 @@ class History {
|
|
|
49356
49356
|
const T = [...this.undos], de = T.length;
|
|
49357
49357
|
let Xe = 0;
|
|
49358
49358
|
const Ke = () => ei(this, null, function* () {
|
|
49359
|
+
var Qe, _e, $e;
|
|
49359
49360
|
const Je = performance.now();
|
|
49360
49361
|
for (; T.length > 0 && performance.now() - Je < e; ) {
|
|
49361
49362
|
if (this.editor._dispose) {
|
|
49362
49363
|
r("dispose");
|
|
49363
49364
|
return;
|
|
49364
49365
|
}
|
|
49365
|
-
const
|
|
49366
|
-
yield this.executeUndo(
|
|
49366
|
+
const qe = T.shift(), st = (Qe = this.editor.hooks) != null && Qe.beforeExecuteUndo ? yield this.editor.hooks.beforeExecuteUndo(qe) : qe;
|
|
49367
|
+
st && (yield this.executeUndo(st)), yield ($e = (_e = this.editor.hooks) == null ? void 0 : _e.afterExecuteUndo) == null ? void 0 : $e.call(_e, qe), Xe += 1;
|
|
49367
49368
|
}
|
|
49368
49369
|
this.editor.emit("progress", {
|
|
49369
49370
|
type: "还原场景",
|
|
@@ -49421,25 +49422,26 @@ class Viewport {
|
|
|
49421
49422
|
}
|
|
49422
49423
|
setVis(r) {
|
|
49423
49424
|
return ei(this, arguments, function* (e, s = {}) {
|
|
49424
|
-
var
|
|
49425
|
+
var Xe, Ke;
|
|
49425
49426
|
if (!this.options.visFactories && (this.editor.setViewportVis(e), !this.options.visFactories)) {
|
|
49426
49427
|
console.error("visFactories is not defined");
|
|
49427
49428
|
return;
|
|
49428
49429
|
}
|
|
49429
49430
|
if (this.vis = this.options.visFactories, this.vis.visName !== e)
|
|
49430
49431
|
throw new Error(`visName is not match, import {${e}}`);
|
|
49431
|
-
|
|
49432
|
+
const T = (Xe = this.editor.hooks) != null && Xe.beforeSetVisOptions ? this.editor.hooks.beforeSetVisOptions(s) : s;
|
|
49433
|
+
this.vis.setOptions(ai(ai({}, T), this.extendsOptions)), this.delLoadObj && (this.vis.delLoadArr = this.delLoadObj), this.vis.playing = this.editor.playing, this.vis.on("loaderProgress", (Je, Qe) => {
|
|
49432
49434
|
this.editor.emit("progress", {
|
|
49433
49435
|
type: "下载资源",
|
|
49434
|
-
value:
|
|
49436
|
+
value: Je / Qe * 100 | 0
|
|
49435
49437
|
});
|
|
49436
49438
|
}), this.vis.on("settingsChanged", () => {
|
|
49437
49439
|
this.editor.emit("settingsChanged");
|
|
49438
49440
|
}), this.vis.on("show", () => {
|
|
49439
49441
|
this.editor.emit("visShow");
|
|
49440
49442
|
}), yield this.vis.init();
|
|
49441
|
-
const { pencil:
|
|
49442
|
-
|
|
49443
|
+
const { pencil: de } = this.vis;
|
|
49444
|
+
de.userData.EditorEnv = !this.editor.playing, this.editor.pencil = de, this.editor.changeSelectOption(), this.editor.playing || (this.initEvent(), this.editor.emit("visChanged", this.vis)), (Ke = this.vis) == null || Ke.pencil.event.on("object3dListChange", () => {
|
|
49443
49445
|
this.editor.changeSelectOption();
|
|
49444
49446
|
});
|
|
49445
49447
|
});
|
|
@@ -49649,6 +49651,7 @@ class Editor {
|
|
|
49649
49651
|
H0(this, "name");
|
|
49650
49652
|
H0(this, "open", !1);
|
|
49651
49653
|
H0(this, "options");
|
|
49654
|
+
H0(this, "hooks");
|
|
49652
49655
|
H0(this, "selectOption", []);
|
|
49653
49656
|
H0(this, "selectOption2", []);
|
|
49654
49657
|
H0(this, "checkSelectOption", throttle(
|
|
@@ -49790,7 +49793,9 @@ class Editor {
|
|
|
49790
49793
|
return ei(this, null, function* () {
|
|
49791
49794
|
var r, T, de, Xe;
|
|
49792
49795
|
try {
|
|
49793
|
-
|
|
49796
|
+
s && !n$1(s) && console.warn(
|
|
49797
|
+
"fromJSON 第二个参数已修改,{beforeSetVisOptions:(r)=>r} 替代"
|
|
49798
|
+
), this.hooks = s, window.postMessage({ type: "vis-core.fromJSON.start" }), console.time("vis-core:time.fromJSON");
|
|
49794
49799
|
let Ke;
|
|
49795
49800
|
if (typeof e == "string") {
|
|
49796
49801
|
const Je = this.options.assetsPrefix + e, { res: Qe } = yield jsonFetch(Je);
|
|
@@ -49808,7 +49813,7 @@ class Editor {
|
|
|
49808
49813
|
"vis-core 版本过低,可能会出现问题",
|
|
49809
49814
|
"json:" + Ke.c.version,
|
|
49810
49815
|
"sdk:" + this.sdkVersion
|
|
49811
|
-
), this.setConfig(Ke.c), this.history.fromJSON(Ke.h
|
|
49816
|
+
), this.setConfig(Ke.c), this.history.fromJSON(Ke.h), this.viewport.fromJSON(Ke.v), yield this.history.processUndos(this.options.processUndosMaxFrameTime), (r = Ke.v.bg) != null && r.texture && this.viewport.vis) {
|
|
49812
49817
|
const Je = parseTexture(Ke.v.bg.texture);
|
|
49813
49818
|
Je.colorSpace = SRGBColorSpace, this.viewport.vis.pencil.scene.background = Je;
|
|
49814
49819
|
}
|
|
@@ -49830,8 +49835,6 @@ class Editor {
|
|
|
49830
49835
|
}
|
|
49831
49836
|
setViewportVis(...e) {
|
|
49832
49837
|
}
|
|
49833
|
-
injectionModification(...e) {
|
|
49834
|
-
}
|
|
49835
49838
|
setConfig(e) {
|
|
49836
49839
|
const s = {
|
|
49837
49840
|
name: this.name,
|
|
@@ -129379,9 +129382,11 @@ let PlaneMap$1 = class extends A$1 {
|
|
|
129379
129382
|
!Xe || !Xe.uniforms.lineLightAnimation.value || (Xe.uniforms.time.value = r);
|
|
129380
129383
|
});
|
|
129381
129384
|
}
|
|
129382
|
-
findGroup(s) {
|
|
129385
|
+
findGroup(s, r = !1) {
|
|
129383
129386
|
return this.pencil.getPlugin("draw").getObject("Group", {
|
|
129384
|
-
key: `area-group-${
|
|
129387
|
+
key: `area-group-${r ? this.getPropertiesKey({
|
|
129388
|
+
adcode: s
|
|
129389
|
+
}) : s}`
|
|
129385
129390
|
});
|
|
129386
129391
|
}
|
|
129387
129392
|
setAreaMaterial(s, r) {
|
|
@@ -129768,16 +129773,19 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129768
129773
|
name: "顶面",
|
|
129769
129774
|
map: e.getAsset("/image/map/hp.webp"),
|
|
129770
129775
|
normalMap: e.getAsset("/image/map/shuchu2.webp")
|
|
129771
|
-
}), T = new MeshBasicMaterial({
|
|
129776
|
+
}), T = this.options.drillDownTopMatTwo ? new MeshBasicMaterial({
|
|
129777
|
+
name: "二级顶面",
|
|
129778
|
+
color: new Color$1("#0d2425")
|
|
129779
|
+
}) : null, de = new MeshBasicMaterial({
|
|
129772
129780
|
name: "侧面",
|
|
129773
129781
|
map: e.getAsset("/image/map/jianbian.webp")
|
|
129774
|
-
}),
|
|
129782
|
+
}), Xe = new it$1({
|
|
129775
129783
|
color: new Color$1("#73FEDD"),
|
|
129776
129784
|
sizeAttenuation: 0,
|
|
129777
129785
|
lineWidth: this.options.lineWidth,
|
|
129778
129786
|
//@ts-ignore
|
|
129779
129787
|
depthWrite: !1
|
|
129780
|
-
}),
|
|
129788
|
+
}), Ke = new it$1({
|
|
129781
129789
|
name: "板块边线",
|
|
129782
129790
|
color: new Color$1("#00FFED"),
|
|
129783
129791
|
sizeAttenuation: 0,
|
|
@@ -129787,9 +129795,10 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129787
129795
|
});
|
|
129788
129796
|
return {
|
|
129789
129797
|
topMat: r,
|
|
129790
|
-
|
|
129791
|
-
|
|
129792
|
-
|
|
129798
|
+
topMatTwo: T,
|
|
129799
|
+
sideMat: de,
|
|
129800
|
+
lineMat: Xe,
|
|
129801
|
+
extrudeLineMat: Ke
|
|
129793
129802
|
};
|
|
129794
129803
|
})();
|
|
129795
129804
|
this.mList.setMaterialObj("plane", s), this.mList.setShowMaterialList("area", ["plane#topMat", "plane#sideMat"], {
|
|
@@ -129810,16 +129819,19 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129810
129819
|
const r = new MeshBasicMaterial({
|
|
129811
129820
|
name: "顶面",
|
|
129812
129821
|
color: new Color$1("#0d2425")
|
|
129813
|
-
}), T = new MeshBasicMaterial({
|
|
129822
|
+
}), T = this.options.drillDownTopMatTwo ? new MeshBasicMaterial({
|
|
129823
|
+
name: "二级顶面",
|
|
129824
|
+
color: new Color$1("#0d2425")
|
|
129825
|
+
}) : null, de = new MeshBasicMaterial({
|
|
129814
129826
|
name: "侧面",
|
|
129815
129827
|
map: e.getAsset("/image/map/jianbian.webp")
|
|
129816
|
-
}),
|
|
129828
|
+
}), Xe = new it$1({
|
|
129817
129829
|
color: new Color$1("#73FEDD"),
|
|
129818
129830
|
sizeAttenuation: 0,
|
|
129819
129831
|
lineWidth: this.options.lineWidth,
|
|
129820
129832
|
//@ts-ignore
|
|
129821
129833
|
depthWrite: !1
|
|
129822
|
-
}),
|
|
129834
|
+
}), Ke = new it$1({
|
|
129823
129835
|
color: new Color$1("#00FFED"),
|
|
129824
129836
|
sizeAttenuation: 0,
|
|
129825
129837
|
lineWidth: this.options.extrudeLineWidth,
|
|
@@ -129827,10 +129839,11 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129827
129839
|
depthWrite: !1
|
|
129828
129840
|
});
|
|
129829
129841
|
return {
|
|
129842
|
+
topMatTwo: T,
|
|
129830
129843
|
topMat: r,
|
|
129831
|
-
sideMat:
|
|
129832
|
-
lineMat:
|
|
129833
|
-
extrudeLineMat:
|
|
129844
|
+
sideMat: de,
|
|
129845
|
+
lineMat: Xe,
|
|
129846
|
+
extrudeLineMat: Ke
|
|
129834
129847
|
};
|
|
129835
129848
|
})();
|
|
129836
129849
|
this.mList.setMaterialObj("plane", s), this.mList.setShowMaterialList("area", ["plane#topMat", "plane#sideMat"], {
|
|
@@ -129876,7 +129889,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129876
129889
|
H0(this, "pscale", 5e4 / 1e3);
|
|
129877
129890
|
H0(this, "meters");
|
|
129878
129891
|
H0(this, "extendsOptions", {
|
|
129879
|
-
mapDepth: () => this.
|
|
129892
|
+
mapDepth: () => this.getOptionsDepth(this.options.adcode),
|
|
129880
129893
|
equirectangular: () => this.options.projectionType === "equirectangular",
|
|
129881
129894
|
// fahey: () => {
|
|
129882
129895
|
// return this.options.projectionType === 'fahey';
|
|
@@ -129945,6 +129958,8 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129945
129958
|
continentsBgDepth: 0,
|
|
129946
129959
|
parentBgDepth: 0,
|
|
129947
129960
|
parentBgTopSegments: 0,
|
|
129961
|
+
clickHandleDrillDown: !1,
|
|
129962
|
+
drillDownTopMatTwo: !1,
|
|
129948
129963
|
clickOusideBack: !0,
|
|
129949
129964
|
mapDepth: [1, 0.4, 0.2],
|
|
129950
129965
|
mapPadding: [100, 100, 100, 100],
|
|
@@ -129973,7 +129988,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129973
129988
|
geojsonMap: r,
|
|
129974
129989
|
extrudeLineGeojsonMap: T,
|
|
129975
129990
|
bboxMap: de
|
|
129976
|
-
})), this.options.equirectangular && (this.options.projectionType = "equirectangular"), this.options.fahey && (this.options.projectionType = "fahey", this.pscale = 100, this.pcenter = [0, 0]), this.pencilConfig = PENCIL_CONFIG$4, (this.getAdcodeShowLevel(this.options.adcode) === "province" || this.getAdcodeShowLevel(this.options.adcode) === "country") && (this.extendsOptions.parentBg = () => this.options.parentBg, this.extendsOptions.parentBgDepth = () => this.options.parentBgDepth, this.extendsOptions.parentBgTopSegments = () => this.options.parentBgTopSegments, this.extendsOptions.continentsBg = () => this.options.continentsBg, this.extendsOptions.continentsBgDepth = () => this.options.continentsBgDepth), this.options.adcode === 0 ? world(this) : this.options.style === "map2" || (this.options.adcode === 1e5 ? china(this) : base$1(this));
|
|
129991
|
+
})), this.options.equirectangular && (this.options.projectionType = "equirectangular"), this.options.fahey && (this.options.projectionType = "fahey", this.pscale = 100, this.pcenter = [0, 0]), this.pencilConfig = PENCIL_CONFIG$4, (this.getAdcodeShowLevel(this.options.adcode) === "province" || this.getAdcodeShowLevel(this.options.adcode) === "country") && (this.options.clickHandleDrillDown && (this.extendsOptions.mapDepth = () => Array.isArray(this.options.mapDepth) ? this.options.mapDepth : new Array(3).fill(this.options.mapDepth)), this.extendsOptions.clickHandleDrillDown = () => this.options.clickHandleDrillDown, this.extendsOptions.drillDownTopMatTwo = () => this.options.drillDownTopMatTwo, this.extendsOptions.drillDownPlateInCenter = () => this.options.drillDownPlateInCenter, this.extendsOptions.parentBg = () => this.options.parentBg, this.extendsOptions.parentBgDepth = () => this.options.parentBgDepth, this.extendsOptions.parentBgTopSegments = () => this.options.parentBgTopSegments, this.extendsOptions.continentsBg = () => this.options.continentsBg, this.extendsOptions.continentsBgDepth = () => this.options.continentsBgDepth), this.options.adcode === 0 ? world(this) : this.options.style === "map2" || (this.options.adcode === 1e5 ? china(this) : base$1(this));
|
|
129977
129992
|
}
|
|
129978
129993
|
handleSetting(s, r) {
|
|
129979
129994
|
return ei(this, null, function* () {
|
|
@@ -130019,7 +130034,9 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130019
130034
|
scale: this.pscale,
|
|
130020
130035
|
projectionType: this.options.projectionType,
|
|
130021
130036
|
rotate: this.options.worldPacificCentre ? [-160, 0] : void 0
|
|
130022
|
-
}), this.meters = this.projection([1 * 1141e-8 + this.pcenter[0], 0])[0], yield this.initPencil(), console.time(`vis-core:time.${this.visName}-loader`), this.loaderAdd(), console.timeEnd(`vis-core:time.${this.visName}-loader`), yield this.loader.loadAll(), this.group = yield this.drawController.draw("Group"), yield this.initMaterial(), yield this.initVis(s),
|
|
130037
|
+
}), this.meters = this.projection([1 * 1141e-8 + this.pcenter[0], 0])[0], yield this.initPencil(), console.time(`vis-core:time.${this.visName}-loader`), this.loaderAdd(), console.timeEnd(`vis-core:time.${this.visName}-loader`), yield this.loader.loadAll(), this.group = yield this.drawController.draw("Group"), yield this.initMaterial(), yield this.initVis(s), this.options.clickHandleDrillDown && this.addListener(this.container, "click", (r) => {
|
|
130038
|
+
this.handleClick(r);
|
|
130039
|
+
}), yield Promise.all(this.drawController.objectsPromise);
|
|
130023
130040
|
});
|
|
130024
130041
|
}
|
|
130025
130042
|
initVis(s) {
|
|
@@ -130358,19 +130375,23 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130358
130375
|
shadowMapDisabled() {
|
|
130359
130376
|
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));
|
|
130360
130377
|
}
|
|
130378
|
+
getOptionsDepth(s) {
|
|
130379
|
+
const r = this.getAdcodeShowLevel(s);
|
|
130380
|
+
let T = this.options.mapDepth;
|
|
130381
|
+
Array.isArray(T) || (T = new Array(3).fill(T));
|
|
130382
|
+
let de;
|
|
130383
|
+
return r === "country" ? de = T[0] : r === "province" ? de = T[1] : de = T[2], de;
|
|
130384
|
+
}
|
|
130361
130385
|
getDepth(s, r) {
|
|
130362
|
-
|
|
130363
|
-
|
|
130364
|
-
|
|
130365
|
-
|
|
130366
|
-
if (T === "country" ? Xe = de[0] : T === "province" ? Xe = de[1] : Xe = de[2], this.options.depthReference && this.options.bboxMap[s]) {
|
|
130367
|
-
const Ke = this.options.depthReference, Je = this.options.bboxMap[s];
|
|
130368
|
-
Xe = Xe * this.getReferenceScale(Ke, Je);
|
|
130386
|
+
let T = this.getOptionsDepth(s);
|
|
130387
|
+
if (this.options.depthReference && this.options.bboxMap[s]) {
|
|
130388
|
+
const de = this.options.depthReference, Xe = this.options.bboxMap[s];
|
|
130389
|
+
T = T * this.getReferenceScale(de, Xe);
|
|
130369
130390
|
} else if (this.mapHistory.length && this.options.bboxMap[this.mapHistory[0].mapInfo.adcode]) {
|
|
130370
|
-
const
|
|
130371
|
-
|
|
130391
|
+
const de = this.options.bboxMap[this.mapHistory[0].mapInfo.adcode], Xe = bbox(r), Ke = this.getReferenceScale(de, Xe);
|
|
130392
|
+
T = T * Ke;
|
|
130372
130393
|
}
|
|
130373
|
-
return
|
|
130394
|
+
return T;
|
|
130374
130395
|
}
|
|
130375
130396
|
getReferenceScale(s, r) {
|
|
130376
130397
|
const T = Math.abs(r[3] - r[1]) / Math.abs(s[3] - s[1]), de = Math.abs(r[2] - r[0]) / Math.abs(s[2] - s[0]);
|
|
@@ -130488,7 +130509,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130488
130509
|
}) {
|
|
130489
130510
|
var Xe, Ke, Je, Qe, _e, $e, qe, st;
|
|
130490
130511
|
if (typeof s != "undefined" && !this.isAnimating) {
|
|
130491
|
-
const dt = (Xe = this.map) == null ? void 0 : Xe.findGroup(s), Wt = findLevelJsonItem2(+s);
|
|
130512
|
+
const dt = (Xe = this.map) == null ? void 0 : Xe.findGroup(s, !0), Wt = findLevelJsonItem2(+s);
|
|
130492
130513
|
if (this.isAnimating || !Wt) return;
|
|
130493
130514
|
this.isAnimating = !0;
|
|
130494
130515
|
const { name: Yt } = Wt;
|
|
@@ -130638,7 +130659,9 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130638
130659
|
depth: de,
|
|
130639
130660
|
adcode: Xe
|
|
130640
130661
|
}) {
|
|
130641
|
-
const Je = this.mList.getMaterialObj("plane"),
|
|
130662
|
+
const Je = this.mapHistory.length === 0, Qe = this.mList.getMaterialObj("plane"), _e = ai({}, Qe);
|
|
130663
|
+
!Je && _e.topMatTwo && (_e.topMat = _e.topMatTwo);
|
|
130664
|
+
const $e = yield this.drawController.draw(
|
|
130642
130665
|
"PlaneMap",
|
|
130643
130666
|
{
|
|
130644
130667
|
geojson: s,
|
|
@@ -130650,7 +130673,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130650
130673
|
rotate: this.options.worldPacificCentre ? [-160, 0] : void 0,
|
|
130651
130674
|
projectionType: this.options.projectionType
|
|
130652
130675
|
},
|
|
130653
|
-
materialOptions:
|
|
130676
|
+
materialOptions: _e,
|
|
130654
130677
|
bbox: T,
|
|
130655
130678
|
topSegments: this.options.topSegments,
|
|
130656
130679
|
lineOffset: this.options.lineOffset,
|
|
@@ -130658,19 +130681,19 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130658
130681
|
},
|
|
130659
130682
|
this.group
|
|
130660
130683
|
);
|
|
130661
|
-
return
|
|
130662
|
-
|
|
130663
|
-
baseObject:
|
|
130684
|
+
return $e.extrudelineArr && $e.extrudelineArr.forEach((qe) => {
|
|
130685
|
+
qe.object3d.name = "板块边线", this.mList.setObject3d(qe.object3d, "extrudeLine", {
|
|
130686
|
+
baseObject: qe,
|
|
130664
130687
|
replace: !0
|
|
130665
|
-
}), this.initBaseObjectUserData(
|
|
130688
|
+
}), this.initBaseObjectUserData(qe);
|
|
130666
130689
|
}), this.mList.setObject3d(
|
|
130667
|
-
|
|
130690
|
+
$e.object3d,
|
|
130668
130691
|
Xe === 1e5 ? "chinaGroup" : "planeMapGroup",
|
|
130669
130692
|
{
|
|
130670
|
-
baseObject:
|
|
130693
|
+
baseObject: $e,
|
|
130671
130694
|
replace: !0
|
|
130672
130695
|
}
|
|
130673
|
-
),
|
|
130696
|
+
), $e;
|
|
130674
130697
|
});
|
|
130675
130698
|
}
|
|
130676
130699
|
handleBack() {
|
|
@@ -130697,7 +130720,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130697
130720
|
this.drawController.eraseWithoutMaterial(de.map), this.eraseLabels();
|
|
130698
130721
|
}
|
|
130699
130722
|
if (this.mapObj) {
|
|
130700
|
-
const { map: Xe } = this.mapObj, Ke = Xe == null ? void 0 : Xe.findGroup(de == null ? void 0 : de.mapInfo.adcode);
|
|
130723
|
+
const { map: Xe } = this.mapObj, Ke = Xe == null ? void 0 : Xe.findGroup(de == null ? void 0 : de.mapInfo.adcode, !0);
|
|
130701
130724
|
Ke && Ke.show(), Xe && r && (this.options.showOneLevel ? Xe.show() : Xe.active(), this.options.drillDownHideParent && this.parentBg.forEach((Je) => {
|
|
130702
130725
|
Je.show();
|
|
130703
130726
|
}), yield this.handleLookBack(s), this.drawLabels());
|
|
@@ -133078,9 +133101,7 @@ const R1 = class R1 extends Map$1 {
|
|
|
133078
133101
|
clip: !!this.options.cityOnMap,
|
|
133079
133102
|
grey: !1
|
|
133080
133103
|
});
|
|
133081
|
-
})), this.options.
|
|
133082
|
-
this.showGroup === "map" && this.handleClick(r);
|
|
133083
|
-
}), this.options.cityOnMap)
|
|
133104
|
+
})), this.options.cityOnMap)
|
|
133084
133105
|
if (this.options.allCity) {
|
|
133085
133106
|
const r = adcodeMap[this.mapInfo.adcode], T = r.level === "province" ? r.adcode : adcodeMap[this.mapInfo.adcode].parent, de = (s = allArr.find((Xe) => Xe.adcode === T)) == null ? void 0 : s.subAreas;
|
|
133086
133107
|
de && (yield Promise.all(
|
|
@@ -133092,6 +133113,9 @@ const R1 = class R1 extends Map$1 {
|
|
|
133092
133113
|
yield this.initCityOnMap(this.mapInfo.adcode);
|
|
133093
133114
|
});
|
|
133094
133115
|
}
|
|
133116
|
+
handleClick(s) {
|
|
133117
|
+
this.showGroup === "map" && super.handleClick(s);
|
|
133118
|
+
}
|
|
133095
133119
|
preInitCityVis() {
|
|
133096
133120
|
return ei(this, null, function* () {
|
|
133097
133121
|
const s = Object.keys(this.options.jsonNameObj);
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.22.
|
|
1
|
+
declare const _default: "0.22.13";
|
|
2
2
|
export default _default;
|
package/dist/vis/base/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export default class Base extends Event {
|
|
|
73
73
|
tier0: boolean;
|
|
74
74
|
constructor(options: BaseOptions);
|
|
75
75
|
setOptions(options: Record<string, any>): void;
|
|
76
|
-
get fromJSON(): (jsonOrUrl: Record<string, any> | string,
|
|
76
|
+
get fromJSON(): (jsonOrUrl: Record<string, any> | string, hooks?: import("../../editor").Hooks) => Promise<Record<string, any>>;
|
|
77
77
|
get baseObjectByUuid(): {
|
|
78
78
|
(uuid: `arc${string}`, flag?: boolean): import("../all/objects/Arc").default;
|
|
79
79
|
(uuid: `sprite${string}`, flag?: boolean): import("../all/objects/Sprite").default;
|
package/dist/vis/map/index.d.ts
CHANGED
|
@@ -28,9 +28,11 @@ export interface MapOptions extends BaseOptions {
|
|
|
28
28
|
lookAtMap?: Record<string, [number, number, number, number, number, number]>;
|
|
29
29
|
fixGeojson?: Record<string, string>;
|
|
30
30
|
plateInCenter?: boolean;
|
|
31
|
+
clickHandleDrillDown?: boolean;
|
|
31
32
|
drillDownPlateInCenter?: boolean;
|
|
32
33
|
drillDownHideParent?: boolean;
|
|
33
34
|
drillDownRestrictions?: 'city' | 'district';
|
|
35
|
+
drillDownTopMatTwo?: boolean;
|
|
34
36
|
showDistrict?: boolean;
|
|
35
37
|
showLabel?: boolean | 'lite';
|
|
36
38
|
lineWidth?: number;
|
|
@@ -146,6 +148,7 @@ export default class extends Base {
|
|
|
146
148
|
planeShadow?: BaseObject;
|
|
147
149
|
shadowMapEnabled(): Promise<void>;
|
|
148
150
|
shadowMapDisabled(): void;
|
|
151
|
+
getOptionsDepth(adcode: number): number;
|
|
149
152
|
getDepth(adcode: number, geojson: GeoJSON): number;
|
|
150
153
|
getReferenceScale(bboxa: number[], bboxb: number[]): number;
|
|
151
154
|
getAdcodeShowLevel(adcode: number): string | undefined;
|
|
@@ -72,7 +72,7 @@ export default class PlaneMap extends BaseObject {
|
|
|
72
72
|
}[];
|
|
73
73
|
pickArea(e: MouseEvent): import("gl-draw/dist/core/BaseObject").IBaseObject | undefined;
|
|
74
74
|
update(delta: number, elapsed: number): void;
|
|
75
|
-
findGroup(adcode: string | number): Group | undefined;
|
|
75
|
+
findGroup(adcode: string | number, fix?: boolean): Group | undefined;
|
|
76
76
|
setAreaMaterial(key: string, material: THREE.Material[] | THREE.Material): void;
|
|
77
77
|
useAreaMaterial(key: string): void;
|
|
78
78
|
setLineMaterial(key: string, material: THREE.Material): void;
|
package/dist/vis/map2/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export default class extends Map {
|
|
|
38
38
|
options: Required<MapCityOptions>;
|
|
39
39
|
setOptions(options: MapCityOptions): void;
|
|
40
40
|
init(): Promise<void>;
|
|
41
|
+
handleClick(e: MouseEvent): void;
|
|
41
42
|
preInitCityVis(): Promise<void>;
|
|
42
43
|
initCityVis(adcode: number, options?: {
|
|
43
44
|
clip?: boolean;
|
package/dist/vis/map2/map.d.ts
CHANGED