@operato/scene-wheel-sorter 1.2.49 → 1.2.62

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 CHANGED
@@ -3,6 +3,23 @@
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.62](https://github.com/things-scene/operato-scene/compare/v1.2.61...v1.2.62) (2023-09-11)
7
+
8
+ **Note:** Version bump only for package @operato/scene-wheel-sorter
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.2.50](https://github.com/things-scene/operato-scene/compare/v1.2.49...v1.2.50) (2023-07-13)
15
+
16
+
17
+ ### :bug: Bug Fix
18
+
19
+ * conveyor-join contains ([06c76ba](https://github.com/things-scene/operato-scene/commit/06c76bae3b408d9291fc24e54e10c89ae4823d49))
20
+
21
+
22
+
6
23
  ## [1.2.49](https://github.com/things-scene/operato-scene/compare/v1.2.48...v1.2.49) (2023-06-26)
7
24
 
8
25
 
Binary file
Binary file
@@ -16,10 +16,11 @@ declare const ConveyorJoin_base: {
16
16
  export default class ConveyorJoin extends ConveyorJoin_base {
17
17
  get nature(): ComponentNature;
18
18
  is3dish(): boolean;
19
+ contains(x: number, y: number): boolean;
19
20
  render(ctx: CanvasRenderingContext2D): void;
20
21
  get controls(): {
21
22
  x: any;
22
- y: any;
23
+ y: number;
23
24
  handler: {
24
25
  ondragmove: (point: import("@hatiolab/things-scene").POINT, index: number, component: Component) => void;
25
26
  };
@@ -1,7 +1,4 @@
1
1
  import { Component, Donut } from '@hatiolab/things-scene';
2
- /*
3
- * Copyright © HatioLab Inc. All rights reserved.
4
- */
5
2
  import MixinRoller from './mixin-conveyor';
6
3
  const NATURE = {
7
4
  mutable: false,
@@ -58,12 +55,20 @@ const NATURE = {
58
55
  ],
59
56
  help: 'scene/component/conveyor-join'
60
57
  };
61
- const RADIAN = 0.0174533 / Math.PI;
62
58
  var controlHandler = {
63
59
  ondragmove: function (point, index, component) {
64
- var { cx, rx } = component.model;
65
- var transcoorded = component.transcoordP2S(point.x, point.y);
66
- var ratio = ((transcoorded.x - cx) / rx) * 100;
60
+ var { cx, cy, rx, ry, startAngle, endAngle } = component.model;
61
+ var { x, y } = component.transcoordP2S(point.x, point.y);
62
+ const angle = (startAngle + endAngle) / 2;
63
+ /* 원점으로부터 최대 거리 */
64
+ const dx = Math.abs(rx * Math.sin(angle));
65
+ const dy = Math.abs(ry * Math.cos(angle));
66
+ const distance = Math.sqrt(dx * dx + dy * dy);
67
+ /* 원점으로부터 현재 컨트롤 위치까지의 거리 */
68
+ const px = Math.abs(cx - x);
69
+ const py = Math.abs(cy - y);
70
+ const pdistance = Math.sqrt(px * px + py * py);
71
+ var ratio = (pdistance / distance) * 100;
67
72
  ratio = ratio >= 100 || ratio <= -100 ? 100 : Math.abs(ratio);
68
73
  component.set({ ratio });
69
74
  }
@@ -73,13 +78,11 @@ var antiClockWiseControlHandler = {
73
78
  var { cx, cy } = component.model;
74
79
  var transcoorded = component.transcoordP2S(point.x, point.y);
75
80
  var theta = Math.atan2(-(transcoorded.y - cy), transcoorded.x - cx);
76
- if (theta > 0)
77
- if (theta <= Math.PI / 2)
78
- theta = Math.PI / 2;
79
- if (theta < 0)
80
- if (theta >= -Math.PI / 2)
81
- theta = -Math.PI / 2;
82
- var startAngle = -theta + Math.PI / 2;
81
+ if (theta > 0 && theta <= Math.PI / 2)
82
+ theta = Math.PI / 2;
83
+ if (theta < 0 && theta >= -Math.PI / 2)
84
+ theta = -Math.PI / 2;
85
+ const startAngle = (-theta + Math.PI / 2 - Math.PI * 2) % (Math.PI * 2);
83
86
  component.set({ startAngle });
84
87
  }
85
88
  };
@@ -98,6 +101,16 @@ var clockwiseControlHandler = {
98
101
  component.set({ endAngle });
99
102
  }
100
103
  };
104
+ function normalizeAngle(angle) {
105
+ angle = angle % (2 * Math.PI);
106
+ if (angle <= -Math.PI) {
107
+ angle += 2 * Math.PI;
108
+ }
109
+ else if (angle > Math.PI) {
110
+ angle -= 2 * Math.PI;
111
+ }
112
+ return angle;
113
+ }
101
114
  export default class ConveyorJoin extends MixinRoller(Donut) {
102
115
  get nature() {
103
116
  return NATURE;
@@ -105,34 +118,49 @@ export default class ConveyorJoin extends MixinRoller(Donut) {
105
118
  is3dish() {
106
119
  return false;
107
120
  }
121
+ contains(x, y) {
122
+ var { cx, cy, rx, ry, ratio, startAngle, endAngle } = this.state;
123
+ rx = Math.abs(rx);
124
+ ry = Math.abs(ry);
125
+ const normx = (x - cx) / (rx * 2 - 0.5);
126
+ const normy = (y - cy) / (ry * 2 - 0.5);
127
+ const ratiox = (x - cx) / ((rx / 100) * ratio * 2 - 0.5);
128
+ const ratioy = (y - cy) / ((ry / 100) * ratio * 2 - 0.5);
129
+ if (normx * normx + normy * normy < 0.25 && ratiox * ratiox + ratioy * ratioy > 0.25) {
130
+ const angle = normalizeAngle(Math.atan2(-normy, normx) - Math.PI / 2);
131
+ if (angle >= startAngle && angle <= endAngle) {
132
+ return true;
133
+ }
134
+ }
135
+ return false;
136
+ }
108
137
  render(ctx) {
109
138
  var { ratio = 50, cx, cy, rx, ry, startAngle = 0, endAngle = Math.PI / 2, animated = false } = this.state;
110
139
  animated && this.animOnState();
111
140
  ctx.beginPath();
112
- startAngle -= Math.PI / 2;
141
+ startAngle = (startAngle - Math.PI / 2 - Math.PI * 2) % (Math.PI * 2);
113
142
  endAngle -= Math.PI / 2;
114
143
  ctx.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngle, endAngle);
115
- // ctx.moveTo(cx + (rx / 100) * ratio ,cy);
116
- // 맨 마지막 속성이 true면 원의 범위만큼 공백이 됨
117
144
  ctx.ellipse(cx, cy, Math.abs((rx / 100) * ratio), Math.abs((ry / 100) * ratio), 0, endAngle, startAngle, true);
118
- ctx.lineTo(rx * Math.cos(startAngle) + cx, rx * Math.sin(startAngle) + cy);
145
+ ctx.lineTo(rx * Math.cos(startAngle) + cx, ry * Math.sin(startAngle) + cy);
119
146
  }
120
147
  get controls() {
121
- var { cx, cy, rx, ratio, startAngle, endAngle } = this.state;
148
+ var { cx, cy, rx, ry, ratio, startAngle, endAngle } = this.state;
122
149
  var controls = [];
123
150
  controls.push({
124
151
  x: cx + ((rx + (rx * ratio) / 100) / 2) * Math.sin(startAngle),
125
- y: cy - ((rx + (rx * ratio) / 100) / 2) * Math.cos(startAngle),
152
+ y: cy - ((ry + (ry * ratio) / 100) / 2) * Math.cos(startAngle),
126
153
  handler: antiClockWiseControlHandler
127
154
  });
128
155
  controls.push({
129
156
  x: cx + ((rx + (rx * ratio) / 100) / 2) * Math.sin(endAngle),
130
- y: cy - ((rx + (rx * ratio) / 100) / 2) * Math.cos(endAngle),
157
+ y: cy - ((ry + (ry * ratio) / 100) / 2) * Math.cos(endAngle),
131
158
  handler: clockwiseControlHandler
132
159
  });
160
+ const angle = (startAngle + endAngle) / 2;
133
161
  controls.push({
134
- x: cx + (rx / 100) * ratio,
135
- y: cy,
162
+ x: cx + ((rx * ratio) / 100) * Math.sin(angle),
163
+ y: cy - ((ry * ratio) / 100) * Math.cos(angle),
136
164
  handler: controlHandler
137
165
  });
138
166
  return controls;
@@ -1 +1 @@
1
- {"version":3,"file":"conveyor-join.js","sourceRoot":"","sources":["../src/conveyor-join.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,KAAK,EAAY,MAAM,wBAAwB,CAAA;AAEpF;;GAEG;AACH,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAE1C,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,eAAe;YACtB,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAAO,EAAE,QAAQ;wBACjB,KAAK,EAAE,CAAC;qBACT;o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,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;YAC5D,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;YAC5D,OAAO,EAAE,uBAAuB;SACjC,CAAC,CAAA;QAEF,QAAQ,CAAC,IAAI,CAAC;YACZ,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,KAAK;YAC1B,CAAC,EAAE,EAAE;YACL,OAAO,EAAE,cAAc;SACxB,CAAC,CAAA;QAEF,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,YAAmB,CAAC,CAAA","sourcesContent":["import { Component, ComponentNature, Donut, POSITION } from '@hatiolab/things-scene'\n\n/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport MixinRoller from './mixin-conveyor'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'select',\n label: 'conveyor-type',\n name: 'conveyorType',\n property: {\n options: [\n {\n display: 'Roller',\n value: 0\n },\n {\n display: 'Belt',\n value: 1\n }\n ]\n }\n },\n {\n type: 'angle',\n label: 'start-angle',\n name: 'startAngle'\n },\n {\n type: 'angle',\n label: 'end-angle',\n name: 'endAngle'\n },\n {\n type: 'number',\n label: 'ratio',\n name: 'ratio'\n },\n {\n type: 'number',\n label: 'roll-width',\n name: 'rollWidth'\n },\n {\n type: 'number',\n label: 'value',\n name: 'value'\n },\n {\n type: 'checkbox',\n label: 'animation',\n name: 'animated'\n }\n ],\n help: 'scene/component/conveyor-join'\n}\n\nconst RADIAN = 0.0174533 / Math.PI\n\nvar controlHandler = {\n ondragmove: function (point: POSITION, index: number, component: Component) {\n var { cx, rx } = component.model\n\n var transcoorded = component.transcoordP2S(point.x, point.y)\n\n var ratio = ((transcoorded.x - cx) / rx) * 100\n\n ratio = ratio >= 100 || ratio <= -100 ? 100 : Math.abs(ratio)\n\n component.set({ ratio })\n }\n}\n\nvar antiClockWiseControlHandler = {\n ondragmove: function (point: POSITION, index: number, component: Component) {\n var { cx, cy } = component.model\n\n var transcoorded = component.transcoordP2S(point.x, point.y)\n\n var theta = Math.atan2(-(transcoorded.y - cy), transcoorded.x - cx)\n\n if (theta > 0) if (theta <= Math.PI / 2) theta = Math.PI / 2\n if (theta < 0) if (theta >= -Math.PI / 2) theta = -Math.PI / 2\n\n var startAngle = -theta + Math.PI / 2\n\n component.set({ startAngle })\n }\n}\n\nvar clockwiseControlHandler = {\n ondragmove: function (point: POSITION, index: number, component: Component) {\n var { cx, cy } = component.model\n\n var transcoorded = component.transcoordP2S(point.x, point.y)\n\n var theta = Math.atan2(-(transcoorded.y - cy), transcoorded.x - cx)\n\n if (theta > 0) if (theta >= Math.PI / 2) theta = Math.PI / 2\n if (theta < 0) if (theta <= -Math.PI / 2) theta = -Math.PI / 2\n\n var endAngle = -theta + Math.PI / 2\n\n component.set({ endAngle })\n }\n}\n\nexport default class ConveyorJoin extends MixinRoller(Donut) {\n get nature() {\n return NATURE\n }\n\n is3dish() {\n return false\n }\n\n render(ctx: CanvasRenderingContext2D) {\n var { ratio = 50, cx, cy, rx, ry, startAngle = 0, endAngle = Math.PI / 2, animated = false } = this.state\n\n animated && this.animOnState()\n\n ctx.beginPath()\n\n startAngle -= Math.PI / 2\n endAngle -= Math.PI / 2\n\n ctx.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngle, endAngle)\n\n // ctx.moveTo(cx + (rx / 100) * ratio ,cy);\n // 맨 마지막 속성이 true면 원의 범위만큼 공백이 됨\n\n ctx.ellipse(cx, cy, Math.abs((rx / 100) * ratio), Math.abs((ry / 100) * ratio), 0, endAngle, startAngle, true)\n\n ctx.lineTo(rx * Math.cos(startAngle) + cx, rx * Math.sin(startAngle) + cy)\n }\n\n get controls() {\n var { cx, cy, rx, ratio, startAngle, endAngle } = this.state\n\n var controls = []\n\n controls.push({\n x: cx + ((rx + (rx * ratio) / 100) / 2) * Math.sin(startAngle),\n y: cy - ((rx + (rx * ratio) / 100) / 2) * Math.cos(startAngle),\n handler: antiClockWiseControlHandler\n })\n\n controls.push({\n x: cx + ((rx + (rx * ratio) / 100) / 2) * Math.sin(endAngle),\n y: cy - ((rx + (rx * ratio) / 100) / 2) * Math.cos(endAngle),\n handler: clockwiseControlHandler\n })\n\n controls.push({\n x: cx + (rx / 100) * ratio,\n y: cy,\n handler: controlHandler\n })\n\n return controls\n }\n}\n\nComponent.register('conveyor-join', ConveyorJoin as any)\n"]}
1
+ {"version":3,"file":"conveyor-join.js","sourceRoot":"","sources":["../src/conveyor-join.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,KAAK,EAAY,MAAM,wBAAwB,CAAA;AAEpF,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAE1C,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,eAAe;YACtB,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAAO,EAAE,QAAQ;wBACjB,KAAK,EAAE,CAAC;qBACT;oBACD;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,CAAC;qBACT;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,YAAY;SACnB;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,UAAU;SACjB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,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C,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;QACzC,QAAQ,CAAC,IAAI,CAAC;YACZ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;YAC9C,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;YAC9C,OAAO,EAAE,cAAc;SACxB,CAAC,CAAA;QAEF,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,YAAmB,CAAC,CAAA","sourcesContent":["import { Component, ComponentNature, Donut, POSITION } from '@hatiolab/things-scene'\n\nimport MixinRoller from './mixin-conveyor'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'select',\n label: 'conveyor-type',\n name: 'conveyorType',\n property: {\n options: [\n {\n display: 'Roller',\n value: 0\n },\n {\n display: 'Belt',\n value: 1\n }\n ]\n }\n },\n {\n type: 'angle',\n label: 'start-angle',\n name: 'startAngle'\n },\n {\n type: 'angle',\n label: 'end-angle',\n name: 'endAngle'\n },\n {\n type: 'number',\n label: 'ratio',\n name: 'ratio'\n },\n {\n type: 'number',\n label: 'roll-width',\n name: 'rollWidth'\n },\n {\n type: 'number',\n label: 'value',\n name: 'value'\n },\n {\n type: 'checkbox',\n label: 'animation',\n name: 'animated'\n }\n ],\n help: 'scene/component/conveyor-join'\n}\n\nvar controlHandler = {\n ondragmove: function (point: POSITION, index: number, component: Component) {\n var { cx, cy, rx, ry, startAngle, endAngle } = component.model\n\n var { x, y } = component.transcoordP2S(point.x, point.y)\n\n const angle = (startAngle + endAngle) / 2\n\n /* 원점으로부터 최대 거리 */\n const dx = Math.abs(rx * Math.sin(angle))\n const dy = Math.abs(ry * Math.cos(angle))\n const distance = Math.sqrt(dx * dx + dy * dy)\n\n /* 원점으로부터 현재 컨트롤 위치까지의 거리 */\n const px = Math.abs(cx - x)\n const py = Math.abs(cy - y)\n const pdistance = Math.sqrt(px * px + py * py)\n\n var ratio = (pdistance / distance) * 100\n\n ratio = ratio >= 100 || ratio <= -100 ? 100 : Math.abs(ratio)\n\n component.set({ ratio })\n }\n}\n\nvar antiClockWiseControlHandler = {\n ondragmove: function (point: POSITION, index: number, component: Component) {\n var { cx, cy } = component.model\n\n var transcoorded = component.transcoordP2S(point.x, point.y)\n\n var theta = Math.atan2(-(transcoorded.y - cy), transcoorded.x - cx)\n\n if (theta > 0 && theta <= Math.PI / 2) theta = Math.PI / 2\n if (theta < 0 && theta >= -Math.PI / 2) theta = -Math.PI / 2\n\n const startAngle = (-theta + Math.PI / 2 - Math.PI * 2) % (Math.PI * 2)\n\n component.set({ startAngle })\n }\n}\n\nvar clockwiseControlHandler = {\n ondragmove: function (point: POSITION, index: number, component: Component) {\n var { cx, cy } = component.model\n\n var transcoorded = component.transcoordP2S(point.x, point.y)\n\n var theta = Math.atan2(-(transcoorded.y - cy), transcoorded.x - cx)\n\n if (theta > 0) if (theta >= Math.PI / 2) theta = Math.PI / 2\n if (theta < 0) if (theta <= -Math.PI / 2) theta = -Math.PI / 2\n\n var endAngle = -theta + Math.PI / 2\n\n component.set({ endAngle })\n }\n}\n\nfunction normalizeAngle(angle: number): number {\n angle = angle % (2 * Math.PI)\n if (angle <= -Math.PI) {\n angle += 2 * Math.PI\n } else if (angle > Math.PI) {\n angle -= 2 * Math.PI\n }\n return angle\n}\n\nexport default class ConveyorJoin extends MixinRoller(Donut) {\n get nature() {\n return NATURE\n }\n\n is3dish() {\n return false\n }\n\n contains(x: number, y: number) {\n var { cx, cy, rx, ry, ratio, startAngle, endAngle } = this.state\n rx = Math.abs(rx)\n ry = Math.abs(ry)\n\n const normx = (x - cx) / (rx * 2 - 0.5)\n const normy = (y - cy) / (ry * 2 - 0.5)\n const ratiox = (x - cx) / ((rx / 100) * ratio * 2 - 0.5)\n const ratioy = (y - cy) / ((ry / 100) * ratio * 2 - 0.5)\n\n if (normx * normx + normy * normy < 0.25 && ratiox * ratiox + ratioy * ratioy > 0.25) {\n const angle = normalizeAngle(Math.atan2(-normy, normx) - Math.PI / 2)\n\n if (angle >= startAngle && angle <= endAngle) {\n return true\n }\n }\n\n return false\n }\n\n render(ctx: CanvasRenderingContext2D) {\n var { ratio = 50, cx, cy, rx, ry, startAngle = 0, endAngle = Math.PI / 2, animated = false } = this.state\n\n animated && this.animOnState()\n\n ctx.beginPath()\n\n startAngle = (startAngle - Math.PI / 2 - Math.PI * 2) % (Math.PI * 2)\n endAngle -= Math.PI / 2\n\n ctx.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngle, endAngle)\n ctx.ellipse(cx, cy, Math.abs((rx / 100) * ratio), Math.abs((ry / 100) * ratio), 0, endAngle, startAngle, true)\n\n ctx.lineTo(rx * Math.cos(startAngle) + cx, ry * Math.sin(startAngle) + cy)\n }\n\n get controls() {\n var { cx, cy, rx, ry, ratio, startAngle, endAngle } = this.state\n\n var controls = []\n\n controls.push({\n x: cx + ((rx + (rx * ratio) / 100) / 2) * Math.sin(startAngle),\n y: cy - ((ry + (ry * ratio) / 100) / 2) * Math.cos(startAngle),\n handler: antiClockWiseControlHandler\n })\n\n controls.push({\n x: cx + ((rx + (rx * ratio) / 100) / 2) * Math.sin(endAngle),\n y: cy - ((ry + (ry * ratio) / 100) / 2) * Math.cos(endAngle),\n handler: clockwiseControlHandler\n })\n\n const angle = (startAngle + endAngle) / 2\n controls.push({\n x: cx + ((rx * ratio) / 100) * Math.sin(angle),\n y: cy - ((ry * ratio) / 100) * Math.cos(angle),\n handler: controlHandler\n })\n\n return controls\n }\n}\n\nComponent.register('conveyor-join', ConveyorJoin as any)\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/scene-wheel-sorter",
3
3
  "description": "The wheel sorter component for things-scene",
4
4
  "author": "heartyoh",
5
- "version": "1.2.49",
5
+ "version": "1.2.62",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "license": "MIT",
@@ -57,5 +57,5 @@
57
57
  "prettier --write"
58
58
  ]
59
59
  },
60
- "gitHead": "f91b0d45641177ae36015ebd23b780a48715349b"
60
+ "gitHead": "be3109453bba40b787b5992bd2b8359215bee1a1"
61
61
  }
@@ -1,8 +1,5 @@
1
1
  import { Component, ComponentNature, Donut, POSITION } from '@hatiolab/things-scene'
2
2
 
3
- /*
4
- * Copyright © HatioLab Inc. All rights reserved.
5
- */
6
3
  import MixinRoller from './mixin-conveyor'
7
4
 
8
5
  const NATURE: ComponentNature = {
@@ -61,15 +58,25 @@ const NATURE: ComponentNature = {
61
58
  help: 'scene/component/conveyor-join'
62
59
  }
63
60
 
64
- const RADIAN = 0.0174533 / Math.PI
65
-
66
61
  var controlHandler = {
67
62
  ondragmove: function (point: POSITION, index: number, component: Component) {
68
- var { cx, rx } = component.model
63
+ var { cx, cy, rx, ry, startAngle, endAngle } = component.model
69
64
 
70
- var transcoorded = component.transcoordP2S(point.x, point.y)
65
+ var { x, y } = component.transcoordP2S(point.x, point.y)
66
+
67
+ const angle = (startAngle + endAngle) / 2
68
+
69
+ /* 원점으로부터 최대 거리 */
70
+ const dx = Math.abs(rx * Math.sin(angle))
71
+ const dy = Math.abs(ry * Math.cos(angle))
72
+ const distance = Math.sqrt(dx * dx + dy * dy)
73
+
74
+ /* 원점으로부터 현재 컨트롤 위치까지의 거리 */
75
+ const px = Math.abs(cx - x)
76
+ const py = Math.abs(cy - y)
77
+ const pdistance = Math.sqrt(px * px + py * py)
71
78
 
72
- var ratio = ((transcoorded.x - cx) / rx) * 100
79
+ var ratio = (pdistance / distance) * 100
73
80
 
74
81
  ratio = ratio >= 100 || ratio <= -100 ? 100 : Math.abs(ratio)
75
82
 
@@ -85,10 +92,10 @@ var antiClockWiseControlHandler = {
85
92
 
86
93
  var theta = Math.atan2(-(transcoorded.y - cy), transcoorded.x - cx)
87
94
 
88
- if (theta > 0) if (theta <= Math.PI / 2) theta = Math.PI / 2
89
- if (theta < 0) if (theta >= -Math.PI / 2) theta = -Math.PI / 2
95
+ if (theta > 0 && theta <= Math.PI / 2) theta = Math.PI / 2
96
+ if (theta < 0 && theta >= -Math.PI / 2) theta = -Math.PI / 2
90
97
 
91
- var startAngle = -theta + Math.PI / 2
98
+ const startAngle = (-theta + Math.PI / 2 - Math.PI * 2) % (Math.PI * 2)
92
99
 
93
100
  component.set({ startAngle })
94
101
  }
@@ -111,6 +118,16 @@ var clockwiseControlHandler = {
111
118
  }
112
119
  }
113
120
 
121
+ function normalizeAngle(angle: number): number {
122
+ angle = angle % (2 * Math.PI)
123
+ if (angle <= -Math.PI) {
124
+ angle += 2 * Math.PI
125
+ } else if (angle > Math.PI) {
126
+ angle -= 2 * Math.PI
127
+ }
128
+ return angle
129
+ }
130
+
114
131
  export default class ConveyorJoin extends MixinRoller(Donut) {
115
132
  get nature() {
116
133
  return NATURE
@@ -120,6 +137,27 @@ export default class ConveyorJoin extends MixinRoller(Donut) {
120
137
  return false
121
138
  }
122
139
 
140
+ contains(x: number, y: number) {
141
+ var { cx, cy, rx, ry, ratio, startAngle, endAngle } = this.state
142
+ rx = Math.abs(rx)
143
+ ry = Math.abs(ry)
144
+
145
+ const normx = (x - cx) / (rx * 2 - 0.5)
146
+ const normy = (y - cy) / (ry * 2 - 0.5)
147
+ const ratiox = (x - cx) / ((rx / 100) * ratio * 2 - 0.5)
148
+ const ratioy = (y - cy) / ((ry / 100) * ratio * 2 - 0.5)
149
+
150
+ if (normx * normx + normy * normy < 0.25 && ratiox * ratiox + ratioy * ratioy > 0.25) {
151
+ const angle = normalizeAngle(Math.atan2(-normy, normx) - Math.PI / 2)
152
+
153
+ if (angle >= startAngle && angle <= endAngle) {
154
+ return true
155
+ }
156
+ }
157
+
158
+ return false
159
+ }
160
+
123
161
  render(ctx: CanvasRenderingContext2D) {
124
162
  var { ratio = 50, cx, cy, rx, ry, startAngle = 0, endAngle = Math.PI / 2, animated = false } = this.state
125
163
 
@@ -127,39 +165,36 @@ export default class ConveyorJoin extends MixinRoller(Donut) {
127
165
 
128
166
  ctx.beginPath()
129
167
 
130
- startAngle -= Math.PI / 2
168
+ startAngle = (startAngle - Math.PI / 2 - Math.PI * 2) % (Math.PI * 2)
131
169
  endAngle -= Math.PI / 2
132
170
 
133
171
  ctx.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, startAngle, endAngle)
134
-
135
- // ctx.moveTo(cx + (rx / 100) * ratio ,cy);
136
- // 맨 마지막 속성이 true면 원의 범위만큼 공백이 됨
137
-
138
172
  ctx.ellipse(cx, cy, Math.abs((rx / 100) * ratio), Math.abs((ry / 100) * ratio), 0, endAngle, startAngle, true)
139
173
 
140
- ctx.lineTo(rx * Math.cos(startAngle) + cx, rx * Math.sin(startAngle) + cy)
174
+ ctx.lineTo(rx * Math.cos(startAngle) + cx, ry * Math.sin(startAngle) + cy)
141
175
  }
142
176
 
143
177
  get controls() {
144
- var { cx, cy, rx, ratio, startAngle, endAngle } = this.state
178
+ var { cx, cy, rx, ry, ratio, startAngle, endAngle } = this.state
145
179
 
146
180
  var controls = []
147
181
 
148
182
  controls.push({
149
183
  x: cx + ((rx + (rx * ratio) / 100) / 2) * Math.sin(startAngle),
150
- y: cy - ((rx + (rx * ratio) / 100) / 2) * Math.cos(startAngle),
184
+ y: cy - ((ry + (ry * ratio) / 100) / 2) * Math.cos(startAngle),
151
185
  handler: antiClockWiseControlHandler
152
186
  })
153
187
 
154
188
  controls.push({
155
189
  x: cx + ((rx + (rx * ratio) / 100) / 2) * Math.sin(endAngle),
156
- y: cy - ((rx + (rx * ratio) / 100) / 2) * Math.cos(endAngle),
190
+ y: cy - ((ry + (ry * ratio) / 100) / 2) * Math.cos(endAngle),
157
191
  handler: clockwiseControlHandler
158
192
  })
159
193
 
194
+ const angle = (startAngle + endAngle) / 2
160
195
  controls.push({
161
- x: cx + (rx / 100) * ratio,
162
- y: cy,
196
+ x: cx + ((rx * ratio) / 100) * Math.sin(angle),
197
+ y: cy - ((ry * ratio) / 100) * Math.cos(angle),
163
198
  handler: controlHandler
164
199
  })
165
200
 
@@ -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/mixin-conveyor.ts","./src/conveyor-join-trapezoid.ts","./src/conveyor-join.ts","./src/conveyor.ts","./src/mixin-wheel-sorter.ts","./src/wheel-sorter.ts","./src/mixin-scanner.ts","./src/scanner.ts","./src/index.ts","./src/templates/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":"ea428a166a50de45c134f7056d27eab6c0e15399972f831bdcfdd881cbe125c5","signature":"c892d48eb060e936fd88d9928a6a16cdc54c67325a0de7543d035d7bb1b8651e"},{"version":"9c19ed0138fe5209ca0e2b903fe633fd1373e7bc2d51af36f587ff6ce50d4781","signature":"7b3979cd4f693414dc1b54dfe4e61d9be0afc5f56318b53cca463f3f1e26d1da"},{"version":"9d3103d2b817d8c0fe42b74ca36fdac94d75384594000cddd732be14d02a07e2","signature":"fbb750697006498d4d9f84b3c64ac01ae478c905ea2300da993b4a652895d5cd"},{"version":"c2eec75a701801aa630def966f99f5f7178eb348ee61658b564e6165f6391e5a","signature":"68c7ebf19295872d31aca04d1fe07d3929ad3cceee052ec1a7844a234333285e"},{"version":"0ccfe5ffe0419292b77ca1c3792731922819752149a83f68aa22c254dba63c0d","signature":"ea9458a72c6233241af9fc13e671757c8585713d964aecb9e67dc8a97454cb0c"},{"version":"ef949c73489f45f2a5362f3e77c8a13e1f727e019ffd230dc3b1a5a16ce59f69","signature":"c06286f59beb7ce99f5ff4edcee372dbcba33c1fd7c4a7ecb3cffe787a078c71"},{"version":"f6439142c9bfb712f4dce19127f649b894a761f567ff816de58011ab2aa93d87","signature":"f74bcb8c477ede72d82fade8f85d16b84f05e5155662ef2907faa62be7783c37"},{"version":"5e4a0d35d31ececc784576e09cb901c52ce6e2e7e5c6125a28fe9409d9c70cfd","signature":"72c1845bd13533947e6e165119926a8ab1fbe07d3fa35a820d9fde1f44d18bee"},{"version":"6222ab2cb245d6898020af2ddfe25e75f2438dc1a516511a9807a6ff476ce81d","signature":"12b1237dc5fbd4b9e77fd326d17b52dcf2594061e59ac36e2afb5d5354388148"},{"version":"ec4c246f49bcf3d12494536d8f410e9d14013e667474366159f4442c3128e78a","signature":"20010134b137be8d3f73d6b2f8eb7eb4bee1b1cafd91b083802cd28e3bf11042"}],"root":[[37,46]],"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,36,37],[35,38,39,40,42,44],[35,36],[35,36,43],[35],[35,36,41],[36],[38,39,40,42,44]],"referencedMap":[[38,1],[39,1],[40,1],[45,2],[37,3],[43,3],[41,3],[44,4],[46,5],[42,6]],"exportedModulesMap":[[38,7],[39,7],[40,7],[45,8],[37,7],[43,7],[41,7],[44,7],[42,7]],"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,38,39,40,45,37,43,41,44,46,42]},"version":"5.1.3"}
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.date.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/mixin-conveyor.ts","./src/conveyor-join-trapezoid.ts","./src/conveyor-join.ts","./src/conveyor.ts","./src/mixin-wheel-sorter.ts","./src/wheel-sorter.ts","./src/mixin-scanner.ts","./src/scanner.ts","./src/index.ts","./src/templates/index.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7",{"version":"0075fa5ceda385bcdf3488e37786b5a33be730e8bc4aa3cf1e78c63891752ce8","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","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":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","f32044e28142d7080c318268058e6a3de42be0252512491d2fc9bf0fa07c3e65",{"version":"ea428a166a50de45c134f7056d27eab6c0e15399972f831bdcfdd881cbe125c5","signature":"c892d48eb060e936fd88d9928a6a16cdc54c67325a0de7543d035d7bb1b8651e"},{"version":"9c19ed0138fe5209ca0e2b903fe633fd1373e7bc2d51af36f587ff6ce50d4781","signature":"7b3979cd4f693414dc1b54dfe4e61d9be0afc5f56318b53cca463f3f1e26d1da"},{"version":"eff995c352296a25be103f9c4764dab9b147fba3864b976be33397c0fca82615","signature":"dff1056439f45cd3d7624618959fc3b773364411c593ef3f3eaa5036ba7d5e61"},{"version":"c2eec75a701801aa630def966f99f5f7178eb348ee61658b564e6165f6391e5a","signature":"68c7ebf19295872d31aca04d1fe07d3929ad3cceee052ec1a7844a234333285e"},{"version":"0ccfe5ffe0419292b77ca1c3792731922819752149a83f68aa22c254dba63c0d","signature":"ea9458a72c6233241af9fc13e671757c8585713d964aecb9e67dc8a97454cb0c"},{"version":"ef949c73489f45f2a5362f3e77c8a13e1f727e019ffd230dc3b1a5a16ce59f69","signature":"c06286f59beb7ce99f5ff4edcee372dbcba33c1fd7c4a7ecb3cffe787a078c71"},{"version":"f6439142c9bfb712f4dce19127f649b894a761f567ff816de58011ab2aa93d87","signature":"f74bcb8c477ede72d82fade8f85d16b84f05e5155662ef2907faa62be7783c37"},{"version":"5e4a0d35d31ececc784576e09cb901c52ce6e2e7e5c6125a28fe9409d9c70cfd","signature":"72c1845bd13533947e6e165119926a8ab1fbe07d3fa35a820d9fde1f44d18bee"},{"version":"6222ab2cb245d6898020af2ddfe25e75f2438dc1a516511a9807a6ff476ce81d","signature":"12b1237dc5fbd4b9e77fd326d17b52dcf2594061e59ac36e2afb5d5354388148"},{"version":"ec4c246f49bcf3d12494536d8f410e9d14013e667474366159f4442c3128e78a","signature":"20010134b137be8d3f73d6b2f8eb7eb4bee1b1cafd91b083802cd28e3bf11042"}],"root":[[38,47]],"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":[[36,37,38],[36,39,40,41,43,45],[36,37],[36,37,44],[36],[36,37,42],[37],[39,40,41,43,45]],"referencedMap":[[39,1],[40,1],[41,1],[46,2],[38,3],[44,3],[42,3],[45,4],[47,5],[43,6]],"exportedModulesMap":[[39,7],[40,7],[41,7],[46,8],[38,7],[44,7],[42,7],[45,7],[43,7]],"semanticDiagnosticsPerFile":[37,36,34,35,7,9,8,2,10,11,12,13,14,15,16,17,3,4,18,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,1,39,40,41,46,38,44,42,45,47,43]},"version":"5.2.2"}