UNPKG

awv3

Version:
1,418 lines (1,417 loc) 1.22 MB
{ "type": "Program", "start": 0, "end": 12166, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 277, "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": "ExportDefaultDeclaration", "start": 30, "end": 3982, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 106, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 45, "end": 3982, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 106, "column": 1 } }, "id": { "type": "Identifier", "start": 51, "end": 60, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 30 } }, "name": "Raycaster" }, "superClass": { "type": "MemberExpression", "start": 69, "end": 84, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 54 } }, "object": { "type": "Identifier", "start": 69, "end": 74, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 44 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 75, "end": 84, "loc": { "start": { "line": 3, "column": 45 }, "end": { "line": 3, "column": 54 } }, "name": "Raycaster" }, "computed": false }, "body": { "type": "ClassBody", "start": 85, "end": 3982, "loc": { "start": { "line": 3, "column": 55 }, "end": { "line": 106, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 92, "end": 993, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 25, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 92, "end": 103, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 103, "end": 993, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 25, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 104, "end": 115, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 27 } }, "name": "interaction" }, { "type": "AssignmentPattern", "start": 117, "end": 170, "loc": { "start": { "line": 4, "column": 29 }, "end": { "line": 4, "column": 82 } }, "operator": "=", "left": { "type": "Identifier", "start": 117, "end": 124, "loc": { "start": { "line": 4, "column": 29 }, "end": { "line": 4, "column": 36 } }, "name": "options" }, "right": { "type": "ObjectExpression", "start": 127, "end": 170, "loc": { "start": { "line": 4, "column": 39 }, "end": { "line": 4, "column": 82 } }, "properties": [ { "type": "Property", "start": 129, "end": 168, "loc": { "start": { "line": 4, "column": 41 }, "end": { "line": 4, "column": 80 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 129, "end": 137, "loc": { "start": { "line": 4, "column": 41 }, "end": { "line": 4, "column": 49 } }, "name": "approach" }, "value": { "type": "MemberExpression", "start": 139, "end": 168, "loc": { "start": { "line": 4, "column": 51 }, "end": { "line": 4, "column": 80 } }, "object": { "type": "MemberExpression", "start": 139, "end": 157, "loc": { "start": { "line": 4, "column": 51 }, "end": { "line": 4, "column": 69 } }, "object": { "type": "Identifier", "start": 139, "end": 148, "loc": { "start": { "line": 4, "column": 51 }, "end": { "line": 4, "column": 60 } }, "name": "Raycaster" }, "property": { "type": "Identifier", "start": 149, "end": 157, "loc": { "start": { "line": 4, "column": 61 }, "end": { "line": 4, "column": 69 } }, "name": "Approach" }, "computed": false }, "property": { "type": "Identifier", "start": 158, "end": 168, "loc": { "start": { "line": 4, "column": 70 }, "end": { "line": 4, "column": 80 } }, "name": "FirstMatch" }, "computed": false }, "kind": "init" } ] } } ], "body": { "type": "BlockStatement", "start": 172, "end": 993, "loc": { "start": { "line": 4, "column": 84 }, "end": { "line": 25, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 183, "end": 191, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 16 } }, "expression": { "type": "CallExpression", "start": 183, "end": 190, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 15 } }, "callee": { "type": "Super", "start": 183, "end": 188, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 13 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 201, "end": 232, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 39 } }, "expression": { "type": "AssignmentExpression", "start": 201, "end": 231, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 38 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 201, "end": 217, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 24 } }, "object": { "type": "ThisExpression", "start": 201, "end": 205, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 12 } } }, "property": { "type": "Identifier", "start": 206, "end": 217, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 24 } }, "name": "interaction" }, "computed": false }, "right": { "type": "Identifier", "start": 220, "end": 231, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 38 } }, "name": "interaction" } } }, { "type": "ExpressionStatement", "start": 242, "end": 271, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 242, "end": 270, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 242, "end": 251, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 17 } }, "object": { "type": "ThisExpression", "start": 242, "end": 246, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 12 } } }, "property": { "type": "Identifier", "start": 247, "end": 251, "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 17 } }, "name": "view" }, "computed": false }, "right": { "type": "MemberExpression", "start": 254, "end": 270, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 36 } }, "object": { "type": "Identifier", "start": 254, "end": 265, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 31 } }, "name": "interaction" }, "property": { "type": "Identifier", "start": 266, "end": 270, "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 7, "column": 36 } }, "name": "view" }, "computed": false } } }, { "type": "ExpressionStatement", "start": 281, "end": 304, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 31 } }, "expression": { "type": "AssignmentExpression", "start": 281, "end": 303, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 30 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 281, "end": 299, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 26 } }, "object": { "type": "ThisExpression", "start": 281, "end": 285, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } } }, "property": { "type": "Identifier", "start": 286, "end": 299, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 26 } }, "name": "linePrecision" }, "computed": false }, "right": { "type": "Literal", "start": 302, "end": 303, "loc": { "start": { "line": 8, "column": 29 }, "end": { "line": 8, "column": 30 } }, "value": 2, "rawValue": 2, "raw": "2" } } }, { "type": "ExpressionStatement", "start": 316, "end": 358, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 50 } }, "expression": { "type": "AssignmentExpression", "start": 316, "end": 357, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 49 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 316, "end": 335, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 27 } }, "object": { "type": "ThisExpression", "start": 316, "end": 320, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 321, "end": 335, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 27 } }, "name": "_inverseMatrix" }, "computed": false }, "right": { "type": "NewExpression", "start": 338, "end": 357, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 49 } }, "callee": { "type": "MemberExpression", "start": 342, "end": 355, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 47 } }, "object": { "type": "Identifier", "start": 342, "end": 347, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 39 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 348, "end": 355, "loc": { "start": { "line": 10, "column": 40 }, "end": { "line": 10, "column": 47 } }, "name": "Matrix4" }, "computed": false }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 368, "end": 396, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 368, "end": 395, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 35 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 368, "end": 377, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 17 } }, "object": { "type": "ThisExpression", "start": 368, "end": 372, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "start": 373, "end": 377, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 17 } }, "name": "_ray" }, "computed": false }, "right": { "type": "NewExpression", "start": 380, "end": 395, "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 384, "end": 393, "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 33 } }, "object": { "type": "Identifier", "start": 384, "end": 389, "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 29 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 390, "end": 393, "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 33 } }, "name": "Ray" }, "computed": false }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 406, "end": 440, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 42 } }, "expression": { "type": "AssignmentExpression", "start": 406, "end": 439, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 41 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 406, "end": 418, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 20 } }, "object": { "type": "ThisExpression", "start": 406, "end": 410, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 411, "end": 418, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 20 } }, "name": "_sphere" }, "computed": false }, "right": { "type": "NewExpression", "start": 421, "end": 439, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 41 } }, "callee": { "type": "MemberExpression", "start": 425, "end": 437, "loc": { "start": { "line": 12, "column": 27 }, "end": { "line": 12, "column": 39 } }, "object": { "type": "Identifier", "start": 425, "end": 430, "loc": { "start": { "line": 12, "column": 27 }, "end": { "line": 12, "column": 32 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 431, "end": 437, "loc": { "start": { "line": 12, "column": 33 }, "end": { "line": 12, "column": 39 } }, "name": "Sphere" }, "computed": false }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 450, "end": 481, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 39 } }, "expression": { "type": "AssignmentExpression", "start": 450, "end": 480, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 38 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 450, "end": 458, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 16 } }, "object": { "type": "ThisExpression", "start": 450, "end": 454, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "start": 455, "end": 458, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 16 } }, "name": "_vA" }, "computed": false }, "right": { "type": "NewExpression", "start": 461, "end": 480, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 38 } }, "callee": { "type": "MemberExpression", "start": 465, "end": 478, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 36 } }, "object": { "type": "Identifier", "start": 465, "end": 470, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 28 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 471, "end": 478, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 36 } }, "name": "Vector3" }, "computed": false }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 491, "end": 522, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 39 } }, "expression": { "type": "AssignmentExpression", "start": 491, "end": 521, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 38 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 491, "end": 499, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 16 } }, "object": { "type": "ThisExpression", "start": 491, "end": 495, "loc": { "start": {