{"id":18627296,"url":"https://github.com/itsnickbarry/hyperbolic-canvas","last_synced_at":"2025-04-09T20:03:07.256Z","repository":{"id":32818592,"uuid":"36411462","full_name":"ItsNickBarry/hyperbolic-canvas","owner":"ItsNickBarry","description":"The Poincaré disk model of the hyperbolic plane on the HTML canvas 💫","archived":false,"fork":false,"pushed_at":"2024-10-31T16:15:53.000Z","size":7618,"stargazers_count":49,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T20:02:46.632Z","etag":null,"topics":["canvas","geometry","hyperbolic-geometry","math","maths","non-euclidean-geometry","visualization","wow"],"latest_commit_sha":null,"homepage":"https://ItsNickBarry.github.io/hyperbolic-canvas","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/ItsNickBarry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2015-05-28T03:07:37.000Z","updated_at":"2025-03-15T04:42:17.000Z","dependencies_parsed_at":"2024-09-12T22:25:38.669Z","dependency_job_id":"b7407db6-33af-4ec4-a777-02e17ceba05c","html_url":"https://github.com/ItsNickBarry/hyperbolic-canvas","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/ItsNickBarry%2Fhyperbolic-canvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsNickBarry%2Fhyperbolic-canvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsNickBarry%2Fhyperbolic-canvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsNickBarry%2Fhyperbolic-canvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsNickBarry","download_url":"https://codeload.github.com/ItsNickBarry/hyperbolic-canvas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103865,"owners_count":21048245,"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":["canvas","geometry","hyperbolic-geometry","math","maths","non-euclidean-geometry","visualization","wow"],"created_at":"2024-11-07T04:41:51.985Z","updated_at":"2025-04-09T20:03:07.227Z","avatar_url":"https://github.com/ItsNickBarry.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyperbolic Canvas\n\nA Javascript implementation of the [Poincaré disk model](https://en.wikipedia.org/wiki/Poincar%C3%A9_disk_model) of the hyperbolic plane, on an HTML canvas.\n\nUsage examples can be found on the [project site](https://ItsNickBarry.github.io/hyperbolic-canvas).\n\n## Installation\n\n### Via NPM\n\n```\nnpm install --save hyperbolic-canvas\n```\n\n### In-Browser\n\n```bash\nyarn compile`\n```\n\n```html\n\u003cscript type=\"application/javascript\" src=\"dist/hyperbolic_canvas.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nPass a unique selector of a div element, to the function `HyperbolicCanvas.create`. Nonzero width and height styling must be specified. Absolute px values in a 1:1 ratio are recommended:\n\n```html\n\u003cdiv id=\"hyperbolic-canvas\" style=\"width: 600px; height: 600px;\"\u003e\u003c/div\u003e\n```\n\n```javascript\nlet canvas = HyperbolicCanvas.create('#hyperbolic-canvas');\n```\n\n### API\n\nSee `API.md` for a list of functions and their descriptions.\n\n## Scope\n\nThis library prioritizes the visualization of hyperbolic geometry over precise mathematical calculation. Due to the less-than-infinite precision of floating-point numbers, and because certain trigonometric functions are [ill-conditioned](https://en.wikipedia.org/wiki/Condition_number), these goals are often at odds.\n\n### Accuracy Thresholds\n\nThe arbitrary constants `HyperbolicCanvas.INFINITY` and `HyperbolicCanvas.ZERO` have been defined for use in internal comparisons in place of `Infinity` and `0`, respectively. Their values may be overridden, but increased accuracy will tend to lead to more unpredictable behavior.\n\n### Jasmine Specs\n\nThis library uses [Jasmine specs][jasmine] to validate the code and prevent regressions.\n\nThe specs have been written to use random input values. While this approach is unconventional, it provides more confidence than would an attempt to test an effectively infinite number of edge cases\u003c!-- ha!  Get it? --\u003e. Some specs do occasionally fail; the frequency at which this occurs is determined by the accuracy of the constants `HyperbolicCanvas.INFINITY` and `HyperbolicCanvas.ZERO`.\n\nThe Jasmine library itself has been modified to run each spec multiple times, and a random number seed is used so that errors may be reproduced. The seed and the spec run count can be set in the options menu on the [SpecRunner][jasmine] page.\n\n[jasmine]: https://ItsNickBarry.github.io/hyperbolic-canvas/jasmine/SpecRunner.html\n\n### Browser Support\n\nCertain browsers do not provide support for the hyperbolic trigonometric functions. Polyfills are available.\n\n## Development\n\nInstall dependencies via Yarn:\n\n```bash\nyarn install\n```\n\nSetup Husky to format code on commit:\n\n```bash\nyarn prepare\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsnickbarry%2Fhyperbolic-canvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsnickbarry%2Fhyperbolic-canvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsnickbarry%2Fhyperbolic-canvas/lists"}