High-performance JavaScript 2D/3D polyline simplification library