{"id":16262764,"url":"https://github.com/robinck/smooth-polyline","last_synced_at":"2025-03-19T22:30:36.633Z","repository":{"id":57146323,"uuid":"89636190","full_name":"RobinCK/smooth-polyline","owner":"RobinCK","description":":wavy_dash: Smoothing algorithm for 2D lines and polygons","archived":false,"fork":false,"pushed_at":"2019-07-11T12:26:32.000Z","size":309,"stargazers_count":28,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T15:26:04.027Z","etag":null,"topics":["2d-graph-functions","2d-graphics","smooth","smooth-polygon","smooth-polyline"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobinCK.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-27T20:08:44.000Z","updated_at":"2024-12-04T10:27:51.000Z","dependencies_parsed_at":"2022-08-30T20:00:57.003Z","dependency_job_id":null,"html_url":"https://github.com/RobinCK/smooth-polyline","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fsmooth-polyline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fsmooth-polyline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fsmooth-polyline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinCK%2Fsmooth-polyline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobinCK","download_url":"https://codeload.github.com/RobinCK/smooth-polyline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244515596,"owners_count":20464917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-graph-functions","2d-graphics","smooth","smooth-polygon","smooth-polyline"],"created_at":"2024-10-10T17:00:51.434Z","updated_at":"2025-03-19T22:30:36.345Z","avatar_url":"https://github.com/RobinCK.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smooth-polyline\n\nSmoothing algorithm for 2D lines and polygons\n\n\u003cdiv align=\"center\"\u003e\n\n  [![npm](https://img.shields.io/npm/dt/smooth-polyline.svg?style=flat-square)](https://github.com/RobinCK/smooth-polyline)[![Bower version](https://img.shields.io/bower/v/smooth-polyline.svg?style=flat-square)](https://github.com/RobinCK/smooth-polyline)[![NPM version](https://img.shields.io/npm/v/smooth-polyline.svg?style=flat-square)](https://www.npmjs.com/package/smooth-polyline)[![npm](https://img.shields.io/npm/l/smooth-polyline.svg?style=flat-square)](https://github.com/RobinCK/smooth-polyline/blob/master/LICENSE)\n\n\u003c/div\u003e\n\n## Install\n#### CDN\n\nRecommended: https://unpkg.com/smooth-polyline, which will reflect the latest version as soon as it is published to npm. You can also browse the source of the npm package at https://unpkg.com/smooth-polyline/\n\n#### NPM\n\n``` bash\nnpm install smooth-polyline --save\n```\n\n#### Yarn\n\n``` bash\nyarn add smooth-polyline\n```\n\n#### Bower\n\n``` bash\nbower install smooth-polyline --save\n```\n\n## Development Setup\n\n``` bash\n# install dependencies\nnpm install\n\n# build dist files\nnpm run build\n```\n\n## Usage\n```javascript\n  var smoothLine = smooth([[ 1, 1 ], [ 1, 2 ], [ 2, 2 ], [ 2, 1 ]]);\n  /* \n    return [\n      [1,1],\n      [1,1.15],\n      [1,1.8499999999999999],\n      [1.15,2],\n      [1.8499999999999999,2],\n      [2,1.8499999999999999],\n      [2,1.15],\n      [2,1]\n    ]\n   */\n```\n\n```javascript\n  var smoothLine = smooth(smooth([[ 1, 1 ], [ 1, 2 ], [ 2, 2 ], [ 2, 1 ]]));\n\n  /* \n    return [\n      [1,1],\n      [1,1.0225],\n      [1,1.1275],\n      [1,1.255],\n      [1,1.7449999999999997],\n      [1.0225,1.8724999999999998],\n      [1.1275,1.9775],\n      [1.255,2],\n      [1.7449999999999997,2],\n      [1.8724999999999998,1.9775],\n      [1.9775,1.8724999999999998],\n      [2,1.7449999999999997],\n      [2,1.255],\n      [2,1.1275],\n      [2,1.0225],\n      [2,1]\n    ]\n   */\n```\n\n## License\nMIT © [Igor Ognichenko](https://github.com/RobinCK)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinck%2Fsmooth-polyline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinck%2Fsmooth-polyline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinck%2Fsmooth-polyline/lists"}