UNPKG

seed-engine

Version:

A Lightweight 2D game engine using WebGL2. The engine is designed on the focus of creating a bridge between creating and publishing games to the Seed Network as modules.

824 lines 17.4 kB
{ "type": "File", "start": 0, "end": 263, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 9, "column": 30 } }, "program": { "type": "Program", "start": 0, "end": 263, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 9, "column": 30 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 38, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 9, "end": 17, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } }, "imported": { "type": "Identifier", "start": 9, "end": 17, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 }, "identifierName": "Messager" }, "name": "Messager" }, "local": { "type": "Identifier", "start": 9, "end": 17, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 }, "identifierName": "Messager" }, "name": "Messager" } } ], "source": { "type": "StringLiteral", "start": 25, "end": 37, "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 37 } }, "extra": { "rawValue": "./Messager", "raw": "\"./Messager\"" }, "value": "./Messager" }, "trailingComments": [ { "type": "CommentBlock", "value": "*\n * GlobalMessager is a singleton reference to a Messager class.\n * \n * Acts as an engine-wise messager that can be used for miscellaneous events.\n ", "start": 40, "end": 193, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 7, "column": 3 } } } ] }, { "type": "Identifier", "start": 194, "end": 232, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 38 } }, "declarations": [ { "type": "VariableDeclarator", "start": 200, "end": 231, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 37 } }, "id": { "type": "Identifier", "start": 200, "end": 214, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 20 }, "identifierName": "GlobalMessager" }, "name": "GlobalMessager", "leadingComments": null }, "init": { "type": "NewExpression", "start": 217, "end": 231, "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 37 } }, "callee": { "type": "Identifier", "start": 221, "end": 229, "loc": { "start": { "line": 8, "column": 27 }, "end": { "line": 8, "column": 35 }, "identifierName": "Messager" }, "name": "Messager" }, "arguments": [] }, "leadingComments": null } ], "kind": "const", "leadingComments": [], "name": "_", "trailingComments": [] }, { "type": "ExportDefaultDeclaration", "start": 233, "end": 263, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 30 } }, "declaration": { "type": "Identifier", "start": 248, "end": 262, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 29 }, "identifierName": "GlobalMessager" }, "name": "GlobalMessager", "leadingComments": [], "trailingComments": [] } } ], "directives": [] }, "comments": [ { "type": "CommentBlock", "value": "*\n * GlobalMessager is a singleton reference to a Messager class.\n * \n * Acts as an engine-wise messager that can be used for miscellaneous events.\n ", "start": 40, "end": 193, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 7, "column": 3 } } } ], "tokens": [ { "type": { "label": "import", "keyword": "import", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "import", "start": 0, "end": 6, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Messager", "start": 9, "end": 17, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 18, "end": 19, "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 20, "end": 24, "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 24 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "./Messager", "start": 25, "end": 37, "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 37 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 37, "end": 38, "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "CommentBlock", "value": "*\n * GlobalMessager is a singleton reference to a Messager class.\n * \n * Acts as an engine-wise messager that can be used for miscellaneous events.\n ", "start": 40, "end": 193, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 7, "column": 3 } } }, { "type": { "label": "const", "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "const", "start": 194, "end": 199, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 5 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "GlobalMessager", "start": 200, "end": 214, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 20 } } }, { "type": { "label": "=", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "=", "start": 215, "end": 216, "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 22 } } }, { "type": { "label": "new", "keyword": "new", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "new", "start": 217, "end": 220, "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 26 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Messager", "start": 221, "end": 229, "loc": { "start": { "line": 8, "column": 27 }, "end": { "line": 8, "column": 35 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 229, "end": 230, "loc": { "start": { "line": 8, "column": 35 }, "end": { "line": 8, "column": 36 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 230, "end": 231, "loc": { "start": { "line": 8, "column": 36 }, "end": { "line": 8, "column": 37 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 231, "end": 232, "loc": { "start": { "line": 8, "column": 37 }, "end": { "line": 8, "column": 38 } } }, { "type": { "label": "export", "keyword": "export", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "export", "start": 233, "end": 239, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 6 } } }, { "type": { "label": "default", "keyword": "default", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "default", "start": 240, "end": 247, "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 9, "column": 14 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "GlobalMessager", "start": 248, "end": 262, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 29 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 262, "end": 263, "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 30 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 263, "end": 263, "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 30 } } } ] }