CameraAnimation
Since version 4.0.0
Animation of the Camera
class CameraAnimation
Methods
Return a promise that resolved on animation end.
Update animation by given deltaTime.
Constructor
Create new instance
new CameraAnimation(camera: Camera, from: CameraPose, to: CameraPose, options: { duration: undefined | number; easing: undefined | ((x: number) => number) }): CameraAnimation
Parameters
camera
Camera to animate
from
CameraPose
Start pose
to
CameraPose
End pose
options
{ duration: undefined | number; easing: undefined | ((x: number) => number) }
{}
Options
options.duration
undefined | number
Animation duration
options.easing
undefined | Function
Animation easing function
Properties
duration
>=4.0.0
durationnumber
Duration of the animation
easing
>=4.0.0
easing((x: number) => number)
Easing function of the animation
Methods
getFinishPromise
>=4.0.0
getFinishPromisePromise<void>
getFinishPromise(): Promise<void>
Return a promise that resolved on animation end.
update
>=4.0.0
updatevoid
update(deltaTime: number): void
Update animation by given deltaTime.
Parameters
deltaTime
number
Number of milisec to update