@operato/scene-polypath 1.2.46 → 1.2.49
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/CHANGELOG.md +19 -0
- package/dist/polyline.d.ts +21 -0
- package/dist/polyline.js +61 -0
- package/dist/polyline.js.map +1 -0
- package/dist/polypath.d.ts +11 -5
- package/dist/polypath.js +74 -28
- package/dist/polypath.js.map +1 -1
- package/package.json +2 -2
- package/src/polyline.ts +80 -0
- package/src/polypath.ts +94 -31
- package/things-scene.config.js +2 -1
- package/translations/en.json +5 -0
- package/translations/ko.json +5 -0
- package/translations/ms.json +5 -0
- package/translations/zh.json +5 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +0 -15
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +0 -15
- package/logs/application-2023-06-10-07.log +0 -7
- package/logs/connections-2023-06-10-07.log +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.2.49](https://github.com/things-scene/operato-scene/compare/v1.2.48...v1.2.49) (2023-06-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fix
|
|
10
|
+
|
|
11
|
+
* missing .npmignore ([61ba4f2](https://github.com/things-scene/operato-scene/commit/61ba4f2ae22a865d700a971d62eb01f950c34d0e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [1.2.47](https://github.com/things-scene/operato-scene/compare/v1.2.46...v1.2.47) (2023-06-11)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### :bug: Bug Fix
|
|
19
|
+
|
|
20
|
+
* polypath ([a2b3bf4](https://github.com/things-scene/operato-scene/commit/a2b3bf4faaeda751c727eb487f8dd1780c7acbe5))
|
|
21
|
+
* polypath ([e3f28b2](https://github.com/things-scene/operato-scene/commit/e3f28b222021c213d0fba4c79e09a516fd9a95be))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.2.46](https://github.com/things-scene/operato-scene/compare/v1.2.45...v1.2.46) (2023-06-10)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export declare class Vector {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
constructor(x: number, y: number);
|
|
9
|
+
static subtract(v1: Vector, v2: Vector): Vector;
|
|
10
|
+
static add(v1: Vector, v2: Vector): Vector;
|
|
11
|
+
normalize(): Vector;
|
|
12
|
+
perp(): Vector;
|
|
13
|
+
mult(scalar: number): Vector;
|
|
14
|
+
}
|
|
15
|
+
export declare class Polyline {
|
|
16
|
+
private points;
|
|
17
|
+
private thickness;
|
|
18
|
+
constructor(points: Point[], thickness: number);
|
|
19
|
+
get path(): Vector[];
|
|
20
|
+
draw(ctx: CanvasRenderingContext2D): void;
|
|
21
|
+
}
|
package/dist/polyline.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export class Vector {
|
|
2
|
+
constructor(x, y) {
|
|
3
|
+
this.x = x;
|
|
4
|
+
this.y = y;
|
|
5
|
+
}
|
|
6
|
+
static subtract(v1, v2) {
|
|
7
|
+
return new Vector(v1.x - v2.x, v1.y - v2.y);
|
|
8
|
+
}
|
|
9
|
+
static add(v1, v2) {
|
|
10
|
+
return new Vector(v1.x + v2.x, v1.y + v2.y);
|
|
11
|
+
}
|
|
12
|
+
normalize() {
|
|
13
|
+
const length = Math.sqrt(this.x * this.x + this.y * this.y);
|
|
14
|
+
return new Vector(this.x / length, this.y / length);
|
|
15
|
+
}
|
|
16
|
+
perp() {
|
|
17
|
+
return new Vector(-this.y, this.x);
|
|
18
|
+
}
|
|
19
|
+
mult(scalar) {
|
|
20
|
+
return new Vector(this.x * scalar, this.y * scalar);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export class Polyline {
|
|
24
|
+
constructor(points, thickness) {
|
|
25
|
+
this.points = points.map(p => new Vector(p.x, p.y));
|
|
26
|
+
this.thickness = thickness;
|
|
27
|
+
}
|
|
28
|
+
get path() {
|
|
29
|
+
let innerPoints = [];
|
|
30
|
+
let outerPoints = [];
|
|
31
|
+
for (let i = 0; i < this.points.length - 1; i++) {
|
|
32
|
+
let start = this.points[i];
|
|
33
|
+
let end = this.points[i + 1];
|
|
34
|
+
let direction = Vector.subtract(end, start).normalize();
|
|
35
|
+
let perpendicular = direction.perp();
|
|
36
|
+
let thicknessVector = perpendicular.mult(this.thickness / 2);
|
|
37
|
+
let startInner = Vector.subtract(start, thicknessVector);
|
|
38
|
+
let startOuter = Vector.add(start, thicknessVector);
|
|
39
|
+
let endInner = Vector.subtract(end, thicknessVector);
|
|
40
|
+
let endOuter = Vector.add(end, thicknessVector);
|
|
41
|
+
innerPoints.push(startInner, endInner);
|
|
42
|
+
outerPoints.push(startOuter, endOuter);
|
|
43
|
+
}
|
|
44
|
+
return [...outerPoints, ...innerPoints.reverse()];
|
|
45
|
+
}
|
|
46
|
+
draw(ctx) {
|
|
47
|
+
const path = this.path;
|
|
48
|
+
ctx.beginPath();
|
|
49
|
+
path.forEach((point, index) => {
|
|
50
|
+
if (index === 0) {
|
|
51
|
+
ctx.moveTo(point.x, point.y);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
ctx.lineTo(point.x, point.y);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
ctx.closePath();
|
|
58
|
+
ctx.fill();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=polyline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polyline.js","sourceRoot":"","sources":["../src/polyline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AAC,CAAA;IACnD,CAAC;IAED,IAAI,CAAC,GAA6B;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QAEtB,GAAG,CAAC,SAAS,EAAE,CAAA;QAEf,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC5B,IAAI,KAAK,KAAK,CAAC,EAAE;gBACf,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;aAC7B;iBAAM;gBACL,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;aAC7B;QACH,CAAC,CAAC,CAAA;QAEF,GAAG,CAAC,SAAS,EAAE,CAAA;QACf,GAAG,CAAC,IAAI,EAAE,CAAA;IACZ,CAAC;CACF","sourcesContent":["export interface Point {\n x: number\n y: number\n}\n\nexport class Vector {\n constructor(public x: number, public y: number) {}\n\n static subtract(v1: Vector, v2: Vector): Vector {\n return new Vector(v1.x - v2.x, v1.y - v2.y)\n }\n\n static add(v1: Vector, v2: Vector): Vector {\n return new Vector(v1.x + v2.x, v1.y + v2.y)\n }\n\n normalize(): Vector {\n const length = Math.sqrt(this.x * this.x + this.y * this.y)\n return new Vector(this.x / length, this.y / length)\n }\n\n perp(): Vector {\n return new Vector(-this.y, this.x)\n }\n\n mult(scalar: number): Vector {\n return new Vector(this.x * scalar, this.y * scalar)\n }\n}\n\nexport class Polyline {\n private points: Vector[]\n private thickness: number\n\n constructor(points: Point[], thickness: number) {\n this.points = points.map(p => new Vector(p.x, p.y))\n this.thickness = thickness\n }\n\n get path(): Vector[] {\n let innerPoints: Vector[] = []\n let outerPoints: Vector[] = []\n\n for (let i = 0; i < this.points.length - 1; i++) {\n let start = this.points[i]\n let end = this.points[i + 1]\n\n let direction = Vector.subtract(end, start).normalize()\n let perpendicular = direction.perp()\n let thicknessVector = perpendicular.mult(this.thickness / 2)\n\n let startInner = Vector.subtract(start, thicknessVector)\n let startOuter = Vector.add(start, thicknessVector)\n let endInner = Vector.subtract(end, thicknessVector)\n let endOuter = Vector.add(end, thicknessVector)\n\n innerPoints.push(startInner, endInner)\n outerPoints.push(startOuter, endOuter)\n }\n\n return [...outerPoints, ...innerPoints.reverse()]\n }\n\n draw(ctx: CanvasRenderingContext2D): void {\n const path = this.path\n\n ctx.beginPath()\n\n path.forEach((point, index) => {\n if (index === 0) {\n ctx.moveTo(point.x, point.y)\n } else {\n ctx.lineTo(point.x, point.y)\n }\n })\n\n ctx.closePath()\n ctx.fill()\n }\n}\n"]}
|
package/dist/polypath.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
|
|
1
|
+
import { Component, Line, Properties } from '@hatiolab/things-scene';
|
|
2
|
+
import { Polyline } from './polyline';
|
|
3
|
+
export default class PolyPath extends Line {
|
|
4
|
+
_fromEnd: any;
|
|
5
|
+
_toEnd: any;
|
|
3
6
|
get pathExtendable(): boolean;
|
|
4
|
-
get path(): any;
|
|
5
|
-
set path(path: any);
|
|
7
|
+
get path(): any[];
|
|
8
|
+
set path(path: any[]);
|
|
9
|
+
get polyline(): Polyline;
|
|
10
|
+
_polyline?: Polyline;
|
|
6
11
|
contains(x: number, y: number): boolean;
|
|
7
12
|
get controls(): {
|
|
8
13
|
x: any;
|
|
@@ -13,7 +18,8 @@ export default class PolyPath extends Shape {
|
|
|
13
18
|
ondragend: (point: import("@hatiolab/things-scene").POINT, index: number, component: Component) => void;
|
|
14
19
|
};
|
|
15
20
|
}[];
|
|
16
|
-
|
|
21
|
+
draw(ctx: CanvasRenderingContext2D): void;
|
|
22
|
+
onchange(after: Properties, before: Properties): void;
|
|
17
23
|
is3dish(): boolean;
|
|
18
24
|
get nature(): {
|
|
19
25
|
mutable: boolean;
|
package/dist/polypath.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { Component,
|
|
4
|
+
import { Component, Line } from '@hatiolab/things-scene';
|
|
5
|
+
import { Polyline } from './polyline';
|
|
5
6
|
var controlHandler = {
|
|
6
7
|
ondragstart: function (point, index, component) {
|
|
7
8
|
component.mutatePath(null, function (path) {
|
|
@@ -16,30 +17,67 @@ var controlHandler = {
|
|
|
16
17
|
ondragend: function (point, index, component) { }
|
|
17
18
|
};
|
|
18
19
|
const NATURE = {
|
|
19
|
-
mutable:
|
|
20
|
+
mutable: false,
|
|
20
21
|
resizable: false,
|
|
21
22
|
rotatable: false,
|
|
22
23
|
properties: [
|
|
23
24
|
{
|
|
24
25
|
type: 'number',
|
|
25
|
-
label: '
|
|
26
|
-
name: '
|
|
26
|
+
label: 'thickness',
|
|
27
|
+
name: 'thickness'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: 'string',
|
|
31
|
+
label: 'line-dash',
|
|
32
|
+
name: 'lineDash'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'number',
|
|
36
|
+
label: 'line-dash-offset',
|
|
37
|
+
name: 'lineDashOffset'
|
|
27
38
|
}
|
|
28
39
|
],
|
|
29
40
|
help: 'scene/component/polypath'
|
|
30
41
|
};
|
|
31
|
-
export default class PolyPath extends
|
|
42
|
+
export default class PolyPath extends Line {
|
|
32
43
|
get pathExtendable() {
|
|
33
44
|
return true;
|
|
34
45
|
}
|
|
35
46
|
get path() {
|
|
36
|
-
|
|
47
|
+
var _a, _b;
|
|
48
|
+
const { from, to } = this.state;
|
|
49
|
+
const { path } = this.state;
|
|
50
|
+
return [
|
|
51
|
+
((_a = this.fromEnd) === null || _a === void 0 ? void 0 : _a.position) || (from === null || from === void 0 ? void 0 : from.position) || path[0],
|
|
52
|
+
...path.slice(1, -1),
|
|
53
|
+
((_b = this.toEnd) === null || _b === void 0 ? void 0 : _b.position) || (to === null || to === void 0 ? void 0 : to.position) || path[path.length - 1]
|
|
54
|
+
];
|
|
37
55
|
}
|
|
38
56
|
set path(path) {
|
|
39
|
-
this.
|
|
57
|
+
const { from, to } = this.state;
|
|
58
|
+
delete this._fromEnd;
|
|
59
|
+
delete this._toEnd;
|
|
60
|
+
this.set({
|
|
61
|
+
from: {
|
|
62
|
+
...from,
|
|
63
|
+
position: path[0]
|
|
64
|
+
},
|
|
65
|
+
to: {
|
|
66
|
+
...to,
|
|
67
|
+
position: path[path.length - 1]
|
|
68
|
+
},
|
|
69
|
+
path
|
|
70
|
+
});
|
|
71
|
+
this._polyline = new Polyline(path, this.state.thickness || 50);
|
|
72
|
+
}
|
|
73
|
+
get polyline() {
|
|
74
|
+
if (!this._polyline) {
|
|
75
|
+
this._polyline = new Polyline(this.path, this.state.thickness || 50);
|
|
76
|
+
}
|
|
77
|
+
return this._polyline;
|
|
40
78
|
}
|
|
41
79
|
contains(x, y) {
|
|
42
|
-
var path = this.
|
|
80
|
+
var path = this.polyline.path;
|
|
43
81
|
var result = false;
|
|
44
82
|
path.forEach((p, idx) => {
|
|
45
83
|
let j = (idx + path.length + 1) % path.length;
|
|
@@ -81,28 +119,37 @@ export default class PolyPath extends Shape {
|
|
|
81
119
|
}
|
|
82
120
|
return controls;
|
|
83
121
|
}
|
|
84
|
-
|
|
85
|
-
|
|
122
|
+
draw(ctx) {
|
|
123
|
+
const { thickness = 50, fillStyle, strokeStyle, lineWidth, lineDash, lineDashOffset } = this.state;
|
|
124
|
+
const path = this.path;
|
|
125
|
+
ctx.save();
|
|
86
126
|
ctx.beginPath();
|
|
127
|
+
ctx.fillStyle = fillStyle;
|
|
128
|
+
this.polyline.draw(ctx);
|
|
129
|
+
ctx.beginPath();
|
|
130
|
+
ctx.strokeStyle = strokeStyle;
|
|
131
|
+
ctx.lineJoin = 'bevel';
|
|
132
|
+
ctx.lineWidth = Math.round(thickness - lineWidth);
|
|
133
|
+
if (lineDash) {
|
|
134
|
+
ctx.setLineDash(lineDash
|
|
135
|
+
.split(',')
|
|
136
|
+
.map((text) => Number(text))
|
|
137
|
+
.filter((num) => !isNaN(num)));
|
|
138
|
+
if (lineDashOffset) {
|
|
139
|
+
ctx.lineDashOffset = lineDashOffset;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
87
142
|
ctx.moveTo(path[0].x, path[0].y);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
143
|
+
path.slice(1).forEach(point => {
|
|
144
|
+
ctx.lineTo(point.x, point.y);
|
|
145
|
+
});
|
|
146
|
+
ctx.stroke();
|
|
147
|
+
ctx.restore();
|
|
148
|
+
}
|
|
149
|
+
onchange(after, before) {
|
|
150
|
+
if ('thickness' in after) {
|
|
151
|
+
delete this._polyline;
|
|
96
152
|
}
|
|
97
|
-
// for (let i = path.length - 1; i >= 0; i--) {
|
|
98
|
-
// const { x: prevX, y: prevY } = path[i + 1] || path[path.length - 1]
|
|
99
|
-
// const { x: currX, y: currY } = path[i]
|
|
100
|
-
// const angle = Math.atan2(currY - prevY, currX - prevX)
|
|
101
|
-
// const offsetX = w * Math.sin(angle)
|
|
102
|
-
// const offsetY = w * Math.cos(angle)
|
|
103
|
-
// ctx.lineTo(currX - offsetX, currY + offsetY)
|
|
104
|
-
// }
|
|
105
|
-
ctx.closePath();
|
|
106
153
|
}
|
|
107
154
|
is3dish() {
|
|
108
155
|
return false;
|
|
@@ -111,6 +158,5 @@ export default class PolyPath extends Shape {
|
|
|
111
158
|
return NATURE;
|
|
112
159
|
}
|
|
113
160
|
}
|
|
114
|
-
Component.memoize(PolyPath.prototype, 'controls', false);
|
|
115
161
|
Component.register('polypath', PolyPath);
|
|
116
162
|
//# sourceMappingURL=polypath.js.map
|
package/dist/polypath.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polypath.js","sourceRoot":"","sources":["../src/polypath.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,E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things-scene'\nimport { Polyline } from './polyline'\nimport { Vector } from './polyline'\n\nvar controlHandler = {\n ondragstart: function (point: POSITION, index: number, component: Component) {\n component.mutatePath(null, function (path) {\n path.splice(index, 0, point) // array.insert(index, point) 의 의미임.\n })\n },\n\n ondragmove: function (point: POSITION, index: number, component: Component) {\n component.mutatePath(null, function (path) {\n path[index] = point\n })\n },\n\n ondragend: function (point: POSITION, index: number, component: Component) {}\n}\n\nconst NATURE = {\n mutable: false,\n resizable: false,\n rotatable: false,\n properties: [\n {\n type: 'number',\n label: 'thickness',\n name: 'thickness'\n },\n {\n type: 'string',\n label: 'line-dash',\n name: 'lineDash'\n },\n {\n type: 'number',\n label: 'line-dash-offset',\n name: 'lineDashOffset'\n }\n ],\n help: 'scene/component/polypath'\n}\n\nexport default class PolyPath extends Line {\n _fromEnd: any\n _toEnd: any\n\n get pathExtendable() {\n return true\n }\n\n get path() {\n const { from, to } = this.state\n const { path } = this.state\n\n return [\n this.fromEnd?.position || from?.position || path[0],\n ...path.slice(1, -1),\n this.toEnd?.position || to?.position || path[path.length - 1]\n ]\n }\n\n set path(path) {\n const { from, to } = this.state\n\n delete this._fromEnd\n delete this._toEnd\n\n this.set({\n from: {\n ...from,\n position: path[0]\n },\n to: {\n ...to,\n position: path[path.length - 1]\n },\n path\n })\n\n this._polyline = new Polyline(path, this.state.thickness || 50)\n }\n\n get polyline(): Polyline {\n if (!this._polyline) {\n this._polyline = new Polyline(this.path, this.state.thickness || 50)\n }\n return this._polyline\n }\n\n _polyline?: Polyline\n\n contains(x: number, y: number) {\n var path: Vector[] = this.polyline.path\n var result = false\n\n path.forEach((p, idx) => {\n let j = (idx + path.length + 1) % path.length\n\n let x1 = p.x\n let y1 = p.y\n let x2 = path[j].x\n let y2 = path[j].y\n\n if (y1 > y != y2 > y && x < ((x2 - x1) * (y - y1)) / (y2 - y1) + x1) result = !result\n })\n\n return result\n }\n\n get controls() {\n // 폴리라인에서의 control은 새로운 path를 추가하는 포인트이다.\n var path = this.path\n var controls = []\n\n for (let i = 0; i < path.length - 1; i++) {\n let p1 = path[i]\n let p2 = path[i + 1]\n\n if (i == 0) {\n controls.push({\n x: p1.x,\n y: p1.y,\n handler: controlHandler\n })\n }\n\n controls.push({\n x: (p1.x + p2.x) / 2,\n y: (p1.y + p2.y) / 2,\n handler: controlHandler\n })\n\n if (i == path.length - 2) {\n controls.push({\n x: p2.x,\n y: p2.y,\n handler: controlHandler\n })\n }\n }\n\n return controls\n }\n\n draw(ctx: CanvasRenderingContext2D): void {\n const { thickness = 50, fillStyle, strokeStyle, lineWidth, lineDash, lineDashOffset } = this.state\n const path: Vector[] = this.path\n\n ctx.save()\n ctx.beginPath()\n\n ctx.fillStyle = fillStyle\n\n this.polyline.draw(ctx)\n\n ctx.beginPath()\n\n ctx.strokeStyle = strokeStyle\n ctx.lineJoin = 'bevel'\n ctx.lineWidth = Math.round(thickness - lineWidth)\n if (lineDash) {\n ctx.setLineDash(\n lineDash\n .split(',')\n .map((text: string) => Number(text))\n .filter((num: number) => !isNaN(num))\n )\n\n if (lineDashOffset) {\n ctx.lineDashOffset = lineDashOffset\n }\n }\n\n ctx.moveTo(path[0].x, path[0].y)\n\n path.slice(1).forEach(point => {\n ctx.lineTo(point.x, point.y)\n })\n\n ctx.stroke()\n ctx.restore()\n }\n\n onchange(after: Properties, before: Properties) {\n if ('thickness' in after) {\n delete this._polyline\n }\n }\n\n is3dish() {\n return false\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('polypath', PolyPath)\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/scene-polypath",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.49",
|
|
4
4
|
"description": "Poly path component for things-scene",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"prettier --write"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "f91b0d45641177ae36015ebd23b780a48715349b"
|
|
61
61
|
}
|
package/src/polyline.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export interface Point {
|
|
2
|
+
x: number
|
|
3
|
+
y: number
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export class Vector {
|
|
7
|
+
constructor(public x: number, public y: number) {}
|
|
8
|
+
|
|
9
|
+
static subtract(v1: Vector, v2: Vector): Vector {
|
|
10
|
+
return new Vector(v1.x - v2.x, v1.y - v2.y)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static add(v1: Vector, v2: Vector): Vector {
|
|
14
|
+
return new Vector(v1.x + v2.x, v1.y + v2.y)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
normalize(): Vector {
|
|
18
|
+
const length = Math.sqrt(this.x * this.x + this.y * this.y)
|
|
19
|
+
return new Vector(this.x / length, this.y / length)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
perp(): Vector {
|
|
23
|
+
return new Vector(-this.y, this.x)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
mult(scalar: number): Vector {
|
|
27
|
+
return new Vector(this.x * scalar, this.y * scalar)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class Polyline {
|
|
32
|
+
private points: Vector[]
|
|
33
|
+
private thickness: number
|
|
34
|
+
|
|
35
|
+
constructor(points: Point[], thickness: number) {
|
|
36
|
+
this.points = points.map(p => new Vector(p.x, p.y))
|
|
37
|
+
this.thickness = thickness
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
get path(): Vector[] {
|
|
41
|
+
let innerPoints: Vector[] = []
|
|
42
|
+
let outerPoints: Vector[] = []
|
|
43
|
+
|
|
44
|
+
for (let i = 0; i < this.points.length - 1; i++) {
|
|
45
|
+
let start = this.points[i]
|
|
46
|
+
let end = this.points[i + 1]
|
|
47
|
+
|
|
48
|
+
let direction = Vector.subtract(end, start).normalize()
|
|
49
|
+
let perpendicular = direction.perp()
|
|
50
|
+
let thicknessVector = perpendicular.mult(this.thickness / 2)
|
|
51
|
+
|
|
52
|
+
let startInner = Vector.subtract(start, thicknessVector)
|
|
53
|
+
let startOuter = Vector.add(start, thicknessVector)
|
|
54
|
+
let endInner = Vector.subtract(end, thicknessVector)
|
|
55
|
+
let endOuter = Vector.add(end, thicknessVector)
|
|
56
|
+
|
|
57
|
+
innerPoints.push(startInner, endInner)
|
|
58
|
+
outerPoints.push(startOuter, endOuter)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return [...outerPoints, ...innerPoints.reverse()]
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
draw(ctx: CanvasRenderingContext2D): void {
|
|
65
|
+
const path = this.path
|
|
66
|
+
|
|
67
|
+
ctx.beginPath()
|
|
68
|
+
|
|
69
|
+
path.forEach((point, index) => {
|
|
70
|
+
if (index === 0) {
|
|
71
|
+
ctx.moveTo(point.x, point.y)
|
|
72
|
+
} else {
|
|
73
|
+
ctx.lineTo(point.x, point.y)
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
ctx.closePath()
|
|
78
|
+
ctx.fill()
|
|
79
|
+
}
|
|
80
|
+
}
|
package/src/polypath.ts
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { Component, POSITION, Shape } from '@hatiolab/things-scene'
|
|
5
|
+
import { Component, POSITION, Line, Shape, Properties } from '@hatiolab/things-scene'
|
|
6
|
+
import { Polyline } from './polyline'
|
|
7
|
+
import { Vector } from './polyline'
|
|
6
8
|
|
|
7
9
|
var controlHandler = {
|
|
8
10
|
ondragstart: function (point: POSITION, index: number, component: Component) {
|
|
@@ -21,37 +23,83 @@ var controlHandler = {
|
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
const NATURE = {
|
|
24
|
-
mutable:
|
|
26
|
+
mutable: false,
|
|
25
27
|
resizable: false,
|
|
26
28
|
rotatable: false,
|
|
27
29
|
properties: [
|
|
28
30
|
{
|
|
29
31
|
type: 'number',
|
|
30
|
-
label: '
|
|
31
|
-
name: '
|
|
32
|
+
label: 'thickness',
|
|
33
|
+
name: 'thickness'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: 'string',
|
|
37
|
+
label: 'line-dash',
|
|
38
|
+
name: 'lineDash'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'number',
|
|
42
|
+
label: 'line-dash-offset',
|
|
43
|
+
name: 'lineDashOffset'
|
|
32
44
|
}
|
|
33
45
|
],
|
|
34
46
|
help: 'scene/component/polypath'
|
|
35
47
|
}
|
|
36
48
|
|
|
37
|
-
export default class PolyPath extends
|
|
49
|
+
export default class PolyPath extends Line {
|
|
50
|
+
_fromEnd: any
|
|
51
|
+
_toEnd: any
|
|
52
|
+
|
|
38
53
|
get pathExtendable() {
|
|
39
54
|
return true
|
|
40
55
|
}
|
|
41
56
|
|
|
42
57
|
get path() {
|
|
43
|
-
|
|
58
|
+
const { from, to } = this.state
|
|
59
|
+
const { path } = this.state
|
|
60
|
+
|
|
61
|
+
return [
|
|
62
|
+
this.fromEnd?.position || from?.position || path[0],
|
|
63
|
+
...path.slice(1, -1),
|
|
64
|
+
this.toEnd?.position || to?.position || path[path.length - 1]
|
|
65
|
+
]
|
|
44
66
|
}
|
|
45
67
|
|
|
46
68
|
set path(path) {
|
|
47
|
-
this.
|
|
69
|
+
const { from, to } = this.state
|
|
70
|
+
|
|
71
|
+
delete this._fromEnd
|
|
72
|
+
delete this._toEnd
|
|
73
|
+
|
|
74
|
+
this.set({
|
|
75
|
+
from: {
|
|
76
|
+
...from,
|
|
77
|
+
position: path[0]
|
|
78
|
+
},
|
|
79
|
+
to: {
|
|
80
|
+
...to,
|
|
81
|
+
position: path[path.length - 1]
|
|
82
|
+
},
|
|
83
|
+
path
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
this._polyline = new Polyline(path, this.state.thickness || 50)
|
|
48
87
|
}
|
|
49
88
|
|
|
89
|
+
get polyline(): Polyline {
|
|
90
|
+
if (!this._polyline) {
|
|
91
|
+
this._polyline = new Polyline(this.path, this.state.thickness || 50)
|
|
92
|
+
}
|
|
93
|
+
return this._polyline
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
_polyline?: Polyline
|
|
97
|
+
|
|
50
98
|
contains(x: number, y: number) {
|
|
51
|
-
var path = this.
|
|
99
|
+
var path: Vector[] = this.polyline.path
|
|
52
100
|
var result = false
|
|
53
101
|
|
|
54
|
-
path.forEach((p
|
|
102
|
+
path.forEach((p, idx) => {
|
|
55
103
|
let j = (idx + path.length + 1) % path.length
|
|
56
104
|
|
|
57
105
|
let x1 = p.x
|
|
@@ -100,32 +148,49 @@ export default class PolyPath extends Shape {
|
|
|
100
148
|
return controls
|
|
101
149
|
}
|
|
102
150
|
|
|
103
|
-
|
|
104
|
-
|
|
151
|
+
draw(ctx: CanvasRenderingContext2D): void {
|
|
152
|
+
const { thickness = 50, fillStyle, strokeStyle, lineWidth, lineDash, lineDashOffset } = this.state
|
|
153
|
+
const path: Vector[] = this.path
|
|
105
154
|
|
|
155
|
+
ctx.save()
|
|
106
156
|
ctx.beginPath()
|
|
107
|
-
ctx.moveTo(path[0].x, path[0].y)
|
|
108
157
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
158
|
+
ctx.fillStyle = fillStyle
|
|
159
|
+
|
|
160
|
+
this.polyline.draw(ctx)
|
|
161
|
+
|
|
162
|
+
ctx.beginPath()
|
|
163
|
+
|
|
164
|
+
ctx.strokeStyle = strokeStyle
|
|
165
|
+
ctx.lineJoin = 'bevel'
|
|
166
|
+
ctx.lineWidth = Math.round(thickness - lineWidth)
|
|
167
|
+
if (lineDash) {
|
|
168
|
+
ctx.setLineDash(
|
|
169
|
+
lineDash
|
|
170
|
+
.split(',')
|
|
171
|
+
.map((text: string) => Number(text))
|
|
172
|
+
.filter((num: number) => !isNaN(num))
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
if (lineDashOffset) {
|
|
176
|
+
ctx.lineDashOffset = lineDashOffset
|
|
177
|
+
}
|
|
117
178
|
}
|
|
118
179
|
|
|
119
|
-
|
|
120
|
-
// const { x: prevX, y: prevY } = path[i + 1] || path[path.length - 1]
|
|
121
|
-
// const { x: currX, y: currY } = path[i]
|
|
122
|
-
// const angle = Math.atan2(currY - prevY, currX - prevX)
|
|
123
|
-
// const offsetX = w * Math.sin(angle)
|
|
124
|
-
// const offsetY = w * Math.cos(angle)
|
|
125
|
-
// ctx.lineTo(currX - offsetX, currY + offsetY)
|
|
126
|
-
// }
|
|
180
|
+
ctx.moveTo(path[0].x, path[0].y)
|
|
127
181
|
|
|
128
|
-
|
|
182
|
+
path.slice(1).forEach(point => {
|
|
183
|
+
ctx.lineTo(point.x, point.y)
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
ctx.stroke()
|
|
187
|
+
ctx.restore()
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
onchange(after: Properties, before: Properties) {
|
|
191
|
+
if ('thickness' in after) {
|
|
192
|
+
delete this._polyline
|
|
193
|
+
}
|
|
129
194
|
}
|
|
130
195
|
|
|
131
196
|
is3dish() {
|
|
@@ -137,6 +202,4 @@ export default class PolyPath extends Shape {
|
|
|
137
202
|
}
|
|
138
203
|
}
|
|
139
204
|
|
|
140
|
-
Component.memoize(PolyPath.prototype, 'controls', false)
|
|
141
|
-
|
|
142
205
|
Component.register('polypath', PolyPath)
|
package/things-scene.config.js
CHANGED
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/polypath.ts","./src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"f1c9fe42b65437a61104e601eb298c5c859fb522b483f1bdb700eed67a16f980","1ec425c4c916d3a75b0557409a967eb5fee869beb69eefc2fbbf563f92bda771",{"version":"
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/polyline.ts","./src/polypath.ts","./src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"f1c9fe42b65437a61104e601eb298c5c859fb522b483f1bdb700eed67a16f980","1ec425c4c916d3a75b0557409a967eb5fee869beb69eefc2fbbf563f92bda771",{"version":"21b757a7717c9911a8abec5a69e443e8286046ac778581396097e2076922a241","signature":"5f613c4ea347afec06e148d2ec6ba2390a564cc615f9d2095a7e2b3c10f5981c"},{"version":"56dbf0b9550220f056630ff8de43a8704475a1714286352a8e5040c0f3d67963","signature":"12cc16c6a27245678ebe4901494a21f127d8a97ceb714fcf29637038e3c3ea58"},{"version":"5c8bf786f2ceb87c1622e50d9fe6476a412df88a57222d5f382b3de90e54c8b3","signature":"a6da775445708dbeee29b3bae8acff86a069026a135ad2e10e95ed7e7881b614"}],"root":[[37,39]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./dist","rootDir":"./src","sourceMap":true,"strict":true,"target":5},"fileIdsList":[[35,38],[35],[35,36,37],[38],[36,37]],"referencedMap":[[39,1],[37,2],[38,3]],"exportedModulesMap":[[39,4],[38,5]],"semanticDiagnosticsPerFile":[36,35,33,34,7,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,6,32,29,30,31,1,39,37,38]},"version":"5.1.3"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"keep": {
|
|
3
|
-
"days": true,
|
|
4
|
-
"amount": 2
|
|
5
|
-
},
|
|
6
|
-
"auditLog": "logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json",
|
|
7
|
-
"files": [
|
|
8
|
-
{
|
|
9
|
-
"date": 1686348181239,
|
|
10
|
-
"name": "logs/application-2023-06-10-07.log",
|
|
11
|
-
"hash": "fc0c195fb8de8119ccbcdff99c2f36c9080b942a0712a2db24fffc5efdd8fd4c"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"hashType": "sha256"
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"keep": {
|
|
3
|
-
"days": true,
|
|
4
|
-
"amount": 14
|
|
5
|
-
},
|
|
6
|
-
"auditLog": "logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json",
|
|
7
|
-
"files": [
|
|
8
|
-
{
|
|
9
|
-
"date": 1686348182525,
|
|
10
|
-
"name": "logs/connections-2023-06-10-07.log",
|
|
11
|
-
"hash": "7d0fb0fde4aeed23a9518860c52aa07c36c0321a7b15d1f549d95d1a5cf81f31"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"hashType": "sha256"
|
|
15
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
2023-06-10T07:03:01+09:00 info: File Storage is Ready.
|
|
2
|
-
2023-06-10T07:03:02+09:00 error: oracledb module loading failed
|
|
3
|
-
2023-06-10T07:03:27+09:00 info: File Storage is Ready.
|
|
4
|
-
2023-06-10T07:03:28+09:00 error: oracledb module loading failed
|
|
5
|
-
2023-06-10T07:03:28+09:00 info: Default DataSource established
|
|
6
|
-
2023-06-10T07:03:29+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
|
|
7
|
-
2023-06-10T07:03:29+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
2023-06-10T07:03:29+09:00 info: Initializing ConnectionManager...
|
|
2
|
-
2023-06-10T07:03:29+09:00 info: Connector 'echo-back-server' started to ready
|
|
3
|
-
2023-06-10T07:03:29+09:00 info: Connector 'echo-back' started to ready
|
|
4
|
-
2023-06-10T07:03:29+09:00 info: Connector 'http-connector' started to ready
|
|
5
|
-
2023-06-10T07:03:29+09:00 info: Connector 'graphql-connector' started to ready
|
|
6
|
-
2023-06-10T07:03:29+09:00 info: Connector 'sqlite-connector' started to ready
|
|
7
|
-
2023-06-10T07:03:29+09:00 info: Connector 'postgresql-connector' started to ready
|
|
8
|
-
2023-06-10T07:03:29+09:00 info: Connector 'mqtt-connector' started to ready
|
|
9
|
-
2023-06-10T07:03:29+09:00 info: Connector 'mssql-connector' started to ready
|
|
10
|
-
2023-06-10T07:03:29+09:00 info: Connector 'oracle-connector' started to ready
|
|
11
|
-
2023-06-10T07:03:29+09:00 info: Connector 'mysql-connector' started to ready
|
|
12
|
-
2023-06-10T07:03:29+09:00 info: Connector 'socket-server' started to ready
|
|
13
|
-
2023-06-10T07:03:29+09:00 info: Connector 'msgraph-connector' started to ready
|
|
14
|
-
2023-06-10T07:03:29+09:00 info: Connector 'openai-connector' started to ready
|
|
15
|
-
2023-06-10T07:03:29+09:00 info: echo-back-servers are ready
|
|
16
|
-
2023-06-10T07:03:29+09:00 info: echo-back connections are ready
|
|
17
|
-
2023-06-10T07:03:29+09:00 info: http-connector connections are ready
|
|
18
|
-
2023-06-10T07:03:29+09:00 info: graphql-connector connections are ready
|
|
19
|
-
2023-06-10T07:03:29+09:00 info: sqlite-connector connections are ready
|
|
20
|
-
2023-06-10T07:03:29+09:00 info: postgresql-connector connections are ready
|
|
21
|
-
2023-06-10T07:03:29+09:00 info: mqtt-connector connections are ready
|
|
22
|
-
2023-06-10T07:03:29+09:00 info: mssql-connector connections are ready
|
|
23
|
-
2023-06-10T07:03:29+09:00 info: oracle-connector connections are ready
|
|
24
|
-
2023-06-10T07:03:29+09:00 info: mysql-connector connections are ready
|
|
25
|
-
2023-06-10T07:03:29+09:00 info: socket servers are ready
|
|
26
|
-
2023-06-10T07:03:29+09:00 info: msgraph-connector connections are ready
|
|
27
|
-
2023-06-10T07:03:29+09:00 info: openai-connector connections are ready
|
|
28
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'echo-back-server' ready
|
|
29
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'echo-back' ready
|
|
30
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'http-connector' ready
|
|
31
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'graphql-connector' ready
|
|
32
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'sqlite-connector' ready
|
|
33
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'postgresql-connector' ready
|
|
34
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'mqtt-connector' ready
|
|
35
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'mssql-connector' ready
|
|
36
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'oracle-connector' ready
|
|
37
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'mysql-connector' ready
|
|
38
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'socket-server' ready
|
|
39
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'msgraph-connector' ready
|
|
40
|
-
2023-06-10T07:03:29+09:00 info: All connector for 'openai-connector' ready
|
|
41
|
-
2023-06-10T07:03:29+09:00 info: ConnectionManager initialization done:
|