awv3
Version:
⚡ AWV3 embedded CAD
1,536 lines • 76.8 kB
JSON
{
"type": "File",
"start": 0,
"end": 430,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 14,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 430,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 14,
"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": "ExportDefaultDeclaration",
"start": 33,
"end": 429,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 13,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 48,
"end": 429,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 13,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 54,
"end": 65,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 32
},
"identifierName": "CubeTexture"
},
"name": "CubeTexture"
},
"superClass": {
"type": "MemberExpression",
"start": 74,
"end": 91,
"loc": {
"start": {
"line": 3,
"column": 41
},
"end": {
"line": 3,
"column": 58
}
},
"object": {
"type": "Identifier",
"start": 74,
"end": 79,
"loc": {
"start": {
"line": 3,
"column": 41
},
"end": {
"line": 3,
"column": 46
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 80,
"end": 91,
"loc": {
"start": {
"line": 3,
"column": 47
},
"end": {
"line": 3,
"column": 58
},
"identifierName": "CubeTexture"
},
"name": "CubeTexture"
},
"computed": false
},
"body": {
"type": "ClassBody",
"start": 92,
"end": 429,
"loc": {
"start": {
"line": 3,
"column": 59
},
"end": {
"line": 13,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 98,
"end": 427,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 12,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 98,
"end": 109,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 110,
"end": 115,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 21
},
"identifierName": "names"
},
"name": "names"
},
{
"type": "Identifier",
"start": 117,
"end": 125,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 31
},
"identifierName": "selector"
},
"name": "selector"
}
],
"body": {
"type": "BlockStatement",
"start": 127,
"end": 427,
"loc": {
"start": {
"line": 4,
"column": 33
},
"end": {
"line": 12,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 137,
"end": 341,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
},
"expression": {
"type": "CallExpression",
"start": 137,
"end": 340,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 9,
"column": 11
}
},
"callee": {
"type": "Super",
"start": 137,
"end": 142,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 13
}
}
},
"arguments": [
{
"type": "CallExpression",
"start": 143,
"end": 339,
"loc": {
"start": {
"line": 5,
"column": 14
},
"end": {
"line": 9,
"column": 10
}
},
"callee": {
"type": "MemberExpression",
"start": 143,
"end": 152,
"loc": {
"start": {
"line": 5,
"column": 14
},
"end": {
"line": 5,
"column": 23
}
},
"object": {
"type": "Identifier",
"start": 143,
"end": 148,
"loc": {
"start": {
"line": 5,
"column": 14
},
"end": {
"line": 5,
"column": 19
},
"identifierName": "names"
},
"name": "names"
},
"property": {
"type": "Identifier",
"start": 149,
"end": 152,
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 23
},
"identifierName": "map"
},
"name": "map"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 153,
"end": 338,
"loc": {
"start": {
"line": 5,
"column": 24
},
"end": {
"line": 9,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 154,
"end": 158,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 29
},
"identifierName": "item"
},
"name": "item"
},
{
"type": "Identifier",
"start": 160,
"end": 165,
"loc": {
"start": {
"line": 5,
"column": 31
},
"end": {
"line": 5,
"column": 36
},
"identifierName": "index"
},
"name": "index"
}
],
"body": {
"type": "BlockStatement",
"start": 170,
"end": 338,
"loc": {
"start": {
"line": 5,
"column": 41
},
"end": {
"line": 9,
"column": 9
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 184,
"end": 262,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 90
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 190,
"end": 261,
"loc": {
"start": {
"line": 6,
"column": 18
},
"end": {
"line": 6,
"column": 89
}
},
"id": {
"type": "Identifier",
"start": 190,
"end": 195,
"loc": {
"start": {
"line": 6,
"column": 18
},
"end": {
"line": 6,
"column": 23
},
"identifierName": "image"
},
"name": "image"
},
"init": {
"type": "CallExpression",
"start": 198,
"end": 261,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 89
}
},
"callee": {
"type": "MemberExpression",
"start": 198,
"end": 222,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 50
}
},
"object": {
"type": "Identifier",
"start": 198,
"end": 206,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 34
},
"identifierName": "document"
},
"name": "document"
},
"property": {
"type": "Identifier",
"start": 207,
"end": 222,
"loc": {
"start": {
"line": 6,
"column": 35
},
"end": {
"line": 6,
"column": 50
},
"identifierName": "createElementNS"
},
"name": "createElementNS"
},
"computed": false
},
"arguments": [
{
"type": "StringLiteral",
"start": 223,
"end": 253,
"loc": {
"start": {
"line": 6,
"column": 51
},
"end": {
"line": 6,
"column": 81
}
},
"extra": {
"rawValue": "http://www.w3.org/1999/xhtml",
"raw": "'http://www.w3.org/1999/xhtml'"
},
"value": "http://www.w3.org/1999/xhtml"
},
{
"type": "StringLiteral",
"start": 255,
"end": 260,
"loc": {
"start": {
"line": 6,
"column": 83
},
"end": {
"line": 6,
"column": 88
}
},
"extra": {
"rawValue": "img",
"raw": "'img'"
},
"value": "img"
}
]
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 275,
"end": 302,
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 39
}
},
"expression": {
"type": "AssignmentExpression",
"start": 275,
"end": 301,
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 38
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 275,
"end": 284,
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 21
}
},
"object": {
"type": "Identifier",
"start": 275,
"end": 280,
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 17
},
"identifierName": "image"
},
"name": "image"
},
"property": {
"type": "Identifier",
"start": 281,
"end": 284,
"loc": {
"start": {
"line": 7,
"column": 18
},
"end": {
"line": 7,
"column": 21
},
"identifierName": "src"
},
"name": "src"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 287,
"end": 301,
"loc": {
"start": {
"line": 7,
"column": 24
},
"end": {
"line": 7,
"column": 38
}
},
"callee": {
"type": "Identifier",
"start": 287,
"end": 295,
"loc": {
"start": {
"line": 7,
"column": 24
},
"end": {
"line": 7,
"column": 32
},
"identifierName": "selector"
},
"name": "selector"
},
"arguments": [
{
"type": "Identifier",
"start": 296,
"end": 300,
"loc": {
"start": {
"line": 7,
"column": 33
},
"end": {
"line": 7,
"column": 37
},
"identifierName": "item"
},
"name": "item"
}
]
}
}
},
{
"type": "ReturnStatement",
"start": 315,
"end": 328,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 25
}
},
"argument": {
"type": "Identifier",
"start": 322,
"end": 327,
"loc": {
"start": {
"line": 8,
"column": 19
},
"end": {
"line": 8,
"column": 24
},
"identifierName": "image"
},
"name": "image"
}
}
],
"directives": []
}
}
]
}
]
},
"trailingComments": [
{
"type": "CommentLine",
"value": "this.minFilter = THREE.LinearFilter;",
"start": 350,
"end": 388,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 46
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 397,
"end": 421,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 32
}
},
"expression": {
"type": "AssignmentExpression",
"start": 397,
"end": 420,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 31
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 397,
"end": 413,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 397,
"end": 401,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 402,
"end": 413,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 24
},
"identifierName": "needsUpdate"
},
"name": "needsUpdate"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "BooleanLiteral",
"start": 416,
"end": 420,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 11,
"column": 31
}
},
"value": true
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": "this.minFilter = THREE.LinearFilter;",
"start": 350,
"end": 388,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 46
}
}
}
]
}
],
"directives": []
}
}
]
},
"leadingComments": [],
"trailingComments": []
}
}
],
"directives": []
},
"comments": [
{
"type": "CommentLine",
"value": "this.minFilter = THREE.LinearFilter;",
"start": 350,
"end": 388,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 46
}
}
}
],
"tokens": [
{
"type": {
"label": "import",
"keyword": "import",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "import",
"start": 0,
"end": 6,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 6
}
}
},
{
"type": {
"label": "*",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 10,
"updateContext": null
},
"value": "*",
"start": 7,
"end": 8,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "as",
"start": 9,
"end": 11,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 11
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "THREE",
"start": 12,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 17
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 18,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 22
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "three",
"start": 23,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 30
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 30,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 30
},
"end": {
"line": 1,
"column": 31
}
}
},
{
"type": {
"label": "export",
"keyword": "export",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "export",
"start": 33,
"end": 39,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 6
}
}
},
{
"type": {
"label": "default",
"keyword": "default",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "default",
"start": 40,
"end": 47,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
}
}
},
{
"type": {
"label": "class",
"keyword": "class",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "class",
"start": 48,
"end": 53,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 20
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "CubeTexture",
"start": 54,
"end": 65,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 32
}
}
},
{
"type": {
"label": "extends",
"keyword": "extends",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "extends",
"start": 66,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 33
},
"end": {
"line": 3,
"column": 40
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "THREE",
"start": 74,
"end": 79,
"loc": {
"start": {
"line": 3,
"column": 41
},
"end": {
"line": 3,
"column": 46
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 79,
"end": 80,
"loc": {
"start": {
"line": 3,
"column": 46
},
"end": {
"line": 3,
"column": 47
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "CubeTexture",
"start": 80,
"end": 91,
"loc": {
"start": {
"line": 3,
"column": 47
},
"end": {
"line": 3,
"column": 58
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 92,
"end": 93,
"loc": {
"start": {
"line": 3,
"column": 59
},
"end": {
"line": 3,
"column": 60
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "constructor",
"start": 98,
"end": 109,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 15
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 109,
"end": 110,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 4,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "names",
"start": 110,
"end": 115,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 21
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 115,
"end": 116,
"loc": {
"start": {
"line": 4,
"column": 21
},
"end": {
"line": 4,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "selector",
"start": 117,
"end": 125,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 31
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": fa