Saltar al contenido principal

Camera Events

Eventos

ACTIVE_CAMERA_CHANGE

Emitted when the active camera changes.

Propiedades

PropiedadTipoDescripción
cameraCámaraThe active camera

Ejemplo

world.events.addListener(world.events.globalId, ecs.CameraEvents.ACTIVE_CAMERA_CHANGE, (camera) => {
console.log(camera)
})

ACTIVE_CAMERA_EID_CHANGE

Emitted when the active camera eid changes.

Propiedades

PropiedadTipoDescripción
eidCámaraThe active camera

Ejemplo

world.events.addListener(world.events.globalId, ecs.CameraEvents.ACTIVE_CAMERA_EID_CHANGE, (eid) => {
console.log(eid)
})

XR_CAMERA_EDIT

Emitted when any XR attribute is changed on the active camera.

Ejemplo

world.events.addListener(world.events.globalId, ecs.CameraEvents.XR_CAMERA_EDIT, () => {
console.log('Something happened')
})