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.

648 lines 15.6 kB
{ "type": "File", "start": 0, "end": 564, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 16, "column": 1 } }, "program": { "type": "Program", "start": 0, "end": 564, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 16, "column": 1 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 36, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 16, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 16 } }, "local": { "type": "Identifier", "start": 7, "end": 16, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 16 }, "identifierName": "Component" }, "name": "Component" } } ], "source": { "type": "StringLiteral", "start": 22, "end": 35, "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 35 } }, "extra": { "rawValue": "./Component", "raw": "'./Component'" }, "value": "./Component" }, "trailingComments": [ { "type": "CommentBlock", "value": "*\n * A Physics Component can be added to any GameObject and will give it\n * physical properties which can be toggled and adjusted.\n * \n * This Component should have nothing to do with collisions. Instead, Physics\n * should provide pre and post reactions to collisions, gravity, frictions,\n * and anything else that should respond to an effect or change.\n * \n * This is intended to be a base class for more specific physics handling\n * depending on the application.\n ", "start": 38, "end": 508, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 13, "column": 3 } } } ] }, { "type": "ExportDefaultDeclaration", "start": 509, "end": 564, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 16, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 524, "end": 564, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 16, "column": 1 } }, "id": { "type": "Identifier", "start": 530, "end": 537, "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 28 }, "identifierName": "Physics" }, "name": "Physics", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 546, "end": 555, "loc": { "start": { "line": 14, "column": 37 }, "end": { "line": 14, "column": 46 }, "identifierName": "Component" }, "name": "Component" }, "body": { "type": "ClassBody", "start": 556, "end": 564, "loc": { "start": { "line": 14, "column": 47 }, "end": { "line": 16, "column": 1 } }, "body": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * A Physics Component can be added to any GameObject and will give it\n * physical properties which can be toggled and adjusted.\n * \n * This Component should have nothing to do with collisions. Instead, Physics\n * should provide pre and post reactions to collisions, gravity, frictions,\n * and anything else that should respond to an effect or change.\n * \n * This is intended to be a base class for more specific physics handling\n * depending on the application.\n ", "start": 38, "end": 508, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 13, "column": 3 } } } ], "trailingComments": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * A Physics Component can be added to any GameObject and will give it\n * physical properties which can be toggled and adjusted.\n * \n * This Component should have nothing to do with collisions. Instead, Physics\n * should provide pre and post reactions to collisions, gravity, frictions,\n * and anything else that should respond to an effect or change.\n * \n * This is intended to be a base class for more specific physics handling\n * depending on the application.\n ", "start": 38, "end": 508, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 13, "column": 3 } } } ] } ], "directives": [] }, "comments": [ { "type": "CommentBlock", "value": "*\n * A Physics Component can be added to any GameObject and will give it\n * physical properties which can be toggled and adjusted.\n * \n * This Component should have nothing to do with collisions. Instead, Physics\n * should provide pre and post reactions to collisions, gravity, frictions,\n * and anything else that should respond to an effect or change.\n * \n * This is intended to be a base class for more specific physics handling\n * depending on the application.\n ", "start": 38, "end": 508, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 13, "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": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Component", "start": 7, "end": 16, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 16 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 17, "end": 21, "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 21 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "./Component", "start": 22, "end": 35, "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 35 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 35, "end": 36, "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "CommentBlock", "value": "*\n * A Physics Component can be added to any GameObject and will give it\n * physical properties which can be toggled and adjusted.\n * \n * This Component should have nothing to do with collisions. Instead, Physics\n * should provide pre and post reactions to collisions, gravity, frictions,\n * and anything else that should respond to an effect or change.\n * \n * This is intended to be a base class for more specific physics handling\n * depending on the application.\n ", "start": 38, "end": 508, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 13, "column": 3 } } }, { "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": 509, "end": 515, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 14, "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": 516, "end": 523, "loc": { "start": { "line": 14, "column": 7 }, "end": { "line": 14, "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": 524, "end": 529, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Physics", "start": 530, "end": 537, "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 28 } } }, { "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": 538, "end": 545, "loc": { "start": { "line": 14, "column": 29 }, "end": { "line": 14, "column": 36 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Component", "start": 546, "end": 555, "loc": { "start": { "line": 14, "column": 37 }, "end": { "line": 14, "column": 46 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 556, "end": 557, "loc": { "start": { "line": 14, "column": 47 }, "end": { "line": 14, "column": 48 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 563, "end": 564, "loc": { "start": { "line": 16, "column": 0 }, "end": { "line": 16, "column": 1 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 564, "end": 564, "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 16, "column": 1 } } } ] }