1. rotateCamera
绕指定中心旋转相机。
1.1. 参数说明:
名称 | 说明 | 类型 | 是否必填 | 示例 |
---|---|---|---|---|
rotationDelta | 旋转的值 | 数组 Array或 THREE.Vector2对象 | 是 | [100,100]或{x:100,y:100} |
pivot | 旋转的支点 | 数组 Array或 THREE.Vector3对象 | 是 | [100,100,100]或{x:100,y:100,z:100} |
1.2. 调用方式:
/**
* 旋转相机
* @method rotateCamera
* @param {THREE.Vector2|Array} rotationDelta - 旋转的值:屏幕坐标中的像素值
* @param {THREE.Vector3|Array} pivot - 旋转的支点:三维空间向量,默认为场景中心点
* @return {void}
*/
viewer3D.rotateCamera([10,0],[100,100,100]);