Members
gameContext :Context
Type:
- Context
promises :Object.<string, Promise>
Type:
- Object.<string, Promise>
Methods
dispatch(eventID, data) → {Promise}
Parameters:
Name | Type | Description |
---|---|---|
eventID | string | event to notify listener of |
data | object | serializable data |
Returns:
- promise resolving when event has finished
- Type:
- Promise
on(eventID, promise)
Add a listener to parent thread message
Parameters:
Name | Type | Description |
---|---|---|
eventID | string | event id |
promise | PromiseListener | | callback return a promise or nothing |
start(gameScriptClass)
Run child process which can be summarize as so: Listen EVENT
of the parent and wait the gameobject When gameobject is received launch a Context
and step it over time
Parameters:
Name | Type | Description |
---|---|---|
gameScriptClass | Object.<string, function()> | class needs by object3D |