Adding rewrite in three.js