UNPKG

awv3

Version:
1,481 lines 349 kB
{ "type": "File", "start": 0, "end": 1909, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 45, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1909, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 45, "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": 61, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 29 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 39, "end": 44, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "local": { "type": "Identifier", "start": 39, "end": 44, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 }, "identifierName": "Ccref" }, "name": "Ccref" } } ], "source": { "type": "StringLiteral", "start": 50, "end": 60, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 2, "column": 28 } }, "extra": { "rawValue": "../ccref", "raw": "'../ccref'" }, "value": "../ccref" } }, { "type": "ImportDeclaration", "start": 62, "end": 96, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 34 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 69, "end": 81, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 19 } }, "local": { "type": "Identifier", "start": 69, "end": 81, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 19 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" } } ], "source": { "type": "StringLiteral", "start": 87, "end": 95, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 33 } }, "extra": { "rawValue": "./base", "raw": "'./base'" }, "value": "./base" } }, { "type": "VariableDeclaration", "start": 98, "end": 151, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 53 } }, "declarations": [ { "type": "VariableDeclarator", "start": 104, "end": 150, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 52 } }, "id": { "type": "Identifier", "start": 104, "end": 112, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 14 }, "identifierName": "geometry" }, "name": "geometry" }, "init": { "type": "NewExpression", "start": 115, "end": 150, "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 52 } }, "callee": { "type": "MemberExpression", "start": 119, "end": 144, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 46 } }, "object": { "type": "Identifier", "start": 119, "end": 124, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 26 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 125, "end": 144, "loc": { "start": { "line": 5, "column": 27 }, "end": { "line": 5, "column": 46 }, "identifierName": "PlaneBufferGeometry" }, "name": "PlaneBufferGeometry" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 145, "end": 146, "loc": { "start": { "line": 5, "column": 47 }, "end": { "line": 5, "column": 48 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 148, "end": 149, "loc": { "start": { "line": 5, "column": 50 }, "end": { "line": 5, "column": 51 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } ] } } ], "kind": "const", "trailingComments": [ { "type": "CommentLine", "value": " rubber-band selection doesn't support empty (min=inf max=-inf) bounding boxes, put the box in the unlikely place", "start": 152, "end": 267, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 115 } } } ] }, { "type": "VariableDeclaration", "start": 268, "end": 363, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 95 } }, "declarations": [ { "type": "VariableDeclarator", "start": 274, "end": 362, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 94 } }, "id": { "type": "Identifier", "start": 274, "end": 277, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 9 }, "identifierName": "box" }, "name": "box", "leadingComments": null }, "init": { "type": "NewExpression", "start": 280, "end": 362, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 94 } }, "callee": { "type": "MemberExpression", "start": 284, "end": 294, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 26 } }, "object": { "type": "Identifier", "start": 284, "end": 289, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 21 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 290, "end": 294, "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 26 }, "identifierName": "Box3" }, "name": "Box3" }, "computed": false }, "arguments": [ { "type": "NewExpression", "start": 295, "end": 327, "loc": { "start": { "line": 7, "column": 27 }, "end": { "line": 7, "column": 59 } }, "callee": { "type": "MemberExpression", "start": 299, "end": 312, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 44 } }, "object": { "type": "Identifier", "start": 299, "end": 304, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 36 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 305, "end": 312, "loc": { "start": { "line": 7, "column": 37 }, "end": { "line": 7, "column": 44 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 313, "end": 316, "loc": { "start": { "line": 7, "column": 45 }, "end": { "line": 7, "column": 48 } }, "extra": { "rawValue": 1000000000, "raw": "1e9" }, "value": 1000000000 }, { "type": "NumericLiteral", "start": 318, "end": 321, "loc": { "start": { "line": 7, "column": 50 }, "end": { "line": 7, "column": 53 } }, "extra": { "rawValue": 1000000000, "raw": "1e9" }, "value": 1000000000 }, { "type": "NumericLiteral", "start": 323, "end": 326, "loc": { "start": { "line": 7, "column": 55 }, "end": { "line": 7, "column": 58 } }, "extra": { "rawValue": 1000000000, "raw": "1e9" }, "value": 1000000000 } ] }, { "type": "NewExpression", "start": 329, "end": 361, "loc": { "start": { "line": 7, "column": 61 }, "end": { "line": 7, "column": 93 } }, "callee": { "type": "MemberExpression", "start": 333, "end": 346, "loc": { "start": { "line": 7, "column": 65 }, "end": { "line": 7, "column": 78 } }, "object": { "type": "Identifier", "start": 333, "end": 338, "loc": { "start": { "line": 7, "column": 65 }, "end": { "line": 7, "column": 70 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 339, "end": 346, "loc": { "start": { "line": 7, "column": 71 }, "end": { "line": 7, "column": 78 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 347, "end": 350, "loc": { "start": { "line": 7, "column": 79 }, "end": { "line": 7, "column": 82 } }, "extra": { "rawValue": 1000000000, "raw": "1e9" }, "value": 1000000000 }, { "type": "NumericLiteral", "start": 352, "end": 355, "loc": { "start": { "line": 7, "column": 84 }, "end": { "line": 7, "column": 87 } }, "extra": { "rawValue": 1000000000, "raw": "1e9" }, "value": 1000000000 }, { "type": "NumericLiteral", "start": 357, "end": 360, "loc": { "start": { "line": 7, "column": 89 }, "end": { "line": 7, "column": 92 } }, "extra": { "rawValue": 1000000000, "raw": "1e9" }, "value": 1000000000 } ] } ] }, "leadingComments": null } ], "kind": "const", "leadingComments": [ { "type": "CommentLine", "value": " rubber-band selection doesn't support empty (min=inf max=-inf) bounding boxes, put the box in the unlikely place", "start": 152, "end": 267, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 115 } } } ] }, { "type": "ExportDefaultDeclaration", "start": 365, "end": 1908, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 44, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 380, "end": 1908, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 44, "column": 1 } }, "id": { "type": "Identifier", "start": 386, "end": 396, "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 31 }, "identifierName": "Constraint" }, "name": "Constraint" }, "superClass": { "type": "Identifier", "start": 405, "end": 417, "loc": { "start": { "line": 9, "column": 40 }, "end": { "line": 9, "column": 52 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 418, "end": 1908, "loc": { "start": { "line": 9, "column": 53 }, "end": { "line": 44, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 424, "end": 1403, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 29, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 424, "end": 435, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 436, "end": 443, "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 23 }, "identifierName": "texture" }, "name": "texture" } ], "body": { "type": "BlockStatement", "start": 445, "end": 1403, "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 29, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 455, "end": 463, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 16 } }, "expression": { "type": "CallExpression", "start": 455, "end": 462, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 15 } }, "callee": { "type": "Super", "start": 455, "end": 460, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 13 } } }, "arguments": [] }, "trailingComments": [ { "type": "CommentLine", "value": "flat-colored, highlightable quad", "start": 472, "end": 506, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 42 } } } ] }, { "type": "ExpressionStatement", "start": 515, "end": 739, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 16, "column": 12 } }, "expression": { "type": "AssignmentExpression", "start": 515, "end": 738, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 16, "column": 11 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 515, "end": 529, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 22 } }, "object": { "type": "ThisExpression", "start": 515, "end": 519, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 520, "end": 529, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 22 }, "identifierName": "localMesh" }, "name": "localMesh" }, "computed": false, "leadingComments": null }, "right": { "type": "NewExpression", "start": 532, "end": 738, "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 16, "column": 11 } }, "callee": { "type": "MemberExpression", "start": 536, "end": 546, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 39 } }, "object": { "type": "Identifier", "start": 536, "end": 541, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 34 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 542, "end": 546, "loc": { "start": { "line": 13, "column": 35 }, "end": { "line": 13, "column": 39 }, "identifierName": "Mesh" }, "name": "Mesh" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 547, "end": 555, "loc": { "start": { "line": 13, "column": 40 }, "end": { "line": 13, "column": 48 }, "identifierName": "geometry" }, "name": "geometry" }, { "type": "NewExpression", "start": 557, "end": 737, "loc": { "start": { "line": 13, "column": 50 }, "end": { "line": 16, "column": 10 } }, "callee": { "type": "MemberExpression", "start": 561, "end": 584, "loc": { "start": { "line": 13, "column": 54 }, "end": { "line": 13, "column": 77 } }, "object": { "type": "Identifier", "start": 561, "end": 566, "loc": { "start": { "line": 13, "column": 54 }, "end": { "line": 13, "column": 59 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 567, "end": 584, "loc": { "start": { "line": 13, "column": 60 }, "end": { "line": 13, "column": 77 }, "identifierName": "MeshBasicMaterial" }, "name": "MeshBasicMaterial" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 585, "end": 736, "loc": { "start": { "line": 13, "column": 78 }, "end": { "line": 16, "column": 9 } }, "properties": [ { "type": "ObjectProperty", "start": 599, "end": 614, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 27 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 599, "end": 604, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 17 }, "identifierName": "color" }, "name": "color" }, "value": { "type": "NumericLiteral", "start": 606, "end": 614, "loc": { "start": { "line": 14, "column": 19 }, "end": { "line": 14, "column": 27 } }, "extra": { "rawValue": 14540253, "raw": "0xdddddd" }, "value": 14540253 } }, { "type": "ObjectProperty", "start": 616, "end": 638, "loc": { "start": { "line": 14, "column": 29 }, "end": { "line": 14, "column": 51 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 616, "end": 620, "loc": { "start": { "line": 14, "column": 29 }, "end": { "line": 14, "column": 33 }, "identifierName": "side" }, "name": "side" }, "value": { "type": "MemberExpression", "start": 622, "end": 638, "loc": { "start": { "line": 14, "column": 35 }, "end": { "line": 14, "column": 51 } }, "object": { "type": "Identifier", "start": 622, "end": 627, "loc": { "start": { "line": 14, "column": 35 }, "end": { "line": 14, "column": 40 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 628, "end": 638, "loc": { "start": { "line": 14, "column": 41 }, "end": { "line": 14, "column": 51 }, "identifierName": "DoubleSide" }, "name": "DoubleSide" }, "computed": false } }, { "type": "ObjectProperty", "start": 652, "end": 671, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 31 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 652, "end": 665, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 25 }, "identifierName": "polygonOffset" }, "name": "polygonOffset" }, "value": { "type": "BooleanLiteral", "start": 667, "end": 671, "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 15, "column": 31 } }, "value": true } }, { "type": "ObjectProperty", "start": 673, "end": 698, "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 58 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 673, "end": 692, "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 52 }, "identifierName": "polygonOffsetFactor" }, "name": "p