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": 34, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 15, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 15 } }, "local": { "type": "Identifier", "start": 7, "end": 15, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 15 }, "identifierName": "Collider" }, "name": "Collider" } } ], "source": { "type": "StringLiteral", "start": 21, "end": 33, "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 33 } }, "extra": { "rawValue": "./Collider", "raw": "'./Collider'" }, "value": "./Collider" }, "trailingComments": [ { "type": "CommentBlock", "value": "*\n * A Collider Component that checks bounds only on a plane.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 36, "end": 230, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] }, { "type": "ExportDefaultDeclaration", "start": 231, "end": 284, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 11, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 246, "end": 284, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 11, "column": 1 } }, "id": { "type": "Identifier", "start": 252, "end": 262, "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 31 }, "identifierName": "Collider2D" }, "name": "Collider2D", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 271, "end": 279, "loc": { "start": { "line": 9, "column": 40 }, "end": { "line": 9, "column": 48 }, "identifierName": "Collider" }, "name": "Collider" }, "body": { "type": "ClassBody", "start": 280, "end": 284, "loc": { "start": { "line": 9, "column": 49 }, "end": { "line": 11, "column": 1 } }, "body": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * A Collider Component that checks bounds only on a plane.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 36, "end": 230, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ], "trailingComments": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\n * A Collider Component that checks bounds only on a plane.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 36, "end": 230, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 8, "column": 3 } } } ] } ], "directives": [] }, "comments": [ { "type": "CommentBlock", "value": "*\n * A Collider Component that checks bounds only on a plane.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 36, "end": 230, "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": "Collider", "start": 7, "end": 15, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 15 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 16, "end": 20, "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 20 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "./Collider", "start": 21, "end": 33, "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 33 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 33, "end": 34, "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "CommentBlock", "value": "*\n * A Collider Component that checks bounds only on a plane.\n * \n * This commponent has interface functions for calculating collisions\n * which have to be defined to work. See Subclasses.\n ", "start": 36, "end": 230, "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": 231, "end": 237, "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": 238, "end": 245, "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": 246, "end": 251, "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": "Collider2D", "start": 252, "end": 262, "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 31 } } }, { "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": 263, "end": 270, "loc": { "start": { "line": 9, "column": 32 }, "end": { "line": 9, "column": 39 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Collider", "start": 271, "end": 279, "loc": { "start": { "line": 9, "column": 40 }, "end": { "line": 9, "column": 48 } } }, { "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": 49 }, "end": { "line": 9, "column": 50 } } }, { "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 } } } ] }