{"id":15044736,"url":"https://github.com/vasturiano/three-conic-polygon-geometry","last_synced_at":"2025-04-04T21:06:49.152Z","repository":{"id":34908215,"uuid":"188978244","full_name":"vasturiano/three-conic-polygon-geometry","owner":"vasturiano","description":"ThreeJS geometry for drawing polygons on a sphere","archived":false,"fork":false,"pushed_at":"2025-01-20T14:57:25.000Z","size":788,"stargazers_count":45,"open_issues_count":6,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T20:06:14.887Z","etag":null,"topics":["geography","geojson","geometry","polygon","sphere","threejs"],"latest_commit_sha":null,"homepage":"https://vasturiano.github.io/three-conic-polygon-geometry/example/countries-gdp-per-capita/","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/vasturiano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-28T07:36:08.000Z","updated_at":"2025-03-03T15:01:42.000Z","dependencies_parsed_at":"2024-02-08T03:21:53.780Z","dependency_job_id":"243694ab-b9f9-470f-9826-b6dad6cd7fce","html_url":"https://github.com/vasturiano/three-conic-polygon-geometry","commit_stats":{"total_commits":94,"total_committers":2,"mean_commits":47.0,"dds":"0.010638297872340385","last_synced_commit":"598938faab7adb889c36167d39eb1a5d9da388f2"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasturiano%2Fthree-conic-polygon-geometry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasturiano%2Fthree-conic-polygon-geometry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasturiano%2Fthree-conic-polygon-geometry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasturiano%2Fthree-conic-polygon-geometry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vasturiano","download_url":"https://codeload.github.com/vasturiano/three-conic-polygon-geometry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249524,"owners_count":20908212,"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":["geography","geojson","geometry","polygon","sphere","threejs"],"created_at":"2024-09-24T20:50:58.161Z","updated_at":"2025-04-04T21:06:49.124Z","avatar_url":"https://github.com/vasturiano.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ThreeJS Conic Polygon Geometry\n==============\n\n[![NPM package][npm-img]][npm-url]\n[![Build Size][build-size-img]][build-size-url]\n[![NPM Downloads][npm-downloads-img]][npm-downloads-url]\n\nA ThreeJS geometry class for drawing polygons on a sphere using cones. \n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"//vasturiano.github.io/three-conic-polygon-geometry/example/countries-gdp-per-capita/\"\u003e\u003cimg width=\"80%\" src=\"https://vasturiano.github.io/three-conic-polygon-geometry/example/countries-gdp-per-capita/preview.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nExamples:\n* [Natural Earth Countries](https://vasturiano.github.io/three-conic-polygon-geometry/example/countries/) ([source](https://github.com/vasturiano/three-conic-polygon-geometry/blob/master/example/countries/index.html))\n* [Countries GDP per Capita](https://vasturiano.github.io/three-conic-polygon-geometry/example/countries-gdp-per-capita/) ([source](https://github.com/vasturiano/three-conic-polygon-geometry/blob/master/example/countries-gdp-per-capita/index.html))\n\n## Quick start\n\n```js\nimport ConicPolygonGeometry from 'three-conic-polygon-geometry';\n```\nor using a *script* tag\n```html\n\u003cscript src=\"//unpkg.com/three-conic-polygon-geometry\"\u003e\u003c/script\u003e\n```\nthen\n```js\nconst myMesh = new THREE.Mesh(\n  new ConicPolygonGeometry(polygonGeoJson),\n  new THREE.MeshBasicMaterial({ color: 'blue' })\n);\n\n```\n\n## API reference\n\n### Constructor\n\n\u003cb\u003eConicPolygonGeometry\u003c/b\u003e(\u003cb\u003epolygonGeoJson\u003c/b\u003e: \u003ci\u003eGeoJson polygon coordinates\u003c/i\u003e, \u003cb\u003ebottomHeight\u003c/b\u003e: \u003ci\u003eFloat\u003c/i\u003e, \u003cb\u003etopHeight\u003c/b\u003e: \u003ci\u003eFloat\u003c/i\u003e, \u003cb\u003eclosedBottom\u003c/b\u003e: \u003ci\u003eBoolean\u003c/i\u003e, \u003cb\u003eclosedTop\u003c/b\u003e: \u003ci\u003eBoolean\u003c/i\u003e, \u003cb\u003eincludeSides\u003c/b\u003e: \u003ci\u003eBoolean\u003c/i\u003e, \u003cb\u003ecurvatureResolution\u003c/b\u003e: \u003ci\u003eFloat\u003c/i\u003e)\n\n* \u003cb\u003epolygonGeoJson\u003c/b\u003e: Coordinates array as specified in GeoJson `geometry.coordinates` for `type: Polygon`. The first item is the polygon contour, additional items are the inner holes. It's recommended to split the geometries at the [anti-meridian](https://en.wikipedia.org/wiki/180th_meridian).\n* \u003cb\u003ebottomHeight\u003c/b\u003e: Starting height of the cone. Can be either a constant or `(lng, lat) =\u003e height` accessor function that is invoked for every vertex in the  bottom surface. Default is `0`.\n* \u003cb\u003etopHeight\u003c/b\u003e: Ending height of the cone. Can be either a constant or `(lng, lat) =\u003e height` accessor function that is invoked for every vertex in the  top surface. Default is `1`.\n* \u003cb\u003eclosedBottom\u003c/b\u003e: Whether to add a cap surface on the cone bottom. Default is `true`.\n* \u003cb\u003eclosedTop\u003c/b\u003e: Whether to add a cap surface on the cone top. Default is `true`.\n* \u003cb\u003eincludeSides\u003c/b\u003e: Whether to include the side surfaces of the cone. Default is `true`.\n* \u003cb\u003ecurvatureResolution\u003c/b\u003e: The resolution in angular degrees of the sphere curvature. The finer the resolution, the more the polygon is fragmented into smaller faces to approximate the spheric surface, at the cost of performance. Default is `5`.\n\n### Properties\n\n\u003cb\u003e.parameters\u003c/b\u003e: \u003ci\u003eObject\u003c/i\u003e\n\nAn object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.\n\n### Groups\n\nThe geometry supports three distinct groups to which different materials can be applied.\n\n* \u003cb\u003e0\u003c/b\u003e: The side surface of the cone.\n* \u003cb\u003e1\u003c/b\u003e: The bottom surface of the cone.\n* \u003cb\u003e2\u003c/b\u003e: The top surface of the cone.\n\n\n[npm-img]: https://img.shields.io/npm/v/three-conic-polygon-geometry\n[npm-url]: https://npmjs.org/package/three-conic-polygon-geometry\n[build-size-img]: https://img.shields.io/bundlephobia/minzip/three-conic-polygon-geometry\n[build-size-url]: https://bundlephobia.com/result?p=three-conic-polygon-geometry\n[npm-downloads-img]: https://img.shields.io/npm/dt/three-conic-polygon-geometry\n[npm-downloads-url]: https://www.npmtrends.com/three-conic-polygon-geometry\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasturiano%2Fthree-conic-polygon-geometry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasturiano%2Fthree-conic-polygon-geometry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasturiano%2Fthree-conic-polygon-geometry/lists"}