awv3
Version:
AWV client CAD framework
1,141 lines (1,140 loc) • 87.8 kB
JSON
{
"type": "Program",
"start": 0,
"end": 774,
"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": 28,
"end": 64,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 35,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 35,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"name": "Parser"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 47,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 35
}
},
"value": "../core/parser",
"rawValue": "../core/parser",
"raw": "'../core/parser'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 68,
"end": 772,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 22,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 83,
"end": 772,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 22,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 89,
"end": 104,
"loc": {
"start": {
"line": 4,
"column": 21
},
"end": {
"line": 4,
"column": 36
}
},
"name": "AssemblyFactory"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 105,
"end": 772,
"loc": {
"start": {
"line": 4,
"column": 37
},
"end": {
"line": 22,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 112,
"end": 769,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 112,
"end": 123,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 123,
"end": 769,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 21,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 124,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 20
}
},
"name": "pool"
}
],
"body": {
"type": "BlockStatement",
"start": 130,
"end": 769,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 141,
"end": 158,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 141,
"end": 157,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 141,
"end": 150,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 141,
"end": 145,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 146,
"end": 150,
"loc": {
"start": {
"line": 6,
"column": 13
},
"end": {
"line": 6,
"column": 17
}
},
"name": "pool"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 153,
"end": 157,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 24
}
},
"name": "pool"
}
}
},
{
"type": "ReturnStatement",
"start": 168,
"end": 762,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 20,
"column": 9
}
},
"argument": {
"type": "ArrowFunctionExpression",
"start": 175,
"end": 762,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 20,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 175,
"end": 182,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 22
}
},
"name": "attribs"
}
],
"body": {
"type": "BlockStatement",
"start": 186,
"end": 762,
"loc": {
"start": {
"line": 7,
"column": 26
},
"end": {
"line": 20,
"column": 9
}
},
"body": [
{
"type": "IfStatement",
"start": 201,
"end": 751,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 19,
"column": 13
}
},
"test": {
"type": "BinaryExpression",
"start": 205,
"end": 241,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 52
}
},
"left": {
"type": "MemberExpression",
"start": 205,
"end": 217,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 205,
"end": 212,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 23
}
},
"name": "attribs"
},
"property": {
"type": "Identifier",
"start": 213,
"end": 217,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 28
}
},
"name": "type"
},
"computed": false
},
"operator": "===",
"right": {
"type": "MemberExpression",
"start": 222,
"end": 241,
"loc": {
"start": {
"line": 8,
"column": 33
},
"end": {
"line": 8,
"column": 52
}
},
"object": {
"type": "MemberExpression",
"start": 222,
"end": 236,
"loc": {
"start": {
"line": 8,
"column": 33
},
"end": {
"line": 8,
"column": 47
}
},
"object": {
"type": "Identifier",
"start": 222,
"end": 228,
"loc": {
"start": {
"line": 8,
"column": 33
},
"end": {
"line": 8,
"column": 39
}
},
"name": "Parser"
},
"property": {
"type": "Identifier",
"start": 229,
"end": 236,
"loc": {
"start": {
"line": 8,
"column": 40
},
"end": {
"line": 8,
"column": 47
}
},
"name": "Factory"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 237,
"end": 241,
"loc": {
"start": {
"line": 8,
"column": 48
},
"end": {
"line": 8,
"column": 52
}
},
"name": "Link"
},
"computed": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 243,
"end": 751,
"loc": {
"start": {
"line": 8,
"column": 54
},
"end": {
"line": 19,
"column": 13
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 262,
"end": 297,
"loc": {
"start": {
"line": 9,
"column": 16
},
"end": {
"line": 9,
"column": 51
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 266,
"end": 296,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 50
}
},
"id": {
"type": "ObjectPattern",
"start": 266,
"end": 281,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 35
}
},
"properties": [
{
"type": "Property",
"start": 268,
"end": 271,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 25
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 268,
"end": 271,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 25
}
},
"name": "ref"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 268,
"end": 271,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 25
}
},
"name": "ref"
}
},
{
"type": "Property",
"start": 273,
"end": 279,
"loc": {
"start": {
"line": 9,
"column": 27
},
"end": {
"line": 9,
"column": 33
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 273,
"end": 279,
"loc": {
"start": {
"line": 9,
"column": 27
},
"end": {
"line": 9,
"column": 33
}
},
"name": "matrix"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 273,
"end": 279,
"loc": {
"start": {
"line": 9,
"column": 27
},
"end": {
"line": 9,
"column": 33
}
},
"name": "matrix"
}
}
]
},
"init": {
"type": "MemberExpression",
"start": 284,
"end": 296,
"loc": {
"start": {
"line": 9,
"column": 38
},
"end": {
"line": 9,
"column": 50
}
},
"object": {
"type": "Identifier",
"start": 284,
"end": 291,
"loc": {
"start": {
"line": 9,
"column": 38
},
"end": {
"line": 9,
"column": 45
}
},
"name": "attribs"
},
"property": {
"type": "Identifier",
"start": 292,
"end": 296,
"loc": {
"start": {
"line": 9,
"column": 46
},
"end": {
"line": 9,
"column": 50
}
},
"name": "data"
},
"computed": false
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 315,
"end": 373,
"loc": {
"start": {
"line": 10,
"column": 16
},
"end": {
"line": 10,
"column": 74
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 319,
"end": 372,
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 10,
"column": 73
}
},
"id": {
"type": "Identifier",
"start": 319,
"end": 323,
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 10,
"column": 24
}
},
"name": "item"
},
"init": {
"type": "CallExpression",
"start": 326,
"end": 372,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 73
}
},
"callee": {
"type": "MemberExpression",
"start": 326,
"end": 340,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 41
}
},
"object": {
"type": "MemberExpression",
"start": 326,
"end": 335,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 36
}
},
"object": {
"type": "ThisExpression",
"start": 326,
"end": 330,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"start": 331,
"end": 335,
"loc": {
"start": {
"line": 10,
"column": 32
},
"end": {
"line": 10,
"column": 36
}
},
"name": "pool"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 336,
"end": 340,
"loc": {
"start": {
"line": 10,
"column": 37
},
"end": {
"line": 10,
"column": 41
}
},
"name": "find"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 341,
"end": 371,
"loc": {
"start": {
"line": 10,
"column": 42
},
"end": {
"line": 10,
"column": 72
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 341,
"end": 344,
"loc": {
"start": {
"line": 10,
"column": 42
},
"end": {
"line": 10,
"column": 45
}
},
"name": "obj"
}
],
"body": {
"type": "BinaryExpression",
"start": 348,
"end": 371,
"loc": {
"start": {
"line": 10,
"column": 49
},
"end": {
"line": 10,
"column": 72
}
},
"left": {
"type": "MemberExpression",
"start": 348,
"end": 363,
"loc": {
"start": {
"line": 10,
"column": 49
},
"end": {
"line": 10,
"column": 64
}
},
"object": {
"type": "MemberExpression",
"start": 348,
"end": 360,
"loc": {
"start": {
"line": 10,
"column": 49
},
"end": {
"line": 10,
"column": 61
}
},
"object": {
"type": "Identifier",
"start": 348,
"end": 351,
"loc": {
"start": {
"line": 10,
"column": 49
},
"end": {
"line": 10,
"column": 52
}
},
"name": "obj"
},
"property": {
"type": "Identifier",
"start": 352,
"end": 360,
"loc": {
"start": {
"line": 10,
"column": 53
},
"end": {
"line": 10,
"column": 61
}
},
"name": "userData"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 361,
"end": 363,
"loc": {
"start": {
"line": 10,
"column": 62
},
"end": {
"line": 10,
"column": 64
}
},
"name": "id"
},
"computed": false
},
"operator": "===",
"right": {
"type": "Identifier",
"start": 368,
"end": 371,
"loc": {
"start": {
"line": 10,
"column": 69
},
"end": {
"line": 10,
"column": 72
}
},
"name": "ref"
}
}
}
]
}
}
],
"kind": "let"
},
{
"type": "IfStatement",
"start": 391,
"end": 736,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 18,
"column": 17
}
},
"test": {
"type": "Identifier",
"start": 395,
"end": 399,
"loc": {
"start": {