awv3
Version:
⚡ AWV3 embedded CAD
1,619 lines (1,618 loc) • 575 kB
JSON
{
"type": "File",
"start": 0,
"end": 2318,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 48,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 2318,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 48,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 12,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 17
},
"identifierName": "THREE"
},
"name": "THREE"
}
}
],
"source": {
"type": "StringLiteral",
"start": 23,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 30
}
},
"extra": {
"rawValue": "three",
"raw": "'three'"
},
"value": "three"
}
},
{
"type": "ImportDeclaration",
"start": 32,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 34
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 39,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 39,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 19
},
"identifierName": "BaseGraphics"
},
"name": "BaseGraphics"
}
}
],
"source": {
"type": "StringLiteral",
"start": 57,
"end": 65,
"loc": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 2,
"column": 33
}
},
"extra": {
"rawValue": "./base",
"raw": "'./base'"
},
"value": "./base"
}
},
{
"type": "FunctionDeclaration",
"start": 68,
"end": 317,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 11,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 77,
"end": 89,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 21
},
"identifierName": "closestAngle"
},
"name": "closestAngle"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 90,
"end": 95,
"loc": {
"start": {
"line": 4,
"column": 22
},
"end": {
"line": 4,
"column": 27
},
"identifierName": "value"
},
"name": "value"
},
{
"type": "Identifier",
"start": 97,
"end": 99,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 31
},
"identifierName": "to"
},
"name": "to"
}
],
"body": {
"type": "BlockStatement",
"start": 101,
"end": 317,
"loc": {
"start": {
"line": 4,
"column": 33
},
"end": {
"line": 11,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 107,
"end": 129,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 26
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 113,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 10
},
"end": {
"line": 5,
"column": 25
}
},
"id": {
"type": "Identifier",
"start": 113,
"end": 116,
"loc": {
"start": {
"line": 5,
"column": 10
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "pi2"
},
"name": "pi2"
},
"init": {
"type": "BinaryExpression",
"start": 119,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 25
}
},
"left": {
"type": "NumericLiteral",
"start": 119,
"end": 120,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 17
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
},
"operator": "*",
"right": {
"type": "MemberExpression",
"start": 121,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 18
},
"end": {
"line": 5,
"column": 25
}
},
"object": {
"type": "Identifier",
"start": 121,
"end": 125,
"loc": {
"start": {
"line": 5,
"column": 18
},
"end": {
"line": 5,
"column": 22
},
"identifierName": "Math"
},
"name": "Math"
},
"property": {
"type": "Identifier",
"start": 126,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 23
},
"end": {
"line": 5,
"column": 25
},
"identifierName": "PI"
},
"name": "PI"
},
"computed": false
}
}
}
],
"kind": "const"
},
{
"type": "WhileStatement",
"start": 134,
"end": 213,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 7,
"column": 21
}
},
"test": {
"type": "BinaryExpression",
"start": 141,
"end": 190,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 60
}
},
"left": {
"type": "CallExpression",
"start": 141,
"end": 167,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 37
}
},
"callee": {
"type": "MemberExpression",
"start": 141,
"end": 149,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 141,
"end": 145,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 15
},
"identifierName": "Math"
},
"name": "Math"
},
"property": {
"type": "Identifier",
"start": 146,
"end": 149,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 19
},
"identifierName": "abs"
},
"name": "abs"
},
"computed": false
},
"arguments": [
{
"type": "BinaryExpression",
"start": 150,
"end": 166,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 36
}
},
"left": {
"type": "BinaryExpression",
"start": 150,
"end": 161,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 31
}
},
"left": {
"type": "Identifier",
"start": 150,
"end": 155,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 25
},
"identifierName": "value"
},
"name": "value"
},
"operator": "-",
"right": {
"type": "Identifier",
"start": 158,
"end": 161,
"loc": {
"start": {
"line": 6,
"column": 28
},
"end": {
"line": 6,
"column": 31
},
"identifierName": "pi2"
},
"name": "pi2"
}
},
"operator": "-",
"right": {
"type": "Identifier",
"start": 164,
"end": 166,
"loc": {
"start": {
"line": 6,
"column": 34
},
"end": {
"line": 6,
"column": 36
},
"identifierName": "to"
},
"name": "to"
}
}
]
},
"operator": "<",
"right": {
"type": "CallExpression",
"start": 170,
"end": 190,
"loc": {
"start": {
"line": 6,
"column": 40
},
"end": {
"line": 6,
"column": 60
}
},
"callee": {
"type": "MemberExpression",
"start": 170,
"end": 178,
"loc": {
"start": {
"line": 6,
"column": 40
},
"end": {
"line": 6,
"column": 48
}
},
"object": {
"type": "Identifier",
"start": 170,
"end": 174,
"loc": {
"start": {
"line": 6,
"column": 40
},
"end": {
"line": 6,
"column": 44
},
"identifierName": "Math"
},
"name": "Math"
},
"property": {
"type": "Identifier",
"start": 175,
"end": 178,
"loc": {
"start": {
"line": 6,
"column": 45
},
"end": {
"line": 6,
"column": 48
},
"identifierName": "abs"
},
"name": "abs"
},
"computed": false
},
"arguments": [
{
"type": "BinaryExpression",
"start": 179,
"end": 189,
"loc": {
"start": {
"line": 6,
"column": 49
},
"end": {
"line": 6,
"column": 59
}
},
"left": {
"type": "Identifier",
"start": 179,
"end": 184,
"loc": {
"start": {
"line": 6,
"column": 49
},
"end": {
"line": 6,
"column": 54
},
"identifierName": "value"
},
"name": "value"
},
"operator": "-",
"right": {
"type": "Identifier",
"start": 187,
"end": 189,
"loc": {
"start": {
"line": 6,
"column": 57
},
"end": {
"line": 6,
"column": 59
},
"identifierName": "to"
},
"name": "to"
}
}
]
}
},
"body": {
"type": "ExpressionStatement",
"start": 200,
"end": 213,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 21
}
},
"expression": {
"type": "AssignmentExpression",
"start": 200,
"end": 212,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 20
}
},
"operator": "-=",
"left": {
"type": "Identifier",
"start": 200,
"end": 205,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 13
},
"identifierName": "value"
},
"name": "value"
},
"right": {
"type": "Identifier",
"start": 209,
"end": 212,
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 20
},
"identifierName": "pi2"
},
"name": "pi2"
}
}
}
},
{
"type": "WhileStatement",
"start": 218,
"end": 297,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 9,
"column": 21
}
},
"test": {
"type": "BinaryExpression",
"start": 225,
"end": 274,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 60
}
},
"left": {
"type": "CallExpression",
"start": 225,
"end": 251,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 37
}
},
"callee": {
"type": "MemberExpression",
"start": 225,
"end": 233,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 225,
"end": 229,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 15
},
"identifierName": "Math"
},
"name": "Math"
},
"property": {
"type": "Identifier",
"start": 230,
"end": 233,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 19
},
"identifierName": "abs"
},
"name": "abs"
},
"computed": false
},
"arguments": [
{
"type": "BinaryExpression",
"start": 234,
"end": 250,
"loc": {
"start": {
"line": 8,
"column": 20
},
"end": {
"line": 8,
"column": 36
}
},
"left": {
"type": "BinaryExpression",
"start": 234,
"end": 245,
"loc": {
"start": {
"line": 8,
"column": 20
},
"end": {
"line": 8,
"column": 31
}
},
"left": {
"type": "Identifier",
"start": 234,
"end": 239,
"loc": {
"start": {
"line": 8,
"column": 20
},
"end": {
"line": 8,
"column": 25
},
"identifierName": "value"
},
"name": "value"
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 242,
"end": 245,
"loc": {
"start": {
"line": 8,
"column": 28
},
"end": {
"line": 8,
"column": 31
},
"identifierName": "pi2"
},
"name": "pi2"
}
},
"operator": "-",
"right": {
"type": "Identifier",
"start": 248,
"end": 250,
"loc": {
"start": {
"line": 8,
"column": 34
},
"end": {
"line": 8,
"column": 36
},
"identifierName": "to"
},
"name": "to"
}
}
]
},
"operator": "<",
"right": {
"type": "CallExpression",
"start": 254,
"end": 274,
"loc": {
"start": {
"line": 8,
"column": 40
},
"end": {
"line": 8,
"column": 60
}
},
"callee": {
"type": "MemberExpression",
"start": 254,
"end": 262,
"loc": {
"start": {
"line": 8,
"column": 40
},
"end": {
"line": 8,
"column": 48
}
},
"object": {
"type": "Identifier",
"start": 254,
"end": 258,
"loc": {
"start": {
"line": 8,
"column": 40
},
"end": {
"line": 8,
"column": 44
},
"identifierName": "Math"
},
"name": "Math"
},
"property": {
"type": "Identifier",
"start": 259,
"end": 262,
"loc": {
"start": {
"line": 8,
"column": 45
},
"end": {
"line": 8,
"column": 48
},
"identifierName": "abs"
},
"name": "abs"
},
"computed": false
},
"arguments": [
{
"type": "BinaryExpression",
"start": 263,
"end": 273,
"loc": {
"start": {
"line": 8,
"column": 49
},
"end": {
"line": 8,
"column": 59
}
},
"left": {
"type": "Identifier",
"start": 263,
"end": 268,
"loc": {
"start": {
"line": 8,
"column": 49
},
"end": {
"line": 8,
"column": 54
},
"identifierName": "value"
},
"name": "value"
},
"operator": "-",
"right": {
"type": "Identifier",
"start": 271,
"end": 273,
"loc": {
"start": {
"line": 8,
"column": 57
},
"end": {
"line": 8,
"column": 59
},
"identifierName": "to"
},
"name": "to"
}
}
]
}
},
"body": {
"type": "ExpressionStatement",
"start": 284,
"end": 297,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 21
}
},
"expression": {
"type": "AssignmentExpression",
"start": 284,
"end": 296,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 20
}
},
"operator": "+=",
"left": {
"type": "Identifier",
"start": 284,
"end": 289,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 13
},
"identifierName": "value"
},
"name": "value"
},
"right": {
"type": "Identifier",
"start": 293,
"end": 296,
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 20
},
"identifierName": "pi2"
},
"name": "pi2"
}
}
}
},
{
"type": "ReturnStatement",
"start": 302,
"end": 315,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 17
}
},
"argument": {
"type": "Identifier",
"start": 309,
"end": 314,
"loc": {
"start": {
"line": 10,
"column": 11
},
"end": {
"line": 10,
"column": 16
},
"identifierName": "value"
},
"name": "value"
}
}
],
"directives": []
}
},
{
"type": "ExportDefaultDeclaration",
"start": 319,
"end": 2317,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 47,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 334,
"end": 2317,
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 47,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 340,
"end": 347,
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 28
},
"identifierName": "Angular"
},
"name": "Angular"
},
"superClass": {
"type": "Identifier",
"start": 356,
"end": 368,
"loc": {
"start": {
"line": 13,
"column": 37
},
"end": {
"line": 13,
"column": 49
},
"identifierName": "BaseGraphics"
},
"name": "BaseGraphics"
},
"body": {
"type": "ClassBody",
"start": 369,
"end": 2317,
"loc": {
"start": {
"line": 13,
"column": 50
},
"end": {
"line": 47,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 375,
"end": 436,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 16,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 375,
"end": 386,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "RestElement",
"start": 387,
"end": 394,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 23
}
},
"argument": {
"type": "Identifier",
"start": 390,
"end": 394,
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 14,
"column": 23
},
"identifierName": "args"
},
"name": "args"
}
}
],
"body": {
"type": "BlockStatement",
"start": 396,
"end": 436,
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 16,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 406,
"end": 430,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 32
}
},
"expression": {
"type": "CallExpression",
"start": 406,
"end": 429,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 31
}
},
"callee": {
"type": "Super",
"start": 406,
"end": 411,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 13
}
}
},
"arguments": [
{
"type": "SpreadElement",
"start": 412,
"end": 419,
"loc": {
"start": {
"line": 15,
"column": 14
},
"end": {
"line": 15,
"column": 21
}
},
"argument": {
"type": "Identifier",
"start": 415,
"end": 419,
"loc": {
"start": {
"line": 15,
"column": 17
},
"end": {
"line": 15,
"column": 21
},
"identifierName": "args"
},
"name": "args"
}
},
{
"type": "NumericLiteral",
"start": 421,
"end": 422,
"loc": {
"start": {
"line": 15,
"column": 23
},
"end": {
"line": 15,
"column": 24
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
},
{
"type": "NumericLiteral",
"start": 424,
"end": 425,
"loc": {
"start": {
"line": 15,
"column": 26
},
"end": {
"line": 15,
"column": 27
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
},
{
"type": "NumericLiteral",
"start": 427,
"end": 428,
"loc": {
"start": {
"line": 15,
"column": 29
},
"end": {
"line": 15,
"column": 30
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
}
]
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 442,
"end": 2315,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 46,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 442,
"end": 457,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 19
},
"identifierName": "updateFromState"
},
"name": "updateFromState"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 458,
"end": 463,
"loc": {
"start": {
"line": 18,
"column": 20
},
"end": {
"line": 18,
"column": 25
},
"identifierName": "state"
},
"name": "state"
},
{
"type": "RestElement",
"start": 465,
"end": 472,
"loc": {
"start": {
"line": 18,
"column": 27
},
"end": {
"line": 18,
"column": 34
}
},
"argument": {
"type": "Identifier",
"start": 468,
"end": 472,
"loc": {
"start": {
"line": 18,
"column": 30
},
"end": {
"line": 18,
"column": 34
},
"identifierName": "args"
},
"name": "args"
}
}
],
"body": {
"type": "BlockStatement",
"start": 474,
"end": 2315,
"loc": {
"start": {
"line": 18,
"column": 36
},
"end": {
"line": 46,
"column": 5
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 553,
"end": 691,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 146
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 557,
"end": 690,
"loc": {
"start": {
"line": 20,
"column": 12
},
"end": {
"line": 20,
"column": 145
}
},
"id": {
"type": "ArrayPattern",
"start": 557,
"end": 582,
"loc": {
"start": {
"line": 20,
"column": 12
},
"end": {
"line": 20,
"column": 37
}
},
"elements": [
{
"type": "Identifier",
"start": 558,
"end": 563,
"loc": {
"start": {
"line": 20,
"column": 13
},
"end": {
"line": 20,
"column": 18