UNPKG

awv3

Version:
1,464 lines 1.51 MB
{ "type": "Program", "start": 0, "end": 10719, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 247, "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": 28, "end": 71, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 43 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 35, "end": 44, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 16 } }, "local": { "type": "Identifier", "start": 35, "end": 44, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 16 } }, "name": "Raycaster" } } ], "importKind": "value", "source": { "type": "Literal", "start": 50, "end": 70, "loc": { "start": { "line": 2, "column": 22 }, "end": { "line": 2, "column": 42 } }, "value": "../three/raycaster", "rawValue": "../three/raycaster", "raw": "'../three/raycaster'" } }, { "type": "ImportDeclaration", "start": 73, "end": 112, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 39 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 80, "end": 87, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 14 } }, "local": { "type": "Identifier", "start": 80, "end": 87, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 14 } }, "name": "Object3" } } ], "importKind": "value", "source": { "type": "Literal", "start": 93, "end": 111, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 38 } }, "value": "../three/object3", "rawValue": "../three/object3", "raw": "'../three/object3'" } }, { "type": "ExportDefaultDeclaration", "start": 116, "end": 10717, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 246, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 131, "end": 10717, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 246, "column": 1 } }, "id": { "type": "Identifier", "start": 137, "end": 148, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 32 } }, "name": "Interaction" }, "superClass": null, "body": { "type": "ClassBody", "start": 149, "end": 10717, "loc": { "start": { "line": 5, "column": 33 }, "end": { "line": 246, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 156, "end": 793, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 22, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 156, "end": 167, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 167, "end": 793, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 22, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 168, "end": 202, "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 6, "column": 50 } }, "operator": "=", "left": { "type": "Identifier", "start": 168, "end": 172, "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 6, "column": 20 } }, "name": "view" }, "right": { "type": "CallExpression", "start": 175, "end": 202, "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 50 } }, "callee": { "type": "MemberExpression", "start": 175, "end": 184, "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 32 } }, "object": { "type": "Identifier", "start": 175, "end": 180, "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 28 } }, "name": "Error" }, "property": { "type": "Identifier", "start": 181, "end": 184, "loc": { "start": { "line": 6, "column": 29 }, "end": { "line": 6, "column": 32 } }, "name": "log" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 185, "end": 201, "loc": { "start": { "line": 6, "column": 33 }, "end": { "line": 6, "column": 49 } }, "value": "View undefined", "rawValue": "View undefined", "raw": "\"View undefined\"" } ] } }, { "type": "AssignmentPattern", "start": 204, "end": 216, "loc": { "start": { "line": 6, "column": 52 }, "end": { "line": 6, "column": 64 } }, "operator": "=", "left": { "type": "Identifier", "start": 204, "end": 211, "loc": { "start": { "line": 6, "column": 52 }, "end": { "line": 6, "column": 59 } }, "name": "options" }, "right": { "type": "ObjectExpression", "start": 214, "end": 216, "loc": { "start": { "line": 6, "column": 62 }, "end": { "line": 6, "column": 64 } }, "properties": [] } } ], "body": { "type": "BlockStatement", "start": 218, "end": 793, "loc": { "start": { "line": 6, "column": 66 }, "end": { "line": 22, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 229, "end": 246, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 25 } }, "expression": { "type": "AssignmentExpression", "start": 229, "end": 245, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 24 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 229, "end": 238, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 17 } }, "object": { "type": "ThisExpression", "start": 229, "end": 233, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 12 } } }, "property": { "type": "Identifier", "start": 234, "end": 238, "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 17 } }, "name": "view" }, "computed": false }, "right": { "type": "Identifier", "start": 241, "end": 245, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 24 } }, "name": "view" } } }, { "type": "ExpressionStatement", "start": 256, "end": 282, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 34 } }, "expression": { "type": "AssignmentExpression", "start": 256, "end": 281, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 33 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 256, "end": 267, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 19 } }, "object": { "type": "ThisExpression", "start": 256, "end": 260, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } } }, "property": { "type": "Identifier", "start": 261, "end": 267, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 19 } }, "name": "canvas" }, "computed": false }, "right": { "type": "MemberExpression", "start": 270, "end": 281, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 33 } }, "object": { "type": "Identifier", "start": 270, "end": 274, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 26 } }, "name": "view" }, "property": { "type": "Identifier", "start": 275, "end": 281, "loc": { "start": { "line": 8, "column": 27 }, "end": { "line": 8, "column": 33 } }, "name": "canvas" }, "computed": false } } }, { "type": "ExpressionStatement", "start": 292, "end": 329, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 45 } }, "expression": { "type": "AssignmentExpression", "start": 292, "end": 328, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 44 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 292, "end": 306, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 22 } }, "object": { "type": "ThisExpression", "start": 292, "end": 296, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "property": { "type": "Identifier", "start": 297, "end": 306, "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 22 } }, "name": "raycaster" }, "computed": false }, "right": { "type": "NewExpression", "start": 309, "end": 328, "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 44 } }, "callee": { "type": "Identifier", "start": 313, "end": 322, "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 38 } }, "name": "Raycaster" }, "arguments": [ { "type": "ThisExpression", "start": 323, "end": 327, "loc": { "start": { "line": 9, "column": 39 }, "end": { "line": 9, "column": 43 } } } ] } } }, { "type": "ExpressionStatement", "start": 339, "end": 418, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 87 } }, "expression": { "type": "AssignmentExpression", "start": 339, "end": 417, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 86 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 339, "end": 351, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 20 } }, "object": { "type": "ThisExpression", "start": 339, "end": 343, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 344, "end": 351, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 20 } }, "name": "enabled" }, "computed": false }, "right": { "type": "ConditionalExpression", "start": 354, "end": 417, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 86 } }, "test": { "type": "BinaryExpression", "start": 354, "end": 392, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 61 } }, "left": { "type": "UnaryExpression", "start": 354, "end": 376, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 45 } }, "operator": "typeof", "prefix": true, "argument": { "type": "MemberExpression", "start": 361, "end": 376, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 45 } }, "object": { "type": "Identifier", "start": 361, "end": 368, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 37 } }, "name": "options" }, "property": { "type": "Identifier", "start": 369, "end": 376, "loc": { "start": { "line": 10, "column": 38 }, "end": { "line": 10, "column": 45 } }, "name": "enabled" }, "computed": false } }, "operator": "!==", "right": { "type": "Literal", "start": 381, "end": 392, "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 61 } }, "value": "undefined", "rawValue": "undefined", "raw": "'undefined'" } }, "consequent": { "type": "MemberExpression", "start": 395, "end": 410, "loc": { "start": { "line": 10, "column": 64 }, "end": { "line": 10, "column": 79 } }, "object": { "type": "Identifier", "start": 395, "end": 402, "loc": { "start": { "line": 10, "column": 64 }, "end": { "line": 10, "column": 71 } }, "name": "options" }, "property": { "type": "Identifier", "start": 403, "end": 410, "loc": { "start": { "line": 10, "column": 72 }, "end": { "line": 10, "column": 79 } }, "name": "enabled" }, "computed": false }, "alternate": { "type": "Literal", "start": 413, "end": 417, "loc": { "start": { "line": 10, "column": 82 }, "end": { "line": 10, "column": 86 } }, "value": true, "rawValue": true, "raw": "true" } } } }, { "type": "ExpressionStatement", "start": 428, "end": 446, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 26 } }, "expression": { "type": "AssignmentExpression", "start": 428, "end": 445, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 25 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 428, "end": 440, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 20 } }, "object": { "type": "ThisExpression", "start": 428, "end": 432, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "start": 433, "end": 440, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 20 } }, "name": "targets" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 443, "end": 445, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 25 } }, "elements": [] } } }, { "type": "ExpressionStatement", "start": 456, "end": 477, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 456, "end": 476, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 456, "end": 471, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 23 } }, "object": { "type": "ThisExpression", "start": 456, "end": 460, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 461, "end": 471, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 23 } }, "name": "intersects" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 474, "end": 476, "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 12, "column": 28 } }, "elements": [] } } }, { "type": "ExpressionStatement", "start": 487, "end": 502, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 23 } }, "expression": { "type": "AssignmentExpression", "start": 487, "end": 501, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 22 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 487, "end": 496, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 17 } }, "object": { "type": "ThisExpression", "start": 487, "end": 491, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "start": 492, "end": 496, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 17 } }, "name": "hits" }, "computed": false }, "right": { "type": "ObjectExpression", "start": 499, "end": 501, "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 22 } }, "properties": [] } } }, { "type": "ExpressionStatement", "start": 512, "end": 532, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 28 } }, "expression": { "type": "AssignmentExpression", "start": 512, "end": 531, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 27 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 512, "end": 526, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 22 } }, "object": { "type": "ThisExpression", "start": 512, "end": 516, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "start": 517, "end": 526, "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "c