API Reference › Globals › CameraControl3D
# Class: CameraControl3D
# Hierarchy
↳ CameraControl3D
# Implements
# Index
# Constructors
# Properties
# Methods
- addEventListener
- addLightContainer
- animateCamera
- checkNearFarDistance
- cleanUp
- clear
- disableEvents
- disablePanning
- dispatchEvent
- enableEvents
- enablePanning
- getCamera
- getInputPosition
- getObjectRotation
- getTargetPosition
- hasSavedState
- lock
- moveCamera
- removeEventListener
- reset
- resetToState
- saveState
- setBounds
- setObjectRotation
- setToState
- unlock
- updateAndReset
- updateCamera
- updateToBounds
- zoomIn
- zoomOut
- zoomTo
- zoomToFitBounds
# Constructors
# constructor
+ new CameraControl3D(creator
: string, inputManager
: InputManager, initialCameraPosition?
: Vector3, camera?
: PerspectiveOffsetCamera): CameraControl3D
Overrides CameraControl.constructor
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:65
Parameters:
Name | Type |
---|---|
creator | string |
inputManager | InputManager |
initialCameraPosition? | Vector3 |
camera? | PerspectiveOffsetCamera |
Returns: CameraControl3D
# Properties
# creator
• creator: string
_Implementation of Context.creator_
_Inherited from CameraControl.creator_
Defined in packages/common-core/src/cameracontrol/camera-control.ts:77
# maxAzimuthAngle
• maxAzimuthAngle: number = Number.POSITIVE_INFINITY
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:54
# maxDistance
• maxDistance: number = 5
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:47
# maxPolarAngle
• maxPolarAngle: number = toRadiant(MAX_POLAR_ANGLE)
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:50
# minAzimuthAngle
• minAzimuthAngle: number = Number.NEGATIVE_INFINITY
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:53
# minDistance
• minDistance: number = 0
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:46
# minPolarAngle
• minPolarAngle: number = toRadiant(0)
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:49
# Methods
# addEventListener
▸ addEventListener(eventName
: number, callback
: ListenerFunction‹any›, scope
: any): void
Inherited from EventDispatcher.addEventListener
Defined in packages/configurator-core/src/utils/event-dispatcher.ts:29
Parameters:
Name | Type |
---|---|
eventName | number |
callback | ListenerFunction‹any› |
scope | any |
Returns: void
# addLightContainer
▸ addLightContainer(container
: Object3D): void
Inherited from CameraControl.addLightContainer
Defined in packages/common-core/src/cameracontrol/camera-control.ts:362
Parameters:
Name | Type |
---|---|
container | Object3D |
Returns: void
# animateCamera
▸ animateCamera(delta
: number): boolean
Overrides CameraControl.animateCamera
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:152
Parameters:
Name | Type |
---|---|
delta | number |
Returns: boolean
# checkNearFarDistance
▸ checkNearFarDistance(point
: Vector3): void
Inherited from CameraControl.checkNearFarDistance
Defined in packages/common-core/src/cameracontrol/camera-control.ts:372
Parameters:
Name | Type |
---|---|
point | Vector3 |
Returns: void
# cleanUp
▸ cleanUp(): void
Inherited from CameraControl.cleanUp
Defined in packages/common-core/src/cameracontrol/camera-control.ts:157
Returns: void
# clear
▸ clear(): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:593
Returns: void
# disableEvents
▸ disableEvents(): void
Inherited from EventDispatcher.disableEvents
Defined in packages/configurator-core/src/utils/event-dispatcher.ts:67
Returns: void
# disablePanning
▸ disablePanning(): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:610
Returns: void
# dispatchEvent
▸ dispatchEvent(eventName
: number, arg?
: any): void
Inherited from EventDispatcher.dispatchEvent
Defined in packages/configurator-core/src/utils/event-dispatcher.ts:33
Parameters:
Name | Type |
---|---|
eventName | number |
arg? | any |
Returns: void
# enableEvents
▸ enableEvents(): void
Inherited from EventDispatcher.enableEvents
Defined in packages/configurator-core/src/utils/event-dispatcher.ts:63
Returns: void
# enablePanning
▸ enablePanning(): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:605
Returns: void
# getCamera
▸ getCamera(): PerspectiveOffsetCamera
Overrides CameraControl.getCamera
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:119
Returns: PerspectiveOffsetCamera
# getInputPosition
▸ getInputPosition(position
: Position2): Vector3‹›
Inherited from CameraControl.getInputPosition
Defined in packages/common-core/src/cameracontrol/camera-control.ts:355
Parameters:
Name | Type |
---|---|
position | Position2 |
Returns: Vector3‹›
# getObjectRotation
▸ getObjectRotation(): number
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:142
Returns: number
# getTargetPosition
▸ getTargetPosition(): Vector3
Inherited from CameraControl.getTargetPosition
Defined in packages/common-core/src/cameracontrol/camera-control.ts:345
Returns: Vector3
# hasSavedState
▸ hasSavedState(): boolean
Inherited from CameraControl.hasSavedState
Defined in packages/common-core/src/cameracontrol/camera-control.ts:333
Returns: boolean
# lock
▸ lock(): void
Inherited from CameraControl.lock
Defined in packages/common-core/src/cameracontrol/camera-control.ts:337
Returns: void
# moveCamera
▸ moveCamera(cameraParameter
: CameraParameter): Promise‹void›
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:601
Parameters:
Name | Type |
---|---|
cameraParameter | CameraParameter |
Returns: Promise‹void›
# removeEventListener
▸ removeEventListener(eventName
: number, fun
: ListenerFunction‹any›): void
Inherited from EventDispatcher.removeEventListener
Defined in packages/configurator-core/src/utils/event-dispatcher.ts:49
Parameters:
Name | Type |
---|---|
eventName | number |
fun | ListenerFunction‹any› |
Returns: void
# reset
▸ reset(bounds
: Box3, target?
: Vector3, yaw?
: number, pitch?
: number, animate
: boolean): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:394
Parameters:
Name | Type | Default |
---|---|---|
bounds | Box3 | - |
target? | Vector3 | - |
yaw? | number | - |
pitch? | number | - |
animate | boolean | true |
Returns: void
# resetToState
▸ resetToState(): void
Inherited from CameraControl.resetToState
Defined in packages/common-core/src/cameracontrol/camera-control.ts:313
Returns: void
# saveState
▸ saveState(override
: boolean): CameraParameter
Inherited from CameraControl.saveState
Defined in packages/common-core/src/cameracontrol/camera-control.ts:287
Parameters:
Name | Type |
---|---|
override | boolean |
Returns: CameraParameter
# setBounds
▸ setBounds(boundingBox
: Box3): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:277
Parameters:
Name | Type |
---|---|
boundingBox | Box3 |
Returns: void
# setObjectRotation
▸ setObjectRotation(objectRotation
: number): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:138
Parameters:
Name | Type |
---|---|
objectRotation | number |
Returns: void
# setToState
▸ setToState(start
: CameraParameter, state
: CameraParameter): void
Inherited from CameraControl.setToState
Defined in packages/common-core/src/cameracontrol/camera-control.ts:329
Parameters:
Name | Type |
---|---|
start | CameraParameter |
state | CameraParameter |
Returns: void
# unlock
▸ unlock(): void
Inherited from CameraControl.unlock
Defined in packages/common-core/src/cameracontrol/camera-control.ts:341
Returns: void
# updateAndReset
▸ updateAndReset(bounds
: Vector3, target?
: Vector3, yaw?
: number, pitch?
: number, spacing?
: number, animate
: boolean): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:445
Parameters:
Name | Type | Default |
---|---|---|
bounds | Vector3 | - |
target? | Vector3 | - |
yaw? | number | - |
pitch? | number | - |
spacing? | number | - |
animate | boolean | true |
Returns: void
# updateCamera
▸ updateCamera(): void
Overrides CameraControl.updateCamera
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:146
Returns: void
# updateToBounds
▸ updateToBounds(boundingBox
: Box3, isPreview
: boolean, changeCamera
: boolean, target?
: Vector3): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:301
Parameters:
Name | Type | Default |
---|---|---|
boundingBox | Box3 | - |
isPreview | boolean | - |
changeCamera | boolean | true |
target? | Vector3 | - |
Returns: void
# zoomIn
▸ zoomIn(value?
: number): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:577
Parameters:
Name | Type |
---|---|
value? | number |
Returns: void
# zoomOut
▸ zoomOut(value?
: number): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:585
Parameters:
Name | Type |
---|---|
value? | number |
Returns: void
# zoomTo
▸ zoomTo(bounds
: Vector3, windowWidth
: number, windowHeight
: number, yaw
: number, pitch
: number, target
: Vector3): Promise‹void›
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:560
Parameters:
Name | Type |
---|---|
bounds | Vector3 |
windowWidth | number |
windowHeight | number |
yaw | number |
pitch | number |
target | Vector3 |
Returns: Promise‹void›
# zoomToFitBounds
▸ zoomToFitBounds(boundingBox
: Box3): void
Defined in packages/common-core/src/cameracontrol/camera-control-3d.ts:281
Parameters:
Name | Type |
---|---|
boundingBox | Box3 |
Returns: void