Mesh manipulation using javascript and three.js