awv3
Version:
⚡ AWV3 embedded CAD
1,529 lines (1,528 loc) • 3.03 MB
JSON
{
"type": "File",
"start": 0,
"end": 15461,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 384,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 15461,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 384,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 12,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 17
},
"identifierName": "THREE"
},
"name": "THREE"
}
}
],
"source": {
"type": "StringLiteral",
"start": 23,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 30
}
},
"extra": {
"rawValue": "three",
"raw": "'three'"
},
"value": "three"
}
},
{
"type": "ImportDeclaration",
"start": 32,
"end": 71,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 39,
"end": 46,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 39,
"end": 46,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 14
},
"identifierName": "Object3"
},
"name": "Object3"
}
}
],
"source": {
"type": "StringLiteral",
"start": 52,
"end": 70,
"loc": {
"start": {
"line": 2,
"column": 20
},
"end": {
"line": 2,
"column": 38
}
},
"extra": {
"rawValue": "../three/object3",
"raw": "'../three/object3'"
},
"value": "../three/object3"
}
},
{
"type": "ImportDeclaration",
"start": 72,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 38
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 79,
"end": 84,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 79,
"end": 84,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 12
},
"identifierName": "Orbit"
},
"name": "Orbit"
}
}
],
"source": {
"type": "StringLiteral",
"start": 90,
"end": 109,
"loc": {
"start": {
"line": 3,
"column": 18
},
"end": {
"line": 3,
"column": 37
}
},
"extra": {
"rawValue": "../controls/orbit",
"raw": "'../controls/orbit'"
},
"value": "../controls/orbit"
}
},
{
"type": "ImportDeclaration",
"start": 111,
"end": 158,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 47
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 118,
"end": 129,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 118,
"end": 129,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 18
},
"identifierName": "Perspective"
},
"name": "Perspective"
}
}
],
"source": {
"type": "StringLiteral",
"start": 135,
"end": 157,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 46
}
},
"extra": {
"rawValue": "../three/perspective",
"raw": "'../three/perspective'"
},
"value": "../three/perspective"
}
},
{
"type": "ImportDeclaration",
"start": 159,
"end": 196,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 37
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 166,
"end": 172,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 166,
"end": 172,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "Region"
},
"name": "Region"
}
}
],
"source": {
"type": "StringLiteral",
"start": 178,
"end": 195,
"loc": {
"start": {
"line": 5,
"column": 19
},
"end": {
"line": 5,
"column": 36
}
},
"extra": {
"rawValue": "../three/region",
"raw": "'../three/region'"
},
"value": "../three/region"
}
},
{
"type": "ImportDeclaration",
"start": 197,
"end": 258,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 61
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 206,
"end": 231,
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 34
}
},
"imported": {
"type": "Identifier",
"start": 206,
"end": 213,
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 16
},
"identifierName": "actions"
},
"name": "actions"
},
"local": {
"type": "Identifier",
"start": 217,
"end": 231,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 34
},
"identifierName": "elementActions"
},
"name": "elementActions"
}
}
],
"source": {
"type": "StringLiteral",
"start": 239,
"end": 257,
"loc": {
"start": {
"line": 6,
"column": 42
},
"end": {
"line": 6,
"column": 60
}
},
"extra": {
"rawValue": "./store/elements",
"raw": "'./store/elements'"
},
"value": "./store/elements"
}
},
{
"type": "ImportDeclaration",
"start": 259,
"end": 297,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 38
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 268,
"end": 277,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 18
}
},
"imported": {
"type": "Identifier",
"start": 268,
"end": 277,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 18
},
"identifierName": "arrayDiff"
},
"name": "arrayDiff"
},
"local": {
"type": "Identifier",
"start": 268,
"end": 277,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 18
},
"identifierName": "arrayDiff"
},
"name": "arrayDiff"
}
}
],
"source": {
"type": "StringLiteral",
"start": 285,
"end": 296,
"loc": {
"start": {
"line": 7,
"column": 26
},
"end": {
"line": 7,
"column": 37
}
},
"extra": {
"rawValue": "./helpers",
"raw": "'./helpers'"
},
"value": "./helpers"
},
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * @class ObjectSelector is used to select whole objects in the view\n * (Filtersettings: Object).\n * includes single selection as well as rubberband selection. Object selection\n * is based on the object's id only and works without userData and meta-information.\n ",
"start": 299,
"end": 568,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 14,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 569,
"end": 15460,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 383,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "ClassDeclaration",
"start": 576,
"end": 15460,
"loc": {
"start": {
"line": 15,
"column": 7
},
"end": {
"line": 383,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 582,
"end": 596,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 27
},
"identifierName": "ObjectSelector"
},
"name": "ObjectSelector",
"leadingComments": null
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 597,
"end": 15460,
"loc": {
"start": {
"line": 15,
"column": 28
},
"end": {
"line": 383,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 603,
"end": 1071,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 27,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 603,
"end": 614,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 615,
"end": 622,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 23
},
"identifierName": "session"
},
"name": "session"
},
{
"type": "Identifier",
"start": 624,
"end": 631,
"loc": {
"start": {
"line": 16,
"column": 25
},
"end": {
"line": 16,
"column": 32
},
"identifierName": "options"
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 633,
"end": 1071,
"loc": {
"start": {
"line": 16,
"column": 34
},
"end": {
"line": 27,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 644,
"end": 667,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 644,
"end": 666,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 644,
"end": 656,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 644,
"end": 648,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 649,
"end": 656,
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 20
},
"identifierName": "session"
},
"name": "session"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 659,
"end": 666,
"loc": {
"start": {
"line": 18,
"column": 23
},
"end": {
"line": 18,
"column": 30
},
"identifierName": "session"
},
"name": "session"
}
},
"trailingComments": [
{
"type": "CommentLine",
"value": " Wait until the sessions pool has been added into the view (happens in <App/>)",
"start": 676,
"end": 756,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 88
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 765,
"end": 826,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 69
}
},
"expression": {
"type": "CallExpression",
"start": 765,
"end": 825,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 68
}
},
"callee": {
"type": "MemberExpression",
"start": 765,
"end": 799,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 42
}
},
"object": {
"type": "CallExpression",
"start": 765,
"end": 794,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 37
}
},
"callee": {
"type": "MemberExpression",
"start": 765,
"end": 792,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 35
}
},
"object": {
"type": "MemberExpression",
"start": 765,
"end": 782,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 25
}
},
"object": {
"type": "MemberExpression",
"start": 765,
"end": 777,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 765,
"end": 769,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 770,
"end": 777,
"loc": {
"start": {
"line": 20,
"column": 13
},
"end": {
"line": 20,
"column": 20
},
"identifierName": "session"
},
"name": "session"
},
"computed": false,
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 778,
"end": 782,
"loc": {
"start": {
"line": 20,
"column": 21
},
"end": {
"line": 20,
"column": 25
},
"identifierName": "pool"
},
"name": "pool"
},
"computed": false,
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 783,
"end": 792,
"loc": {
"start": {
"line": 20,
"column": 26
},
"end": {
"line": 20,
"column": 35
},
"identifierName": "viewFound"
},
"name": "viewFound"
},
"computed": false,
"leadingComments": null
},
"arguments": [],
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 795,
"end": 799,
"loc": {
"start": {
"line": 20,
"column": 38
},
"end": {
"line": 20,
"column": 42
},
"identifierName": "then"
},
"name": "then"
},
"computed": false,
"leadingComments": null
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 800,
"end": 824,
"loc": {
"start": {
"line": 20,
"column": 43
},
"end": {
"line": 20,
"column": 67
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 800,
"end": 804,
"loc": {
"start": {
"line": 20,
"column": 43
},
"end": {
"line": 20,
"column": 47
},
"identifierName": "view"
},
"name": "view"
}
],
"body": {
"type": "AssignmentExpression",
"start": 808,
"end": 824,
"loc": {
"start": {
"line": 20,
"column": 51
},
"end": {
"line": 20,
"column": 67
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 808,
"end": 817,
"loc": {
"start": {
"line": 20,
"column": 51
},
"end": {
"line": 20,
"column": 60
}
},
"object": {
"type": "ThisExpression",
"start": 808,
"end": 812,
"loc": {
"start": {
"line": 20,
"column": 51
},
"end": {
"line": 20,
"column": 55
}
}
},
"property": {
"type": "Identifier",
"start": 813,
"end": 817,
"loc": {
"start": {
"line": 20,
"column": 56
},
"end": {
"line": 20,
"column": 60
},
"identifierName": "view"
},
"name": "view"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 820,
"end": 824,
"loc": {
"start": {
"line": 20,
"column": 63
},
"end": {
"line": 20,
"column": 67
},
"identifierName": "view"
},
"name": "view"
}
}
}
],
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " Wait until the sessions pool has been added into the view (happens in <App/>)",
"start": 676,
"end": 756,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 88
}
}
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " the currently active selecion-element",
"start": 835,
"end": 875,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 48
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 884,
"end": 909,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 884,
"end": 908,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 884,
"end": 896,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 884,
"end": 888,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 889,
"end": 896,
"loc": {
"start": {
"line": 22,
"column": 13
},
"end": {
"line": 22,
"column": 20
},
"identifierName": "element"
},
"name": "element"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "Identifier",
"start": 899,
"end": 908,
"loc": {
"start": {
"line": 22,
"column": 23
},
"end": {
"line": 22,
"column": 32
},
"identifierName": "undefined"
},
"name": "undefined"
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " the currently active selecion-element",
"start": 835,
"end": 875,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 48
}
}
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " stores the selected objects",
"start": 918,
"end": 948,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 38
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 957,
"end": 986,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 957,
"end": 985,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 957,
"end": 973,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 957,
"end": 961,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 962,
"end": 973,
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 24
},
"identifierName": "selectedSet"
},
"name": "selectedSet"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 976,
"end": 985,
"loc": {
"start": {
"line": 24,
"column": 27
},
"end": {
"line": 24,
"column": 36
}
},
"callee": {
"type": "Identifier",
"start": 980,
"end": 983,
"loc": {
"start": {
"line": 24,
"column": 31
},
"end": {
"line": 24,
"column": 34
},
"identifierName": "Set"
},
"name": "Set"
},
"arguments": []
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " stores the selected objects",
"start": 918,
"end": 948,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 38
}
}
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " call unobserve when deactivated",
"start": 995,
"end": 1029,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 42
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 1038,
"end": 1065,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 35
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1038,
"end": 1064,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 34
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1038,
"end": 1052,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 1038,
"end": 1042,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {