makePerspective method
dynamic
makePerspective(
- dynamic left,
- dynamic right,
- dynamic top,
- dynamic bottom,
- dynamic near,
- dynamic far,
Implementation
@override
makePerspective(left, right, top, bottom, near, far) {
console.info(
'THREE.WebGPURenderer: Modified Matrix4.makePerspective() and Matrix4.makeOrtographic() to work with WebGPU, see https://github.com/mrdoob/three.js/issues/20276.');
var te = this.elements;
var x = 2 * near / (right - left);
var y = 2 * near / (top - bottom);
var a = (right + left) / (right - left);
var b = (top + bottom) / (top - bottom);
var c = -far / (far - near);
var d = -far * near / (far - near);
te[0] = x;
te[4] = 0;
te[8] = a;
te[12] = 0;
te[1] = 0;
te[5] = y;
te[9] = b;
te[13] = 0;
te[2] = 0;
te[6] = 0;
te[10] = c;
te[14] = d;
te[3] = 0;
te[7] = 0;
te[11] = -1;
te[15] = 0;
return this;
}