Added logic to generate thee js mesh
added unit test