メインコンテンツへスキップ

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

PropertyTypeDescription
idstringThe unique identifier for the location
imageUrlstringThe location image
titlestringThe location title
latnumberLatitude of the location
lngnumberLongitude of the location
mapPointEidThe 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');
});