UNPKG

@three3d/tools

Version:

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

35 lines (20 loc) 942 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@three3d/tools](./tools.md) &gt; [getAzimuthAngle](./tools.getazimuthangle.md) ## getAzimuthAngle() function 获取方位角:即:偏航角、俯仰角、横滚角 **Signature:** ```typescript export declare function getAzimuthAngle(target: Vector3, front: Vector3, up: Vector3): YawPitchRoll; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | target | Vector3 | 目标向量 | | front | Vector3 | 表示前方的向量 | | up | Vector3 | 表示上方的向量 | **Returns:** [YawPitchRoll](./tools.yawpitchroll.md) 返回 [YawPitchRoll](./tools.yawpitchroll.md) ## Remarks 以 front 为前方,以 up 为上方,计算 target 的 偏航角、俯仰角、横滚角 这些角度都是在各个轴上的投影旋转,各个轴相互独立,互不影响