{"id":22356853,"url":"https://github.com/ayamflow/polygon-centroid","last_synced_at":"2025-07-30T10:32:40.674Z","repository":{"id":29123623,"uuid":"32653402","full_name":"ayamflow/polygon-centroid","owner":"ayamflow","description":"Return the centroid for a given convex polygon.","archived":false,"fork":false,"pushed_at":"2018-05-22T16:39:02.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-10T11:08:07.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayamflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-21T22:56:14.000Z","updated_at":"2023-03-08T05:08:24.000Z","dependencies_parsed_at":"2022-07-25T18:47:14.130Z","dependency_job_id":null,"html_url":"https://github.com/ayamflow/polygon-centroid","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fpolygon-centroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fpolygon-centroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fpolygon-centroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fpolygon-centroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayamflow","download_url":"https://codeload.github.com/ayamflow/polygon-centroid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228124602,"owners_count":17873170,"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":[],"created_at":"2024-12-04T14:12:12.697Z","updated_at":"2024-12-04T14:12:13.215Z","avatar_url":"https://github.com/ayamflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"polygon-centroid\n===\n\nReturn the centroid for a given convex polygon.\n\n## Installation\n\n`npm i polygon-centroid --save`\n\n## Usage\n\n`centroid(points)`\nReturn the point {x, y} which is the centroid of the given set of points (convex polygon).\n\n## Example\n```js\nvar centroid = require('polygon-centroid');\nvar center = centroid(this.polygon.points);\nthis.polygon.anchor.set(center.x, center.y);\nthis.polygon.rotation = Math.PI * 0.5;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayamflow%2Fpolygon-centroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayamflow%2Fpolygon-centroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayamflow%2Fpolygon-centroid/lists"}