projection static method

List<double> projection(
  1. double width,
  2. double height,
  3. double depth
)

Implementation

static List<double> projection(double width, double height, double depth) {
  // Note: This matrix flips the Y axis so 0 is at the top.
  return [
    2 / width, 0, 0, 0, //
    0, -2 / height, 0, 0, //
    0, 0, 2 / depth, 0, //
    -1, 1, 0, 1, //
  ];
}