{"id":25883200,"url":"https://github.com/svank/constellation-sketcher","last_synced_at":"2026-03-04T10:02:01.962Z","repository":{"id":42849688,"uuid":"260795164","full_name":"svank/constellation-sketcher","owner":"svank","description":"JavaScript library for drawing constellations","archived":false,"fork":false,"pushed_at":"2023-03-04T15:50:52.000Z","size":2234,"stargazers_count":14,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T23:01:13.108Z","etag":null,"topics":["canvas","constellation","javascript","stars"],"latest_commit_sha":null,"homepage":null,"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/svank.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":"2020-05-02T23:42:00.000Z","updated_at":"2025-07-08T20:34:42.000Z","dependencies_parsed_at":"2025-03-02T23:15:28.240Z","dependency_job_id":null,"html_url":"https://github.com/svank/constellation-sketcher","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/svank/constellation-sketcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svank%2Fconstellation-sketcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svank%2Fconstellation-sketcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svank%2Fconstellation-sketcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svank%2Fconstellation-sketcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svank","download_url":"https://codeload.github.com/svank/constellation-sketcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svank%2Fconstellation-sketcher/sbom","scorecard":{"id":860884,"data":{"date":"2025-08-11","repo":{"name":"github.com/svank/constellation-sketcher","commit":"2452a5e87051cbca721b5d77a0b8e6a098c14bf7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":0,"reason":"35 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T01:13:36.584Z","repository_id":42849688,"created_at":"2025-08-24T01:13:36.584Z","updated_at":"2025-08-24T01:13:36.584Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30078306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["canvas","constellation","javascript","stars"],"created_at":"2025-03-02T16:32:09.091Z","updated_at":"2026-03-04T10:02:01.934Z","avatar_url":"https://github.com/svank.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Constellation Sketcher\n\n[![NPM](https://img.shields.io/npm/v/constellation-sketcher.svg)](https://www.npmjs.com/package/constellation-sketcher) \n\nA small library that animates the drawing of constellations. Originally designed to be a nice thing to watch while waiting on a long-running task (i.e. more than just a spinner).\n\nA React component is available: [github](https://github.com/svank/react-constellation-sketcher), [npm](https://www.npmjs.com/package/react-constellation-sketcher)\n\n[Live demo](https://samvankooten.net/constellation_sketcher)\n\nStatic screenshot:\n\n![demo image](images/readme_screenshot.png)\n\n## Description\n\nConstellation Sketcher can render constellations either immediately or as an animation, drawing lines from star to star. Animated drawing starts at a randomly-selected star and draws lines to all connected stars, then to all stars connected to those stars, etc... Accurate background stars are included, and all stars flicker!\n\nI learned while building this that there is simply *no* canonical source for what the constellations look like (that is, which stars to connect to which, and even which stars are included at all!). Constellation Sketcher uses the traditional Western constellations as provided in [Stellarium](http://stellarium.org/). The exact positions and magnitudes of stars are drawn from the [catalog](https://ui.adsabs.harvard.edu/abs/1997A%26A...323L..49P) produced by ESA's [Hipparcos](https://www.cosmos.esa.int/web/hipparcos) mission.\n\nThe minified library weighs in at about 110 kb, most of which is stellar data.\n\n## Installation\n\n```\nnpm i constellation-sketcher\n```\n\nThe installed library can be accessed via\n```\nconst ConstellationSketcher = require('constellation-sketcher');\n```\nor\n```\nimport * as ConstellationSketcher from 'constellation-sketcher';\n```\n\nAlternatively, you can include the JS bundle file directly in a `script` tag:\n```\n\u003cscript src=\"https://unpkg.com/constellation-sketcher@^1.0.0/dist/constellation_sketcher.bundle.js\"\u003e\u003c/script\u003e\n```\n\n## Use\n\nWhen started, Constellation Sketcher looks for a `\u003ccanvas\u003e` element with `id=\"constellation-sketcher\"`, the size of which can be set through its `width` and `height` attributes. (Note that Constellation Sketcher works best with a 1:1 aspect ratio. Different aspect ratios will effectively crop the view on both sides of the constellation.) Constellation Sketcher supports drawing to only one canvas at a time.\n\nDrawing can be started via either of two functions:\n\n* `ConstellationSketcher.sketch()` will draw one constellation.\n\n* `ConstellationSketcher.slideshow()` will draw constellations one after the other, with a short pause in between. The slideshow will start with the currently-configured constellation and select random constellations after.\n\nAll drawing, including lines and stellar twinkle, can be canceled via `ConstellationSketcher.stop()`. ConstellationSketcher's state can be reset with `ConstellationSketcher.reset()`---useful if the `\u003ccanvas\u003e` element is removed and later replaced.\n\nA list of valid constellation names can be accessed via `ConstellationSketcher.constellationNames`.\n\n## Selecting Constellations\n\nConstellation Sketcher can display a specific constellation on demand, or it can display randomly-selected constellations. This is configured through the functions\n\n* `ConstellationSketcher.setConstellation(constellation)`: Sets the name of the constellation that will be drawn next.\n\n* `ConstellationSketcher.chooseRandomConstellation()`: Randomly selects the next constellation to be drawn.\n\n* `ConstellationSketcher.getConstellation()`: Returns the name of the currently shown constellation.\n\n* `ConstellationSketcher.getNextConstellation()`: Returns the name of the next constellation to be shown, as set via `setConstellation()` or `chooseRandomConstellation()`, or `null` if no future constellation is configured. (During slideshows, future constellations are set automatically.)\n\nWhen randomly choosing constellations, different weights can be assigned to each of four constellation categories, which have been chosen based on the judgment of this northern-hemisphere author. Category membership is listed at the bottom of this README. The categories are:\n\n* *Popular*: well-known constellations. Default weight: 2\n\n* *Striking*: constellations that generally are large, have a more complex shape, and/or include a high density of background stars within the view. Default weight: 2\n\n* *Small*: very simple constellations, generally only one or two lines. Default weight: 0\n\n* *Medium*: constellations that are neither *small* nor *striking*. Default weight: 1\n\nThe latter three categories are mutually-exclusive, but *popular* constellations are each included in one of the other three groups. A constellation's weight during selection is the largest of the weights assigned to the categories it is a member of. Weights can be set through the following functions, each of which accepts a numeric weight.\n\n* `ConstellationSketcher.setSelectionWeightPopular(weight)`\n\n* `ConstellationSketcher.setSelectionWeightStriking(weight)`\n\n* `ConstellationSketcher.setSelectionWeightMedium(weight)`\n\n* `ConstellationSketcher.setSelectionWeightSmall(weight)`\n\n* `ConstellationSketcher.setSelectionWeightsAll(weight)`: Assigns the given weight to all categories.\n\nAdditionally, arrays of the constellations included in each category are accessible via `ConstellationSketcher.categories`, e.g. `ConstellationSketcher.categories.popular`.\n\n## Configuration\n\nConstellation Sketcher can be configured through a set of functions. Each configuration function returns `ConstellationSketcher` so that calls can be chained (e.g. `ConstellationSketcher.setSelectionWeightsAll(1).chooseRandomConstellation().setAnimated(false).sketch()`). Configuration values are only guaranteed to affect future calls to `sketch()` or `slideshow()` and may but are not guaranteed to affect any animations currently in progress.\n\n* `ConstellationSketcher.setAnimated(animated)`: Accepts a boolean. If true, constellations are drawn as an animation. If false, they are drawn immediately upon the start of drawing. The default is `true`.\n\n* `ConstellationSketcher.setDrawLines(drawLines)`: Accepts a boolean. If false, lines are not drawn, only stars. The default is `true`.\n\n* `ConstellationSketcher.setTwinkle(twinkle)`: Accepts a boolean. If true, stars twinkle. The default is `true`.\n\n* `ConstellationSketcher.setTwinkleAmplitude(twinkleAmplitude)`: Accepts a number which multiplies the amount stars change in magnitude when flickering. The default is `1`.\n\n* `ConstellationSketcher.setTwinkleTimescale(twinkleTimescale)`: Accepts a number of milliseconds. This is the time between updates to the twinkle-based changes in stellar magnitude. The default is `70`.\n\n* `ConstellationSketcher.setSizeScale(sizeScale)`: Accepts a number which multiplies the widths of the stars that are drawn. The default is `1`.\n\n* `ConstellationSketcher.setSpeedScale(speedScale)`: Accepts a number which multiplies the speed at which lines grow during animation. The default is `1`.\n\n* `ConstellationSketcher.setSlideshowDwellTime(dwellTime)`: Accepts a number of milliseconds. This is the length of the pause during slideshows between the end of drawing one constellation and the beginning of drawing the next. The default is `4000`.\n\n* `setCrossFade(doCrossFade, crossFadeTime)`: Accepts up to two arguments. The first is a boolean setting whether or not Constellation Sketcher will fade between constellations. The second, if provided, sets the duration of the fade in milliseconds. The default values are `true` and `750`.\n\n* `setFadeIn(doFadeIn, fadeInTime)`: Accepts up to two arguments. The first is a boolean setting whether or not Constellation Sketcher will fade in from transparency before drawing its first constellation. The second, if provided, sets the duration of the fade in milliseconds. The default values are `false` and `750`.\n\n* `ConstellationSketcher.setDrawBeginCallback(drawBeginCallback)`: Accepts a function which is called at the beginning of drawing a constellation. The callback function is provided as arguments a CanvasRenderingContext2D for drawing to the canvas and the name of the current constellation.\n\n* `ConstellationSketcher.setDrawFrameCompleteCallback(drawFrameCompleteCallback)`: Accepts a function which is called at the end of drawing each frame. The callback function is provided as arguments a CanvasRenderingContext2D for drawing to the canvas, a boolean indicating whether the whole canvas was cleared and redrawn this frame, and the name of the current constellation.\n\n* `ConstellationSketcher.setDrawCompleteCallback(drawCompleteCallback)`: Accepts a function which is called at the end of drawing a constellation. The callback function is provided as arguments a CanvasRenderingContext2D for drawing to the canvas and the name of the current constellation.\n\n## Constellation Categories\n\nThese categories are described in the \"Selecting Constellations\" section above.\n\nPopular | | | | (19 total) |\n---|---|---|---|---\nAndromeda | Aquarius | Aquila | Cancer | Canis Major\nCapricornus | Cassiopeia | Centaurus | Cygnus | Draco\nGemini | Hydra | Orion | Pegasus | Sagittarius\nScorpius | Taurus | Ursa Major | Ursa Minor\n\nStriking | | | | (22 total) |\n---|---|---|---|---\nAquarius | Canis Major | Carina | Centaurus | Cetus\nCygnus | Draco | Eridanus | Hercules | Hydra\nLupus | Monoceros | Orion | Pegasus | Phoenix\nPisces | Sagittarius | Scorpius | Serpens | Taurus\nUrsa Major | Virgo\n\nMedium | | | | (39 total) |\n---|---|---|---|---\nAndromeda | Aquila | Ara | Aries | Auriga\nBootes | Camelopardalis | Cancer | Capricornus | Cassiopeia\nCepheus | Columba | Corona Australis | Corona Borealis | Corvus\nCrater | Crux | Delphinus | Dorado | Gemini\nGrus | Hydrus | Lacerta | Leo | Leo Minor\nLepus | Libra | Lynx | Lyra | Ophiuchus\nPavo | Perseus | Piscis Austrinus | Puppis | Sculptor\nScutum | Ursa Minor | Vela | Volans\n\nSmall | | | | (27 total) |\n---|---|---|---|---\nAntlia | Apus | Caelum | Canes Venatici | Canis Minor\nChamaeleon | Circinus | Coma Berenices | Equuleus | Fornax\nHorologium | Indus | Mensa | Microscopium | Musca\nNorma | Octans | Pictor | Pyxis | Reticulum\nSagitta | Sextans | Telescopium | Triangulum | Triangulum Australe\nTucana | Vulpecula","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvank%2Fconstellation-sketcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvank%2Fconstellation-sketcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvank%2Fconstellation-sketcher/lists"}