vis-core 0.22.12 → 0.22.14
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 +6 -6
- package/dist/index.module.js +89 -63
- package/dist/version.d.ts +1 -1
- package/dist/vis/all/objects/Arc/utils.d.ts +1 -1
- package/dist/vis/base/index.d.ts +3 -2
- package/dist/vis/map/index.d.ts +4 -0
- package/dist/vis/map/objects/PlaneMap.d.ts +1 -1
- package/dist/vis/map2/index.d.ts +1 -1
- 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.14";
|
|
94
94
|
/**
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright 2010-2024 Three.js Authors
|
|
@@ -38024,7 +38024,7 @@ const V = {
|
|
|
38024
38024
|
r.width = 256, r.height = 1;
|
|
38025
38025
|
const T = r.getContext("2d"), de = T.createLinearGradient(0, 0, 256, 1);
|
|
38026
38026
|
de.addColorStop(0, e), de.addColorStop(c, e), de.addColorStop(c, s), de.addColorStop(1, s), T.fillStyle = de, T.fillRect(0, 0, 256, 1);
|
|
38027
|
-
const Xe = new
|
|
38027
|
+
const Xe = new CanvasTexture(r);
|
|
38028
38028
|
return Xe.wrapS = RepeatWrapping, Xe.wrapT = RepeatWrapping, Xe.needsUpdate = !0, Xe;
|
|
38029
38029
|
}, createFlyPath = (c, e, s = 40) => {
|
|
38030
38030
|
const r = c.angleTo(e);
|
|
@@ -38149,14 +38149,14 @@ class Arc extends A$1 {
|
|
|
38149
38149
|
onComplete: de,
|
|
38150
38150
|
onRepeat: Xe
|
|
38151
38151
|
} = {}) {
|
|
38152
|
-
this.line.material.userData.tween && (this.line.material.userData.tween.stop(), remove(this.line.material.userData.tween), this.line.material.userData.tween = null), this.line.material.uniforms.offset.value.x = 1, this.line.material.uniforms.offsetLoop.value = 0, this.line.animate({
|
|
38152
|
+
this.line.material.userData.tween && (this.line.material.userData.tween.stop(), remove(this.line.material.userData.tween), this.line.material.userData.tween = null, this.line.material.uniforms.offset.value.x = 0), s && (this.line.material.uniforms.offset.value.x = 1, this.line.material.uniforms.offsetLoop.value = 0, this.line.animate({
|
|
38153
38153
|
duration: s,
|
|
38154
38154
|
repeat: T,
|
|
38155
38155
|
delay: r,
|
|
38156
38156
|
lineLoop: this.options.offsetLoop,
|
|
38157
38157
|
onRepeat: Xe,
|
|
38158
38158
|
onComplete: de
|
|
38159
|
-
});
|
|
38159
|
+
}));
|
|
38160
38160
|
}
|
|
38161
38161
|
update() {
|
|
38162
38162
|
var s;
|
|
@@ -38169,7 +38169,10 @@ class Arc extends A$1 {
|
|
|
38169
38169
|
this.helperMeshPosition[2],
|
|
38170
38170
|
this.helperMeshPosition[3]
|
|
38171
38171
|
).getPoints(1500);
|
|
38172
|
-
return this.line.setGeometry(
|
|
38172
|
+
return this.line.setGeometry(
|
|
38173
|
+
Xe,
|
|
38174
|
+
this.line.object3d.geometry.widthCallback
|
|
38175
|
+
), !0;
|
|
38173
38176
|
}
|
|
38174
38177
|
});
|
|
38175
38178
|
}
|
|
@@ -50482,20 +50485,22 @@ class Base extends Event {
|
|
|
50482
50485
|
const r = {
|
|
50483
50486
|
bloom: !1
|
|
50484
50487
|
};
|
|
50485
|
-
s.objectType
|
|
50486
|
-
|
|
50487
|
-
|
|
50488
|
+
if (s.objectType === "BaseObject#Light")
|
|
50489
|
+
return;
|
|
50490
|
+
s.objectType === "BaseObject#Arc" && (r.animationDuration = 2e3), prefabType.includes(s.objectType.split("#")[1]) && (r.prefab = s.prefab), s.object3d.userData = new Proxy(r, {
|
|
50491
|
+
set: (de, Xe, Ke) => {
|
|
50492
|
+
if (Xe === "bloom")
|
|
50488
50493
|
this.pencil.composerController.toggleBloomSelection(
|
|
50489
50494
|
s,
|
|
50490
|
-
|
|
50495
|
+
Ke
|
|
50491
50496
|
);
|
|
50492
|
-
else if (
|
|
50493
|
-
const
|
|
50494
|
-
s.prefab =
|
|
50495
|
-
}
|
|
50496
|
-
return Reflect.set(
|
|
50497
|
+
else if (Xe === "prefab") {
|
|
50498
|
+
const Je = this.pencil.getPlugin("draw");
|
|
50499
|
+
s.prefab = Ke, Ke ? Je.prefabGroup.attach(s) : Je.group.attach(s);
|
|
50500
|
+
} else Xe === "animationDuration" && s.animateIn({ duration: Ke });
|
|
50501
|
+
return Reflect.set(de, Xe, Ke);
|
|
50497
50502
|
}
|
|
50498
|
-
})
|
|
50503
|
+
});
|
|
50499
50504
|
}
|
|
50500
50505
|
initPencilPlugin() {
|
|
50501
50506
|
this.mList = new MaterialList(), this.loader = new Kl(ai({
|
|
@@ -129382,9 +129387,11 @@ let PlaneMap$1 = class extends A$1 {
|
|
|
129382
129387
|
!Xe || !Xe.uniforms.lineLightAnimation.value || (Xe.uniforms.time.value = r);
|
|
129383
129388
|
});
|
|
129384
129389
|
}
|
|
129385
|
-
findGroup(s) {
|
|
129390
|
+
findGroup(s, r = !1) {
|
|
129386
129391
|
return this.pencil.getPlugin("draw").getObject("Group", {
|
|
129387
|
-
key: `area-group-${
|
|
129392
|
+
key: `area-group-${r ? this.getPropertiesKey({
|
|
129393
|
+
adcode: s
|
|
129394
|
+
}) : s}`
|
|
129388
129395
|
});
|
|
129389
129396
|
}
|
|
129390
129397
|
setAreaMaterial(s, r) {
|
|
@@ -129771,16 +129778,19 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129771
129778
|
name: "顶面",
|
|
129772
129779
|
map: e.getAsset("/image/map/hp.webp"),
|
|
129773
129780
|
normalMap: e.getAsset("/image/map/shuchu2.webp")
|
|
129774
|
-
}), T = new MeshBasicMaterial({
|
|
129781
|
+
}), T = this.options.drillDownTopMatTwo ? new MeshBasicMaterial({
|
|
129782
|
+
name: "二级顶面",
|
|
129783
|
+
color: new Color$1("#0d2425")
|
|
129784
|
+
}) : null, de = new MeshBasicMaterial({
|
|
129775
129785
|
name: "侧面",
|
|
129776
129786
|
map: e.getAsset("/image/map/jianbian.webp")
|
|
129777
|
-
}),
|
|
129787
|
+
}), Xe = new it$1({
|
|
129778
129788
|
color: new Color$1("#73FEDD"),
|
|
129779
129789
|
sizeAttenuation: 0,
|
|
129780
129790
|
lineWidth: this.options.lineWidth,
|
|
129781
129791
|
//@ts-ignore
|
|
129782
129792
|
depthWrite: !1
|
|
129783
|
-
}),
|
|
129793
|
+
}), Ke = new it$1({
|
|
129784
129794
|
name: "板块边线",
|
|
129785
129795
|
color: new Color$1("#00FFED"),
|
|
129786
129796
|
sizeAttenuation: 0,
|
|
@@ -129790,9 +129800,10 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129790
129800
|
});
|
|
129791
129801
|
return {
|
|
129792
129802
|
topMat: r,
|
|
129793
|
-
|
|
129794
|
-
|
|
129795
|
-
|
|
129803
|
+
topMatTwo: T,
|
|
129804
|
+
sideMat: de,
|
|
129805
|
+
lineMat: Xe,
|
|
129806
|
+
extrudeLineMat: Ke
|
|
129796
129807
|
};
|
|
129797
129808
|
})();
|
|
129798
129809
|
this.mList.setMaterialObj("plane", s), this.mList.setShowMaterialList("area", ["plane#topMat", "plane#sideMat"], {
|
|
@@ -129813,16 +129824,19 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129813
129824
|
const r = new MeshBasicMaterial({
|
|
129814
129825
|
name: "顶面",
|
|
129815
129826
|
color: new Color$1("#0d2425")
|
|
129816
|
-
}), T = new MeshBasicMaterial({
|
|
129827
|
+
}), T = this.options.drillDownTopMatTwo ? new MeshBasicMaterial({
|
|
129828
|
+
name: "二级顶面",
|
|
129829
|
+
color: new Color$1("#0d2425")
|
|
129830
|
+
}) : null, de = new MeshBasicMaterial({
|
|
129817
129831
|
name: "侧面",
|
|
129818
129832
|
map: e.getAsset("/image/map/jianbian.webp")
|
|
129819
|
-
}),
|
|
129833
|
+
}), Xe = new it$1({
|
|
129820
129834
|
color: new Color$1("#73FEDD"),
|
|
129821
129835
|
sizeAttenuation: 0,
|
|
129822
129836
|
lineWidth: this.options.lineWidth,
|
|
129823
129837
|
//@ts-ignore
|
|
129824
129838
|
depthWrite: !1
|
|
129825
|
-
}),
|
|
129839
|
+
}), Ke = new it$1({
|
|
129826
129840
|
color: new Color$1("#00FFED"),
|
|
129827
129841
|
sizeAttenuation: 0,
|
|
129828
129842
|
lineWidth: this.options.extrudeLineWidth,
|
|
@@ -129830,10 +129844,11 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129830
129844
|
depthWrite: !1
|
|
129831
129845
|
});
|
|
129832
129846
|
return {
|
|
129847
|
+
topMatTwo: T,
|
|
129833
129848
|
topMat: r,
|
|
129834
|
-
sideMat:
|
|
129835
|
-
lineMat:
|
|
129836
|
-
extrudeLineMat:
|
|
129849
|
+
sideMat: de,
|
|
129850
|
+
lineMat: Xe,
|
|
129851
|
+
extrudeLineMat: Ke
|
|
129837
129852
|
};
|
|
129838
129853
|
})();
|
|
129839
129854
|
this.mList.setMaterialObj("plane", s), this.mList.setShowMaterialList("area", ["plane#topMat", "plane#sideMat"], {
|
|
@@ -129879,7 +129894,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129879
129894
|
H0(this, "pscale", 5e4 / 1e3);
|
|
129880
129895
|
H0(this, "meters");
|
|
129881
129896
|
H0(this, "extendsOptions", {
|
|
129882
|
-
mapDepth: () => this.
|
|
129897
|
+
mapDepth: () => this.getOptionsDepth(this.options.adcode),
|
|
129883
129898
|
equirectangular: () => this.options.projectionType === "equirectangular",
|
|
129884
129899
|
// fahey: () => {
|
|
129885
129900
|
// return this.options.projectionType === 'fahey';
|
|
@@ -129948,6 +129963,8 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129948
129963
|
continentsBgDepth: 0,
|
|
129949
129964
|
parentBgDepth: 0,
|
|
129950
129965
|
parentBgTopSegments: 0,
|
|
129966
|
+
clickHandleDrillDown: !1,
|
|
129967
|
+
drillDownTopMatTwo: !1,
|
|
129951
129968
|
clickOusideBack: !0,
|
|
129952
129969
|
mapDepth: [1, 0.4, 0.2],
|
|
129953
129970
|
mapPadding: [100, 100, 100, 100],
|
|
@@ -129976,7 +129993,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
129976
129993
|
geojsonMap: r,
|
|
129977
129994
|
extrudeLineGeojsonMap: T,
|
|
129978
129995
|
bboxMap: de
|
|
129979
|
-
})), 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));
|
|
129996
|
+
})), 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));
|
|
129980
129997
|
}
|
|
129981
129998
|
handleSetting(s, r) {
|
|
129982
129999
|
return ei(this, null, function* () {
|
|
@@ -130022,7 +130039,9 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130022
130039
|
scale: this.pscale,
|
|
130023
130040
|
projectionType: this.options.projectionType,
|
|
130024
130041
|
rotate: this.options.worldPacificCentre ? [-160, 0] : void 0
|
|
130025
|
-
}), 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),
|
|
130042
|
+
}), 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) => {
|
|
130043
|
+
this.handleClick(r);
|
|
130044
|
+
}), yield Promise.all(this.drawController.objectsPromise);
|
|
130026
130045
|
});
|
|
130027
130046
|
}
|
|
130028
130047
|
initVis(s) {
|
|
@@ -130157,6 +130176,13 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130157
130176
|
}
|
|
130158
130177
|
});
|
|
130159
130178
|
}
|
|
130179
|
+
consoleMousePostion() {
|
|
130180
|
+
this.addListener(this.container, "click", (s) => {
|
|
130181
|
+
var de, Xe;
|
|
130182
|
+
const r = this.unproject(s, this.mapObj.z + this.mapObj.depth), T = (Xe = (de = this.projection).invert) == null ? void 0 : Xe.call(de, [r.x, -r.y]);
|
|
130183
|
+
console.log("consoleMousePostion.postion", r), console.log("consoleMousePostion.lnglat", T);
|
|
130184
|
+
});
|
|
130185
|
+
}
|
|
130160
130186
|
setAreaMixColor(s, r) {
|
|
130161
130187
|
this.setAreaColorByProperty("adcode", s, r, !0);
|
|
130162
130188
|
}
|
|
@@ -130361,19 +130387,23 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130361
130387
|
shadowMapDisabled() {
|
|
130362
130388
|
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));
|
|
130363
130389
|
}
|
|
130390
|
+
getOptionsDepth(s) {
|
|
130391
|
+
const r = this.getAdcodeShowLevel(s);
|
|
130392
|
+
let T = this.options.mapDepth;
|
|
130393
|
+
Array.isArray(T) || (T = new Array(3).fill(T));
|
|
130394
|
+
let de;
|
|
130395
|
+
return r === "country" ? de = T[0] : r === "province" ? de = T[1] : de = T[2], de;
|
|
130396
|
+
}
|
|
130364
130397
|
getDepth(s, r) {
|
|
130365
|
-
|
|
130366
|
-
|
|
130367
|
-
|
|
130368
|
-
|
|
130369
|
-
if (T === "country" ? Xe = de[0] : T === "province" ? Xe = de[1] : Xe = de[2], this.options.depthReference && this.options.bboxMap[s]) {
|
|
130370
|
-
const Ke = this.options.depthReference, Je = this.options.bboxMap[s];
|
|
130371
|
-
Xe = Xe * this.getReferenceScale(Ke, Je);
|
|
130398
|
+
let T = this.getOptionsDepth(s);
|
|
130399
|
+
if (this.options.depthReference && this.options.bboxMap[s]) {
|
|
130400
|
+
const de = this.options.depthReference, Xe = this.options.bboxMap[s];
|
|
130401
|
+
T = T * this.getReferenceScale(de, Xe);
|
|
130372
130402
|
} else if (this.mapHistory.length && this.options.bboxMap[this.mapHistory[0].mapInfo.adcode]) {
|
|
130373
|
-
const
|
|
130374
|
-
|
|
130403
|
+
const de = this.options.bboxMap[this.mapHistory[0].mapInfo.adcode], Xe = bbox(r), Ke = this.getReferenceScale(de, Xe);
|
|
130404
|
+
T = T * Ke;
|
|
130375
130405
|
}
|
|
130376
|
-
return
|
|
130406
|
+
return T;
|
|
130377
130407
|
}
|
|
130378
130408
|
getReferenceScale(s, r) {
|
|
130379
130409
|
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]);
|
|
@@ -130491,7 +130521,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130491
130521
|
}) {
|
|
130492
130522
|
var Xe, Ke, Je, Qe, _e, $e, qe, st;
|
|
130493
130523
|
if (typeof s != "undefined" && !this.isAnimating) {
|
|
130494
|
-
const dt = (Xe = this.map) == null ? void 0 : Xe.findGroup(s), Wt = findLevelJsonItem2(+s);
|
|
130524
|
+
const dt = (Xe = this.map) == null ? void 0 : Xe.findGroup(s, !0), Wt = findLevelJsonItem2(+s);
|
|
130495
130525
|
if (this.isAnimating || !Wt) return;
|
|
130496
130526
|
this.isAnimating = !0;
|
|
130497
130527
|
const { name: Yt } = Wt;
|
|
@@ -130641,7 +130671,9 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130641
130671
|
depth: de,
|
|
130642
130672
|
adcode: Xe
|
|
130643
130673
|
}) {
|
|
130644
|
-
const Je = this.mList.getMaterialObj("plane"),
|
|
130674
|
+
const Je = this.mapHistory.length === 0, Qe = this.mList.getMaterialObj("plane"), _e = ai({}, Qe);
|
|
130675
|
+
!Je && _e.topMatTwo && (_e.topMat = _e.topMatTwo);
|
|
130676
|
+
const $e = yield this.drawController.draw(
|
|
130645
130677
|
"PlaneMap",
|
|
130646
130678
|
{
|
|
130647
130679
|
geojson: s,
|
|
@@ -130653,7 +130685,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130653
130685
|
rotate: this.options.worldPacificCentre ? [-160, 0] : void 0,
|
|
130654
130686
|
projectionType: this.options.projectionType
|
|
130655
130687
|
},
|
|
130656
|
-
materialOptions:
|
|
130688
|
+
materialOptions: _e,
|
|
130657
130689
|
bbox: T,
|
|
130658
130690
|
topSegments: this.options.topSegments,
|
|
130659
130691
|
lineOffset: this.options.lineOffset,
|
|
@@ -130661,19 +130693,19 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130661
130693
|
},
|
|
130662
130694
|
this.group
|
|
130663
130695
|
);
|
|
130664
|
-
return
|
|
130665
|
-
|
|
130666
|
-
baseObject:
|
|
130696
|
+
return $e.extrudelineArr && $e.extrudelineArr.forEach((qe) => {
|
|
130697
|
+
qe.object3d.name = "板块边线", this.mList.setObject3d(qe.object3d, "extrudeLine", {
|
|
130698
|
+
baseObject: qe,
|
|
130667
130699
|
replace: !0
|
|
130668
|
-
}), this.initBaseObjectUserData(
|
|
130700
|
+
}), this.initBaseObjectUserData(qe);
|
|
130669
130701
|
}), this.mList.setObject3d(
|
|
130670
|
-
|
|
130702
|
+
$e.object3d,
|
|
130671
130703
|
Xe === 1e5 ? "chinaGroup" : "planeMapGroup",
|
|
130672
130704
|
{
|
|
130673
|
-
baseObject:
|
|
130705
|
+
baseObject: $e,
|
|
130674
130706
|
replace: !0
|
|
130675
130707
|
}
|
|
130676
|
-
),
|
|
130708
|
+
), $e;
|
|
130677
130709
|
});
|
|
130678
130710
|
}
|
|
130679
130711
|
handleBack() {
|
|
@@ -130700,7 +130732,7 @@ const objs$4 = Ki(ai({}, objs$5), {
|
|
|
130700
130732
|
this.drawController.eraseWithoutMaterial(de.map), this.eraseLabels();
|
|
130701
130733
|
}
|
|
130702
130734
|
if (this.mapObj) {
|
|
130703
|
-
const { map: Xe } = this.mapObj, Ke = Xe == null ? void 0 : Xe.findGroup(de == null ? void 0 : de.mapInfo.adcode);
|
|
130735
|
+
const { map: Xe } = this.mapObj, Ke = Xe == null ? void 0 : Xe.findGroup(de == null ? void 0 : de.mapInfo.adcode, !0);
|
|
130704
130736
|
Ke && Ke.show(), Xe && r && (this.options.showOneLevel ? Xe.show() : Xe.active(), this.options.drillDownHideParent && this.parentBg.forEach((Je) => {
|
|
130705
130737
|
Je.show();
|
|
130706
130738
|
}), yield this.handleLookBack(s), this.drawLabels());
|
|
@@ -133081,9 +133113,7 @@ const R1 = class R1 extends Map$1 {
|
|
|
133081
133113
|
clip: !!this.options.cityOnMap,
|
|
133082
133114
|
grey: !1
|
|
133083
133115
|
});
|
|
133084
|
-
})), this.options.
|
|
133085
|
-
this.showGroup === "map" && this.handleClick(r);
|
|
133086
|
-
}), this.options.cityOnMap)
|
|
133116
|
+
})), this.options.cityOnMap)
|
|
133087
133117
|
if (this.options.allCity) {
|
|
133088
133118
|
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;
|
|
133089
133119
|
de && (yield Promise.all(
|
|
@@ -133095,6 +133125,9 @@ const R1 = class R1 extends Map$1 {
|
|
|
133095
133125
|
yield this.initCityOnMap(this.mapInfo.adcode);
|
|
133096
133126
|
});
|
|
133097
133127
|
}
|
|
133128
|
+
handleClick(s) {
|
|
133129
|
+
this.showGroup === "map" && super.handleClick(s);
|
|
133130
|
+
}
|
|
133098
133131
|
preInitCityVis() {
|
|
133099
133132
|
return ei(this, null, function* () {
|
|
133100
133133
|
const s = Object.keys(this.options.jsonNameObj);
|
|
@@ -133141,13 +133174,6 @@ const R1 = class R1 extends Map$1 {
|
|
|
133141
133174
|
}), adcodeMap[s].parent === 35e4 && this.options.curvatureResolution && city350000(Je), Je.pencilConfig = this.pencilConfig, Je.pencil = this.pencil, Je.roomEnvMap = this.roomEnvMap, Je.mList = this.mList, Je.loader = this.loader, Je.editor = this.editor, Je.drawController = this.drawController, yield Je.init(), Je.group.hide(), this.cityVisObj[s].city = Je, this.cityVisObj[s].state.resolve(), this.emit("initCityVis", s);
|
|
133142
133175
|
});
|
|
133143
133176
|
}
|
|
133144
|
-
consoleMousePostion() {
|
|
133145
|
-
this.addListener(this.container, "click", (s) => {
|
|
133146
|
-
var de, Xe;
|
|
133147
|
-
const r = this.unproject(s, this.mapObj.z + this.mapObj.depth), T = (Xe = (de = this.projection).invert) == null ? void 0 : Xe.call(de, [r.x, -r.y]);
|
|
133148
|
-
console.log("consoleMousePostion.postion", r), console.log("consoleMousePostion.lnglat", T);
|
|
133149
|
-
});
|
|
133150
|
-
}
|
|
133151
133177
|
initCityOnMap(s) {
|
|
133152
133178
|
return ei(this, null, function* () {
|
|
133153
133179
|
if (this.getAdcodeShowLevel(s) !== "city") {
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.22.
|
|
1
|
+
declare const _default: "0.22.14";
|
|
2
2
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import Pencil from 'gl-draw';
|
|
3
|
-
export declare const getLineTexture: (length: number, lightColor?: string, lineColor?: string) => THREE.
|
|
3
|
+
export declare const getLineTexture: (length: number, lightColor?: string, lineColor?: string) => THREE.CanvasTexture;
|
|
4
4
|
export declare const createFlyPath: (v0: THREE.Vector3, v3: THREE.Vector3, h?: number) => THREE.CubicBezierCurve3;
|
|
5
5
|
export declare const createFlyPath2: (v0: THREE.Vector3, v3: THREE.Vector3, h?: number) => THREE.CubicBezierCurve3;
|
|
6
6
|
export declare const pixel2unit: (pencil: Pencil, pixel: number) => number;
|
package/dist/vis/base/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import MaterialList from "../all/MaterialList";
|
|
|
3
3
|
import { Wk, Loader, Draw as DrawController } from 'gl-draw/dist/plugins';
|
|
4
4
|
import type { PickFunctionsItem } from 'gl-draw/dist/plugins/Draw';
|
|
5
5
|
import { Node } from 'gl-draw/dist/objects';
|
|
6
|
+
import Arc from "../all/objects/Arc";
|
|
6
7
|
import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment';
|
|
7
8
|
import * as THREE from 'three';
|
|
8
9
|
import Event from "./event";
|
|
@@ -58,7 +59,7 @@ export default class Base extends Event {
|
|
|
58
59
|
Group: typeof import("gl-draw/dist/objects").Group;
|
|
59
60
|
Light: typeof import("../all/objects/Light").default;
|
|
60
61
|
Point: typeof import("../all/objects/Point").default;
|
|
61
|
-
Arc: typeof
|
|
62
|
+
Arc: typeof Arc;
|
|
62
63
|
Model: typeof import("../all/objects/Model").default;
|
|
63
64
|
}>;
|
|
64
65
|
mList: MaterialList;
|
|
@@ -75,7 +76,7 @@ export default class Base extends Event {
|
|
|
75
76
|
setOptions(options: Record<string, any>): void;
|
|
76
77
|
get fromJSON(): (jsonOrUrl: Record<string, any> | string, hooks?: import("../../editor").Hooks) => Promise<Record<string, any>>;
|
|
77
78
|
get baseObjectByUuid(): {
|
|
78
|
-
(uuid: `arc${string}`, flag?: boolean):
|
|
79
|
+
(uuid: `arc${string}`, flag?: boolean): Arc;
|
|
79
80
|
(uuid: `sprite${string}`, flag?: boolean): import("../all/objects/Sprite").default;
|
|
80
81
|
(uuid: string, flag?: boolean): BaseObject;
|
|
81
82
|
};
|
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;
|
|
@@ -128,6 +130,7 @@ export default class extends Base {
|
|
|
128
130
|
initVis(adcode: number): Promise<void>;
|
|
129
131
|
loaderAddBg(): void;
|
|
130
132
|
initMaterialBg(): Promise<void>;
|
|
133
|
+
consoleMousePostion(): void;
|
|
131
134
|
setAreaMixColor(adcode: number, color: string): void;
|
|
132
135
|
setAreaColorByProperty(key: string, value: any, color: string, mix?: boolean): void;
|
|
133
136
|
setAreaEmissiveByProperty(key: string, value: any, color: string, intensity?: number): void;
|
|
@@ -146,6 +149,7 @@ export default class extends Base {
|
|
|
146
149
|
planeShadow?: BaseObject;
|
|
147
150
|
shadowMapEnabled(): Promise<void>;
|
|
148
151
|
shadowMapDisabled(): void;
|
|
152
|
+
getOptionsDepth(adcode: number): number;
|
|
149
153
|
getDepth(adcode: number, geojson: GeoJSON): number;
|
|
150
154
|
getReferenceScale(bboxa: number[], bboxb: number[]): number;
|
|
151
155
|
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,12 +38,12 @@ 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;
|
|
44
45
|
grey?: boolean;
|
|
45
46
|
}): Promise<void>;
|
|
46
|
-
consoleMousePostion(): void;
|
|
47
47
|
initCityOnMap(adcode: number): Promise<void>;
|
|
48
48
|
showCity(adcode: number, lnglat?: [number, number]): Promise<void>;
|
|
49
49
|
showCity(option: showCityOption): Promise<void>;
|
package/dist/vis/map2/map.d.ts
CHANGED