@shjjs/visual-ui 3.0.7 → 3.0.9
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/es/commons/plugins/datasource/index.mjs +53 -52
- package/es/commons/plugins/datasource/utils/utils.mjs +5 -5
- package/es/components/Commons/components/CustomComponentRender/index.vue.mjs +2 -2
- package/es/components/Commons/components/CustomComponentRender/index.vue2.mjs +8 -6
- package/es/components/Commons/components/ModelViewer/index.vue.mjs +81 -71
- package/es/components/Scene/components/Amap2d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Amap2d/index.vue2.mjs +140 -136
- package/es/components/Scene/components/Amap3d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Amap3d/index.vue2.mjs +221 -213
- package/es/components/Scene/components/Map3d/index.vue.mjs +2 -2
- package/es/components/Scene/components/Map3d/utils/map.mjs +23 -21
- package/es/components/Scene/components/Vr/index.vue.mjs +1 -1
- package/es/components/Scene/components/Vr/index.vue2.mjs +326 -249
- package/es/packages/commons/plugins/datasource/utils/utils.d.ts +1 -1
- package/es/packages/components/Commons/components/ModelViewer/index.vue.d.ts +2 -1
- package/es/packages/components/Scene/components/Amap2d/index.vue.d.ts +2 -0
- package/es/packages/components/Scene/components/Vr/index.vue.d.ts +2 -1
- package/es/widgets.css +1 -1
- package/package.json +76 -76
- package/umd/index.js +1272 -1269
- package/umd/widgets.css +1 -1
|
@@ -2,7 +2,7 @@ import o from "./index.vue2.mjs";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const
|
|
5
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c98e3112"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var W = Object.defineProperty;
|
|
2
|
-
var U = (A,
|
|
3
|
-
var l = (A,
|
|
4
|
-
import { BufferGeometry as
|
|
2
|
+
var U = (A, w, e) => w in A ? W(A, w, { enumerable: !0, configurable: !0, writable: !0, value: e }) : A[w] = e;
|
|
3
|
+
var l = (A, w, e) => U(A, typeof w != "symbol" ? w + "" : w, e);
|
|
4
|
+
import { BufferGeometry as Q, Mesh as S, Sprite as X, Color as M, AxesHelper as Y, Raycaster as q, Vector2 as H, Group as L, PlaneGeometry as z, TextureLoader as R, sRGBEncoding as _, MeshBasicMaterial as v, DoubleSide as C, RepeatWrapping as k, AdditiveBlending as T, Vector3 as F, MeshStandardMaterial as O, BoxGeometry as V, NearestFilter as J, Shape as Z, ShapeGeometry as K, LineBasicMaterial as ee, Box3Helper as te } from "three";
|
|
5
5
|
import { computeBoundsTree as ae, disposeBoundsTree as ie, acceleratedRaycast as $ } from "three-mesh-bvh";
|
|
6
6
|
import { pinyin as se } from "pinyin-pro";
|
|
7
7
|
import { Mini3d as re } from "./mini3d/core/index.mjs";
|
|
@@ -17,18 +17,18 @@ import { PathLine as he } from "./mini3d/components/PathLine.mjs";
|
|
|
17
17
|
import { Assets as pe } from "./map/assets.mjs";
|
|
18
18
|
import { ExtrudeMap as ue } from "./map/extrudeMap.mjs";
|
|
19
19
|
import m from "gsap";
|
|
20
|
-
import { isEmpty as
|
|
20
|
+
import { isEmpty as E, isArray as j, isNumber as de, cloneDeep as me } from "lodash";
|
|
21
21
|
import { createFloorGaoGuang as fe } from "./module/FloorGaoGuang.mjs";
|
|
22
22
|
import { createFloorRotateBorder as be } from "./module/FloorRotateBorder.mjs";
|
|
23
23
|
import { createFloorGridRipple as ye } from "./module/FloorGridRipple.mjs";
|
|
24
24
|
import { createMirror as ge } from "./module/MapMirror.mjs";
|
|
25
25
|
import { createTimeLine as Me } from "./module/Timeline.mjs";
|
|
26
26
|
import { createParticles as Le } from "./module/Particles.mjs";
|
|
27
|
-
import { getMapDataByAdcode as Ge, getMapDataByUrl as xe, getTextureResource as I, getMapDataByAdcode2 as
|
|
27
|
+
import { getMapDataByAdcode as Ge, getMapDataByUrl as xe, getTextureResource as I, getMapDataByAdcode2 as Be, setScaleArea as we, calcUv2 as ve } from "./map/utils.mjs";
|
|
28
28
|
import { createEnvironment as Se } from "./module/Environment.mjs";
|
|
29
29
|
import { Utils as D } from "../../../../../commons/utils/utils.mjs";
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
Q.prototype.computeBoundsTree = ae;
|
|
31
|
+
Q.prototype.disposeBoundsTree = ie;
|
|
32
32
|
S.prototype.raycast = $;
|
|
33
33
|
X.prototype.raycast = $;
|
|
34
34
|
class et extends re {
|
|
@@ -196,7 +196,7 @@ class et extends re {
|
|
|
196
196
|
lineMaterial: this.provinceLineMaterial,
|
|
197
197
|
renderOrder: 9
|
|
198
198
|
});
|
|
199
|
-
this.option.scene.defaultMapAdcode !== 1e5 &&
|
|
199
|
+
this.option.scene.defaultMapAdcode !== 1e5 && we(this, s), this.areaData = s.coordinates, this.time.on("tick", () => {
|
|
200
200
|
i.map && (i.map.offset.y += 2e-3);
|
|
201
201
|
});
|
|
202
202
|
const o = N(s.mapGroup);
|
|
@@ -236,11 +236,11 @@ class et extends re {
|
|
|
236
236
|
e.texture,
|
|
237
237
|
"texture"
|
|
238
238
|
);
|
|
239
|
-
if (
|
|
239
|
+
if (E(s))
|
|
240
240
|
a(!0);
|
|
241
241
|
else {
|
|
242
242
|
let o = s.texture;
|
|
243
|
-
o.wrapS = o.wrapT = k, o.repeat.set(1, 1), this.pathLineTexture = o,
|
|
243
|
+
o.wrapS = o.wrapT = k, o.repeat.set(1, 1), this.pathLineTexture = o, Be(
|
|
244
244
|
this.option.scene.defaultMapAdcode,
|
|
245
245
|
(h) => {
|
|
246
246
|
try {
|
|
@@ -404,7 +404,7 @@ class et extends re {
|
|
|
404
404
|
transparent: !0,
|
|
405
405
|
opacity: e.opacity
|
|
406
406
|
}), s = I(this, "sideMap", t.map, "map");
|
|
407
|
-
|
|
407
|
+
E(s) || (s.map.repeat.set(1, 0.2), s.map.offset.y += 0.01);
|
|
408
408
|
let o = new O({
|
|
409
409
|
...s,
|
|
410
410
|
color: new M(t.color || "#061e47"),
|
|
@@ -487,23 +487,23 @@ class et extends re {
|
|
|
487
487
|
d.translate(0, 0, p / 2);
|
|
488
488
|
const g = new S(d, u);
|
|
489
489
|
g.renderOrder = 22, g.geometry.computeBoundsTree();
|
|
490
|
-
let b = g, [x,
|
|
491
|
-
b.position.set(x, -
|
|
490
|
+
let b = g, [x, B] = this.geoProjection(n.coords);
|
|
491
|
+
b.position.set(x, -B, (this.depth + 0.46) / this.scale), r ? b.scale.set(1 / this.scale, 1 / this.scale, 0) : b.scale.set(
|
|
492
492
|
1 / this.scale,
|
|
493
493
|
1 / this.scale,
|
|
494
494
|
1 / this.scale
|
|
495
495
|
), b.userData.name = n.name, b.userData.adcode = n.adcode, b.userData.value = n.value, b.userData.position = [
|
|
496
496
|
x,
|
|
497
|
-
-
|
|
497
|
+
-B,
|
|
498
498
|
(this.depth + 0.46) / this.scale
|
|
499
499
|
];
|
|
500
500
|
let G = this.createBarGuangQuan(
|
|
501
501
|
e.bottom,
|
|
502
502
|
r
|
|
503
503
|
);
|
|
504
|
-
if (G.position.set(x, -
|
|
504
|
+
if (G.position.set(x, -B, (this.depth + 0.46) / this.scale), G.userData.name = n.name, G.userData.adcode = n.adcode, G.userData.position = [
|
|
505
505
|
x,
|
|
506
|
-
-
|
|
506
|
+
-B,
|
|
507
507
|
(this.depth + 0.46) / this.scale
|
|
508
508
|
], G.name = "bar-" + e.id, this.barGuangQuanGroup.add(G), e.huiguang.show && p > 0) {
|
|
509
509
|
let f = this.createBarHUIGUANG(p, e.huiguang);
|
|
@@ -513,7 +513,7 @@ class et extends re {
|
|
|
513
513
|
let y = i(
|
|
514
514
|
n,
|
|
515
515
|
c,
|
|
516
|
-
new F(x, -
|
|
516
|
+
new F(x, -B, (this.depth + 0.9 + p) / this.scale)
|
|
517
517
|
);
|
|
518
518
|
this.allBar.push(b), this.allBarMaterial.push(u), this.allBarGuangquan.push(G), this.allBarLabel.push(y);
|
|
519
519
|
}
|
|
@@ -746,7 +746,9 @@ class et extends re {
|
|
|
746
746
|
<img src="${e.map}" style="width:${e.width}px; height:${e.height}px;" >
|
|
747
747
|
</div>`,
|
|
748
748
|
h
|
|
749
|
-
), this.label3d.setLabelStyle(c, 0.08 / this.scale, "x"), e.rotation && (c.rotation.x = e.rotation[0] * (Math.PI / 180), c.rotation.y = e.rotation[1] * (Math.PI / 180), c.rotation.z = e.rotation[2] * (Math.PI / 180)), c.name = "scatter-" + e.id, c.setParent(this.scatterLabelGroup), c.userData.adcode = s.adcode, c.userData.scale = s, c.userData.name = s.name, c.userData.labelShow = e.label.show, c.userData.value = s.value, c.userData.position = [h.x, h.y, h.z], c
|
|
749
|
+
), this.label3d.setLabelStyle(c, 0.08 / this.scale, "x", "auto"), e.rotation && (c.rotation.x = e.rotation[0] * (Math.PI / 180), c.rotation.y = e.rotation[1] * (Math.PI / 180), c.rotation.z = e.rotation[2] * (Math.PI / 180)), c.name = "scatter-" + e.id, c.setParent(this.scatterLabelGroup), c.userData.adcode = s.adcode, c.userData.scale = s, c.userData.name = s.name, c.userData.labelShow = e.label.show, c.userData.value = s.value, c.userData.position = [h.x, h.y, h.z], c.element.style.cursor = "pointer", c.element.addEventListener("click", () => {
|
|
750
|
+
this.onCallBack.onClickScatter(c.userData);
|
|
751
|
+
}), c;
|
|
750
752
|
};
|
|
751
753
|
t.map((s, o) => {
|
|
752
754
|
let [h, n] = this.geoProjection([s.lng, s.lat]), c = i(
|
|
@@ -930,12 +932,12 @@ class et extends re {
|
|
|
930
932
|
const [f, P] = this.geoProjection(g[y]);
|
|
931
933
|
y === 0 && x.moveTo(f, -P), x.lineTo(f, -P);
|
|
932
934
|
}
|
|
933
|
-
const
|
|
935
|
+
const B = t.find((y) => y.name === h);
|
|
934
936
|
let G = e.defaultColor;
|
|
935
|
-
if (
|
|
937
|
+
if (B)
|
|
936
938
|
for (let y = 0; y < e.rules.length; y++) {
|
|
937
939
|
const f = e.rules[y];
|
|
938
|
-
|
|
940
|
+
B.value >= f.min && B.value <= f.max && (G = f.color || e.defaultColor);
|
|
939
941
|
}
|
|
940
942
|
try {
|
|
941
943
|
const y = new K(me(x)), f = new S(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5d09e9c5"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|