{"id":21262814,"url":"https://github.com/michaelfranzl/gltf-starfield","last_synced_at":"2026-05-10T15:36:15.810Z","repository":{"id":147443620,"uuid":"610152641","full_name":"michaelfranzl/gltf-starfield","owner":"michaelfranzl","description":"Translate the Yale Bright Star Catalog to a glTF 3D model","archived":false,"fork":false,"pushed_at":"2023-03-06T08:17:58.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T22:43:05.677Z","etag":null,"topics":["3d-models","astronomy","deno","gltf","graphics","opengl"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaelfranzl.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":"2023-03-06T07:44:43.000Z","updated_at":"2023-03-06T08:15:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"3bcb3a9e-e261-4745-8cee-3970be59fe49","html_url":"https://github.com/michaelfranzl/gltf-starfield","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelfranzl%2Fgltf-starfield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelfranzl%2Fgltf-starfield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelfranzl%2Fgltf-starfield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelfranzl%2Fgltf-starfield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelfranzl","download_url":"https://codeload.github.com/michaelfranzl/gltf-starfield/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243701314,"owners_count":20333616,"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":["3d-models","astronomy","deno","gltf","graphics","opengl"],"created_at":"2024-11-21T04:59:26.695Z","updated_at":"2026-05-10T15:36:10.727Z","avatar_url":"https://github.com/michaelfranzl.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glTF Starfield\n\n*\"My god, it's full of stars ...\"*\n\nA [Deno](https://deno.land) program to translate the\n[Yale Bright Star Catalog](http://tdc-www.harvard.edu/catalogs/bsc5.html)\nto [glTF](https://en.wikipedia.org/wiki/GlTF).\n\n![Example rendering](example.png)\n\nThis 3D model of the starfield visible from Earth typically would be used to render a background layer\nover which other layers can be composited.\nAll stars are on the surface of the unit sphere and face its center. To give the illusion of the\nstars being infinitely far away, their rendering camera should naturally be always located at the center\nof the unit sphere (never translate the camera, only rotate it).\n\n\n## Usage\n\n```sh\ndeno run --allow-net --allow-read --allow-write --allow-run main.ts # produces starfield.glb (~ 2MB)\n```\n\n## Dependencies\n\n* [Deno](https://deno.land) (version see [.tool-versions](.tool-versions))\n* `gunzip` executable in `PATH`\n\n## Details\n\n- The database http://tdc-www.harvard.edu/catalogs/bsc5.dat.gz is downloaded, decompressed,\n    and its ~9k entries are parsed.\n- 10 Materials are created from the spectral classification of stars (`OWBAFGKMCS`).\n    The colors of the materials were taken from the HTML code of\n    https://en.wikipedia.org/wiki/Stellar_classification#Harvard_spectral_classification\n    and are set as base factors as well as emissive factors.\n  * The `extras` field contains:\n    - `cls`: Spectral class (a letter from the set `OWBAFGKMCS`)\n- Each star in the catalog becomes one `node`.\n  * A single octagon (in triangle strip mode) is referenced by all mesh primitives.\n  * The scale is calculated from the star's apparent magnitude.\n  * The translation puts it on the surface of the unit sphere according to the star's right ascension\n      and declination.\n  * The rotation makes it face the unit sphere center.\n  * The material is selected according to the star's spectral classification.\n  * The `extras` field contains:\n    - `mag`: Apparent magnitude\n    - `bsn`: The numeric BSN ID\n    - `name`: A name concatenated from the two name fields in the DB\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelfranzl%2Fgltf-starfield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelfranzl%2Fgltf-starfield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelfranzl%2Fgltf-starfield/lists"}