UNPKG

@three3d/tools

Version:

@three3d/tools 提供了 ThreeJS 常用的工具库

34 lines (19 loc) 875 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@three3d/tools](./tools.md) &gt; [getRotationAngle](./tools.getrotationangle.md) ## getRotationAngle() function 以轴 refAxis 为参考轴,获取从向量 from 到 向量 to 的旋转角度 **Signature:** ```typescript export declare function getRotationAngle(from: Vector3, to: Vector3, refAxis: Vector3): number; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | from | Vector3 | 起始向量 | | to | Vector3 | 结束向量 | | refAxis | Vector3 | 参考轴; | **Returns:** number ## Remarks 参考轴只提供大致的方向;最终计算的旋转角度不是以参考轴为旋转轴的,而是以垂直于 from 和 to 的轴为旋转轴的; 以逆时钟方向为旋转正方向