0.0.6 • Published 9 years ago

gl-matrix-core v0.0.6

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

gl-matrix-core

This module wraps up @charlottegore's 3d gl-matrix components in a way that is compatible with node.js. At the time I wrote this, his npm modules couldn't be imported using require() properly due to some name issues.

Installation

npm install gl-matrix-core

Usage

var gl = require("gl-matrix-core");

var v = gl.vec3.fromValues(0, 0, 1);
var q = gl.quat.create();
var transform = gl.mat3.create();

console.log("v: ", v);

gl.quat.setAxisAngle(q, gl.vec3.clone([0, 1, 0]), Math.PI / 2);
console.log("quat: ", q);

gl.mat3.fromQuat(transform, q);
console.log("transform: ", transform);

var newV = gl.vec3.create();
gl.mat3.mul(newV, transform, v);

console.log("newV: ", newV);
0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

1.0.0

9 years ago