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 14.2 kB
{ "type": "File", "start": 0, "end": 284, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 11, "column": 1 } }, "program": { "type": "Program", "start": 0, "end": 284, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 11, "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 Collider Component that checks bounds for collisions.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 38, "end": 231, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] }, { "type": "ExportDefaultDeclaration", "start": 232, "end": 284, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 11, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 247, "end": 284, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 11, "column": 1 } }, "id": { "type": "Identifier", "start": 253, "end": 261, "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 29 }, "identifierName": "Collider" }, "name": "Collider", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 270, "end": 279, "loc": { "start": { "line": 9, "column": 38 }, "end": { "line": 9, "column": 47 }, "identifierName": "Component" }, "name": "Component" }, "body": { "type": "ClassBody", "start": 280, "end": 284, "loc": { "start": { "line": 9, "column": 48 }, "end": { "line": 11, "column": 1 } }, "body": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * A Collider Component that checks bounds for collisions.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 38, "end": 231, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ], "trailingComments": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * A Collider Component that checks bounds for collisions.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 38, "end": 231, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] } ], "directives": [] }, "comments": [ { "type": "CommentBlock", "value": "*\n * A Collider Component that checks bounds for collisions.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 38, "end": 231, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "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 Collider Component that checks bounds for collisions.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 38, "end": 231, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "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": 232, "end": 238, "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": 239, "end": 246, "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 9, "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": 247, "end": 252, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Collider", "start": 253, "end": 261, "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 29 } } }, { "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": 262, "end": 269, "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 37 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Component", "start": 270, "end": 279, "loc": { "start": { "line": 9, "column": 38 }, "end": { "line": 9, "column": 47 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 280, "end": 281, "loc": { "start": { "line": 9, "column": 48 }, "end": { "line": 9, "column": 49 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 283, "end": 284, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 1 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 284, "end": 284, "loc": { "start": { "line": 11, "column": 1 }, "end": { "line": 11, "column": 1 } } } ] }