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.3 kB
JSON
{
"type": "File",
"start": 0,
"end": 305,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 12,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 305,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 12,
"column": 1
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 38,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 38
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
},
"identifierName": "Collider2D"
},
"name": "Collider2D"
}
}
],
"source": {
"type": "StringLiteral",
"start": 23,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 37
}
},
"extra": {
"rawValue": "./Collider2D",
"raw": "'./Collider2D'"
},
"value": "./Collider2D"
},
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * A 2D Collider Component which can be attached to any GameObject.\n * \n * A BoxCollider Component monitors collisions with other Collider Components. \n * \n * This component is refined to a 2D square.\n ",
"start": 40,
"end": 248,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 9,
"column": 3
}
}
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 249,
"end": 305,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 12,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 264,
"end": 305,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 12,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 270,
"end": 281,
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 32
},
"identifierName": "BoxCollider"
},
"name": "BoxCollider",
"leadingComments": null
},
"superClass": {
"type": "Identifier",
"start": 290,
"end": 300,
"loc": {
"start": {
"line": 10,
"column": 41
},
"end": {
"line": 10,
"column": 51
},
"identifierName": "Collider2D"
},
"name": "Collider2D"
},
"body": {
"type": "ClassBody",
"start": 301,
"end": 305,
"loc": {
"start": {
"line": 10,
"column": 52
},
"end": {
"line": 12,
"column": 1
}
},
"body": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * A 2D Collider Component which can be attached to any GameObject.\n * \n * A BoxCollider Component monitors collisions with other Collider Components. \n * \n * This component is refined to a 2D square.\n ",
"start": 40,
"end": 248,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 9,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * A 2D Collider Component which can be attached to any GameObject.\n * \n * A BoxCollider Component monitors collisions with other Collider Components. \n * \n * This component is refined to a 2D square.\n ",
"start": 40,
"end": 248,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 9,
"column": 3
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\n * A 2D Collider Component which can be attached to any GameObject.\n * \n * A BoxCollider Component monitors collisions with other Collider Components. \n * \n * This component is refined to a 2D square.\n ",
"start": 40,
"end": 248,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 9,
"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": "Collider2D",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 18,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 22
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "./Collider2D",
"start": 23,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 23
},
"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 * A 2D Collider Component which can be attached to any GameObject.\n * \n * A BoxCollider Component monitors collisions with other Collider Components. \n * \n * This component is refined to a 2D square.\n ",
"start": 40,
"end": 248,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 9,
"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": 249,
"end": 255,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"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": 256,
"end": 263,
"loc": {
"start": {
"line": 10,
"column": 7
},
"end": {
"line": 10,
"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": 264,
"end": 269,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 20
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "BoxCollider",
"start": 270,
"end": 281,
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 32
}
}
},
{
"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": 282,
"end": 289,
"loc": {
"start": {
"line": 10,
"column": 33
},
"end": {
"line": 10,
"column": 40
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Collider2D",
"start": 290,
"end": 300,
"loc": {
"start": {
"line": 10,
"column": 41
},
"end": {
"line": 10,
"column": 51
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 301,
"end": 302,
"loc": {
"start": {
"line": 10,
"column": 52
},
"end": {
"line": 10,
"column": 53
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 304,
"end": 305,
"loc": {
"start": {
"line": 12,
"column": 0
},
"end": {
"line": 12,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 305,
"end": 305,
"loc": {
"start": {
"line": 12,
"column": 1
},
"end": {
"line": 12,
"column": 1
}
}
}
]
}