mrdoob/three.js — pull request #2964 by WestLangley (2013-01-22 03:56:11+00:00)
Title: Added Matrix3.getNormalMatrix( m ) and Vector3.transformDirection( m )

`Matrix3.getNormalMatrix( m `) computes the Normal Matrix from the affine matrix `m`.

Usage looks like this:

var normalMatrix = new THREE.Matrix3().getNormalMatrix( m );
normal.applyMatrix3( normalMatrix ).normalize();

`Vector3.transformDirection( m )` applies matrix `m` to the vector, but treats the vector as a direction in the calculation. It replaces `Matrix4.rotateAxis( v )`, which will be removed eventually.