UNPKG

awv3

Version:
1,304 lines (1,303 loc) 86.9 kB
{ "type": "Program", "start": 0, "end": 758, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 29, "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": 28, "end": 757, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 28, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 43, "end": 757, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 28, "column": 1 } }, "id": null, "superClass": { "type": "MemberExpression", "start": 57, "end": 80, "loc": { "start": { "line": 3, "column": 29 }, "end": { "line": 3, "column": 52 } }, "object": { "type": "Identifier", "start": 57, "end": 62, "loc": { "start": { "line": 3, "column": 29 }, "end": { "line": 3, "column": 34 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 63, "end": 80, "loc": { "start": { "line": 3, "column": 35 }, "end": { "line": 3, "column": 52 } }, "name": "PerspectiveCamera" }, "computed": false }, "body": { "type": "ClassBody", "start": 81, "end": 757, "loc": { "start": { "line": 3, "column": 53 }, "end": { "line": 28, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 87, "end": 755, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 27, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 87, "end": 98, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 98, "end": 755, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 27, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 99, "end": 111, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 28 } }, "operator": "=", "left": { "type": "Identifier", "start": 99, "end": 106, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 23 } }, "name": "options" }, "right": { "type": "ObjectExpression", "start": 109, "end": 111, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 28 } }, "properties": [] } } ], "body": { "type": "BlockStatement", "start": 113, "end": 755, "loc": { "start": { "line": 4, "column": 30 }, "end": { "line": 27, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 123, "end": 131, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 16 } }, "expression": { "type": "CallExpression", "start": 123, "end": 130, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 15 } }, "callee": { "type": "Super", "start": 123, "end": 128, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 13 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 141, "end": 421, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 16, "column": 10 } }, "expression": { "type": "AssignmentExpression", "start": 141, "end": 420, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 16, "column": 9 } }, "operator": "=", "left": { "type": "Identifier", "start": 141, "end": 148, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 15 } }, "name": "options" }, "right": { "type": "ObjectExpression", "start": 151, "end": 420, "loc": { "start": { "line": 7, "column": 18 }, "end": { "line": 16, "column": 9 } }, "properties": [ { "type": "Property", "start": 165, "end": 172, "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 19 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 165, "end": 168, "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 15 } }, "name": "fov" }, "value": { "type": "Literal", "start": 170, "end": 172, "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 19 } }, "value": 30, "rawValue": 30, "raw": "30" }, "kind": "init" }, { "type": "Property", "start": 186, "end": 195, "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 21 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 186, "end": 192, "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } }, "name": "aspect" }, "value": { "type": "Literal", "start": 194, "end": 195, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 21 } }, "value": 0, "rawValue": 0, "raw": "0" }, "kind": "init" }, { "type": "Property", "start": 209, "end": 216, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 19 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 209, "end": 213, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 16 } }, "name": "near" }, "value": { "type": "Literal", "start": 215, "end": 216, "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 10, "column": 19 } }, "value": 5, "rawValue": 5, "raw": "5" }, "kind": "init" }, { "type": "Property", "start": 230, "end": 241, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 23 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 230, "end": 233, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 15 } }, "name": "far" }, "value": { "type": "Literal", "start": 235, "end": 241, "loc": { "start": { "line": 11, "column": 17 }, "end": { "line": 11, "column": 23 } }, "value": 100000, "rawValue": 100000, "raw": "100000" }, "kind": "init" }, { "type": "Property", "start": 255, "end": 289, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 46 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 255, "end": 261, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 18 } }, "name": "target" }, "value": { "type": "NewExpression", "start": 263, "end": 289, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 46 } }, "callee": { "type": "MemberExpression", "start": 267, "end": 280, "loc": { "start": { "line": 12, "column": 24 }, "end": { "line": 12, "column": 37 } }, "object": { "type": "Identifier", "start": 267, "end": 272, "loc": { "start": { "line": 12, "column": 24 }, "end": { "line": 12, "column": 29 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 273, "end": 280, "loc": { "start": { "line": 12, "column": 30 }, "end": { "line": 12, "column": 37 } }, "name": "Vector3" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 281, "end": 282, "loc": { "start": { "line": 12, "column": 38 }, "end": { "line": 12, "column": 39 } }, "value": 0, "rawValue": 0, "raw": "0" }, { "type": "Literal", "start": 284, "end": 285, "loc": { "start": { "line": 12, "column": 41 }, "end": { "line": 12, "column": 42 } }, "value": 0, "rawValue": 0, "raw": "0" }, { "type": "Literal", "start": 287, "end": 288, "loc": { "start": { "line": 12, "column": 44 }, "end": { "line": 12, "column": 45 } }, "value": 0, "rawValue": 0, "raw": "0" } ] }, "kind": "init" }, { "type": "Property", "start": 303, "end": 342, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 51 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 303, "end": 311, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 20 } }, "name": "position" }, "value": { "type": "NewExpression", "start": 313, "end": 342, "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 51 } }, "callee": { "type": "MemberExpression", "start": 317, "end": 330, "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 39 } }, "object": { "type": "Identifier", "start": 317, "end": 322, "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 31 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 323, "end": 330, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 39 } }, "name": "Vector3" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 331, "end": 332, "loc": { "start": { "line": 13, "column": 40 }, "end": { "line": 13, "column": 41 } }, "value": 0, "rawValue": 0, "raw": "0" }, { "type": "Literal", "start": 334, "end": 335, "loc": { "start": { "line": 13, "column": 43 }, "end": { "line": 13, "column": 44 } }, "value": 0, "rawValue": 0, "raw": "0" }, { "type": "Literal", "start": 337, "end": 341, "loc": { "start": { "line": 13, "column": 46 }, "end": { "line": 13, "column": 50 } }, "value": 1000, "rawValue": 1000, "raw": "1000" } ] }, "kind": "init" }, { "type": "Property", "start": 356, "end": 386, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 42 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 356, "end": 358, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 14 } }, "name": "up" }, "value": { "type": "NewExpression", "start": 360, "end": 386, "loc": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 364, "end": 377, "loc": { "start": { "line": 14, "column": 20 }, "end": { "line": 14, "column": 33 } }, "object": { "type": "Identifier", "start": 364, "end": 369, "loc": { "start": { "line": 14, "column": 20 }, "end": { "line": 14, "column": 25 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 370, "end": 377, "loc": { "start": { "line": 14, "column": 26 }, "end": { "line": 14, "column": 33 } }, "name": "Vector3" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 378, "end": 379, "loc": { "start": { "line": 14, "column": 34 }, "end": { "line": 14, "column": 35 } }, "value": 0, "rawValue": 0, "raw": "0" }, { "type": "Literal", "start": 381, "end": 382, "loc": { "start": { "line": 14, "column": 37 }, "end": { "line": 14, "column": 38 } }, "value": 0, "rawValue": 0, "raw": "0" }, { "type": "Literal", "start": 384, "end": 385, "loc": { "start": { "line": 14, "column": 40 }, "end": { "line": 14, "column": 41 } }, "value": 1, "rawValue": 1, "raw": "1" } ] }, "kind": "init" }, { "type": "SpreadProperty", "start": 400, "end": 410, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 22 } }, "argument": { "type": "Identifier", "start": 403, "end": 410, "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 22 } }, "name": "options" } } ] } } }, { "type": "ExpressionStatement", "start": 431, "end": 454, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 31 } }, "expression": { "type": "AssignmentExpression", "start": 431, "end": 453, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 30 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 431, "end": 439, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 16 } }, "object": { "type": "ThisExpression", "start": 431, "end": 435, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 12 } } }, "property": { "type": "Identifier", "start": 436, "end": 439, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 16 } }, "name": "fov" }, "computed": false }, "right": { "type": "MemberExpression", "start": 442, "end": 453, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 30 } }, "object": { "type": "Identifier", "start": 442, "end": 449, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 26 } }, "name": "options" }, "property": { "type": "Identifier", "start": 450, "end": 453, "loc": { "start": { "line": 18, "column": 27 }, "end": { "line": 18, "column": 30 } }, "name": "fov" }, "computed": false } } }, { "type": "ExpressionStatement", "start": 463, "end": 492, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 463, "end": 491, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 463, "end": 474, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 19 } }, "object": { "type": "ThisExpression", "start": 463, "end": 467, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 12 } } }, "property": { "type": "Identifier", "start": 468, "end": 474, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 19 }