See lpsinger/three.js@a23b9d99d7dedb8ee7a4b0f7ac47a81308d23ea2.