Camera Events
Events​
ACTIVE_CAMERA_CHANGE​
Emitted when the active camera changes.
Properties​
Property | Type | Description |
---|---|---|
camera | Camera | The 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​
Property | Type | Description |
---|---|---|
eid | Camera | The 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')
})