UNPKG

awv3

Version:
1,457 lines 984 kB
{ "type": "File", "start": 0, "end": 4924, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 140, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 4924, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 140, "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": "ImportDeclaration", "start": 32, "end": 77, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 45 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 39, "end": 46, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "local": { "type": "Identifier", "start": 39, "end": 46, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 }, "identifierName": "Object3" }, "name": "Object3" } } ], "source": { "type": "StringLiteral", "start": 52, "end": 76, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 44 } }, "extra": { "rawValue": "../../../three/object3", "raw": "'../../../three/object3'" }, "value": "../../../three/object3" } }, { "type": "ImportDeclaration", "start": 78, "end": 107, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 29 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 85, "end": 90, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 12 } }, "local": { "type": "Identifier", "start": 85, "end": 90, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 12 }, "identifierName": "Ccref" }, "name": "Ccref" } } ], "source": { "type": "StringLiteral", "start": 96, "end": 106, "loc": { "start": { "line": 3, "column": 18 }, "end": { "line": 3, "column": 28 } }, "extra": { "rawValue": "../ccref", "raw": "'../ccref'" }, "value": "../ccref" } }, { "type": "ImportDeclaration", "start": 108, "end": 141, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 33 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 115, "end": 122, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 14 } }, "local": { "type": "Identifier", "start": 115, "end": 122, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 14 }, "identifierName": "Snapper" }, "name": "Snapper" } } ], "source": { "type": "StringLiteral", "start": 128, "end": 140, "loc": { "start": { "line": 4, "column": 20 }, "end": { "line": 4, "column": 32 } }, "extra": { "rawValue": "../snapper", "raw": "'../snapper'" }, "value": "../snapper" } }, { "type": "ExportDefaultDeclaration", "start": 143, "end": 4624, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 124, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 158, "end": 4624, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 124, "column": 1 } }, "id": { "type": "Identifier", "start": 164, "end": 175, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 32 }, "identifierName": "BaseHandler" }, "name": "BaseHandler" }, "superClass": null, "body": { "type": "ClassBody", "start": 176, "end": 4624, "loc": { "start": { "line": 6, "column": 33 }, "end": { "line": 124, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 182, "end": 841, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 18, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 182, "end": 193, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 194, "end": 202, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 24 }, "identifierName": "sketcher" }, "name": "sketcher" }, { "type": "Identifier", "start": 204, "end": 208, "loc": { "start": { "line": 7, "column": 26 }, "end": { "line": 7, "column": 30 }, "identifierName": "name" }, "name": "name" } ], "body": { "type": "BlockStatement", "start": 210, "end": 841, "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 18, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 220, "end": 245, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 220, "end": 244, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 220, "end": 233, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 21 } }, "object": { "type": "ThisExpression", "start": 220, "end": 224, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } } }, "property": { "type": "Identifier", "start": 225, "end": 233, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 21 }, "identifierName": "sketcher" }, "name": "sketcher" }, "computed": false }, "right": { "type": "Identifier", "start": 236, "end": 244, "loc": { "start": { "line": 8, "column": 24 }, "end": { "line": 8, "column": 32 }, "identifierName": "sketcher" }, "name": "sketcher" } } }, { "type": "ExpressionStatement", "start": 254, "end": 290, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 44 } }, "expression": { "type": "AssignmentExpression", "start": 254, "end": 289, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 43 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 254, "end": 265, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 19 } }, "object": { "type": "ThisExpression", "start": 254, "end": 258, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "property": { "type": "Identifier", "start": 259, "end": 265, "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 19 }, "identifierName": "sketch" }, "name": "sketch" }, "computed": false }, "right": { "type": "MemberExpression", "start": 268, "end": 289, "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 43 } }, "object": { "type": "Identifier", "start": 268, "end": 276, "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 30 }, "identifierName": "sketcher" }, "name": "sketcher" }, "property": { "type": "Identifier", "start": 277, "end": 289, "loc": { "start": { "line": 9, "column": 31 }, "end": { "line": 9, "column": 43 }, "identifierName": "activeSketch" }, "name": "activeSketch" }, "computed": false } } }, { "type": "ExpressionStatement", "start": 299, "end": 316, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 25 } }, "expression": { "type": "AssignmentExpression", "start": 299, "end": 315, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 24 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 299, "end": 308, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 17 } }, "object": { "type": "ThisExpression", "start": 299, "end": 303, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 304, "end": 308, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 17 }, "identifierName": "name" }, "name": "name" }, "computed": false }, "right": { "type": "Identifier", "start": 311, "end": 315, "loc": { "start": { "line": 10, "column": 20 }, "end": { "line": 10, "column": 24 }, "identifierName": "name" }, "name": "name" } } }, { "type": "ExpressionStatement", "start": 325, "end": 355, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 325, "end": 354, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 325, "end": 342, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 25 } }, "object": { "type": "ThisExpression", "start": 325, "end": 329, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "start": 330, "end": 342, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 25 }, "identifierName": "interactions" }, "name": "interactions" }, "computed": false }, "right": { "type": "NewExpression", "start": 345, "end": 354, "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 11, "column": 37 } }, "callee": { "type": "Identifier", "start": 349, "end": 352, "loc": { "start": { "line": 11, "column": 32 }, "end": { "line": 11, "column": 35 }, "identifierName": "Map" }, "name": "Map" }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 364, "end": 387, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 31 } }, "expression": { "type": "AssignmentExpression", "start": 364, "end": 386, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 30 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 364, "end": 378, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 22 } }, "object": { "type": "ThisExpression", "start": 364, "end": 368, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 369, "end": 378, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 22 }, "identifierName": "destroyed" }, "name": "destroyed" }, "computed": false }, "right": { "type": "BooleanLiteral", "start": 381, "end": 386, "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 12, "column": 30 } }, "value": false } }, "trailingComments": [ { "type": "CommentLine", "value": " bind this.on* to this and don't trigger event callbacks after destruction", "start": 396, "end": 472, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 84 } } } ] }, { "type": "VariableDeclaration", "start": 481, "end": 570, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 97 } }, "declarations": [ { "type": "VariableDeclarator", "start": 487, "end": 509, "loc": { "start": { "line": 14, "column": 14 }, "end": { "line": 14, "column": 36 } }, "id": { "type": "Identifier", "start": 487, "end": 494, "loc": { "start": { "line": 14, "column": 14 }, "end": { "line": 14, "column": 21 }, "identifierName": "onKeyUp" }, "name": "onKeyUp", "leadingComments": null }, "init": { "type": "MemberExpression", "start": 497, "end": 509, "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 14, "column": 36 } }, "object": { "type": "ThisExpression", "start": 497, "end": 501, "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 14, "column": 28 } } }, "property": { "type": "Identifier", "start": 502, "end": 509, "loc": { "start": { "line": 14, "column": 29 }, "end": { "line": 14, "column": 36 }, "identifierName": "onKeyUp" }, "name": "onKeyUp" }, "computed": false }, "leadingComments": null }, { "type": "VariableDeclarator", "start": 511, "end": 537, "loc": { "start": { "line": 14, "column": 38 }, "end": { "line": 14, "column": 64 } }, "id": { "type": "Identifier", "start": 511, "end": 520, "loc": { "start": { "line": 14, "column": 38 }, "end": { "line": 14, "column": 47 }, "identifierName": "onKeyDown" }, "name": "onKeyDown" }, "init": { "type": "MemberExpression", "start": 523, "end": 537, "loc": { "start": { "line": 14, "column": 50 }, "end": { "line": 14, "column": 64 } }, "object": { "type": "ThisExpression", "start": 523, "end": 527, "loc": { "start": { "line": 14, "column": 50 }, "end": { "line": 14, "column": 54 } } }, "property": { "type": "Identifier", "start": 528, "end": 537, "loc": { "start": { "line": 14, "column": 55 }, "end": { "line": 14, "column": 64 }, "identifierName": "onKeyDown" }, "name": "onKeyDown" }, "computed": false } }, { "type": "VariableDeclarator", "start": 539, "end": 569, "loc": { "start": { "line": 14, "column": 66 }, "end": { "line": 14, "column": 96 } }, "id": { "type": "Identifier", "start": 539, "end": 550, "loc": { "start": { "line": 14, "column": 66 }, "end": { "line": 14, "column": 77 }, "identifierName": "onMouseMove" }, "name": "onMouseMove" }, "init": { "type": "MemberExpression", "start": 553, "end": 569, "loc": { "start": { "line": 14, "column": 80 }, "end": { "line": 14, "column": 96 } }, "object": { "type": "ThisExpression", "start": 553, "end": 557, "loc": { "start": { "line": 14, "column": 80 }, "end": { "line": 14, "column": 84 } } }, "property": { "type": "Identifier", "start": 558, "end": 569, "loc": { "start": { "line": 14, "column": 85 }, "end": { "line": 14, "column": 96 }, "identifierName": "onMouseMove" }, "name": "onMouseMove" }, "computed": false } } ], "kind": "const", "leadingComments": [ { "type": "CommentLine", "value": " bind this.on* to this and don't trigger event callbacks after destruction", "start": 396, "end": 472, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 84 } } } ] }, { "type": "ExpressionStatement", "start": 579, "end": 647, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 76 } }, "expression": { "type": "AssignmentExpression", "start": 579, "end": 646, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 75 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 579, "end": 591, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 20 } }, "object": { "type": "ThisExpression", "start": 579, "end": 583, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "start": 584, "end": 591, "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 20 }, "identifierName": "onKeyUp" }, "name": "onKeyUp" }, "computed": false }, "right": { "type": "ArrowFunctionExpression", "start": 594, "end": 646, "loc": { "start": { "line": 15, "column": 23 }, "end": { "line": 15, "column": 75 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 594, "end": 599, "loc": { "start": { "line": 15, "column": 23 }, "end": { "line": 15, "column": 28 }, "identifierName": "event" }, "name": "event" } ], "body": { "type": "LogicalExpression", "start": 603, "end": 646, "loc": { "start": { "line": 15, "column": 32 }, "end": { "line": 15, "column": 75 } }, "left": { "type": "MemberExpression", "start": 603, "end": 617, "loc": { "start": { "line": 15, "column": 32 }, "end": { "line": 15, "column": 46 } }, "object": { "type": "ThisExpression", "start": 603, "end": 607, "loc": { "start": { "line": 15, "column": 32 }, "end": { "line": 15, "column": 36 } } }, "property": { "type": "Identifier", "start": 608, "end": 617, "loc": { "start": { "line": 15, "column": 37 }, "end": { "line": 15, "column": 46 }, "identifierName": "destroyed" }, "name": "destroyed" }, "computed": false }, "oper