@operato/scene-indoor-map 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- package/@types/global/index.d.ts +1 -0
- package/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +15 -0
- package/assets/beacon.png +0 -0
- package/assets/indoor-map.png +0 -0
- package/assets/no-image.png +0 -0
- package/assets/rack.png +0 -0
- package/demo/imu-mqtt-node/imu-publisher.js +66 -0
- package/demo/imu-mqtt-node/package.json +16 -0
- package/demo/index-camera.html +108 -0
- package/demo/index-gaussian.html +184 -0
- package/demo/index-indoor-map-property.html +96 -0
- package/demo/index-indoor-map.html +289 -0
- package/demo/index-rack-property.html +76 -0
- package/demo/index.html +365 -0
- package/demo/things-scene-indoor-map.html +6 -0
- package/dist/beacon.d.ts +19 -0
- package/dist/beacon.js +61 -0
- package/dist/beacon.js.map +1 -0
- package/dist/camera.d.ts +20 -0
- package/dist/camera.js +158 -0
- package/dist/camera.js.map +1 -0
- package/dist/editors/index.d.ts +5 -0
- package/dist/editors/index.js +11 -0
- package/dist/editors/index.js.map +1 -0
- package/dist/editors/things-editor-action.d.ts +7 -0
- package/dist/editors/things-editor-action.js +40 -0
- package/dist/editors/things-editor-action.js.map +1 -0
- package/dist/floor.d.ts +23 -0
- package/dist/floor.js +66 -0
- package/dist/floor.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/indoor-map.d.ts +34 -0
- package/dist/indoor-map.js +161 -0
- package/dist/indoor-map.js.map +1 -0
- package/dist/quaternion.d.ts +39 -0
- package/dist/quaternion.js +79 -0
- package/dist/quaternion.js.map +1 -0
- package/dist/rack.d.ts +27 -0
- package/dist/rack.js +84 -0
- package/dist/rack.js.map +1 -0
- package/dist/templates/beacon.d.ts +15 -0
- package/dist/templates/beacon.js +16 -0
- package/dist/templates/beacon.js.map +1 -0
- package/dist/templates/camera.d.ts +20 -0
- package/dist/templates/camera.js +21 -0
- package/dist/templates/camera.js.map +1 -0
- package/dist/templates/index.d.ts +36 -0
- package/dist/templates/index.js +4 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/indoor-map.d.ts +16 -0
- package/dist/templates/indoor-map.js +17 -0
- package/dist/templates/indoor-map.js.map +1 -0
- package/dist/templates/rack.d.ts +22 -0
- package/dist/templates/rack.js +23 -0
- package/dist/templates/rack.js.map +1 -0
- package/helps/scene/component/indoor-map.ko.md +65 -0
- package/helps/scene/component/indoor-map.md +65 -0
- package/helps/scene/component/indoor-map.zh.md +65 -0
- package/helps/scene/component/rack.ko.md +17 -0
- package/helps/scene/component/rack.md +15 -0
- package/helps/scene/component/rack.zh.md +16 -0
- package/helps/scene/images/button-evnet-mapping-01.png +0 -0
- package/helps/scene/images/button-evnet-mapping-02.png +0 -0
- package/helps/scene/images/button-evnet-mapping-03.png +0 -0
- package/helps/scene/images/container-03.png +0 -0
- package/helps/scene/images/indoor-button-finish-01.gif +0 -0
- package/helps/scene/images/indoor-create-01.png +0 -0
- package/helps/scene/images/indoor-create-02.png +0 -0
- package/helps/scene/images/indoor-create-03.png +0 -0
- package/helps/scene/images/indoor-setting-01.png +0 -0
- package/images/icon-button.png +0 -0
- package/package.json +61 -0
- package/src/beacon.ts +69 -0
- package/src/camera.ts +207 -0
- package/src/editors/index.ts +11 -0
- package/src/editors/things-editor-action.ts +48 -0
- package/src/floor.ts +386 -0
- package/src/index.ts +9 -0
- package/src/indoor-map.ts +211 -0
- package/src/quaternion.ts +129 -0
- package/src/rack.ts +104 -0
- package/src/templates/beacon.ts +16 -0
- package/src/templates/camera.ts +21 -0
- package/src/templates/index.ts +4 -0
- package/src/templates/indoor-map.ts +18 -0
- package/src/templates/rack.ts +23 -0
- package/test/basic-test.html +67 -0
- package/test/index.html +22 -0
- package/things-scene.config.js +7 -0
- package/tsconfig.json +23 -0
- package/tsconfig.tsbuildinfo +1 -0
package/dist/rack.js
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright © HatioLab Inc. All rights reserved.
|
3
|
+
*/
|
4
|
+
import { Component, RectPath } from '@hatiolab/things-scene';
|
5
|
+
const NATURE = {
|
6
|
+
mutable: false,
|
7
|
+
resizable: true,
|
8
|
+
rotatable: true,
|
9
|
+
properties: [{
|
10
|
+
type: 'number',
|
11
|
+
label: 'depth',
|
12
|
+
name: 'depth',
|
13
|
+
property: 'depth'
|
14
|
+
}, {
|
15
|
+
type: 'number',
|
16
|
+
label: 'shelves',
|
17
|
+
name: 'shelves',
|
18
|
+
property: 'shelves'
|
19
|
+
}, {
|
20
|
+
type: 'string',
|
21
|
+
label: 'location-pattern',
|
22
|
+
name: 'locPattern',
|
23
|
+
placeholder: '{z}{s}-{u}-{sh}',
|
24
|
+
property: 'locPattern'
|
25
|
+
}, {
|
26
|
+
type: 'string',
|
27
|
+
label: 'zone',
|
28
|
+
name: 'zone',
|
29
|
+
property: 'zone'
|
30
|
+
}, {
|
31
|
+
type: 'string',
|
32
|
+
label: 'section',
|
33
|
+
name: 'section',
|
34
|
+
property: 'section'
|
35
|
+
}, {
|
36
|
+
type: 'string',
|
37
|
+
label: 'unit',
|
38
|
+
name: 'unit',
|
39
|
+
property: 'unit'
|
40
|
+
}, {
|
41
|
+
type: 'string',
|
42
|
+
label: 'shelf-pattern',
|
43
|
+
name: 'shelfPattern',
|
44
|
+
placeholder: '#',
|
45
|
+
property: 'shelfPattern'
|
46
|
+
}],
|
47
|
+
help: 'scene/component/rack'
|
48
|
+
};
|
49
|
+
export default class Rack extends RectPath(Component) {
|
50
|
+
is3dish() {
|
51
|
+
return true;
|
52
|
+
}
|
53
|
+
draw(context) {
|
54
|
+
var { left, top, width, height, strokeStyle, lineWidth, fillStyle, alpha = 1, } = this.model;
|
55
|
+
context.beginPath();
|
56
|
+
context.rect(left, top, width, height);
|
57
|
+
context.strokeStyle = strokeStyle;
|
58
|
+
context.lineWidth = lineWidth;
|
59
|
+
context.globalAlpha = alpha * 0.4;
|
60
|
+
context.stroke();
|
61
|
+
context.beginPath();
|
62
|
+
context.rect(left + width * 0.15, top + height * 0.15, width * 0.7, height * 0.7);
|
63
|
+
context.fillStyle = fillStyle;
|
64
|
+
context.globalAlpha = alpha * 0.5;
|
65
|
+
context.fill();
|
66
|
+
context.beginPath();
|
67
|
+
context.moveTo(left, top);
|
68
|
+
context.lineTo(left + width, top + height);
|
69
|
+
context.moveTo(left, top + height);
|
70
|
+
context.lineTo(left + width, top);
|
71
|
+
context.strokeStyle = strokeStyle;
|
72
|
+
context.lineWidth = lineWidth;
|
73
|
+
context.globalAlpha = alpha * 0.4;
|
74
|
+
context.stroke();
|
75
|
+
}
|
76
|
+
get nature() {
|
77
|
+
return NATURE;
|
78
|
+
}
|
79
|
+
get hasTextProperty() {
|
80
|
+
return false;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
Component.register('rack', Rack);
|
84
|
+
//# sourceMappingURL=rack.js.map
|
package/dist/rack.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rack.js","sourceRoot":"","sources":["../src/rack.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport { Component, RectPath } from '@hatiolab/things-scene';\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [{\n type: 'number',\n label: 'depth',\n name: 'depth',\n property: 'depth'\n }, {\n type: 'number',\n label: 'shelves',\n name: 'shelves',\n property: 'shelves'\n }, {\n type: 'string',\n label: 'location-pattern',\n name: 'locPattern',\n placeholder: '{z}{s}-{u}-{sh}',\n property: 'locPattern'\n }, {\n type: 'string',\n label: 'zone',\n name: 'zone',\n property: 'zone'\n }, {\n type: 'string',\n label: 'section',\n name: 'section',\n property: 'section'\n }, {\n type: 'string',\n label: 'unit',\n name: 'unit',\n property: 'unit'\n }, {\n type: 'string',\n label: 'shelf-pattern',\n name: 'shelfPattern',\n placeholder: '#',\n property: 'shelfPattern'\n }],\n help: 'scene/component/rack'\n}\n\nexport default class Rack extends RectPath(Component) {\n\n is3dish() {\n return true\n }\n\n draw(context: CanvasRenderingContext2D) {\n\n var {\n left,\n top,\n width,\n height,\n strokeStyle,\n lineWidth,\n fillStyle,\n alpha = 1,\n } = this.model;\n\n context.beginPath()\n context.rect(left, top, width, height)\n context.strokeStyle = strokeStyle\n context.lineWidth = lineWidth\n context.globalAlpha = alpha * 0.4\n context.stroke()\n\n context.beginPath()\n context.rect(left + width * 0.15, top + height * 0.15, width * 0.7, height * 0.7)\n context.fillStyle = fillStyle\n context.globalAlpha = alpha * 0.5\n context.fill()\n\n context.beginPath()\n context.moveTo(left, top)\n context.lineTo(left + width, top + height)\n context.moveTo(left, top + height)\n context.lineTo(left + width, top)\n context.strokeStyle = strokeStyle\n context.lineWidth = lineWidth\n context.globalAlpha = alpha * 0.4\n context.stroke()\n }\n\n get nature() {\n return NATURE\n }\n\n get hasTextProperty() {\n return false;\n }\n\n}\n\nComponent.register('rack', Rack)\n"]}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import icon from '../../assets/beacon.png';
|
2
|
+
export default {
|
3
|
+
type: 'beacon',
|
4
|
+
description: 'beacon',
|
5
|
+
group: 'IoT',
|
6
|
+
icon,
|
7
|
+
model: {
|
8
|
+
type: 'beacon',
|
9
|
+
left: 100,
|
10
|
+
top: 100,
|
11
|
+
zPos: 0,
|
12
|
+
width: 100,
|
13
|
+
height: 100
|
14
|
+
}
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=beacon.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"beacon.js","sourceRoot":"","sources":["../../src/templates/beacon.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,yBAAyB,CAAC;AAE3C,eAAe;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,KAAK,EAAE,KAAK;IACZ,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;KACZ;CACF,CAAA","sourcesContent":["import icon from '../../assets/beacon.png';\n\nexport default {\n type: 'beacon',\n description: 'beacon',\n group: 'IoT', /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */\n icon,\n model: {\n type: 'beacon',\n left: 100,\n top: 100,\n zPos: 0,\n width: 100,\n height: 100\n }\n}\n"]}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
type: string;
|
3
|
+
description: string;
|
4
|
+
group: string;
|
5
|
+
icon: any;
|
6
|
+
model: {
|
7
|
+
type: string;
|
8
|
+
left: number;
|
9
|
+
top: number;
|
10
|
+
width: number;
|
11
|
+
height: number;
|
12
|
+
lineWidth: number;
|
13
|
+
strokeStyle: string;
|
14
|
+
fillStyle: string;
|
15
|
+
yaw: number;
|
16
|
+
pitch: number;
|
17
|
+
roll: number;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export default _default;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import icon from '../../assets/no-image.png';
|
2
|
+
export default {
|
3
|
+
type: 'camera',
|
4
|
+
description: 'camera',
|
5
|
+
group: 'IoT',
|
6
|
+
icon,
|
7
|
+
model: {
|
8
|
+
type: 'camera',
|
9
|
+
left: 100,
|
10
|
+
top: 100,
|
11
|
+
width: 600,
|
12
|
+
height: 400,
|
13
|
+
lineWidth: 1,
|
14
|
+
strokeStyle: 'black',
|
15
|
+
fillStyle: 'yellow',
|
16
|
+
yaw: 0.2,
|
17
|
+
pitch: 0.2,
|
18
|
+
roll: 0.2
|
19
|
+
}
|
20
|
+
};
|
21
|
+
//# sourceMappingURL=camera.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"camera.js","sourceRoot":"","sources":["../../src/templates/camera.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,2BAA2B,CAAC;AAE7C,eAAe;IACb,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,KAAK,EAAE,KAAK;IACZ,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,GAAG;QACR,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,QAAQ;QACnB,GAAG,EAAE,GAAG;QACR,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,GAAG;KACV;CACF,CAAA","sourcesContent":["import icon from '../../assets/no-image.png';\n\nexport default {\n type: 'camera',\n description: 'camera',\n group: 'IoT', /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */\n icon,\n model: {\n type: 'camera',\n left: 100,\n top: 100,\n width: 600,\n height: 400,\n lineWidth: 1,\n strokeStyle: 'black',\n fillStyle: 'yellow',\n yaw: 0.2,\n pitch: 0.2,\n roll: 0.2\n }\n}\n"]}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
declare const _default: ({
|
2
|
+
type: string;
|
3
|
+
description: string;
|
4
|
+
group: string;
|
5
|
+
icon: any;
|
6
|
+
model: {
|
7
|
+
type: string;
|
8
|
+
left: number;
|
9
|
+
top: number;
|
10
|
+
width: number;
|
11
|
+
height: number;
|
12
|
+
fontSize: number;
|
13
|
+
lineWidth: number;
|
14
|
+
};
|
15
|
+
} | {
|
16
|
+
type: string;
|
17
|
+
description: string;
|
18
|
+
group: string;
|
19
|
+
icon: any;
|
20
|
+
model: {
|
21
|
+
type: string;
|
22
|
+
left: number;
|
23
|
+
top: number;
|
24
|
+
width: number;
|
25
|
+
height: number;
|
26
|
+
depth: number;
|
27
|
+
shelves: number;
|
28
|
+
locPattern: string;
|
29
|
+
shelfPattern: string;
|
30
|
+
fillStyle: string;
|
31
|
+
strokeStyle: string;
|
32
|
+
lineWidth: number;
|
33
|
+
alpha: number;
|
34
|
+
};
|
35
|
+
})[];
|
36
|
+
export default _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,IAAI,MAAM,QAAQ,CAAA;AAEzB,eAAe,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA","sourcesContent":["import indoorMap from './indoor-map'\nimport rack from './rack'\n\nexport default [indoorMap, rack]\n"]}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
type: string;
|
3
|
+
description: string;
|
4
|
+
group: string;
|
5
|
+
icon: any;
|
6
|
+
model: {
|
7
|
+
type: string;
|
8
|
+
left: number;
|
9
|
+
top: number;
|
10
|
+
width: number;
|
11
|
+
height: number;
|
12
|
+
fontSize: number;
|
13
|
+
lineWidth: number;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
export default _default;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import icon from '../../assets/indoor-map.png';
|
2
|
+
export default {
|
3
|
+
type: 'indoor map',
|
4
|
+
description: 'indoor map',
|
5
|
+
group: 'container' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,
|
6
|
+
icon,
|
7
|
+
model: {
|
8
|
+
type: 'indoor-map',
|
9
|
+
left: 100,
|
10
|
+
top: 100,
|
11
|
+
width: 200,
|
12
|
+
height: 200,
|
13
|
+
fontSize: 80,
|
14
|
+
lineWidth: 1
|
15
|
+
}
|
16
|
+
};
|
17
|
+
//# sourceMappingURL=indoor-map.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"indoor-map.js","sourceRoot":"","sources":["../../src/templates/indoor-map.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,6BAA6B,CAAC;AAE/C,eAAe;IACb,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,KAAK,EACH,WAAW,CAAC,gGAAgG;IAC9G,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,GAAG;QACR,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;KACb;CACF,CAAA","sourcesContent":["import icon from '../../assets/indoor-map.png';\n\nexport default {\n type: 'indoor map',\n description: 'indoor map',\n group:\n 'container' /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */,\n icon,\n model: {\n type: 'indoor-map',\n left: 100,\n top: 100,\n width: 200,\n height: 200,\n fontSize: 80,\n lineWidth: 1\n }\n}\n"]}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
type: string;
|
3
|
+
description: string;
|
4
|
+
group: string;
|
5
|
+
icon: any;
|
6
|
+
model: {
|
7
|
+
type: string;
|
8
|
+
left: number;
|
9
|
+
top: number;
|
10
|
+
width: number;
|
11
|
+
height: number;
|
12
|
+
depth: number;
|
13
|
+
shelves: number;
|
14
|
+
locPattern: string;
|
15
|
+
shelfPattern: string;
|
16
|
+
fillStyle: string;
|
17
|
+
strokeStyle: string;
|
18
|
+
lineWidth: number;
|
19
|
+
alpha: number;
|
20
|
+
};
|
21
|
+
};
|
22
|
+
export default _default;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import icon from '../../assets/rack.png';
|
2
|
+
export default {
|
3
|
+
type: 'rack',
|
4
|
+
description: 'rack in warehouse',
|
5
|
+
group: 'warehouse',
|
6
|
+
icon,
|
7
|
+
model: {
|
8
|
+
type: 'rack',
|
9
|
+
left: 100,
|
10
|
+
top: 100,
|
11
|
+
width: 100,
|
12
|
+
height: 100,
|
13
|
+
depth: 100,
|
14
|
+
shelves: 1,
|
15
|
+
locPattern: '{z}{s}-{u}-{sh}',
|
16
|
+
shelfPattern: '#',
|
17
|
+
fillStyle: '#ffffff',
|
18
|
+
strokeStyle: '#999',
|
19
|
+
lineWidth: 1,
|
20
|
+
alpha: 1
|
21
|
+
}
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=rack.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rack.js","sourceRoot":"","sources":["../../src/templates/rack.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,uBAAuB,CAAC;AAEzC,eAAe;IACb,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,mBAAmB;IAChC,KAAK,EAAE,WAAW;IAClB,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,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,iBAAiB;QAC7B,YAAY,EAAE,GAAG;QACjB,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM;QACnB,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;KACT;CACF,CAAA","sourcesContent":["import icon from '../../assets/rack.png';\n\nexport default {\n type: 'rack',\n description: 'rack in warehouse',\n group: 'warehouse', /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */\n icon,\n model: {\n type: 'rack',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n depth: 100,\n shelves: 1,\n locPattern: '{z}{s}-{u}-{sh}',\n shelfPattern: '#',\n fillStyle: '#ffffff',\n strokeStyle: '#999',\n lineWidth: 1,\n alpha: 1\n }\n}\n"]}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# indoor-map
|
2
|
+
|
3
|
+
## example
|
4
|
+
|
5
|
+
사각형 컴포넌트에 이벤트를 걸어 인도어 층을 제어
|
6
|
+
> - **사각형 컴포넌트에 click이벤트를 걸어 Indoor에 전달**
|
7
|
+
> - **Indoor의 value속성을 바꿔주면 Floor가 변경된다.**
|
8
|
+
|
9
|
+
![gif][gif-01]
|
10
|
+
|
11
|
+
|
12
|
+
[gif-01]: ../images/indoor-button-finish-01.gif
|
13
|
+
|
14
|
+
1. 3개의 층을 가진 Indoor를 생성한다.
|
15
|
+
|
16
|
+
![인도어][indoor-create]
|
17
|
+
|
18
|
+
2. 구별을 위해 층마다 텍스트를 넣었다.
|
19
|
+
|
20
|
+
![인도어][indoor-text]
|
21
|
+
|
22
|
+
|
23
|
+
3. 인도어맵의 아이디를 'indoor'로 지정한다.
|
24
|
+
|
25
|
+
![인도어][indoor-id]
|
26
|
+
|
27
|
+
4. 버튼 이벤트 추가
|
28
|
+
- 사각형 3개를 그린 후, '효과 창'에서 변수정보에 indoor를 선택한다.
|
29
|
+
(변수 정보에는 기본 이벤트와 컴포넌트들의 아이디 리스트가 나온다.)
|
30
|
+
![버튼이벤트][button-02]
|
31
|
+
|
32
|
+
- 각 사각형마다 값을 매핑한다. (사각형을 클릭할 시, indoor 아이디를 가진 컴포넌트에 '0'이란 데이터를 넘겨주게 된다.)
|
33
|
+
- 1층 - 0
|
34
|
+
- 2층 - 1
|
35
|
+
- 3층 - 2
|
36
|
+
|
37
|
+
![버튼이벤트][button-03]
|
38
|
+
|
39
|
+
|
40
|
+
[button-02]: ../images/button-evnet-mapping-02.png
|
41
|
+
|
42
|
+
[button-03]: ../images/button-evnet-mapping-03.png
|
43
|
+
|
44
|
+
5. indoor map 설정
|
45
|
+
|
46
|
+
- 인도어맵 컴포넌트의 데이터 바인딩 설정을 아래의 그림과 같이 설정한다.
|
47
|
+
(데이터를 받을때 자신의 value 속성을 같이 바꿔주는 설정)
|
48
|
+
|
49
|
+
![버튼이벤트][indoor-setting]
|
50
|
+
|
51
|
+
6. 결과 확인
|
52
|
+
- 모든 설정이 완료되었다면 아래와 같이 **사각형을 클릭할 때마다 인도어 맵의 층이 바뀌는 것**을 확인할 수 있다.
|
53
|
+
![gif-01]
|
54
|
+
|
55
|
+
[gif-01]: ../images/indoor-button-finish-01.gif
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
[indoor-create]: ../images/indoor-create-01.png
|
60
|
+
|
61
|
+
[indoor-text]: ../images/indoor-create-02.png
|
62
|
+
|
63
|
+
[indoor-id]: ../images/indoor-create-03.png
|
64
|
+
|
65
|
+
[indoor-setting]: ../images/indoor-setting-01.png
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# indoor-map
|
2
|
+
|
3
|
+
## example
|
4
|
+
|
5
|
+
Control the indoor layer by triggering events on the rectangular component
|
6
|
+
>-**Apply a click event to a square component and deliver it to indoors**
|
7
|
+
>-**If you change the value property of Indoor, the Floor will be changed.**
|
8
|
+
|
9
|
+
![gif][gif-01]
|
10
|
+
|
11
|
+
|
12
|
+
[gif-01]: ../images/indoor-button-finish-01.gif
|
13
|
+
|
14
|
+
1. It creates indoor with three layers.
|
15
|
+
|
16
|
+
![indoor][indoor-create]
|
17
|
+
|
18
|
+
2. Text is put in each layer for distinction.
|
19
|
+
|
20
|
+
![indoor][indoor-text]
|
21
|
+
|
22
|
+
|
23
|
+
3. The ID of the indoor map is designated as'indoor'.
|
24
|
+
|
25
|
+
![indoor][indoor-id]
|
26
|
+
|
27
|
+
4. Add button event
|
28
|
+
- After drawing 3 squares, select indoor as the variable information in the'effect window'.
|
29
|
+
(In the variable information, a list of IDs of basic events and components is shown.)
|
30
|
+
![buttonEvent][button-02]
|
31
|
+
|
32
|
+
- Map values for each square. (When clicking the square, data of '0' is passed to the component with the indoor ID.)
|
33
|
+
- 1layer - 0
|
34
|
+
- 2layer - 1
|
35
|
+
- 3layer - 2
|
36
|
+
|
37
|
+
![buttonEvent][button-03]
|
38
|
+
|
39
|
+
|
40
|
+
[button-02]: ../images/button-evnet-mapping-02.png
|
41
|
+
|
42
|
+
[button-03]: ../images/button-evnet-mapping-03.png
|
43
|
+
|
44
|
+
5. indoor map setting
|
45
|
+
|
46
|
+
- Set the data binding setting of the indoor map component as shown in the figure below.
|
47
|
+
(Setting to change its value property when receiving data)
|
48
|
+
|
49
|
+
![buttonEvent][indoor-setting]
|
50
|
+
|
51
|
+
6. check result
|
52
|
+
- If all settings are complete, you can see that the indoor map layer changes every time you click the square as shown below.
|
53
|
+
![gif-01]
|
54
|
+
|
55
|
+
[gif-01]: ../images/indoor-button-finish-01.gif
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
[indoor-create]: ../images/indoor-create-01.png
|
60
|
+
|
61
|
+
[indoor-text]: ../images/indoor-create-02.png
|
62
|
+
|
63
|
+
[indoor-id]: ../images/indoor-create-03.png
|
64
|
+
|
65
|
+
[indoor-setting]: ../images/indoor-setting-01.png
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# indoor-map
|
2
|
+
|
3
|
+
## example
|
4
|
+
|
5
|
+
通过触发矩形组件上的事件来控制室内层
|
6
|
+
> - **将矩形组件的click事件传递到Indoor组件**
|
7
|
+
> - **更改Indoor组件的value属性Floor会发生变化**
|
8
|
+
|
9
|
+
![gif][gif-01]
|
10
|
+
|
11
|
+
|
12
|
+
[gif-01]: ../images/indoor-button-finish-01.gif
|
13
|
+
|
14
|
+
1. 创建具有三层的indoor map
|
15
|
+
|
16
|
+
![indoor][indoor-create]
|
17
|
+
|
18
|
+
2. 为了区分为每层更改显示层数
|
19
|
+
|
20
|
+
![indoor][indoor-text]
|
21
|
+
|
22
|
+
|
23
|
+
3. 指定室内地图的ID。
|
24
|
+
|
25
|
+
![indoor][indoor-id]
|
26
|
+
|
27
|
+
4. 增加按钮
|
28
|
+
- 绘制3个矩形后,在“效果窗口”中的点击事件中indoor作为变量信息。
|
29
|
+
(在变量信息中,显示基本事件处理方法和组件的ID的列表。)
|
30
|
+
![buttonEvent][button-02]
|
31
|
+
|
32
|
+
- 每个矩形的地图值。 (单击矩形时,数据“0”将传递到具有室内ID的组件。)
|
33
|
+
- 1층 - 0
|
34
|
+
- 2층 - 1
|
35
|
+
- 3층 - 2
|
36
|
+
|
37
|
+
![buttonEvent][button-03]
|
38
|
+
|
39
|
+
|
40
|
+
[button-02]: ../images/button-evnet-mapping-02.png
|
41
|
+
|
42
|
+
[button-03]: ../images/button-evnet-mapping-03.png
|
43
|
+
|
44
|
+
5. indoor map配置
|
45
|
+
|
46
|
+
- 如下图设置室内地图组件的数据绑定设置。
|
47
|
+
(设置为在接收数据时更改其value属性)
|
48
|
+
|
49
|
+
![buttonEvent][indoor-setting]
|
50
|
+
|
51
|
+
6. 确认结果
|
52
|
+
- 如果所有设置均已完成,则每次单击矩形时,都可以看到室内地图图层发生变化,如下所示。
|
53
|
+
![gif-01]
|
54
|
+
|
55
|
+
[gif-01]: ../images/indoor-button-finish-01.gif
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
[indoor-create]: ../images/indoor-create-01.png
|
60
|
+
|
61
|
+
[indoor-text]: ../images/indoor-create-02.png
|
62
|
+
|
63
|
+
[indoor-id]: ../images/indoor-create-03.png
|
64
|
+
|
65
|
+
[indoor-setting]: ../images/indoor-setting-01.png
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# rack
|
2
|
+
|
3
|
+
창고용 랙을 표현할 때 사용하는 컴포넌트. 높이와 층을 적용할 수 있으며 랙과 층마다 고유 ID를 부여할 수 있다.
|
4
|
+
|
5
|
+
## properties
|
6
|
+
|
7
|
+
1. Depth(Number) - 3D 모델링으로 전환되었을 때, 한 층의 높이
|
8
|
+
2. Shelves(Number) - 3D 모델링으로 전환되었을 때, 층의 개수
|
9
|
+
3. Location Pattern(String) - 랙의 위치 및 층에 고유한 ID를 부여할 때 정의하는 패턴. {}안에 Z(Zone), S(Selection), U(Unit), Sh(Shelf)의 패턴을 정의한다.
|
10
|
+
4. Zone(String) - 패턴에 적용 될 Zone의 값
|
11
|
+
5. Selection(String) - 패턴에 적용 될 Selection 값
|
12
|
+
6. Unit(String) - 패턴에 적용 될 Unit 값
|
13
|
+
7. Shelf Pattern(String) - 패턴에 적용 될 Shelf Pattern 값
|
14
|
+
\# - 층의 숫자가 동적으로 적용
|
15
|
+
0 - 층의 숫자가 0의 갯수대로 자릿수 고정(ex. 0 = 0~9 / 00 = 00~99)
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# rack
|
2
|
+
|
3
|
+
The component which is used to display warehouse rack. It can apply the height and layer, and can give a unique ID number in each rack and layer.
|
4
|
+
|
5
|
+
## Properties
|
6
|
+
|
7
|
+
1. Depth(Number) - The height of one layer when converted to 3D modeling.
|
8
|
+
2. Shelves(Number) - The number of layer when converted to 3D modeling.
|
9
|
+
3. Location Pattern(String) - The pattern which is defined when give a unique ID number in the location and layer of rack. Define the pattern of Z(Zone), S(Selection), U(Unit), Sh(Shelf) in {}.
|
10
|
+
4. Zone(String) - The value of Zone which will be applied to the pattern.
|
11
|
+
5. Selection(String) - The selection value which will be applied to the pattern.
|
12
|
+
6. Unit(String) - The Unit value which will be applied to the pattern.
|
13
|
+
7. Shelf Pattern(String) - The value of Shelf Pattern which will be applied to the pattern.
|
14
|
+
\# - Dynamically apply the number of layer.
|
15
|
+
0 - Fix the number of digits of layers according to the number of 0. (ex. 0 = 0~9 / 00 = 00~99)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# rack
|
2
|
+
|
3
|
+
被用于显示库架时的组件。可以适用高度和层,并且可以在各个支架和层,赋予固有的ID。
|
4
|
+
|
5
|
+
|
6
|
+
## properties
|
7
|
+
|
8
|
+
1. 深度(Depth) - 当转换为3D建模时,一层的高度。
|
9
|
+
2. 站位高度(Shelves) - 当转换为3D建模时,层的数量。
|
10
|
+
3. 位置模式(Location Pattern) - 被定义在为支架的位置以及层赋予固有的ID时的模式。在{}中,定义Z(区域)、S(部分)、U(单位)、Sh(货架)的模式。
|
11
|
+
4. 区域(Zone) - 将会被适用于模式的区域的值。
|
12
|
+
5. 部分(Selection) - 将会被适用于模式的部分值。
|
13
|
+
6. 单位(Unit) - 将会被适用于模式的单位值。
|
14
|
+
7. 架子模式(Shelf Pattern) - 将会被适用于模式的架子模式值。
|
15
|
+
\# - 动态适用层的数字。
|
16
|
+
0 - 根据0个数,固定层的位数。(ex. 0 = 0~9 / 00 = 00~99)
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
package/package.json
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
{
|
2
|
+
"name": "@operato/scene-indoor-map",
|
3
|
+
"version": "0.0.16",
|
4
|
+
"description": "Indoor Map component for things-scene.",
|
5
|
+
"license": "MIT",
|
6
|
+
"author": "heartyoh",
|
7
|
+
"main": "dist/index.js",
|
8
|
+
"module": "dist/index.js",
|
9
|
+
"things-scene": true,
|
10
|
+
"publishConfig": {
|
11
|
+
"access": "public",
|
12
|
+
"@operato:registry": "https://registry.npmjs.org"
|
13
|
+
},
|
14
|
+
"repository": {
|
15
|
+
"type": "git",
|
16
|
+
"url": "git+https://github.com/things-scene/operato-scene.git",
|
17
|
+
"directory": "packages/indoor-map"
|
18
|
+
},
|
19
|
+
"scripts": {
|
20
|
+
"serve": "tsc && things-factory-dev",
|
21
|
+
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
22
|
+
"build": "tsc",
|
23
|
+
"prepublish": "tsc",
|
24
|
+
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
25
|
+
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
26
|
+
"migration": "things-factory-migration"
|
27
|
+
},
|
28
|
+
"dependencies": {
|
29
|
+
"@hatiolab/things-scene": "^2.7.25"
|
30
|
+
},
|
31
|
+
"devDependencies": {
|
32
|
+
"@hatiolab/prettier-config": "^1.0.0",
|
33
|
+
"@operato/board": "^0.2.44",
|
34
|
+
"@things-factory/builder": "^4.0.12",
|
35
|
+
"@things-factory/operato-board": "^4.0.12",
|
36
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
37
|
+
"@typescript-eslint/parser": "^4.33.0",
|
38
|
+
"@web/dev-server": "^0.1.28",
|
39
|
+
"concurrently": "^5.3.0",
|
40
|
+
"eslint": "^7.32.0",
|
41
|
+
"eslint-config-prettier": "^8.3.0",
|
42
|
+
"husky": "^4.3.8",
|
43
|
+
"lint-staged": "^10.5.4",
|
44
|
+
"prettier": "^2.4.1",
|
45
|
+
"tslib": "^2.3.1",
|
46
|
+
"typescript": "^4.5.2"
|
47
|
+
},
|
48
|
+
"prettier": "@hatiolab/prettier-config",
|
49
|
+
"husky": {
|
50
|
+
"hooks": {
|
51
|
+
"pre-commit": "lint-staged"
|
52
|
+
}
|
53
|
+
},
|
54
|
+
"lint-staged": {
|
55
|
+
"*.ts": [
|
56
|
+
"eslint --fix",
|
57
|
+
"prettier --write"
|
58
|
+
]
|
59
|
+
},
|
60
|
+
"gitHead": "29382f4c11826d2e6514c545ab4d7b4d2f3bbf0d"
|
61
|
+
}
|