Table GetInventoryVideos ()
Function Description
void OpenUploadFileBrowser ()
Opens a window that let's you select a file you wish to upload. (white-label)
void OnUploadEnd (Closure c)
Binds the function c to be called when an upload operation ends.
void OnUploadStart (Closure c)
Binds the function c to be called when an upload operation begins.
Function Name |
---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Table GetInventoryVideos ()
void OpenUploadFileBrowser ()
void OnUploadEnd (Closure c)
void OnUploadStart (Closure c)
SResource GetUploadedTexture ()
Function Description
void GetSavedTexture (string path, Closure onComplete)
Function Description
Table GetInventoryTextures ()
Function Description
void OpenUploadFileBrowser ()
Opens a window that let's you select a file you wish to upload. (white-label)
void OnUploadEnd (Closure c)
Binds the function c to be called when an upload operation ends.
void OnUploadStart (Closure c)
Function Description
void OnChat (Closure callback) void OnChat (Action< SChatMessage > trackInfoCallback)
Bind a function to the OnChat event. This function will be called every time a new chat message is received on the local channel.
void JoinChat (string name)
Join a chat channel.
string GetXMPPName (string name)
Get XMPP name.
void LeaveChat (string name)
Leave a chat channel.
SVoiceZone GetVoiceZone (string channel)
Function Description
void JoinVoice (string channel, int priority=5, int spatial=0)
Join a voice chat channel.
void JoinGridVoice (string channel, int priority=5, int spatial=0)
JoinGridVoice is the same as JoinVoice except with a grid wide parameter. (white-label only)
void LeaveVoice (string channel)
Leave a voice chat channel
void ChangeMediaStatus (int status)
Function Description
void SendNetworkMessage (string key, Table message)
void SendNetworkMessage (string key, Table message, bool serverOnly)
void SendNetworkMessage (string key, Table message, bool serverOnly, bool loopback)
Sends a networked message to every client with a subscriber listening on 'key'. The message itself can be a dictionary/table containing two columns and any network serializable type (string, float, int, byte, bool and arrays of those types)
void SendNetworkMessageToUser (string key, Table message)
Sends a networked message to a specific user with a subscriber listening on 'key'. The message itself can be a dictionary/table containing two columns and any network serializable type (string, float, int, byte, bool and arrays of those types)
void SubscribeToRegionPropertyUpdate (string key, DynValue onRecieve)
Subscribes to region property updates on 'key'.
Subscribes to network messages on 'key', will fire a SNetworkMessage whenever a matching message is received
void SetRegionProperty (string key, string value)
Stores a key/value pair in the Regions semi-permanent memory. Will be erased when all players exit the region, but will persist as long as the region is open. Subject to rate limiting (10/second on the main grid and 20/second on white-label grids)
string GetRegionProperty (string key)
Retrieves the last set value for 'key' in this region. If you have just joined the region, this may not be populated immedietely.
void SetShardProperty (string key, string value)
Sets a property named 'key' of the Shard to 'value'. Will persist until the Shard is shut down or restarted. (Use SPersistence for longer term storage)
string GetShardProperty (string key)
Gets a previously set key.
bool HasShardProperties get
Returns True upon successful connection to the Region/Shard properties' storage. Region/Shard property operations may not be ready when used during initialization and this function ill help determine readiness.
void Get (string url, Closure onComplete, Table headers=null, float timeout=0)
Performs a HTTP[S] GET against URL and returns the contents as a SWebResponse
void Post (string url, string data, Closure onComplete, Table headers=null, float timeout=0)
Performs a HTTP[S] POST against URL using data as a post string and returns the contents as a SWebResponse
Function Name |
---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Function Name |
---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Parameter | Type | Description |
---|---|---|
Function Name |
---|
Property Name | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
void SubscribeToNetwork (string key, Action< > onRecieve) void SubscribeToNetwork (string key, DynValue onRecieve)
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
To setup your server for communication with space, in the root of your domain, on the port you are using, place a file named 'sinewave.space.scripting.txt' containing 'SPACE_OK'. E.g. - if this file is not present, you will be unable to use scripting to communicate with the domain. Note: you should use HTTPS for all API calls if you want these to work reliably in WebGL. You may also need to implement a CORS policy in your webserver headers.
Function Name |
---|
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|
GetImage (string url, Closure onComplete=null, Table header=null, float timeout=0)
Returns a valid for a image on a remote domain that can be used via e.g. . While the image loads, it will be a white pixel that will be substituted with the real image once loaded.
Parameter | Type | Description |
---|
SResource GetUploadedTexture ()
void GetSavedTexture (string path, Closure onComplete)
Table GetInventoryTextures ()
void OpenUploadFileBrowser ()
void OnUploadEnd (Closure c)
void OnUploadStart (Closure c)
path
string
onComplete
Closure (Callback)
Closure will be called once the saved texture has been retrieved. onComplete(SResource)
void JoinChat (string name)
string GetXMPPName (string name)
void LeaveChat (string name)
SVoiceZone GetVoiceZone (string channel)
void JoinVoice (string channel, int priority=5, int spatial=0)
void JoinGridVoice (string channel, int priority=5, int spatial=0)
void LeaveVoice (string channel)
void ChangeMediaStatus (int status)
onRecieve | Callback Closure | onRecieve(NetworkPropertyUpdate) will be called when a Region Property is updated. NetworkPropertyUpdate = { Key: "property_name", Message: "property_value" } |
Returns True upon successful connection to the Region/Shard properties' storage. Region/Shard property operations may not be ready when used during initialization and this function ill help determine readiness. |
void (string key, Table message, bool serverOnly, bool loopback) void (string key, Table message, bool serverOnly) void (string key, Table message)
void (string key, Table message, uint userID)
void (string key, DynValue onRecieve)
void (string key, DynValue onRecieve)
void (string key, string value)
string (string key)
void (string key, string value)
string (string key)
bool get
void (string url, Closure onComplete, Table headers=null, float timeout=0)
void (string url, string data, Closure onComplete, Table headers=null, float timeout=0)
SResource (string url, Closure onComplete=null, Table header=null, float timeout=0)