awv3
Version:
AWV client CAD framework
1,440 lines (1,439 loc) • 552 kB
JSON
{
"type": "Program",
"start": 0,
"end": 5227,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 129,
"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": 44,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 17
}
},
"specifiers": [],
"source": {
"type": "Literal",
"start": 34,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 16
}
},
"value": "perfnow",
"rawValue": "perfnow",
"raw": "'perfnow'"
}
},
{
"type": "ImportDeclaration",
"start": 45,
"end": 88,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 43
}
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start": 52,
"end": 64,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 57,
"end": 64,
"loc": {
"start": {
"line": 3,
"column": 12
},
"end": {
"line": 3,
"column": 19
}
},
"name": "Helpers"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 70,
"end": 87,
"loc": {
"start": {
"line": 3,
"column": 25
},
"end": {
"line": 3,
"column": 42
}
},
"value": "../core/helpers",
"rawValue": "../core/helpers",
"raw": "'../core/helpers'"
}
},
{
"type": "ImportDeclaration",
"start": 89,
"end": 128,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 96,
"end": 101,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 96,
"end": 101,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 12
}
},
"name": "Tween"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 107,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 18
},
"end": {
"line": 4,
"column": 38
}
},
"value": "../animation/tween",
"rawValue": "../animation/tween",
"raw": "'../animation/tween'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 130,
"end": 5226,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 128,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 145,
"end": 5226,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 128,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 151,
"end": 159,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 29
}
},
"name": "Renderer"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 160,
"end": 5226,
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 128,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 166,
"end": 4593,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 104,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 166,
"end": 177,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 177,
"end": 4593,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 104,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 178,
"end": 238,
"loc": {
"start": {
"line": 7,
"column": 16
},
"end": {
"line": 7,
"column": 76
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 178,
"end": 184,
"loc": {
"start": {
"line": 7,
"column": 16
},
"end": {
"line": 7,
"column": 22
}
},
"name": "canvas"
},
"right": {
"type": "CallExpression",
"start": 187,
"end": 238,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 76
}
},
"callee": {
"type": "MemberExpression",
"start": 187,
"end": 196,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 34
}
},
"object": {
"type": "Identifier",
"start": 187,
"end": 192,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 30
}
},
"name": "Error"
},
"property": {
"type": "Identifier",
"start": 193,
"end": 196,
"loc": {
"start": {
"line": 7,
"column": 31
},
"end": {
"line": 7,
"column": 34
}
},
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 197,
"end": 237,
"loc": {
"start": {
"line": 7,
"column": 35
},
"end": {
"line": 7,
"column": 75
}
},
"value": "Factory was initialized without canvas",
"rawValue": "Factory was initialized without canvas",
"raw": "'Factory was initialized without canvas'"
}
]
}
},
{
"type": "AssignmentPattern",
"start": 240,
"end": 252,
"loc": {
"start": {
"line": 7,
"column": 78
},
"end": {
"line": 7,
"column": 90
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 240,
"end": 247,
"loc": {
"start": {
"line": 7,
"column": 78
},
"end": {
"line": 7,
"column": 85
}
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 250,
"end": 252,
"loc": {
"start": {
"line": 7,
"column": 88
},
"end": {
"line": 7,
"column": 90
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 254,
"end": 4593,
"loc": {
"start": {
"line": 7,
"column": 92
},
"end": {
"line": 104,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 264,
"end": 285,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 264,
"end": 284,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 28
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 264,
"end": 275,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 264,
"end": 268,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 269,
"end": 275,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 19
}
},
"name": "canvas"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 278,
"end": 284,
"loc": {
"start": {
"line": 8,
"column": 22
},
"end": {
"line": 8,
"column": 28
}
},
"name": "canvas"
}
}
},
{
"type": "ExpressionStatement",
"start": 294,
"end": 377,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 91
}
},
"expression": {
"type": "AssignmentExpression",
"start": 294,
"end": 376,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 90
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 294,
"end": 309,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 294,
"end": 298,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 299,
"end": 309,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 23
}
},
"name": "resolution"
},
"computed": false
},
"right": {
"type": "LogicalExpression",
"start": 312,
"end": 376,
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 90
}
},
"left": {
"type": "LogicalExpression",
"start": 312,
"end": 371,
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 85
}
},
"left": {
"type": "MemberExpression",
"start": 312,
"end": 330,
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 44
}
},
"object": {
"type": "Identifier",
"start": 312,
"end": 319,
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 33
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 320,
"end": 330,
"loc": {
"start": {
"line": 9,
"column": 34
},
"end": {
"line": 9,
"column": 44
}
},
"name": "resolution"
},
"computed": false
},
"operator": "||",
"right": {
"type": "CallExpression",
"start": 334,
"end": 371,
"loc": {
"start": {
"line": 9,
"column": 48
},
"end": {
"line": 9,
"column": 85
}
},
"callee": {
"type": "Identifier",
"start": 334,
"end": 344,
"loc": {
"start": {
"line": 9,
"column": 48
},
"end": {
"line": 9,
"column": 58
}
},
"name": "parseFloat"
},
"arguments": [
{
"type": "CallExpression",
"start": 345,
"end": 370,
"loc": {
"start": {
"line": 9,
"column": 59
},
"end": {
"line": 9,
"column": 84
}
},
"callee": {
"type": "MemberExpression",
"start": 345,
"end": 356,
"loc": {
"start": {
"line": 9,
"column": 59
},
"end": {
"line": 9,
"column": 70
}
},
"object": {
"type": "Identifier",
"start": 345,
"end": 352,
"loc": {
"start": {
"line": 9,
"column": 59
},
"end": {
"line": 9,
"column": 66
}
},
"name": "Helpers"
},
"property": {
"type": "Identifier",
"start": 353,
"end": 356,
"loc": {
"start": {
"line": 9,
"column": 67
},
"end": {
"line": 9,
"column": 70
}
},
"name": "url"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 357,
"end": 369,
"loc": {
"start": {
"line": 9,
"column": 71
},
"end": {
"line": 9,
"column": 83
}
},
"value": "resolution",
"rawValue": "resolution",
"raw": "'resolution'"
}
]
}
]
}
},
"operator": "||",
"right": {
"type": "Literal",
"start": 375,
"end": 376,
"loc": {
"start": {
"line": 9,
"column": 89
},
"end": {
"line": 9,
"column": 90
}
},
"value": 1,
"rawValue": 1,
"raw": "1"
}
}
}
},
{
"type": "ExpressionStatement",
"start": 386,
"end": 445,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 67
}
},
"expression": {
"type": "AssignmentExpression",
"start": 386,
"end": 444,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 66
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 386,
"end": 401,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 386,
"end": 390,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 391,
"end": 401,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 23
}
},
"name": "clearColor"
},
"computed": false
},
"right": {
"type": "LogicalExpression",
"start": 404,
"end": 444,
"loc": {
"start": {
"line": 10,
"column": 26
},
"end": {
"line": 10,
"column": 66
}
},
"left": {
"type": "MemberExpression",
"start": 404,
"end": 422,
"loc": {
"start": {
"line": 10,
"column": 26
},
"end": {
"line": 10,
"column": 44
}
},
"object": {
"type": "Identifier",
"start": 404,
"end": 411,
"loc": {
"start": {
"line": 10,
"column": 26
},
"end": {
"line": 10,
"column": 33
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 412,
"end": 422,
"loc": {
"start": {
"line": 10,
"column": 34
},
"end": {
"line": 10,
"column": 44
}
},
"name": "clearColor"
},
"computed": false
},
"operator": "||",
"right": {
"type": "NewExpression",
"start": 426,
"end": 444,
"loc": {
"start": {
"line": 10,
"column": 48
},
"end": {
"line": 10,
"column": 66
}
},
"callee": {
"type": "MemberExpression",
"start": 430,
"end": 441,
"loc": {
"start": {
"line": 10,
"column": 52
},
"end": {
"line": 10,
"column": 63
}
},
"object": {
"type": "Identifier",
"start": 430,
"end": 435,
"loc": {
"start": {
"line": 10,
"column": 52
},
"end": {
"line": 10,
"column": 57
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 436,
"end": 441,
"loc": {
"start": {
"line": 10,
"column": 58
},
"end": {
"line": 10,
"column": 63
}
},
"name": "Color"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 442,
"end": 443,
"loc": {
"start": {
"line": 10,
"column": 64
},
"end": {
"line": 10,
"column": 65
}
},
"value": 0,
"rawValue": 0,
"raw": "0"
}
]
}
}
}
},
{
"type": "ExpressionStatement",
"start": 454,
"end": 492,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 46
}
},
"expression": {
"type": "AssignmentExpression",
"start": 454,
"end": 491,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 45
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 454,
"end": 464,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 454,
"end": 458,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 459,
"end": 464,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 18
}
},
"name": "place"
},
"computed": false
},
"right": {
"type": "LogicalExpression",
"start": 467,
"end": 491,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 45
}
},
"left": {
"type": "MemberExpression",
"start": 467,
"end": 480,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 34
}
},
"object": {
"type": "Identifier",
"start": 467,
"end": 474,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 28
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 475,
"end": 480,
"loc": {
"start": {
"line": 11,
"column": 29
},
"end": {
"line": 11,
"column": 34
}
},
"name": "place"
},
"computed": false
},
"operator": "||",
"right": {
"type": "Literal",
"start": 484,
"end": 491,
"loc": {
"start": {
"line": 11,
"column": 38
},
"end": {
"line": 11,
"column": 45
}
},
"value": "first",
"rawValue": "first",
"raw": "'first'"
}
}
}
},
{
"type": "ExpressionStatement",
"start": 501,
"end": 607,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 114
}
},
"expression": {
"type": "AssignmentExpression",
"start": 501,
"end": 606,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 113
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 501,
"end": 522,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 501,
"end": 505,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 506,
"end": 522,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 29
}
},
"name": "startImmediately"
},
"computed": false
},
"right": {
"type": "ConditionalExpression",
"start": 525,
"end": 606,
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 113
}
},
"test": {
"type": "BinaryExpression",
"start": 525,
"end": 572,
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 79
}
},
"left": {
"type": "UnaryExpression",
"start": 525,
"end": 556,
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 63
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 532,
"end": 556,
"loc": {
"start": {