client = Client(url, name, client, updateStateAutomatically)
|client||Client||The AlloNet client.|
|updateStateAutomatically||boolean||Whether or not the client should automatically update its state.|
Fetch an entity when it is received This is asynchronous because you might receive an interaction with an entity ID pointing to an entity that you haven’t received yet.
|function||cb||(entity) callback when entity is arrived|
client:launchApp (string, Pose, table, function)
Ask the place to launch an app found at
| Name | Type | Description | | ——– | —— | ————— | | string | appurl | The
alloapp: URL to launch into the connected place | | Pose | pose | Transform/position of where in the place to launch the app | | table | args | key-value table of additional arguments to send to the app | | function | cb | Callback for how the launch went. On error, called as
cb(false, errstr). On success, called as
cb(true, launchedAvatarId). |
client:sendInteraction (Interaction, Function)
Send an RPC message (aka “interaction”) to another entity.
If you’re sending a “request” interaction (default), you should really listen to the callback to make sure your call succeeded.
|Interaction||interaction||a populated Interaction struct|
|Function||callback||(interaction, body) a callback that takes the response interaction and the parsed response body.|
Send and receive buffered data synchronously now. Loops over all queued network messages until the queue is empty.
|timeout_ms||???||how many ms to wait for incoming messages before giving up. Default 10.|
|bool whether any messages were parsed|