@operato/scene-visualizer 9.2.2 → 10.0.0-beta.2
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/carrier.d.ts +263 -0
- package/dist/carrier.js +272 -0
- package/dist/carrier.js.map +1 -0
- package/dist/desk.d.ts +238 -3
- package/dist/desk.js +1 -2
- package/dist/desk.js.map +1 -1
- package/dist/editors/index.d.ts +1 -0
- package/dist/editors/index.js +5 -0
- package/dist/editors/index.js.map +1 -1
- package/dist/editors/property-editor-gltf-fill-targets.d.ts +17 -0
- package/dist/editors/property-editor-gltf-fill-targets.js +211 -0
- package/dist/editors/property-editor-gltf-fill-targets.js.map +1 -0
- package/dist/editors/property-editor-gltf-info.js +38 -29
- package/dist/editors/property-editor-gltf-info.js.map +1 -1
- package/dist/editors/property-editor-location-increase-pattern.js +91 -95
- package/dist/editors/property-editor-location-increase-pattern.js.map +1 -1
- package/dist/effects/outline.js +1 -1
- package/dist/effects/outline.js.map +1 -1
- package/dist/index.d.ts +5 -17
- package/dist/index.js +7 -17
- package/dist/index.js.map +1 -1
- package/dist/rack-table-3d.d.ts +16 -0
- package/dist/rack-table-3d.js +94 -0
- package/dist/rack-table-3d.js.map +1 -0
- package/dist/rack-table-cell.d.ts +238 -3
- package/dist/rack-table-cell.js +44 -51
- package/dist/rack-table-cell.js.map +1 -1
- package/dist/rack-table-location.d.ts +37 -0
- package/dist/rack-table-location.js +227 -0
- package/dist/rack-table-location.js.map +1 -0
- package/dist/rack-table.d.ts +13 -29
- package/dist/rack-table.js +108 -380
- package/dist/rack-table.js.map +1 -1
- package/dist/rack.d.ts +3 -5
- package/dist/rack.js +7 -9
- package/dist/rack.js.map +1 -1
- package/dist/signal-tower.d.ts +492 -0
- package/dist/signal-tower.js +275 -0
- package/dist/signal-tower.js.map +1 -0
- package/dist/stock.d.ts +22 -10
- package/dist/stock.js +87 -81
- package/dist/stock.js.map +1 -1
- package/dist/tank.d.ts +492 -0
- package/dist/tank.js +312 -0
- package/dist/tank.js.map +1 -0
- package/dist/templates/carrier.d.ts +19 -0
- package/dist/templates/carrier.js +20 -0
- package/dist/templates/carrier.js.map +1 -0
- package/dist/templates/cube.js +1 -1
- package/dist/templates/cube.js.map +1 -1
- package/dist/templates/cylinder.js +3 -3
- package/dist/templates/cylinder.js.map +1 -1
- package/dist/templates/index.d.ts +1 -0
- package/dist/templates/index.js +9 -1
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/signal-tower.d.ts +21 -0
- package/dist/templates/signal-tower.js +22 -0
- package/dist/templates/signal-tower.js.map +1 -0
- package/dist/templates/sphere.d.ts +1 -0
- package/dist/templates/sphere.js +5 -4
- package/dist/templates/sphere.js.map +1 -1
- package/dist/templates/tank.d.ts +21 -0
- package/dist/templates/tank.js +22 -0
- package/dist/templates/tank.js.map +1 -0
- package/dist/templates/vehicle.d.ts +19 -0
- package/dist/templates/vehicle.js +20 -0
- package/dist/templates/vehicle.js.map +1 -0
- package/dist/vehicle.d.ts +248 -0
- package/dist/vehicle.js +133 -0
- package/dist/vehicle.js.map +1 -0
- package/dist/visualizer.d.ts +4 -5
- package/dist/visualizer.js +15 -28
- package/dist/visualizer.js.map +1 -1
- package/icons/carrier.png +0 -0
- package/icons/signal-tower.png +0 -0
- package/icons/tank.png +0 -0
- package/icons/vehicle.png +0 -0
- package/package.json +16 -18
- package/dist/banner.d.ts +0 -15
- package/dist/banner.js +0 -76
- package/dist/banner.js.map +0 -1
- package/dist/camera.d.ts +0 -20
- package/dist/camera.js +0 -108
- package/dist/camera.js.map +0 -1
- package/dist/cube.d.ts +0 -13
- package/dist/cube.js +0 -38
- package/dist/cube.js.map +0 -1
- package/dist/cylinder.d.ts +0 -11
- package/dist/cylinder.js +0 -38
- package/dist/cylinder.js.map +0 -1
- package/dist/ellipse.d.ts +0 -5
- package/dist/ellipse.js +0 -22
- package/dist/ellipse.js.map +0 -1
- package/dist/gltf-object.d.ts +0 -20
- package/dist/gltf-object.js +0 -104
- package/dist/gltf-object.js.map +0 -1
- package/dist/html-overlay-element.d.ts +0 -1
- package/dist/html-overlay-element.js +0 -12
- package/dist/html-overlay-element.js.map +0 -1
- package/dist/light.d.ts +0 -15
- package/dist/light.js +0 -135
- package/dist/light.js.map +0 -1
- package/dist/polygon.d.ts +0 -17
- package/dist/polygon.js +0 -64
- package/dist/polygon.js.map +0 -1
- package/dist/rect.d.ts +0 -5
- package/dist/rect.js +0 -36
- package/dist/rect.js.map +0 -1
- package/dist/scene/component.d.ts +0 -1
- package/dist/scene/component.js +0 -29
- package/dist/scene/component.js.map +0 -1
- package/dist/sphere.d.ts +0 -11
- package/dist/sphere.js +0 -38
- package/dist/sphere.js.map +0 -1
- package/dist/sprite.d.ts +0 -9
- package/dist/sprite.js +0 -28
- package/dist/sprite.js.map +0 -1
- package/dist/text.d.ts +0 -1
- package/dist/text.js +0 -9
- package/dist/text.js.map +0 -1
- package/dist/three-container-editor.d.ts +0 -22
- package/dist/three-container-editor.js +0 -132
- package/dist/three-container-editor.js.map +0 -1
- package/dist/three-container.d.ts +0 -85
- package/dist/three-container.js +0 -565
- package/dist/three-container.js.map +0 -1
- package/dist/three-controls.d.ts +0 -11
- package/dist/three-controls.js +0 -616
- package/dist/three-controls.js.map +0 -1
- package/dist/three-layout.d.ts +0 -8
- package/dist/three-layout.js +0 -20
- package/dist/three-layout.js.map +0 -1
- package/dist/three-space.d.ts +0 -85
- package/dist/three-space.js +0 -570
- package/dist/three-space.js.map +0 -1
- package/dist/threed/common.d.ts +0 -22
- package/dist/threed/common.js +0 -19
- package/dist/threed/common.js.map +0 -1
- package/dist/threed/floor/floor.d.ts +0 -3
- package/dist/threed/floor/floor.js +0 -51
- package/dist/threed/floor/floor.js.map +0 -1
- package/dist/threed/html/elements.d.ts +0 -2
- package/dist/threed/html/elements.js +0 -21
- package/dist/threed/html/elements.js.map +0 -1
- package/dist/threed/index.d.ts +0 -15
- package/dist/threed/index.js +0 -16
- package/dist/threed/index.js.map +0 -1
- package/dist/threed/real-object-camera-meshed.d.ts +0 -12
- package/dist/threed/real-object-camera-meshed.js +0 -49
- package/dist/threed/real-object-camera-meshed.js.map +0 -1
- package/dist/threed/real-object-camera.d.ts +0 -9
- package/dist/threed/real-object-camera.js +0 -31
- package/dist/threed/real-object-camera.js.map +0 -1
- package/dist/threed/real-object-dom-element.d.ts +0 -9
- package/dist/threed/real-object-dom-element.js +0 -40
- package/dist/threed/real-object-dom-element.js.map +0 -1
- package/dist/threed/real-object-dummy.d.ts +0 -6
- package/dist/threed/real-object-dummy.js +0 -11
- package/dist/threed/real-object-dummy.js.map +0 -1
- package/dist/threed/real-object-extrude.d.ts +0 -21
- package/dist/threed/real-object-extrude.js +0 -173
- package/dist/threed/real-object-extrude.js.map +0 -1
- package/dist/threed/real-object-gltf.d.ts +0 -16
- package/dist/threed/real-object-gltf.js +0 -101
- package/dist/threed/real-object-gltf.js.map +0 -1
- package/dist/threed/real-object-group.d.ts +0 -5
- package/dist/threed/real-object-group.js +0 -11
- package/dist/threed/real-object-group.js.map +0 -1
- package/dist/threed/real-object-mesh.d.ts +0 -13
- package/dist/threed/real-object-mesh.js +0 -75
- package/dist/threed/real-object-mesh.js.map +0 -1
- package/dist/threed/real-object-plane.d.ts +0 -5
- package/dist/threed/real-object-plane.js +0 -22
- package/dist/threed/real-object-plane.js.map +0 -1
- package/dist/threed/real-object-scene.d.ts +0 -21
- package/dist/threed/real-object-scene.js +0 -67
- package/dist/threed/real-object-scene.js.map +0 -1
- package/dist/threed/real-object-sprite-2d.d.ts +0 -14
- package/dist/threed/real-object-sprite-2d.js +0 -45
- package/dist/threed/real-object-sprite-2d.js.map +0 -1
- package/dist/threed/real-object-sprite.d.ts +0 -11
- package/dist/threed/real-object-sprite.js +0 -50
- package/dist/threed/real-object-sprite.js.map +0 -1
- package/dist/threed/real-object-text.d.ts +0 -15
- package/dist/threed/real-object-text.js +0 -64
- package/dist/threed/real-object-text.js.map +0 -1
- package/dist/threed/real-object.d.ts +0 -64
- package/dist/threed/real-object.js +0 -260
- package/dist/threed/real-object.js.map +0 -1
- package/dist/threed/texture/canvas-texture.d.ts +0 -4
- package/dist/threed/texture/canvas-texture.js +0 -49
- package/dist/threed/texture/canvas-texture.js.map +0 -1
- package/dist/threed/texture/text-texture.d.ts +0 -8
- package/dist/threed/texture/text-texture.js +0 -79
- package/dist/threed/texture/text-texture.js.map +0 -1
- package/dist/threed/three-dimensional-container.d.ts +0 -8
- package/dist/threed/three-dimensional-container.js +0 -2
- package/dist/threed/three-dimensional-container.js.map +0 -1
- package/dist/threed/utils/bound-uv-generator.d.ts +0 -16
- package/dist/threed/utils/bound-uv-generator.js +0 -42
- package/dist/threed/utils/bound-uv-generator.js.map +0 -1
- package/dist/wall.d.ts +0 -13
- package/dist/wall.js +0 -45
- package/dist/wall.js.map +0 -1
package/dist/tank.js
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { __decorate } from "tslib";
|
|
5
|
+
import { RealObjectGroup, RectPath, Shape, ValueHolder, sceneComponent } from '@hatiolab/things-scene';
|
|
6
|
+
import * as THREE from 'three';
|
|
7
|
+
const NATURE = {
|
|
8
|
+
mutable: false,
|
|
9
|
+
resizable: true,
|
|
10
|
+
rotatable: true,
|
|
11
|
+
properties: [
|
|
12
|
+
{
|
|
13
|
+
type: 'number',
|
|
14
|
+
label: 'value',
|
|
15
|
+
name: 'value',
|
|
16
|
+
property: 'value'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
type: 'color',
|
|
20
|
+
label: 'liquid-color',
|
|
21
|
+
name: 'liquidColor',
|
|
22
|
+
property: 'liquidColor'
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
help: 'scene/component/tank'
|
|
26
|
+
};
|
|
27
|
+
/* ── 상수 ── */
|
|
28
|
+
const TANK_COLOR = '#aaaaaa';
|
|
29
|
+
const LIQUID_COLOR = '#4488ff';
|
|
30
|
+
const LIQUID_OPACITY = 0.8;
|
|
31
|
+
/* ── 게이지 ── */
|
|
32
|
+
const GAUGE_TEX_W = 64;
|
|
33
|
+
const GAUGE_TEX_H = 256;
|
|
34
|
+
const GAUGE_ARC = 0.22; // 라디안 (~13°) — 더 좁고 세련된 폭
|
|
35
|
+
const BEZEL_COLOR = '#2a2a2a';
|
|
36
|
+
/* ── 2D 렌더 ── */
|
|
37
|
+
function renderTank(ctx, x, y, w, h, value, liquidColor) {
|
|
38
|
+
const capH = Math.min(w * 0.25, h * 0.15);
|
|
39
|
+
const bodyY = y + capH;
|
|
40
|
+
const bodyH = h - capH;
|
|
41
|
+
// 외벽 — 본체 (불투명)
|
|
42
|
+
ctx.fillStyle = TANK_COLOR;
|
|
43
|
+
ctx.fillRect(x, bodyY, w, bodyH);
|
|
44
|
+
// 외벽 — 상단 둥근 캡
|
|
45
|
+
ctx.beginPath();
|
|
46
|
+
ctx.ellipse(x + w / 2, bodyY, w / 2, capH, 0, Math.PI, 0);
|
|
47
|
+
ctx.fill();
|
|
48
|
+
// 외벽 윤곽선
|
|
49
|
+
ctx.strokeStyle = '#888888';
|
|
50
|
+
ctx.lineWidth = 1.5;
|
|
51
|
+
ctx.beginPath();
|
|
52
|
+
ctx.moveTo(x, bodyY);
|
|
53
|
+
ctx.lineTo(x, bodyY + bodyH);
|
|
54
|
+
ctx.lineTo(x + w, bodyY + bodyH);
|
|
55
|
+
ctx.lineTo(x + w, bodyY);
|
|
56
|
+
ctx.stroke();
|
|
57
|
+
ctx.beginPath();
|
|
58
|
+
ctx.ellipse(x + w / 2, bodyY, w / 2, capH, 0, Math.PI, 0);
|
|
59
|
+
ctx.stroke();
|
|
60
|
+
// ── 전면 게이지 ──
|
|
61
|
+
const gw = Math.max(6, w * 0.15);
|
|
62
|
+
const gPad = bodyH * 0.15;
|
|
63
|
+
const gx = x + (w - gw) / 2;
|
|
64
|
+
const gy = bodyY + gPad;
|
|
65
|
+
const gh = bodyH - gPad * 2;
|
|
66
|
+
const gr = gw / 2;
|
|
67
|
+
// 액체 채움
|
|
68
|
+
const level = Math.max(0, Math.min(100, value)) / 100;
|
|
69
|
+
if (level > 0) {
|
|
70
|
+
const fp = 2;
|
|
71
|
+
const fillH = (gh - fp * 2) * level;
|
|
72
|
+
const fillY = gy + gh - fp - fillH;
|
|
73
|
+
ctx.save();
|
|
74
|
+
ctx.beginPath();
|
|
75
|
+
ctx.roundRect(gx + fp, gy + fp, gw - fp * 2, gh - fp * 2, Math.max(0, gr - fp));
|
|
76
|
+
ctx.clip();
|
|
77
|
+
ctx.fillStyle = liquidColor || LIQUID_COLOR;
|
|
78
|
+
ctx.globalAlpha = LIQUID_OPACITY;
|
|
79
|
+
ctx.fillRect(gx + fp, fillY, gw - fp * 2, fillH);
|
|
80
|
+
ctx.globalAlpha = 1;
|
|
81
|
+
ctx.restore();
|
|
82
|
+
}
|
|
83
|
+
// 눈금 (우측, 20% 단위)
|
|
84
|
+
ctx.strokeStyle = 'rgba(255,255,255,0.45)';
|
|
85
|
+
const tickTop = gy + 4;
|
|
86
|
+
const tickAreaH = gh - 8;
|
|
87
|
+
for (let pct = 20; pct <= 80; pct += 20) {
|
|
88
|
+
const ty = tickTop + tickAreaH * (1 - pct / 100);
|
|
89
|
+
const tw = pct === 50 ? gw * 0.35 : gw * 0.2;
|
|
90
|
+
ctx.lineWidth = pct === 50 ? 1 : 0.5;
|
|
91
|
+
ctx.beginPath();
|
|
92
|
+
ctx.moveTo(gx + gw - tw - 1, ty);
|
|
93
|
+
ctx.lineTo(gx + gw - 1, ty);
|
|
94
|
+
ctx.stroke();
|
|
95
|
+
}
|
|
96
|
+
// 게이지 테두리 (라운드)
|
|
97
|
+
ctx.strokeStyle = 'rgba(255,255,255,0.2)';
|
|
98
|
+
ctx.lineWidth = 1;
|
|
99
|
+
ctx.beginPath();
|
|
100
|
+
ctx.roundRect(gx, gy, gw, gh, gr);
|
|
101
|
+
ctx.stroke();
|
|
102
|
+
// 수치 (게이지 중앙)
|
|
103
|
+
const pctText = `${Math.round(value)}%`;
|
|
104
|
+
const fontSize = Math.max(7, Math.round(gw * 0.55));
|
|
105
|
+
ctx.font = `bold ${fontSize}px sans-serif`;
|
|
106
|
+
ctx.textAlign = 'center';
|
|
107
|
+
ctx.textBaseline = 'middle';
|
|
108
|
+
ctx.shadowColor = 'rgba(0,0,0,0.7)';
|
|
109
|
+
ctx.shadowBlur = 2;
|
|
110
|
+
ctx.fillStyle = '#ffffff';
|
|
111
|
+
ctx.fillText(pctText, gx + gw / 2, gy + gh / 2);
|
|
112
|
+
ctx.shadowColor = 'transparent';
|
|
113
|
+
ctx.shadowBlur = 0;
|
|
114
|
+
// bounds path 등록
|
|
115
|
+
ctx.beginPath();
|
|
116
|
+
ctx.rect(x, y, w, h);
|
|
117
|
+
}
|
|
118
|
+
/* ── 3D 렌더 ── */
|
|
119
|
+
export class Tank3D extends RealObjectGroup {
|
|
120
|
+
_gaugeCanvas;
|
|
121
|
+
_gaugeCtx;
|
|
122
|
+
_gaugeTexture;
|
|
123
|
+
_gaugeMesh;
|
|
124
|
+
// build 시 저장
|
|
125
|
+
_bodyRadius = 0;
|
|
126
|
+
_bodyDepth = 0;
|
|
127
|
+
_domeH = 0;
|
|
128
|
+
build() {
|
|
129
|
+
super.build();
|
|
130
|
+
const { width, height } = this.component.bounds;
|
|
131
|
+
const { depth } = this.component.state;
|
|
132
|
+
const d = depth || Math.max(width, height) * 2;
|
|
133
|
+
const radius = Math.min(width, height) / 2;
|
|
134
|
+
const domeH = radius * 0.5;
|
|
135
|
+
const bodyH = d - domeH;
|
|
136
|
+
this._bodyRadius = radius;
|
|
137
|
+
this._bodyDepth = bodyH;
|
|
138
|
+
this._domeH = domeH;
|
|
139
|
+
const gaugeH = bodyH * 0.55;
|
|
140
|
+
// ── 솔리드 탱크 본체 ──
|
|
141
|
+
const tankMat = new THREE.MeshStandardMaterial({
|
|
142
|
+
color: TANK_COLOR,
|
|
143
|
+
roughness: 0.35,
|
|
144
|
+
metalness: 0.5
|
|
145
|
+
});
|
|
146
|
+
// 원기둥 (닫힌 양 끝)
|
|
147
|
+
const wallGeo = new THREE.CylinderGeometry(radius, radius, bodyH, 32);
|
|
148
|
+
const wallMesh = new THREE.Mesh(wallGeo, tankMat);
|
|
149
|
+
wallMesh.position.y = bodyH / 2;
|
|
150
|
+
wallMesh.castShadow = true;
|
|
151
|
+
this.object3d.add(wallMesh);
|
|
152
|
+
// 상단 반구 돔
|
|
153
|
+
const domeGeo = new THREE.SphereGeometry(radius, 32, 16, 0, Math.PI * 2, 0, Math.PI / 2);
|
|
154
|
+
const domeMesh = new THREE.Mesh(domeGeo, tankMat);
|
|
155
|
+
domeMesh.position.y = bodyH;
|
|
156
|
+
domeMesh.castShadow = true;
|
|
157
|
+
this.object3d.add(domeMesh);
|
|
158
|
+
// ── 게이지 (곡면, 단일 메시 — 캔버스로 전부 그림) ──
|
|
159
|
+
this._gaugeCanvas = document.createElement('canvas');
|
|
160
|
+
this._gaugeCanvas.width = GAUGE_TEX_W;
|
|
161
|
+
this._gaugeCanvas.height = GAUGE_TEX_H;
|
|
162
|
+
this._gaugeCtx = this._gaugeCanvas.getContext('2d');
|
|
163
|
+
this._gaugeTexture = new THREE.CanvasTexture(this._gaugeCanvas);
|
|
164
|
+
this._gaugeTexture.minFilter = THREE.LinearFilter;
|
|
165
|
+
const gaugeR = radius * 1.04;
|
|
166
|
+
const gaugeGeo = new THREE.CylinderGeometry(gaugeR, gaugeR, gaugeH, 24, 1, true, -GAUGE_ARC / 2, GAUGE_ARC);
|
|
167
|
+
const gaugeMat = new THREE.MeshBasicMaterial({
|
|
168
|
+
map: this._gaugeTexture,
|
|
169
|
+
transparent: true,
|
|
170
|
+
alphaTest: 0.05
|
|
171
|
+
});
|
|
172
|
+
this._gaugeMesh = new THREE.Mesh(gaugeGeo, gaugeMat);
|
|
173
|
+
this._gaugeMesh.position.y = bodyH / 2;
|
|
174
|
+
this.object3d.add(this._gaugeMesh);
|
|
175
|
+
// 게이지 그리기
|
|
176
|
+
this._drawGauge();
|
|
177
|
+
// 수직 중앙 정렬
|
|
178
|
+
const totalH = bodyH + domeH;
|
|
179
|
+
this.object3d.children.forEach(child => {
|
|
180
|
+
child.position.y -= totalH / 2;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
_drawGauge() {
|
|
184
|
+
const ctx = this._gaugeCtx;
|
|
185
|
+
const w = GAUGE_TEX_W;
|
|
186
|
+
const h = GAUGE_TEX_H;
|
|
187
|
+
const comp = this.component;
|
|
188
|
+
const value = Math.max(0, Math.min(100, comp.value ?? 0));
|
|
189
|
+
const level = value / 100;
|
|
190
|
+
const liquidColor = comp.getState('liquidColor') || LIQUID_COLOR;
|
|
191
|
+
// 레이아웃 — 캡슐 형태 유리 영역만
|
|
192
|
+
const gx = 6;
|
|
193
|
+
const gy = 10;
|
|
194
|
+
const gw = w - gx * 2;
|
|
195
|
+
const gh = h - gy * 2;
|
|
196
|
+
const gr = gw / 2; // 캡슐 라운드
|
|
197
|
+
ctx.clearRect(0, 0, w, h);
|
|
198
|
+
// ── 빈 영역 (어두운 배경) ──
|
|
199
|
+
ctx.fillStyle = 'rgba(15, 20, 25, 0.8)';
|
|
200
|
+
ctx.beginPath();
|
|
201
|
+
ctx.roundRect(gx, gy, gw, gh, gr);
|
|
202
|
+
ctx.fill();
|
|
203
|
+
// ── 액체 채움 ──
|
|
204
|
+
if (level > 0) {
|
|
205
|
+
const fillH = Math.round(gh * level);
|
|
206
|
+
const fillY = gy + gh - fillH;
|
|
207
|
+
ctx.save();
|
|
208
|
+
ctx.beginPath();
|
|
209
|
+
ctx.roundRect(gx, gy, gw, gh, gr);
|
|
210
|
+
ctx.clip();
|
|
211
|
+
ctx.fillStyle = liquidColor;
|
|
212
|
+
ctx.globalAlpha = LIQUID_OPACITY;
|
|
213
|
+
ctx.fillRect(gx, fillY, gw, fillH);
|
|
214
|
+
// 수면 하이라이트
|
|
215
|
+
ctx.globalAlpha = 0.3;
|
|
216
|
+
const surfGrad = ctx.createLinearGradient(0, fillY, 0, fillY + 4);
|
|
217
|
+
surfGrad.addColorStop(0, '#ffffff');
|
|
218
|
+
surfGrad.addColorStop(1, 'transparent');
|
|
219
|
+
ctx.fillStyle = surfGrad;
|
|
220
|
+
ctx.fillRect(gx, fillY, gw, 4);
|
|
221
|
+
ctx.globalAlpha = 1;
|
|
222
|
+
ctx.restore();
|
|
223
|
+
}
|
|
224
|
+
// ── 눈금 (우측, 20% 단위) ──
|
|
225
|
+
ctx.strokeStyle = 'rgba(255,255,255,0.4)';
|
|
226
|
+
for (let pct = 20; pct <= 80; pct += 20) {
|
|
227
|
+
const ty = gy + gh * (1 - pct / 100);
|
|
228
|
+
const tw = pct === 50 ? gw * 0.35 : gw * 0.22;
|
|
229
|
+
ctx.lineWidth = pct === 50 ? 1.5 : 1;
|
|
230
|
+
ctx.beginPath();
|
|
231
|
+
ctx.moveTo(gx + gw - tw, ty);
|
|
232
|
+
ctx.lineTo(gx + gw, ty);
|
|
233
|
+
ctx.stroke();
|
|
234
|
+
}
|
|
235
|
+
// ── 유리 반사 (좌측 하이라이트) ──
|
|
236
|
+
ctx.save();
|
|
237
|
+
ctx.beginPath();
|
|
238
|
+
ctx.roundRect(gx, gy, gw, gh, gr);
|
|
239
|
+
ctx.clip();
|
|
240
|
+
const hlGrad = ctx.createLinearGradient(gx, 0, gx + gw, 0);
|
|
241
|
+
hlGrad.addColorStop(0, 'rgba(255,255,255,0.12)');
|
|
242
|
+
hlGrad.addColorStop(0.3, 'rgba(255,255,255,0.03)');
|
|
243
|
+
hlGrad.addColorStop(1, 'rgba(255,255,255,0)');
|
|
244
|
+
ctx.fillStyle = hlGrad;
|
|
245
|
+
ctx.fillRect(gx, gy, gw, gh);
|
|
246
|
+
ctx.restore();
|
|
247
|
+
// ── 유리 테두리 ──
|
|
248
|
+
ctx.strokeStyle = 'rgba(255,255,255,0.15)';
|
|
249
|
+
ctx.lineWidth = 1;
|
|
250
|
+
ctx.beginPath();
|
|
251
|
+
ctx.roundRect(gx, gy, gw, gh, gr);
|
|
252
|
+
ctx.stroke();
|
|
253
|
+
// ── 수치 (게이지 중앙) ──
|
|
254
|
+
ctx.fillStyle = '#ffffff';
|
|
255
|
+
ctx.font = 'bold 14px sans-serif';
|
|
256
|
+
ctx.textAlign = 'center';
|
|
257
|
+
ctx.textBaseline = 'middle';
|
|
258
|
+
ctx.shadowColor = 'rgba(0,0,0,0.7)';
|
|
259
|
+
ctx.shadowBlur = 3;
|
|
260
|
+
ctx.fillText(`${Math.round(value)}%`, w / 2, gy + gh / 2);
|
|
261
|
+
ctx.shadowColor = 'transparent';
|
|
262
|
+
ctx.shadowBlur = 0;
|
|
263
|
+
this._gaugeTexture.needsUpdate = true;
|
|
264
|
+
}
|
|
265
|
+
updateFillLevel() {
|
|
266
|
+
this._drawGauge();
|
|
267
|
+
}
|
|
268
|
+
update() {
|
|
269
|
+
super.update();
|
|
270
|
+
this.updateFillLevel();
|
|
271
|
+
}
|
|
272
|
+
updateDimension() {
|
|
273
|
+
this.clear();
|
|
274
|
+
this.build();
|
|
275
|
+
}
|
|
276
|
+
onchange(after, before) {
|
|
277
|
+
super.onchange(after, before);
|
|
278
|
+
if ('value' in after || 'liquidColor' in after) {
|
|
279
|
+
this.updateFillLevel();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/* ── Component 클래스 ── */
|
|
284
|
+
const MixedShape = ValueHolder(RectPath(Shape));
|
|
285
|
+
let Tank = class Tank extends MixedShape {
|
|
286
|
+
is3dish() {
|
|
287
|
+
return true;
|
|
288
|
+
}
|
|
289
|
+
buildRealObject() {
|
|
290
|
+
return new Tank3D(this);
|
|
291
|
+
}
|
|
292
|
+
get nature() {
|
|
293
|
+
return NATURE;
|
|
294
|
+
}
|
|
295
|
+
onchange(after, before) {
|
|
296
|
+
super.onchange(after, before);
|
|
297
|
+
if ('value' in after || 'liquidColor' in after) {
|
|
298
|
+
this.invalidate();
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
render(ctx) {
|
|
302
|
+
const { left, top, width, height } = this.bounds;
|
|
303
|
+
renderTank(ctx, left, top, width, height, this.value, this.getState('liquidColor') || LIQUID_COLOR);
|
|
304
|
+
ctx.beginPath();
|
|
305
|
+
ctx.rect(left, top, width, height);
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
Tank = __decorate([
|
|
309
|
+
sceneComponent('tank')
|
|
310
|
+
], Tank);
|
|
311
|
+
export { Tank };
|
|
312
|
+
//# sourceMappingURL=tank.js.map
|
package/dist/tank.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tank.js","sourceRoot":"","sources":["../src/tank.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAEL,eAAe,EAEf,QAAQ,EACR,KAAK,EACL,WAAW,EACX,cAAc,EACf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,OAAO;SAClB;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,aAAa;SACxB;KACF;IACD,IAAI,EAAE,sBAAsB;CAC7B,CAAA;AAED,cAAc;AACd,MAAM,UAAU,GAAG,SAAS,CAAA;AAC5B,MAAM,YAAY,GAAG,SAAS,CAAA;AAC9B,MAAM,cAAc,GAAG,GAAG,CAAA;AAE1B,eAAe;AACf,MAAM,WAAW,GAAG,EAAE,CAAA;AACtB,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,SAAS,GAAG,IAAI,CAAA,CAAC,0B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AEhD,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,YAAY,CAAC,CAAA;QAEnG,GAAG,CAAC,SAAS,EAAE,CAAA;QACf,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IACpC,CAAC;CAEF,CAAA;AA9BY,IAAI;IADhB,cAAc,CAAC,MAAM,CAAC;GACV,IAAI,CA8BhB","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport {\n ComponentNature,\n RealObjectGroup,\n RealObject,\n RectPath,\n Shape,\n ValueHolder,\n sceneComponent\n} from '@hatiolab/things-scene'\nimport * as THREE from 'three'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'number',\n label: 'value',\n name: 'value',\n property: 'value'\n },\n {\n type: 'color',\n label: 'liquid-color',\n name: 'liquidColor',\n property: 'liquidColor'\n }\n ],\n help: 'scene/component/tank'\n}\n\n/* ── 상수 ── */\nconst TANK_COLOR = '#aaaaaa'\nconst LIQUID_COLOR = '#4488ff'\nconst LIQUID_OPACITY = 0.8\n\n/* ── 게이지 ── */\nconst GAUGE_TEX_W = 64\nconst GAUGE_TEX_H = 256\nconst GAUGE_ARC = 0.22 // 라디안 (~13°) — 더 좁고 세련된 폭\nconst BEZEL_COLOR = '#2a2a2a'\n\n/* ── 2D 렌더 ── */\n\nfunction renderTank(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n value: number,\n liquidColor: string\n) {\n const capH = Math.min(w * 0.25, h * 0.15)\n const bodyY = y + capH\n const bodyH = h - capH\n\n // 외벽 — 본체 (불투명)\n ctx.fillStyle = TANK_COLOR\n ctx.fillRect(x, bodyY, w, bodyH)\n\n // 외벽 — 상단 둥근 캡\n ctx.beginPath()\n ctx.ellipse(x + w / 2, bodyY, w / 2, capH, 0, Math.PI, 0)\n ctx.fill()\n\n // 외벽 윤곽선\n ctx.strokeStyle = '#888888'\n ctx.lineWidth = 1.5\n ctx.beginPath()\n ctx.moveTo(x, bodyY)\n ctx.lineTo(x, bodyY + bodyH)\n ctx.lineTo(x + w, bodyY + bodyH)\n ctx.lineTo(x + w, bodyY)\n ctx.stroke()\n ctx.beginPath()\n ctx.ellipse(x + w / 2, bodyY, w / 2, capH, 0, Math.PI, 0)\n ctx.stroke()\n\n // ── 전면 게이지 ──\n const gw = Math.max(6, w * 0.15)\n const gPad = bodyH * 0.15\n const gx = x + (w - gw) / 2\n const gy = bodyY + gPad\n const gh = bodyH - gPad * 2\n const gr = gw / 2\n\n // 액체 채움\n const level = Math.max(0, Math.min(100, value)) / 100\n if (level > 0) {\n const fp = 2\n const fillH = (gh - fp * 2) * level\n const fillY = gy + gh - fp - fillH\n\n ctx.save()\n ctx.beginPath()\n ctx.roundRect(gx + fp, gy + fp, gw - fp * 2, gh - fp * 2, Math.max(0, gr - fp))\n ctx.clip()\n\n ctx.fillStyle = liquidColor || LIQUID_COLOR\n ctx.globalAlpha = LIQUID_OPACITY\n ctx.fillRect(gx + fp, fillY, gw - fp * 2, fillH)\n ctx.globalAlpha = 1\n ctx.restore()\n }\n\n // 눈금 (우측, 20% 단위)\n ctx.strokeStyle = 'rgba(255,255,255,0.45)'\n const tickTop = gy + 4\n const tickAreaH = gh - 8\n for (let pct = 20; pct <= 80; pct += 20) {\n const ty = tickTop + tickAreaH * (1 - pct / 100)\n const tw = pct === 50 ? gw * 0.35 : gw * 0.2\n ctx.lineWidth = pct === 50 ? 1 : 0.5\n ctx.beginPath()\n ctx.moveTo(gx + gw - tw - 1, ty)\n ctx.lineTo(gx + gw - 1, ty)\n ctx.stroke()\n }\n\n // 게이지 테두리 (라운드)\n ctx.strokeStyle = 'rgba(255,255,255,0.2)'\n ctx.lineWidth = 1\n ctx.beginPath()\n ctx.roundRect(gx, gy, gw, gh, gr)\n ctx.stroke()\n\n // 수치 (게이지 중앙)\n const pctText = `${Math.round(value)}%`\n const fontSize = Math.max(7, Math.round(gw * 0.55))\n ctx.font = `bold ${fontSize}px sans-serif`\n ctx.textAlign = 'center'\n ctx.textBaseline = 'middle'\n ctx.shadowColor = 'rgba(0,0,0,0.7)'\n ctx.shadowBlur = 2\n ctx.fillStyle = '#ffffff'\n ctx.fillText(pctText, gx + gw / 2, gy + gh / 2)\n ctx.shadowColor = 'transparent'\n ctx.shadowBlur = 0\n\n // bounds path 등록\n ctx.beginPath()\n ctx.rect(x, y, w, h)\n}\n\n/* ── 3D 렌더 ── */\n\nexport class Tank3D extends RealObjectGroup {\n private _gaugeCanvas!: HTMLCanvasElement\n private _gaugeCtx!: CanvasRenderingContext2D\n private _gaugeTexture!: THREE.CanvasTexture\n private _gaugeMesh!: THREE.Mesh\n\n // build 시 저장\n private _bodyRadius = 0\n private _bodyDepth = 0\n private _domeH = 0\n\n build() {\n super.build()\n\n const { width, height } = this.component.bounds\n const { depth } = this.component.state\n const d = depth || Math.max(width, height) * 2\n\n const radius = Math.min(width, height) / 2\n const domeH = radius * 0.5\n const bodyH = d - domeH\n\n this._bodyRadius = radius\n this._bodyDepth = bodyH\n this._domeH = domeH\n\n const gaugeH = bodyH * 0.55\n\n // ── 솔리드 탱크 본체 ──\n const tankMat = new THREE.MeshStandardMaterial({\n color: TANK_COLOR,\n roughness: 0.35,\n metalness: 0.5\n })\n\n // 원기둥 (닫힌 양 끝)\n const wallGeo = new THREE.CylinderGeometry(radius, radius, bodyH, 32)\n const wallMesh = new THREE.Mesh(wallGeo, tankMat)\n wallMesh.position.y = bodyH / 2\n wallMesh.castShadow = true\n this.object3d.add(wallMesh)\n\n // 상단 반구 돔\n const domeGeo = new THREE.SphereGeometry(radius, 32, 16, 0, Math.PI * 2, 0, Math.PI / 2)\n const domeMesh = new THREE.Mesh(domeGeo, tankMat)\n domeMesh.position.y = bodyH\n domeMesh.castShadow = true\n this.object3d.add(domeMesh)\n\n // ── 게이지 (곡면, 단일 메시 — 캔버스로 전부 그림) ──\n this._gaugeCanvas = document.createElement('canvas')\n this._gaugeCanvas.width = GAUGE_TEX_W\n this._gaugeCanvas.height = GAUGE_TEX_H\n this._gaugeCtx = this._gaugeCanvas.getContext('2d')!\n\n this._gaugeTexture = new THREE.CanvasTexture(this._gaugeCanvas)\n this._gaugeTexture.minFilter = THREE.LinearFilter\n\n const gaugeR = radius * 1.04\n const gaugeGeo = new THREE.CylinderGeometry(\n gaugeR, gaugeR, gaugeH, 24, 1, true,\n -GAUGE_ARC / 2, GAUGE_ARC\n )\n const gaugeMat = new THREE.MeshBasicMaterial({\n map: this._gaugeTexture,\n transparent: true,\n alphaTest: 0.05\n })\n this._gaugeMesh = new THREE.Mesh(gaugeGeo, gaugeMat)\n this._gaugeMesh.position.y = bodyH / 2\n this.object3d.add(this._gaugeMesh)\n\n // 게이지 그리기\n this._drawGauge()\n\n // 수직 중앙 정렬\n const totalH = bodyH + domeH\n this.object3d.children.forEach(child => {\n child.position.y -= totalH / 2\n })\n }\n\n private _drawGauge() {\n const ctx = this._gaugeCtx\n const w = GAUGE_TEX_W\n const h = GAUGE_TEX_H\n const comp = this.component as unknown as Tank\n const value = Math.max(0, Math.min(100, comp.value ?? 0))\n const level = value / 100\n const liquidColor = comp.getState('liquidColor') || LIQUID_COLOR\n\n // 레이아웃 — 캡슐 형태 유리 영역만\n const gx = 6\n const gy = 10\n const gw = w - gx * 2\n const gh = h - gy * 2\n const gr = gw / 2 // 캡슐 라운드\n\n ctx.clearRect(0, 0, w, h)\n\n // ── 빈 영역 (어두운 배경) ──\n ctx.fillStyle = 'rgba(15, 20, 25, 0.8)'\n ctx.beginPath()\n ctx.roundRect(gx, gy, gw, gh, gr)\n ctx.fill()\n\n // ── 액체 채움 ──\n if (level > 0) {\n const fillH = Math.round(gh * level)\n const fillY = gy + gh - fillH\n\n ctx.save()\n ctx.beginPath()\n ctx.roundRect(gx, gy, gw, gh, gr)\n ctx.clip()\n\n ctx.fillStyle = liquidColor\n ctx.globalAlpha = LIQUID_OPACITY\n ctx.fillRect(gx, fillY, gw, fillH)\n\n // 수면 하이라이트\n ctx.globalAlpha = 0.3\n const surfGrad = ctx.createLinearGradient(0, fillY, 0, fillY + 4)\n surfGrad.addColorStop(0, '#ffffff')\n surfGrad.addColorStop(1, 'transparent')\n ctx.fillStyle = surfGrad\n ctx.fillRect(gx, fillY, gw, 4)\n\n ctx.globalAlpha = 1\n ctx.restore()\n }\n\n // ── 눈금 (우측, 20% 단위) ──\n ctx.strokeStyle = 'rgba(255,255,255,0.4)'\n for (let pct = 20; pct <= 80; pct += 20) {\n const ty = gy + gh * (1 - pct / 100)\n const tw = pct === 50 ? gw * 0.35 : gw * 0.22\n ctx.lineWidth = pct === 50 ? 1.5 : 1\n ctx.beginPath()\n ctx.moveTo(gx + gw - tw, ty)\n ctx.lineTo(gx + gw, ty)\n ctx.stroke()\n }\n\n // ── 유리 반사 (좌측 하이라이트) ──\n ctx.save()\n ctx.beginPath()\n ctx.roundRect(gx, gy, gw, gh, gr)\n ctx.clip()\n const hlGrad = ctx.createLinearGradient(gx, 0, gx + gw, 0)\n hlGrad.addColorStop(0, 'rgba(255,255,255,0.12)')\n hlGrad.addColorStop(0.3, 'rgba(255,255,255,0.03)')\n hlGrad.addColorStop(1, 'rgba(255,255,255,0)')\n ctx.fillStyle = hlGrad\n ctx.fillRect(gx, gy, gw, gh)\n ctx.restore()\n\n // ── 유리 테두리 ──\n ctx.strokeStyle = 'rgba(255,255,255,0.15)'\n ctx.lineWidth = 1\n ctx.beginPath()\n ctx.roundRect(gx, gy, gw, gh, gr)\n ctx.stroke()\n\n // ── 수치 (게이지 중앙) ──\n ctx.fillStyle = '#ffffff'\n ctx.font = 'bold 14px sans-serif'\n ctx.textAlign = 'center'\n ctx.textBaseline = 'middle'\n ctx.shadowColor = 'rgba(0,0,0,0.7)'\n ctx.shadowBlur = 3\n ctx.fillText(`${Math.round(value)}%`, w / 2, gy + gh / 2)\n ctx.shadowColor = 'transparent'\n ctx.shadowBlur = 0\n\n this._gaugeTexture.needsUpdate = true\n }\n\n updateFillLevel() {\n this._drawGauge()\n }\n\n update() {\n super.update()\n this.updateFillLevel()\n }\n\n updateDimension() {\n this.clear()\n this.build()\n }\n\n onchange(after: Record<string, unknown>, before: Record<string, unknown>) {\n super.onchange(after, before)\n\n if ('value' in after || 'liquidColor' in after) {\n this.updateFillLevel()\n }\n }\n}\n\n/* ── Component 클래스 ── */\n\nconst MixedShape = ValueHolder(RectPath(Shape))\n\n@sceneComponent('tank')\nexport class Tank extends MixedShape {\n is3dish() {\n return true\n }\n\n buildRealObject(): RealObject | undefined {\n return new Tank3D(this as any)\n }\n\n get nature() {\n return NATURE\n }\n\n onchange(after: Record<string, unknown>, before: Record<string, unknown>) {\n super.onchange(after, before)\n\n if ('value' in after || 'liquidColor' in after) {\n this.invalidate()\n }\n }\n\n render(ctx: CanvasRenderingContext2D) {\n const { left, top, width, height } = this.bounds\n\n renderTank(ctx, left, top, width, height, this.value, this.getState('liquidColor') || LIQUID_COLOR)\n\n ctx.beginPath()\n ctx.rect(left, top, width, height)\n }\n\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
type: string;
|
|
3
|
+
description: string;
|
|
4
|
+
group: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
model: {
|
|
7
|
+
type: string;
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
depth: number;
|
|
13
|
+
fillStyle: string;
|
|
14
|
+
strokeStyle: string;
|
|
15
|
+
lineWidth: number;
|
|
16
|
+
alpha: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const icon = new URL('../../icons/carrier.png', import.meta.url).href;
|
|
2
|
+
export default {
|
|
3
|
+
type: 'carrier',
|
|
4
|
+
description: 'Carrier (Pallet/Box)',
|
|
5
|
+
group: 'warehouse' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,
|
|
6
|
+
icon,
|
|
7
|
+
model: {
|
|
8
|
+
type: 'carrier',
|
|
9
|
+
left: 100,
|
|
10
|
+
top: 100,
|
|
11
|
+
width: 100,
|
|
12
|
+
height: 80,
|
|
13
|
+
depth: 30,
|
|
14
|
+
fillStyle: '#c4a265',
|
|
15
|
+
strokeStyle: '#999',
|
|
16
|
+
lineWidth: 1,
|
|
17
|
+
alpha: 1
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=carrier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carrier.js","sourceRoot":"","sources":["../../src/templates/carrier.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,yBAAyB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAErE,eAAe;IACb,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,sBAAsB;IACnC,KAAK,EAAE,WAAW,CAAC,gGAAgG;IACnH,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,GAAG;QACR,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;KACT;CACF,CAAA","sourcesContent":["const icon = new URL('../../icons/carrier.png', import.meta.url).href\n\nexport default {\n type: 'carrier',\n description: 'Carrier (Pallet/Box)',\n group: 'warehouse' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,\n icon,\n model: {\n type: 'carrier',\n left: 100,\n top: 100,\n width: 100,\n height: 80,\n depth: 30,\n fillStyle: '#c4a265',\n strokeStyle: '#999',\n lineWidth: 1,\n alpha: 1\n }\n}\n"]}
|
package/dist/templates/cube.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cube.js","sourceRoot":"","sources":["../../src/templates/cube.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAElE,eAAe;IACb,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,SAAS;IACtB,KAAK,EAAE,IAAI,CAAC,gGAAgG;IAC5G,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,GAAG;QACR,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;KACT;CACF,CAAA","sourcesContent":["const icon = new URL('../../icons/cube.png', import.meta.url).href\n\nexport default {\n type: 'cube',\n description: '3D cube',\n group: '3D' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,\n icon,\n model: {\n type: 'cube',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n depth: 100,\n fillStyle: '#
|
|
1
|
+
{"version":3,"file":"cube.js","sourceRoot":"","sources":["../../src/templates/cube.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAElE,eAAe;IACb,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,SAAS;IACtB,KAAK,EAAE,IAAI,CAAC,gGAAgG;IAC5G,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,GAAG;QACR,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;KACT;CACF,CAAA","sourcesContent":["const icon = new URL('../../icons/cube.png', import.meta.url).href\n\nexport default {\n type: 'cube',\n description: '3D cube',\n group: '3D' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,\n icon,\n model: {\n type: 'cube',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n depth: 100,\n fillStyle: '#aaaaaa',\n strokeStyle: '#999',\n lineWidth: 1,\n alpha: 1\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cylinder.js","sourceRoot":"","sources":["../../src/templates/cylinder.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,0BAA0B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAEtE,eAAe;IACb,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE,IAAI,CAAC,gGAAgG;IAC5G,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"cylinder.js","sourceRoot":"","sources":["../../src/templates/cylinder.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,0BAA0B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAEtE,eAAe;IACb,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE,IAAI,CAAC,gGAAgG;IAC5G,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;KACT;CACF,CAAA","sourcesContent":["const icon = new URL('../../icons/cylinder.png', import.meta.url).href\n\nexport default {\n type: 'cylinder',\n description: '3D cylinder',\n group: '3D' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,\n icon,\n model: {\n type: 'cylinder',\n cx: 100,\n cy: 100,\n rx: 50,\n ry: 50,\n depth: 100,\n fillStyle: '#aaaaaa',\n strokeStyle: '#999',\n lineWidth: 1,\n alpha: 1\n }\n}\n"]}
|
package/dist/templates/index.js
CHANGED
|
@@ -11,6 +11,10 @@ import desk from './desk.js';
|
|
|
11
11
|
import camera from './camera.js';
|
|
12
12
|
import light from './light.js';
|
|
13
13
|
import GLTFObject from './gltf-object.js';
|
|
14
|
+
import signalTower from './signal-tower.js';
|
|
15
|
+
import tank from './tank.js';
|
|
16
|
+
import vehicle from './vehicle.js';
|
|
17
|
+
import carrier from './carrier.js';
|
|
14
18
|
export default [
|
|
15
19
|
threeContainer,
|
|
16
20
|
visualizer,
|
|
@@ -24,6 +28,10 @@ export default [
|
|
|
24
28
|
banner,
|
|
25
29
|
wall,
|
|
26
30
|
desk,
|
|
27
|
-
GLTFObject
|
|
31
|
+
GLTFObject,
|
|
32
|
+
signalTower,
|
|
33
|
+
tank,
|
|
34
|
+
vehicle,
|
|
35
|
+
carrier
|
|
28
36
|
];
|
|
29
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,UAAU,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,UAAU,MAAM,kBAAkB,CAAA;AACzC,OAAO,WAAW,MAAM,mBAAmB,CAAA;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,OAAO,MAAM,cAAc,CAAA;AAElC,eAAe;IACb,cAAc;IACd,UAAU;IACV,SAAS;IACT,MAAM;IACN,KAAK;IACL,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,MAAM;IACN,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,UAAU;IACV,WAAW;IACX,IAAI;IACJ,OAAO;IACP,OAAO;CACR,CAAA","sourcesContent":["import threeContainer from './3d-container.js'\nimport visualizer from './visualizer.js'\nimport rackTable from './rack-table.js'\nimport cube from './cube.js'\nimport cylinder from './cylinder.js'\nimport sphere from './sphere.js'\nimport banner from './banner.js'\nimport sprite from './sprite.js'\nimport wall from './wall.js'\nimport desk from './desk.js'\nimport camera from './camera.js'\nimport light from './light.js'\nimport GLTFObject from './gltf-object.js'\nimport signalTower from './signal-tower.js'\nimport tank from './tank.js'\nimport vehicle from './vehicle.js'\nimport carrier from './carrier.js'\n\nexport default [\n threeContainer,\n visualizer,\n rackTable,\n camera,\n light,\n cube,\n cylinder,\n sphere,\n sprite,\n banner,\n wall,\n desk,\n GLTFObject,\n signalTower,\n tank,\n vehicle,\n carrier\n]\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
type: string;
|
|
3
|
+
description: string;
|
|
4
|
+
group: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
model: {
|
|
7
|
+
type: string;
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
depth: number;
|
|
13
|
+
fillStyle: string;
|
|
14
|
+
strokeStyle: string;
|
|
15
|
+
lineWidth: number;
|
|
16
|
+
alpha: number;
|
|
17
|
+
value: number;
|
|
18
|
+
blink: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const icon = new URL('../../icons/signal-tower.png', import.meta.url).href;
|
|
2
|
+
export default {
|
|
3
|
+
type: 'signal-tower',
|
|
4
|
+
description: 'Signal Tower',
|
|
5
|
+
group: '3D' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,
|
|
6
|
+
icon,
|
|
7
|
+
model: {
|
|
8
|
+
type: 'signal-tower',
|
|
9
|
+
left: 100,
|
|
10
|
+
top: 100,
|
|
11
|
+
width: 10,
|
|
12
|
+
height: 120,
|
|
13
|
+
depth: 100,
|
|
14
|
+
fillStyle: '#333333',
|
|
15
|
+
strokeStyle: '#999',
|
|
16
|
+
lineWidth: 1,
|
|
17
|
+
alpha: 1,
|
|
18
|
+
value: 0,
|
|
19
|
+
blink: false
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=signal-tower.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal-tower.js","sourceRoot":"","sources":["../../src/templates/signal-tower.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,8BAA8B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAE1E,eAAe;IACb,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,KAAK,EAAE,IAAI,CAAC,gGAAgG;IAC5G,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,GAAG;QACR,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,KAAK;KACb;CACF,CAAA","sourcesContent":["const icon = new URL('../../icons/signal-tower.png', import.meta.url).href\n\nexport default {\n type: 'signal-tower',\n description: 'Signal Tower',\n group: '3D' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,\n icon,\n model: {\n type: 'signal-tower',\n left: 100,\n top: 100,\n width: 10,\n height: 120,\n depth: 100,\n fillStyle: '#333333',\n strokeStyle: '#999',\n lineWidth: 1,\n alpha: 1,\n value: 0,\n blink: false\n }\n}\n"]}
|
package/dist/templates/sphere.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sphere.js","sourceRoot":"","sources":["../../src/templates/sphere.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,wBAAwB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAEpE,eAAe;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,WAAW;IACxB,KAAK,EAAE,IAAI,CAAC,gGAAgG;IAC5G,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"sphere.js","sourceRoot":"","sources":["../../src/templates/sphere.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,wBAAwB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAEpE,eAAe;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,WAAW;IACxB,KAAK,EAAE,IAAI,CAAC,gGAAgG;IAC5G,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,GAAG;QACP,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;KACT;CACF,CAAA","sourcesContent":["const icon = new URL('../../icons/sphere.png', import.meta.url).href\n\nexport default {\n type: 'sphere',\n description: '3D sphere',\n group: '3D' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,\n icon,\n model: {\n type: 'sphere',\n cx: 100,\n cy: 100,\n rx: 50,\n ry: 50,\n rz: 50,\n zPos: 50,\n fillStyle: '#aaaaaa',\n strokeStyle: '#999',\n lineWidth: 1,\n alpha: 1\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
type: string;
|
|
3
|
+
description: string;
|
|
4
|
+
group: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
model: {
|
|
7
|
+
type: string;
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
depth: number;
|
|
13
|
+
fillStyle: string;
|
|
14
|
+
strokeStyle: string;
|
|
15
|
+
lineWidth: number;
|
|
16
|
+
alpha: number;
|
|
17
|
+
value: number;
|
|
18
|
+
liquidColor: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const icon = new URL('../../icons/tank.png', import.meta.url).href;
|
|
2
|
+
export default {
|
|
3
|
+
type: 'tank',
|
|
4
|
+
description: 'Tank',
|
|
5
|
+
group: '3D' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,
|
|
6
|
+
icon,
|
|
7
|
+
model: {
|
|
8
|
+
type: 'tank',
|
|
9
|
+
left: 100,
|
|
10
|
+
top: 100,
|
|
11
|
+
width: 80,
|
|
12
|
+
height: 120,
|
|
13
|
+
depth: 100,
|
|
14
|
+
fillStyle: '#aaaaaa',
|
|
15
|
+
strokeStyle: '#999',
|
|
16
|
+
lineWidth: 1,
|
|
17
|
+
alpha: 1,
|
|
18
|
+
value: 50,
|
|
19
|
+
liquidColor: 'red'
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=tank.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tank.js","sourceRoot":"","sources":["../../src/templates/tank.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAElE,eAAe;IACb,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,MAAM;IACnB,KAAK,EAAE,IAAI,CAAC,gGAAgG;IAC5G,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,GAAG;QACR,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,GAAG;QACX,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,KAAK;KACnB;CACF,CAAA","sourcesContent":["const icon = new URL('../../icons/tank.png', import.meta.url).href\n\nexport default {\n type: 'tank',\n description: 'Tank',\n group: '3D' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,\n icon,\n model: {\n type: 'tank',\n left: 100,\n top: 100,\n width: 80,\n height: 120,\n depth: 100,\n fillStyle: '#aaaaaa',\n strokeStyle: '#999',\n lineWidth: 1,\n alpha: 1,\n value: 50,\n liquidColor: 'red'\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
type: string;
|
|
3
|
+
description: string;
|
|
4
|
+
group: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
model: {
|
|
7
|
+
type: string;
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
depth: number;
|
|
13
|
+
fillStyle: string;
|
|
14
|
+
strokeStyle: string;
|
|
15
|
+
lineWidth: number;
|
|
16
|
+
alpha: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|