awv3
Version:
AWV client CAD framework
1,714 lines • 1.69 MB
JSON
{
"type": "Program",
"start": 0,
"end": 15664,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 399,
"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": "ImportNamespaceSpecifier",
"start": 34,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 39,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 12
},
"end": {
"line": 2,
"column": 17
}
},
"name": "Error"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 50,
"end": 65,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 38
}
},
"value": "../core/error",
"rawValue": "../core/error",
"raw": "'../core/error'"
}
},
{
"type": "ImportDeclaration",
"start": 67,
"end": 134,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 67
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 76,
"end": 80,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 76,
"end": 80,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 13
}
},
"name": "guid"
},
"local": {
"type": "Identifier",
"start": 76,
"end": 80,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 13
}
},
"name": "guid"
}
},
{
"type": "ImportSpecifier",
"start": 82,
"end": 90,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 23
}
},
"imported": {
"type": "Identifier",
"start": 82,
"end": 90,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 23
}
},
"name": "queryDom"
},
"local": {
"type": "Identifier",
"start": 82,
"end": 90,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 23
}
},
"name": "queryDom"
}
},
{
"type": "ImportSpecifier",
"start": 92,
"end": 108,
"loc": {
"start": {
"line": 3,
"column": 25
},
"end": {
"line": 3,
"column": 41
}
},
"imported": {
"type": "Identifier",
"start": 92,
"end": 108,
"loc": {
"start": {
"line": 3,
"column": 25
},
"end": {
"line": 3,
"column": 41
}
},
"name": "setPrefixedValue"
},
"local": {
"type": "Identifier",
"start": 92,
"end": 108,
"loc": {
"start": {
"line": 3,
"column": 25
},
"end": {
"line": 3,
"column": 41
}
},
"name": "setPrefixedValue"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 116,
"end": 133,
"loc": {
"start": {
"line": 3,
"column": 49
},
"end": {
"line": 3,
"column": 66
}
},
"value": "../core/helpers",
"rawValue": "../core/helpers",
"raw": "'../core/helpers'"
}
},
{
"type": "ImportDeclaration",
"start": 135,
"end": 180,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 45
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 144,
"end": 155,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 20
}
},
"imported": {
"type": "Identifier",
"start": 144,
"end": 155,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 20
}
},
"name": "lastCreated"
},
"local": {
"type": "Identifier",
"start": 144,
"end": 155,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 20
}
},
"name": "lastCreated"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 163,
"end": 179,
"loc": {
"start": {
"line": 4,
"column": 28
},
"end": {
"line": 4,
"column": 44
}
},
"value": "../core/canvas",
"rawValue": "../core/canvas",
"raw": "'../core/canvas'"
}
},
{
"type": "ImportDeclaration",
"start": 181,
"end": 217,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 188,
"end": 197,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 188,
"end": 197,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 16
}
},
"name": "DomEvents"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 203,
"end": 216,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 5,
"column": 35
}
},
"value": "../core/dom",
"rawValue": "../core/dom",
"raw": "'../core/dom'"
}
},
{
"type": "ImportDeclaration",
"start": 218,
"end": 264,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 46
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 225,
"end": 236,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 225,
"end": 236,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 18
}
},
"name": "Interaction"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 242,
"end": 263,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 45
}
},
"value": "../core/interaction",
"rawValue": "../core/interaction",
"raw": "'../core/interaction'"
}
},
{
"type": "ImportDeclaration",
"start": 265,
"end": 299,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 34
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 272,
"end": 277,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 272,
"end": 277,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 12
}
},
"name": "Stats"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 283,
"end": 298,
"loc": {
"start": {
"line": 7,
"column": 18
},
"end": {
"line": 7,
"column": 33
}
},
"value": "../misc/stats",
"rawValue": "../misc/stats",
"raw": "'../misc/stats'"
}
},
{
"type": "ImportDeclaration",
"start": 300,
"end": 338,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 38
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 307,
"end": 312,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 307,
"end": 312,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 12
}
},
"name": "Orbit"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 318,
"end": 337,
"loc": {
"start": {
"line": 8,
"column": 18
},
"end": {
"line": 8,
"column": 37
}
},
"value": "../controls/orbit",
"rawValue": "../controls/orbit",
"raw": "'../controls/orbit'"
}
},
{
"type": "ImportDeclaration",
"start": 339,
"end": 386,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 47
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 346,
"end": 357,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 346,
"end": 357,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 18
}
},
"name": "Perspective"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 363,
"end": 385,
"loc": {
"start": {
"line": 9,
"column": 24
},
"end": {
"line": 9,
"column": 46
}
},
"value": "../three/perspective",
"rawValue": "../three/perspective",
"raw": "'../three/perspective'"
},
"trailingComments": [
{
"type": "Block",
"value": "* A view represents a portion of canvas on which webGL can draw.\n The view is defined and tracked by a dom node on which the drawing take place. ",
"start": 388,
"end": 540,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 12,
"column": 85
}
},
"range": [
388,
540
]
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 541,
"end": 15663,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 398,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 556,
"end": 15663,
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 398,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 562,
"end": 566,
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 25
}
},
"name": "View",
"leadingComments": null
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 567,
"end": 15663,
"loc": {
"start": {
"line": 13,
"column": 26
},
"end": {
"line": 398,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 2046,
"end": 6971,
"loc": {
"start": {
"line": 36,
"column": 4
},
"end": {
"line": 153,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 2046,
"end": 2057,
"loc": {
"start": {
"line": 36,
"column": 4
},
"end": {
"line": 36,
"column": 15
}
},
"name": "constructor",
"leadingComments": null
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 2057,
"end": 6971,
"loc": {
"start": {
"line": 36,
"column": 15
},
"end": {
"line": 153,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 2058,
"end": 2078,
"loc": {
"start": {
"line": 36,
"column": 16
},
"end": {
"line": 36,
"column": 36
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 2058,
"end": 2064,
"loc": {
"start": {
"line": 36,
"column": 16
},
"end": {
"line": 36,
"column": 22
}
},
"name": "canvas"
},
"right": {
"type": "Identifier",
"start": 2067,
"end": 2078,
"loc": {
"start": {
"line": 36,
"column": 25
},
"end": {
"line": 36,
"column": 36
}
},
"name": "lastCreated"
}
},
{
"type": "AssignmentPattern",
"start": 2080,
"end": 2092,
"loc": {
"start": {
"line": 36,
"column": 38
},
"end": {
"line": 36,
"column": 50
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 2080,
"end": 2087,
"loc": {
"start": {
"line": 36,
"column": 38
},
"end": {
"line": 36,
"column": 45
}
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 2090,
"end": 2092,
"loc": {
"start": {
"line": 36,
"column": 48
},
"end": {
"line": 36,
"column": 50
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 2094,
"end": 6971,
"loc": {
"start": {
"line": 36,
"column": 52
},
"end": {
"line": 153,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 2105,
"end": 2122,
"loc": {
"start": {
"line": 38,
"column": 8
},
"end": {
"line": 38,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 2105,
"end": 2121,
"loc": {
"start": {
"line": 38,
"column": 8
},
"end": {
"line": 38,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 2105,
"end": 2112,
"loc": {
"start": {
"line": 38,
"column": 8
},
"end": {
"line": 38,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 2105,
"end": 2109,
"loc": {
"start": {
"line": 38,
"column": 8
},
"end": {
"line": 38,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 2110,
"end": 2112,
"loc": {
"start": {
"line": 38,
"column": 13
},
"end": {
"line": 38,
"column": 15
}
},
"name": "id"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 2115,
"end": 2121,
"loc": {
"start": {
"line": 38,
"column": 18
},
"end": {
"line": 38,
"column": 24
}
},
"callee": {
"type": "Identifier",
"start": 2115,
"end": 2119,
"loc": {
"start": {
"line": 38,
"column": 18
},
"end": {
"line": 38,
"column": 22
}
},
"name": "guid"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 2131,
"end": 2152,
"loc": {
"start": {
"line": 39,
"column": 8
},
"end": {
"line": 39,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 2131,
"end": 2151,
"loc": {
"start": {
"line": 39,
"column": 8
},
"end": {
"line": 39,
"column": 28
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 2131,
"end": 2142,
"loc": {
"start": {
"line": 39,
"column": 8
},
"end": {
"line": 39,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 2131,
"end": 2135,
"loc": {
"start": {
"line": 39,
"column": 8
},
"end": {
"line": 39,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 2136,
"end": 2142,
"loc": {
"start": {
"line": 39,
"column": 13
},
"end": {
"line": 39,
"column": 19
}
},
"name": "canvas"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 2145,
"end": 2151,
"loc": {
"start": {
"line": 39,
"column": 22
},
"end": {
"line": 39,
"column": 28
}
},
"name": "canvas"
}
}
},
{
"type": "ExpressionStatement",
"start": 2161,
"end": 2193,
"loc": {
"start": {
"line": 40,
"column": 8
},
"end": {
"line": 40,
"column": 40
}
},
"expression": {
"type": "AssignmentExpression",
"start": 2161,
"end": 2192,
"loc": {
"start": {
"line": 40,
"column": 8
},
"end": {
"line": 40,
"column": 39
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 2161,
"end": 2174,
"loc": {
"start": {
"line": 40,
"column": 8
},
"end": {
"line": 40,
"column": 21
}
},
"object": {
"type": "ThisExpression",
"start": 2161,
"end": 2165,
"loc": {
"start": {
"line": 40,
"column": 8
},
"end": {
"line": 40,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 2166,
"end": 2174,
"loc": {
"start": {
"line": 40,
"column": 13
},
"end": {
"line": 40,
"column": 21
}
},
"name": "renderer"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 2177,
"end": 2192,
"loc": {
"start": {
"line": 40,
"column": 24
},
"end": {
"line": 40,
"column": 39
}
},
"object": {
"type": "Identifier",
"start": 2177,
"end": 2183,
"loc": {
"start": {
"line": 40,
"column": 24
},
"end": {
"line": 40,
"column": 30
}
},
"name": "canvas"
},
"property": {
"type": "Identifier",
"start": 2184,
"end": 2192,
"loc": {
"start": {
"line": 40,
"column": 31
},
"end": {
"line": 40,
"column": 39
}
},
"name": "renderer"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 2202,
"end": 2228,
"loc": {
"start": {
"line": 41,
"column": 8
},
"end": {
"line": 41,
"column": 34
}
},
"expression": {
"type": "AssignmentExpression",
"start": 2202,
"end": 2227,
"loc": {
"start": {
"line": 41,
"column": 8
},
"end": {
"line": 41,
"column": 33
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 2202,
"end": 2223,
"loc": {
"start": {
"line": 41,
"column": 8
},
"end": {
"line": 41,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 2202,
"end": 2206,
"loc": {
"start": {
"line": 41,
"column": 8
},
"end": {
"line": 41,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 2207,
"end": 2223,
"loc": {
"start": {
"line": 41,
"column": 13
},
"end": {
"line": 41,
"column": 29
}
},
"name": "invalidateFrames"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 2226,
"end": 2227,
"loc": {
"start": {
"line": 41,
"column": 32
},
"end": {
"line": 41,
"column": 33
}
},
"value": 2,
"rawValue": 2,
"raw": "2"
}
}
},
{
"type": "ExpressionStatement",
"start": 2237,
"end": 2252,
"loc": {
"start": {
"line": 42,
"column": 8
},
"end": {
"line": 42,
"column": 23
}
},
"expression": {
"type": "AssignmentExpression",
"start": 2237,
"end": 2251,
"loc": {
"start": {
"line": 42,
"column": 8
},
"end": {
"line": 42,
"column": 22
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 2237,
"end": 2247,
"loc": {
"start": {
"line": 42,
"column": 8
},
"end": {
"line": 42,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 2237,
"end": 2241,
"loc": {
"start": {
"line": 42,
"column": 8
},
"end": {
"line": 42,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 2242,
"end": 2247,
"loc": {
"start": {
"line": 42,
"column": 13
},
"end": {
"line": 42,
"column": 18
}
},
"name": "force"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 2250,
"end": 2251,
"loc": {
"start": {
"line": 42,
"column": 21
},
"end": {
"line": 42,
"column": 22
}
},
"value": 0,
"rawValue": 0,
"raw": "0"
}
}
},
{
"type": "ExpressionStatement",
"start": 2261,
"end": 2279,
"loc": {
"start": {
"line": 43,
"column": 8
},
"end": {
"line": 43,
"column": 26
}
},
"expression": {
"type": "AssignmentExpression",
"start": 2261,
"end": 2278,
"loc": {
"start": {
"line": 43,
"column": 8
},
"end": {
"line": 43,
"column": 25
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 2261,
"end": 2271,
"loc": {
"start": {
"line": 43,
"column": 8
},
"end": {
"line": 43,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 2261,
"end": 2265,
"loc": {
"start": {
"line": 43,
"column": 8
},
"end": {
"line": 43,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 2266,
"end": 2271,
"loc": {
"start": {
"line": 43,
"column": 13
},
"end": {
"line": 43,
"column": 18
}
},
"name": "dirty"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 2274,
"end": 2278,
"loc": {
"start": {
"line": 43,
"column": 21
},
"end": {
"line": 43,
"column": 25
}
},
"value": true,
"rawValue": true,
"raw": "true"
}
}
},
{
"type": "ExpressionStatement",
"start": 2288,
"end": 2388,
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 47,
"column": 10
}
},
"expression": {
"type": "AssignmentExpression",
"start": 2288,
"end": 2387,
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 47,
"column": 9
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 2288,
"end": 2299,
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 44,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 2288,
"end": 2292,
"loc": {
"start": {
"line": 44,
"column": 8
},
"end": {
"line": 44,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 2293,
"end": 2299,
"loc": {
"start": {
"line": 44,
"column": 13
},
"end": {
"line": 44,
"column": 19
}
},
"name": "bounds"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 2302,
"end": 2387,
"loc": {
"start": {
"line": 44,
"column": 22
},
"end": {
"line": 47,
"column": 9
}
},
"properties": [
{
"type": "Property",
"start": 2316,
"end": 2337,
"loc": {
"start": {
"line": 45,
"column": 12
},
"end": {
"line": 45,
"column"