Interface: IFlexibleCameraManager
Beta
Flexible implementation of CameraManager. The user can switch between Orbit, FirstPerson or OrbitInCenter Supports automatic update of camera near and far planes and animated change of camera position and target. It provides additional functionality for controlling camera behavior and rotation.
Extends
Accessors
controlsType
Get Signature
get controlsType():
FlexibleControlsType
Beta
Get current FlexibleControlsType type
Returns
Set Signature
set controlsType(
value
):void
Beta
Set current FlexibleControlsType type
Parameters
• value: FlexibleControlsType
Returns
void
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:26
options
Get Signature
get options():
FlexibleControlsOptions
Beta
Set the options for the camera manager
Returns
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:37
Methods
activate()
activate(
cameraManager
?):void
Beta
Parameters
• cameraManager?: CameraManager
Previously used camera manager.
Returns
void
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:61
addControlsTypeChangeListener()
addControlsTypeChangeListener(
callback
):void
Beta
Parameters
• callback: FlexibleControlsTypeChangeDelegate
The callback function to be invoked when the controls type changes.
Returns
void
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:52
deactivate()
deactivate():
void
Beta
Returns
void
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:69
dispose()
dispose():
void
Beta
Returns
void
Obvious
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:109
fitCameraToBoundingBox()
fitCameraToBoundingBox(
boundingBox
,duration
?,radiusFactor
?):void
Beta
Parameters
• boundingBox: Box3
The bounding box in world space.
• duration?: number
The duration of the animation moving the camera.
• radiusFactor?: number
The ratio of the distance from camera to center of box and radius of the box.
Returns
void
Inherited from
CameraManager
.fitCameraToBoundingBox
Defined in
packages/camera-manager/src/CameraManager.ts:97
getCamera()
getCamera():
PerspectiveCamera
Beta
Returns
PerspectiveCamera
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:29
getCameraState()
getCameraState():
Required
<CameraState
>
Beta
Returns
Required
<CameraState
>
Camera state: position, target and rotation.
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:52
off()
off(event, callback)
off(
event
,callback
):void
Beta
Unsubscribes from changes of the camera event.
Parameters
• event: "cameraChange"
The event type.
• callback: CameraChangeDelegate
Callback function to be unsubscribed.
Returns
void
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:87
off(event, callback)
off(
event
,callback
):void
Beta
Parameters
• event: "cameraStop"
• callback: CameraStopDelegate
Returns
void
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:88
off(event, callback)
off(
event
,callback
):void
Beta
Parameters
• event: "cameraChange"
| "cameraStop"
• callback: CameraEventDelegate
Returns
void
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:89
on()
on(event, callback)
on(
event
,callback
):void
Beta
Subscribes to events on this camera manager. There are several event types: 'cameraChange' - Subscribes to changes of the camera. This is used by Reveal to react on changes of the camera. 'cameraStop' - Subscribes to events indicating the camera has stopped
Parameters
• event: "cameraChange"
The event type.
• callback: CameraChangeDelegate
Callback to be called when the event is fired.
Returns
void
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:78
on(event, callback)
on(
event
,callback
):void
Beta
Parameters
• event: "cameraStop"
• callback: CameraStopDelegate
Returns
void
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:79
on(event, callback)
on(
event
,callback
):void
Beta
Parameters
• event: "cameraChange"
| "cameraStop"
• callback: CameraEventDelegate
Returns
void
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:80
onClick()
onClick(
event
):Promise
<void
>
Beta
Parameters
• event: PointerEvent
Returns
Promise
<void
>
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:64
onDoubleClick()
onDoubleClick(
event
):Promise
<void
>
Beta
Parameters
• event: PointerEvent
Returns
Promise
<void
>
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:70
onFocusChanged()
onFocusChanged(
haveFocus
):void
Beta
Parameters
• haveFocus: boolean
Returns
void
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:105
onKey()
onKey(
event
,down
):void
Beta
Parameters
• event: KeyboardEvent
• down: boolean
Returns
void
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:99
onPointerDown()
onPointerDown(
event
,leftButton
):Promise
<void
>
Beta
Parameters
• event: PointerEvent
• leftButton: boolean
Returns
Promise
<void
>
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:76
onPointerDrag()
onPointerDrag(
event
,leftButton
):Promise
<void
>
Beta
Parameters
• event: PointerEvent
• leftButton: boolean
Returns
Promise
<void
>
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:82
onPointerUp()
onPointerUp(
event
,leftButton
):Promise
<void
>
Beta
Parameters
• event: PointerEvent
• leftButton: boolean
Returns
Promise
<void
>
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:88
onWheel()
onWheel(
event
,delta
):Promise
<void
>
Beta
Parameters
• event: WheelEvent
• delta: number
Returns
Promise
<void
>
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:93
removeControlsTypeChangeListener()
removeControlsTypeChangeListener(
callback
):void
Beta
Parameters
• callback: FlexibleControlsTypeChangeDelegate
The callback function to be removed from the controls type change listeners.
Returns
void
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:58
rotateCameraTo()
rotateCameraTo(
direction
,animationDuration
):void
Beta
Parameters
• direction: Vector3
The direction to rotate the camera towards.
• animationDuration: number
The duration of the rotation animation in milliseconds.
Returns
void
Defined in
packages/camera-manager/src/Flexible/IFlexibleCameraManager.ts:46
setCameraState()
setCameraState(
state
):void
Beta
Parameters
• state: CameraState
Camera state, all fields are optional.
Returns
void
Example
// store position, target
const { position, target } = cameraManager.getCameraState();
// restore position, target
cameraManager.setCameraState({ position, target });
Inherited from
Defined in
packages/camera-manager/src/CameraManager.ts:46
update()
update(
deltaTime
,boundingBox
):void
Beta
Parameters
• deltaTime: number
Delta time since last update in seconds.
• boundingBox: Box3
Global bounding box of the model(s) and any custom objects added to the scene.
Returns
void