Constructor
new module.exports(definitionopt, instanceDefinitionopt, callbackopt, parentopt) → {Entity}
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
definition |
Object
|
<optional> |
Base definition for the entity.
|
||||||||||||||||
instanceDefinition |
Object
|
<optional> |
Specific instance definition including properties that override the base definition properties.
|
||||||||||||||||
callback |
function
|
<optional> |
A function to run once all of the components on the Entity have been loaded. The first parameter is the entity itself. |
||||||||||||||||
parent |
Entity
|
<optional> |
Presets the parent of the entity so that the parent entity is available during component instantiation. Overrides |
Fires:
Returns:
- Type:
-
Entity
Returns the new entity made up of the provided components.