@nywqs/scada-engine 1.1.31 → 2.0.0
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/LICENSE +21 -21
- package/README.md +359 -193
- package/dist/index.d.ts +3 -0
- package/dist/scada-engine.css +1 -1
- package/dist/scada-engine.es.js +47937 -40
- package/dist/scada-engine.umd.js +3752 -3843
- package/dist/src/components/canvas/composables/index.d.ts +12 -0
- package/dist/src/components/canvas/composables/useAutoSave.d.ts +9 -0
- package/dist/src/components/canvas/composables/useCanvasScale.d.ts +12 -0
- package/dist/src/components/canvas/composables/useDataSource.d.ts +87 -0
- package/dist/src/components/canvas/composables/useFileOperations.d.ts +37 -0
- package/dist/src/components/canvas/composables/useGraphEvents.d.ts +22 -0
- package/dist/src/components/canvas/composables/useNodeOperations.d.ts +35 -0
- package/dist/src/components/canvas/config/graphConfig.d.ts +64 -0
- package/dist/src/components/canvas/config/pluginConfig.d.ts +5 -0
- package/dist/src/components/canvas/config/scadaEdgeShape.d.ts +14 -0
- package/dist/src/components/canvas/config/scadaEdgeView.d.ts +4 -0
- package/dist/src/components/canvas/types/canvas.d.ts +41 -0
- package/dist/src/components/configurators/BindingCard.d.ts +24 -0
- package/dist/src/components/configurators/ComponentPointSelector.d.ts +16 -0
- package/dist/src/components/{EventCard.d.ts → configurators/EventCard.d.ts} +13 -26
- package/dist/src/components/configurators/MappingConfigurator.d.ts +15 -0
- package/dist/src/components/dialogs/AttributeConfigDialog.d.ts +28 -0
- package/dist/src/components/dialogs/CustomCodeDialog.d.ts +20 -0
- package/dist/src/components/dialogs/DataSourceDialog.d.ts +16 -0
- package/dist/src/components/dialogs/ScadaModal.d.ts +37 -0
- package/dist/src/components/{WorkflowSelectorDialog.d.ts → dialogs/WorkflowSelectorDialog.d.ts} +3 -3
- package/dist/src/components/layout/Footer.d.ts +16 -0
- package/dist/src/components/layout/Header.d.ts +56 -0
- package/dist/src/components/panels/CanvasConfigPanel.d.ts +4 -0
- package/dist/src/components/panels/ComponentLibrary.d.ts +6 -0
- package/dist/src/components/panels/ContextMenu.d.ts +26 -0
- package/dist/src/components/panels/PropertyPanel.d.ts +22 -0
- package/dist/src/components/property-tabs/BasicPropertiesTab.d.ts +37 -0
- package/dist/src/components/property-tabs/DataPropertiesTab.d.ts +14 -0
- package/dist/src/components/property-tabs/EdgePropertiesTab.d.ts +16 -0
- package/dist/src/constants/animation.d.ts +5 -0
- package/dist/src/constants/index.d.ts +3 -0
- package/dist/src/constants/layout.d.ts +16 -0
- package/dist/src/constants/theme.d.ts +17 -0
- package/dist/src/index.d.ts +16 -15
- package/dist/src/main.d.ts +0 -1
- package/dist/src/scada-components/basic/circle.d.ts +0 -1
- package/dist/src/scada-components/basic/rect.d.ts +0 -1
- package/dist/src/scada-components/basic/text.d.ts +0 -1
- package/dist/src/scada-components/canvas/config.d.ts +0 -1
- package/dist/src/scada-components/canvas/manager.d.ts +0 -1
- package/dist/src/scada-components/iot/echarts-gauge/EChartsGauge.d.ts +3 -10
- package/dist/src/scada-components/iot/echarts-gauge/index.d.ts +0 -1
- package/dist/src/scada-components/iot/echarts-line/EChartsLine.d.ts +3 -10
- package/dist/src/scada-components/iot/echarts-line/index.d.ts +0 -1
- package/dist/src/scada-components/iot/index.d.ts +0 -6
- package/dist/src/scada-components/registry.d.ts +0 -1
- package/dist/src/scada-components/svg/core/index.d.ts +7 -0
- package/dist/src/scada-components/svg/core/loader.d.ts +71 -0
- package/dist/src/scada-components/svg/core/parser.d.ts +40 -0
- package/dist/src/scada-components/svg/core/types.d.ts +297 -0
- package/dist/src/scada-components/svg/helpers/demo.d.ts +20 -0
- package/dist/src/scada-components/svg/helpers/index.d.ts +5 -0
- package/dist/src/scada-components/svg/helpers/utils.d.ts +24 -0
- package/dist/src/scada-components/svg/index.d.ts +9 -0
- package/dist/src/scada-components/svg/rendering/SVGRenderer.d.ts +14 -0
- package/dist/src/scada-components/svg/rendering/animationTemplates.d.ts +81 -0
- package/dist/src/scada-components/svg/rendering/index.d.ts +6 -0
- package/dist/src/scada-components/types.d.ts +0 -1
- package/dist/src/types/context-menu.d.ts +13 -0
- package/dist/src/types/model3d.d.ts +106 -0
- package/dist/src/types/zone.d.ts +54 -0
- package/dist/src/utils/animation/index.d.ts +6 -0
- package/dist/src/utils/{canvasConfigWatcher.d.ts → canvas/config-watcher.d.ts} +19 -9
- package/dist/src/utils/{canvasDataHandler.d.ts → canvas/data-handler.d.ts} +0 -29
- package/dist/src/utils/{edgeOperations.d.ts → canvas/edge-operations.d.ts} +6 -3
- package/dist/src/utils/{graphOperations.d.ts → canvas/graph-operations.d.ts} +0 -1
- package/dist/src/utils/canvas/index.d.ts +10 -0
- package/dist/src/utils/{canvasLayerManager.d.ts → canvas/layer-manager.d.ts} +0 -1
- package/dist/src/utils/{nodeOperations.d.ts → canvas/node-operations.d.ts} +0 -1
- package/dist/src/utils/core/index.d.ts +8 -0
- package/dist/src/utils/{dataBindingService.d.ts → data/binding-service.d.ts} +1 -2
- package/dist/src/utils/data/index.d.ts +6 -0
- package/dist/src/utils/{contextMenuManager.d.ts → events/context-menu.d.ts} +1 -2
- package/dist/src/utils/{eventManager.d.ts → events/event-manager.d.ts} +1 -2
- package/dist/src/utils/events/index.d.ts +7 -0
- package/dist/src/utils/index.d.ts +30 -20
- package/dist/src/utils/{dracoLoader.d.ts → integrations/draco-loader.d.ts} +0 -1
- package/dist/src/utils/integrations/index.d.ts +6 -0
- package/dist/src/utils/performance/index.d.ts +6 -0
- package/dist/src/utils/{viewportCulling.d.ts → performance/viewport-culling.d.ts} +0 -1
- package/dist/src/views/Preview.d.ts +4 -0
- package/dist/src/views/workflow/WorkflowDialog.d.ts +10 -30
- package/dist/src/views/workflow/components/AddNodeMenu.d.ts +5 -14
- package/dist/src/views/workflow/components/ElementSelector.d.ts +5 -27
- package/dist/src/views/workflow/components/PropertyPanel.d.ts +8 -15
- package/dist/src/views/workflow/components/node-configs/ClearTimerConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/ConditionConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/CustomCodeConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/GetPropertyConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/HttpRequestConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/SetPropertyConfig.d.ts +4 -14
- package/dist/src/views/workflow/components/node-configs/TimerConfig.d.ts +4 -14
- package/dist/src/views/workflow/config/nodeConfigRegistry.d.ts +0 -1
- package/dist/src/views/workflow/services/canvasElementService.d.ts +0 -1
- package/package.json +86 -84
- package/dist/Tank3DThree-DYRGEi5G.js +0 -108
- package/dist/draco/gltf/draco_decoder.js +0 -33
- package/dist/draco/gltf/draco_decoder.wasm +0 -0
- package/dist/draco/gltf/draco_encoder.js +0 -33
- package/dist/draco/gltf/draco_wasm_wrapper.js +0 -116
- package/dist/index-Bp0lBzVu.js +0 -45027
- package/dist/src/components/AttributeConfigDialog.d.ts +0 -39
- package/dist/src/components/BasicPropertiesTab.d.ts +0 -51
- package/dist/src/components/BindingCard.d.ts +0 -39
- package/dist/src/components/CanvasArea.d.ts +0 -4
- package/dist/src/components/ComponentLibrary.d.ts +0 -34
- package/dist/src/components/ComponentPointSelector.d.ts +0 -29
- package/dist/src/components/ContextMenu.d.ts +0 -63
- package/dist/src/components/CustomCodeDialog.d.ts +0 -30
- package/dist/src/components/DataPropertiesTab.d.ts +0 -24
- package/dist/src/components/DataSourceDialog.d.ts +0 -26
- package/dist/src/components/EdgePropertiesTab.d.ts +0 -22
- package/dist/src/components/Footer.d.ts +0 -41
- package/dist/src/components/Header.d.ts +0 -73
- package/dist/src/components/MappingConfigurator.d.ts +0 -27
- package/dist/src/components/PropertyPanel.d.ts +0 -45
- package/dist/src/scada-components/iot/industrial-3d/Motor3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d/Pump3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d/PumpGLB.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d/Tank3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d/Valve3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d/index.d.ts +0 -22
- package/dist/src/scada-components/iot/industrial-3d-extended/AlarmLight3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d-extended/Conveyor3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d-extended/Cylinder3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d-extended/TemperatureSensor3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d-extended/index.d.ts +0 -18
- package/dist/src/scada-components/iot/industrial-3d-fluid/Filter3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d-fluid/HeatExchanger3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d-fluid/Pipe3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d-fluid/Tee3D.d.ts +0 -14
- package/dist/src/scada-components/iot/industrial-3d-fluid/index.d.ts +0 -18
- package/dist/src/scada-components/iot/light/Light3D.d.ts +0 -14
- package/dist/src/scada-components/iot/light/index.d.ts +0 -6
- package/dist/src/scada-components/iot/switch/Switch3D.d.ts +0 -14
- package/dist/src/scada-components/iot/switch/index.d.ts +0 -6
- package/dist/src/scada-components/iot/tank-3d-three/Tank3DThree.d.ts +0 -14
- package/dist/src/scada-components/iot/tank-3d-three/index.d.ts +0 -7
- package/dist/src/views/workflow/WorkflowEditor.d.ts +0 -38
- package/dist/src/views/workflow/components/WorkflowToolbar.d.ts +0 -24
- /package/dist/src/{components/CanvasConfigPanel.d.ts → App.d.ts} +0 -0
- /package/dist/src/utils/{animationEngine.d.ts → animation/animation-engine.d.ts} +0 -0
- /package/dist/src/utils/{animationScheduler.d.ts → animation/animation-scheduler.d.ts} +0 -0
- /package/dist/src/utils/{commonUtils.d.ts → core/common.d.ts} +0 -0
- /package/dist/src/utils/{fileUtils.d.ts → core/file.d.ts} +0 -0
- /package/dist/src/utils/{messageUtils.d.ts → core/message.d.ts} +0 -0
- /package/dist/src/utils/{storageUtils.d.ts → core/storage.d.ts} +0 -0
- /package/dist/src/utils/{nodePropertyUtils.d.ts → data/node-property.d.ts} +0 -0
- /package/dist/src/utils/{eventUtils.d.ts → events/event-utils.d.ts} +0 -0
- /package/dist/src/utils/{authCrypto.d.ts → integrations/auth-crypto.d.ts} +0 -0
- /package/dist/src/utils/{workerManager.d.ts → performance/worker-manager.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,84 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@nywqs/scada-engine",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "自研 SCADA 组态引擎 - 基于 AntV X6",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/scada-engine.umd.js",
|
|
7
|
-
"module": "./dist/scada-engine.es.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./dist/scada-engine.es.js",
|
|
12
|
-
"require": "./dist/scada-engine.umd.js",
|
|
13
|
-
"types": "./dist/index.d.ts"
|
|
14
|
-
},
|
|
15
|
-
"./dist/style.css": "./dist/scada-engine.css",
|
|
16
|
-
"./dist/scada-engine.css": "./dist/scada-engine.css"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"dist",
|
|
20
|
-
"README.md"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"build
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"docs:
|
|
30
|
-
"docs:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"@antv/x6
|
|
36
|
-
"@antv/x6-
|
|
37
|
-
"@
|
|
38
|
-
"@vicons/
|
|
39
|
-
"@vueuse/core": "^10.0.0",
|
|
40
|
-
"echarts": "^5.5.0",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"@types/
|
|
49
|
-
"@
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"vite": "^5.0.0",
|
|
55
|
-
"vite-plugin-dts": "^
|
|
56
|
-
"vue-tsc": "^1.8.27"
|
|
57
|
-
},
|
|
58
|
-
"peerDependencies": {
|
|
59
|
-
"@antv/x6": "^
|
|
60
|
-
"@
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@nywqs/scada-engine",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "自研 SCADA 组态引擎 - 基于 AntV X6",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/scada-engine.umd.js",
|
|
7
|
+
"module": "./dist/scada-engine.es.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/scada-engine.es.js",
|
|
12
|
+
"require": "./dist/scada-engine.umd.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./dist/style.css": "./dist/scada-engine.css",
|
|
16
|
+
"./dist/scada-engine.css": "./dist/scada-engine.css"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "vite",
|
|
25
|
+
"build": "vite build",
|
|
26
|
+
"build:lib": "vite build",
|
|
27
|
+
"preview": "vite preview",
|
|
28
|
+
"prepublishOnly": "npm run build",
|
|
29
|
+
"docs:dev": "cd docs && npx hexo server",
|
|
30
|
+
"docs:build": "cd docs && npx hexo generate",
|
|
31
|
+
"docs:clean": "cd docs && npx hexo clean",
|
|
32
|
+
"docs:deploy": "cd docs && npx hexo deploy"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@antv/x6": "^3.1.6",
|
|
36
|
+
"@antv/x6-vue-shape": "^3.0.2",
|
|
37
|
+
"@vicons/carbon": "^0.13.0",
|
|
38
|
+
"@vicons/ionicons5": "^0.13.0",
|
|
39
|
+
"@vueuse/core": "^10.0.0",
|
|
40
|
+
"echarts": "^5.5.0",
|
|
41
|
+
"mqtt": "^5.14.1",
|
|
42
|
+
"pinia": "^2.1.0",
|
|
43
|
+
"three": "^0.160.1",
|
|
44
|
+
"vue": "^3.4.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^25.0.3",
|
|
48
|
+
"@types/three": "^0.182.0",
|
|
49
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
50
|
+
"naive-ui": "^2.43.2",
|
|
51
|
+
"typescript": "^5.3.0",
|
|
52
|
+
"unplugin-auto-import": "^0.17.0",
|
|
53
|
+
"unplugin-vue-components": "^0.26.0",
|
|
54
|
+
"vite": "^5.0.0",
|
|
55
|
+
"vite-plugin-dts": "^4.5.4",
|
|
56
|
+
"vue-tsc": "^1.8.27"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@antv/x6": "^3.1.6",
|
|
60
|
+
"@vueuse/core": "^10.0.0",
|
|
61
|
+
"echarts": "^5.5.0",
|
|
62
|
+
"pinia": "^2.1.0",
|
|
63
|
+
"vue": "^3.4.0"
|
|
64
|
+
},
|
|
65
|
+
"keywords": [
|
|
66
|
+
"scada",
|
|
67
|
+
"visualization",
|
|
68
|
+
"vue3",
|
|
69
|
+
"x6",
|
|
70
|
+
"antv",
|
|
71
|
+
"iot",
|
|
72
|
+
"dashboard",
|
|
73
|
+
"组态",
|
|
74
|
+
"可视化"
|
|
75
|
+
],
|
|
76
|
+
"author": "wqs",
|
|
77
|
+
"license": "MIT",
|
|
78
|
+
"repository": {
|
|
79
|
+
"type": "git",
|
|
80
|
+
"url": "https://github.com/leoncheng2030/scada-engine.git"
|
|
81
|
+
},
|
|
82
|
+
"homepage": "https://github.com/leoncheng2030/scada-engine#readme",
|
|
83
|
+
"bugs": {
|
|
84
|
+
"url": "https://github.com/leoncheng2030/scada-engine/issues"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -1,108 +0,0 @@
|
|
|
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
|
-
};
|