Constructor
new SceneSync(syncInstance, configopt)
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
syncInstance |
Firebase | Obtain this by calling altspace.utilities.sync.connect |
||||||||||||||||||||||||||
config |
Object |
<optional> |
Properties
|
Extends
Members
isMasterClient :boolean
True if this client is the master, false otherwise. Master is generally the client that has been in the room the longest.
type :string
The string name of this class. This is used for THREE.Object3D#getBehaviorByType.
Methods
destroy(object3d)
Destroy a synced object across instances.
Parameters:
Name | Type | Description |
---|---|---|
object3d |
Object | The object to destroy. |
instantiate(syncType, initData, destroyOnDisconnect) → {Object3DSync}
Instantiate an object by syncType.
Parameters:
Name | Type | Description |
---|---|---|
syncType |
String | Type of object to instantiate. |
initData |
Object | An object containing initialization data, passed to the instantiator. |
destroyOnDisconnect |
Boolean | If the object should be destroyed across all synced instance when the instantiating instance disconnects. |