UNPKG

awv3

Version:
1,669 lines (1,668 loc) 1.8 MB
{ "type": "Program", "start": 0, "end": 15551, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 502, "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": 27, "end": 66, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 39 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 34, "end": 39, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "local": { "type": "Identifier", "start": 34, "end": 39, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "name": "Tween" } } ], "importKind": "value", "source": { "type": "Literal", "start": 45, "end": 65, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 2, "column": 38 } }, "value": "../animation/tween", "rawValue": "../animation/tween", "raw": "'../animation/tween'" } }, { "type": "ImportDeclaration", "start": 67, "end": 103, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 36 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 74, "end": 80, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 } }, "local": { "type": "Identifier", "start": 74, "end": 80, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 } }, "name": "Events" } } ], "importKind": "value", "source": { "type": "Literal", "start": 86, "end": 102, "loc": { "start": { "line": 3, "column": 19 }, "end": { "line": 3, "column": 35 } }, "value": "../core/events", "rawValue": "../core/events", "raw": "'../core/events'" } }, { "type": "ImportDeclaration", "start": 104, "end": 147, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 43 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 111, "end": 120, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 16 } }, "local": { "type": "Identifier", "start": 111, "end": 120, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 16 } }, "name": "Raycaster" } } ], "importKind": "value", "source": { "type": "Literal", "start": 126, "end": 146, "loc": { "start": { "line": 4, "column": 22 }, "end": { "line": 4, "column": 42 } }, "value": "../three/raycaster", "rawValue": "../three/raycaster", "raw": "'../three/raycaster'" } }, { "type": "ExportDefaultDeclaration", "start": 149, "end": 359, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 12, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 164, "end": 359, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 12, "column": 1 } }, "id": { "type": "Identifier", "start": 170, "end": 177, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 28 } }, "name": "Object3" }, "superClass": { "type": "MemberExpression", "start": 186, "end": 200, "loc": { "start": { "line": 6, "column": 37 }, "end": { "line": 6, "column": 51 } }, "object": { "type": "Identifier", "start": 186, "end": 191, "loc": { "start": { "line": 6, "column": 37 }, "end": { "line": 6, "column": 42 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 192, "end": 200, "loc": { "start": { "line": 6, "column": 43 }, "end": { "line": 6, "column": 51 } }, "name": "Object3D" }, "computed": false }, "body": { "type": "ClassBody", "start": 201, "end": 359, "loc": { "start": { "line": 6, "column": 52 }, "end": { "line": 12, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 204, "end": 357, "loc": { "start": { "line": 7, "column": 1 }, "end": { "line": 11, "column": 2 } }, "computed": false, "key": { "type": "Identifier", "start": 204, "end": 215, "loc": { "start": { "line": 7, "column": 1 }, "end": { "line": 7, "column": 12 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 215, "end": 357, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 11, "column": 2 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 216, "end": 235, "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 32 } }, "operator": "=", "left": { "type": "Identifier", "start": 216, "end": 223, "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 20 } }, "name": "objects" }, "right": { "type": "Identifier", "start": 226, "end": 235, "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 32 } }, "name": "undefined" } }, { "type": "AssignmentPattern", "start": 237, "end": 256, "loc": { "start": { "line": 7, "column": 34 }, "end": { "line": 7, "column": 53 } }, "operator": "=", "left": { "type": "Identifier", "start": 237, "end": 244, "loc": { "start": { "line": 7, "column": 34 }, "end": { "line": 7, "column": 41 } }, "name": "options" }, "right": { "type": "Identifier", "start": 247, "end": 256, "loc": { "start": { "line": 7, "column": 44 }, "end": { "line": 7, "column": 53 } }, "name": "undefined" } } ], "body": { "type": "BlockStatement", "start": 258, "end": 357, "loc": { "start": { "line": 7, "column": 55 }, "end": { "line": 11, "column": 2 } }, "body": [ { "type": "ExpressionStatement", "start": 262, "end": 270, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 8, "column": 10 } }, "expression": { "type": "CallExpression", "start": 262, "end": 269, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 8, "column": 9 } }, "callee": { "type": "Super", "start": 262, "end": 267, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 8, "column": 7 } } }, "arguments": [] } }, { "type": "IfStatement", "start": 279, "end": 318, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 47 } }, "test": { "type": "UnaryExpression", "start": 283, "end": 292, "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 21 } }, "operator": "!", "prefix": true, "argument": { "type": "UnaryExpression", "start": 284, "end": 292, "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 21 } }, "operator": "!", "prefix": true, "argument": { "type": "Identifier", "start": 285, "end": 292, "loc": { "start": { "line": 9, "column": 14 }, "end": { "line": 9, "column": 21 } }, "name": "options" } } }, "consequent": { "type": "ExpressionStatement", "start": 294, "end": 318, "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 47 } }, "expression": { "type": "CallExpression", "start": 294, "end": 317, "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 46 } }, "callee": { "type": "MemberExpression", "start": 294, "end": 308, "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 37 } }, "object": { "type": "ThisExpression", "start": 294, "end": 298, "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 27 } } }, "property": { "type": "Identifier", "start": 299, "end": 308, "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 37 } }, "name": "setValues" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 309, "end": 316, "loc": { "start": { "line": 9, "column": 38 }, "end": { "line": 9, "column": 45 } }, "name": "options" } ] } }, "alternate": null }, { "type": "IfStatement", "start": 321, "end": 354, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 35 } }, "test": { "type": "UnaryExpression", "start": 325, "end": 334, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 15 } }, "operator": "!", "prefix": true, "argument": { "type": "UnaryExpression", "start": 326, "end": 334, "loc": { "start": { "line": 10, "column": 7 }, "end": { "line": 10, "column": 15 } }, "operator": "!", "prefix": true, "argument": { "type": "Identifier", "start": 327, "end": 334, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 15 } }, "name": "objects" } } }, "consequent": { "type": "ExpressionStatement", "start": 336, "end": 354, "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 35 } }, "expression": { "type": "CallExpression", "start": 336, "end": 353, "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 34 } }, "callee": { "type": "MemberExpression", "start": 336, "end": 344, "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 25 } }, "object": { "type": "ThisExpression", "start": 336, "end": 340, "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 21 } } }, "property": { "type": "Identifier", "start": 341, "end": 344, "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 25 } }, "name": "add" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 345, "end": 352, "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 33 } }, "name": "objects" } ] } }, "alternate": null } ] } } } ] }, "leadingComments": [], "trailingComments": [] } }, { "type": "ExpressionStatement", "start": 361, "end": 825, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 33, "column": 1 } }, "expression": { "type": "AssignmentExpression", "start": 361, "end": 825, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 33, "column": 1 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 361, "end": 382, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 14, "column": 21 } }, "object": { "type": "MemberExpression", "start": 361, "end": 375, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 14, "column": 14 } }, "object": { "type": "Identifier", "start": 361, "end": 366, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 14, "column": 5 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 367, "end": 375, "loc": { "start": { "line": 14, "column": 6 }, "end": { "line": 14, "column": 14 } }, "name": "Object3D" }, "computed": false }, "property": { "type": "Identifier", "start": 376, "end": 382, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 21 } }, "name": "Events" }, "computed": false }, "right": { "type": "ObjectExpression", "start": 385, "end": 825, "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 33, "column": 1 } }, "properties": [ { "type": "Property", "start": 391, "end": 634, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 24, "column": 5 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 391, "end": 400, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 13 } }, "name": "Lifecycle" }, "value": { "type": "ObjectExpression", "start": 402, "end": 634, "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 24, "column": 5 } }, "properties": [ { "type": "Property", "start": 409, "end": 425, "loc": { "start": { "line": 16, "column": 5 }, "end": { "line": 16, "column": 21 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 409, "end": 415, "loc": { "start": { "line": 16, "column": 5 }, "end": { "line": 16, "column": 11 } }, "name": "Loaded" }, "value": { "type": "Literal", "start": 417, "end": 425, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 21 } }, "value": "Loaded", "rawValue": "Loaded", "raw": "'Loaded'" }, "kind": "init" }, { "type": "Property", "start": 432, "end": 446, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 19 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 432, "end": 437, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 10 } }, "name": "Added" }, "value": { "type": "Literal", "start": 439, "end": 446, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 19 } }, "value": "Added", "rawValue": "Added", "raw": "'Added'" }, "kind": "init" }, { "type": "Property", "start": 456, "end": 478, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 30 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 456, "end": 465, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 17 } }, "name": "ViewFound" }, "value": { "type": "Literal", "start": 467, "end": 478, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 30 } }, "value": "ViewFound", "rawValue": "ViewFound", "raw": "'ViewFound'" }, "kind": "init" }, { "type": "Property", "start": 485, "end": 509, "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 29 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 485, "end": 495, "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 15 } }, "name": "ChildAdded" }, "value": { "type": "Literal", "start": 497, "end": 509, "loc": { "start": { "line": 19, "column": 17 }, "end": { "line": 19, "column": 29 } }, "value": "ChildAdded", "rawValue": "ChildAdded", "raw": "'ChildAdded'" }, "kind": "init" }, { "type": "Property", "start": 516, "end": 534, "loc": { "start": { "line": 20, "column": 5 }, "end": { "line": 20, "column": 23 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 516, "end": 523, "loc": { "start": { "line": 20, "column": 5 }, "end": { "line": 20, "column": 12 } }, "name": "Removed" }, "value": { "type": "Literal", "start": 525, "end": 534, "loc": { "start": { "line": 20, "column": 14 }, "end": { "line": 20, "column": 23 } }, "value": "Removed", "rawValue": "Removed", "raw": "'Removed'" }, "kind": "init" }, { "type": "Property", "start": 541, "end": 569, "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 21, "column": 33 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 541, "end": 553, "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 21, "column": 17 } }, "name": "ChildRemoved" }, "value": { "type": "Literal", "start": 555, "end": 569, "loc": { "start": { "line": 21, "column": 19 }, "end": { "line": 21, "column": 33 } }, "value": "ChildRemoved", "rawValue": "ChildRemoved", "raw": "'ChildRemoved'" }, "kind": "init" }, { "type": "Property", "start": 576, "end": 598, "loc": { "start": { "line": 22, "column": 5 }, "end": { "line": 22, "column": 27 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 576, "end": 585, "loc": { "start": { "line": 22, "column": 5 }, "end": { "line": 22, "column": 14 } }, "name": "Destroyed" }, "value": { "type": "Literal", "start": 587, "end": 598, "loc": { "start": { "line": 22, "column": 16 }, "end": { "line": 22, "column": 27 } }, "value": "Destroyed", "rawValue": "Destroyed", "raw": "'Destroyed'" }, "kind": "init" }, { "type": "Property", "start": 608, "end": 628, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 28 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 608, "end": 616, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 16 } }, "name": "Rendered" }, "value": { "type": "Literal", "start": 618, "end": 628, "loc": { "start": { "line": 23, "column": 18 }, "end": { "line": 23, "column": 28 } }, "value": "Rendered", "rawValue": "Rendered", "raw": "'Rendered'" }, "kind": "init" } ] }, "kind": "init" }, { "type": "Property", "start": 640, "end": 823, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 32, "column": 5 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 640, "end": 651, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 15 } }, "name": "Interaction" }, "value": { "type": "ObjectExpression", "start": 653, "end": 823, "loc": { "start": { "line": 25, "column": 17 }, "end": { "line": 32, "column": 5 } }, "properties": [ { "type": "Property", "start": 663, "end": 681, "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 26 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 663, "end": 670, "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 15 } }, "name": "Clicked" }, "value": { "type": "Literal", "start": 672, "end": 681, "loc": { "start": { "line": 26, "column": 17 }, "end": { "line": 26, "column": 26 } }, "value": "Clicked", "rawValue": "Clicked", "raw": "'Clicked'" }, "kind": "init" }, { "type": "Property", "start": 691, "end": 707, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 24 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 691, "end": 697, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 14 } }, "name": "Picked" }, "value": {