UNPKG

awv3

Version:
1,347 lines 549 kB
{ "type": "Program", "start": 0, "end": 5518, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 154, "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": 44, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 17 } }, "specifiers": [], "source": { "type": "Literal", "start": 34, "end": 43, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 16 } }, "value": "perfnow", "rawValue": "perfnow", "raw": "'perfnow'" } }, { "type": "ImportDeclaration", "start": 45, "end": 88, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 43 } }, "specifiers": [ { "type": "ImportNamespaceSpecifier", "start": 52, "end": 64, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 19 } }, "local": { "type": "Identifier", "start": 57, "end": 64, "loc": { "start": { "line": 3, "column": 12 }, "end": { "line": 3, "column": 19 } }, "name": "Helpers" } } ], "importKind": "value", "source": { "type": "Literal", "start": 70, "end": 87, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 42 } }, "value": "../core/helpers", "rawValue": "../core/helpers", "raw": "'../core/helpers'" } }, { "type": "ImportDeclaration", "start": 89, "end": 128, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 39 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 96, "end": 101, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 12 } }, "local": { "type": "Identifier", "start": 96, "end": 101, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 12 } }, "name": "Tween" } } ], "importKind": "value", "source": { "type": "Literal", "start": 107, "end": 127, "loc": { "start": { "line": 4, "column": 18 }, "end": { "line": 4, "column": 38 } }, "value": "../animation/tween", "rawValue": "../animation/tween", "raw": "'../animation/tween'" } }, { "type": "ExportDefaultDeclaration", "start": 130, "end": 5517, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 153, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 145, "end": 5517, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 153, "column": 1 } }, "id": { "type": "Identifier", "start": 151, "end": 159, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 29 } }, "name": "Renderer" }, "superClass": null, "body": { "type": "ClassBody", "start": 160, "end": 5517, "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 153, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 166, "end": 4884, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 129, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 166, "end": 177, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 177, "end": 4884, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 129, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 178, "end": 238, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 76 } }, "operator": "=", "left": { "type": "Identifier", "start": 178, "end": 184, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 22 } }, "name": "canvas" }, "right": { "type": "CallExpression", "start": 187, "end": 238, "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 7, "column": 76 } }, "callee": { "type": "MemberExpression", "start": 187, "end": 196, "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 7, "column": 34 } }, "object": { "type": "Identifier", "start": 187, "end": 192, "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 7, "column": 30 } }, "name": "Error" }, "property": { "type": "Identifier", "start": 193, "end": 196, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 34 } }, "name": "log" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 197, "end": 237, "loc": { "start": { "line": 7, "column": 35 }, "end": { "line": 7, "column": 75 } }, "value": "Factory was initialized without canvas", "rawValue": "Factory was initialized without canvas", "raw": "'Factory was initialized without canvas'" } ] } }, { "type": "AssignmentPattern", "start": 240, "end": 252, "loc": { "start": { "line": 7, "column": 78 }, "end": { "line": 7, "column": 90 } }, "operator": "=", "left": { "type": "Identifier", "start": 240, "end": 247, "loc": { "start": { "line": 7, "column": 78 }, "end": { "line": 7, "column": 85 } }, "name": "options" }, "right": { "type": "ObjectExpression", "start": 250, "end": 252, "loc": { "start": { "line": 7, "column": 88 }, "end": { "line": 7, "column": 90 } }, "properties": [] } } ], "body": { "type": "BlockStatement", "start": 254, "end": 4884, "loc": { "start": { "line": 7, "column": 92 }, "end": { "line": 129, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 265, "end": 1080, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 29, "column": 10 } }, "expression": { "type": "AssignmentExpression", "start": 265, "end": 1079, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 29, "column": 9 } }, "operator": "=", "left": { "type": "Identifier", "start": 265, "end": 272, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 15 } }, "name": "options" }, "right": { "type": "ObjectExpression", "start": 275, "end": 1079, "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 29, "column": 9 } }, "properties": [ { "type": "Property", "start": 289, "end": 343, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 66 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 289, "end": 299, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 22 } }, "name": "resolution" }, "value": { "type": "LogicalExpression", "start": 301, "end": 343, "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 66 } }, "left": { "type": "CallExpression", "start": 301, "end": 338, "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 61 } }, "callee": { "type": "Identifier", "start": 301, "end": 311, "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 34 } }, "name": "parseFloat" }, "arguments": [ { "type": "CallExpression", "start": 312, "end": 337, "loc": { "start": { "line": 10, "column": 35 }, "end": { "line": 10, "column": 60 } }, "callee": { "type": "MemberExpression", "start": 312, "end": 323, "loc": { "start": { "line": 10, "column": 35 }, "end": { "line": 10, "column": 46 } }, "object": { "type": "Identifier", "start": 312, "end": 319, "loc": { "start": { "line": 10, "column": 35 }, "end": { "line": 10, "column": 42 } }, "name": "Helpers" }, "property": { "type": "Identifier", "start": 320, "end": 323, "loc": { "start": { "line": 10, "column": 43 }, "end": { "line": 10, "column": 46 } }, "name": "url" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 324, "end": 336, "loc": { "start": { "line": 10, "column": 47 }, "end": { "line": 10, "column": 59 } }, "value": "resolution", "rawValue": "resolution", "raw": "'resolution'" } ] } ] }, "operator": "||", "right": { "type": "Literal", "start": 342, "end": 343, "loc": { "start": { "line": 10, "column": 65 }, "end": { "line": 10, "column": 66 } }, "value": 1, "rawValue": 1, "raw": "1" } }, "kind": "init" }, { "type": "Property", "start": 357, "end": 401, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 56 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 357, "end": 366, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 21 } }, "name": "pixelated" }, "value": { "type": "LogicalExpression", "start": 368, "end": 401, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 56 } }, "left": { "type": "CallExpression", "start": 368, "end": 392, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 47 } }, "callee": { "type": "MemberExpression", "start": 368, "end": 379, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 34 } }, "object": { "type": "Identifier", "start": 368, "end": 375, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 30 } }, "name": "Helpers" }, "property": { "type": "Identifier", "start": 376, "end": 379, "loc": { "start": { "line": 11, "column": 31 }, "end": { "line": 11, "column": 34 } }, "name": "url" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 380, "end": 391, "loc": { "start": { "line": 11, "column": 35 }, "end": { "line": 11, "column": 46 } }, "value": "pixelated", "rawValue": "pixelated", "raw": "'pixelated'" } ] }, "operator": "||", "right": { "type": "Literal", "start": 396, "end": 401, "loc": { "start": { "line": 11, "column": 51 }, "end": { "line": 11, "column": 56 } }, "value": false, "rawValue": false, "raw": "false" } }, "kind": "init" }, { "type": "Property", "start": 415, "end": 445, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 42 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 415, "end": 425, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 22 } }, "name": "clearColor" }, "value": { "type": "NewExpression", "start": 427, "end": 445, "loc": { "start": { "line": 12, "column": 24 }, "end": { "line": 12, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 431, "end": 442, "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 39 } }, "object": { "type": "Identifier", "start": 431, "end": 436, "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 33 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 437, "end": 442, "loc": { "start": { "line": 12, "column": 34 }, "end": { "line": 12, "column": 39 } }, "name": "Color" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 443, "end": 444, "loc": { "start": { "line": 12, "column": 40 }, "end": { "line": 12, "column": 41 } }, "value": 0, "rawValue": 0, "raw": "0" } ] }, "kind": "init" }, { "type": "Property", "start": 459, "end": 473, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 26 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 459, "end": 464, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 17 } }, "name": "place" }, "value": { "type": "Literal", "start": 466, "end": 473, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 26 } }, "value": "first", "rawValue": "first", "raw": "'first'" }, "kind": "init" }, { "type": "Property", "start": 487, "end": 509, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 34 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 487, "end": 503, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 28 } }, "name": "startImmediately" }, "value": { "type": "Literal", "start": 505, "end": 509, "loc": { "start": { "line": 14, "column": 30 }, "end": { "line": 14, "column": 34 } }, "value": true, "rawValue": true, "raw": "true" }, "kind": "init" }, { "type": "Property", "start": 523, "end": 541, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 30 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 523, "end": 532, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 21 } }, "name": "precision" }, "value": { "type": "Literal", "start": 534, "end": 541, "loc": { "start": { "line": 15, "column": 23 }, "end": { "line": 15, "column": 30 } }, "value": "highp", "rawValue": "highp", "raw": "'highp'" }, "kind": "init" }, { "type": "Property", "start": 555, "end": 579, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 36 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 555, "end": 573, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 30 } }, "name": "premultipliedAlpha" }, "value": { "type": "Literal", "start": 575, "end": 579, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 36 } }, "value": true, "rawValue": true, "raw": "true" }, "kind": "init" }, { "type": "Property", "start": 593, "end": 606, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 25 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 593, "end": 600, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 19 } }, "name": "stencil" }, "value": { "type": "Literal", "start": 602, "end": 606, "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 25 } }, "value": true, "rawValue": true, "raw": "true" }, "kind": "init" }, { "type": "Property", "start": 620, "end": 631, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 23 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 620, "end": 625, "loc": { "start": { "line": 18, "c