@operato/scene-gauge 0.1.3 → 1.0.0-alpha.1
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 +35 -0
- package/dist/gauge-circle.d.ts +2 -46
- package/dist/gauge-circle.js.map +1 -1
- package/dist/gauge-horizon.d.ts +2 -46
- package/dist/gauge-horizon.js +1 -1
- package/dist/gauge-horizon.js.map +1 -1
- package/dist/gauge-vertical.d.ts +2 -46
- package/dist/gauge-vertical.js +1 -1
- package/dist/gauge-vertical.js.map +1 -1
- package/package.json +6 -6
- package/src/gauge-circle.ts +10 -23
- package/src/gauge-horizon.ts +8 -9
- package/src/gauge-vertical.ts +8 -9
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
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.0.0-alpha.1](https://github.com/things-scene/operato-scene/compare/v0.1.5...v1.0.0-alpha.1) (2022-03-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
* [@operato](https://github.com/operato) 1.0.0-alpha and [@things-factory](https://github.com/things-factory) 5.0.0-alpha ([5f7f2d4](https://github.com/things-scene/operato-scene/commit/5f7f2d45ccc8300822e712c93948850bcdb43687))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### [0.1.5](https://github.com/things-scene/operato-scene/compare/v0.1.4...v0.1.5) (2022-02-10)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### :rocket: New Features
|
|
19
|
+
|
|
20
|
+
* move news-ticker to here ([c5e565d](https://github.com/things-scene/operato-scene/commit/c5e565dff6016977766e54b3b74c4f80838f7cd2))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### [0.1.4](https://github.com/things-scene/operato-scene/compare/v0.1.3...v0.1.4) (2022-01-30)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### :rocket: New Features
|
|
28
|
+
|
|
29
|
+
* scene-label migrated from things-factory project ([3c9033c](https://github.com/things-scene/operato-scene/commit/3c9033c9af28bdd0377ac4a538ef7d4bfd38d488))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### :bug: Bug Fix
|
|
33
|
+
|
|
34
|
+
* applied [@operato](https://github.com/operato) 0.3.24 ([fb4fed0](https://github.com/things-scene/operato-scene/commit/fb4fed0d9fd44d6ae38db6359fdca15fc61f167c))
|
|
35
|
+
* applied [@things-factory](https://github.com/things-factory)@^4.0.40 ([3d4e6cb](https://github.com/things-scene/operato-scene/commit/3d4e6cbe167f605a68333fffe18949adb5247c1d))
|
|
36
|
+
* upgrade [@operato](https://github.com/operato) dependencies ([7d2478e](https://github.com/things-scene/operato-scene/commit/7d2478e72586b662e6c219f0720c78cde5dd7a2d))
|
|
37
|
+
* upgrade [@things-factory](https://github.com/things-factory) and [@operato](https://github.com/operato) ([4d97897](https://github.com/things-scene/operato-scene/commit/4d978970d3c8aba6ecae99e3fa98e431a647e8cb))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
### [0.1.3](https://github.com/things-scene/operato-scene/compare/v0.1.2...v0.1.3) (2022-01-28)
|
|
7
42
|
|
|
8
43
|
|
package/dist/gauge-circle.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Donut } from '@hatiolab/things-scene';
|
|
1
|
+
import { ComponentNature, Donut } from '@hatiolab/things-scene';
|
|
2
2
|
declare const GaugeCircle_base: (new (...args: any[]) => {
|
|
3
3
|
value: number;
|
|
4
4
|
animValue: number;
|
|
@@ -8,50 +8,6 @@ export default class GaugeCircle extends GaugeCircle_base {
|
|
|
8
8
|
_draw(context: CanvasRenderingContext2D): void;
|
|
9
9
|
contains(x: number, y: number): boolean;
|
|
10
10
|
_post_draw(context: CanvasRenderingContext2D): void;
|
|
11
|
-
get nature():
|
|
12
|
-
mutable: boolean;
|
|
13
|
-
resizable: boolean;
|
|
14
|
-
rotatable: boolean;
|
|
15
|
-
properties: ({
|
|
16
|
-
type: string;
|
|
17
|
-
label: string;
|
|
18
|
-
name: string;
|
|
19
|
-
property: string;
|
|
20
|
-
observe?: undefined;
|
|
21
|
-
} | {
|
|
22
|
-
type: string;
|
|
23
|
-
label: string;
|
|
24
|
-
name: string;
|
|
25
|
-
observe: (this: HTMLElement, startValue: number) => void;
|
|
26
|
-
property: string;
|
|
27
|
-
} | {
|
|
28
|
-
type: string;
|
|
29
|
-
label: string;
|
|
30
|
-
name: string;
|
|
31
|
-
property: {
|
|
32
|
-
min: number;
|
|
33
|
-
max: number;
|
|
34
|
-
label?: undefined;
|
|
35
|
-
};
|
|
36
|
-
observe?: undefined;
|
|
37
|
-
} | {
|
|
38
|
-
type: string;
|
|
39
|
-
label: string;
|
|
40
|
-
name: string;
|
|
41
|
-
property: {
|
|
42
|
-
label: string;
|
|
43
|
-
min?: undefined;
|
|
44
|
-
max?: undefined;
|
|
45
|
-
};
|
|
46
|
-
observe?: undefined;
|
|
47
|
-
} | {
|
|
48
|
-
type: string;
|
|
49
|
-
label: string;
|
|
50
|
-
name: string;
|
|
51
|
-
property?: undefined;
|
|
52
|
-
observe?: undefined;
|
|
53
|
-
})[];
|
|
54
|
-
help: string;
|
|
55
|
-
};
|
|
11
|
+
get nature(): ComponentNature;
|
|
56
12
|
}
|
|
57
13
|
export {};
|
package/dist/gauge-circle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gauge-circle.js","sourceRoot":"","sources":["../src/gauge-circle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,MAAM,G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AE,CAAC,CAAA;IAC7B,CAAC;IAED,QAAQ,CAAC,CAAS,EAAE,CAAS;QAC3B,qBAAqB;QACrB,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAEnC,IAAI,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAA;QACrC,IAAI,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAA;QAErC,OAAO,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAA;IAC7C,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, Donut, ValueHolder } from '@hatiolab/things-scene';\n\nimport { PROPERTIES } from './gauge-properties';\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n ...PROPERTIES,\n {\n type: 'number',\n label: 'start-angle',\n name: 'startAngle',\n property: 'startAngle'\n },\n {\n type: 'number',\n label: 'end-angle',\n name: 'endAngle',\n property: 'endAngle'\n },\n {\n type: 'color',\n label: 'text-fill-style',\n name: 'textFillStyle',\n property: 'textFillStyle'\n },\n {\n type: 'color',\n label: 'needle-fill-style',\n name: 'needleFillStyle',\n property: 'needleFillStyle'\n },\n {\n type: 'color',\n label: 'inner-circle-fill-style',\n name: 'innerCircleFillStyle',\n property: 'innerCircleFillStyle'\n },\n {\n type: 'checkbox',\n label: 'in-text',\n name: 'inText',\n property: 'inText'\n }\n ],\n help: 'scene/component/gauge-circle'\n}\n\nfunction drawStepLine(context: CanvasRenderingContext2D, ang: number, rx: number, stepNeedleSize: number) {\n context.rotate(ang)\n context.translate(0, -rx)\n\n context.fillRect(0, -rx * 0.14, stepNeedleSize, rx * 0.175)\n context.translate(0, rx)\n context.rotate(-ang)\n}\n\nfunction drawSubStepLine(context: CanvasRenderingContext2D, ang: number, rx: number, stepNeedleSize: number) {\n context.rotate(ang)\n context.translate(0, -rx)\n\n context.fillRect(0, -rx * 0.04, stepNeedleSize, rx * 0.075)\n context.translate(0, rx)\n context.rotate(-ang)\n}\n\nfunction drawStepText(context: CanvasRenderingContext2D, text: string, ang: number, rx: number) {\n context.rotate(ang)\n context.translate(0, -rx * 0.83)\n context.rotate(-ang)\n\n context.fillText(text, 0, 0)\n context.rotate(ang)\n context.translate(0, rx * 0.83)\n context.rotate(-ang)\n}\n\nfunction drawNeedle(context: CanvasRenderingContext2D, rx: number, ang: number) {\n context.rotate(ang)\n\n context.beginPath()\n\n context.moveTo(rx * 0.035, 0) // 중앙 두께\n\n context.lineTo(0, rx * 0.8) // 끝 점\n\n context.lineTo(-rx * 0.035, 0) // 중앙 두께\n\n context.lineTo(-rx * 0.015, -rx * 0.2) // 뒷쪽 두께\n context.lineTo(rx * 0.015, -rx * 0.2) // 뒷쪽 두께\n\n context.rotate(-ang)\n}\n\nexport default class GaugeCircle extends ValueHolder(Donut) {\n _draw(context: CanvasRenderingContext2D) {\n var {\n lineWidth = 20,\n startValue,\n endValue,\n step,\n subStep,\n startAngle = 0,\n endAngle = 180,\n fontColor = 'black',\n showStepText = true,\n showStartValue = true,\n showEndValue = true,\n showStepLine = true,\n showSubStep = true,\n inText = true,\n colorStops, // 스텝별 각각 다른 색\n fillStyle,\n textFillStyle = 'black',\n needleFillStyle = 'black',\n innerCircleFillStyle = 'gray',\n stepNeedleSize = 2,\n stepFillStyle,\n stepTextSize,\n cx,\n cy,\n rx,\n ry,\n ratio,\n animFromBase = false\n } = this.model\n\n startValue = Number(startValue)\n\n this.animOnValueChange(this.value, animFromBase, startValue)\n\n const RADIAN = 0.0174533 / Math.PI\n const rxRatio = (rx / 100) * ratio // 원 안에 지워지는 비율을 계산한 rx - ratio의 비율에 따라 크기가 변함\n const ryRatio = (ry / 100) * ratio // 원 안에 지워지는 비율을 계산한 ry - ratio의 비율에 따라 크기가 변함\n const circleSize = (endAngle - startAngle) / 180 // 원의 총 길이. - PI * 2가 원이므로 (360도 = 2, 180도 = 1)\n const totalValue = endValue - startValue // 게이지의 시작과 끝 값의 크기\n\n startAngle = startAngle * RADIAN - 0.5 // 맨 위쪽을 중심으로 앵글의 범위에 따라 왼쪽으로 넓어짐\n endAngle = endAngle * RADIAN - 0.5 // 맨 위쪽을 중심으로 앵글의 범위에 따라 오른쪽으로 넓어짐\n\n context.translate(cx, cy)\n\n //// 메인 게이지 원 그리기 ////\n context.beginPath()\n\n context.ellipse(\n 0,\n 0,\n Math.abs(rx),\n Math.abs(ry),\n 0,\n startAngle * Math.PI,\n endAngle * Math.PI\n )\n this.drawStroke(context)\n context.ellipse(\n 0,\n 0,\n Math.abs(rxRatio),\n Math.abs(ryRatio),\n 0,\n endAngle * Math.PI,\n startAngle * Math.PI,\n true\n ) // 반대로 그리며 원을 지움.\n // this.drawFill(context)\n\n context.closePath()\n\n //// 스텝별 색 칠하기 ////\n if (colorStops) {\n let beforeValue = 0\n let endStepAngle = 0\n context.moveTo(0, 0)\n\n colorStops.forEach(function (v: {position: number; color: string;}, idx: number, arr: {position: number; color: string;}[]) {\n context.beginPath()\n\n let value = Math.max(Math.min(v.position - startValue, totalValue), 0) // v.position 범위의 최소값은 0, 최대값은 totalValue가 되야함.\n let startStepAngle = endStepAngle || Math.PI * (startAngle + (circleSize * beforeValue) / totalValue)\n\n if (idx === arr.length - 1)\n // 마지막값은 무조건 끝까지 채워주도록 한다\n endStepAngle = Math.PI * (startAngle + circleSize)\n else endStepAngle = Math.PI * (startAngle + (circleSize * value) / totalValue)\n\n if (beforeValue > totalValue || beforeValue > value)\n // 값이 게이지의 최대 값을 넘어가거나 이전 값 보다 현재값이 작으면 다시 그릴 필요 없음\n return false\n\n context.ellipse(0, 0, Math.abs(rx), Math.abs(ry), 0, startStepAngle, endStepAngle)\n context.ellipse(0, 0, Math.abs(rxRatio), Math.abs(ryRatio), 0, endStepAngle, startStepAngle, true)\n context.fillStyle = v.color\n context.fill()\n\n beforeValue = value\n })\n }\n context.scale(1, ry / rx)\n\n //// 바늘 그리기 ////\n context.beginPath()\n let drawingValue = this.animValue\n drawingValue = Math.max(Math.min(drawingValue, endValue), startValue) // 그려지는 값은 startValue보다 작을 수 없고, endValue보다 클 수 없음.\n\n let ang = Math.PI * ((circleSize * (drawingValue - startValue)) / totalValue + startAngle - 0.5)\n\n drawNeedle(context, rx, ang)\n\n context.fillStyle = needleFillStyle\n context.fill()\n\n //// 중앙 원 그리기 ////\n context.beginPath()\n context.ellipse(0, 0, Math.abs(rx) / 15, Math.abs(rx) / 15, 0, 0, 2 * Math.PI)\n context.fillStyle = innerCircleFillStyle\n context.fill()\n\n //// 스텝 선 그리기 ////\n context.fillStyle = stepFillStyle\n if (showStepLine) {\n let count = totalValue / step\n\n // Draw StartValue\n drawStepLine(context, Math.PI * (startAngle + 0.5), rx * 0.8, stepNeedleSize) // 원을 그릴때 PI는 45도 부터 그리지만 angle은 0도부터 틀어서 + 0.5도를 곱해줘야함\n // Draw StepValue\n for (let num = 1; num < count; num++) {\n let ang = Math.PI * ((circleSize / count) * num + startAngle + 0.5)\n\n drawStepLine(context, ang, rx * 0.8, stepNeedleSize)\n }\n // Draw EndValue\n drawStepLine(context, Math.PI * (endAngle + 0.5), rx * 0.8, stepNeedleSize)\n }\n\n //// 서브 스탭 그리기 ////\n if (showSubStep) {\n let count = totalValue\n\n // Draw StepValue\n for (let num = 1; num <= count; num++) {\n if (num % step == 0 || num % subStep != 0) {\n // 메인 스탭과 서브 스탭은 그리지 않음\n continue\n }\n let ang = Math.PI * ((circleSize / count) * num + startAngle + 0.5)\n\n drawSubStepLine(context, ang, rx * 0.8, stepNeedleSize)\n }\n }\n\n //// 스텝 텍스트 그리기 ////\n context.fillStyle = textFillStyle\n context.font = (rx * stepTextSize) / 50 + 'px arial'\n context.textBaseline = 'middle'\n context.textAlign = 'center'\n let textLocation = inText ? 0.8 : 1.35\n\n if (showStartValue) {\n // Draw StartText\n drawStepText(context, startValue, Math.PI * (startAngle + 0.5), rx * textLocation)\n }\n\n if (showEndValue) {\n // Draw EndText\n drawStepText(context, endValue, Math.PI * (endAngle + 0.5), rx * textLocation)\n }\n\n if (showStepText) {\n // Draw StepText\n let count = totalValue / step\n\n for (let num = 1; num < count; num++) {\n let value = startValue + step * num\n let ang = Math.PI * ((circleSize / count) * num + startAngle + 0.5)\n\n drawStepText(context, value, ang, rx * textLocation)\n }\n }\n\n context.scale(1, rx / ry)\n context.translate(-cx, -cy)\n }\n\n contains(x: number, y: number): boolean {\n // 컨테인즈는 Ellipse로 정의함\n var { cx, cy, rx, ry } = this.model\n\n var normx = (x - cx) / (rx * 2 - 0.5)\n var normy = (y - cy) / (ry * 2 - 0.5)\n\n return normx * normx + normy * normy < 0.25\n }\n\n _post_draw(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('gauge-circle', GaugeCircle)\n"]}
|
|
1
|
+
{"version":3,"file":"gauge-circle.js","sourceRoot":"","sources":["../src/gauge-circle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAmB,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEvF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/C,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,GAAG,UAAU;QACb;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EA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AAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAEnC,IAAI,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAA;QACrC,IAAI,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAA;QAErC,OAAO,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAA;IAC7C,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, ComponentNature, Donut, ValueHolder } from '@hatiolab/things-scene'\n\nimport { PROPERTIES } from './gauge-properties'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n ...PROPERTIES,\n {\n type: 'number',\n label: 'start-angle',\n name: 'startAngle',\n property: 'startAngle'\n },\n {\n type: 'number',\n label: 'end-angle',\n name: 'endAngle',\n property: 'endAngle'\n },\n {\n type: 'color',\n label: 'text-fill-style',\n name: 'textFillStyle',\n property: 'textFillStyle'\n },\n {\n type: 'color',\n label: 'needle-fill-style',\n name: 'needleFillStyle',\n property: 'needleFillStyle'\n },\n {\n type: 'color',\n label: 'inner-circle-fill-style',\n name: 'innerCircleFillStyle',\n property: 'innerCircleFillStyle'\n },\n {\n type: 'checkbox',\n label: 'in-text',\n name: 'inText',\n property: 'inText'\n }\n ],\n help: 'scene/component/gauge-circle'\n}\n\nfunction drawStepLine(context: CanvasRenderingContext2D, ang: number, rx: number, stepNeedleSize: number) {\n context.rotate(ang)\n context.translate(0, -rx)\n\n context.fillRect(0, -rx * 0.14, stepNeedleSize, rx * 0.175)\n context.translate(0, rx)\n context.rotate(-ang)\n}\n\nfunction drawSubStepLine(context: CanvasRenderingContext2D, ang: number, rx: number, stepNeedleSize: number) {\n context.rotate(ang)\n context.translate(0, -rx)\n\n context.fillRect(0, -rx * 0.04, stepNeedleSize, rx * 0.075)\n context.translate(0, rx)\n context.rotate(-ang)\n}\n\nfunction drawStepText(context: CanvasRenderingContext2D, text: string, ang: number, rx: number) {\n context.rotate(ang)\n context.translate(0, -rx * 0.83)\n context.rotate(-ang)\n\n context.fillText(text, 0, 0)\n context.rotate(ang)\n context.translate(0, rx * 0.83)\n context.rotate(-ang)\n}\n\nfunction drawNeedle(context: CanvasRenderingContext2D, rx: number, ang: number) {\n context.rotate(ang)\n\n context.beginPath()\n\n context.moveTo(rx * 0.035, 0) // 중앙 두께\n\n context.lineTo(0, rx * 0.8) // 끝 점\n\n context.lineTo(-rx * 0.035, 0) // 중앙 두께\n\n context.lineTo(-rx * 0.015, -rx * 0.2) // 뒷쪽 두께\n context.lineTo(rx * 0.015, -rx * 0.2) // 뒷쪽 두께\n\n context.rotate(-ang)\n}\n\nexport default class GaugeCircle extends ValueHolder(Donut) {\n _draw(context: CanvasRenderingContext2D) {\n var {\n lineWidth = 20,\n startValue,\n endValue,\n step,\n subStep,\n startAngle = 0,\n endAngle = 180,\n fontColor = 'black',\n showStepText = true,\n showStartValue = true,\n showEndValue = true,\n showStepLine = true,\n showSubStep = true,\n inText = true,\n colorStops, // 스텝별 각각 다른 색\n fillStyle,\n textFillStyle = 'black',\n needleFillStyle = 'black',\n innerCircleFillStyle = 'gray',\n stepNeedleSize = 2,\n stepFillStyle,\n stepTextSize,\n cx,\n cy,\n rx,\n ry,\n ratio,\n animFromBase = false\n } = this.model\n\n startValue = Number(startValue)\n\n this.animOnValueChange(this.value, animFromBase, startValue)\n\n const RADIAN = 0.0174533 / Math.PI\n const rxRatio = (rx / 100) * ratio // 원 안에 지워지는 비율을 계산한 rx - ratio의 비율에 따라 크기가 변함\n const ryRatio = (ry / 100) * ratio // 원 안에 지워지는 비율을 계산한 ry - ratio의 비율에 따라 크기가 변함\n const circleSize = (endAngle - startAngle) / 180 // 원의 총 길이. - PI * 2가 원이므로 (360도 = 2, 180도 = 1)\n const totalValue = endValue - startValue // 게이지의 시작과 끝 값의 크기\n\n startAngle = startAngle * RADIAN - 0.5 // 맨 위쪽을 중심으로 앵글의 범위에 따라 왼쪽으로 넓어짐\n endAngle = endAngle * RADIAN - 0.5 // 맨 위쪽을 중심으로 앵글의 범위에 따라 오른쪽으로 넓어짐\n\n context.translate(cx, cy)\n\n //// 메인 게이지 원 그리기 ////\n context.beginPath()\n\n context.ellipse(0, 0, Math.abs(rx), Math.abs(ry), 0, startAngle * Math.PI, endAngle * Math.PI)\n this.drawStroke(context)\n context.ellipse(0, 0, Math.abs(rxRatio), Math.abs(ryRatio), 0, endAngle * Math.PI, startAngle * Math.PI, true) // 반대로 그리며 원을 지움.\n // this.drawFill(context)\n\n context.closePath()\n\n //// 스텝별 색 칠하기 ////\n if (colorStops) {\n let beforeValue = 0\n let endStepAngle = 0\n context.moveTo(0, 0)\n\n colorStops.forEach(function (\n v: { position: number; color: string },\n idx: number,\n arr: { position: number; color: string }[]\n ) {\n context.beginPath()\n\n let value = Math.max(Math.min(v.position - startValue, totalValue), 0) // v.position 범위의 최소값은 0, 최대값은 totalValue가 되야함.\n let startStepAngle = endStepAngle || Math.PI * (startAngle + (circleSize * beforeValue) / totalValue)\n\n if (idx === arr.length - 1)\n // 마지막값은 무조건 끝까지 채워주도록 한다\n endStepAngle = Math.PI * (startAngle + circleSize)\n else endStepAngle = Math.PI * (startAngle + (circleSize * value) / totalValue)\n\n if (beforeValue > totalValue || beforeValue > value)\n // 값이 게이지의 최대 값을 넘어가거나 이전 값 보다 현재값이 작으면 다시 그릴 필요 없음\n return false\n\n context.ellipse(0, 0, Math.abs(rx), Math.abs(ry), 0, startStepAngle, endStepAngle)\n context.ellipse(0, 0, Math.abs(rxRatio), Math.abs(ryRatio), 0, endStepAngle, startStepAngle, true)\n context.fillStyle = v.color\n context.fill()\n\n beforeValue = value\n })\n }\n context.scale(1, ry / rx)\n\n //// 바늘 그리기 ////\n context.beginPath()\n let drawingValue = this.animValue\n drawingValue = Math.max(Math.min(drawingValue, endValue), startValue) // 그려지는 값은 startValue보다 작을 수 없고, endValue보다 클 수 없음.\n\n let ang = Math.PI * ((circleSize * (drawingValue - startValue)) / totalValue + startAngle - 0.5)\n\n drawNeedle(context, rx, ang)\n\n context.fillStyle = needleFillStyle\n context.fill()\n\n //// 중앙 원 그리기 ////\n context.beginPath()\n context.ellipse(0, 0, Math.abs(rx) / 15, Math.abs(rx) / 15, 0, 0, 2 * Math.PI)\n context.fillStyle = innerCircleFillStyle\n context.fill()\n\n //// 스텝 선 그리기 ////\n context.fillStyle = stepFillStyle\n if (showStepLine) {\n let count = totalValue / step\n\n // Draw StartValue\n drawStepLine(context, Math.PI * (startAngle + 0.5), rx * 0.8, stepNeedleSize) // 원을 그릴때 PI는 45도 부터 그리지만 angle은 0도부터 틀어서 + 0.5도를 곱해줘야함\n // Draw StepValue\n for (let num = 1; num < count; num++) {\n let ang = Math.PI * ((circleSize / count) * num + startAngle + 0.5)\n\n drawStepLine(context, ang, rx * 0.8, stepNeedleSize)\n }\n // Draw EndValue\n drawStepLine(context, Math.PI * (endAngle + 0.5), rx * 0.8, stepNeedleSize)\n }\n\n //// 서브 스탭 그리기 ////\n if (showSubStep) {\n let count = totalValue\n\n // Draw StepValue\n for (let num = 1; num <= count; num++) {\n if (num % step == 0 || num % subStep != 0) {\n // 메인 스탭과 서브 스탭은 그리지 않음\n continue\n }\n let ang = Math.PI * ((circleSize / count) * num + startAngle + 0.5)\n\n drawSubStepLine(context, ang, rx * 0.8, stepNeedleSize)\n }\n }\n\n //// 스텝 텍스트 그리기 ////\n context.fillStyle = textFillStyle\n context.font = (rx * stepTextSize) / 50 + 'px arial'\n context.textBaseline = 'middle'\n context.textAlign = 'center'\n let textLocation = inText ? 0.8 : 1.35\n\n if (showStartValue) {\n // Draw StartText\n drawStepText(context, startValue, Math.PI * (startAngle + 0.5), rx * textLocation)\n }\n\n if (showEndValue) {\n // Draw EndText\n drawStepText(context, endValue, Math.PI * (endAngle + 0.5), rx * textLocation)\n }\n\n if (showStepText) {\n // Draw StepText\n let count = totalValue / step\n\n for (let num = 1; num < count; num++) {\n let value = startValue + step * num\n let ang = Math.PI * ((circleSize / count) * num + startAngle + 0.5)\n\n drawStepText(context, value, ang, rx * textLocation)\n }\n }\n\n context.scale(1, rx / ry)\n context.translate(-cx, -cy)\n }\n\n contains(x: number, y: number): boolean {\n // 컨테인즈는 Ellipse로 정의함\n var { cx, cy, rx, ry } = this.model\n\n var normx = (x - cx) / (rx * 2 - 0.5)\n var normy = (y - cy) / (ry * 2 - 0.5)\n\n return normx * normx + normy * normy < 0.25\n }\n\n _post_draw(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('gauge-circle', GaugeCircle)\n"]}
|
package/dist/gauge-horizon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Shape } from '@hatiolab/things-scene';
|
|
1
|
+
import { ComponentNature, Shape } from '@hatiolab/things-scene';
|
|
2
2
|
declare const GaugeHorizon_base: (new (...args: any[]) => {
|
|
3
3
|
value: number;
|
|
4
4
|
animValue: number;
|
|
@@ -7,50 +7,6 @@ declare const GaugeHorizon_base: (new (...args: any[]) => {
|
|
|
7
7
|
export default class GaugeHorizon extends GaugeHorizon_base {
|
|
8
8
|
_draw(context: CanvasRenderingContext2D): void;
|
|
9
9
|
_post_draw(context: CanvasRenderingContext2D): void;
|
|
10
|
-
get nature():
|
|
11
|
-
mutable: boolean;
|
|
12
|
-
resizable: boolean;
|
|
13
|
-
rotatable: boolean;
|
|
14
|
-
properties: ({
|
|
15
|
-
type: string;
|
|
16
|
-
label: string;
|
|
17
|
-
name: string;
|
|
18
|
-
property: string;
|
|
19
|
-
observe?: undefined;
|
|
20
|
-
} | {
|
|
21
|
-
type: string;
|
|
22
|
-
label: string;
|
|
23
|
-
name: string;
|
|
24
|
-
observe: (this: HTMLElement, startValue: number) => void;
|
|
25
|
-
property: string;
|
|
26
|
-
} | {
|
|
27
|
-
type: string;
|
|
28
|
-
label: string;
|
|
29
|
-
name: string;
|
|
30
|
-
property: {
|
|
31
|
-
min: number;
|
|
32
|
-
max: number;
|
|
33
|
-
label?: undefined;
|
|
34
|
-
};
|
|
35
|
-
observe?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
type: string;
|
|
38
|
-
label: string;
|
|
39
|
-
name: string;
|
|
40
|
-
property: {
|
|
41
|
-
label: string;
|
|
42
|
-
min?: undefined;
|
|
43
|
-
max?: undefined;
|
|
44
|
-
};
|
|
45
|
-
observe?: undefined;
|
|
46
|
-
} | {
|
|
47
|
-
type: string;
|
|
48
|
-
label: string;
|
|
49
|
-
name: string;
|
|
50
|
-
property?: undefined;
|
|
51
|
-
observe?: undefined;
|
|
52
|
-
})[];
|
|
53
|
-
help: string;
|
|
54
|
-
};
|
|
10
|
+
get nature(): ComponentNature;
|
|
55
11
|
}
|
|
56
12
|
export {};
|
package/dist/gauge-horizon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { Component, RectPath, Shape, ValueHolder
|
|
4
|
+
import { Component, RectPath, Shape, ValueHolder } from '@hatiolab/things-scene';
|
|
5
5
|
import { PROPERTIES } from './gauge-properties';
|
|
6
6
|
const NATURE = {
|
|
7
7
|
mutable: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gauge-horizon.js","sourceRoot":"","sources":["../src/gauge-horizon.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,SAAS,EACT,QAAQ,EACR,KAAK,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';\n\nimport { PROPERTIES } from './gauge-properties';\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n ...PROPERTIES,\n {\n type: 'color',\n label: 'text-fill-style',\n name: 'textFillStyle',\n property: 'textFillStyle'\n },\n {\n type: 'color',\n label: 'needle-fill-style',\n name: 'needleFillStyle',\n property: 'needleFillStyle'\n },\n {\n type: 'number',\n label: 'needle-size',\n name: 'needleSize',\n property: 'needleSize'\n }\n ],\n help: 'scene/component/gauge-horizon'\n}\n\nexport default class GaugeHorizon extends ValueHolder(RectPath(Shape)) {\n _draw(context: CanvasRenderingContext2D) {\n var {\n startValue,\n endValue,\n step,\n subStep,\n colorStops,\n needleFillStyle,\n stepFillStyle,\n textFillStyle,\n needleSize,\n stepNeedleSize,\n stepTextSize,\n showStepText = true,\n showStartValue = true,\n showEndValue = true,\n showStepLine = true,\n showSubStep = true,\n width,\n height,\n top,\n left,\n animFromBase = false\n } = this.model\n\n startValue = Number(startValue)\n\n this.animOnValueChange(this.value, animFromBase, startValue)\n\n const totalValue = endValue - startValue // 게이지의 시작과 끝 값의 크기\n\n context.translate(left, top) // top과 left의 좌표에 영향을 받지 않기 위해 transalate를 한다음 모든 탑과 레프트의 좌표를 0으로 줌\n\n //// 메인 막대 그리기 ////\n context.beginPath()\n\n context.rect(0, 0, width, height)\n\n this.drawFill(context)\n this.drawStroke(context)\n context.closePath()\n\n //// 스텝별 색 칠하기 ////\n if (colorStops) {\n let beforeValue = 0\n colorStops.forEach(function (v: {position: number; color: string;}, idx: number, arr: {position: number; color: string;}[]) {\n context.beginPath()\n\n let value = Math.max(Math.min(v.position - startValue, totalValue), 0) // v.position 범위의 최소값은 0, 최대값은 totalValue가 되야함.\n let startStepPosition = (width * beforeValue) / totalValue\n let endStepPosition\n // console.log(startStepPosition + (width * value / totalValue));\n if (idx == arr.length - 1 || startStepPosition + (width * value) / totalValue)\n // 배열의 마지막 값이거나 중간 시작값 + 그려지는 값이 width 를 넘을 경우는 무조건 끝까지 채워주도록 한다\n endStepPosition = width - startStepPosition\n else endStepPosition = (width * value) / totalValue\n\n if (beforeValue > totalValue || beforeValue > value)\n // 값이 게이지의 최대 값을 넘어가거나 이전 값 보다 현재값이 작으면 다시 그릴 필요 없음\n return false\n\n context.rect(startStepPosition, 0, endStepPosition, height)\n\n context.fillStyle = v.color\n context.fill()\n\n beforeValue = value\n })\n }\n\n //// 스텝 선 그리기 ////\n context.fillStyle = stepFillStyle\n if (showStepLine) {\n let count = totalValue / step\n let stepSize = width * 0.06\n\n // Draw StartValue\n context.fillRect(0, height - stepSize, stepNeedleSize, stepSize)\n // Draw StepValue\n for (let num = 1; num < count; num++) {\n let locate = (width / count) * num\n\n context.fillRect(locate, height - stepSize, stepNeedleSize, stepSize)\n }\n // Draw EndValue\n context.fillRect(width, height - stepSize, stepNeedleSize, stepSize)\n }\n\n //// 서브 스탭 그리기 ////\n if (showSubStep) {\n let count = totalValue\n let subStepSize = width * 0.027\n // Draw StartValue\n context.fillRect(0, height - subStepSize, stepNeedleSize, subStepSize)\n\n // Draw StepValue\n for (let num = 1; num <= count; num++) {\n if (num % step == 0 || num % subStep != 0) {\n // 메인 스탭과 서브 스탭은 그리지 않음\n continue\n }\n let locate = (width / count) * num\n context.fillRect(locate, height - subStepSize, stepNeedleSize, subStepSize)\n }\n }\n\n //// 스텝 텍스트 그리기 ////\n let fontSize = (width * stepTextSize) / 150\n context.fillStyle = textFillStyle\n context.font = fontSize + 'px arial'\n context.textBaseline = 'middle'\n context.textAlign = 'center'\n if (showStartValue) {\n // Draw StartText\n context.fillText(startValue, 0, height + fontSize * 0.75)\n }\n\n if (showEndValue) {\n // Draw EndText\n context.fillText(endValue, width, height + fontSize * 0.75)\n }\n\n if (showStepText) {\n // Draw StepText\n let count = totalValue / step\n\n for (let num = 1; num < count; num++) {\n let value = startValue + step * num\n let locate = (width / count) * num\n\n context.fillText(value, locate, height + fontSize * 0.75)\n }\n }\n\n //// 바늘 그리기 ////\n context.beginPath()\n let drawingValue = this.animValue\n drawingValue = Math.max(Math.min(drawingValue, endValue), startValue) // 그려지는 값은 startValue보다 작을 수 없고, endValue보다 클 수 없음.\n let position = ((drawingValue - startValue) / totalValue) * width\n\n needleSize *= 4\n context.moveTo(position, height + fontSize * 1.4)\n context.lineTo(position + needleSize / 2, height + needleSize + fontSize * 1.4)\n context.lineTo(position - needleSize / 2, height + needleSize + fontSize * 1.4)\n\n context.fillStyle = needleFillStyle\n context.fill()\n context.closePath()\n\n context.translate(-left, -top)\n }\n\n _post_draw(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('gauge-horizon', GaugeHorizon)\n"]}
|
|
1
|
+
{"version":3,"file":"gauge-horizon.js","sourceRoot":"","sources":["../src/gauge-horizon.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAmB,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEjG,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/C,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,GAAG,UAAU;QACb;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,eAAe;SAC1B;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,YAAY;SACvB;KACF;IACD,IAAI,EAAE,+BAA+B;CACtC,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW,CAAC,QAAQ,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GAAG,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,GAAG,CAAC,CAAA;QAE/E,OAAO,CAAC,SAAS,GAAG,eAAe,CAAA;QACnC,OAAO,CAAC,IAAI,EAAE,CAAA;QACd,OAAO,CAAC,SAAS,EAAE,CAAA;QAEnB,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,YAAY,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, ComponentNature, RectPath, Shape, ValueHolder } from '@hatiolab/things-scene'\n\nimport { PROPERTIES } from './gauge-properties'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n ...PROPERTIES,\n {\n type: 'color',\n label: 'text-fill-style',\n name: 'textFillStyle',\n property: 'textFillStyle'\n },\n {\n type: 'color',\n label: 'needle-fill-style',\n name: 'needleFillStyle',\n property: 'needleFillStyle'\n },\n {\n type: 'number',\n label: 'needle-size',\n name: 'needleSize',\n property: 'needleSize'\n }\n ],\n help: 'scene/component/gauge-horizon'\n}\n\nexport default class GaugeHorizon extends ValueHolder(RectPath(Shape)) {\n _draw(context: CanvasRenderingContext2D) {\n var {\n startValue,\n endValue,\n step,\n subStep,\n colorStops,\n needleFillStyle,\n stepFillStyle,\n textFillStyle,\n needleSize,\n stepNeedleSize,\n stepTextSize,\n showStepText = true,\n showStartValue = true,\n showEndValue = true,\n showStepLine = true,\n showSubStep = true,\n width,\n height,\n top,\n left,\n animFromBase = false\n } = this.model\n\n startValue = Number(startValue)\n\n this.animOnValueChange(this.value, animFromBase, startValue)\n\n const totalValue = endValue - startValue // 게이지의 시작과 끝 값의 크기\n\n context.translate(left, top) // top과 left의 좌표에 영향을 받지 않기 위해 transalate를 한다음 모든 탑과 레프트의 좌표를 0으로 줌\n\n //// 메인 막대 그리기 ////\n context.beginPath()\n\n context.rect(0, 0, width, height)\n\n this.drawFill(context)\n this.drawStroke(context)\n context.closePath()\n\n //// 스텝별 색 칠하기 ////\n if (colorStops) {\n let beforeValue = 0\n colorStops.forEach(function (\n v: { position: number; color: string },\n idx: number,\n arr: { position: number; color: string }[]\n ) {\n context.beginPath()\n\n let value = Math.max(Math.min(v.position - startValue, totalValue), 0) // v.position 범위의 최소값은 0, 최대값은 totalValue가 되야함.\n let startStepPosition = (width * beforeValue) / totalValue\n let endStepPosition\n // console.log(startStepPosition + (width * value / totalValue));\n if (idx == arr.length - 1 || startStepPosition + (width * value) / totalValue)\n // 배열의 마지막 값이거나 중간 시작값 + 그려지는 값이 width 를 넘을 경우는 무조건 끝까지 채워주도록 한다\n endStepPosition = width - startStepPosition\n else endStepPosition = (width * value) / totalValue\n\n if (beforeValue > totalValue || beforeValue > value)\n // 값이 게이지의 최대 값을 넘어가거나 이전 값 보다 현재값이 작으면 다시 그릴 필요 없음\n return false\n\n context.rect(startStepPosition, 0, endStepPosition, height)\n\n context.fillStyle = v.color\n context.fill()\n\n beforeValue = value\n })\n }\n\n //// 스텝 선 그리기 ////\n context.fillStyle = stepFillStyle\n if (showStepLine) {\n let count = totalValue / step\n let stepSize = width * 0.06\n\n // Draw StartValue\n context.fillRect(0, height - stepSize, stepNeedleSize, stepSize)\n // Draw StepValue\n for (let num = 1; num < count; num++) {\n let locate = (width / count) * num\n\n context.fillRect(locate, height - stepSize, stepNeedleSize, stepSize)\n }\n // Draw EndValue\n context.fillRect(width, height - stepSize, stepNeedleSize, stepSize)\n }\n\n //// 서브 스탭 그리기 ////\n if (showSubStep) {\n let count = totalValue\n let subStepSize = width * 0.027\n // Draw StartValue\n context.fillRect(0, height - subStepSize, stepNeedleSize, subStepSize)\n\n // Draw StepValue\n for (let num = 1; num <= count; num++) {\n if (num % step == 0 || num % subStep != 0) {\n // 메인 스탭과 서브 스탭은 그리지 않음\n continue\n }\n let locate = (width / count) * num\n context.fillRect(locate, height - subStepSize, stepNeedleSize, subStepSize)\n }\n }\n\n //// 스텝 텍스트 그리기 ////\n let fontSize = (width * stepTextSize) / 150\n context.fillStyle = textFillStyle\n context.font = fontSize + 'px arial'\n context.textBaseline = 'middle'\n context.textAlign = 'center'\n if (showStartValue) {\n // Draw StartText\n context.fillText(startValue, 0, height + fontSize * 0.75)\n }\n\n if (showEndValue) {\n // Draw EndText\n context.fillText(endValue, width, height + fontSize * 0.75)\n }\n\n if (showStepText) {\n // Draw StepText\n let count = totalValue / step\n\n for (let num = 1; num < count; num++) {\n let value = startValue + step * num\n let locate = (width / count) * num\n\n context.fillText(value, locate, height + fontSize * 0.75)\n }\n }\n\n //// 바늘 그리기 ////\n context.beginPath()\n let drawingValue = this.animValue\n drawingValue = Math.max(Math.min(drawingValue, endValue), startValue) // 그려지는 값은 startValue보다 작을 수 없고, endValue보다 클 수 없음.\n let position = ((drawingValue - startValue) / totalValue) * width\n\n needleSize *= 4\n context.moveTo(position, height + fontSize * 1.4)\n context.lineTo(position + needleSize / 2, height + needleSize + fontSize * 1.4)\n context.lineTo(position - needleSize / 2, height + needleSize + fontSize * 1.4)\n\n context.fillStyle = needleFillStyle\n context.fill()\n context.closePath()\n\n context.translate(-left, -top)\n }\n\n _post_draw(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('gauge-horizon', GaugeHorizon)\n"]}
|
package/dist/gauge-vertical.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Shape } from '@hatiolab/things-scene';
|
|
1
|
+
import { ComponentNature, Shape } from '@hatiolab/things-scene';
|
|
2
2
|
declare const GaugeVertical_base: (new (...args: any[]) => {
|
|
3
3
|
value: number;
|
|
4
4
|
animValue: number;
|
|
@@ -7,50 +7,6 @@ declare const GaugeVertical_base: (new (...args: any[]) => {
|
|
|
7
7
|
export default class GaugeVertical extends GaugeVertical_base {
|
|
8
8
|
_draw(context: CanvasRenderingContext2D): void;
|
|
9
9
|
_post_draw(context: CanvasRenderingContext2D): void;
|
|
10
|
-
get nature():
|
|
11
|
-
mutable: boolean;
|
|
12
|
-
resizable: boolean;
|
|
13
|
-
rotatable: boolean;
|
|
14
|
-
properties: ({
|
|
15
|
-
type: string;
|
|
16
|
-
label: string;
|
|
17
|
-
name: string;
|
|
18
|
-
property: string;
|
|
19
|
-
observe?: undefined;
|
|
20
|
-
} | {
|
|
21
|
-
type: string;
|
|
22
|
-
label: string;
|
|
23
|
-
name: string;
|
|
24
|
-
observe: (this: HTMLElement, startValue: number) => void;
|
|
25
|
-
property: string;
|
|
26
|
-
} | {
|
|
27
|
-
type: string;
|
|
28
|
-
label: string;
|
|
29
|
-
name: string;
|
|
30
|
-
property: {
|
|
31
|
-
min: number;
|
|
32
|
-
max: number;
|
|
33
|
-
label?: undefined;
|
|
34
|
-
};
|
|
35
|
-
observe?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
type: string;
|
|
38
|
-
label: string;
|
|
39
|
-
name: string;
|
|
40
|
-
property: {
|
|
41
|
-
label: string;
|
|
42
|
-
min?: undefined;
|
|
43
|
-
max?: undefined;
|
|
44
|
-
};
|
|
45
|
-
observe?: undefined;
|
|
46
|
-
} | {
|
|
47
|
-
type: string;
|
|
48
|
-
label: string;
|
|
49
|
-
name: string;
|
|
50
|
-
property?: undefined;
|
|
51
|
-
observe?: undefined;
|
|
52
|
-
})[];
|
|
53
|
-
help: string;
|
|
54
|
-
};
|
|
10
|
+
get nature(): ComponentNature;
|
|
55
11
|
}
|
|
56
12
|
export {};
|
package/dist/gauge-vertical.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { Component, RectPath, Shape, ValueHolder
|
|
4
|
+
import { Component, RectPath, Shape, ValueHolder } from '@hatiolab/things-scene';
|
|
5
5
|
import { PROPERTIES } from './gauge-properties';
|
|
6
6
|
const NATURE = {
|
|
7
7
|
mutable: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gauge-vertical.js","sourceRoot":"","sources":["../src/gauge-vertical.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,SAAS,EACT,QAAQ,EACR,KAAK,EACL,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,GAAG,UAAU;QACb;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,eAAe;SAC1B;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,YAAY;SACvB;KACF;IACD,IAAI,EAAE,gCAAgC;CACvC,CAAA;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrE,KAAK,CAAC,OAAiC;QACrC,IAAI,EACF,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,UAAU,EACV,eAAe,EACf,aAAa,EACb,aAAa,EACb,UAAU,EACV,cAAc,EACd,YAAY,EACZ,YAAY,GAAG,IAAI,EACnB,cAAc,GAAG,IAAI,EACrB,YAAY,GAA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AAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport {\n Component,\n RectPath,\n Shape,\n ValueHolder,\n} from '@hatiolab/things-scene';\n\nimport { PROPERTIES } from './gauge-properties';\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n ...PROPERTIES,\n {\n type: 'color',\n label: 'text-fill-style',\n name: 'textFillStyle',\n property: 'textFillStyle'\n },\n {\n type: 'color',\n label: 'needle-fill-style',\n name: 'needleFillStyle',\n property: 'needleFillStyle'\n },\n {\n type: 'number',\n label: 'needle-size',\n name: 'needleSize',\n property: 'needleSize'\n }\n ],\n help: 'scene/component/gauge-vertical'\n}\n\nexport default class GaugeVertical extends ValueHolder(RectPath(Shape)) {\n _draw(context: CanvasRenderingContext2D) {\n var {\n startValue,\n endValue,\n step,\n subStep,\n colorStops,\n needleFillStyle,\n stepFillStyle,\n textFillStyle,\n needleSize,\n stepNeedleSize,\n stepTextSize,\n showStepText = true,\n showStartValue = true,\n showEndValue = true,\n showStepLine = true,\n showSubStep = true,\n width,\n height,\n top,\n left,\n animFromBase = false\n } = this.model\n\n startValue = Number(startValue)\n\n this.animOnValueChange(this.value, animFromBase, startValue)\n\n const totalValue = endValue - startValue // 게이지의 시작과 끝 값의 크기\n\n context.translate(left, top) // top과 left의 좌표에 영향을 받지 않기 위해 transalate를 한다음 모든 탑과 레프트의 좌표를 0으로 줌\n\n //// 메인 막대 그리기 ////\n context.beginPath()\n\n context.rect(0, 0, width, height)\n\n this.drawFill(context)\n this.drawStroke(context)\n context.closePath()\n\n //// 스텝별 색 칠하기 ////\n if (colorStops) {\n let beforeValue = 0\n colorStops.forEach(function (v: {position: number; color: string;}, idx: number, arr: {position: number; color: string;}[]) {\n context.beginPath()\n\n let value = Math.max(Math.min(v.position - startValue, totalValue), 0) // v.position 범위의 최소값은 0, 최대값은 totalValue가 되야함.\n let startStepPosition = (height * beforeValue) / totalValue\n let endStepPosition\n\n // console.log(startStepPosition + (height * value / totalValue));\n if (idx === arr.length - 1 || startStepPosition + (height * value) / totalValue)\n // 배열의 마지막 값이거나 중간 시작값 + 그려지는 값이 height 를 넘을 경우는 무조건 끝까지 채워주도록 한다\n endStepPosition = height - startStepPosition\n else endStepPosition = height - (height * value) / totalValue\n\n if (beforeValue > totalValue || beforeValue > value)\n // 값이 게이지의 최대 값을 넘어가거나 이전 값 보다 현재값이 작으면 다시 그릴 필요 없음\n return false\n\n context.rect(0, height - startStepPosition, width, -endStepPosition)\n\n context.fillStyle = v.color\n context.fill()\n beforeValue = value\n })\n }\n\n //// 바늘 그리기 ////\n context.beginPath()\n let drawingValue = this.animValue\n drawingValue = Math.max(Math.min(drawingValue, endValue), startValue) // 그려지는 값은 startValue보다 작을 수 없고, endValue보다 클 수 없음.\n let position = height - ((drawingValue - startValue) / totalValue) * height\n\n needleSize *= 4\n context.moveTo(width * 1.05, position)\n context.lineTo(width * 1.05 + needleSize, position + needleSize / 2)\n context.lineTo(width * 1.05 + needleSize, position - needleSize / 2)\n\n context.fillStyle = needleFillStyle\n context.fill()\n context.closePath()\n\n //// 스텝 선 그리기 ////\n context.fillStyle = stepFillStyle\n if (showStepLine) {\n let count = totalValue / step\n\n // Draw StartValue\n context.fillRect(0, height, height * 0.06, stepNeedleSize)\n // Draw StepValue\n for (let num = 1; num < count; num++) {\n let locate = (height / count) * num\n\n context.fillRect(0, locate, height * 0.06, stepNeedleSize)\n }\n // Draw EndValue\n context.fillRect(0, 0, height * 0.06, stepNeedleSize)\n }\n\n //// 서브 스탭 그리기 ////\n if (showSubStep) {\n let count = totalValue\n\n // Draw StartValue\n context.fillRect(0, 0, height * 0.027, stepNeedleSize)\n\n // Draw StepValue\n for (let num = 1; num <= count; num++) {\n if (num % step == 0 || num % subStep != 0) {\n // 메인 스탭과 서브 스탭은 그리지 않음\n continue\n }\n let locate = (height / count) * num\n context.fillRect(0, locate, height * 0.027, stepNeedleSize)\n }\n }\n\n //// 스텝 텍스트 그리기 ////\n let fontSize = (height * stepTextSize) / 150\n context.fillStyle = textFillStyle\n context.font = fontSize + 'px arial'\n context.textBaseline = 'middle'\n context.textAlign = 'center'\n if (showStartValue) {\n // Draw StartText\n context.fillText(startValue, -fontSize, height)\n }\n\n if (showEndValue) {\n // Draw EndText\n context.fillText(endValue, -fontSize, 0)\n }\n\n if (showStepText) {\n // Draw StepText\n let count = totalValue / step\n\n for (let num = 1; num < count; num++) {\n let value = startValue + Number(step) * num\n let locate = height - (height / count) * num\n\n context.fillText(value, -fontSize, locate)\n }\n }\n\n context.translate(-left, -top)\n }\n\n _post_draw(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('gauge-vertical', GaugeVertical)\n"]}
|
|
1
|
+
{"version":3,"file":"gauge-vertical.js","sourceRoot":"","sources":["../src/gauge-vertical.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAmB,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEjG,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/C,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,GAAG,UAAU;QACb;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,eAAe;SAC1B;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,iBAAiB;SAC5B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,YAAY;YA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AG,GAAG,CAAA;gBAC3C,IAAI,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,GAAG,CAAA;gBAE5C,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;aAC3C;SACF;QAED,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC;IAED,UAAU,CAAC,OAAiC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, ComponentNature, RectPath, Shape, ValueHolder } from '@hatiolab/things-scene'\n\nimport { PROPERTIES } from './gauge-properties'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n ...PROPERTIES,\n {\n type: 'color',\n label: 'text-fill-style',\n name: 'textFillStyle',\n property: 'textFillStyle'\n },\n {\n type: 'color',\n label: 'needle-fill-style',\n name: 'needleFillStyle',\n property: 'needleFillStyle'\n },\n {\n type: 'number',\n label: 'needle-size',\n name: 'needleSize',\n property: 'needleSize'\n }\n ],\n help: 'scene/component/gauge-vertical'\n}\n\nexport default class GaugeVertical extends ValueHolder(RectPath(Shape)) {\n _draw(context: CanvasRenderingContext2D) {\n var {\n startValue,\n endValue,\n step,\n subStep,\n colorStops,\n needleFillStyle,\n stepFillStyle,\n textFillStyle,\n needleSize,\n stepNeedleSize,\n stepTextSize,\n showStepText = true,\n showStartValue = true,\n showEndValue = true,\n showStepLine = true,\n showSubStep = true,\n width,\n height,\n top,\n left,\n animFromBase = false\n } = this.model\n\n startValue = Number(startValue)\n\n this.animOnValueChange(this.value, animFromBase, startValue)\n\n const totalValue = endValue - startValue // 게이지의 시작과 끝 값의 크기\n\n context.translate(left, top) // top과 left의 좌표에 영향을 받지 않기 위해 transalate를 한다음 모든 탑과 레프트의 좌표를 0으로 줌\n\n //// 메인 막대 그리기 ////\n context.beginPath()\n\n context.rect(0, 0, width, height)\n\n this.drawFill(context)\n this.drawStroke(context)\n context.closePath()\n\n //// 스텝별 색 칠하기 ////\n if (colorStops) {\n let beforeValue = 0\n colorStops.forEach(function (\n v: { position: number; color: string },\n idx: number,\n arr: { position: number; color: string }[]\n ) {\n context.beginPath()\n\n let value = Math.max(Math.min(v.position - startValue, totalValue), 0) // v.position 범위의 최소값은 0, 최대값은 totalValue가 되야함.\n let startStepPosition = (height * beforeValue) / totalValue\n let endStepPosition\n\n // console.log(startStepPosition + (height * value / totalValue));\n if (idx === arr.length - 1 || startStepPosition + (height * value) / totalValue)\n // 배열의 마지막 값이거나 중간 시작값 + 그려지는 값이 height 를 넘을 경우는 무조건 끝까지 채워주도록 한다\n endStepPosition = height - startStepPosition\n else endStepPosition = height - (height * value) / totalValue\n\n if (beforeValue > totalValue || beforeValue > value)\n // 값이 게이지의 최대 값을 넘어가거나 이전 값 보다 현재값이 작으면 다시 그릴 필요 없음\n return false\n\n context.rect(0, height - startStepPosition, width, -endStepPosition)\n\n context.fillStyle = v.color\n context.fill()\n beforeValue = value\n })\n }\n\n //// 바늘 그리기 ////\n context.beginPath()\n let drawingValue = this.animValue\n drawingValue = Math.max(Math.min(drawingValue, endValue), startValue) // 그려지는 값은 startValue보다 작을 수 없고, endValue보다 클 수 없음.\n let position = height - ((drawingValue - startValue) / totalValue) * height\n\n needleSize *= 4\n context.moveTo(width * 1.05, position)\n context.lineTo(width * 1.05 + needleSize, position + needleSize / 2)\n context.lineTo(width * 1.05 + needleSize, position - needleSize / 2)\n\n context.fillStyle = needleFillStyle\n context.fill()\n context.closePath()\n\n //// 스텝 선 그리기 ////\n context.fillStyle = stepFillStyle\n if (showStepLine) {\n let count = totalValue / step\n\n // Draw StartValue\n context.fillRect(0, height, height * 0.06, stepNeedleSize)\n // Draw StepValue\n for (let num = 1; num < count; num++) {\n let locate = (height / count) * num\n\n context.fillRect(0, locate, height * 0.06, stepNeedleSize)\n }\n // Draw EndValue\n context.fillRect(0, 0, height * 0.06, stepNeedleSize)\n }\n\n //// 서브 스탭 그리기 ////\n if (showSubStep) {\n let count = totalValue\n\n // Draw StartValue\n context.fillRect(0, 0, height * 0.027, stepNeedleSize)\n\n // Draw StepValue\n for (let num = 1; num <= count; num++) {\n if (num % step == 0 || num % subStep != 0) {\n // 메인 스탭과 서브 스탭은 그리지 않음\n continue\n }\n let locate = (height / count) * num\n context.fillRect(0, locate, height * 0.027, stepNeedleSize)\n }\n }\n\n //// 스텝 텍스트 그리기 ////\n let fontSize = (height * stepTextSize) / 150\n context.fillStyle = textFillStyle\n context.font = fontSize + 'px arial'\n context.textBaseline = 'middle'\n context.textAlign = 'center'\n if (showStartValue) {\n // Draw StartText\n context.fillText(startValue, -fontSize, height)\n }\n\n if (showEndValue) {\n // Draw EndText\n context.fillText(endValue, -fontSize, 0)\n }\n\n if (showStepText) {\n // Draw StepText\n let count = totalValue / step\n\n for (let num = 1; num < count; num++) {\n let value = startValue + Number(step) * num\n let locate = height - (height / count) * num\n\n context.fillText(value, -fontSize, locate)\n }\n }\n\n context.translate(-left, -top)\n }\n\n _post_draw(context: CanvasRenderingContext2D) {\n this.drawText(context)\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('gauge-vertical', GaugeVertical)\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/scene-gauge",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
4
|
"description": "Things Scene Gauge Component",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "heartyoh",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"migration": "things-factory-migration"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@hatiolab/things-scene": "^2.7.
|
|
29
|
+
"@hatiolab/things-scene": "^2.7.34"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
33
|
-
"@operato/board": "^0.
|
|
34
|
-
"@things-factory/builder": "^
|
|
35
|
-
"@things-factory/operato-board": "^
|
|
33
|
+
"@operato/board": "^1.0.0-alpha.13",
|
|
34
|
+
"@things-factory/builder": "^5.0.0-alpha.5",
|
|
35
|
+
"@things-factory/operato-board": "^5.0.0-alpha.5",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
37
37
|
"@typescript-eslint/parser": "^4.33.0",
|
|
38
38
|
"@web/dev-server": "^0.1.28",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"prettier --write"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "f7ad50f082b788b2776f16c9a329d57c9db9dc77"
|
|
61
61
|
}
|
package/src/gauge-circle.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { Component, Donut, ValueHolder } from '@hatiolab/things-scene'
|
|
5
|
+
import { Component, ComponentNature, Donut, ValueHolder } from '@hatiolab/things-scene'
|
|
6
6
|
|
|
7
|
-
import { PROPERTIES } from './gauge-properties'
|
|
7
|
+
import { PROPERTIES } from './gauge-properties'
|
|
8
8
|
|
|
9
|
-
const NATURE = {
|
|
9
|
+
const NATURE: ComponentNature = {
|
|
10
10
|
mutable: false,
|
|
11
11
|
resizable: true,
|
|
12
12
|
rotatable: true,
|
|
@@ -149,26 +149,9 @@ export default class GaugeCircle extends ValueHolder(Donut) {
|
|
|
149
149
|
//// 메인 게이지 원 그리기 ////
|
|
150
150
|
context.beginPath()
|
|
151
151
|
|
|
152
|
-
context.ellipse(
|
|
153
|
-
0,
|
|
154
|
-
0,
|
|
155
|
-
Math.abs(rx),
|
|
156
|
-
Math.abs(ry),
|
|
157
|
-
0,
|
|
158
|
-
startAngle * Math.PI,
|
|
159
|
-
endAngle * Math.PI
|
|
160
|
-
)
|
|
152
|
+
context.ellipse(0, 0, Math.abs(rx), Math.abs(ry), 0, startAngle * Math.PI, endAngle * Math.PI)
|
|
161
153
|
this.drawStroke(context)
|
|
162
|
-
context.ellipse(
|
|
163
|
-
0,
|
|
164
|
-
0,
|
|
165
|
-
Math.abs(rxRatio),
|
|
166
|
-
Math.abs(ryRatio),
|
|
167
|
-
0,
|
|
168
|
-
endAngle * Math.PI,
|
|
169
|
-
startAngle * Math.PI,
|
|
170
|
-
true
|
|
171
|
-
) // 반대로 그리며 원을 지움.
|
|
154
|
+
context.ellipse(0, 0, Math.abs(rxRatio), Math.abs(ryRatio), 0, endAngle * Math.PI, startAngle * Math.PI, true) // 반대로 그리며 원을 지움.
|
|
172
155
|
// this.drawFill(context)
|
|
173
156
|
|
|
174
157
|
context.closePath()
|
|
@@ -179,7 +162,11 @@ export default class GaugeCircle extends ValueHolder(Donut) {
|
|
|
179
162
|
let endStepAngle = 0
|
|
180
163
|
context.moveTo(0, 0)
|
|
181
164
|
|
|
182
|
-
colorStops.forEach(function (
|
|
165
|
+
colorStops.forEach(function (
|
|
166
|
+
v: { position: number; color: string },
|
|
167
|
+
idx: number,
|
|
168
|
+
arr: { position: number; color: string }[]
|
|
169
|
+
) {
|
|
183
170
|
context.beginPath()
|
|
184
171
|
|
|
185
172
|
let value = Math.max(Math.min(v.position - startValue, totalValue), 0) // v.position 범위의 최소값은 0, 최대값은 totalValue가 되야함.
|
package/src/gauge-horizon.ts
CHANGED
|
@@ -2,16 +2,11 @@
|
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
Component,
|
|
7
|
-
RectPath,
|
|
8
|
-
Shape,
|
|
9
|
-
ValueHolder,
|
|
10
|
-
} from '@hatiolab/things-scene';
|
|
5
|
+
import { Component, ComponentNature, RectPath, Shape, ValueHolder } from '@hatiolab/things-scene'
|
|
11
6
|
|
|
12
|
-
import { PROPERTIES } from './gauge-properties'
|
|
7
|
+
import { PROPERTIES } from './gauge-properties'
|
|
13
8
|
|
|
14
|
-
const NATURE = {
|
|
9
|
+
const NATURE: ComponentNature = {
|
|
15
10
|
mutable: false,
|
|
16
11
|
resizable: true,
|
|
17
12
|
rotatable: true,
|
|
@@ -85,7 +80,11 @@ export default class GaugeHorizon extends ValueHolder(RectPath(Shape)) {
|
|
|
85
80
|
//// 스텝별 색 칠하기 ////
|
|
86
81
|
if (colorStops) {
|
|
87
82
|
let beforeValue = 0
|
|
88
|
-
colorStops.forEach(function (
|
|
83
|
+
colorStops.forEach(function (
|
|
84
|
+
v: { position: number; color: string },
|
|
85
|
+
idx: number,
|
|
86
|
+
arr: { position: number; color: string }[]
|
|
87
|
+
) {
|
|
89
88
|
context.beginPath()
|
|
90
89
|
|
|
91
90
|
let value = Math.max(Math.min(v.position - startValue, totalValue), 0) // v.position 범위의 최소값은 0, 최대값은 totalValue가 되야함.
|
package/src/gauge-vertical.ts
CHANGED
|
@@ -2,16 +2,11 @@
|
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
Component,
|
|
7
|
-
RectPath,
|
|
8
|
-
Shape,
|
|
9
|
-
ValueHolder,
|
|
10
|
-
} from '@hatiolab/things-scene';
|
|
5
|
+
import { Component, ComponentNature, RectPath, Shape, ValueHolder } from '@hatiolab/things-scene'
|
|
11
6
|
|
|
12
|
-
import { PROPERTIES } from './gauge-properties'
|
|
7
|
+
import { PROPERTIES } from './gauge-properties'
|
|
13
8
|
|
|
14
|
-
const NATURE = {
|
|
9
|
+
const NATURE: ComponentNature = {
|
|
15
10
|
mutable: false,
|
|
16
11
|
resizable: true,
|
|
17
12
|
rotatable: true,
|
|
@@ -85,7 +80,11 @@ export default class GaugeVertical extends ValueHolder(RectPath(Shape)) {
|
|
|
85
80
|
//// 스텝별 색 칠하기 ////
|
|
86
81
|
if (colorStops) {
|
|
87
82
|
let beforeValue = 0
|
|
88
|
-
colorStops.forEach(function (
|
|
83
|
+
colorStops.forEach(function (
|
|
84
|
+
v: { position: number; color: string },
|
|
85
|
+
idx: number,
|
|
86
|
+
arr: { position: number; color: string }[]
|
|
87
|
+
) {
|
|
89
88
|
context.beginPath()
|
|
90
89
|
|
|
91
90
|
let value = Math.max(Math.min(v.position - startValue, totalValue), 0) // v.position 범위의 최소값은 0, 최대값은 totalValue가 되야함.
|
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.es2020.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.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/gauge-properties.ts","./src/gauge-circle.ts","./src/gauge-horizon.ts","./src/gauge-vertical.ts","./src/index.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"6adbf5efd0e374ff5f427a4f26a5a413e9734eee5067a0e86da69aea41910b52","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"12f4cfe2fe60b810c3174537bc2ddb20c1067b7768643d12cb1266fd183afb75","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d88a479cccf787b4aa82362150fbeba5211a32dbfafa7b92ba6995ecaf9a1a89","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","ae9930989ed57478eb03b9b80ad3efa7a3eacdfeff0f78ecf7894c4963a64f93","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","6ac6f24aff52e62c3950461aa17eab26e3a156927858e6b654baef0058b4cd1e",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"507e4d35814c8131469ffff7ac660ebdfed85f09eb140b447fdea403e51132c2","8e1409f894fa33ed13f49fc8d503a69986b5349d16d3fa51141b6ac37e16df31","323902656baafb1ab4952cb03fb3e8ac0b9bdd1fc48eef62f228c7bf3749630b","0cba801d8f15d480cd6ef5527d576bd9531284e47841e147f70b90e9fa9bbe8e","4019adc02c085a4d7195952dab9b54c17f6c95ae2b38bd5503b4d6a5d8dc5326","573659b567a69a7ca85bd857b3998a69edb91813c08a48951557b219f39496c3","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"9acfe4d1ff027015151ce81d60797b04b52bffe97ad8310bb0ec2e8fd61e1303","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","b9b963043551b034abd9e7c6d859f7a81d99479fde938d983114d167d0644a78","b287b810b5035d5685f1df6e1e418f1ca452a3ed4f59fd5cc081dbf2045f0d9b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"902cd98bf46e95caf4118a0733fb801e9e90eec3edaed6abdad77124afec9ca2","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","cd4854d38f4eb5592afd98ab95ca17389a7dfe38013d9079e802d739bdbcc939","94eed4cc2f5f658d5e229ff1ccd38860bddf4233e347bf78edd2154dee1f2b99",{"version":"bd1a08e30569b0fb2f0b21035eb9b039871f68faa9b98accf847e9c878c5e0a9","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","d7838022c7dab596357a9604b9c6adffe37dc34085ce0779c958ce9545bd7139","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"a7971f9fb2a32ec7788ec6cda9d7a33c02023dfe9a62db2030ad1359649d8050","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4","d88ecca73348e7c337541c4b8b60a50aca5e87384f6b8a422fc6603c637e4c21","badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1cdb8f094b969dcc183745dc88404e2d8fcf2a858c6e7cc2441011476573238e"],"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":[[53,103],[41,43,44,45,46,47,48,49,50,51,52,53,103],[41,42,44,45,46,47,48,49,50,51,52,53,103],[42,43,44,45,46,47,48,49,50,51,52,53,103],[41,42,43,45,46,47,48,49,50,51,52,53,103],[41,42,43,44,46,47,48,49,50,51,52,53,103],[41,42,43,44,45,47,48,49,50,51,52,53,103],[41,42,43,44,45,46,48,49,50,51,52,53,103],[41,42,43,44,45,46,47,49,50,51,52,53,103],[41,42,43,44,45,46,47,48,50,51,52,53,103],[41,42,43,44,45,46,47,48,49,51,52,53,103],[41,42,43,44,45,46,47,48,49,50,52,53,103],[41,42,43,44,45,46,47,48,49,50,51,53,103],[41,42,43,44,45,46,47,48,49,50,51,52,103],[60,103],[63,103],[64,69,103],[65,75,76,83,92,102,103],[65,66,75,83,103],[67,103],[68,69,76,84,103],[69,92,99,103],[70,72,75,83,103],[71,103],[72,73,103],[74,75,103],[75,103],[75,76,77,92,102,103],[75,76,77,92,103],[103],[78,83,92,102,103],[75,76,78,79,83,92,99,102,103],[78,80,92,99,102,103],[60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109],[75,81,103],[82,102,103],[72,75,83,92,103],[84,103],[85,103],[63,86,103],[87,101,103,107],[88,103],[89,103],[75,90,103],[90,91,103,105],[75,92,93,94,103],[92,94,103],[92,93,103],[95,103],[96,103],[75,97,98,103],[97,98,103],[69,83,99,103],[100,103],[83,101,103],[64,78,89,102,103],[69,103],[92,103,104],[103,105],[103,106],[64,69,75,77,86,92,102,103,105,107],[92,103,108],[40,54,55,103],[40,103],[40,56,57,58,103]],"referencedMap":[[54,1],[42,2],[43,3],[41,4],[44,5],[45,6],[46,7],[47,8],[48,9],[49,10],[50,11],[51,12],[52,13],[53,14],[60,15],[61,15],[63,16],[64,17],[65,18],[66,19],[67,20],[68,21],[69,22],[70,23],[71,24],[72,25],[73,25],[74,26],[75,27],[76,28],[77,29],[62,30],[109,30],[78,31],[79,32],[80,33],[110,34],[81,35],[82,36],[83,37],[84,38],[85,39],[86,40],[87,41],[88,42],[89,43],[90,44],[91,45],[92,46],[94,47],[93,48],[95,49],[96,50],[97,51],[98,52],[99,53],[100,54],[101,55],[102,56],[103,57],[104,58],[105,59],[106,60],[107,61],[108,62],[40,30],[8,30],[10,30],[9,30],[2,30],[11,30],[12,30],[13,30],[14,30],[15,30],[16,30],[17,30],[18,30],[3,30],[4,30],[22,30],[19,30],[20,30],[21,30],[23,30],[24,30],[25,30],[5,30],[26,30],[27,30],[28,30],[29,30],[6,30],[30,30],[31,30],[32,30],[33,30],[7,30],[38,30],[34,30],[35,30],[36,30],[37,30],[1,30],[39,30],[56,63],[57,63],[55,64],[58,63],[59,65]],"exportedModulesMap":[[54,1],[42,2],[43,3],[41,4],[44,5],[45,6],[46,7],[47,8],[48,9],[49,10],[50,11],[51,12],[52,13],[53,14],[60,15],[61,15],[63,16],[64,17],[65,18],[66,19],[67,20],[68,21],[69,22],[70,23],[71,24],[72,25],[73,25],[74,26],[75,27],[76,28],[77,29],[62,30],[109,30],[78,31],[79,32],[80,33],[110,34],[81,35],[82,36],[83,37],[84,38],[85,39],[86,40],[87,41],[88,42],[89,43],[90,44],[91,45],[92,46],[94,47],[93,48],[95,49],[96,50],[97,51],[98,52],[99,53],[100,54],[101,55],[102,56],[103,57],[104,58],[105,59],[106,60],[107,61],[108,62],[40,30],[8,30],[10,30],[9,30],[2,30],[11,30],[12,30],[13,30],[14,30],[15,30],[16,30],[17,30],[18,30],[3,30],[4,30],[22,30],[19,30],[20,30],[21,30],[23,30],[24,30],[25,30],[5,30],[26,30],[27,30],[28,30],[29,30],[6,30],[30,30],[31,30],[32,30],[33,30],[7,30],[38,30],[34,30],[35,30],[36,30],[37,30],[1,30],[39,30],[56,63],[57,63],[55,64],[58,63],[59,65]],"semanticDiagnosticsPerFile":[54,42,43,41,44,45,46,47,48,49,50,51,52,53,60,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,62,109,78,79,80,110,81,82,83,84,85,86,87,88,89,90,91,92,94,93,95,96,97,98,99,100,101,102,103,104,105,106,107,108,40,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,38,34,35,36,37,1,39,56,57,55,58,59]},"version":"4.5.2"}
|
|
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.es2020.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.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/gauge-properties.ts","./src/gauge-circle.ts","./src/gauge-horizon.ts","./src/gauge-vertical.ts","./src/index.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"6adbf5efd0e374ff5f427a4f26a5a413e9734eee5067a0e86da69aea41910b52","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"12f4cfe2fe60b810c3174537bc2ddb20c1067b7768643d12cb1266fd183afb75","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d70c026dd2eeaa974f430ea229230a1897fdb897dc74659deebe2afd4feeb08f","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","ae9930989ed57478eb03b9b80ad3efa7a3eacdfeff0f78ecf7894c4963a64f93","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","6ac6f24aff52e62c3950461aa17eab26e3a156927858e6b654baef0058b4cd1e",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"45a631650d3970dcb50a5b6f10bdd8533eed562aa5d85fa9887621c074c09de1","8e1409f894fa33ed13f49fc8d503a69986b5349d16d3fa51141b6ac37e16df31","79bccdbdff00b93bacfdd2b4e1e3d1d418ed7208a53125096d6cb5a0574140f5","3c28a6fd93257857757266638fb94ba89be2a60b713c03fc5e8770da02ad30e3","0adcacf23f52d662108cb7373bafab8840fa578f288538be7cabb9f3f5613fd6","573659b567a69a7ca85bd857b3998a69edb91813c08a48951557b219f39496c3","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"9acfe4d1ff027015151ce81d60797b04b52bffe97ad8310bb0ec2e8fd61e1303","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","5533392c50c51b1a5c32b89f13145db929c574ef1c5949cf67a074a05ea107d9","b287b810b5035d5685f1df6e1e418f1ca452a3ed4f59fd5cc081dbf2045f0d9b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"902cd98bf46e95caf4118a0733fb801e9e90eec3edaed6abdad77124afec9ca2","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","cd4854d38f4eb5592afd98ab95ca17389a7dfe38013d9079e802d739bdbcc939","94eed4cc2f5f658d5e229ff1ccd38860bddf4233e347bf78edd2154dee1f2b99",{"version":"bd1a08e30569b0fb2f0b21035eb9b039871f68faa9b98accf847e9c878c5e0a9","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","d7838022c7dab596357a9604b9c6adffe37dc34085ce0779c958ce9545bd7139","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"a7971f9fb2a32ec7788ec6cda9d7a33c02023dfe9a62db2030ad1359649d8050","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4","d88ecca73348e7c337541c4b8b60a50aca5e87384f6b8a422fc6603c637e4c21","badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1cdb8f094b969dcc183745dc88404e2d8fcf2a858c6e7cc2441011476573238e"],"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":[[53,103],[41,43,44,45,46,47,48,49,50,51,52,53,103],[41,42,44,45,46,47,48,49,50,51,52,53,103],[42,43,44,45,46,47,48,49,50,51,52,53,103],[41,42,43,45,46,47,48,49,50,51,52,53,103],[41,42,43,44,46,47,48,49,50,51,52,53,103],[41,42,43,44,45,47,48,49,50,51,52,53,103],[41,42,43,44,45,46,48,49,50,51,52,53,103],[41,42,43,44,45,46,47,49,50,51,52,53,103],[41,42,43,44,45,46,47,48,50,51,52,53,103],[41,42,43,44,45,46,47,48,49,51,52,53,103],[41,42,43,44,45,46,47,48,49,50,52,53,103],[41,42,43,44,45,46,47,48,49,50,51,53,103],[41,42,43,44,45,46,47,48,49,50,51,52,103],[60,103],[63,103],[64,69,103],[65,75,76,83,92,102,103],[65,66,75,83,103],[67,103],[68,69,76,84,103],[69,92,99,103],[70,72,75,83,103],[71,103],[72,73,103],[74,75,103],[75,103],[75,76,77,92,102,103],[75,76,77,92,103],[103],[78,83,92,102,103],[75,76,78,79,83,92,99,102,103],[78,80,92,99,102,103],[60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109],[75,81,103],[82,102,103],[72,75,83,92,103],[84,103],[85,103],[63,86,103],[87,101,103,107],[88,103],[89,103],[75,90,103],[90,91,103,105],[75,92,93,94,103],[92,94,103],[92,93,103],[95,103],[96,103],[75,97,98,103],[97,98,103],[69,83,99,103],[100,103],[83,101,103],[64,78,89,102,103],[69,103],[92,103,104],[103,105],[103,106],[64,69,75,77,86,92,102,103,105,107],[92,103,108],[40,54,55,103],[40,103],[40,56,57,58,103]],"referencedMap":[[54,1],[42,2],[43,3],[41,4],[44,5],[45,6],[46,7],[47,8],[48,9],[49,10],[50,11],[51,12],[52,13],[53,14],[60,15],[61,15],[63,16],[64,17],[65,18],[66,19],[67,20],[68,21],[69,22],[70,23],[71,24],[72,25],[73,25],[74,26],[75,27],[76,28],[77,29],[62,30],[109,30],[78,31],[79,32],[80,33],[110,34],[81,35],[82,36],[83,37],[84,38],[85,39],[86,40],[87,41],[88,42],[89,43],[90,44],[91,45],[92,46],[94,47],[93,48],[95,49],[96,50],[97,51],[98,52],[99,53],[100,54],[101,55],[102,56],[103,57],[104,58],[105,59],[106,60],[107,61],[108,62],[40,30],[8,30],[10,30],[9,30],[2,30],[11,30],[12,30],[13,30],[14,30],[15,30],[16,30],[17,30],[18,30],[3,30],[4,30],[22,30],[19,30],[20,30],[21,30],[23,30],[24,30],[25,30],[5,30],[26,30],[27,30],[28,30],[29,30],[6,30],[30,30],[31,30],[32,30],[33,30],[7,30],[38,30],[34,30],[35,30],[36,30],[37,30],[1,30],[39,30],[56,63],[57,63],[55,64],[58,63],[59,65]],"exportedModulesMap":[[54,1],[42,2],[43,3],[41,4],[44,5],[45,6],[46,7],[47,8],[48,9],[49,10],[50,11],[51,12],[52,13],[53,14],[60,15],[61,15],[63,16],[64,17],[65,18],[66,19],[67,20],[68,21],[69,22],[70,23],[71,24],[72,25],[73,25],[74,26],[75,27],[76,28],[77,29],[62,30],[109,30],[78,31],[79,32],[80,33],[110,34],[81,35],[82,36],[83,37],[84,38],[85,39],[86,40],[87,41],[88,42],[89,43],[90,44],[91,45],[92,46],[94,47],[93,48],[95,49],[96,50],[97,51],[98,52],[99,53],[100,54],[101,55],[102,56],[103,57],[104,58],[105,59],[106,60],[107,61],[108,62],[40,30],[8,30],[10,30],[9,30],[2,30],[11,30],[12,30],[13,30],[14,30],[15,30],[16,30],[17,30],[18,30],[3,30],[4,30],[22,30],[19,30],[20,30],[21,30],[23,30],[24,30],[25,30],[5,30],[26,30],[27,30],[28,30],[29,30],[6,30],[30,30],[31,30],[32,30],[33,30],[7,30],[38,30],[34,30],[35,30],[36,30],[37,30],[1,30],[39,30],[56,63],[57,63],[55,64],[58,63],[59,65]],"semanticDiagnosticsPerFile":[54,42,43,41,44,45,46,47,48,49,50,51,52,53,60,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,62,109,78,79,80,110,81,82,83,84,85,86,87,88,89,90,91,92,94,93,95,96,97,98,99,100,101,102,103,104,105,106,107,108,40,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,38,34,35,36,37,1,39,56,57,55,58,59]},"version":"4.5.2"}
|