makeOrthographic method
dynamic
makeOrthographic(
- dynamic left,
- dynamic right,
- dynamic top,
- dynamic bottom,
- dynamic near,
- dynamic far,
Implementation
@override
makeOrthographic(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 w = 1.0 / (right - left);
var h = 1.0 / (top - bottom);
var p = 1.0 / (far - near);
var x = (right + left) * w;
var y = (top + bottom) * h;
var z = near * p;
te[0] = 2 * w;
te[4] = 0;
te[8] = 0;
te[12] = -x;
te[1] = 0;
te[5] = 2 * h;
te[9] = 0;
te[13] = -y;
te[2] = 0;
te[6] = 0;
te[10] = -1 * p;
te[14] = -z;
te[3] = 0;
te[7] = 0;
te[11] = 0;
te[15] = 1;
return this;
}