awv3
Version:
AWV client CAD framework
1,141 lines (1,140 loc) • 87.8 kB
JSON
{
"type": "Program",
"start": 0,
"end": 752,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 23,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"name": "THREE"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 18,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 25
}
},
"value": "three",
"rawValue": "three",
"raw": "'three'"
}
},
{
"type": "ImportDeclaration",
"start": 27,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 34,
"end": 40,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 34,
"end": 40,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"name": "Parser"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 46,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 35
}
},
"value": "../core/parser",
"rawValue": "../core/parser",
"raw": "'../core/parser'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 65,
"end": 751,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 22,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 80,
"end": 751,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 22,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 86,
"end": 101,
"loc": {
"start": {
"line": 4,
"column": 21
},
"end": {
"line": 4,
"column": 36
}
},
"name": "AssemblyFactory"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 102,
"end": 751,
"loc": {
"start": {
"line": 4,
"column": 37
},
"end": {
"line": 22,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 108,
"end": 749,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 108,
"end": 119,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 119,
"end": 749,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 21,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 120,
"end": 124,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 20
}
},
"name": "pool"
}
],
"body": {
"type": "BlockStatement",
"start": 126,
"end": 749,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 136,
"end": 153,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 136,
"end": 152,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 136,
"end": 145,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 136,
"end": 140,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 141,
"end": 145,
"loc": {
"start": {
"line": 6,
"column": 13
},
"end": {
"line": 6,
"column": 17
}
},
"name": "pool"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 148,
"end": 152,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 24
}
},
"name": "pool"
}
}
},
{
"type": "ReturnStatement",
"start": 162,
"end": 743,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 20,
"column": 9
}
},
"argument": {
"type": "ArrowFunctionExpression",
"start": 169,
"end": 743,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 20,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 169,
"end": 176,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 22
}
},
"name": "attribs"
}
],
"body": {
"type": "BlockStatement",
"start": 180,
"end": 743,
"loc": {
"start": {
"line": 7,
"column": 26
},
"end": {
"line": 20,
"column": 9
}
},
"body": [
{
"type": "IfStatement",
"start": 194,
"end": 733,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 19,
"column": 13
}
},
"test": {
"type": "BinaryExpression",
"start": 198,
"end": 234,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 52
}
},
"left": {
"type": "MemberExpression",
"start": 198,
"end": 210,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 198,
"end": 205,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 23
}
},
"name": "attribs"
},
"property": {
"type": "Identifier",
"start": 206,
"end": 210,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 28
}
},
"name": "type"
},
"computed": false
},
"operator": "===",
"right": {
"type": "MemberExpression",
"start": 215,
"end": 234,
"loc": {
"start": {
"line": 8,
"column": 33
},
"end": {
"line": 8,
"column": 52
}
},
"object": {
"type": "MemberExpression",
"start": 215,
"end": 229,
"loc": {
"start": {
"line": 8,
"column": 33
},
"end": {
"line": 8,
"column": 47
}
},
"object": {
"type": "Identifier",
"start": 215,
"end": 221,
"loc": {
"start": {
"line": 8,
"column": 33
},
"end": {
"line": 8,
"column": 39
}
},
"name": "Parser"
},
"property": {
"type": "Identifier",
"start": 222,
"end": 229,
"loc": {
"start": {
"line": 8,
"column": 40
},
"end": {
"line": 8,
"column": 47
}
},
"name": "Factory"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 230,
"end": 234,
"loc": {
"start": {
"line": 8,
"column": 48
},
"end": {
"line": 8,
"column": 52
}
},
"name": "Link"
},
"computed": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 236,
"end": 733,
"loc": {
"start": {
"line": 8,
"column": 54
},
"end": {
"line": 19,
"column": 13
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 254,
"end": 289,
"loc": {
"start": {
"line": 9,
"column": 16
},
"end": {
"line": 9,
"column": 51
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 258,
"end": 288,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 50
}
},
"id": {
"type": "ObjectPattern",
"start": 258,
"end": 273,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 35
}
},
"properties": [
{
"type": "Property",
"start": 260,
"end": 263,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 25
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 260,
"end": 263,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 25
}
},
"name": "ref"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 260,
"end": 263,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 25
}
},
"name": "ref"
}
},
{
"type": "Property",
"start": 265,
"end": 271,
"loc": {
"start": {
"line": 9,
"column": 27
},
"end": {
"line": 9,
"column": 33
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 265,
"end": 271,
"loc": {
"start": {
"line": 9,
"column": 27
},
"end": {
"line": 9,
"column": 33
}
},
"name": "matrix"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 265,
"end": 271,
"loc": {
"start": {
"line": 9,
"column": 27
},
"end": {
"line": 9,
"column": 33
}
},
"name": "matrix"
}
}
]
},
"init": {
"type": "MemberExpression",
"start": 276,
"end": 288,
"loc": {
"start": {
"line": 9,
"column": 38
},
"end": {
"line": 9,
"column": 50
}
},
"object": {
"type": "Identifier",
"start": 276,
"end": 283,
"loc": {
"start": {
"line": 9,
"column": 38
},
"end": {
"line": 9,
"column": 45
}
},
"name": "attribs"
},
"property": {
"type": "Identifier",
"start": 284,
"end": 288,
"loc": {
"start": {
"line": 9,
"column": 46
},
"end": {
"line": 9,
"column": 50
}
},
"name": "data"
},
"computed": false
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 306,
"end": 364,
"loc": {
"start": {
"line": 10,
"column": 16
},
"end": {
"line": 10,
"column": 74
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 310,
"end": 363,
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 10,
"column": 73
}
},
"id": {
"type": "Identifier",
"start": 310,
"end": 314,
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 10,
"column": 24
}
},
"name": "item"
},
"init": {
"type": "CallExpression",
"start": 317,
"end": 363,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 73
}
},
"callee": {
"type": "MemberExpression",
"start": 317,
"end": 331,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 41
}
},
"object": {
"type": "MemberExpression",
"start": 317,
"end": 326,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 36
}
},
"object": {
"type": "ThisExpression",
"start": 317,
"end": 321,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"start": 322,
"end": 326,
"loc": {
"start": {
"line": 10,
"column": 32
},
"end": {
"line": 10,
"column": 36
}
},
"name": "pool"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 327,
"end": 331,
"loc": {
"start": {
"line": 10,
"column": 37
},
"end": {
"line": 10,
"column": 41
}
},
"name": "find"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 332,
"end": 362,
"loc": {
"start": {
"line": 10,
"column": 42
},
"end": {
"line": 10,
"column": 72
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 332,
"end": 335,
"loc": {
"start": {
"line": 10,
"column": 42
},
"end": {
"line": 10,
"column": 45
}
},
"name": "obj"
}
],
"body": {
"type": "BinaryExpression",
"start": 339,
"end": 362,
"loc": {
"start": {
"line": 10,
"column": 49
},
"end": {
"line": 10,
"column": 72
}
},
"left": {
"type": "MemberExpression",
"start": 339,
"end": 354,
"loc": {
"start": {
"line": 10,
"column": 49
},
"end": {
"line": 10,
"column": 64
}
},
"object": {
"type": "MemberExpression",
"start": 339,
"end": 351,
"loc": {
"start": {
"line": 10,
"column": 49
},
"end": {
"line": 10,
"column": 61
}
},
"object": {
"type": "Identifier",
"start": 339,
"end": 342,
"loc": {
"start": {
"line": 10,
"column": 49
},
"end": {
"line": 10,
"column": 52
}
},
"name": "obj"
},
"property": {
"type": "Identifier",
"start": 343,
"end": 351,
"loc": {
"start": {
"line": 10,
"column": 53
},
"end": {
"line": 10,
"column": 61
}
},
"name": "userData"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 352,
"end": 354,
"loc": {
"start": {
"line": 10,
"column": 62
},
"end": {
"line": 10,
"column": 64
}
},
"name": "id"
},
"computed": false
},
"operator": "===",
"right": {
"type": "Identifier",
"start": 359,
"end": 362,
"loc": {
"start": {
"line": 10,
"column": 69
},
"end": {
"line": 10,
"column": 72
}
},
"name": "ref"
}
}
}
]
}
}
],
"kind": "let"
},
{
"type": "IfStatement",
"start": 381,
"end": 719,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 18,
"column": 17
}
},
"test": {
"type": "Identifier",
"start": 385,
"end": 389,
"loc": {
"start": {