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,845 lines • 45.3 kB
JSON
{
"type": "File",
"start": 0,
"end": 833,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 27,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 833,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 27,
"column": 1
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 44,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 44
}
},
"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": "Updateable"
},
"name": "Updateable"
}
}
],
"source": {
"type": "StringLiteral",
"start": 23,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 43
}
},
"extra": {
"rawValue": "../base/Updateable",
"raw": "'../base/Updateable'"
},
"value": "../base/Updateable"
},
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * A component may be added to any GameObject by using\n * GameObject's function: addComponent(component).\n * \n * A component should redefine the Updateable functions inherited with custom code to define the Component functionality.\n ",
"start": 46,
"end": 285,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
}
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 286,
"end": 833,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 27,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 301,
"end": 833,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 27,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 307,
"end": 316,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 30
},
"identifierName": "Component"
},
"name": "Component",
"leadingComments": null
},
"superClass": {
"type": "Identifier",
"start": 325,
"end": 335,
"loc": {
"start": {
"line": 9,
"column": 39
},
"end": {
"line": 9,
"column": 49
},
"identifierName": "Updateable"
},
"name": "Updateable"
},
"body": {
"type": "ClassBody",
"start": 336,
"end": 833,
"loc": {
"start": {
"line": 9,
"column": 50
},
"end": {
"line": 27,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 606,
"end": 718,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 606,
"end": 617,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor",
"leadingComments": null
},
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 618,
"end": 624,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 22
},
"identifierName": "unique"
},
"name": "unique"
}
],
"body": {
"type": "BlockStatement",
"start": 626,
"end": 718,
"loc": {
"start": {
"line": 17,
"column": 24
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 636,
"end": 644,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 636,
"end": 643,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 636,
"end": 641,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 653,
"end": 680,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 35
}
},
"expression": {
"type": "AssignmentExpression",
"start": 653,
"end": 679,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 34
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 653,
"end": 667,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 653,
"end": 657,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 658,
"end": 667,
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 22
},
"identifierName": "className"
},
"name": "className"
},
"computed": false
},
"right": {
"type": "StringLiteral",
"start": 668,
"end": 679,
"loc": {
"start": {
"line": 19,
"column": 23
},
"end": {
"line": 19,
"column": 34
}
},
"extra": {
"rawValue": "Component",
"raw": "'Component'"
},
"value": "Component"
}
}
},
{
"type": "ExpressionStatement",
"start": 689,
"end": 712,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 689,
"end": 711,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 689,
"end": 702,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 21
}
},
"object": {
"type": "ThisExpression",
"start": 689,
"end": 693,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 694,
"end": 702,
"loc": {
"start": {
"line": 20,
"column": 13
},
"end": {
"line": 20,
"column": 21
},
"identifierName": "isUnique"
},
"name": "isUnique"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 705,
"end": 711,
"loc": {
"start": {
"line": 20,
"column": 24
},
"end": {
"line": 20,
"column": 30
},
"identifierName": "unique"
},
"name": "unique"
}
}
}
],
"directives": [],
"trailingComments": null
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * Constructor for Base Components.\n * Requires a boolean to indicate if a GameObject can contain multiple\n * components of this type.\n * \n * @param {boolean} unique Is there only one of these component allowed on a GameObject?\n ",
"start": 342,
"end": 601,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 16,
"column": 7
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\n * Called when the component is successfully added to a GameObject.\n ",
"start": 724,
"end": 807,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 25,
"column": 7
}
}
}
]
},
{
"type": "ClassMethod",
"start": 812,
"end": 831,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 23
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 812,
"end": 826,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 18
},
"identifierName": "onAddComponent"
},
"name": "onAddComponent",
"leadingComments": null
},
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 829,
"end": 831,
"loc": {
"start": {
"line": 26,
"column": 21
},
"end": {
"line": 26,
"column": 23
}
},
"body": [],
"directives": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * Called when the component is successfully added to a GameObject.\n ",
"start": 724,
"end": 807,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 25,
"column": 7
}
}
}
]
}
]
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * A component may be added to any GameObject by using\n * GameObject's function: addComponent(component).\n * \n * A component should redefine the Updateable functions inherited with custom code to define the Component functionality.\n ",
"start": 46,
"end": 285,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\n * A component may be added to any GameObject by using\n * GameObject's function: addComponent(component).\n * \n * A component should redefine the Updateable functions inherited with custom code to define the Component functionality.\n ",
"start": 46,
"end": 285,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\n * A component may be added to any GameObject by using\n * GameObject's function: addComponent(component).\n * \n * A component should redefine the Updateable functions inherited with custom code to define the Component functionality.\n ",
"start": 46,
"end": 285,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Constructor for Base Components.\n * Requires a boolean to indicate if a GameObject can contain multiple\n * components of this type.\n * \n * @param {boolean} unique Is there only one of these component allowed on a GameObject?\n ",
"start": 342,
"end": 601,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 16,
"column": 7
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Called when the component is successfully added to a GameObject.\n ",
"start": 724,
"end": 807,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 25,
"column": 7
}
}
}
],
"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": "Updateable",
"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": "../base/Updateable",
"start": 23,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 43
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 43,
"end": 44,
"loc": {
"start": {
"line": 1,
"column": 43
},
"end": {
"line": 1,
"column": 44
}
}
},
{
"type": "CommentBlock",
"value": "*\n * A component may be added to any GameObject by using\n * GameObject's function: addComponent(component).\n * \n * A component should redefine the Updateable functions inherited with custom code to define the Component functionality.\n ",
"start": 46,
"end": 285,
"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": 286,
"end": 292,
"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": 293,
"end": 300,
"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": 301,
"end": 306,
"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": "Component",
"start": 307,
"end": 316,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 30
}
}
},
{
"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": 317,
"end": 324,
"loc": {
"start": {
"line": 9,
"column": 31
},
"end": {
"line": 9,
"column": 38
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Updateable",
"start": 325,
"end": 335,
"loc": {
"start": {
"line": 9,
"column": 39
},
"end": {
"line": 9,
"column": 49
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 336,
"end": 337,
"loc": {
"start": {
"line": 9,
"column": 50
},
"end": {
"line": 9,
"column": 51
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Constructor for Base Components.\n * Requires a boolean to indicate if a GameObject can contain multiple\n * components of this type.\n * \n * @param {boolean} unique Is there only one of these component allowed on a GameObject?\n ",
"start": 342,
"end": 601,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 16,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "constructor",
"start": 606,
"end": 617,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 15
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 617,
"end": 618,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "unique",
"start": 618,
"end": 624,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 22
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 624,
"end": 625,
"loc": {
"start": {
"line": 17,
"column": 22
},
"end": {
"line": 17,
"column": 23
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 626,
"end": 627,
"loc": {
"start": {
"line": 17,
"column": 24
},
"end": {
"line": 17,
"column": 25
}
}
},
{
"type": {
"label": "super",
"keyword": "super",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "super",
"start": 636,
"end": 641,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 13
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 641,
"end": 642,
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 14
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 642,
"end": 643,
"loc": {
"start": {
"line": 18,
"column": 14
},
"end": {
"line": 18,
"column": 15
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 643,
"end": 644,
"loc": {
"start": {
"line": 18,
"column": 15
},
"end": {
"line": 18,
"column": 16
}
}
},
{
"type": {
"label": "this",
"keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "this",
"start": 653,
"end": 657,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 12
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 657,
"end": 658,
"loc": {
"start": {
"line": 19,
"column": 12
},
"end": {
"line": 19,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "className",
"start": 658,
"end": 667,
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 22
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 667,
"end": 668,
"loc": {
"start": {
"line": 19,
"column": 22
},
"end": {
"line": 19,
"column": 23
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "Component",
"start": 668,
"end": 679,
"loc": {
"start": {
"line": 19,
"column": 23
},
"end": {
"line": 19,
"column": 34
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 679,
"end": 680,
"loc": {
"start": {
"line": 19,
"column": 34
},
"end": {
"line": 19,
"column": 35
}
}
},
{
"type": {
"label": "this",
"keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "this",
"start": 689,
"end": 693,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 12
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 693,
"end": 694,
"loc": {
"start": {
"line": 20,
"column": 12
},
"end": {
"line": 20,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "isUnique",
"start": 694,
"end": 702,
"loc": {
"start": {
"line": 20,
"column": 13
},
"end": {
"line": 20,
"column": 21
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 703,
"end": 704,
"loc": {
"start": {
"line": 20,
"column": 22
},
"end": {
"line": 20,
"column": 23
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "unique",
"start": 705,
"end": 711,
"loc": {
"start": {
"line": 20,
"column": 24
},
"end": {
"line": 20,
"column": 30
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 711,
"end": 712,
"loc": {
"start": {
"line": 20,
"column": 30
},
"end": {
"line": 20,
"column": 31
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 717,
"end": 718,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
}
},
{
"type": "CommentBlock",
"value": "*\n * Called when the component is successfully added to a GameObject.\n ",
"start": 724,
"end": 807,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 25,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "onAddComponent",
"start": 812,
"end": 826,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 18
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 826,
"end": 827,
"loc": {
"start": {
"line": 26,
"column": 18
},
"end": {
"line": 26,
"column": 19
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 827,
"end": 828,
"loc": {
"start": {
"line": 26,
"column": 19
},
"end": {
"line": 26,
"column": 20
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 829,
"end": 830,
"loc": {
"start": {
"line": 26,
"column": 21
},
"end": {
"line": 26,
"column": 22
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 830,
"end": 831,
"loc": {
"start": {
"line": 26,
"column": 22
},
"end": {
"line": 26,
"column": 23
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 832,
"end": 833,
"loc": {
"start": {
"line": 27,
"column": 0
},
"end": {
"line": 27,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 833,
"end": 833,
"loc": {
"start": {
"line": 27,
"column": 1
},
"end": {
"line": 27,
"column": 1
}
}
}
]
}