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

Camera Events

Events

ACTIVE_CAMERA_CHANGE

Emitted when the active camera changes.

Properties

PropertyTypeDescription
cameraCameraThe active camera

Example

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.

Properties

PropertyTypeDescription
eidCameraThe active camera

Example

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.

Example

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