{"id":14981260,"url":"https://github.com/vasturiano/three-geojson-geometry","last_synced_at":"2025-04-12T14:58:20.567Z","repository":{"id":35107259,"uuid":"207453083","full_name":"vasturiano/three-geojson-geometry","owner":"vasturiano","description":"ThreeJS geometry to stroke GeoJSON objects on a sphere","archived":false,"fork":false,"pushed_at":"2025-01-20T14:59:09.000Z","size":692,"stargazers_count":76,"open_issues_count":1,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T14:58:15.098Z","etag":null,"topics":["data-visualization","geojson","maps","three-js","webgl"],"latest_commit_sha":null,"homepage":"https://vasturiano.github.io/three-geojson-geometry/example/countries/","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-09-10T03:01:32.000Z","updated_at":"2025-03-02T15:00:57.000Z","dependencies_parsed_at":"2024-06-14T23:39:48.409Z","dependency_job_id":"7bebfd08-7979-4e9b-a89a-26f0dc3b3b51","html_url":"https://github.com/vasturiano/three-geojson-geometry","commit_stats":{"total_commits":71,"total_committers":5,"mean_commits":14.2,"dds":0.07042253521126762,"last_synced_commit":"c2eeb1adc1cfb5600feec0a5fbb880229173ca56"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasturiano%2Fthree-geojson-geometry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasturiano%2Fthree-geojson-geometry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasturiano%2Fthree-geojson-geometry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasturiano%2Fthree-geojson-geometry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vasturiano","download_url":"https://codeload.github.com/vasturiano/three-geojson-geometry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586249,"owners_count":21128997,"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":["data-visualization","geojson","maps","three-js","webgl"],"created_at":"2024-09-24T14:03:13.506Z","updated_at":"2025-04-12T14:58:20.540Z","avatar_url":"https://github.com/vasturiano.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ThreeJS GeoJSON 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 stroking GeoJSON objects on a sphere. \n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"//vasturiano.github.io/three-geojson-geometry/example/countries/\"\u003e\u003cimg width=\"80%\" src=\"https://vasturiano.github.io/three-geojson-geometry/example/countries/preview.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Quick start\n\n```js\nimport GeoJsonGeometry from 'three-geojson-geometry';\n```\nor using a *script* tag\n```html\n\u003cscript src=\"//unpkg.com/three-geojson-geometry\"\u003e\u003c/script\u003e\n```\nthen\n```js\nconst myLine = new THREE.Line(\n  new GeoJsonGeometry(geoJson),\n  new THREE.LineBasicMaterial({ color: 'blue' })\n);\n\n```\n\n## API reference\n\n### Constructor\n\n\u003cb\u003eGeoJsonGeometry\u003c/b\u003e(\u003cb\u003egeoJson\u003c/b\u003e: \u003ci\u003eGeoJson object\u003c/i\u003e, \u003cb\u003eradius\u003c/b\u003e: \u003ci\u003eFloat\u003c/i\u003e, \u003cb\u003eresolution\u003c/b\u003e: \u003ci\u003eFloat\u003c/i\u003e)\n\n* \u003cb\u003egeoJson\u003c/b\u003e: A GeoJson `geometry` object. It's recommended to split the geometries at the [anti-meridian](https://en.wikipedia.org/wiki/180th_meridian). Each `coordinates` point is expected to include longitude and latitude in that order. Altitude may be included as a third optional element, interpreted as elevation above the surface in regular cartesian units.\n* \u003cb\u003eradius\u003c/b\u003e: Radius of the sphere surface to draw the poygon on. Default is `1`.\n* \u003cb\u003eresolution\u003c/b\u003e: Resolution of the sphere, in lat/lng degrees. If the angular distance between two adjacent line points is larger than this value, the line segment will be interpolated in order to approximate the curvature of the sphere surface. Lower values yield more perfectly curved lines, 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\nWhen generating `Polygon` or `MultiPolygon` geometries, two groups are provided to which different materials can be applied.\n\n* \u003cb\u003e0\u003c/b\u003e: The outer ring of the polygon.\n* \u003cb\u003e1\u003c/b\u003e: The polygon inner holes (if any).\n\n### Object types\n\nDifferent geoJson types should be represented using different ThreeJS object types:\n* `Point` and `MultiPoints` - Use `THREE.Points`\n* `LineString` and `Polygon` - Use `THREE.Line`\n* `MultiLineString` and `MultiPolygon` - Use `THREE.LineSegments`\n\n\n[npm-img]: https://img.shields.io/npm/v/three-geojson-geometry\n[npm-url]: https://npmjs.org/package/three-geojson-geometry\n[build-size-img]: https://img.shields.io/bundlephobia/minzip/three-geojson-geometry\n[build-size-url]: https://bundlephobia.com/result?p=three-geojson-geometry\n[npm-downloads-img]: https://img.shields.io/npm/dt/three-geojson-geometry\n[npm-downloads-url]: https://www.npmtrends.com/three-geojson-geometry\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasturiano%2Fthree-geojson-geometry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasturiano%2Fthree-geojson-geometry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasturiano%2Fthree-geojson-geometry/lists"}