Converted marching cubes from second-sunrise to javascript