awv3
Version:
AWV client CAD framework
1,492 lines • 547 kB
JSON
{
"type": "Program",
"start": 0,
"end": 6530,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 185,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 74,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 74
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 8,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 17
}
},
"imported": {
"type": "Identifier",
"start": 8,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 17
}
},
"name": "Statement"
},
"local": {
"type": "Identifier",
"start": 8,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 17
}
},
"name": "Statement"
}
},
{
"type": "ImportSpecifier",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 26
}
},
"imported": {
"type": "Identifier",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 26
}
},
"name": "parseTo"
},
"local": {
"type": "Identifier",
"start": 19,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 26
}
},
"name": "parseTo"
}
},
{
"type": "ImportSpecifier",
"start": 28,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 1,
"column": 43
}
},
"imported": {
"type": "Identifier",
"start": 28,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 1,
"column": 43
}
},
"name": "parseObjectTree"
},
"local": {
"type": "Identifier",
"start": 28,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 1,
"column": 43
}
},
"name": "parseObjectTree"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 50,
"end": 73,
"loc": {
"start": {
"line": 1,
"column": 50
},
"end": {
"line": 1,
"column": 73
}
},
"value": "../sketcher/cchelpers",
"rawValue": "../sketcher/cchelpers",
"raw": "'../sketcher/cchelpers'"
}
},
{
"type": "ImportDeclaration",
"start": 75,
"end": 101,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 82,
"end": 87,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 82,
"end": 87,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 12
}
},
"name": "THREE"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 93,
"end": 100,
"loc": {
"start": {
"line": 2,
"column": 18
},
"end": {
"line": 2,
"column": 25
}
},
"value": "three",
"rawValue": "three",
"raw": "'three'"
}
},
{
"type": "ImportDeclaration",
"start": 102,
"end": 141,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 109,
"end": 116,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 109,
"end": 116,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
}
},
"name": "Object3"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 122,
"end": 140,
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 38
}
},
"value": "../three/object3",
"rawValue": "../three/object3",
"raw": "'../three/object3'"
},
"trailingComments": [
{
"type": "Block",
"value": "\n * Base class for all objects having corresponding object on the server.\n * It is the default class for creating objects when parsing object tree.\n * To provide more specialized client class for corresponding server class use classMapping:\n * ClassCadObject.classMapping[\"MyServerClass\"] = MyClientClass;\n ",
"start": 143,
"end": 454,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 10,
"column": 3
}
},
"range": [
143,
454
]
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 455,
"end": 2958,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 78,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 462,
"end": 2958,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 78,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 468,
"end": 482,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 27
}
},
"name": "ClassCadObject",
"leadingComments": null
},
"superClass": {
"type": "Identifier",
"start": 491,
"end": 498,
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 43
}
},
"name": "Object3"
},
"body": {
"type": "ClassBody",
"start": 499,
"end": 2958,
"loc": {
"start": {
"line": 11,
"column": 44
},
"end": {
"line": 78,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 505,
"end": 587,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 15,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 505,
"end": 516,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 516,
"end": 587,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 15,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 519,
"end": 587,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 15,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 529,
"end": 537,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 529,
"end": 536,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 529,
"end": 534,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 546,
"end": 581,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 43
}
},
"expression": {
"type": "AssignmentExpression",
"start": 546,
"end": 580,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 42
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 546,
"end": 558,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 546,
"end": 550,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 551,
"end": 558,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 20
}
},
"name": "members"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 561,
"end": 580,
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 42
}
},
"callee": {
"type": "MemberExpression",
"start": 561,
"end": 574,
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 36
}
},
"object": {
"type": "Identifier",
"start": 561,
"end": 567,
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 29
}
},
"name": "Object"
},
"property": {
"type": "Identifier",
"start": 568,
"end": 574,
"loc": {
"start": {
"line": 14,
"column": 30
},
"end": {
"line": 14,
"column": 36
}
},
"name": "create"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 575,
"end": 579,
"loc": {
"start": {
"line": 14,
"column": 37
},
"end": {
"line": 14,
"column": 41
}
},
"value": null,
"rawValue": null,
"raw": "null"
}
]
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 593,
"end": 786,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 597,
"end": 605,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 16
}
},
"name": "fullName"
},
"static": false,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start": 605,
"end": 786,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 21,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 608,
"end": 786,
"loc": {
"start": {
"line": 17,
"column": 19
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 618,
"end": 642,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 32
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 622,
"end": 641,
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 31
}
},
"id": {
"type": "Identifier",
"start": 622,
"end": 627,
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 17
}
},
"name": "names"
},
"init": {
"type": "ArrayExpression",
"start": 630,
"end": 641,
"loc": {
"start": {
"line": 18,
"column": 20
},
"end": {
"line": 18,
"column": 31
}
},
"elements": [
{
"type": "MemberExpression",
"start": 631,
"end": 640,
"loc": {
"start": {
"line": 18,
"column": 21
},
"end": {
"line": 18,
"column": 30
}
},
"object": {
"type": "ThisExpression",
"start": 631,
"end": 635,
"loc": {
"start": {
"line": 18,
"column": 21
},
"end": {
"line": 18,
"column": 25
}
}
},
"property": {
"type": "Identifier",
"start": 636,
"end": 640,
"loc": {
"start": {
"line": 18,
"column": 26
},
"end": {
"line": 18,
"column": 30
}
},
"name": "name"
},
"computed": false
}
]
}
}
],
"kind": "var"
},
{
"type": "ExpressionStatement",
"start": 651,
"end": 738,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 95
}
},
"expression": {
"type": "CallExpression",
"start": 651,
"end": 737,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 94
}
},
"callee": {
"type": "MemberExpression",
"start": 651,
"end": 673,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 30
}
},
"object": {
"type": "ThisExpression",
"start": 651,
"end": 655,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 656,
"end": 673,
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 30
}
},
"name": "traverseAncestors"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 674,
"end": 736,
"loc": {
"start": {
"line": 19,
"column": 31
},
"end": {
"line": 19,
"column": 93
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 674,
"end": 677,
"loc": {
"start": {
"line": 19,
"column": 31
},
"end": {
"line": 19,
"column": 34
}
},
"name": "anc"
}
],
"body": {
"type": "LogicalExpression",
"start": 681,
"end": 736,
"loc": {
"start": {
"line": 19,
"column": 38
},
"end": {
"line": 19,
"column": 93
}
},
"left": {
"type": "BinaryExpression",
"start": 682,
"end": 711,
"loc": {
"start": {
"line": 19,
"column": 39
},
"end": {
"line": 19,
"column": 68
}
},
"left": {
"type": "Identifier",
"start": 682,
"end": 685,
"loc": {
"start": {
"line": 19,
"column": 39
},
"end": {
"line": 19,
"column": 42
}
},
"name": "anc"
},
"operator": "instanceof",
"right": {
"type": "Identifier",
"start": 697,
"end": 711,
"loc": {
"start": {
"line": 19,
"column": 54
},
"end": {
"line": 19,
"column": 68
}
},
"name": "ClassCadObject"
},
"parenthesizedExpression": true
},
"operator": "&&",
"right": {
"type": "CallExpression",
"start": 716,
"end": 736,
"loc": {
"start": {
"line": 19,
"column": 73
},
"end": {
"line": 19,
"column": 93
}
},
"callee": {
"type": "MemberExpression",
"start": 716,
"end": 726,
"loc": {
"start": {
"line": 19,
"column": 73
},
"end": {
"line": 19,
"column": 83
}
},
"object": {
"type": "Identifier",
"start": 716,
"end": 721,
"loc": {
"start": {
"line": 19,
"column": 73
},
"end": {
"line": 19,
"column": 78
}
},
"name": "names"
},
"property": {
"type": "Identifier",
"start": 722,
"end": 726,
"loc": {
"start": {
"line": 19,
"column": 79
},
"end": {
"line": 19,
"column": 83
}
},
"name": "push"
},
"computed": false
},
"arguments": [
{
"type": "MemberExpression",
"start": 727,
"end": 735,
"loc": {
"start": {
"line": 19,
"column": 84
},
"end": {
"line": 19,
"column": 92
}
},
"object": {
"type": "Identifier",
"start": 727,
"end": 730,
"loc": {
"start": {
"line": 19,
"column": 84
},
"end": {
"line": 19,
"column": 87
}
},
"name": "anc"
},
"property": {
"type": "Identifier",
"start": 731,
"end": 735,
"loc": {
"start": {
"line": 19,
"column": 88
},
"end": {
"line": 19,
"column": 92
}
},
"name": "name"
},
"computed": false
}
]
}
}
}
]
}
},
{
"type": "ReturnStatement",
"start": 747,
"end": 780,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 41
}
},
"argument": {
"type": "CallExpression",
"start": 754,
"end": 779,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 40
}
},
"callee": {
"type": "MemberExpression",
"start": 754,
"end": 774,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 35
}
},
"object": {
"type": "CallExpression",
"start": 754,
"end": 769,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 30
}
},
"callee": {
"type": "MemberExpression",
"start": 754,
"end": 767,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 754,
"end": 759,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 20
}
},
"name": "names"
},
"property": {
"type": "Identifier",
"start": 760,
"end": 767,
"loc": {
"start": {
"line": 20,
"column": 21
},
"end": {
"line": 20,
"column": 28
}
},
"name": "reverse"
},
"computed": false
},
"arguments": []
},
"property": {
"type": "Identifier",
"start": 770,
"end": 774,
"loc": {
"start": {
"line": 20,
"column": 31
},
"end": {
"line": 20,
"column": 35
}
},
"name": "join"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 775,
"end": 778,
"loc": {
"start": {
"line": 20,
"column": 36
},
"end": {
"line": 20,
"column": 39
}
},
"value": ".",
"rawValue": ".",
"raw": "'.'"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 792,
"end": 881,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 25,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 792,
"end": 808,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 20
}
},
"name": "updateFromServer"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 808,
"end": 881,
"loc": {
"start": {
"line": 23,
"column": 20
},
"end": {
"line": 25,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 811,
"end": 881,
"loc": {
"start": {
"line": 23,
"column": 23
},
"end": {
"line": 25,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 821,
"end": 875,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 62
}
},
"argument": {
"type": "CallExpression",
"start": 828,
"end": 874,
"loc": {
"start": {
"line": 24,
"column": 15
},
"end": {
"line": 24,
"column": 61
}
},
"callee": {
"type": "MemberExpression",
"start": 828,
"end": 859,
"loc": {
"start": {
"line": 24,
"column": 15
},
"end": {
"line": 24,
"column": 46
}
},
"object": {
"type": "CallExpression",
"start": 828,
"end": 854,
"loc": {
"start": {
"line": 24,
"column": 15
},
"end": {
"line": 24,
"column": 41
}
},
"callee": {
"type": "MemberExpression",
"start": 828,
"end": 848,
"loc": {
"start": {
"line": 24,
"column": 15
},
"end": {
"line": 24,
"column": 35
}
},
"object": {
"type": "Identifier",
"start": 828,
"end": 837,
"loc": {
"start": {
"line": 24,
"column": 15
},
"end": {
"line": 24,
"column": 24
}
},
"name": "Statement"
},
"property": {
"type": "Identifier",
"start": 838,
"end": 848,
"loc": {
"start": {
"line": 24,
"column": 25
},
"end": {
"line": 24,
"column":