@fmsim/machine 2.0.0-beta.26 → 2.0.0-beta.27

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fmsim/machine",
3
3
  "description": "Layout View를 구성하는 설비(machine)들과 유닛을 구현한 모듈입니다.",
4
4
  "author": "heartyoh",
5
- "version": "2.0.0-beta.26",
5
+ "version": "2.0.0-beta.27",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "things-scene": true,
@@ -55,5 +55,5 @@
55
55
  "prettier --write"
56
56
  ]
57
57
  },
58
- "gitHead": "11c0e386bab09770e69f0d5d25009322a7dc8f71"
58
+ "gitHead": "6482e3e211dcafba99eef49819737c10108e99d0"
59
59
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  import * as THREE from 'three'
12
12
  import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js'
13
- import { RealObjectGroup, registerRealObjectFactory, disposeObject3D } from '@hatiolab/things-scene'
13
+ import { RealObjectGroup, registerRealObjectFactory, disposeObject3D, TriangleExtrude } from '@hatiolab/things-scene'
14
14
  import type { Component } from '@hatiolab/things-scene'
15
15
  import { LEGEND_CAPACITY } from '../features/mcs-status-default'
16
16
  import { getVaueOnRanges } from '../utils/get-value-on-ranges'
@@ -978,3 +978,11 @@ class NodeRealObject3D extends RealObjectGroup {
978
978
  }
979
979
 
980
980
  registerRealObjectFactory('Node', (component: Component) => new NodeRealObject3D(component))
981
+
982
+ // Scanner — Triangle extrude + 기본 depth = Port + Carrier 높이
983
+ class ScannerExtrude extends TriangleExtrude {
984
+ get effectiveDepth(): number {
985
+ return this.component.state.depth || TRANSPORT_SURFACE_HEIGHT * 1.3
986
+ }
987
+ }
988
+ registerRealObjectFactory('Scanner', (component: Component) => new ScannerExtrude(component))
package/src/index.ts CHANGED
@@ -27,6 +27,7 @@ import './equipment'
27
27
  import './oht-line'
28
28
  import './stocker'
29
29
  import './crane-rail'
30
+ import './scanner'
30
31
 
31
32
  // vehicles
32
33
  import './agv'
@@ -74,6 +75,7 @@ export { default as Equipment } from './equipment'
74
75
  export { default as OHTLine } from './oht-line'
75
76
  export { default as Stocker } from './stocker'
76
77
  export { default as CraneRail } from './crane-rail'
78
+ export { default as Scanner } from './scanner'
77
79
 
78
80
  // ── vehicles ──
79
81
  export { default as AGV } from './agv'
package/src/scanner.ts ADDED
@@ -0,0 +1,29 @@
1
+ import { Component, ComponentNature, Triangle, sceneComponent } from '@hatiolab/things-scene'
2
+ import { MCSStatusMixin } from './features/mcs-status-mixin'
3
+
4
+ const NATURE: ComponentNature = {
5
+ mutable: true,
6
+ resizable: false,
7
+ rotatable: true,
8
+ properties: [
9
+ {
10
+ type: 'number',
11
+ label: 'round',
12
+ name: 'round',
13
+ property: { min: 0, max: 100, step: 1 }
14
+ }
15
+ ]
16
+ }
17
+
18
+ @sceneComponent('Scanner')
19
+ export default class Scanner extends MCSStatusMixin(Triangle) {
20
+ static get nature() {
21
+ return NATURE
22
+ }
23
+
24
+ is3dish() {
25
+ return true
26
+ }
27
+ }
28
+
29
+ Component.memoize(Scanner.prototype, 'path', false)
@@ -17,6 +17,7 @@ import agvLine from './agv-line'
17
17
  import ohtLine from './oht-line'
18
18
  import conveyor from './conveyor'
19
19
 
20
+ import Scanner from './scanner'
20
21
  import Node from './node'
21
22
  import DataSubscription from './data-subscription'
22
23
  import FloatingContainer from './floating-container'
@@ -41,6 +42,7 @@ export default [
41
42
  Shelf,
42
43
  Port,
43
44
 
45
+ Scanner,
44
46
  Node,
45
47
  FloatingContainer,
46
48
  DataSubscription
@@ -0,0 +1,20 @@
1
+ const icon = new URL('../../icons/equipment.png', import.meta.url).href
2
+
3
+ export default {
4
+ type: 'Scanner',
5
+ description: 'Fixed mount barcode/QR scanner',
6
+ group: ['etc'],
7
+ icon,
8
+ model: {
9
+ type: 'Scanner',
10
+ x1: 100,
11
+ y1: 100,
12
+ x2: 130,
13
+ y2: 110,
14
+ x3: 100,
15
+ y3: 120,
16
+ strokeStyle: '#333',
17
+ fillStyle: '#8899aa',
18
+ lineWidth: 1
19
+ }
20
+ }