@fmsim/machine 1.0.88 → 2.0.0-beta.100
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/agv-line.js.map +1 -1
- package/dist/agv.js +6 -2
- package/dist/agv.js.map +1 -1
- package/dist/buffer.js.map +1 -1
- package/dist/carrier-manager.js +183 -0
- package/dist/carrier-manager.js.map +1 -0
- package/dist/carrier.js +105 -14
- package/dist/carrier.js.map +1 -1
- package/dist/conveyor-join.js +8 -2
- package/dist/conveyor-join.js.map +1 -1
- package/dist/conveyor.js +9 -1
- package/dist/conveyor.js.map +1 -1
- package/dist/crane-rail.js +53 -0
- package/dist/crane-rail.js.map +1 -0
- package/dist/crane.js +144 -1
- package/dist/crane.js.map +1 -1
- package/dist/equipment.js.map +1 -1
- package/dist/factories/agv-3d.js +147 -0
- package/dist/factories/agv-3d.js.map +1 -0
- package/dist/factories/conveyor-3d.js +345 -0
- package/dist/factories/conveyor-3d.js.map +1 -0
- package/dist/factories/crane-3d.js +186 -0
- package/dist/factories/crane-3d.js.map +1 -0
- package/dist/factories/crane-rail-3d.js +95 -0
- package/dist/factories/crane-rail-3d.js.map +1 -0
- package/dist/factories/machine-3d.js +973 -0
- package/dist/factories/machine-3d.js.map +1 -0
- package/dist/factories/oht-3d.js +177 -0
- package/dist/factories/oht-3d.js.map +1 -0
- package/dist/factories/shuttle-3d.js +159 -0
- package/dist/factories/shuttle-3d.js.map +1 -0
- package/dist/factories/z-priority-defaults.js +33 -0
- package/dist/factories/z-priority-defaults.js.map +1 -0
- package/dist/factories/z-priority.js +54 -0
- package/dist/factories/z-priority.js.map +1 -0
- package/dist/features/conveyor-mixin.js.map +1 -1
- package/dist/features/mcs-status-default.js +15 -1
- package/dist/features/mcs-status-default.js.map +1 -1
- package/dist/features/mcs-status-mixin.js +22 -0
- package/dist/features/mcs-status-mixin.js.map +1 -1
- package/dist/features/mcs-zone-mixin.js.map +1 -1
- package/dist/features/parent-object-mixin.js +15 -7
- package/dist/features/parent-object-mixin.js.map +1 -1
- package/dist/floating-container.js +5 -0
- package/dist/floating-container.js.map +1 -1
- package/dist/index.js +58 -2
- package/dist/index.js.map +1 -1
- package/dist/mcs-carrier-holder.js +56 -17
- package/dist/mcs-carrier-holder.js.map +1 -1
- package/dist/mcs-machine.js +39 -0
- package/dist/mcs-machine.js.map +1 -1
- package/dist/mcs-unit.js +20 -0
- package/dist/mcs-unit.js.map +1 -1
- package/dist/mcs-vehicle.js +10 -4
- package/dist/mcs-vehicle.js.map +1 -1
- package/dist/node.js +10 -3
- package/dist/node.js.map +1 -1
- package/dist/oht-line.js.map +1 -1
- package/dist/oht.js +4 -0
- package/dist/oht.js.map +1 -1
- package/dist/port-flow.js +4 -0
- package/dist/port-flow.js.map +1 -1
- package/dist/port.js +4 -0
- package/dist/port.js.map +1 -1
- package/dist/scanner.js +30 -0
- package/dist/scanner.js.map +1 -0
- package/dist/scene/root-container-override.js +160 -96
- package/dist/scene/root-container-override.js.map +1 -1
- package/dist/shelf.js +4 -0
- package/dist/shelf.js.map +1 -1
- package/dist/shuttle.js.map +1 -1
- package/dist/static-container.js +5 -0
- package/dist/static-container.js.map +1 -1
- package/dist/stocker-abnormal-bar.js +184 -0
- package/dist/stocker-abnormal-bar.js.map +1 -0
- package/dist/stocker-capacity-bar.js +253 -6
- package/dist/stocker-capacity-bar.js.map +1 -1
- package/dist/stocker-carrier-bar.js +198 -0
- package/dist/stocker-carrier-bar.js.map +1 -0
- package/dist/stocker.js +7 -1
- package/dist/stocker.js.map +1 -1
- package/dist/templates/backdrop.js +30 -0
- package/dist/templates/backdrop.js.map +1 -0
- package/dist/templates/decal.js +21 -0
- package/dist/templates/decal.js.map +1 -0
- package/dist/templates/index.js +7 -1
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/scanner.js +20 -0
- package/dist/templates/scanner.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/crane-position.js +83 -0
- package/dist/utils/crane-position.js.map +1 -0
- package/dist/utils/data-value.js +21 -0
- package/dist/utils/data-value.js.map +1 -0
- package/dist/utils/fit-gauge-scale.js +28 -0
- package/dist/utils/fit-gauge-scale.js.map +1 -0
- package/dist/utils/get-value-on-ranges.js +2 -4
- package/dist/utils/get-value-on-ranges.js.map +1 -1
- package/dist/utils/stocker-gauge.js +78 -0
- package/dist/utils/stocker-gauge.js.map +1 -0
- package/dist/zone-capacity-bar.js +3 -3
- package/dist/zone-capacity-bar.js.map +1 -1
- package/icons/backdrop.png +0 -0
- package/icons/decal.png +0 -0
- package/jest.config.js +10 -0
- package/package.json +7 -6
- package/src/agv-line.ts +1 -1
- package/src/agv.ts +10 -5
- package/src/buffer.ts +1 -1
- package/src/carrier-manager.ts +223 -0
- package/src/carrier.ts +111 -18
- package/src/conveyor-join.ts +6 -3
- package/src/conveyor.ts +10 -2
- package/src/crane-rail.ts +58 -0
- package/src/crane.ts +182 -2
- package/src/equipment.ts +1 -1
- package/src/factories/agv-3d.ts +160 -0
- package/src/factories/conveyor-3d.ts +398 -0
- package/src/factories/crane-3d.ts +217 -0
- package/src/factories/crane-rail-3d.ts +115 -0
- package/src/factories/machine-3d.ts +1192 -0
- package/src/factories/oht-3d.ts +196 -0
- package/src/factories/shuttle-3d.ts +179 -0
- package/src/factories/z-priority-defaults.ts +38 -0
- package/src/factories/z-priority.ts +60 -0
- package/src/features/conveyor-mixin.ts +1 -1
- package/src/features/mcs-status-default.ts +15 -1
- package/src/features/mcs-status-mixin.ts +26 -4
- package/src/features/mcs-zone-mixin.ts +1 -1
- package/src/features/parent-object-mixin.ts +17 -8
- package/src/floating-container.ts +5 -0
- package/src/index.ts +66 -2
- package/src/mcs-carrier-holder.ts +58 -29
- package/src/mcs-machine.ts +43 -1
- package/src/mcs-unit.ts +25 -2
- package/src/mcs-vehicle.ts +12 -9
- package/src/node.ts +9 -3
- package/src/oht-line.ts +1 -1
- package/src/oht.ts +7 -2
- package/src/port-flow.ts +6 -1
- package/src/port.ts +6 -1
- package/src/scanner.ts +29 -0
- package/src/scene/root-container-override.ts +156 -105
- package/src/shelf.ts +6 -1
- package/src/shuttle.ts +1 -1
- package/src/static-container.ts +5 -0
- package/src/stocker-abnormal-bar.ts +247 -0
- package/src/stocker-capacity-bar.ts +301 -10
- package/src/stocker-carrier-bar.ts +262 -0
- package/src/stocker.ts +10 -3
- package/src/templates/backdrop.ts +30 -0
- package/src/templates/decal.ts +21 -0
- package/src/templates/index.ts +7 -1
- package/src/templates/scanner.ts +20 -0
- package/src/utils/crane-position.ts +105 -0
- package/src/utils/data-value.ts +19 -0
- package/src/utils/fit-gauge-scale.ts +35 -0
- package/src/utils/get-value-on-ranges.ts +2 -4
- package/src/utils/stocker-gauge.ts +111 -0
- package/src/zone-capacity-bar.ts +5 -5
- package/translations/en.json +26 -1
- package/translations/ja.json +26 -1
- package/translations/ko.json +26 -1
- package/translations/ms.json +26 -1
- package/translations/zh.json +26 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CraneRail 3D Factory
|
|
3
|
+
*
|
|
4
|
+
* 스토커 내부 스태커 크레인의 주행 레일.
|
|
5
|
+
* 바닥 레일 + 천장 가이드 레일로 크레인의 2축 이동(수평 주행 + 수직 승강)을 지원.
|
|
6
|
+
*
|
|
7
|
+
* 구조 (바닥 원점, y=0~depth):
|
|
8
|
+
* - 바닥 레일: 2개의 평행 트랙 (크레인 바퀴 주행)
|
|
9
|
+
* - 천장 가이드 레일: 2개의 평행 트랙 (마스트 상단 안내)
|
|
10
|
+
* - 수직 지지대: 양 끝단 기둥 (바닥~천장 연결)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import * as THREE from 'three'
|
|
14
|
+
import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js'
|
|
15
|
+
import { RealObjectGroup, registerRealObjectFactory } from '@hatiolab/things-scene'
|
|
16
|
+
import type { Component } from '@hatiolab/things-scene'
|
|
17
|
+
import { TRANSPORT_SURFACE_HEIGHT } from './machine-3d.js'
|
|
18
|
+
import { Z_FMSIM } from './z-priority'
|
|
19
|
+
|
|
20
|
+
const RAIL_COLOR = 0x666677
|
|
21
|
+
const SUPPORT_COLOR = 0x555566
|
|
22
|
+
|
|
23
|
+
/** 크레인 레일 기본 높이: 스토커와 동일 */
|
|
24
|
+
const DEFAULT_RAIL_DEPTH = 5 * TRANSPORT_SURFACE_HEIGHT
|
|
25
|
+
|
|
26
|
+
export class CraneRail3D extends RealObjectGroup {
|
|
27
|
+
get zPriority(): number { return Z_FMSIM.CRANE_RAIL }
|
|
28
|
+
|
|
29
|
+
get effectiveDepth(): number {
|
|
30
|
+
const { depth } = this.component.state
|
|
31
|
+
return depth || DEFAULT_RAIL_DEPTH
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
build() {
|
|
35
|
+
super.build()
|
|
36
|
+
|
|
37
|
+
const { width = 10, height = 10 } = this.component.state
|
|
38
|
+
const w = Math.abs(width)
|
|
39
|
+
const h = Math.abs(height)
|
|
40
|
+
const d = this.effectiveDepth
|
|
41
|
+
if (!w || !h) return
|
|
42
|
+
|
|
43
|
+
const inner = this.components3D
|
|
44
|
+
|
|
45
|
+
const railH = Math.max(d * 0.02, 2) // 레일 높이 (얇은 트랙)
|
|
46
|
+
const railW = Math.max(h * 0.06, 2) // 레일 폭
|
|
47
|
+
const supportThick = Math.max(Math.min(w, h) * 0.05, 2)
|
|
48
|
+
|
|
49
|
+
const railMat = new THREE.MeshStandardMaterial({
|
|
50
|
+
color: RAIL_COLOR,
|
|
51
|
+
roughness: 0.3,
|
|
52
|
+
metalness: 0.7,
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const supportMat = new THREE.MeshStandardMaterial({
|
|
56
|
+
color: SUPPORT_COLOR,
|
|
57
|
+
roughness: 0.5,
|
|
58
|
+
metalness: 0.5,
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
// ── 바닥 레일 (2개 평행 트랙) ──
|
|
62
|
+
const bottomGeometries: THREE.BufferGeometry[] = []
|
|
63
|
+
for (const zSign of [-1, 1]) {
|
|
64
|
+
const rail = new THREE.BoxGeometry(w, railH, railW)
|
|
65
|
+
rail.translate(0, railH / 2, zSign * (h / 2 - railW / 2))
|
|
66
|
+
bottomGeometries.push(rail)
|
|
67
|
+
}
|
|
68
|
+
const bottomMesh = new THREE.Mesh(BufferGeometryUtils.mergeGeometries(bottomGeometries), railMat)
|
|
69
|
+
bottomMesh.castShadow = true
|
|
70
|
+
bottomMesh.receiveShadow = true
|
|
71
|
+
inner.add(bottomMesh)
|
|
72
|
+
|
|
73
|
+
// ── 천장 가이드 레일 (2개 평행 트랙) ──
|
|
74
|
+
const topGeometries: THREE.BufferGeometry[] = []
|
|
75
|
+
for (const zSign of [-1, 1]) {
|
|
76
|
+
const rail = new THREE.BoxGeometry(w, railH, railW)
|
|
77
|
+
rail.translate(0, d - railH / 2, zSign * (h / 2 - railW / 2))
|
|
78
|
+
topGeometries.push(rail)
|
|
79
|
+
}
|
|
80
|
+
const topMesh = new THREE.Mesh(BufferGeometryUtils.mergeGeometries(topGeometries), railMat)
|
|
81
|
+
topMesh.castShadow = true
|
|
82
|
+
inner.add(topMesh)
|
|
83
|
+
|
|
84
|
+
// ── 양 끝단 수직 지지대 (바닥~천장 연결) ──
|
|
85
|
+
const supportH = d - railH * 2
|
|
86
|
+
const supportGeometries: THREE.BufferGeometry[] = []
|
|
87
|
+
for (const xSign of [-1, 1]) {
|
|
88
|
+
for (const zSign of [-1, 1]) {
|
|
89
|
+
const support = new THREE.BoxGeometry(supportThick, supportH, supportThick)
|
|
90
|
+
support.translate(
|
|
91
|
+
xSign * (w / 2 - supportThick / 2),
|
|
92
|
+
railH + supportH / 2,
|
|
93
|
+
zSign * (h / 2 - railW / 2)
|
|
94
|
+
)
|
|
95
|
+
supportGeometries.push(support)
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const supportMesh = new THREE.Mesh(BufferGeometryUtils.mergeGeometries(supportGeometries), supportMat)
|
|
99
|
+
supportMesh.castShadow = true
|
|
100
|
+
inner.add(supportMesh)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
updateDimension() {}
|
|
104
|
+
updateAlpha() {}
|
|
105
|
+
|
|
106
|
+
onchange(after: Record<string, unknown>, before: Record<string, unknown>) {
|
|
107
|
+
if ('width' in after || 'height' in after || 'depth' in after || 'fillStyle' in after || 'strokeStyle' in after) {
|
|
108
|
+
this.update()
|
|
109
|
+
return
|
|
110
|
+
}
|
|
111
|
+
super.onchange(after, before)
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
registerRealObjectFactory('CraneRail', (component: Component) => new CraneRail3D(component))
|