vis-core 0.30.0-beta.26 → 0.30.0-beta.27

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.
@@ -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.25", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
66
+ const version = "0.30.0-beta.27", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
67
67
  token: void 0,
68
68
  getInfo() {
69
69
  if (!this.token)
@@ -32827,7 +32827,7 @@ class WebGLRenderer {
32827
32827
  }
32828
32828
  function Nn(i0, u0, S0, g0) {
32829
32829
  const { opaque: f0, transmissive: N0, transparent: F0 } = i0;
32830
- It.setupLightsView(S0), vi === !0 && zi.setGlobalState(Kt.clippingPlanes, S0), g0 && I0.viewport($t.copy(g0)), f0.length > 0 && Ln(f0, u0, S0), N0.length > 0 && Ln(N0, u0, S0), F0.length > 0 && Ln(F0, u0, S0), I0.buffers.depth.setTest(!0), I0.buffers.depth.setMask(!0), I0.buffers.color.setMask(!0), I0.setPolygonOffset(!1);
32830
+ It.setupLightsView(S0), vi === !0 && zi.setGlobalState(Kt.clippingPlanes, S0), g0 && I0.viewport($t.copy(g0)), f0.length > 0 && Tn(f0, u0, S0), N0.length > 0 && Tn(N0, u0, S0), F0.length > 0 && Tn(F0, u0, S0), I0.buffers.depth.setTest(!0), I0.buffers.depth.setMask(!0), I0.buffers.color.setMask(!0), I0.setPolygonOffset(!1);
32831
32831
  }
32832
32832
  function zn(i0, u0, S0, g0) {
32833
32833
  if ((S0.isScene === !0 ? S0.overrideMaterial : null) !== null)
@@ -32852,7 +32852,7 @@ class WebGLRenderer {
32852
32852
  const yi = Kt.toneMapping;
32853
32853
  Kt.toneMapping = NoToneMapping;
32854
32854
  const Mi = g0.viewport;
32855
- if (g0.viewport !== void 0 && (g0.viewport = void 0), It.setupLightsView(g0), vi === !0 && zi.setGlobalState(Kt.clippingPlanes, g0), Ln(i0, S0, g0), M0.updateMultisampleRenderTarget(N0), M0.updateRenderTargetMipmap(N0), E0.has("WEBGL_multisampled_render_to_texture") === !1) {
32855
+ if (g0.viewport !== void 0 && (g0.viewport = void 0), It.setupLightsView(g0), vi === !0 && zi.setGlobalState(Kt.clippingPlanes, g0), Tn(i0, S0, g0), M0.updateMultisampleRenderTarget(N0), M0.updateRenderTargetMipmap(N0), E0.has("WEBGL_multisampled_render_to_texture") === !1) {
32856
32856
  let Ki = !1;
32857
32857
  for (let Ji = 0, an = u0.length; Ji < an; Ji++) {
32858
32858
  const ji = u0[Ji], { object: ki, geometry: Fi, material: Qi, group: Di } = ji;
@@ -32865,7 +32865,7 @@ class WebGLRenderer {
32865
32865
  }
32866
32866
  Kt.setRenderTarget(H0, q0, D0), Kt.setClearColor(o0, b0), Mi !== void 0 && (g0.viewport = Mi), Kt.toneMapping = yi;
32867
32867
  }
32868
- function Ln(i0, u0, S0) {
32868
+ function Tn(i0, u0, S0) {
32869
32869
  const g0 = u0.isScene === !0 ? u0.overrideMaterial : null;
32870
32870
  for (let f0 = 0, N0 = i0.length; f0 < N0; f0++) {
32871
32871
  const F0 = i0[f0], { object: H0, geometry: q0, group: D0 } = F0;
@@ -32936,8 +32936,8 @@ class WebGLRenderer {
32936
32936
  if ((yn.position !== void 0 || yn.normal !== void 0 || yn.color !== void 0) && Bi.update(f0, S0, $i), (dn || Fi.receiveShadow !== f0.receiveShadow) && (Fi.receiveShadow = f0.receiveShadow, on.setValue(d0, "receiveShadow", f0.receiveShadow)), g0.isMeshGouraudMaterial && g0.envMap !== null && (un.envMap.value = q0, un.flipEnvMap.value = q0.isCubeTexture && q0.isRenderTargetTexture === !1 ? -1 : 1), g0.isMeshStandardMaterial && g0.envMap === null && u0.environment !== null && (un.envMapIntensity.value = u0.environmentIntensity), un.dfgLUT !== void 0 && (un.dfgLUT.value = getDFGLUT()), dn && (on.setValue(d0, "toneMappingExposure", Kt.toneMappingExposure), Fi.needsLights && h0(un, Sn), N0 && g0.fog === !0 && Oi.refreshFogUniforms(un, N0), Oi.refreshMaterialUniforms(un, g0, Q0, P0, It.state.transmissionRenderTarget[i0.id]), WebGLUniforms.upload(d0, vn(Fi), un, M0)), g0.isShaderMaterial && g0.uniformsNeedUpdate === !0 && (WebGLUniforms.upload(d0, vn(Fi), un, M0), g0.uniformsNeedUpdate = !1), g0.isSpriteMaterial && on.setValue(d0, "center", f0.center), on.setValue(d0, "modelViewMatrix", f0.modelViewMatrix), on.setValue(d0, "normalMatrix", f0.normalMatrix), on.setValue(d0, "modelMatrix", f0.matrixWorld), g0.isShaderMaterial || g0.isRawShaderMaterial) {
32937
32937
  const mn = g0.uniformsGroups;
32938
32938
  for (let fn = 0, kn = mn.length; fn < kn; fn++) {
32939
- const Tn = mn[fn];
32940
- Ri.update(Tn, $i), Ri.bind(Tn, $i);
32939
+ const Cn = mn[fn];
32940
+ Ri.update(Cn, $i), Ri.bind(Cn, $i);
32941
32941
  }
32942
32942
  }
32943
32943
  return $i;
@@ -33073,8 +33073,8 @@ class WebGLRenderer {
33073
33073
  if (i0.isDepthTexture) {
33074
33074
  const yn = r0.get(i0), mn = r0.get(u0), fn = r0.get(yn.__renderTarget), kn = r0.get(mn.__renderTarget);
33075
33075
  I0.bindFramebuffer(d0.READ_FRAMEBUFFER, fn.__webglFramebuffer), I0.bindFramebuffer(d0.DRAW_FRAMEBUFFER, kn.__webglFramebuffer);
33076
- for (let Tn = 0; Tn < q0; Tn++)
33077
- on && (d0.framebufferTextureLayer(d0.READ_FRAMEBUFFER, d0.COLOR_ATTACHMENT0, r0.get(i0).__webglTexture, f0, Mi + Tn), d0.framebufferTextureLayer(d0.DRAW_FRAMEBUFFER, d0.COLOR_ATTACHMENT0, r0.get(u0).__webglTexture, N0, an + Tn)), d0.blitFramebuffer(D0, yi, F0, H0, Ki, Ji, F0, H0, d0.DEPTH_BUFFER_BIT, d0.NEAREST);
33076
+ for (let Cn = 0; Cn < q0; Cn++)
33077
+ on && (d0.framebufferTextureLayer(d0.READ_FRAMEBUFFER, d0.COLOR_ATTACHMENT0, r0.get(i0).__webglTexture, f0, Mi + Cn), d0.framebufferTextureLayer(d0.DRAW_FRAMEBUFFER, d0.COLOR_ATTACHMENT0, r0.get(u0).__webglTexture, N0, an + Cn)), d0.blitFramebuffer(D0, yi, F0, H0, Ki, Ji, F0, H0, d0.DEPTH_BUFFER_BIT, d0.NEAREST);
33078
33078
  I0.bindFramebuffer(d0.READ_FRAMEBUFFER, null), I0.bindFramebuffer(d0.DRAW_FRAMEBUFFER, null);
33079
33079
  } else if (f0 !== 0 || i0.isRenderTargetTexture || r0.has(i0)) {
33080
33080
  const yn = r0.get(i0), mn = r0.get(u0);
@@ -46012,7 +46012,7 @@ class EXRLoader extends DataTextureLoader {
46012
46012
  }
46013
46013
  return i0;
46014
46014
  }
46015
- const Ln = { value: 0 }, Wn = new DataView(e), Xn = new Uint8Array(e), vn = Nn(Wn, e, Ln), xn = zn(vn, Wn, Xn, Ln, this.type, this.outputFormat);
46015
+ const Tn = { value: 0 }, Wn = new DataView(e), Xn = new Uint8Array(e), vn = Nn(Wn, e, Tn), xn = zn(vn, Wn, Xn, Tn, this.type, this.outputFormat);
46016
46016
  if (xn.decode(), xn.shouldExpand) {
46017
46017
  const t0 = xn.byteArray;
46018
46018
  if (this.outputFormat == RGBAFormat)
@@ -138263,7 +138263,16 @@ const continentsBbox = continentsBboxObj, continentsM49 = {
138263
138263
  parent: 0,
138264
138264
  c: [],
138265
138265
  b: [...worldExclATABbox]
138266
- } : /^\d{6}$/.test(`${v}`) ? adcodeAll[v] : continentsType.find((e) => e.adcode === v);
138266
+ } : /^\d{6}$/.test(`${v}`) ? adcodeAll[v] : continentsType.find((e) => e.adcode === v), findNameInfo = (v) => {
138267
+ if (v === "世界")
138268
+ return findAdcodeInfo(0);
138269
+ {
138270
+ const e = Object.values(adcodeAll).find(
138271
+ (r) => r.name === v
138272
+ );
138273
+ return e || continentsType.find((r) => r.name === v);
138274
+ }
138275
+ };
138267
138276
  function applyFixes(v, e) {
138268
138277
  const r = [
138269
138278
  {
@@ -144125,7 +144134,7 @@ const getLabelElement = (v) => {
144125
144134
  return r === "district" && V === "province" && e ? "city" : r;
144126
144135
  } else if (continentsType.find((r) => r.adcode === v))
144127
144136
  return "continent";
144128
- }, Cn = class Cn extends Base {
144137
+ }, Ln = class Ln extends Base {
144129
144138
  constructor() {
144130
144139
  super(...arguments);
144131
144140
  T0(this, "leadObjs", objs);
@@ -144250,7 +144259,7 @@ const getLabelElement = (v) => {
144250
144259
  }
144251
144260
  handleSetting(r, o) {
144252
144261
  return B0(this, null, function* () {
144253
- return yield _n(Cn.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;
144262
+ return yield _n(Ln.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;
144254
144263
  });
144255
144264
  }
144256
144265
  init() {
@@ -144590,7 +144599,7 @@ const getLabelElement = (v) => {
144590
144599
  }
144591
144600
  showAction() {
144592
144601
  return B0(this, null, function* () {
144593
- _n(Cn.prototype, this, "showAction").call(this), this.useSaveCamera(`map-${this.options.adcode}`);
144602
+ _n(Ln.prototype, this, "showAction").call(this), this.useSaveCamera(`map-${this.options.adcode}`);
144594
144603
  const r = this.lead.group;
144595
144604
  if (this.mapHistory[0]) {
144596
144605
  const { stop: o, start: V } = sinusoidalInOut({
@@ -144615,7 +144624,7 @@ const getLabelElement = (v) => {
144615
144624
  r.position.z = -this.mapHistory[0].depth * o;
144616
144625
  }
144617
144626
  }).start(), setTimeout(() => {
144618
- _n(Cn.prototype, this, "hide").call(this);
144627
+ _n(Ln.prototype, this, "hide").call(this);
144619
144628
  });
144620
144629
  });
144621
144630
  }
@@ -145169,8 +145178,8 @@ const getLabelElement = (v) => {
145169
145178
  }), this.parentBg.length = 0, (V = this.continentsBg) == null || V.dispose(), this.continentsBg = void 0, this.mapHistory.length = 0, super.dispose();
145170
145179
  }
145171
145180
  };
145172
- T0(Cn, "VisName", "map"), T0(Cn, "getAdcodeShowLevel", getAdcodeShowLevel);
145173
- let index = Cn;
145181
+ T0(Ln, "VisName", "map"), T0(Ln, "getAdcodeShowLevel", getAdcodeShowLevel), T0(Ln, "findAdcodeInfo", findAdcodeInfo), T0(Ln, "findNameInfo", findNameInfo);
145182
+ let index = Ln;
145174
145183
  const access = {
145175
145184
  set token(v) {
145176
145185
  accessToken.token = v;
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.30.0-beta.25";
1
+ declare const _default: "0.30.0-beta.27";
2
2
  export default _default;
@@ -8,3 +8,13 @@ export declare const findAdcodeInfo: (adcode: number) => {
8
8
  c: number[];
9
9
  b: number[];
10
10
  } | undefined;
11
+ export declare const findNameInfo: (name: string) => {
12
+ adcode: number;
13
+ lng: number;
14
+ lat: number;
15
+ name: string;
16
+ level: string;
17
+ parent: number;
18
+ c: number[];
19
+ b: number[];
20
+ } | undefined;
@@ -106,6 +106,26 @@ export default class extends Base {
106
106
  lead: Lead<typeof leadObjs>;
107
107
  options: Required<MapCityOptions>;
108
108
  static getAdcodeShowLevel: (adcode: number, fix?: boolean) => string | undefined;
109
+ static findAdcodeInfo: (adcode: number) => {
110
+ adcode: number;
111
+ lng: number;
112
+ lat: number;
113
+ name: string;
114
+ level: string;
115
+ parent: number;
116
+ c: number[];
117
+ b: number[];
118
+ } | undefined;
119
+ static findNameInfo: (name: string) => {
120
+ adcode: number;
121
+ lng: number;
122
+ lat: number;
123
+ name: string;
124
+ level: string;
125
+ parent: number;
126
+ c: number[];
127
+ b: number[];
128
+ } | undefined;
109
129
  mapHistory: {
110
130
  map: PlaneMap;
111
131
  mapInfo: NonNullable<ReturnType<typeof findAdcodeInfo>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.30.0-beta.26",
3
+ "version": "0.30.0-beta.27",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && PUBLIC_EXCLUDE=true bundler",