m3.js
Version:
Describe m3.js here
76 lines (57 loc) • 1.24 kB
Markdown
[![Travis][build-badge]][build]
[![npm package][npm-badge]][npm]
[![Coveralls][coveralls-badge]][coveralls]
Origin from https://webglfundamentals.org/
```
npm install m3.js
```
```
yanr add m3.js
```
```
// Quick example
import * as m3 from 'm3.js';
// ...
// Compute the matrices
var projectionMatrix = m3.projection(gl.canvas.width, gl.canvas.height);
```
OR
```
// Quick example
import { projection } from 'm3.js';
// ...
// Compute the matrices
var projectionMatrix = projection(gl.canvas.width, gl.canvas.height);
```
```
✔ degToRad
✔ distance
✔ dot
✔ identity
✔ inverse
✔ multiply
✔ normalize
✔ projection
✔ radToDeg
✔ reflect
✔ rotation
✔ rotate
✔ scaling
✔ scale
✔ transformPoint
✔ translation
✔ translate
✔ project
```
[]: https://img.shields.io/travis/user/repo/master.png?style=flat-square
[]: https://travis-ci.org/user/repo
[]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
[]: https://www.npmjs.org/package/npm-package
[]: https://img.shields.io/coveralls/user/repo/master.png?style=flat-square
[]: https://coveralls.io/github/user/repo