viewMatrix関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The way the viewer looks at the cube: turned about the model's y (yaw), then tipped about the screen's x (pitch), in degrees.
インポート
import { viewMatrix } from "@johnmorrisdotca/kyuubu";
定義
function viewMatrix(yaw: number, pitch: number): Mat3
引数
| 名前 | 型 | 説明 |
|---|---|---|
yaw | number | The viewing angle about model y, in degrees. |
pitch | number | The viewing angle about screen x, in degrees. |
戻り値
Mat3
The way the viewer looks at the cube: turned about the model's y (yaw), then tipped about the screen's x (pitch), in degrees.
例
import { viewMatrix } from "@johnmorrisdotca/kyuubu";
console.log(viewMatrix(-30, -20));[
[ 0.8660254037844387, 0, -0.49999999999999994 ],
[ 0.17101007166283433, 0.9396926207859084, 0.29619813272602386 ],
[ 0.46984631039295416, -0.3420201433256687, 0.8137976813493738 ]
]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。