Skip to content

Instantly share code, notes, and snippets.

@humbletim
Created February 23, 2015 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save humbletim/43ffd612a609659dd7a9 to your computer and use it in GitHub Desktop.
Save humbletim/43ffd612a609659dd7a9 to your computer and use it in GitHub Desktop.
GLM Example - JavaScript
var glm = require('./build/glm-three.min.js');
this.mrot = this.mrot ||
glm.angleAxis(glm.radians(45.0), glm.vec3(0,1,0));
var m1 = glm.mat4(1.0);
var m2 = glm.mat4(2.0);
var m3 = m1['*'](m2);
m3['*='](glm.toMat4(this.mrot));
console.warn(glm.to_string(m3));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment