Matrix4x4.perspective()
Build a perspective projection matrix
Parameters
Name | Type | Description | |
---|---|---|---|
1 | fovy | number | |
2 | aspect | number | |
3 | znear | number | |
4 | zfar | number |
Return value
Matrix4x4
the Matrix4x4 with its new values
Usage
import {Matrix4x4} from '@lcluber/type6js';
let fovy = 60;
let aspect = 16/9;
let znear = 0.1;
let zfar = 100;
let projectionMatrix = Matrix4x4.perspective(fovy, aspect, znear, zfar);