awv3
Version:
AWV client CAD framework
1,175 lines (1,174 loc) • 2.32 MB
JSON
{
"type": "Program",
"start": 0,
"end": 16324,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 370,
"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": 66,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 34,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 34,
"end": 41,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 14
}
},
"name": "Object3"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 47,
"end": 65,
"loc": {
"start": {
"line": 2,
"column": 20
},
"end": {
"line": 2,
"column": 38
}
},
"value": "../three/object3",
"rawValue": "../three/object3",
"raw": "'../three/object3'"
}
},
{
"type": "ImportDeclaration",
"start": 67,
"end": 111,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 44
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 76,
"end": 82,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 15
}
},
"imported": {
"type": "Identifier",
"start": 76,
"end": 82,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 15
}
},
"name": "Plugin"
},
"local": {
"type": "Identifier",
"start": 76,
"end": 82,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 15
}
},
"name": "Plugin"
}
},
{
"type": "ImportSpecifier",
"start": 84,
"end": 91,
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 84,
"end": 91,
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 24
}
},
"name": "Element"
},
"local": {
"type": "Identifier",
"start": 84,
"end": 91,
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 24
}
},
"name": "Element"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 99,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 32
},
"end": {
"line": 3,
"column": 43
}
},
"value": "../plugin",
"rawValue": "../plugin",
"raw": "'../plugin'"
},
"trailingComments": [
{
"type": "Block",
"value": "* Integration manages plugins. It is the M(odel) in M(odel)VM(Viewmodel). This class can be reflected by any\n MVM framework such as React, Angular, Vue and others. Both Integration and Plugins keep critical data from leaking\n by relying on internals under this.* and modeldata under this.data.",
"start": 113,
"end": 416,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 7,
"column": 73
}
},
"range": [
113,
416
]
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 417,
"end": 16323,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 369,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 432,
"end": 16323,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 369,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 438,
"end": 449,
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 32
}
},
"name": "Integration",
"leadingComments": null
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 450,
"end": 16323,
"loc": {
"start": {
"line": 8,
"column": 33
},
"end": {
"line": 369,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 1122,
"end": 5620,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 106,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 1122,
"end": 1133,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 15
}
},
"name": "constructor",
"leadingComments": null
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 1133,
"end": 5620,
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 106,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 1134,
"end": 1141,
"loc": {
"start": {
"line": 19,
"column": 16
},
"end": {
"line": 19,
"column": 23
}
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 1143,
"end": 5620,
"loc": {
"start": {
"line": 19,
"column": 25
},
"end": {
"line": 106,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 1154,
"end": 4567,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 77,
"column": 10
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1154,
"end": 4566,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 77,
"column": 9
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1154,
"end": 1166,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 1154,
"end": 1158,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 1159,
"end": 1166,
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 20
}
},
"name": "options"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 1169,
"end": 4566,
"loc": {
"start": {
"line": 21,
"column": 23
},
"end": {
"line": 77,
"column": 9
}
},
"properties": [
{
"type": "Property",
"start": 1183,
"end": 1550,
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 26,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1183,
"end": 1188,
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 17
}
},
"name": "hover"
},
"value": {
"type": "ArrowFunctionExpression",
"start": 1190,
"end": 1550,
"loc": {
"start": {
"line": 22,
"column": 19
},
"end": {
"line": 26,
"column": 13
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 1191,
"end": 1197,
"loc": {
"start": {
"line": 22,
"column": 20
},
"end": {
"line": 22,
"column": 26
}
},
"name": "object"
},
{
"type": "Identifier",
"start": 1199,
"end": 1207,
"loc": {
"start": {
"line": 22,
"column": 28
},
"end": {
"line": 22,
"column": 36
}
},
"name": "selected"
}
],
"body": {
"type": "BlockStatement",
"start": 1212,
"end": 1550,
"loc": {
"start": {
"line": 22,
"column": 41
},
"end": {
"line": 26,
"column": 13
}
},
"body": [
{
"type": "IfStatement",
"start": 1230,
"end": 1314,
"loc": {
"start": {
"line": 23,
"column": 16
},
"end": {
"line": 23,
"column": 100
}
},
"test": {
"type": "UnaryExpression",
"start": 1234,
"end": 1257,
"loc": {
"start": {
"line": 23,
"column": 20
},
"end": {
"line": 23,
"column": 43
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 1235,
"end": 1257,
"loc": {
"start": {
"line": 23,
"column": 21
},
"end": {
"line": 23,
"column": 43
}
},
"object": {
"type": "Identifier",
"start": 1235,
"end": 1241,
"loc": {
"start": {
"line": 23,
"column": 21
},
"end": {
"line": 23,
"column": 27
}
},
"name": "object"
},
"property": {
"type": "Identifier",
"start": 1242,
"end": 1257,
"loc": {
"start": {
"line": 23,
"column": 28
},
"end": {
"line": 23,
"column": 43
}
},
"name": "__originalColor"
},
"computed": false
}
},
"consequent": {
"type": "ExpressionStatement",
"start": 1259,
"end": 1314,
"loc": {
"start": {
"line": 23,
"column": 45
},
"end": {
"line": 23,
"column": 100
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1259,
"end": 1313,
"loc": {
"start": {
"line": 23,
"column": 45
},
"end": {
"line": 23,
"column": 99
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1259,
"end": 1281,
"loc": {
"start": {
"line": 23,
"column": 45
},
"end": {
"line": 23,
"column": 67
}
},
"object": {
"type": "Identifier",
"start": 1259,
"end": 1265,
"loc": {
"start": {
"line": 23,
"column": 45
},
"end": {
"line": 23,
"column": 51
}
},
"name": "object"
},
"property": {
"type": "Identifier",
"start": 1266,
"end": 1281,
"loc": {
"start": {
"line": 23,
"column": 52
},
"end": {
"line": 23,
"column": 67
}
},
"name": "__originalColor"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 1284,
"end": 1313,
"loc": {
"start": {
"line": 23,
"column": 70
},
"end": {
"line": 23,
"column": 99
}
},
"callee": {
"type": "MemberExpression",
"start": 1284,
"end": 1311,
"loc": {
"start": {
"line": 23,
"column": 70
},
"end": {
"line": 23,
"column": 97
}
},
"object": {
"type": "MemberExpression",
"start": 1284,
"end": 1305,
"loc": {
"start": {
"line": 23,
"column": 70
},
"end": {
"line": 23,
"column": 91
}
},
"object": {
"type": "MemberExpression",
"start": 1284,
"end": 1299,
"loc": {
"start": {
"line": 23,
"column": 70
},
"end": {
"line": 23,
"column": 85
}
},
"object": {
"type": "Identifier",
"start": 1284,
"end": 1290,
"loc": {
"start": {
"line": 23,
"column": 70
},
"end": {
"line": 23,
"column": 76
}
},
"name": "object"
},
"property": {
"type": "Identifier",
"start": 1291,
"end": 1299,
"loc": {
"start": {
"line": 23,
"column": 77
},
"end": {
"line": 23,
"column": 85
}
},
"name": "material"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1300,
"end": 1305,
"loc": {
"start": {
"line": 23,
"column": 86
},
"end": {
"line": 23,
"column": 91
}
},
"name": "color"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1306,
"end": 1311,
"loc": {
"start": {
"line": 23,
"column": 92
},
"end": {
"line": 23,
"column": 97
}
},
"name": "clone"
},
"computed": false
},
"arguments": []
}
}
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 1331,
"end": 1419,
"loc": {
"start": {
"line": 24,
"column": 16
},
"end": {
"line": 24,
"column": 104
}
},
"expression": {
"type": "LogicalExpression",
"start": 1331,
"end": 1418,
"loc": {
"start": {
"line": 24,
"column": 16
},
"end": {
"line": 24,
"column": 103
}
},
"left": {
"type": "UnaryExpression",
"start": 1331,
"end": 1340,
"loc": {
"start": {
"line": 24,
"column": 16
},
"end": {
"line": 24,
"column": 25
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 1332,
"end": 1340,
"loc": {
"start": {
"line": 24,
"column": 17
},
"end": {
"line": 24,
"column": 25
}
},
"name": "selected"
}
},
"operator": "&&",
"right": {
"type": "CallExpression",
"start": 1344,
"end": 1418,
"loc": {
"start": {
"line": 24,
"column": 29
},
"end": {
"line": 24,
"column": 103
}
},
"callee": {
"type": "MemberExpression",
"start": 1344,
"end": 1415,
"loc": {
"start": {
"line": 24,
"column": 29
},
"end": {
"line": 24,
"column": 100
}
},
"object": {
"type": "CallExpression",
"start": 1344,
"end": 1409,
"loc": {
"start": {
"line": 24,
"column": 29
},
"end": {
"line": 24,
"column": 94
}
},
"callee": {
"type": "MemberExpression",
"start": 1344,
"end": 1358,
"loc": {
"start": {
"line": 24,
"column": 29
},
"end": {
"line": 24,
"column": 43
}
},
"object": {
"type": "Identifier",
"start": 1344,
"end": 1350,
"loc": {
"start": {
"line": 24,
"column": 29
},
"end": {
"line": 24,
"column": 35
}
},
"name": "object"
},
"property": {
"type": "Identifier",
"start": 1351,
"end": 1358,
"loc": {
"start": {
"line": 24,
"column": 36
},
"end": {
"line": 24,
"column": 43
}
},
"name": "animate"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 1359,
"end": 1408,
"loc": {
"start": {
"line": 24,
"column": 44
},
"end": {
"line": 24,
"column": 93
}
},
"properties": [
{
"type": "Property",
"start": 1361,
"end": 1407,
"loc": {
"start": {
"line": 24,
"column": 46
},
"end": {
"line": 24,
"column": 92
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1361,
"end": 1369,
"loc": {
"start": {
"line": 24,
"column": 46
},
"end": {
"line": 24,
"column": 54
}
},
"name": "material"
},
"value": {
"type": "ObjectExpression",
"start": 1371,
"end": 1407,
"loc": {
"start": {
"line": 24,
"column": 56
},
"end": {
"line": 24,
"column": 92
}
},
"properties": [
{
"type": "Property",
"start": 1373,
"end": 1405,
"loc": {
"start": {
"line": 24,
"column": 58
},
"end": {
"line": 24,
"column": 90
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1373,
"end": 1378,
"loc": {
"start": {
"line": 24,
"column": 58
},
"end": {
"line": 24,
"column": 63
}
},