@quake2ts/shared 0.0.751 → 0.0.753

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -734,6 +734,28 @@ function multiplyMat4(a, b) {
734
734
  }
735
735
  return out;
736
736
  }
737
+ function mat4Ortho(out, left, right, bottom, top, near, far) {
738
+ const lr = 1 / (left - right);
739
+ const bt = 1 / (bottom - top);
740
+ const nf = 1 / (near - far);
741
+ out[0] = -2 * lr;
742
+ out[1] = 0;
743
+ out[2] = 0;
744
+ out[3] = 0;
745
+ out[4] = 0;
746
+ out[5] = -2 * bt;
747
+ out[6] = 0;
748
+ out[7] = 0;
749
+ out[8] = 0;
750
+ out[9] = 0;
751
+ out[10] = nf;
752
+ out[11] = 0;
753
+ out[12] = (left + right) * lr;
754
+ out[13] = (top + bottom) * bt;
755
+ out[14] = near * nf;
756
+ out[15] = 1;
757
+ return out;
758
+ }
737
759
  function transformPointMat4(mat, point) {
738
760
  const x = point.x;
739
761
  const y = point.y;
@@ -6200,6 +6222,7 @@ exports.lengthVec3 = lengthVec3;
6200
6222
  exports.lerpAngle = lerpAngle;
6201
6223
  exports.mat4FromBasis = mat4FromBasis;
6202
6224
  exports.mat4Identity = mat4Identity;
6225
+ exports.mat4Ortho = mat4Ortho;
6203
6226
  exports.mat4Perspective = mat4Perspective;
6204
6227
  exports.mat4Translate = mat4Translate;
6205
6228
  exports.mouseDeltaToViewDelta = mouseDeltaToViewDelta;