implemented viewer by separating mesh to another .js file