Class: Camera
Camera class
Extends
TypedEventEmitter
<CameraEvents
>
Implements
CameraState
Constructors
new Camera()
new Camera():
Camera
Returns
Overrides
TypedEventEmitter<CameraEvents>.constructor
Defined in
Properties
angle
angle:
number
=0
Implementation of
CameraState.angle
Defined in
animationCallback()?
optional
animationCallback: () =>void
Returns
void
Defined in
enabledRotation
enabledRotation:
boolean
=true
Defined in
maxRatio
maxRatio:
null
|number
=null
Defined in
minRatio
minRatio:
null
|number
=null
Defined in
ratio
ratio:
number
=1
Implementation of
CameraState.ratio
Defined in
rawEmitter
rawEmitter:
EventEmitter
<DefaultEventMap
>
Inherited from
TypedEventEmitter.rawEmitter
Defined in
x
x:
number
=0.5
Implementation of
CameraState.x
Defined in
y
y:
number
=0.5
Implementation of
CameraState.y
Defined in
Methods
addListener()
addListener<
Event
>(type
,listener
):this
Type Parameters
• Event extends "updated"
Parameters
• type: Event
• listener: CameraEvents
[Event
]
Returns
this
Inherited from
TypedEventEmitter.addListener
Defined in
animate()
animate(state, opts, callback)
animate(
state
,opts
,callback
):void
Method used to animate the camera.
Parameters
• state: Partial
<CameraState
>
• opts: Partial
<AnimateOptions
>
• callback
Returns
void
Defined in
animate(state, opts)
animate(
state
,opts
?):Promise
<void
>
Parameters
• state: Partial
<CameraState
>
• opts?: Partial
<AnimateOptions
>
Returns
Promise
<void
>
Defined in
animatedReset()
animatedReset(
options
?):Promise
<void
>
Method used to reset the camera.
Parameters
• options?: Partial
<AnimateOptions
>
Returns
Promise
<void
>
Defined in
animatedUnzoom()
animatedUnzoom(
factorOrOptions
?):Promise
<void
>
Method used to unzoom the camera.
Parameters
• factorOrOptions?: number
| Partial
<AnimateOptions
> & object
Returns
Promise
<void
>
Defined in
animatedZoom()
animatedZoom(
factorOrOptions
?):Promise
<void
>
Method used to zoom the camera.
Parameters
• factorOrOptions?: number
| Partial
<AnimateOptions
> & object
Returns
Promise
<void
>
Defined in
copy()
copy():
Camera
Returns a new Camera instance, with the same state as the current camera.
Returns
Defined in
disable()
disable():
this
Method used to disable the camera.
Returns
this
Defined in
emit()
emit<
Event
>(type
, ...args
):boolean
Type Parameters
• Event extends "updated"
Parameters
• type: Event
• ...args: Parameters
<CameraEvents
[Event
]>
Returns
boolean
Inherited from
TypedEventEmitter.emit
Defined in
enable()
enable():
this
Method used to enable the camera.