@nywqs/scada-engine 1.1.30 → 1.1.31
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/Tank3DThree-DYRGEi5G.js +108 -0
- package/dist/draco/gltf/draco_decoder.js +33 -0
- package/dist/draco/gltf/draco_decoder.wasm +0 -0
- package/dist/draco/gltf/draco_encoder.js +33 -0
- package/dist/draco/gltf/draco_wasm_wrapper.js +116 -0
- package/dist/index-Bp0lBzVu.js +45027 -0
- package/dist/scada-engine.css +1 -1
- package/dist/scada-engine.es.js +40 -26526
- package/dist/scada-engine.umd.js +3737 -51
- package/dist/src/components/ContextMenu.d.ts +1 -1
- package/dist/src/scada-components/iot/{echarts-gauge.d.ts → echarts-gauge/index.d.ts} +1 -1
- package/dist/src/scada-components/iot/{echarts-line.d.ts → echarts-line/index.d.ts} +1 -1
- package/dist/src/scada-components/iot/index.d.ts +2 -1
- package/dist/src/scada-components/iot/{industrial-3d.d.ts → industrial-3d/index.d.ts} +5 -1
- package/dist/src/scada-components/iot/{industrial-3d-extended.d.ts → industrial-3d-extended/index.d.ts} +1 -1
- package/dist/src/scada-components/iot/{industrial-3d-fluid.d.ts → industrial-3d-fluid/index.d.ts} +1 -1
- package/dist/src/scada-components/iot/{light.d.ts → light/index.d.ts} +1 -1
- package/dist/src/scada-components/iot/switch/Switch3D.d.ts +14 -0
- package/dist/src/scada-components/iot/{switch.d.ts → switch/index.d.ts} +1 -1
- package/dist/src/scada-components/iot/tank-3d-three/Tank3DThree.d.ts +14 -0
- package/dist/src/scada-components/iot/tank-3d-three/index.d.ts +7 -0
- package/dist/src/scada-components/registry.d.ts +1 -1
- package/dist/src/utils/dracoLoader.d.ts +3 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/package.json +3 -1
- /package/dist/src/scada-components/iot/{EChartsGauge.d.ts → echarts-gauge/EChartsGauge.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{echarts-gauge-presets.d.ts → echarts-gauge/presets.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{EChartsLine.d.ts → echarts-line/EChartsLine.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{echarts-line-presets.d.ts → echarts-line/presets.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Motor3D.d.ts → industrial-3d/Motor3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Pump3D.d.ts → industrial-3d/Pump3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Light3D.d.ts → industrial-3d/PumpGLB.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Tank3D.d.ts → industrial-3d/Tank3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Valve3D.d.ts → industrial-3d/Valve3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{AlarmLight3D.d.ts → industrial-3d-extended/AlarmLight3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Conveyor3D.d.ts → industrial-3d-extended/Conveyor3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Cylinder3D.d.ts → industrial-3d-extended/Cylinder3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{TemperatureSensor3D.d.ts → industrial-3d-extended/TemperatureSensor3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Filter3D.d.ts → industrial-3d-fluid/Filter3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{HeatExchanger3D.d.ts → industrial-3d-fluid/HeatExchanger3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Pipe3D.d.ts → industrial-3d-fluid/Pipe3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Tee3D.d.ts → industrial-3d-fluid/Tee3D.d.ts} +0 -0
- /package/dist/src/scada-components/iot/{Switch3D.d.ts → light/Light3D.d.ts} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { defineComponent as U, ref as i, onMounted as V, onUnmounted as H, watch as y, openBlock as K, createElementBlock as O, normalizeStyle as Q, createElementVNode as x, toDisplayString as T } from "vue";
|
|
2
|
+
import { S as X, C as Y, P as Z, W as j, a as _, M as g, D as ee, b as v, A as te, c as E, _ as ae } from "./index-Bp0lBzVu.js";
|
|
3
|
+
/*!
|
|
4
|
+
* @nywqs/scada-engine v1.1.31
|
|
5
|
+
* Copyright (c) 2025 leoncheng
|
|
6
|
+
* Licensed under proprietary license - see LICENSE file
|
|
7
|
+
* Contact: nywqs@outlook.com
|
|
8
|
+
*/
|
|
9
|
+
const ne = { class: "tank-info" }, oe = { class: "tank-level" }, ie = { class: "tank-capacity" }, se = 0.05, le = /* @__PURE__ */ U({
|
|
10
|
+
__name: "Tank3DThree",
|
|
11
|
+
props: {
|
|
12
|
+
node: {}
|
|
13
|
+
},
|
|
14
|
+
setup(F) {
|
|
15
|
+
const a = F, S = () => a.node ? a.node.getData ? a.node.getData() : a.node.data || {} : {};
|
|
16
|
+
i(S());
|
|
17
|
+
const s = i(200), l = i(200), p = i(50), q = i(1e3), k = i("#3b82f6"), M = i("#64748b"), A = () => {
|
|
18
|
+
var c, m, f, w;
|
|
19
|
+
const e = S();
|
|
20
|
+
s.value = ((m = (c = a.node) == null ? void 0 : c.size) == null ? void 0 : m.width) || 200, l.value = ((w = (f = a.node) == null ? void 0 : f.size) == null ? void 0 : w.height) || 200, p.value = e.level ?? 50, q.value = e.capacity ?? 1e3, k.value = e.liquidColor || "#3b82f6", M.value = e.tankColor || "#64748b";
|
|
21
|
+
}, D = i();
|
|
22
|
+
let t, r, n, d, o, b, u = p.value, h = p.value;
|
|
23
|
+
V(() => {
|
|
24
|
+
A(), B(), G(), a.node && typeof a.node.on == "function" && a.node.on("change:data", () => {
|
|
25
|
+
A();
|
|
26
|
+
});
|
|
27
|
+
}), H(() => {
|
|
28
|
+
I();
|
|
29
|
+
});
|
|
30
|
+
const B = () => {
|
|
31
|
+
if (!D.value) return;
|
|
32
|
+
t = new X(), t.background = new Y(988970), r = new Z(
|
|
33
|
+
45,
|
|
34
|
+
s.value / l.value,
|
|
35
|
+
0.1,
|
|
36
|
+
1e3
|
|
37
|
+
), r.position.set(3, 3, 5), r.lookAt(0, 0, 0), n = new j({
|
|
38
|
+
antialias: !0,
|
|
39
|
+
alpha: !0
|
|
40
|
+
}), n.setSize(s.value, l.value), n.setPixelRatio(window.devicePixelRatio), D.value.appendChild(n.domElement);
|
|
41
|
+
const e = new _(1, 1, 3, 32), c = new g({
|
|
42
|
+
color: M.value,
|
|
43
|
+
transparent: !0,
|
|
44
|
+
opacity: 0.3,
|
|
45
|
+
side: ee,
|
|
46
|
+
shininess: 100
|
|
47
|
+
});
|
|
48
|
+
d = new v(e, c), t.add(d);
|
|
49
|
+
const m = new _(0.95, 0.95, 3, 32), f = new g({
|
|
50
|
+
color: k.value,
|
|
51
|
+
transparent: !0,
|
|
52
|
+
opacity: 0.8,
|
|
53
|
+
shininess: 80
|
|
54
|
+
});
|
|
55
|
+
o = new v(m, f), C(), t.add(o);
|
|
56
|
+
const w = new _(1.2, 1.2, 0.2, 32), W = new g({
|
|
57
|
+
color: 4674921,
|
|
58
|
+
shininess: 50
|
|
59
|
+
}), P = new v(w, W);
|
|
60
|
+
P.position.y = -1.6, t.add(P);
|
|
61
|
+
const $ = new _(1.1, 1.1, 0.2, 32), J = new g({
|
|
62
|
+
color: 4674921,
|
|
63
|
+
shininess: 50
|
|
64
|
+
}), z = new v($, J);
|
|
65
|
+
z.position.y = 1.6, t.add(z);
|
|
66
|
+
const N = new te(16777215, 0.6);
|
|
67
|
+
t.add(N);
|
|
68
|
+
const L = new E(16777215, 0.8);
|
|
69
|
+
L.position.set(5, 10, 5), L.castShadow = !0, t.add(L);
|
|
70
|
+
const R = new E(16777215, 0.3);
|
|
71
|
+
R.position.set(-5, 5, -5), t.add(R);
|
|
72
|
+
}, C = () => {
|
|
73
|
+
if (!o) return;
|
|
74
|
+
const e = Math.max(0.01, u / 100);
|
|
75
|
+
o.scale.y = e, o.position.y = -1.5 + e * 1.5;
|
|
76
|
+
}, G = () => {
|
|
77
|
+
b = requestAnimationFrame(G), Math.abs(u - h) > 0.1 ? (u += (h - u) * se, C()) : u !== h && (u = h, C()), d && (d.rotation.y += 5e-3), o && (o.rotation.y += 5e-3), n.render(t, r);
|
|
78
|
+
};
|
|
79
|
+
y(() => p.value, (e) => {
|
|
80
|
+
h = e;
|
|
81
|
+
}), y(() => k.value, (e) => {
|
|
82
|
+
o && o.material.color.set(e);
|
|
83
|
+
}), y(() => M.value, (e) => {
|
|
84
|
+
d && d.material.color.set(e);
|
|
85
|
+
}), y([() => s.value, () => l.value], () => {
|
|
86
|
+
n && r && (n.setSize(s.value, l.value), r.aspect = s.value / l.value, r.updateProjectionMatrix());
|
|
87
|
+
});
|
|
88
|
+
const I = () => {
|
|
89
|
+
b && cancelAnimationFrame(b), n && n.dispose(), t && (t.traverse((e) => {
|
|
90
|
+
e instanceof v && (e.geometry.dispose(), Array.isArray(e.material) ? e.material.forEach((c) => c.dispose()) : e.material.dispose());
|
|
91
|
+
}), t.clear());
|
|
92
|
+
};
|
|
93
|
+
return (e, c) => (K(), O("div", {
|
|
94
|
+
ref_key: "containerRef",
|
|
95
|
+
ref: D,
|
|
96
|
+
class: "tank-3d-three-container",
|
|
97
|
+
style: Q({ width: `${s.value}px`, height: `${l.value}px` })
|
|
98
|
+
}, [
|
|
99
|
+
x("div", ne, [
|
|
100
|
+
x("span", oe, T(p.value.toFixed(1)) + "%", 1),
|
|
101
|
+
x("span", ie, T(q.value) + "L", 1)
|
|
102
|
+
])
|
|
103
|
+
], 4));
|
|
104
|
+
}
|
|
105
|
+
}), de = /* @__PURE__ */ ae(le, [["__scopeId", "data-v-d8774ba3"]]);
|
|
106
|
+
export {
|
|
107
|
+
de as default
|
|
108
|
+
};
|