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.
1,628 lines • 1.46 MB
JSON
{
"type": "File",
"start": 0,
"end": 4316,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 263,
"column": 23
}
},
"program": {
"type": "Program",
"start": 0,
"end": 4316,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 263,
"column": 23
}
},
"sourceType": "module",
"body": [
{
"type": "Identifier",
"start": 101,
"end": 4291,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 261,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 107,
"end": 4290,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 261,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 107,
"end": 114,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 4,
"column": 13
},
"identifierName": "KeyCode"
},
"name": "KeyCode",
"leadingComments": null
},
"init": {
"type": "ObjectExpression",
"start": 117,
"end": 4290,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 261,
"column": 1
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 123,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 123,
"end": 125,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 6
},
"identifierName": "_0"
},
"name": "_0"
},
"value": {
"type": "NumericLiteral",
"start": 127,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 9
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
}
},
{
"type": "ObjectProperty",
"start": 134,
"end": 139,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 134,
"end": 136,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 6
},
"identifierName": "_1"
},
"name": "_1"
},
"value": {
"type": "NumericLiteral",
"start": 138,
"end": 139,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 9
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
},
{
"type": "ObjectProperty",
"start": 145,
"end": 150,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 145,
"end": 147,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 6
},
"identifierName": "_2"
},
"name": "_2"
},
"value": {
"type": "NumericLiteral",
"start": 149,
"end": 150,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 9
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
}
},
{
"type": "ObjectProperty",
"start": 156,
"end": 165,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 156,
"end": 162,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 10
},
"identifierName": "CANCEL"
},
"name": "CANCEL"
},
"value": {
"type": "NumericLiteral",
"start": 164,
"end": 165,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 13
}
},
"extra": {
"rawValue": 3,
"raw": "3"
},
"value": 3
}
},
{
"type": "ObjectProperty",
"start": 171,
"end": 176,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 171,
"end": 173,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 6
},
"identifierName": "_4"
},
"name": "_4"
},
"value": {
"type": "NumericLiteral",
"start": 175,
"end": 176,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 9
}
},
"extra": {
"rawValue": 4,
"raw": "4"
},
"value": 4
}
},
{
"type": "ObjectProperty",
"start": 182,
"end": 187,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 182,
"end": 184,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 6
},
"identifierName": "_5"
},
"name": "_5"
},
"value": {
"type": "NumericLiteral",
"start": 186,
"end": 187,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 9
}
},
"extra": {
"rawValue": 5,
"raw": "5"
},
"value": 5
}
},
{
"type": "ObjectProperty",
"start": 193,
"end": 200,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 11
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 193,
"end": 197,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 8
},
"identifierName": "HELP"
},
"name": "HELP"
},
"value": {
"type": "NumericLiteral",
"start": 199,
"end": 200,
"loc": {
"start": {
"line": 11,
"column": 10
},
"end": {
"line": 11,
"column": 11
}
},
"extra": {
"rawValue": 6,
"raw": "6"
},
"value": 6
}
},
{
"type": "ObjectProperty",
"start": 206,
"end": 211,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 206,
"end": 208,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 6
},
"identifierName": "_7"
},
"name": "_7"
},
"value": {
"type": "NumericLiteral",
"start": 210,
"end": 211,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 9
}
},
"extra": {
"rawValue": 7,
"raw": "7"
},
"value": 7
}
},
{
"type": "ObjectProperty",
"start": 217,
"end": 230,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 17
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 217,
"end": 227,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 14
},
"identifierName": "BACK_SPACE"
},
"name": "BACK_SPACE"
},
"value": {
"type": "NumericLiteral",
"start": 229,
"end": 230,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 17
}
},
"extra": {
"rawValue": 8,
"raw": "8"
},
"value": 8
}
},
{
"type": "ObjectProperty",
"start": 236,
"end": 242,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 10
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 236,
"end": 239,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 7
},
"identifierName": "TAB"
},
"name": "TAB"
},
"value": {
"type": "NumericLiteral",
"start": 241,
"end": 242,
"loc": {
"start": {
"line": 14,
"column": 9
},
"end": {
"line": 14,
"column": 10
}
},
"extra": {
"rawValue": 9,
"raw": "9"
},
"value": 9
}
},
{
"type": "ObjectProperty",
"start": 248,
"end": 255,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 11
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 248,
"end": 251,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 7
},
"identifierName": "_10"
},
"name": "_10"
},
"value": {
"type": "NumericLiteral",
"start": 253,
"end": 255,
"loc": {
"start": {
"line": 15,
"column": 9
},
"end": {
"line": 15,
"column": 11
}
},
"extra": {
"rawValue": 10,
"raw": "10"
},
"value": 10
}
},
{
"type": "ObjectProperty",
"start": 261,
"end": 268,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 11
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 261,
"end": 264,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 7
},
"identifierName": "_11"
},
"name": "_11"
},
"value": {
"type": "NumericLiteral",
"start": 266,
"end": 268,
"loc": {
"start": {
"line": 16,
"column": 9
},
"end": {
"line": 16,
"column": 11
}
},
"extra": {
"rawValue": 11,
"raw": "11"
},
"value": 11
}
},
{
"type": "ObjectProperty",
"start": 274,
"end": 283,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 274,
"end": 279,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 9
},
"identifierName": "CLEAR"
},
"name": "CLEAR"
},
"value": {
"type": "NumericLiteral",
"start": 281,
"end": 283,
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 13
}
},
"extra": {
"rawValue": 12,
"raw": "12"
},
"value": 12
}
},
{
"type": "ObjectProperty",
"start": 289,
"end": 298,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 289,
"end": 294,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 9
},
"identifierName": "ENTER"
},
"name": "ENTER"
},
"value": {
"type": "NumericLiteral",
"start": 296,
"end": 298,
"loc": {
"start": {
"line": 18,
"column": 11
},
"end": {
"line": 18,
"column": 13
}
},
"extra": {
"rawValue": 13,
"raw": "13"
},
"value": 13
}
},
{
"type": "ObjectProperty",
"start": 304,
"end": 321,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 21
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 304,
"end": 317,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 17
},
"identifierName": "ENTER_SPECIAL"
},
"name": "ENTER_SPECIAL"
},
"value": {
"type": "NumericLiteral",
"start": 319,
"end": 321,
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 19,
"column": 21
}
},
"extra": {
"rawValue": 14,
"raw": "14"
},
"value": 14
}
},
{
"type": "ObjectProperty",
"start": 327,
"end": 334,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 11
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 327,
"end": 330,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 7
},
"identifierName": "_15"
},
"name": "_15"
},
"value": {
"type": "NumericLiteral",
"start": 332,
"end": 334,
"loc": {
"start": {
"line": 20,
"column": 9
},
"end": {
"line": 20,
"column": 11
}
},
"extra": {
"rawValue": 15,
"raw": "15"
},
"value": 15
}
},
{
"type": "ObjectProperty",
"start": 340,
"end": 349,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 340,
"end": 345,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 9
},
"identifierName": "SHIFT"
},
"name": "SHIFT"
},
"value": {
"type": "NumericLiteral",
"start": 347,
"end": 349,
"loc": {
"start": {
"line": 21,
"column": 11
},
"end": {
"line": 21,
"column": 13
}
},
"extra": {
"rawValue": 16,
"raw": "16"
},
"value": 16
}
},
{
"type": "ObjectProperty",
"start": 355,
"end": 366,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 22,
"column": 15
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 355,
"end": 362,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 22,
"column": 11
},
"identifierName": "CONTROL"
},
"name": "CONTROL"
},
"value": {
"type": "NumericLiteral",
"start": 364,
"end": 366,
"loc": {
"start": {
"line": 22,
"column": 13
},
"end": {
"line": 22,
"column": 15
}
},
"extra": {
"rawValue": 17,
"raw": "17"
},
"value": 17
}
},
{
"type": "ObjectProperty",
"start": 372,
"end": 379,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 11
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 372,
"end": 375,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 7
},
"identifierName": "ALT"
},
"name": "ALT"
},
"value": {
"type": "NumericLiteral",
"start": 377,
"end": 379,
"loc": {
"start": {
"line": 23,
"column": 9
},
"end": {
"line": 23,
"column": 11
}
},
"extra": {
"rawValue": 18,
"raw": "18"
},
"value": 18
}
},
{
"type": "ObjectProperty",
"start": 385,
"end": 394,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 385,
"end": 390,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 9
},
"identifierName": "PAUSE"
},
"name": "PAUSE"
},
"value": {
"type": "NumericLiteral",
"start": 392,
"end": 394,
"loc": {
"start": {
"line": 24,
"column": 11
},
"end": {
"line": 24,
"column": 13
}
},
"extra": {
"rawValue": 19,
"raw": "19"
},
"value": 19
}
},
{
"type": "ObjectProperty",
"start": 400,
"end": 413,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 17
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 400,
"end": 409,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 13
},
"identifierName": "CAPS_LOCK"
},
"name": "CAPS_LOCK"
},
"value": {
"type": "NumericLiteral",
"start": 411,
"end": 413,
"loc": {
"start": {
"line": 25,
"column": 15
},
"end": {
"line": 25,
"column": 17
}
},
"extra": {
"rawValue": 20,
"raw": "20"
},
"value": 20
}
},
{
"type": "ObjectProperty",
"start": 419,
"end": 427,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 12
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 419,
"end": 423,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 8
},
"identifierName": "KANA"
},
"name": "KANA"
},
"value": {
"type": "NumericLiteral",
"start": 425,
"end": 427,
"loc": {
"start": {
"line": 26,
"column": 10
},
"end": {
"line": 26,
"column": 12
}
},
"extra": {
"rawValue": 21,
"raw": "21"
},
"value": 21
}
},
{
"type": "ObjectProperty",
"start": 433,
"end": 441,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 12
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 433,
"end": 437,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 8
},
"identifierName": "EISU"
},
"name": "EISU"
},
"value": {
"type": "NumericLiteral",
"start": 439,
"end": 441,
"loc": {
"start": {
"line": 27,
"column": 10
},
"end": {
"line": 27,
"column": 12
}
},
"extra": {
"rawValue": 22,
"raw": "22"
},
"value": 22
}
},
{
"type": "ObjectProperty",
"start": 447,
"end": 456,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 447,
"end": 452,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 9
},
"identifierName": "JUNJA"
},
"name": "JUNJA"
},
"value": {
"type": "NumericLiteral",
"start": 454,
"end": 456,
"loc": {
"start": {
"line": 28,
"column": 11
},
"end": {
"line": 28,
"column": 13
}
},
"extra": {
"rawValue": 23,
"raw": "23"
},
"value": 23
}
},
{
"type": "ObjectProperty",
"start": 462,
"end": 471,
"loc": {
"start": {
"line": 29,
"column": 4
},
"end": {
"line": 29,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 462,
"end": 467,
"loc": {
"start": {
"line": 29,
"column": 4
},
"end": {
"line": 29,
"column": 9
},
"identifierName": "FINAL"
},
"name": "FINAL"
},
"value": {
"type": "NumericLiteral",
"start": 469,
"end": 471,
"loc": {
"start": {
"line": 29,
"column": 11
},
"end": {
"line": 29,
"column": 13
}
},
"extra": {
"rawValue": 24,
"raw": "24"
},
"value": 24
}
},
{
"type": "ObjectProperty",
"start": 477,
"end": 486,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 477,
"end": 482,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 9
},
"identifierName": "HANJA"
},
"name": "HANJA"
},
"value": {
"type": "NumericLiteral",
"start": 484,
"end": 486,
"loc": {
"start": {
"line": 30,
"column": 11
},
"end": {
"line": 30,
"column": 13
}
},
"extra": {
"rawValue": 25,
"raw": "25"
},
"value": 25
}
},
{
"type": "ObjectProperty",
"start": 492,
"end": 499,
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 31,
"column": 11
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 492,
"end": 495,
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 31,
"column": 7
},
"identifierName": "_26"
},
"name": "_26"
},
"value": {
"type": "NumericLiteral",
"start": 497,
"end": 499,
"loc": {
"start": {
"line": 31,
"column": 9
},
"end": {
"line": 31,
"column": 11
}
},
"extra": {
"rawValue": 26,
"raw": "26"
},
"value": 26
}
},
{
"type": "ObjectProperty",
"start": 505,
"end": 515,
"loc": {
"start": {
"line": 32,
"column": 4
},
"end": {
"line": 32,
"column": 14
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 505,
"end": 511,
"loc": {
"start": {
"line": 32,
"column": 4
},
"end": {
"line": 32,
"column": 10
},
"identifierName": "ESCAPE"
},
"name": "ESCAPE"
},
"value": {
"type": "NumericLiteral",
"start": 513,
"end": 515,
"loc": {
"start": {
"line": 32,
"column": 12
},
"end": {
"line": 32,
"column": 14
}
},
"extra": {
"rawValue": 27,
"raw