awv3
Version:
AWV client CAD framework
1,693 lines (1,692 loc) • 1.84 MB
JSON
{
"type": "Program",
"start": 0,
"end": 16379,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 531,
"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": 67,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 40
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 34,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 34,
"end": 42,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 15
}
},
"name": "Defaults"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 48,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 39
}
},
"value": "../core/defaults",
"rawValue": "../core/defaults",
"raw": "'../core/defaults'"
}
},
{
"type": "ImportDeclaration",
"start": 68,
"end": 104,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 75,
"end": 81,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 75,
"end": 81,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
}
},
"name": "Events"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 87,
"end": 103,
"loc": {
"start": {
"line": 3,
"column": 19
},
"end": {
"line": 3,
"column": 35
}
},
"value": "../core/events",
"rawValue": "../core/events",
"raw": "'../core/events'"
}
},
{
"type": "ImportDeclaration",
"start": 105,
"end": 144,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 112,
"end": 117,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 112,
"end": 117,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 12
}
},
"name": "Tween"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 123,
"end": 143,
"loc": {
"start": {
"line": 4,
"column": 18
},
"end": {
"line": 4,
"column": 38
}
},
"value": "../animation/tween",
"rawValue": "../animation/tween",
"raw": "'../animation/tween'"
}
},
{
"type": "ImportDeclaration",
"start": 145,
"end": 188,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 43
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 152,
"end": 161,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 152,
"end": 161,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 16
}
},
"name": "Raycaster"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 167,
"end": 187,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 5,
"column": 42
}
},
"value": "../three/raycaster",
"rawValue": "../three/raycaster",
"raw": "'../three/raycaster'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 190,
"end": 400,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 13,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 205,
"end": 400,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 13,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 211,
"end": 218,
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 28
}
},
"name": "Object3"
},
"superClass": {
"type": "MemberExpression",
"start": 227,
"end": 241,
"loc": {
"start": {
"line": 7,
"column": 37
},
"end": {
"line": 7,
"column": 51
}
},
"object": {
"type": "Identifier",
"start": 227,
"end": 232,
"loc": {
"start": {
"line": 7,
"column": 37
},
"end": {
"line": 7,
"column": 42
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 233,
"end": 241,
"loc": {
"start": {
"line": 7,
"column": 43
},
"end": {
"line": 7,
"column": 51
}
},
"name": "Object3D"
},
"computed": false
},
"body": {
"type": "ClassBody",
"start": 242,
"end": 400,
"loc": {
"start": {
"line": 7,
"column": 52
},
"end": {
"line": 13,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 245,
"end": 398,
"loc": {
"start": {
"line": 8,
"column": 1
},
"end": {
"line": 12,
"column": 2
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 245,
"end": 256,
"loc": {
"start": {
"line": 8,
"column": 1
},
"end": {
"line": 8,
"column": 12
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 256,
"end": 398,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 12,
"column": 2
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 257,
"end": 276,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 32
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 257,
"end": 264,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 20
}
},
"name": "objects"
},
"right": {
"type": "Identifier",
"start": 267,
"end": 276,
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 32
}
},
"name": "undefined"
}
},
{
"type": "AssignmentPattern",
"start": 278,
"end": 297,
"loc": {
"start": {
"line": 8,
"column": 34
},
"end": {
"line": 8,
"column": 53
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 278,
"end": 285,
"loc": {
"start": {
"line": 8,
"column": 34
},
"end": {
"line": 8,
"column": 41
}
},
"name": "options"
},
"right": {
"type": "Identifier",
"start": 288,
"end": 297,
"loc": {
"start": {
"line": 8,
"column": 44
},
"end": {
"line": 8,
"column": 53
}
},
"name": "undefined"
}
}
],
"body": {
"type": "BlockStatement",
"start": 299,
"end": 398,
"loc": {
"start": {
"line": 8,
"column": 55
},
"end": {
"line": 12,
"column": 2
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 303,
"end": 311,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 10
}
},
"expression": {
"type": "CallExpression",
"start": 303,
"end": 310,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 9
}
},
"callee": {
"type": "Super",
"start": 303,
"end": 308,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 7
}
}
},
"arguments": []
}
},
{
"type": "IfStatement",
"start": 320,
"end": 359,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 47
}
},
"test": {
"type": "UnaryExpression",
"start": 324,
"end": 333,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 21
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "UnaryExpression",
"start": 325,
"end": 333,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 21
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 326,
"end": 333,
"loc": {
"start": {
"line": 10,
"column": 14
},
"end": {
"line": 10,
"column": 21
}
},
"name": "options"
}
}
},
"consequent": {
"type": "ExpressionStatement",
"start": 335,
"end": 359,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 47
}
},
"expression": {
"type": "CallExpression",
"start": 335,
"end": 358,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 46
}
},
"callee": {
"type": "MemberExpression",
"start": 335,
"end": 349,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 37
}
},
"object": {
"type": "ThisExpression",
"start": 335,
"end": 339,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"start": 340,
"end": 349,
"loc": {
"start": {
"line": 10,
"column": 28
},
"end": {
"line": 10,
"column": 37
}
},
"name": "setValues"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 350,
"end": 357,
"loc": {
"start": {
"line": 10,
"column": 38
},
"end": {
"line": 10,
"column": 45
}
},
"name": "options"
}
]
}
},
"alternate": null
},
{
"type": "IfStatement",
"start": 362,
"end": 395,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 35
}
},
"test": {
"type": "UnaryExpression",
"start": 366,
"end": 375,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 15
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "UnaryExpression",
"start": 367,
"end": 375,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 15
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 368,
"end": 375,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 15
}
},
"name": "objects"
}
}
},
"consequent": {
"type": "ExpressionStatement",
"start": 377,
"end": 395,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 35
}
},
"expression": {
"type": "CallExpression",
"start": 377,
"end": 394,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 34
}
},
"callee": {
"type": "MemberExpression",
"start": 377,
"end": 385,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 25
}
},
"object": {
"type": "ThisExpression",
"start": 377,
"end": 381,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"start": 382,
"end": 385,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 25
}
},
"name": "add"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 386,
"end": 393,
"loc": {
"start": {
"line": 11,
"column": 26
},
"end": {
"line": 11,
"column": 33
}
},
"name": "objects"
}
]
}
},
"alternate": null
}
]
}
}
}
]
},
"leadingComments": [],
"trailingComments": []
}
},
{
"type": "ExpressionStatement",
"start": 402,
"end": 892,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 35,
"column": 1
}
},
"expression": {
"type": "AssignmentExpression",
"start": 402,
"end": 892,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 35,
"column": 1
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 402,
"end": 423,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 15,
"column": 21
}
},
"object": {
"type": "MemberExpression",
"start": 402,
"end": 416,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 15,
"column": 14
}
},
"object": {
"type": "Identifier",
"start": 402,
"end": 407,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 15,
"column": 5
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 408,
"end": 416,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 15,
"column": 14
}
},
"name": "Object3D"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 417,
"end": 423,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 21
}
},
"name": "Events"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 426,
"end": 892,
"loc": {
"start": {
"line": 15,
"column": 24
},
"end": {
"line": 35,
"column": 1
}
},
"properties": [
{
"type": "Property",
"start": 432,
"end": 675,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 25,
"column": 5
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 432,
"end": 441,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 13
}
},
"name": "Lifecycle"
},
"value": {
"type": "ObjectExpression",
"start": 443,
"end": 675,
"loc": {
"start": {
"line": 16,
"column": 15
},
"end": {
"line": 25,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 450,
"end": 466,
"loc": {
"start": {
"line": 17,
"column": 5
},
"end": {
"line": 17,
"column": 21
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 450,
"end": 456,
"loc": {
"start": {
"line": 17,
"column": 5
},
"end": {
"line": 17,
"column": 11
}
},
"name": "Loaded"
},
"value": {
"type": "Literal",
"start": 458,
"end": 466,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 21
}
},
"value": "Loaded",
"rawValue": "Loaded",
"raw": "'Loaded'"
},
"kind": "init"
},
{
"type": "Property",
"start": 473,
"end": 487,
"loc": {
"start": {
"line": 18,
"column": 5
},
"end": {
"line": 18,
"column": 19
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 473,
"end": 478,
"loc": {
"start": {
"line": 18,
"column": 5
},
"end": {
"line": 18,
"column": 10
}
},
"name": "Added"
},
"value": {
"type": "Literal",
"start": 480,
"end": 487,
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 19
}
},
"value": "Added",
"rawValue": "Added",
"raw": "'Added'"
},
"kind": "init"
},
{
"type": "Property",
"start": 497,
"end": 519,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 30
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 497,
"end": 506,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 17
}
},
"name": "ViewFound"
},
"value": {
"type": "Literal",
"start": 508,
"end": 519,
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 19,
"column": 30
}
},
"value": "ViewFound",
"rawValue": "ViewFound",
"raw": "'ViewFound'"
},
"kind": "init"
},
{
"type": "Property",
"start": 526,
"end": 550,
"loc": {
"start": {
"line": 20,
"column": 5
},
"end": {
"line": 20,
"column": 29
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 526,
"end": 536,
"loc": {
"start": {
"line": 20,
"column": 5
},
"end": {
"line": 20,
"column": 15
}
},
"name": "ChildAdded"
},
"value": {
"type": "Literal",
"start": 538,
"end": 550,
"loc": {
"start": {
"line": 20,
"column": 17
},
"end": {
"line": 20,
"column": 29
}
},
"value": "ChildAdded",
"rawValue": "ChildAdded",
"raw": "'ChildAdded'"
},
"kind": "init"
},
{
"type": "Property",
"start": 557,
"end": 575,
"loc": {
"start": {
"line": 21,
"column": 5
},
"end": {
"line": 21,
"column": 23
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 557,
"end": 564,
"loc": {
"start": {
"line": 21,
"column": 5
},
"end": {
"line": 21,
"column": 12
}
},
"name": "Removed"
},
"value": {
"type": "Literal",
"start": 566,
"end": 575,
"loc": {
"start": {
"line": 21,
"column": 14
},
"end": {
"line": 21,
"column": 23
}
},
"value": "Removed",
"rawValue": "Removed",
"raw": "'Removed'"
},
"kind": "init"
},
{
"type": "Property",
"start": 582,
"end": 610,
"loc": {
"start": {
"line": 22,
"column": 5
},
"end": {
"line": 22,
"column": 33
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 582,
"end": 594,
"loc": {
"start": {
"line": 22,
"column": 5
},
"end": {
"line": 22,
"column": 17
}
},
"name": "ChildRemoved"
},
"value": {
"type": "Literal",
"start": 596,
"end": 610,
"loc": {
"start": {
"line": 22,
"column": 19
},
"end": {
"line": 22,
"column": 33
}
},
"value": "ChildRemoved",
"rawValue": "ChildRemoved",
"raw": "'ChildRemoved'"
},
"kind": "init"
},
{
"type": "Property",
"start": 617,
"end": 639,
"loc": {
"start": {
"line": 23,
"column": 5
},
"end": {
"line": 23,
"column": 27
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 617,
"end": 626,
"loc": {
"start": {
"line": 23,
"column": 5
},
"end": {
"line": 23,
"column": 14
}
},
"name": "Destroyed"
},
"value": {
"type": "Literal",
"start": 628,
"end": 639,
"loc": {
"start": {
"line": 23,
"column": 16
},
"end": {
"line": 23,
"column": 27
}
},
"value": "Destroyed",
"rawValue": "Destroyed",
"raw": "'Destroyed'"
},
"kind": "init"
},
{
"type": "Property",
"start": 649,
"end": 669,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 28
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 649,
"end": 657,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 16
}
},
"name": "Rendered"
},
"value": {
"type": "Literal",
"start": 659,
"end": 669,
"loc": {
"start": {
"line": 24,
"column": 18
},
"end": {
"line": 24,
"column": 28
}
},
"value": "Rendered",
"rawValue": "Rendered",
"raw": "'Rendered'"
},
"kind": "init"
}
]
},
"kind": "init"
},
{
"type": "Property",
"start": 681,
"end": 890,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 34,
"column": 5
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 681,
"end": 692,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 15
}
},
"name": "Interaction"
},
"value": {
"type": "ObjectExpression",
"start": 694,
"end": 890,
"loc": {
"start": {
"line": 26,
"column": 17
},
"end": {
"line": 34,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 704,
"end": 722,
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 26
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 704,
"end": 711,
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 15
}
},
"name": "Clicked"
},
"value": {
"type": "Literal",
"start": 713,
"end": 722,
"loc": {
"start": {
"line": 27,
"column": 17
},
"end": {
"line": 27,