awv3
Version:
AWV client CAD framework
1,717 lines (1,716 loc) • 3.3 MB
JSON
{
"type": "Program",
"start": 0,
"end": 32317,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 788,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 50
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 8,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 22
}
},
"imported": {
"type": "Identifier",
"start": 8,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 22
}
},
"name": "ClassCadObject"
},
"local": {
"type": "Identifier",
"start": 8,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 22
}
},
"name": "ClassCadObject"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 29,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 29
},
"end": {
"line": 1,
"column": 49
}
},
"value": "sketcher/ccobjects",
"rawValue": "sketcher/ccobjects",
"raw": "'sketcher/ccobjects'"
}
},
{
"type": "ImportDeclaration",
"start": 51,
"end": 92,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 41
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 58,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 58,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 15
}
},
"name": "Sketcher"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 72,
"end": 91,
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 40
}
},
"value": "sketcher/sketcher",
"rawValue": "sketcher/sketcher",
"raw": "'sketcher/sketcher'"
}
},
{
"type": "ImportDeclaration",
"start": 93,
"end": 138,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 45
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 100,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 100,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 17
}
},
"name": "Constraint"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 116,
"end": 137,
"loc": {
"start": {
"line": 3,
"column": 23
},
"end": {
"line": 3,
"column": 44
}
},
"value": "sketcher/constraint",
"rawValue": "sketcher/constraint",
"raw": "'sketcher/constraint'"
}
},
{
"type": "ImportDeclaration",
"start": 139,
"end": 196,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 57
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 146,
"end": 165,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 26
}
},
"local": {
"type": "Identifier",
"start": 146,
"end": 165,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 26
}
},
"name": "ConstraintGenerator"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 171,
"end": 195,
"loc": {
"start": {
"line": 4,
"column": 32
},
"end": {
"line": 4,
"column": 56
}
},
"value": "sketcher/constraintgen",
"rawValue": "sketcher/constraintgen",
"raw": "'sketcher/constraintgen'"
}
},
{
"type": "ImportDeclaration",
"start": 197,
"end": 291,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 94
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 205,
"end": 220,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 23
}
},
"imported": {
"type": "Identifier",
"start": 205,
"end": 220,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 23
}
},
"name": "executePrepared"
},
"local": {
"type": "Identifier",
"start": 205,
"end": 220,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 23
}
},
"name": "executePrepared"
}
},
{
"type": "ImportSpecifier",
"start": 222,
"end": 234,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 37
}
},
"imported": {
"type": "Identifier",
"start": 222,
"end": 234,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 37
}
},
"name": "trackPromise"
},
"local": {
"type": "Identifier",
"start": 222,
"end": 234,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 37
}
},
"name": "trackPromise"
}
},
{
"type": "ImportSpecifier",
"start": 236,
"end": 243,
"loc": {
"start": {
"line": 5,
"column": 39
},
"end": {
"line": 5,
"column": 46
}
},
"imported": {
"type": "Identifier",
"start": 236,
"end": 243,
"loc": {
"start": {
"line": 5,
"column": 39
},
"end": {
"line": 5,
"column": 46
}
},
"name": "Interop"
},
"local": {
"type": "Identifier",
"start": 236,
"end": 243,
"loc": {
"start": {
"line": 5,
"column": 39
},
"end": {
"line": 5,
"column": 46
}
},
"name": "Interop"
}
},
{
"type": "ImportSpecifier",
"start": 245,
"end": 263,
"loc": {
"start": {
"line": 5,
"column": 48
},
"end": {
"line": 5,
"column": 66
}
},
"imported": {
"type": "Identifier",
"start": 245,
"end": 263,
"loc": {
"start": {
"line": 5,
"column": 48
},
"end": {
"line": 5,
"column": 66
}
},
"name": "getObjectStatement"
},
"local": {
"type": "Identifier",
"start": 245,
"end": 263,
"loc": {
"start": {
"line": 5,
"column": 48
},
"end": {
"line": 5,
"column": 66
}
},
"name": "getObjectStatement"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 270,
"end": 290,
"loc": {
"start": {
"line": 5,
"column": 73
},
"end": {
"line": 5,
"column": 93
}
},
"value": "sketcher/cchelpers",
"rawValue": "sketcher/cchelpers",
"raw": "'sketcher/cchelpers'"
}
},
{
"type": "ImportDeclaration",
"start": 292,
"end": 346,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 54
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 300,
"end": 305,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 300,
"end": 305,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"name": "Point"
},
"local": {
"type": "Identifier",
"start": 300,
"end": 305,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"name": "Point"
}
},
{
"type": "ImportSpecifier",
"start": 307,
"end": 311,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"imported": {
"type": "Identifier",
"start": 307,
"end": 311,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"name": "Line"
},
"local": {
"type": "Identifier",
"start": 307,
"end": 311,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"name": "Line"
}
},
{
"type": "ImportSpecifier",
"start": 313,
"end": 316,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 313,
"end": 316,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"name": "Arc"
},
"local": {
"type": "Identifier",
"start": 313,
"end": 316,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"name": "Arc"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 323,
"end": 345,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 53
}
},
"value": "sketcher/geomobjects",
"rawValue": "sketcher/geomobjects",
"raw": "'sketcher/geomobjects'"
}
},
{
"type": "ImportDeclaration",
"start": 347,
"end": 383,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 354,
"end": 361,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 354,
"end": 361,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 14
}
},
"name": "Object3"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 367,
"end": 382,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 35
}
},
"value": "three/object3",
"rawValue": "three/object3",
"raw": "'three/object3'"
}
},
{
"type": "ImportDeclaration",
"start": 384,
"end": 413,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 29
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 391,
"end": 395,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 391,
"end": 395,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 11
}
},
"name": "View"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 401,
"end": 412,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 28
}
},
"value": "core/view",
"rawValue": "core/view",
"raw": "'core/view'"
}
},
{
"type": "ImportDeclaration",
"start": 414,
"end": 440,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 421,
"end": 426,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 421,
"end": 426,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 12
}
},
"name": "THREE"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 432,
"end": 439,
"loc": {
"start": {
"line": 9,
"column": 18
},
"end": {
"line": 9,
"column": 25
}
},
"value": "three",
"rawValue": "three",
"raw": "'three'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 442,
"end": 32264,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 785,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 457,
"end": 32264,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 785,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 463,
"end": 469,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 27
}
},
"name": "Sketch"
},
"superClass": {
"type": "Identifier",
"start": 478,
"end": 492,
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 50
}
},
"name": "ClassCadObject"
},
"body": {
"type": "ClassBody",
"start": 493,
"end": 32264,
"loc": {
"start": {
"line": 11,
"column": 51
},
"end": {
"line": 785,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 499,
"end": 2601,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 54,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 499,
"end": 510,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 510,
"end": 2601,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 54,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 513,
"end": 2601,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 54,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 523,
"end": 531,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 523,
"end": 530,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 523,
"end": 528,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 13
}
}
},
"arguments": []
},
"trailingComments": [
{
"type": "CommentLine",
"value": " set of objects added with addToSketch",
"start": 540,
"end": 580,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 48
}
},
"range": [
540,
580
]
}
]
},
{
"type": "ExpressionStatement",
"start": 589,
"end": 624,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 43
}
},
"expression": {
"type": "AssignmentExpression",
"start": 589,
"end": 623,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 42
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 589,
"end": 607,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 589,
"end": 593,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 594,
"end": 607,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 26
}
},
"name": "sketchObjects"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 610,
"end": 623,
"loc": {
"start": {
"line": 15,
"column": 29
},
"end": {
"line": 15,
"column": 42
}
},
"callee": {
"type": "Identifier",
"start": 614,
"end": 621,
"loc": {
"start": {
"line": 15,
"column": 33
},
"end": {
"line": 15,
"column": 40
}
},
"name": "WeakSet"
},
"arguments": []
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " set of objects added with addToSketch",
"start": 540,
"end": 580,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 48
}
},
"range": [
540,
580
]
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": "Note: should not be accessed by anyone accept Sketcher",
"start": 633,
"end": 689,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 64
}
},
"range": [
633,
689
]
}
]
},
{
"type": "ExpressionStatement",
"start": 698,
"end": 805,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 115
}
},
"expression": {
"type": "AssignmentExpression",
"start": 698,
"end": 804,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 114
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 698,
"end": 722,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 32
}
},
"object": {
"type": "ThisExpression",
"start": 698,
"end": 702,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 703,
"end": 722,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 32
}
},
"name": "infiniteBoxMaterial"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 725,
"end": 804,
"loc": {
"start": {
"line": 17,
"column": 35
},
"end": {
"line": 17,
"column": 114
}
},
"callee": {
"type": "MemberExpression",
"start": 729,
"end": 752,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 62
}
},
"object": {
"type": "Identifier",
"start": 729,
"end": 734,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 44
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 735,
"end": 752,
"loc": {
"start": {
"line": 17,
"column": 45
},
"end": {
"line": 17,
"column": 62
}
},
"name": "MeshBasicMaterial"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 753,
"end": 803,
"loc": {
"start": {
"line": 17,
"column": 63
},
"end": {
"line": 17,
"column": 113
}
},
"properties": [
{
"type": "Property",
"start": 754,
"end": 769,
"loc": {
"start": {
"line": 17,
"column": 64
},
"end": {
"line": 17,
"column": 79
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 754,
"end": 759,
"loc": {
"start": {
"line": 17,
"column": 64
},
"end": {
"line": 17,
"column": 69
}
},
"name": "color"
},
"value": {
"type": "Literal",
"start": 761,
"end": 769,
"loc": {
"start": {
"line": 17,
"column": 71
},
"end": {
"line": 17,
"column": 79
}
},
"value": 4144959,
"rawValue": 4144959,
"raw": "0x3f3f3f"
},
"kind": "init"
},
{
"type": "Property",
"start": 771,
"end": 786,
"loc": {
"start": {
"line": 17,
"column": 81
},
"end": {
"line": 17,
"column": 96
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 771,
"end": 780,
"loc": {
"start": {
"line": 17,
"column": 81
},
"end": {
"line": 17,
"column": 90
}
},
"name": "wireframe"
},
"value": {
"type": "Literal",
"start": 782,
"end": 786,
"loc": {
"start": {
"line": 17,
"column": 92
},
"end": {
"line": 17,
"column": 96
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
},
{
"type": "Property",
"start": 788,
"end": 802,
"loc": {
"start": {
"line": 17,
"column": 98
},
"end": {
"line": 17,
"column": 112
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 788,
"end": 795,
"loc": {
"start": {
"line": 17,
"column": 98
},
"end": {
"line": 17,
"column": 105
}
},
"name": "visible"
},
"value": {
"type": "Literal",
"start": 797,
"end": 802,
"loc": {
"start": {
"line": 17,
"column": 107
},
"end": {
"line": 17,
"column": 112
}
},
"value": false,
"rawValue": false,
"raw": "false"
},
"kind": "init"
}
]
}
]
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": "Note: should not be accessed by anyone accept Sketcher",
"start": 633,
"end": 689,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 64
}
},
"range": [
633,
689
]
}
]
},
{
"type": "ExpressionStatement",
"start": 814,
"end": 1050,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 22,
"column": 15
}
},
"expression": {
"type": "AssignmentExpression",
"start": 814,
"end": 1049,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 22,
"column": 14
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 814,
"end": 835,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 814,
"end": 818,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 819,
"end": 835,
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 29
}
},
"name": "frameBoxMaterial"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 838,
"end": 1049,
"loc": {
"start": {
"line": 18,
"column": 32
},
"end": {
"line": 22,
"column": 14
}
},
"callee": {
"type": "MemberExpression",
"start": 842,
"end": 865,
"loc": {
"start": {
"line": 18,
"column": 36
},
"end": {
"line": 18,
"column": 59
}