Package

purescript-gl-matrix

Repository
dirkz/purescript-gl-matrix
License
MIT
Uploaded by
dirkz
Published on
2021-11-20

Purescript wrapper around glmatrix.net (3.3.0).

For the glmatrix documention, see here. Note that the purescript version uses immutable types, so no set functions are offered, and all functions return a new object.

Important Notes

  • The API is wrong when you choose MatrixArrayTypeFloat32Array (Number vs Float32). This is not recommended, even though all tests usually run with both versions. Recommended: setMatrixArrayType MatrixArrayTypeArray.

Quick Start

npm install
spago -x test.dhall test

What is missing

  • Some glmatrix functions could return null. That should be reflected in the API. Although that hasn't happened in any of the random tests so far.
  • No support for Quat2.
  • Not all tests cover all the library sources. Some tests exploit special laws (like using identity) which may lead to some calculations not being executed.
  • The documentation was just pasted from http://glmatrix.net/docs/index.html. That could be improved.

Pull requests are welcome. Please be aware of the LICENSE and format your code with purty.