Object3DSync

altspace/utilities/behaviors. Object3DSync

The Object3DSync behavior syncs an object's transform and data. Note: Object3DSync must be used in conjunction with SceneSync

Constructor

new Object3DSync(configopt)

Parameters:
Name Type Attributes Description
config Object <optional>
Properties
Name Type Attributes Default Description
position Boolean <optional>
false

Whether object's position should be synced

rotation Boolean <optional>
false

Whether object's rotation should be synced

scale Boolean <optional>
false

Whether object's scale should be synced

auto Boolean <optional>
false

Whether the object should be synced automatically. Not currently recommended.

world Boolean <optional>
false

Whether world coordiantes should be sent when synchronizing position and rotation, instead of the transformation relative to the object's parent. Use if synced object is a child (e.g. of the tracking skeleton) only in the sender scene.

Extends

Members

type :string

The string name of this class. This is used for THREE.Object3D#getBehaviorByType.

Overrides:

Methods

takeOwnership()

Take ownership of this object. The client that instantiates an object owns it, afterwards changes in ownership must be managed by the app. Manual modifications to the Firebase ref's will not obey ownership status.

Events

ownershipgained

Fired when a synced object's ownership is transferred to the local client.

ownershiplost

Fired when a synced object's ownership is transferred to someone else.