Added 3d support for three.js