awv3
Version:
⚡ AWV3 embedded CAD
1,298 lines • 220 kB
JSON
{
"type": "File",
"start": 0,
"end": 838,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 23,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 838,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 23,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 30
}
},
"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": 31,
"end": 64,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 33
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 38,
"end": 50,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 38,
"end": 50,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 19
},
"identifierName": "BaseGraphics"
},
"name": "BaseGraphics"
}
}
],
"source": {
"type": "StringLiteral",
"start": 56,
"end": 64,
"loc": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 2,
"column": 33
}
},
"extra": {
"rawValue": "./base",
"raw": "'./base'"
},
"value": "./base"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 66,
"end": 837,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 22,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 81,
"end": 837,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 22,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 87,
"end": 93,
"loc": {
"start": {
"line": 4,
"column": 21
},
"end": {
"line": 4,
"column": 27
},
"identifierName": "Radial"
},
"name": "Radial"
},
"superClass": {
"type": "Identifier",
"start": 102,
"end": 114,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 4,
"column": 48
},
"identifierName": "BaseGraphics"
},
"name": "BaseGraphics"
},
"body": {
"type": "ClassBody",
"start": 115,
"end": 837,
"loc": {
"start": {
"line": 4,
"column": 49
},
"end": {
"line": 22,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 121,
"end": 181,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 7,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 121,
"end": 132,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "RestElement",
"start": 133,
"end": 140,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 23
}
},
"argument": {
"type": "Identifier",
"start": 136,
"end": 140,
"loc": {
"start": {
"line": 5,
"column": 19
},
"end": {
"line": 5,
"column": 23
},
"identifierName": "args"
},
"name": "args"
}
}
],
"body": {
"type": "BlockStatement",
"start": 142,
"end": 181,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 7,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 152,
"end": 175,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 31
}
},
"expression": {
"type": "CallExpression",
"start": 152,
"end": 175,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 31
}
},
"callee": {
"type": "Super",
"start": 152,
"end": 157,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
}
},
"arguments": [
{
"type": "SpreadElement",
"start": 158,
"end": 165,
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 21
}
},
"argument": {
"type": "Identifier",
"start": 161,
"end": 165,
"loc": {
"start": {
"line": 6,
"column": 17
},
"end": {
"line": 6,
"column": 21
},
"identifierName": "args"
},
"name": "args"
}
},
{
"type": "NumericLiteral",
"start": 167,
"end": 168,
"loc": {
"start": {
"line": 6,
"column": 23
},
"end": {
"line": 6,
"column": 24
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
},
{
"type": "NumericLiteral",
"start": 170,
"end": 171,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 27
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
{
"type": "NumericLiteral",
"start": 173,
"end": 174,
"loc": {
"start": {
"line": 6,
"column": 29
},
"end": {
"line": 6,
"column": 30
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
]
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 187,
"end": 835,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 187,
"end": 202,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 19
},
"identifierName": "updateFromState"
},
"name": "updateFromState"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 203,
"end": 207,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 24
},
"identifierName": "info"
},
"name": "info"
},
{
"type": "RestElement",
"start": 209,
"end": 216,
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 33
}
},
"argument": {
"type": "Identifier",
"start": 212,
"end": 216,
"loc": {
"start": {
"line": 9,
"column": 29
},
"end": {
"line": 9,
"column": 33
},
"identifierName": "args"
},
"name": "args"
}
}
],
"body": {
"type": "BlockStatement",
"start": 218,
"end": 835,
"loc": {
"start": {
"line": 9,
"column": 35
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 228,
"end": 364,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 12,
"column": 9
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 234,
"end": 364,
"loc": {
"start": {
"line": 10,
"column": 14
},
"end": {
"line": 12,
"column": 9
}
},
"id": {
"type": "ArrayPattern",
"start": 234,
"end": 247,
"loc": {
"start": {
"line": 10,
"column": 14
},
"end": {
"line": 10,
"column": 27
}
},
"elements": [
{
"type": "Identifier",
"start": 235,
"end": 241,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 21
},
"identifierName": "center"
},
"name": "center"
},
{
"type": "Identifier",
"start": 243,
"end": 246,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 26
},
"identifierName": "dim"
},
"name": "dim"
}
]
},
"init": {
"type": "CallExpression",
"start": 250,
"end": 364,
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 12,
"column": 9
}
},
"callee": {
"type": "MemberExpression",
"start": 250,
"end": 273,
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 10,
"column": 53
}
},
"object": {
"type": "ArrayExpression",
"start": 250,
"end": 269,
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 10,
"column": 49
}
},
"elements": [
{
"type": "StringLiteral",
"start": 251,
"end": 259,
"loc": {
"start": {
"line": 10,
"column": 31
},
"end": {
"line": 10,
"column": 39
}
},
"extra": {
"rawValue": "center",
"raw": "'center'"
},
"value": "center"
},
{
"type": "StringLiteral",
"start": 261,
"end": 268,
"loc": {
"start": {
"line": 10,
"column": 41
},
"end": {
"line": 10,
"column": 48
}
},
"extra": {
"rawValue": "dimPt",
"raw": "'dimPt'"
},
"value": "dimPt"
}
]
},
"property": {
"type": "Identifier",
"start": 270,
"end": 273,
"loc": {
"start": {
"line": 10,
"column": 50
},
"end": {
"line": 10,
"column": 53
},
"identifierName": "map"
},
"name": "map"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 274,
"end": 353,
"loc": {
"start": {
"line": 10,
"column": 54
},
"end": {
"line": 11,
"column": 74
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 274,
"end": 275,
"loc": {
"start": {
"line": 10,
"column": 54
},
"end": {
"line": 10,
"column": 55
},
"identifierName": "x"
},
"name": "x"
}
],
"body": {
"type": "CallExpression",
"start": 291,
"end": 353,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 74
}
},
"callee": {
"type": "MemberExpression",
"start": 291,
"end": 320,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 41
}
},
"object": {
"type": "NewExpression",
"start": 291,
"end": 310,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 31
}
},
"callee": {
"type": "MemberExpression",
"start": 295,
"end": 308,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 29
}
},
"object": {
"type": "Identifier",
"start": 295,
"end": 300,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 21
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 301,
"end": 308,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 29
},
"identifierName": "Vector3"
},
"name": "Vector3"
},
"computed": false
},
"arguments": []
},
"property": {
"type": "Identifier",
"start": 311,
"end": 320,
"loc": {
"start": {
"line": 11,
"column": 32
},
"end": {
"line": 11,
"column": 41
},
"identifierName": "fromArray"
},
"name": "fromArray"
},
"computed": false
},
"arguments": [
{
"type": "MemberExpression",
"start": 321,
"end": 352,
"loc": {
"start": {
"line": 11,
"column": 42
},
"end": {
"line": 11,
"column": 73
}
},
"object": {
"type": "MemberExpression",
"start": 321,
"end": 346,
"loc": {
"start": {
"line": 11,
"column": 42
},
"end": {
"line": 11,
"column": 67
}
},
"object": {
"type": "MemberExpression",
"start": 321,
"end": 343,
"loc": {
"start": {
"line": 11,
"column": 42
},
"end": {
"line": 11,
"column": 64
}
},
"object": {
"type": "MemberExpression",
"start": 321,
"end": 335,
"loc": {
"start": {
"line": 11,
"column": 42
},
"end": {
"line": 11,
"column": 56
}
},
"object": {
"type": "Identifier",
"start": 321,
"end": 325,
"loc": {
"start": {
"line": 11,
"column": 42
},
"end": {
"line": 11,
"column": 46
},
"identifierName": "info"
},
"name": "info"
},
"property": {
"type": "Identifier",
"start": 326,
"end": 335,
"loc": {
"start": {
"line": 11,
"column": 47
},
"end": {
"line": 11,
"column": 56
},
"identifierName": "dimension"
},
"name": "dimension"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 336,
"end": 343,
"loc": {
"start": {
"line": 11,
"column": 57
},
"end": {
"line": 11,
"column": 64
},
"identifierName": "members"
},
"name": "members"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 344,
"end": 345,
"loc": {
"start": {
"line": 11,
"column": 65
},
"end": {
"line": 11,
"column": 66
},
"identifierName": "x"
},
"name": "x"
},
"computed": true
},
"property": {
"type": "Identifier",
"start": 347,
"end": 352,
"loc": {
"start": {
"line": 11,
"column": 68
},
"end": {
"line": 11,
"column": 73
},
"identifierName": "value"
},
"name": "value"
},
"computed": false
}
]
}
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 373,
"end": 423,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 58
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 379,
"end": 423,
"loc": {
"start": {
"line": 13,
"column": 14
},
"end": {
"line": 13,
"column": 58
}
},
"id": {
"type": "Identifier",
"start": 379,
"end": 385,
"loc": {
"start": {
"line": 13,
"column": 14
},
"end": {
"line": 13,
"column": 20
},
"identifierName": "radius"
},
"name": "radius"
},
"init": {
"type": "MemberExpression",
"start": 388,
"end": 423,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 58
}
},
"object": {
"type": "MemberExpression",
"start": 388,
"end": 417,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 52
}
},
"object": {
"type": "MemberExpression",
"start": 388,
"end": 410,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 45
}
},
"object": {
"type": "MemberExpression",
"start": 388,
"end": 402,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 37
}
},
"object": {
"type": "Identifier",
"start": 388,
"end": 392,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 27
},
"identifierName": "info"
},
"name": "info"
},
"property": {
"type": "Identifier",
"start": 393,
"end": 402,
"loc": {
"start": {
"line": 13,
"column": 28
},
"end": {
"line": 13,
"column": 37
},
"identifierName": "dimension"
},
"name": "dimension"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 403,
"end": 410,
"loc": {
"start": {
"line": 13,
"column": 38
},
"end": {
"line": 13,
"column": 45
},
"identifierName": "members"
},
"name": "members"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 411,
"end": 417,
"loc": {
"start": {
"line": 13,
"column": 46
},
"end": {
"line": 13,
"column": 52
},
"identifierName": "radius"
},
"name": "radius"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 418,
"end": 423,
"loc": {
"start": {
"line": 13,
"column": 53
},
"end": {
"line": 13,
"column": 58
},
"identifierName": "value"
},
"name": "value"
},
"computed": false
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 432,
"end": 497,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 73
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 438,
"end": 497,
"loc": {
"start": {
"line": 14,
"column": 14
},
"end": {
"l