vis-core 0.30.0-beta.10 → 0.30.0-beta.11
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 +8 -8
- package/dist/index.module.js +29 -27
- package/dist/version.d.ts +1 -1
- package/dist/vis/map/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -13,7 +13,7 @@ var Xn = (v, e) => (e = Symbol[v]) ? e : Symbol.for("Symbol." + v), Jn = (v) =>
|
|
|
13
13
|
return v;
|
|
14
14
|
}, Bi = (v, e) => Hn(v, Yn(e));
|
|
15
15
|
var b0 = (v, e, r) => In(v, typeof e != "symbol" ? e + "" : e, r);
|
|
16
|
-
var
|
|
16
|
+
var vn = (v, e, r) => On(Un(v), r, e);
|
|
17
17
|
var N0 = (v, e, r) => new Promise((o, w) => {
|
|
18
18
|
var W = (j) => {
|
|
19
19
|
try {
|
|
@@ -63,7 +63,7 @@ import { continentsCountriesIso2 } from "geojson-cn";
|
|
|
63
63
|
Array.prototype.at || (Array.prototype.at = function(v) {
|
|
64
64
|
return v < 0 && (v = this.length + v), this[v];
|
|
65
65
|
});
|
|
66
|
-
const version = "0.30.0-beta.
|
|
66
|
+
const version = "0.30.0-beta.11", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
|
|
67
67
|
token: void 0,
|
|
68
68
|
getInfo() {
|
|
69
69
|
if (!this.token)
|
|
@@ -32713,7 +32713,7 @@ class WebGLRenderer {
|
|
|
32713
32713
|
Ei.render(Pi, Oi);
|
|
32714
32714
|
};
|
|
32715
32715
|
function _n(Ht, r0, h0) {
|
|
32716
|
-
Ht.transparent === !0 && Ht.side === DoubleSide && Ht.forceSinglePass === !1 ? (Ht.side = BackSide, Ht.needsUpdate = !0,
|
|
32716
|
+
Ht.transparent === !0 && Ht.side === DoubleSide && Ht.forceSinglePass === !1 ? (Ht.side = BackSide, Ht.needsUpdate = !0, Sn(Ht, r0, h0), Ht.side = FrontSide, Ht.needsUpdate = !0, Sn(Ht, r0, h0), Ht.side = DoubleSide) : Sn(Ht, r0, h0);
|
|
32717
32717
|
}
|
|
32718
32718
|
this.compile = function(Ht, r0, h0 = null) {
|
|
32719
32719
|
h0 === null && (h0 = Ht), Lt = Si.get(h0), Lt.init(r0), Zt.push(Lt), h0.traverseVisible(function(o0) {
|
|
@@ -32876,7 +32876,7 @@ class WebGLRenderer {
|
|
|
32876
32876
|
function Cn(Ht, r0, h0, c0, o0, _0) {
|
|
32877
32877
|
Ht.onBeforeRender(Vt, r0, h0, c0, o0, _0), Ht.modelViewMatrix.multiplyMatrices(h0.matrixWorldInverse, Ht.matrixWorld), Ht.normalMatrix.getNormalMatrix(Ht.modelViewMatrix), o0.onBeforeRender(Vt, r0, h0, c0, Ht, _0), o0.transparent === !0 && o0.side === DoubleSide && o0.forceSinglePass === !1 ? (o0.side = BackSide, o0.needsUpdate = !0, Vt.renderBufferDirect(h0, r0, c0, o0, Ht, _0), o0.side = FrontSide, o0.needsUpdate = !0, Vt.renderBufferDirect(h0, r0, c0, o0, Ht, _0), o0.side = DoubleSide) : Vt.renderBufferDirect(h0, r0, c0, o0, Ht, _0), Ht.onAfterRender(Vt, r0, h0, c0, o0, _0);
|
|
32878
32878
|
}
|
|
32879
|
-
function
|
|
32879
|
+
function Sn(Ht, r0, h0) {
|
|
32880
32880
|
r0.isScene !== !0 && (r0 = D0);
|
|
32881
32881
|
const c0 = $t.get(Ht), o0 = Lt.state.lights, _0 = Lt.state.shadowsArray, R0 = o0.state.version, E0 = Ti.getParameters(Ht, o0.state, _0, r0, h0), B0 = Ti.getProgramCacheKey(E0);
|
|
32882
32882
|
let F0 = c0.programs;
|
|
@@ -32914,7 +32914,7 @@ class WebGLRenderer {
|
|
|
32914
32914
|
let Ai = !1;
|
|
32915
32915
|
c0.version === Vi.__version ? (Vi.needsLights && Vi.lightsStateVersion !== Yi.state.version || Vi.outputColorSpace !== E0 || o0.isBatchedMesh && Vi.batching === !1 || !o0.isBatchedMesh && Vi.batching === !0 || o0.isBatchedMesh && Vi.batchingColor === !0 && o0.colorTexture === null || o0.isBatchedMesh && Vi.batchingColor === !1 && o0.colorTexture !== null || o0.isInstancedMesh && Vi.instancing === !1 || !o0.isInstancedMesh && Vi.instancing === !0 || o0.isSkinnedMesh && Vi.skinning === !1 || !o0.isSkinnedMesh && Vi.skinning === !0 || o0.isInstancedMesh && Vi.instancingColor === !0 && o0.instanceColor === null || o0.isInstancedMesh && Vi.instancingColor === !1 && o0.instanceColor !== null || o0.isInstancedMesh && Vi.instancingMorph === !0 && o0.morphTexture === null || o0.isInstancedMesh && Vi.instancingMorph === !1 && o0.morphTexture !== null || Vi.envMap !== B0 || c0.fog === !0 && Vi.fog !== _0 || Vi.numClippingPlanes !== void 0 && (Vi.numClippingPlanes !== wi.numPlanes || Vi.numIntersection !== wi.numIntersection) || Vi.vertexAlphas !== F0 || Vi.vertexTangents !== O0 || Vi.morphTargets !== q0 || Vi.morphNormals !== Pi || Vi.morphColors !== ki || Vi.toneMapping !== Oi || Vi.morphTargetsCount !== Ei) && (Ai = !0) : (Ai = !0, Vi.__version = c0.version);
|
|
32916
32916
|
let Ui = Vi.currentProgram;
|
|
32917
|
-
Ai === !0 && (Ui =
|
|
32917
|
+
Ai === !0 && (Ui = Sn(c0, r0, o0));
|
|
32918
32918
|
let ji = !1, qi = !1, pn = !1;
|
|
32919
32919
|
const Ji = Ui.getUniforms(), nn = Vi.uniforms;
|
|
32920
32920
|
if (C0.useProgram(Ui.program) && (ji = !0, qi = !0, pn = !0), c0.id !== t0 && (t0 = c0.id, qi = !0), ji || jt !== Ht) {
|
|
@@ -42741,7 +42741,7 @@ class PanelVSync extends Panel {
|
|
|
42741
42741
|
this.canvas.style.transform = `translate(${e}px, ${r}px)`;
|
|
42742
42742
|
}
|
|
42743
42743
|
}
|
|
42744
|
-
const _Stats = class
|
|
42744
|
+
const _Stats = class Mn {
|
|
42745
42745
|
constructor({
|
|
42746
42746
|
trackGPU: e = !1,
|
|
42747
42747
|
trackCPT: r = !1,
|
|
@@ -42769,7 +42769,7 @@ const _Stats = class vn {
|
|
|
42769
42769
|
this.resizePanel(this.fpsPanel), this.resizePanel(this.msPanel), this.gpuPanel && this.resizePanel(this.gpuPanel), this.gpuPanelCompute && this.resizePanel(this.gpuPanelCompute);
|
|
42770
42770
|
}, this.mode = Se, this.horizontal = fe, this.minimal = le, this.trackGPU = e, this.trackCPT = r, this.trackHz = o, this.samplesLog = E, this.samplesGraph = O, this.precision = j, this.logsPerSecond = w, this.graphsPerSecond = W;
|
|
42771
42771
|
const Ne = performance.now();
|
|
42772
|
-
this.prevGraphTime = Ne, this.dom = document.createElement("div"), this.initializeDOM(), this.beginTime = performance.now(), this.prevTextTime = this.beginTime, this.prevCpuTime = this.beginTime, this._panelId = 0, this.fpsPanel = this.addPanel(new
|
|
42772
|
+
this.prevGraphTime = Ne, this.dom = document.createElement("div"), this.initializeDOM(), this.beginTime = performance.now(), this.prevTextTime = this.beginTime, this.prevCpuTime = this.beginTime, this._panelId = 0, this.fpsPanel = this.addPanel(new Mn.Panel("FPS", "#0ff", "#002")), this.msPanel = this.addPanel(new Mn.Panel("CPU", "#0f0", "#020")), this.trackHz === !0 && (this.vsyncPanel = new PanelVSync("", "#f0f", "#202"), this.dom.appendChild(this.vsyncPanel.canvas), this.vsyncPanel.setOffset(56, 35)), this.setupEventListeners();
|
|
42773
42773
|
}
|
|
42774
42774
|
initializeDOM() {
|
|
42775
42775
|
this.dom.style.cssText = `
|
|
@@ -42807,7 +42807,7 @@ const _Stats = class vn {
|
|
|
42807
42807
|
});
|
|
42808
42808
|
}
|
|
42809
42809
|
initializeWebGPUPanels() {
|
|
42810
|
-
this.trackGPU && (this.gpuPanel = this.addPanel(new
|
|
42810
|
+
this.trackGPU && (this.gpuPanel = this.addPanel(new Mn.Panel("GPU", "#ff0", "#220"))), this.trackCPT && (this.gpuPanelCompute = this.addPanel(new Mn.Panel("CPT", "#e1e1e1", "#212121")));
|
|
42811
42811
|
}
|
|
42812
42812
|
initializeWebGL(e) {
|
|
42813
42813
|
if (e instanceof WebGL2RenderingContext)
|
|
@@ -42822,7 +42822,7 @@ const _Stats = class vn {
|
|
|
42822
42822
|
return !0;
|
|
42823
42823
|
}
|
|
42824
42824
|
initializeGPUTracking() {
|
|
42825
|
-
this.gl && (this.ext = this.gl.getExtension("EXT_disjoint_timer_query_webgl2"), this.ext && (this.gpuPanel = this.addPanel(new
|
|
42825
|
+
this.gl && (this.ext = this.gl.getExtension("EXT_disjoint_timer_query_webgl2"), this.ext && (this.gpuPanel = this.addPanel(new Mn.Panel("GPU", "#ff0", "#220"))));
|
|
42826
42826
|
}
|
|
42827
42827
|
begin() {
|
|
42828
42828
|
this.beginProfiling("cpu-started"), !(!this.gl || !this.ext) && (this.activeQuery && this.gl.endQuery(this.ext.TIME_ELAPSED_EXT), this.activeQuery = this.gl.createQuery(), this.activeQuery && this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT, this.activeQuery));
|
|
@@ -45992,7 +45992,7 @@ class EXRLoader extends DataTextureLoader {
|
|
|
45992
45992
|
}
|
|
45993
45993
|
return Ht;
|
|
45994
45994
|
}
|
|
45995
|
-
const yn = { value: 0 }, Cn = new DataView(e),
|
|
45995
|
+
const yn = { value: 0 }, Cn = new DataView(e), Sn = new Uint8Array(e), mn = Zn(Cn, e, yn), un = wn(mn, Cn, Sn, yn, this.type, this.outputFormat);
|
|
45996
45996
|
if (un.decode(), un.shouldExpand) {
|
|
45997
45997
|
const kt = un.byteArray;
|
|
45998
45998
|
if (this.outputFormat == RGBAFormat)
|
|
@@ -58864,7 +58864,7 @@ class Arc extends pe$1 {
|
|
|
58864
58864
|
this.update();
|
|
58865
58865
|
const o = yield this.line.instantiate(Bi(J0({}, r), {
|
|
58866
58866
|
recursive: !!this.pencil.userData.EditorEnv
|
|
58867
|
-
})), w = yield
|
|
58867
|
+
})), w = yield vn(Arc.prototype, this, "instantiate").call(this, Bi(J0({}, r), {
|
|
58868
58868
|
recursive: !1,
|
|
58869
58869
|
create: (W) => {
|
|
58870
58870
|
W.line = o, W.object3d = o.object3d, W.children.length && (W.children.forEach((E) => {
|
|
@@ -143318,7 +143318,7 @@ const objs$1 = Bi(J0({}, objs$3), {
|
|
|
143318
143318
|
}
|
|
143319
143319
|
handleSetting(r, o) {
|
|
143320
143320
|
return N0(this, null, function* () {
|
|
143321
|
-
return yield
|
|
143321
|
+
return yield vn(Vn.prototype, this, "handleSetting").call(this, r, o), r === "autoRotateSpeed" ? this.pencil.autoRotate(o) : r === "autoRotate" && (o ? this.settings.autoRotateSpeed = -20 : this.settings.autoRotateSpeed = 0), o;
|
|
143322
143322
|
});
|
|
143323
143323
|
}
|
|
143324
143324
|
show() {
|
|
@@ -144100,7 +144100,17 @@ const getLabelElement = (v) => {
|
|
|
144100
144100
|
this.mList.addMultiple("plane", e), this.options.drillDownFirstLevelUseBgMats && this.mList.copyMultiple("plane", "bgPlane"), this.initMaterialBg();
|
|
144101
144101
|
});
|
|
144102
144102
|
};
|
|
144103
|
-
},
|
|
144103
|
+
}, getAdcodeShowLevel = (v, e = !0) => {
|
|
144104
|
+
if (v === 0)
|
|
144105
|
+
return "world";
|
|
144106
|
+
if (v === 1e5)
|
|
144107
|
+
return "country";
|
|
144108
|
+
if (/^\d{6}$/.test(`${v}`)) {
|
|
144109
|
+
const { level: r, parent: o } = findAdcodeInfo(v), w = o && findAdcodeInfo(o).level;
|
|
144110
|
+
return r === "district" && w === "province" && e ? "city" : r;
|
|
144111
|
+
} else if (continentsType.find((r) => r.adcode === v))
|
|
144112
|
+
return "continent";
|
|
144113
|
+
}, xn = class xn extends Base {
|
|
144104
144114
|
constructor() {
|
|
144105
144115
|
super(...arguments);
|
|
144106
144116
|
b0(this, "leadObjs", objs);
|
|
@@ -144225,7 +144235,7 @@ const getLabelElement = (v) => {
|
|
|
144225
144235
|
}
|
|
144226
144236
|
handleSetting(r, o) {
|
|
144227
144237
|
return N0(this, null, function* () {
|
|
144228
|
-
return yield
|
|
144238
|
+
return yield vn(xn.prototype, this, "handleSetting").call(this, r, o), r === "label" ? o === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.labelLite = !1, yield this.settings.labelLite, this.options.showLabel = !0, yield this.drawLabels()) : r === "labelLite" ? o === !1 ? (this.eraseLabels(), this.options.showLabel = !1) : (this.settings.label = !1, yield this.settings.label, this.options.showLabel = "lite", yield this.drawLabels()) : r === "shadowMap" && (o === !1 ? this.shadowMapDisabled() : yield this.shadowMapEnabled()), o;
|
|
144229
144239
|
});
|
|
144230
144240
|
}
|
|
144231
144241
|
init() {
|
|
@@ -144565,7 +144575,7 @@ const getLabelElement = (v) => {
|
|
|
144565
144575
|
}
|
|
144566
144576
|
showAction() {
|
|
144567
144577
|
return N0(this, null, function* () {
|
|
144568
|
-
|
|
144578
|
+
vn(xn.prototype, this, "showAction").call(this), this.useSaveCamera(`map-${this.options.adcode}`);
|
|
144569
144579
|
const r = this.lead.group;
|
|
144570
144580
|
if (this.mapHistory[0]) {
|
|
144571
144581
|
const { stop: o, start: w } = sinusoidalInOut({
|
|
@@ -144590,7 +144600,7 @@ const getLabelElement = (v) => {
|
|
|
144590
144600
|
r.position.z = -this.mapHistory[0].depth * o;
|
|
144591
144601
|
}
|
|
144592
144602
|
}).start(), setTimeout(() => {
|
|
144593
|
-
|
|
144603
|
+
vn(xn.prototype, this, "hide").call(this);
|
|
144594
144604
|
});
|
|
144595
144605
|
});
|
|
144596
144606
|
}
|
|
@@ -144641,15 +144651,7 @@ const getLabelElement = (v) => {
|
|
|
144641
144651
|
}
|
|
144642
144652
|
getAdcodeShowLevel(r, o = !0) {
|
|
144643
144653
|
var w;
|
|
144644
|
-
|
|
144645
|
-
return "world";
|
|
144646
|
-
if (r === 1e5)
|
|
144647
|
-
return "country";
|
|
144648
|
-
if (/^\d{6}$/.test(`${r}`)) {
|
|
144649
|
-
const { level: W, parent: E } = findAdcodeInfo(r), O = E && findAdcodeInfo(E).level;
|
|
144650
|
-
return W === "district" && O === "province" && o ? "city" : W;
|
|
144651
|
-
} else if (continentsType.find((W) => W.adcode === r))
|
|
144652
|
-
return "continent";
|
|
144654
|
+
return (w = this.options.fixCity) != null && w[r] && (r = this.options.fixCity[r]), getAdcodeShowLevel(r, o);
|
|
144653
144655
|
}
|
|
144654
144656
|
handleClick(r) {
|
|
144655
144657
|
const { drillDownRestrictions: o } = this.options;
|
|
@@ -145127,8 +145129,8 @@ const getLabelElement = (v) => {
|
|
|
145127
145129
|
}), this.parentBg.length = 0, (w = this.continentsBg) == null || w.dispose(), this.continentsBg = void 0, this.mapHistory.length = 0, super.dispose();
|
|
145128
145130
|
}
|
|
145129
145131
|
};
|
|
145130
|
-
b0(
|
|
145131
|
-
let index =
|
|
145132
|
+
b0(xn, "VisName", "map"), b0(xn, "getAdcodeShowLevel", getAdcodeShowLevel);
|
|
145133
|
+
let index = xn;
|
|
145132
145134
|
const access = {
|
|
145133
145135
|
set token(v) {
|
|
145134
145136
|
accessToken.token = v;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.30.0-beta.
|
|
1
|
+
declare const _default: "0.30.0-beta.11";
|
|
2
2
|
export default _default;
|
package/dist/vis/map/index.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ export default class extends Base {
|
|
|
105
105
|
};
|
|
106
106
|
lead: Lead<typeof leadObjs>;
|
|
107
107
|
options: Required<MapCityOptions>;
|
|
108
|
+
static getAdcodeShowLevel: (adcode: number, fix?: boolean) => string | undefined;
|
|
108
109
|
mapHistory: {
|
|
109
110
|
map: PlaneMap;
|
|
110
111
|
mapInfo: NonNullable<ReturnType<typeof findAdcodeInfo>>;
|