General Events
Events
ACTIVE_SPACE_CHANGE
Emitted when the world loads a Space (no promise of the Space being loaded).
Properties
None.
Example
world.events.addListener(world.events.globalId, ecs.events.ACTIVE_SPACE_CHANGE, () => {
console.log('Active space change');
});
LOCATION_SPAWNED
Emitted when a VPS Location is spawned on the map.
Properties
Property | Type | Description |
---|---|---|
id | string | The unique identifier for the location |
imageUrl | string | The location image |
title | string | The location title |
lat | number | Latitude of the location |
lng | number | Longitude of the location |
mapPoint | Eid | The spawned map point entity to parent your content under |
Example (Global)
world.events.addListener(world.events.globalId, ecs.events.LOCATION_SPAWNED, ({data}) => {
console.log(data)
})
Example (Entity Specific)
world.events.addListener(mapEid, ecs.events.LOCATION_SPAWNED, ({data}) => {
console.log(data)
})
realityready
This event is emitted when 8th Wall Web has initialized.
Properties
None.
Example
world.events.addListener(world.events.globalId, 'realityready', () => {
console.log('realityready');
});