awv3
Version:
AWV client CAD framework
1,693 lines (1,692 loc) • 1.9 MB
JSON
{
"type": "Program",
"start": 0,
"end": 17492,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 549,
"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": 68,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 40
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 35,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 35,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 15
}
},
"name": "Defaults"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 49,
"end": 67,
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 39
}
},
"value": "../core/defaults",
"rawValue": "../core/defaults",
"raw": "'../core/defaults'"
}
},
{
"type": "ImportDeclaration",
"start": 70,
"end": 106,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 77,
"end": 83,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 77,
"end": 83,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
}
},
"name": "Events"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 89,
"end": 105,
"loc": {
"start": {
"line": 3,
"column": 19
},
"end": {
"line": 3,
"column": 35
}
},
"value": "../core/events",
"rawValue": "../core/events",
"raw": "'../core/events'"
}
},
{
"type": "ImportDeclaration",
"start": 108,
"end": 147,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 115,
"end": 120,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 115,
"end": 120,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 12
}
},
"name": "Tween"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 126,
"end": 146,
"loc": {
"start": {
"line": 4,
"column": 18
},
"end": {
"line": 4,
"column": 38
}
},
"value": "../animation/tween",
"rawValue": "../animation/tween",
"raw": "'../animation/tween'"
}
},
{
"type": "ImportDeclaration",
"start": 149,
"end": 192,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 43
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 156,
"end": 165,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 156,
"end": 165,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 16
}
},
"name": "Raycaster"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 171,
"end": 191,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 5,
"column": 42
}
},
"value": "../three/raycaster",
"rawValue": "../three/raycaster",
"raw": "'../three/raycaster'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 196,
"end": 412,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 13,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 211,
"end": 412,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 13,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 217,
"end": 224,
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 28
}
},
"name": "Object3"
},
"superClass": {
"type": "MemberExpression",
"start": 233,
"end": 247,
"loc": {
"start": {
"line": 7,
"column": 37
},
"end": {
"line": 7,
"column": 51
}
},
"object": {
"type": "Identifier",
"start": 233,
"end": 238,
"loc": {
"start": {
"line": 7,
"column": 37
},
"end": {
"line": 7,
"column": 42
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 239,
"end": 247,
"loc": {
"start": {
"line": 7,
"column": 43
},
"end": {
"line": 7,
"column": 51
}
},
"name": "Object3D"
},
"computed": false
},
"body": {
"type": "ClassBody",
"start": 248,
"end": 412,
"loc": {
"start": {
"line": 7,
"column": 52
},
"end": {
"line": 13,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 252,
"end": 409,
"loc": {
"start": {
"line": 8,
"column": 1
},
"end": {
"line": 12,
"column": 2
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 252,
"end": 263,
"loc": {
"start": {
"line": 8,
"column": 1
},
"end": {
"line": 8,
"column": 12
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 263,
"end": 409,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 12,
"column": 2
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 264,
"end": 283,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 32
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 264,
"end": 271,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 20
}
},
"name": "objects"
},
"right": {
"type": "Identifier",
"start": 274,
"end": 283,
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 32
}
},
"name": "undefined"
}
},
{
"type": "AssignmentPattern",
"start": 285,
"end": 304,
"loc": {
"start": {
"line": 8,
"column": 34
},
"end": {
"line": 8,
"column": 53
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 285,
"end": 292,
"loc": {
"start": {
"line": 8,
"column": 34
},
"end": {
"line": 8,
"column": 41
}
},
"name": "options"
},
"right": {
"type": "Identifier",
"start": 295,
"end": 304,
"loc": {
"start": {
"line": 8,
"column": 44
},
"end": {
"line": 8,
"column": 53
}
},
"name": "undefined"
}
}
],
"body": {
"type": "BlockStatement",
"start": 306,
"end": 409,
"loc": {
"start": {
"line": 8,
"column": 55
},
"end": {
"line": 12,
"column": 2
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 311,
"end": 319,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 10
}
},
"expression": {
"type": "CallExpression",
"start": 311,
"end": 318,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 9
}
},
"callee": {
"type": "Super",
"start": 311,
"end": 316,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 7
}
}
},
"arguments": []
}
},
{
"type": "IfStatement",
"start": 329,
"end": 368,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 47
}
},
"test": {
"type": "UnaryExpression",
"start": 333,
"end": 342,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 21
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "UnaryExpression",
"start": 334,
"end": 342,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 21
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 335,
"end": 342,
"loc": {
"start": {
"line": 10,
"column": 14
},
"end": {
"line": 10,
"column": 21
}
},
"name": "options"
}
}
},
"consequent": {
"type": "ExpressionStatement",
"start": 344,
"end": 368,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 47
}
},
"expression": {
"type": "CallExpression",
"start": 344,
"end": 367,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 46
}
},
"callee": {
"type": "MemberExpression",
"start": 344,
"end": 358,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 37
}
},
"object": {
"type": "ThisExpression",
"start": 344,
"end": 348,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"start": 349,
"end": 358,
"loc": {
"start": {
"line": 10,
"column": 28
},
"end": {
"line": 10,
"column": 37
}
},
"name": "setValues"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 359,
"end": 366,
"loc": {
"start": {
"line": 10,
"column": 38
},
"end": {
"line": 10,
"column": 45
}
},
"name": "options"
}
]
}
},
"alternate": null
},
{
"type": "IfStatement",
"start": 372,
"end": 405,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 35
}
},
"test": {
"type": "UnaryExpression",
"start": 376,
"end": 385,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 15
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "UnaryExpression",
"start": 377,
"end": 385,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 15
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 378,
"end": 385,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 15
}
},
"name": "objects"
}
}
},
"consequent": {
"type": "ExpressionStatement",
"start": 387,
"end": 405,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 35
}
},
"expression": {
"type": "CallExpression",
"start": 387,
"end": 404,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 34
}
},
"callee": {
"type": "MemberExpression",
"start": 387,
"end": 395,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 25
}
},
"object": {
"type": "ThisExpression",
"start": 387,
"end": 391,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"start": 392,
"end": 395,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 25
}
},
"name": "add"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 396,
"end": 403,
"loc": {
"start": {
"line": 11,
"column": 26
},
"end": {
"line": 11,
"column": 33
}
},
"name": "objects"
}
]
}
},
"alternate": null
}
]
}
}
}
]
},
"leadingComments": [],
"trailingComments": []
}
},
{
"type": "ExpressionStatement",
"start": 416,
"end": 926,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 35,
"column": 1
}
},
"expression": {
"type": "AssignmentExpression",
"start": 416,
"end": 926,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 35,
"column": 1
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 416,
"end": 437,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 15,
"column": 21
}
},
"object": {
"type": "MemberExpression",
"start": 416,
"end": 430,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 15,
"column": 14
}
},
"object": {
"type": "Identifier",
"start": 416,
"end": 421,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 15,
"column": 5
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 422,
"end": 430,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 15,
"column": 14
}
},
"name": "Object3D"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 431,
"end": 437,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 21
}
},
"name": "Events"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 440,
"end": 926,
"loc": {
"start": {
"line": 15,
"column": 24
},
"end": {
"line": 35,
"column": 1
}
},
"properties": [
{
"type": "Property",
"start": 447,
"end": 699,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 25,
"column": 5
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 447,
"end": 456,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 13
}
},
"name": "Lifecycle"
},
"value": {
"type": "ObjectExpression",
"start": 458,
"end": 699,
"loc": {
"start": {
"line": 16,
"column": 15
},
"end": {
"line": 25,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 466,
"end": 482,
"loc": {
"start": {
"line": 17,
"column": 5
},
"end": {
"line": 17,
"column": 21
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 466,
"end": 472,
"loc": {
"start": {
"line": 17,
"column": 5
},
"end": {
"line": 17,
"column": 11
}
},
"name": "Loaded"
},
"value": {
"type": "Literal",
"start": 474,
"end": 482,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 21
}
},
"value": "Loaded",
"rawValue": "Loaded",
"raw": "'Loaded'"
},
"kind": "init"
},
{
"type": "Property",
"start": 490,
"end": 504,
"loc": {
"start": {
"line": 18,
"column": 5
},
"end": {
"line": 18,
"column": 19
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 490,
"end": 495,
"loc": {
"start": {
"line": 18,
"column": 5
},
"end": {
"line": 18,
"column": 10
}
},
"name": "Added"
},
"value": {
"type": "Literal",
"start": 497,
"end": 504,
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 19
}
},
"value": "Added",
"rawValue": "Added",
"raw": "'Added'"
},
"kind": "init"
},
{
"type": "Property",
"start": 515,
"end": 537,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 30
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 515,
"end": 524,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 17
}
},
"name": "ViewFound"
},
"value": {
"type": "Literal",
"start": 526,
"end": 537,
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 19,
"column": 30
}
},
"value": "ViewFound",
"rawValue": "ViewFound",
"raw": "'ViewFound'"
},
"kind": "init"
},
{
"type": "Property",
"start": 545,
"end": 569,
"loc": {
"start": {
"line": 20,
"column": 5
},
"end": {
"line": 20,
"column": 29
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 545,
"end": 555,
"loc": {
"start": {
"line": 20,
"column": 5
},
"end": {
"line": 20,
"column": 15
}
},
"name": "ChildAdded"
},
"value": {
"type": "Literal",
"start": 557,
"end": 569,
"loc": {
"start": {
"line": 20,
"column": 17
},
"end": {
"line": 20,
"column": 29
}
},
"value": "ChildAdded",
"rawValue": "ChildAdded",
"raw": "'ChildAdded'"
},
"kind": "init"
},
{
"type": "Property",
"start": 577,
"end": 595,
"loc": {
"start": {
"line": 21,
"column": 5
},
"end": {
"line": 21,
"column": 23
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 577,
"end": 584,
"loc": {
"start": {
"line": 21,
"column": 5
},
"end": {
"line": 21,
"column": 12
}
},
"name": "Removed"
},
"value": {
"type": "Literal",
"start": 586,
"end": 595,
"loc": {
"start": {
"line": 21,
"column": 14
},
"end": {
"line": 21,
"column": 23
}
},
"value": "Removed",
"rawValue": "Removed",
"raw": "'Removed'"
},
"kind": "init"
},
{
"type": "Property",
"start": 603,
"end": 631,
"loc": {
"start": {
"line": 22,
"column": 5
},
"end": {
"line": 22,
"column": 33
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 603,
"end": 615,
"loc": {
"start": {
"line": 22,
"column": 5
},
"end": {
"line": 22,
"column": 17
}
},
"name": "ChildRemoved"
},
"value": {
"type": "Literal",
"start": 617,
"end": 631,
"loc": {
"start": {
"line": 22,
"column": 19
},
"end": {
"line": 22,
"column": 33
}
},
"value": "ChildRemoved",
"rawValue": "ChildRemoved",
"raw": "'ChildRemoved'"
},
"kind": "init"
},
{
"type": "Property",
"start": 639,
"end": 661,
"loc": {
"start": {
"line": 23,
"column": 5
},
"end": {
"line": 23,
"column": 27
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 639,
"end": 648,
"loc": {
"start": {
"line": 23,
"column": 5
},
"end": {
"line": 23,
"column": 14
}
},
"name": "Destroyed"
},
"value": {
"type": "Literal",
"start": 650,
"end": 661,
"loc": {
"start": {
"line": 23,
"column": 16
},
"end": {
"line": 23,
"column": 27
}
},
"value": "Destroyed",
"rawValue": "Destroyed",
"raw": "'Destroyed'"
},
"kind": "init"
},
{
"type": "Property",
"start": 672,
"end": 692,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 28
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 672,
"end": 680,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 16
}
},
"name": "Rendered"
},
"value": {
"type": "Literal",
"start": 682,
"end": 692,
"loc": {
"start": {
"line": 24,
"column": 18
},
"end": {
"line": 24,
"column": 28
}
},
"value": "Rendered",
"rawValue": "Rendered",
"raw": "'Rendered'"
},
"kind": "init"
}
]
},
"kind": "init"
},
{
"type": "Property",
"start": 706,
"end": 923,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 34,
"column": 5
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 706,
"end": 717,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 15
}
},
"name": "Interaction"
},
"value": {
"type": "ObjectExpression",
"start": 719,
"end": 923,
"loc": {
"start": {
"line": 26,
"column": 17
},
"end": {
"line": 34,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 730,
"end": 748,
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 26
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 730,
"end": 737,
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 15
}
},
"name": "Clicked"
},
"value": {
"type": "Literal",
"start": 739,
"end": 748,
"loc": {
"start": {
"line": 27,
"column": 17
},
"end": {
"line": 27,