JS solution for 3.js (finally) committed. Various fixes and additions to euler.js required