UNPKG

awv3

Version:
1,395 lines 2.6 MB
{ "type": "File", "start": 0, "end": 12488, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 288, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 12488, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 288, "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": 4475, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 117, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 48, "end": 4475, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 117, "column": 1 } }, "id": { "type": "Identifier", "start": 54, "end": 63, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 30 }, "identifierName": "Raycaster" }, "name": "Raycaster" }, "superClass": { "type": "MemberExpression", "start": 72, "end": 87, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 54 } }, "object": { "type": "Identifier", "start": 72, "end": 77, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 44 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 78, "end": 87, "loc": { "start": { "line": 3, "column": 45 }, "end": { "line": 3, "column": 54 }, "identifierName": "Raycaster" }, "name": "Raycaster" }, "computed": false }, "body": { "type": "ClassBody", "start": 88, "end": 4475, "loc": { "start": { "line": 3, "column": 55 }, "end": { "line": 117, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 94, "end": 976, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 25, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 94, "end": 105, "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": 106, "end": 117, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 27 }, "identifierName": "interaction" }, "name": "interaction" }, { "type": "AssignmentPattern", "start": 119, "end": 172, "loc": { "start": { "line": 4, "column": 29 }, "end": { "line": 4, "column": 82 } }, "left": { "type": "Identifier", "start": 119, "end": 126, "loc": { "start": { "line": 4, "column": 29 }, "end": { "line": 4, "column": 36 }, "identifierName": "options" }, "name": "options" }, "right": { "type": "ObjectExpression", "start": 129, "end": 172, "loc": { "start": { "line": 4, "column": 39 }, "end": { "line": 4, "column": 82 } }, "properties": [ { "type": "ObjectProperty", "start": 131, "end": 170, "loc": { "start": { "line": 4, "column": 41 }, "end": { "line": 4, "column": 80 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 131, "end": 139, "loc": { "start": { "line": 4, "column": 41 }, "end": { "line": 4, "column": 49 }, "identifierName": "approach" }, "name": "approach" }, "value": { "type": "MemberExpression", "start": 141, "end": 170, "loc": { "start": { "line": 4, "column": 51 }, "end": { "line": 4, "column": 80 } }, "object": { "type": "MemberExpression", "start": 141, "end": 159, "loc": { "start": { "line": 4, "column": 51 }, "end": { "line": 4, "column": 69 } }, "object": { "type": "Identifier", "start": 141, "end": 150, "loc": { "start": { "line": 4, "column": 51 }, "end": { "line": 4, "column": 60 }, "identifierName": "Raycaster" }, "name": "Raycaster" }, "property": { "type": "Identifier", "start": 151, "end": 159, "loc": { "start": { "line": 4, "column": 61 }, "end": { "line": 4, "column": 69 }, "identifierName": "Approach" }, "name": "Approach" }, "computed": false }, "property": { "type": "Identifier", "start": 160, "end": 170, "loc": { "start": { "line": 4, "column": 70 }, "end": { "line": 4, "column": 80 }, "identifierName": "FirstMatch" }, "name": "FirstMatch" }, "computed": false } } ] } } ], "body": { "type": "BlockStatement", "start": 174, "end": 976, "loc": { "start": { "line": 4, "column": 84 }, "end": { "line": 25, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 184, "end": 192, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 16 } }, "expression": { "type": "CallExpression", "start": 184, "end": 191, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 15 } }, "callee": { "type": "Super", "start": 184, "end": 189, "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 }, "identifierName": "interaction" }, "name": "interaction" }, "computed": false }, "right": { "type": "Identifier", "start": 220, "end": 231, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 38 }, "identifierName": "interaction" }, "name": "interaction" } } }, { "type": "ExpressionStatement", "start": 241, "end": 270, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 241, "end": 269, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 241, "end": 250, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 17 } }, "object": { "type": "ThisExpression", "start": 241, "end": 245, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 12 } } }, "property": { "type": "Identifier", "start": 246, "end": 250, "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 17 }, "identifierName": "view" }, "name": "view" }, "computed": false }, "right": { "type": "MemberExpression", "start": 253, "end": 269, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 36 } }, "object": { "type": "Identifier", "start": 253, "end": 264, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 31 }, "identifierName": "interaction" }, "name": "interaction" }, "property": { "type": "Identifier", "start": 265, "end": 269, "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 7, "column": 36 }, "identifierName": "view" }, "name": "view" }, "computed": false } } }, { "type": "ExpressionStatement", "start": 279, "end": 304, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 279, "end": 303, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 279, "end": 297, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 26 } }, "object": { "type": "ThisExpression", "start": 279, "end": 283, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } } }, "property": { "type": "Identifier", "start": 284, "end": 297, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 26 }, "identifierName": "linePrecision" }, "name": "linePrecision" }, "computed": false }, "right": { "type": "NumericLiteral", "start": 300, "end": 303, "loc": { "start": { "line": 8, "column": 29 }, "end": { "line": 8, "column": 32 } }, "extra": { "rawValue": 0.1, "raw": "0.1" }, "value": 0.1 } } }, { "type": "ExpressionStatement", "start": 314, "end": 356, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 50 } }, "expression": { "type": "AssignmentExpression", "start": 314, "end": 355, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 49 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 314, "end": 333, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 27 } }, "object": { "type": "ThisExpression", "start": 314, "end": 318, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 319, "end": 333, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 27 }, "identifierName": "_inverseMatrix" }, "name": "_inverseMatrix" }, "computed": false }, "right": { "type": "NewExpression", "start": 336, "end": 355, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 49 } }, "callee": { "type": "MemberExpression", "start": 340, "end": 353, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 47 } }, "object": { "type": "Identifier", "start": 340, "end": 345, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 39 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 346, "end": 353, "loc": { "start": { "line": 10, "column": 40 }, "end": { "line": 10, "column": 47 }, "identifierName": "Matrix4" }, "name": "Matrix4" }, "computed": false }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 365, "end": 393, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 365, "end": 392, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 35 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 365, "end": 374, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 17 } }, "object": { "type": "ThisExpression", "start": 365, "end": 369, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "start": 370, "end": 374, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 17 }, "identifierName": "_ray" }, "name": "_ray" }, "computed": false }, "right": { "type": "NewExpression", "start": 377, "end": 392, "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 381, "end": 390, "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 33 } }, "object": { "type": "Identifier", "start": 381, "end": 386, "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 29 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 387, "end": 390, "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 33 }, "identifierName": "Ray" }, "name": "Ray" }, "computed": false }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 402, "end": 436, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 42 } }, "expression": { "type": "AssignmentExpression", "start": 402, "end": 435, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 41 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 402, "end": 414, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 20 } }, "object": { "type": "ThisExpression", "start": 402, "end": 406, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 407, "end": 414, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 20 }, "identifierName": "_sphere" }, "name": "_sphere" }, "computed": false }, "right": { "type": "NewExpression", "start": 417, "end": 435, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 41 } }, "callee": { "type": "MemberExpression", "start": 421, "end": 433, "loc": { "start": { "line": 12, "column": 27 }, "end": { "line": 12, "column": 39 } }, "object": { "type": "Identifier", "start": 421, "end": 426, "loc": { "start": { "line": 12, "column": 27 }, "end": { "line": 12, "column": 32 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 427, "end": 433, "loc": { "start": { "line": 12, "column": 33 }, "end": { "line": 12, "column": 39 }, "identifierName": "Sphere" }, "name": "Sphere" }, "computed": false }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 445, "end": 476, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 39 } }, "expression": { "type": "AssignmentExpression", "start": 445, "end": 475, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 38 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 445, "end": 453, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 16 } }, "object": { "type": "ThisExpression", "start": 445, "end": 449, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "start": 450, "end": 453, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 16 }, "identifierName": "_vA" }, "name": "_vA" }, "computed": false }, "right": { "type": "NewExpression", "start": 456, "end": 475, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 38 } }, "callee": { "type": "MemberExpression", "start": 460, "end": 473, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 36 } }, "object": { "type": "Identifier", "start": 460, "end": 465, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 28 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 466, "end": 473, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 36 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments