rideTurnDegrees関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How many degrees the camera turns for a change of the controls' yaw at a zoom. The controls wrap their yaw into -180 to 180, so a page adds up the turns itself, change by change (wrapYaw of the change, scaled by this at the zoom of the moment), and hands
the total to ridePose as turn: a drag the whole way round is then a turn the whole way round, and the pace follows the field of view at any zoom.
インポート
import { rideTurnDegrees } from "@johnmorrisdotca/chikyu-earth/space";
定義
function rideTurnDegrees(change: number, zoom: number): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
change | number | The change of yaw, in degrees, between two views of the controls (already brought into -180 to 180). |
zoom | number | The shared controls' zoom at the moment. |
戻り値
number
The turn, in degrees.
例
import { rideTurnDegrees } from "@johnmorrisdotca/chikyu-earth/space";
console.log(rideTurnDegrees(180, 1), rideTurnDegrees(180, 6));90 15出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。