Skip to content
On this page

title: ftCameraControls

ftCameraControls

FTCameraControls

Kind: global class

new FTCameraControls(camera, canvas)

相机控制器

ParamTypeDescription
cameraTHREE.Camera三维场景摄像机对象
canvascanvas三维场景 Canvas 对象

ftCameraControls.controls : OrbitControls

three.js 原生相机控制 此控制器任何原生属性 都可由 FTCameraControl 修改

Kind: instance property of FTCameraControls

ftCameraControls.camera : THREE.Camera

传入的 Camera 对象

Kind: instance property of FTCameraControls

ftCameraControls.setLookAt(px, py, pz, tx, ty, yz, flytime, callback)

相机定位,参数可通过 getCameraState 获取

Kind: instance method of FTCameraControls

ParamTypeDescription
pxNumber相机位置点 X
pyNumber相机位置点 Y
pzNumber相机位置点 Z
txNumber相机目标点 X
tyNumber相机目标点 Y
yzNumber相机目标点 Z
flytimeNumber飞行时间,单位(秒)
callbackfunction回调函数,视角切换完成后执行

ftCameraControls.getCameraState() ⇒ Array

相机刷新,应在 render 函数中调用

Kind: instance method of FTCameraControls
Returns: Array - 返回摄像机位置点和目标点

ftCameraControls.update()

相机刷新,应在 render 函数中调用

Kind: instance method of FTCameraControls