WebGL-Math
A functional mathematics library for WebGL.
Usage
Getting Started
Install with npm or yarn
npm install webgl-math
// or
yarn add webgl-math
then
const GLMath = // or
Example
Here's a simple example to create Model, View and Projection Matrices.
For more, see the docs
; const scaleMatrix = MatrixTransform; const translateMatrix = MatrixTransform; // Creating 4x4 Model Matrix except rotationconst modelMatrix = Matrix; // Creating Perspective Projection Matrix with fovy and aspect ratioconst projectionMatrix = MatrixCamera; // Creating View Matrixconst viewMatrix = MatrixCamera;
License
Licensed under the MIT license.