Skip to content

Instantly share code, notes, and snippets.

@jmurzy
Created October 26, 2016 07:39
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 jmurzy/a4d794c9342504e2ccb81550d7ca2ed3 to your computer and use it in GitHub Desktop.
Save jmurzy/a4d794c9342504e2ccb81550d7ca2ed3 to your computer and use it in GitHub Desktop.
function rotateX(deg) {
const rad = (Math.PI / 180) * deg;
const cos = Math.cos(rad);
const sin = Math.sin(rad);
return [
1, 0, 0, 0,
0, cos, -sin, 0,
0, sin, cos, 0,
0, 0, 0, 1,
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment