Class: WorldListener

WorldListener()

Convenience class to make listening to world changes easier. Add WorldListeners to a World, and WorldManager will notify them when world changes.

Constructor

new WorldListener()

Source:

Classes

WorldListener

Methods

added(vrobject)

Called when a new object is added to the scene
Parameters:
Name Type Description
vrobject VRObject a VRObject, typically a User, added to the scene.
Source:

entered(welcome)

Called when user enters the world.
Parameters:
Name Type Description
welcome Welcome Welcome message
Source:

loaded(vrobject, mesh)

Called when a new object is loaded. What that exactly means, depends on type of object - e.g. avatars are loaded differently than video streams. Actual mesh/avatar/etc is in vrobject, e.g. vrobject.container in case of general model.
Parameters:
Name Type Description
vrobject VRObject a VRObject, typically a User, added to the scene.
mesh Root mesh created by the loader
Source:

loadError(vrobject)

Called when load fails
Parameters:
Name Type Description
vrobject VRObject that failed to load
Source:

removed(vrobject)

Called when an object is removed from the scene
Parameters:
Name Type Description
vrobject VRObject a VRObject, typically a User, removed from the scene
Source: