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
JSON
{
"type": "File",
"start": 0,
"end": 290,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 11,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 290,
"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 Component that can be attatched to any GameObject.\n * \n * The Audio Component has controls for playing sounds and music.\n * Audio can be locallized to the Object location it is attached to.\n ",
"start": 38,
"end": 240,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
}
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 241,
"end": 290,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 11,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 256,
"end": 290,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 11,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 262,
"end": 267,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 26
},
"identifierName": "Audio"
},
"name": "Audio",
"leadingComments": null
},
"superClass": {
"type": "Identifier",
"start": 276,
"end": 285,
"loc": {
"start": {
"line": 9,
"column": 35
},
"end": {
"line": 9,
"column": 44
},
"identifierName": "Component"
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 286,
"end": 290,
"loc": {
"start": {
"line": 9,
"column": 45
},
"end": {
"line": 11,
"column": 1
}
},
"body": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * A Component that can be attatched to any GameObject.\n * \n * The Audio Component has controls for playing sounds and music.\n * Audio can be locallized to the Object location it is attached to.\n ",
"start": 38,
"end": 240,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * A Component that can be attatched to any GameObject.\n * \n * The Audio Component has controls for playing sounds and music.\n * Audio can be locallized to the Object location it is attached to.\n ",
"start": 38,
"end": 240,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\n * A Component that can be attatched to any GameObject.\n * \n * The Audio Component has controls for playing sounds and music.\n * Audio can be locallized to the Object location it is attached to.\n ",
"start": 38,
"end": 240,
"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 Component that can be attatched to any GameObject.\n * \n * The Audio Component has controls for playing sounds and music.\n * Audio can be locallized to the Object location it is attached to.\n ",
"start": 38,
"end": 240,
"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": 241,
"end": 247,
"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": 248,
"end": 255,
"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": 256,
"end": 261,
"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": "Audio",
"start": 262,
"end": 267,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 26
}
}
},
{
"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": 268,
"end": 275,
"loc": {
"start": {
"line": 9,
"column": 27
},
"end": {
"line": 9,
"column": 34
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Component",
"start": 276,
"end": 285,
"loc": {
"start": {
"line": 9,
"column": 35
},
"end": {
"line": 9,
"column": 44
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 286,
"end": 287,
"loc": {
"start": {
"line": 9,
"column": 45
},
"end": {
"line": 9,
"column": 46
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 289,
"end": 290,
"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": 290,
"end": 290,
"loc": {
"start": {
"line": 11,
"column": 1
},
"end": {
"line": 11,
"column": 1
}
}
}
]
}