UNPKG

awv3

Version:
1,469 lines (1,468 loc) 430 kB
{ "type": "File", "start": 0, "end": 2369, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 74, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 2369, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 74, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 45, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 45 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 14, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } }, "local": { "type": "Identifier", "start": 7, "end": 14, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 }, "identifierName": "Object3" }, "name": "Object3" } } ], "source": { "type": "StringLiteral", "start": 20, "end": 44, "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 44 } }, "extra": { "rawValue": "../../../three/object3", "raw": "'../../../three/object3'" }, "value": "../../../three/object3" } }, { "type": "ImportDeclaration", "start": 46, "end": 79, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 33 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 53, "end": 60, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "local": { "type": "Identifier", "start": 53, "end": 60, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 }, "identifierName": "Snapper" }, "name": "Snapper" } } ], "source": { "type": "StringLiteral", "start": 66, "end": 78, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 32 } }, "extra": { "rawValue": "../snapper", "raw": "'../snapper'" }, "value": "../snapper" } }, { "type": "ExportDefaultDeclaration", "start": 81, "end": 2247, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 71, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 96, "end": 2247, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 71, "column": 1 } }, "id": { "type": "Identifier", "start": 102, "end": 113, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 32 }, "identifierName": "BaseHandler" }, "name": "BaseHandler" }, "superClass": null, "body": { "type": "ClassBody", "start": 114, "end": 2247, "loc": { "start": { "line": 4, "column": 33 }, "end": { "line": 71, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 120, "end": 331, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 11, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 120, "end": 131, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 132, "end": 140, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 24 }, "identifierName": "sketcher" }, "name": "sketcher" }, { "type": "Identifier", "start": 142, "end": 146, "loc": { "start": { "line": 5, "column": 26 }, "end": { "line": 5, "column": 30 }, "identifierName": "name" }, "name": "name" } ], "body": { "type": "BlockStatement", "start": 148, "end": 331, "loc": { "start": { "line": 5, "column": 32 }, "end": { "line": 11, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 158, "end": 183, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 158, "end": 182, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 158, "end": 171, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 21 } }, "object": { "type": "ThisExpression", "start": 158, "end": 162, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 12 } } }, "property": { "type": "Identifier", "start": 163, "end": 171, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 21 }, "identifierName": "sketcher" }, "name": "sketcher" }, "computed": false }, "right": { "type": "Identifier", "start": 174, "end": 182, "loc": { "start": { "line": 6, "column": 24 }, "end": { "line": 6, "column": 32 }, "identifierName": "sketcher" }, "name": "sketcher" } } }, { "type": "ExpressionStatement", "start": 192, "end": 228, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 44 } }, "expression": { "type": "AssignmentExpression", "start": 192, "end": 227, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 43 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 192, "end": 203, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 19 } }, "object": { "type": "ThisExpression", "start": 192, "end": 196, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 12 } } }, "property": { "type": "Identifier", "start": 197, "end": 203, "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 19 }, "identifierName": "sketch" }, "name": "sketch" }, "computed": false }, "right": { "type": "MemberExpression", "start": 206, "end": 227, "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 43 } }, "object": { "type": "Identifier", "start": 206, "end": 214, "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 30 }, "identifierName": "sketcher" }, "name": "sketcher" }, "property": { "type": "Identifier", "start": 215, "end": 227, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 43 }, "identifierName": "activeSketch" }, "name": "activeSketch" }, "computed": false } } }, { "type": "ExpressionStatement", "start": 237, "end": 254, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 25 } }, "expression": { "type": "AssignmentExpression", "start": 237, "end": 253, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 24 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 237, "end": 246, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 17 } }, "object": { "type": "ThisExpression", "start": 237, "end": 241, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } } }, "property": { "type": "Identifier", "start": 242, "end": 246, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 17 }, "identifierName": "name" }, "name": "name" }, "computed": false }, "right": { "type": "Identifier", "start": 249, "end": 253, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 24 }, "identifierName": "name" }, "name": "name" } } }, { "type": "ExpressionStatement", "start": 263, "end": 293, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 263, "end": 292, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 263, "end": 280, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 25 } }, "object": { "type": "ThisExpression", "start": 263, "end": 267, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "property": { "type": "Identifier", "start": 268, "end": 280, "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 25 }, "identifierName": "interactions" }, "name": "interactions" }, "computed": false }, "right": { "type": "NewExpression", "start": 283, "end": 292, "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 37 } }, "callee": { "type": "Identifier", "start": 287, "end": 290, "loc": { "start": { "line": 9, "column": 32 }, "end": { "line": 9, "column": 35 }, "identifierName": "Map" }, "name": "Map" }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 302, "end": 325, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 31 } }, "expression": { "type": "CallExpression", "start": 302, "end": 324, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 30 } }, "callee": { "type": "MemberExpression", "start": 302, "end": 322, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 28 } }, "object": { "type": "ThisExpression", "start": 302, "end": 306, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 307, "end": 322, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 28 }, "identifierName": "addInteractions" }, "name": "addInteractions" }, "computed": false }, "arguments": [] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 337, "end": 403, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 15, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 337, "end": 344, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 11 }, "identifierName": "destroy" }, "name": "destroy" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 345, "end": 352, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 19 }, "identifierName": "options" }, "name": "options" } ], "body": { "type": "BlockStatement", "start": 354, "end": 403, "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 15, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 364, "end": 397, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 41 } }, "expression": { "type": "CallExpression", "start": 364, "end": 396, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 40 } }, "callee": { "type": "MemberExpression", "start": 364, "end": 387, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 31 } }, "object": { "type": "ThisExpression", "start": 364, "end": 368, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "start": 369, "end": 387, "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 31 }, "identifierName": "removeInteractions" }, "name": "removeInteractions" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 388, "end": 395, "loc": { "start": { "line": 14, "column": 32 }, "end": { "line": 14, "column": 39 }, "identifierName": "options" }, "name": "options" } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 409, "end": 475, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 19, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 409, "end": 437, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 32 }, "identifierName": "filterObjectsWithInteraction" }, "name": "filterObjectsWithInteraction" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 438, "end": 444, "loc": { "start": { "line": 17, "column": 33 }, "end": { "line": 17, "column": 39 }, "identifierName": "object" }, "name": "object" } ], "body": { "type": "BlockStatement", "start": 446, "end": 475, "loc": { "start": { "line": 17, "column": 41 }, "end": { "line": 19, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 456, "end": 469, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 21 } }, "argument": { "type": "BooleanLiteral", "start": 463, "end": 468, "loc": { "start": { "line": 18, "column": 15 }, "end": { "line": 18, "column": 20 } }, "value": false } } ], "directives": [] } }, { "type": "ClassMethod", "start": 481, "end": 1014, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 29, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 481, "end": 495, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 18 }, "identifierName": "addInteraction" }, "name": "addInteraction" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 496, "end": 502, "loc": { "start": { "line": 21, "column": 19 }, "end": { "line": 21, "column": 25 }, "identifierName": "object" }, "name": "object" }, { "type": "Identifier", "start": 504, "end": 524, "loc": { "start": { "line": 21, "column": 27 }, "end": { "line": 21, "column": 47 }, "identifierName": "interactionListeners" }, "name": "interactionListeners" } ], "body": { "type": "BlockStatement", "start": 526, "end": 1014, "loc": { "start": { "line": 21, "column": 49 }, "end": { "line": 29, "column": 5 } }, "body": [ { "type": "ForOfStatement", "start": 536, "end": 703, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 24, "column": 77 } }, "left": { "type": "VariableDeclaration", "start": 541, "end": 550, "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 22 } }, "declarations": [ { "type": "VariableDeclarator", "start": 545, "end": 550, "loc": { "start": { "line": 22, "column": 17 }, "end": { "line": 22, "column": 22 } }, "id": { "type": "Identifier", "start": 545, "end": 550, "loc": { "start": { "line": 22, "column": 17 }, "end": { "line": 22, "column": 22 }, "identifierName": "event" }, "name": "event" }, "init": null } ], "kind": "let" }, "right": { "type": "CallExpression", "start": 554, "end": 595, "loc": { "start": { "line": 22, "column": 26 }, "end": { "line": 22, "column": 67 } }, "callee": { "type": "MemberExpression", "start": 554, "end": 567, "loc": { "start": { "line": 22, "column": 26 }, "end": { "line": 22, "column": 39 } }, "object": { "type": "Identifier", "start": 554, "end": 560, "loc": { "start": { "line": 22, "column": 26 }, "end": { "line": 22, "column": 32 }, "identifierName": "Object" }, "name": "Object" }, "property": { "type": "Identifier", "start": 561, "end": 567, "loc": { "start": { "line": 22, "column": 33 }, "end": { "line": 22, "column": 39 }, "identifierName": "values" }, "name": "values" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 568, "end": 594, "loc": { "start": { "line": 22, "column": 40 }, "end": { "line": 22, "column": 66 } }, "object": { "type": "MemberExpression", "start": 568, "end": 582, "loc": { "start": { "line": 22, "column": 40 }, "end": { "line": 22, "column": 54 } }, "object": { "type": "Identifier", "start": 568, "end": 575, "loc": { "start": { "line": 22, "column": 40 }, "end": { "line": 22, "column": 47 }, "identifierName": "Object3" }, "name": "Object3" }, "property": { "type": "Identifier", "start": 576, "end": 582, "loc": { "start": { "line": 22, "column": 48 }, "end": { "line": 22, "column": 54 }, "identifierName": "Events" }, "name": "Events" }, "computed": false }, "property": { "type": "Identifier", "start": 583, "end": 594, "loc": { "start": { "line": 22, "column": 55 }, "end": { "line": 22, "column": 66 }, "identifierName": "Interaction" }, "name": "Interaction" }, "computed": false } ] }, "body": { "type": "IfStatement", "start": 609, "end": 703, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 24, "column": 77 } }, "test": { "type": "MemberExpression", "start": 613, "end": 624, "loc": { "start": { "line": 23, "column": 16 }, "end": { "line": 23, "column": 27 } }, "object": { "type": "ThisExpression", "start": 613, "end": 617, "loc": { "start": { "line": 23, "column": 16 }, "end": { "line": 23, "column": 20 } } }, "property": { "type": "Identifier", "start": 618, "end": 623, "loc": { "start": { "line": 23,