awv3
Version:
⚡ AWV3 embedded CAD
1,736 lines (1,735 loc) • 527 kB
JSON
{
"type": "File",
"start": 0,
"end": 2803,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 78,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 2803,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 78,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 45,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 45
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
},
"identifierName": "Object3"
},
"name": "Object3"
}
}
],
"source": {
"type": "StringLiteral",
"start": 20,
"end": 44,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 44
}
},
"extra": {
"rawValue": "../../../three/object3",
"raw": "'../../../three/object3'"
},
"value": "../../../three/object3"
}
},
{
"type": "ImportDeclaration",
"start": 46,
"end": 83,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 37
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 53,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 53,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 16
},
"identifierName": "Ccfuturef"
},
"name": "Ccfuturef"
}
}
],
"source": {
"type": "StringLiteral",
"start": 68,
"end": 82,
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 36
}
},
"extra": {
"rawValue": "../ccfuturef",
"raw": "'../ccfuturef'"
},
"value": "../ccfuturef"
}
},
{
"type": "ImportDeclaration",
"start": 84,
"end": 113,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 29
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 91,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 91,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 12
},
"identifierName": "Ccref"
},
"name": "Ccref"
}
}
],
"source": {
"type": "StringLiteral",
"start": 102,
"end": 112,
"loc": {
"start": {
"line": 3,
"column": 18
},
"end": {
"line": 3,
"column": 28
}
},
"extra": {
"rawValue": "../ccref",
"raw": "'../ccref'"
},
"value": "../ccref"
}
},
{
"type": "ImportDeclaration",
"start": 114,
"end": 162,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 48
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 122,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 18
}
},
"imported": {
"type": "Identifier",
"start": 122,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 18
},
"identifierName": "addCommand"
},
"name": "addCommand"
},
"local": {
"type": "Identifier",
"start": 122,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 18
},
"identifierName": "addCommand"
},
"name": "addCommand"
}
}
],
"source": {
"type": "StringLiteral",
"start": 139,
"end": 161,
"loc": {
"start": {
"line": 4,
"column": 25
},
"end": {
"line": 4,
"column": 47
}
},
"extra": {
"rawValue": "../command/highlevel",
"raw": "'../command/highlevel'"
},
"value": "../command/highlevel"
}
},
{
"type": "ImportDeclaration",
"start": 163,
"end": 252,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 89
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 171,
"end": 177,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 14
}
},
"imported": {
"type": "Identifier",
"start": 171,
"end": 177,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 14
},
"identifierName": "Assign"
},
"name": "Assign"
},
"local": {
"type": "Identifier",
"start": 171,
"end": 177,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 14
},
"identifierName": "Assign"
},
"name": "Assign"
}
},
{
"type": "ImportSpecifier",
"start": 179,
"end": 187,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 179,
"end": 187,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 24
},
"identifierName": "IdToReal"
},
"name": "IdToReal"
},
"local": {
"type": "Identifier",
"start": 179,
"end": 187,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 24
},
"identifierName": "IdToReal"
},
"name": "IdToReal"
}
},
{
"type": "ImportSpecifier",
"start": 189,
"end": 195,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 5,
"column": 32
}
},
"imported": {
"type": "Identifier",
"start": 189,
"end": 195,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 5,
"column": 32
},
"identifierName": "Member"
},
"name": "Member"
},
"local": {
"type": "Identifier",
"start": 189,
"end": 195,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 5,
"column": 32
},
"identifierName": "Member"
},
"name": "Member"
}
},
{
"type": "ImportSpecifier",
"start": 197,
"end": 205,
"loc": {
"start": {
"line": 5,
"column": 34
},
"end": {
"line": 5,
"column": 42
}
},
"imported": {
"type": "Identifier",
"start": 197,
"end": 205,
"loc": {
"start": {
"line": 5,
"column": 34
},
"end": {
"line": 5,
"column": 42
},
"identifierName": "Variable"
},
"name": "Variable"
},
"local": {
"type": "Identifier",
"start": 197,
"end": 205,
"loc": {
"start": {
"line": 5,
"column": 34
},
"end": {
"line": 5,
"column": 42
},
"identifierName": "Variable"
},
"name": "Variable"
}
},
{
"type": "ImportSpecifier",
"start": 207,
"end": 213,
"loc": {
"start": {
"line": 5,
"column": 44
},
"end": {
"line": 5,
"column": 50
}
},
"imported": {
"type": "Identifier",
"start": 207,
"end": 213,
"loc": {
"start": {
"line": 5,
"column": 44
},
"end": {
"line": 5,
"column": 50
},
"identifierName": "Return"
},
"name": "Return"
},
"local": {
"type": "Identifier",
"start": 207,
"end": 213,
"loc": {
"start": {
"line": 5,
"column": 44
},
"end": {
"line": 5,
"column": 50
},
"identifierName": "Return"
},
"name": "Return"
}
},
{
"type": "ImportSpecifier",
"start": 215,
"end": 223,
"loc": {
"start": {
"line": 5,
"column": 52
},
"end": {
"line": 5,
"column": 60
}
},
"imported": {
"type": "Identifier",
"start": 215,
"end": 223,
"loc": {
"start": {
"line": 5,
"column": 52
},
"end": {
"line": 5,
"column": 60
},
"identifierName": "Sequence"
},
"name": "Sequence"
},
"local": {
"type": "Identifier",
"start": 215,
"end": 223,
"loc": {
"start": {
"line": 5,
"column": 52
},
"end": {
"line": 5,
"column": 60
},
"identifierName": "Sequence"
},
"name": "Sequence"
}
}
],
"source": {
"type": "StringLiteral",
"start": 230,
"end": 251,
"loc": {
"start": {
"line": 5,
"column": 67
},
"end": {
"line": 5,
"column": 88
}
},
"extra": {
"rawValue": "../command/lowlevel",
"raw": "'../command/lowlevel'"
},
"value": "../command/lowlevel"
}
},
{
"type": "ImportDeclaration",
"start": 253,
"end": 298,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 45
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 261,
"end": 270,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 17
}
},
"imported": {
"type": "Identifier",
"start": 261,
"end": 270,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 17
},
"identifierName": "incidence"
},
"name": "incidence"
},
"local": {
"type": "Identifier",
"start": 261,
"end": 270,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 17
},
"identifierName": "incidence"
},
"name": "incidence"
}
}
],
"source": {
"type": "StringLiteral",
"start": 277,
"end": 297,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 44
}
},
"extra": {
"rawValue": "../constraint/type",
"raw": "'../constraint/type'"
},
"value": "../constraint/type"
}
},
{
"type": "ImportDeclaration",
"start": 299,
"end": 342,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 43
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 307,
"end": 320,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 21
}
},
"imported": {
"type": "Identifier",
"start": 307,
"end": 320,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 21
},
"identifierName": "calcSketchPos"
},
"name": "calcSketchPos"
},
"local": {
"type": "Identifier",
"start": 307,
"end": 320,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 21
},
"identifierName": "calcSketchPos"
},
"name": "calcSketchPos"
}
}
],
"source": {
"type": "StringLiteral",
"start": 327,
"end": 341,
"loc": {
"start": {
"line": 7,
"column": 28
},
"end": {
"line": 7,
"column": 42
}
},
"extra": {
"rawValue": "../viewutils",
"raw": "'../viewutils'"
},
"value": "../viewutils"
}
},
{
"type": "ImportDeclaration",
"start": 343,
"end": 376,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 33
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 350,
"end": 361,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 350,
"end": 361,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 18
},
"identifierName": "DrawHandler"
},
"name": "DrawHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 367,
"end": 375,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 32
}
},
"extra": {
"rawValue": "./draw",
"raw": "'./draw'"
},
"value": "./draw"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 378,
"end": 2802,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 77,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 393,
"end": 2802,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 77,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 399,
"end": 414,
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 36
},
"identifierName": "PolylineHandler"
},
"name": "PolylineHandler"
},
"superClass": {
"type": "Identifier",
"start": 423,
"end": 434,
"loc": {
"start": {
"line": 10,
"column": 45
},
"end": {
"line": 10,
"column": 56
},
"identifierName": "DrawHandler"
},
"name": "DrawHandler"
},
"body": {
"type": "ClassBody",
"start": 435,
"end": 2802,
"loc": {
"start": {
"line": 10,
"column": 57
},
"end": {
"line": 77,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 441,
"end": 571,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 15,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 441,
"end": 452,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 453,
"end": 461,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 24
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 463,
"end": 467,
"loc": {
"start": {
"line": 11,
"column": 26
},
"end": {
"line": 11,
"column": 30
},
"identifierName": "type"
},
"name": "type"
}
],
"body": {
"type": "BlockStatement",
"start": 469,
"end": 571,
"loc": {
"start": {
"line": 11,
"column": 32
},
"end": {
"line": 15,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 479,
"end": 501,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 30
}
},
"expression": {
"type": "CallExpression",
"start": 479,
"end": 500,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 29
}
},
"callee": {
"type": "Super",
"start": 479,
"end": 484,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"start": 485,
"end": 493,
"loc": {
"start": {
"line": 12,
"column": 14
},
"end": {
"line": 12,
"column": 22
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 495,
"end": 499,
"loc": {
"start": {
"line": 12,
"column": 24
},
"end": {
"line": 12,
"column": 28
},
"identifierName": "type"
},
"name": "type"
}
]
}
},
{
"type": "ExpressionStatement",
"start": 510,
"end": 532,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 30
}
},
"expression": {
"type": "AssignmentExpression",
"start": 510,
"end": 531,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 29
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 510,
"end": 524,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 510,
"end": 514,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 515,
"end": 524,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 22
},
"identifierName": "lastPoint"
},
"name": "lastPoint"
},
"computed": false
},
"right": {
"type": "NullLiteral",
"start": 527,
"end": 531,
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 29
}
}
}
}
},
{
"type": "ExpressionStatement",
"start": 541,
"end": 565,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 32
}
},
"expression": {
"type": "AssignmentExpression",
"start": 541,
"end": 564,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 31
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 541,
"end": 557,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 541,
"end": 545,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 546,
"end": 557,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 24
},
"identifierName": "edgeHandler"
},
"name": "edgeHandler"
},
"computed": false
},
"right": {
"type": "NullLiteral",
"start": 560,
"end": 564,
"loc": {
"start": {
"line": 14,
"column": 27
},
"end": {
"line": 14,
"column": 31
}
}
}
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 577,
"end": 661,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 20,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 577,
"end": 584,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 11
},
"identifierName": "destroy"
},
"name": "destroy"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 585,
"end": 592,
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 19
},
"identifierName": "options"
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 594,
"end": 661,
"loc": {
"start": {
"line": 17,
"column": 21
},
"end": {
"line": 20,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 604,
"end": 630,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 34
}
},
"expression": {
"type": "CallExpression",
"start": 604,
"end": 629,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 33
}
},
"callee": {
"type": "MemberExpression",
"start": 604,
"end": 623,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 604,
"end": 608,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 609,
"end": 623,
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 27
},
"identifierName": "setEdgeHandler"
},
"name": "setEdgeHandler"
},
"computed": false
},
"arguments": [
{
"type": "NullLiteral",
"start": 624,
"end": 628,
"loc": {
"start": {
"line": 18,
"column": 28
},
"end": {
"line": 18,
"column": 32
}
}
}
]
}
},
{
"type": "ExpressionStatement",
"start": 639,
"end": 655,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 24
}
},
"expression": {
"type": "CallExpression",
"start": 639,
"end": 654,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 23
}
},
"callee": {
"type": "MemberExpression",
"start": 639,
"end": 652,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 21
}
},
"object": {
"type": "Super",
"start": 639,
"end": 644,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 13
}
}
},
"property": {
"type": "Identifier",
"start": 645,
"end": 652,
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 19,
"column": 21
},
"identifierName": "destroy"
},
"name": "destroy"
},
"computed": false
},
"arguments": []
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 667,
"end": 1080,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 31,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 667,
"end": 681,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 22,
"column": 18
},
"identifierName": "setEdgeHandler"
},
"name": "setEdgeHandler"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 682,
"end": 693,
"loc": {
"start": {
"line": 22,
"column": 19
},
"end": {
"line": 22,
"column": 30
},
"identifierName": "edgeHandler"
},
"name": "edgeHandler"
}
],
"body": {
"type": "BlockStatement",
"start": 695,
"end": 1080,
"loc": {
"start": {
"line": 22,
"column": 32
},
"end": {
"line": 31,
"column": 5
}
},
"body": [
{
"type": "IfStatement",
"start": 768,
"end": 849,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 25,
"column": 59
}
},
"test": {
"type": "MemberExpression",
"start": 772,
"end": 788,
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 28
}
},
"object": {
"type": "ThisExpression",
"start": 772,
"end": 776,
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 16
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 777,
"end": 788,
"loc": {
"start": {
"line": 24,
"column": 17
},
"end": {
"line": 24,
"column": 28
},
"identifierName": "edgeHandler"
},
"name": "edgeHandler"
},
"computed": false,
"leadingComments": null
},
"consequent": {
"type": "ExpressionStatement",
"start": 802,
"end": 849,
"loc": {
"start": {
"line": 25,
"column": 12
},
"end": {
"line": 25,
"column": 59
}
},
"expression": {