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.

561 lines 11.4 kB
{ "type": "File", "start": 0, "end": 85, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } }, "program": { "type": "Program", "start": 0, "end": 85, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 32, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } }, "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": "Physics" }, "name": "Physics" } } ], "source": { "type": "StringLiteral", "start": 20, "end": 31, "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } }, "extra": { "rawValue": "./Physics", "raw": "'./Physics'" }, "value": "./Physics" } }, { "type": "ExportDefaultDeclaration", "start": 34, "end": 85, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 49, "end": 85, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 5, "column": 1 } }, "id": { "type": "Identifier", "start": 55, "end": 64, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 30 }, "identifierName": "Physics2D" }, "name": "Physics2D" }, "superClass": { "type": "Identifier", "start": 73, "end": 80, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 46 }, "identifierName": "Physics" }, "name": "Physics" }, "body": { "type": "ClassBody", "start": 81, "end": 85, "loc": { "start": { "line": 3, "column": 47 }, "end": { "line": 5, "column": 1 } }, "body": [] }, "leadingComments": [], "trailingComments": [] } } ], "directives": [] }, "comments": [], "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": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Physics", "start": 7, "end": 14, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 15, "end": 19, "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 19 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "./Physics", "start": 20, "end": 31, "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 31, "end": 32, "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "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": 34, "end": 40, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "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": 41, "end": 48, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 14 } } }, { "type": { "label": "class", "keyword": "class", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "class", "start": 49, "end": 54, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Physics2D", "start": 55, "end": 64, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 30 } } }, { "type": { "label": "extends", "keyword": "extends", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "extends", "start": 65, "end": 72, "loc": { "start": { "line": 3, "column": 31 }, "end": { "line": 3, "column": 38 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Physics", "start": 73, "end": 80, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 46 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 81, "end": 82, "loc": { "start": { "line": 3, "column": 47 }, "end": { "line": 3, "column": 48 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 84, "end": 85, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 1 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 85, "end": 85, "loc": { "start": { "line": 5, "column": 1 }, "end": { "line": 5, "column": 1 } } } ] }