vis-core 0.24.10 → 0.24.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.module.js +61 -61
- package/dist/version.d.ts +1 -1
- package/dist/vis/map/index.d.ts +1 -2
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -90,7 +90,7 @@ const publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRz
|
|
|
90
90
|
).toString(CryptoJS.enc.Utf8), ct = JSON.parse(rt), Zt = Date.now();
|
|
91
91
|
return !ct.s || ct.s > Zt ? (this.token = void 0, "") : ct.e && ct.e < Zt ? (this.token = void 0, "") : (ct.isValid = qe, ct);
|
|
92
92
|
}
|
|
93
|
-
}, version = "0.24.
|
|
93
|
+
}, version = "0.24.12";
|
|
94
94
|
/**
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright 2010-2025 Three.js Authors
|
|
@@ -50683,53 +50683,58 @@ class Base extends Event {
|
|
|
50683
50683
|
}
|
|
50684
50684
|
initPencil() {
|
|
50685
50685
|
return ti(this, null, function* () {
|
|
50686
|
-
var Je, Ke, Qe, _e, $e, qe, st, rt, ct
|
|
50687
|
-
if (this.
|
|
50688
|
-
|
|
50689
|
-
fov: (Ke = (Je = this.pencilConfig.camera) == null ? void 0 : Je.fov) != null ? Ke : 45,
|
|
50690
|
-
near: (_e = (Qe = this.pencilConfig.camera) == null ? void 0 : Qe.near) != null ? _e : 0.1,
|
|
50691
|
-
far: (qe = ($e = this.pencilConfig.camera) == null ? void 0 : $e.far) != null ? qe : 1e3,
|
|
50692
|
-
up: (rt = (st = this.pencilConfig.camera) == null ? void 0 : st.up) != null ? rt : new Vector3(0, 1, 0)
|
|
50693
|
-
}
|
|
50694
|
-
}), this.setSceneActive(), this.drawController.install(this.pencil), this.mList.install(this.pencil), yield this.drawController.initGroup(), (ct = this.drawController.group) == null || ct.hide(), (Zt = this.drawController.prefabGroup) == null || Zt.hide()), this.pencil) return;
|
|
50695
|
-
this.pencilConfig = li({}, this.pencilConfig), this.options.css2DContainer && (this.pencilConfig.css2DRendererParams = {
|
|
50686
|
+
var c, Je, Ke, Qe, _e, $e, qe, st, rt, ct;
|
|
50687
|
+
if (this.pencil) return;
|
|
50688
|
+
if (this.pencilConfig = li({}, this.pencilConfig), this.options.css2DContainer && (this.pencilConfig.css2DRendererParams = {
|
|
50696
50689
|
container: this.options.css2DContainer
|
|
50697
|
-
})
|
|
50698
|
-
|
|
50699
|
-
|
|
50700
|
-
|
|
50701
|
-
|
|
50702
|
-
|
|
50703
|
-
|
|
50704
|
-
|
|
50705
|
-
|
|
50706
|
-
|
|
50707
|
-
|
|
50708
|
-
|
|
50709
|
-
|
|
50710
|
-
|
|
50711
|
-
|
|
50712
|
-
|
|
50713
|
-
|
|
50714
|
-
|
|
50715
|
-
|
|
50716
|
-
|
|
50717
|
-
|
|
50718
|
-
|
|
50719
|
-
|
|
50720
|
-
},
|
|
50721
|
-
|
|
50722
|
-
|
|
50723
|
-
|
|
50724
|
-
|
|
50725
|
-
|
|
50726
|
-
|
|
50727
|
-
|
|
50728
|
-
|
|
50729
|
-
|
|
50730
|
-
|
|
50731
|
-
|
|
50732
|
-
|
|
50690
|
+
}), this.options.pencil)
|
|
50691
|
+
this.pencil = this.options.pencil, this.sceneActive = this.pencil.addPage({
|
|
50692
|
+
cameraOptions: {
|
|
50693
|
+
fov: (Je = (c = this.pencilConfig.camera) == null ? void 0 : c.fov) != null ? Je : 45,
|
|
50694
|
+
near: (Qe = (Ke = this.pencilConfig.camera) == null ? void 0 : Ke.near) != null ? Qe : 0.1,
|
|
50695
|
+
far: ($e = (_e = this.pencilConfig.camera) == null ? void 0 : _e.far) != null ? $e : 1e3,
|
|
50696
|
+
up: (st = (qe = this.pencilConfig.camera) == null ? void 0 : qe.up) != null ? st : new Vector3(0, 1, 0)
|
|
50697
|
+
}
|
|
50698
|
+
}), this.setSceneActive(), this.drawController.install(this.pencil), this.mList.install(this.pencil);
|
|
50699
|
+
else {
|
|
50700
|
+
const Zt = new Vt$1(li(li(Pi(li({
|
|
50701
|
+
container: this.container,
|
|
50702
|
+
isdev: !this.playing && IS_DEV,
|
|
50703
|
+
stats: !this.playing && IS_DEV,
|
|
50704
|
+
gui: !this.playing && IS_DEV,
|
|
50705
|
+
helper: !this.playing,
|
|
50706
|
+
viewHelper: !this.playing,
|
|
50707
|
+
transformControls: !this.playing,
|
|
50708
|
+
css2DRenderer: !0
|
|
50709
|
+
}, this.tier0 ? {
|
|
50710
|
+
composer: {
|
|
50711
|
+
multisampling: 0
|
|
50712
|
+
}
|
|
50713
|
+
} : {}), {
|
|
50714
|
+
renderer: {
|
|
50715
|
+
alpha: !0,
|
|
50716
|
+
logarithmicDepthBuffer: this.options.logarithmicDepthBuffer
|
|
50717
|
+
},
|
|
50718
|
+
camera: {
|
|
50719
|
+
near: 0.1,
|
|
50720
|
+
far: 1e3,
|
|
50721
|
+
fov: 45
|
|
50722
|
+
},
|
|
50723
|
+
bloom: !0,
|
|
50724
|
+
ssao: !0,
|
|
50725
|
+
ssaoParams: {
|
|
50726
|
+
minDistance: 1e-3
|
|
50727
|
+
},
|
|
50728
|
+
scene: {
|
|
50729
|
+
background: new Color$1(0)
|
|
50730
|
+
}
|
|
50731
|
+
}), this.pencilConfig), this.options.pencilConfig));
|
|
50732
|
+
this.pencil = Zt, this.sceneActive = 0;
|
|
50733
|
+
const Wt = Zt.composerController.ssaoPass;
|
|
50734
|
+
Wt && (Wt.enabled = !1), this.initPencilPlugin(Zt), this.playing || (window.vis = this, window.pencil = Zt);
|
|
50735
|
+
}
|
|
50736
|
+
const r = this.pencil;
|
|
50737
|
+
this.leftTruck && (r.controls.mouseButtons.left = ws.TRUCK, r.controls.mouseButtons.right = ws.ROTATE), yield this.drawController.initGroup(), (rt = this.drawController.group) == null || rt.hide(), (ct = this.drawController.prefabGroup) == null || ct.hide(), this.initSceneUserData(), this.initSettings();
|
|
50733
50738
|
});
|
|
50734
50739
|
}
|
|
50735
50740
|
setSceneActive() {
|
|
@@ -130267,9 +130272,7 @@ class CityPlane extends v {
|
|
|
130267
130272
|
}
|
|
130268
130273
|
create() {
|
|
130269
130274
|
return ti(this, null, function* () {
|
|
130270
|
-
const { width: r, height: c, color: Je, map: Ke, material: Qe } = this.options;
|
|
130271
|
-
console.log("create plane", r, c);
|
|
130272
|
-
const _e = new PlaneGeometry(r, c, 2, 2);
|
|
130275
|
+
const { width: r, height: c, color: Je, map: Ke, material: Qe } = this.options, _e = new PlaneGeometry(r, c, 2, 2);
|
|
130273
130276
|
this.plane = _e;
|
|
130274
130277
|
const $e = Qe || new MeshBasicMaterial({
|
|
130275
130278
|
color: Je,
|
|
@@ -130751,7 +130754,6 @@ const objs$4 = Pi(li({}, objs$5), {
|
|
|
130751
130754
|
showOneLevel: !1,
|
|
130752
130755
|
drillDownRestrictions: "district",
|
|
130753
130756
|
showDistrict: !0,
|
|
130754
|
-
showDistrictStreetView: !1,
|
|
130755
130757
|
showLabel: !1,
|
|
130756
130758
|
lineWidth: 2,
|
|
130757
130759
|
lineOffset: 0,
|
|
@@ -130773,7 +130775,7 @@ const objs$4 = Pi(li({}, objs$5), {
|
|
|
130773
130775
|
geojsonMap: c,
|
|
130774
130776
|
extrudeLineGeojsonMap: Je,
|
|
130775
130777
|
bboxMap: Ke
|
|
130776
|
-
})), 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.clickHandleDrillDown = () => this.options.clickHandleDrillDown, this.options.clickHandleDrillDown && (this.workerOnce = !1, this.extendsOptions.mapDepth = () => Array.isArray(this.options.mapDepth) ? this.options.mapDepth : new Array(3).fill(this.options.mapDepth), this.extendsOptions.drillDownSecondLevelMats = () => this.options.drillDownSecondLevelMats, this.extendsOptions.drillDownThirdLevelMats = () => this.options.drillDownThirdLevelMats, this.extendsOptions.drillDownPlateInCenter = () => this.options.drillDownPlateInCenter, this.extendsOptions.clickOusideBack = () => this.options.clickOusideBack, this.extendsOptions.handleBackKeepCamvasState = () => this.options.handleBackKeepCamvasState, this.extendsOptions.showOneLevel = () => this.options.showOneLevel, this.extendsOptions.showDistrict = () => this.options.showDistrict, this.
|
|
130778
|
+
})), 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.clickHandleDrillDown = () => this.options.clickHandleDrillDown, this.options.clickHandleDrillDown && (this.workerOnce = !1, this.extendsOptions.mapDepth = () => Array.isArray(this.options.mapDepth) ? this.options.mapDepth : new Array(3).fill(this.options.mapDepth), this.extendsOptions.drillDownSecondLevelMats = () => this.options.drillDownSecondLevelMats, this.extendsOptions.drillDownThirdLevelMats = () => this.options.drillDownThirdLevelMats, this.extendsOptions.drillDownPlateInCenter = () => this.options.drillDownPlateInCenter, this.extendsOptions.clickOusideBack = () => this.options.clickOusideBack, this.extendsOptions.handleBackKeepCamvasState = () => this.options.handleBackKeepCamvasState, this.extendsOptions.showOneLevel = () => this.options.showOneLevel, this.extendsOptions.showDistrict = () => this.options.showDistrict, this.options.parentBg && (this.extendsOptions.drillDownHideParent = () => this.options.drillDownHideParent)), this.extendsOptions.parentBg = () => this.options.parentBg, this.options.parentBg && (this.extendsOptions.parentBgDepth = () => this.options.parentBgDepth, this.extendsOptions.parentBgTopSegments = () => this.options.parentBgTopSegments), this.extendsOptions.continentsBg = () => this.options.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));
|
|
130777
130779
|
}
|
|
130778
130780
|
handleSetting(r, c) {
|
|
130779
130781
|
return ti(this, null, function* () {
|
|
@@ -131266,13 +131268,9 @@ const objs$4 = Pi(li({}, objs$5), {
|
|
|
131266
131268
|
}
|
|
131267
131269
|
handleClick(r) {
|
|
131268
131270
|
const { drillDownRestrictions: c } = this.options;
|
|
131269
|
-
this.isAnimating || (r && r.userData.adcode
|
|
131270
|
-
"beforeDrillDown",
|
|
131271
|
-
[...this.adcodes, r.userData.adcode],
|
|
131272
|
-
"city"
|
|
131273
|
-
) : r && r.userData.adcode && this.getAdcodeShowLevel(r.userData.adcode) !== c ? this.showMap({
|
|
131271
|
+
this.isAnimating || (r && r.userData.adcode ? this.getAdcodeShowLevel(r.userData.adcode, !1) !== c ? this.showMap({
|
|
131274
131272
|
adcode: r.userData.adcode
|
|
131275
|
-
}) : !r && this.mapHistory.length > 1 && this.showMap({
|
|
131273
|
+
}) : this.emit("drilldownRestrictions", r.userData.adcode) : !r && this.mapHistory.length > 1 && this.showMap({
|
|
131276
131274
|
adcode: this.adcodes.at(-2)
|
|
131277
131275
|
}));
|
|
131278
131276
|
}
|
|
@@ -131689,8 +131687,10 @@ const objs$4 = Pi(li({}, objs$5), {
|
|
|
131689
131687
|
}
|
|
131690
131688
|
});
|
|
131691
131689
|
}
|
|
131692
|
-
setPadding(r, c = !1) {
|
|
131693
|
-
this.options.mapPadding = r, c && this.fitTo(this.map
|
|
131690
|
+
setPadding(r, c = !1, Je = !1) {
|
|
131691
|
+
this.options.mapPadding = r, c && this.fitTo(this.map, {
|
|
131692
|
+
enableTransition: Je
|
|
131693
|
+
});
|
|
131694
131694
|
}
|
|
131695
131695
|
dispose() {
|
|
131696
131696
|
var r, c;
|
|
@@ -133075,7 +133075,7 @@ class City$1 extends Base {
|
|
|
133075
133075
|
let Yt = 1e3, Tt = 1e3;
|
|
133076
133076
|
if (Je) {
|
|
133077
133077
|
const Jt = this.projection([Je[0], Je[1]]), $t = this.projection([Je[2], Je[3]]), e0 = Math.abs($t[0] - Jt[0]), t0 = Math.abs($t[1] - Jt[1]);
|
|
133078
|
-
Yt = e0, Tt = t0
|
|
133078
|
+
Yt = e0, Tt = t0;
|
|
133079
133079
|
}
|
|
133080
133080
|
const dt = this.mList.getMaterial("city-plane"), vt = yield this.drawController.draw(
|
|
133081
133081
|
"CityPlane",
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.24.
|
|
1
|
+
declare const _default: "0.24.12";
|
|
2
2
|
export default _default;
|
package/dist/vis/map/index.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ export interface MapOptions extends BaseOptions {
|
|
|
34
34
|
drillDownSecondLevelMats?: boolean;
|
|
35
35
|
drillDownThirdLevelMats?: boolean;
|
|
36
36
|
showDistrict?: boolean;
|
|
37
|
-
showDistrictStreetView?: boolean;
|
|
38
37
|
showLabel?: boolean | 'lite';
|
|
39
38
|
lineWidth?: number;
|
|
40
39
|
lineOffset?: number;
|
|
@@ -209,7 +208,7 @@ export default class extends Base {
|
|
|
209
208
|
adcodes: number[];
|
|
210
209
|
duration?: number;
|
|
211
210
|
}): Promise<void>;
|
|
212
|
-
setPadding(padding: number[], fitTo?: boolean): void;
|
|
211
|
+
setPadding(padding: number[], fitTo?: boolean, enableTransition?: boolean): void;
|
|
213
212
|
dispose(): void;
|
|
214
213
|
}
|
|
215
214
|
export {};
|