{"id":43426516,"url":"https://github.com/h8gi/canvas","last_synced_at":"2026-02-02T19:07:01.257Z","repository":{"id":57484976,"uuid":"102734229","full_name":"h8gi/canvas","owner":"h8gi","description":"golang animation library","archived":false,"fork":false,"pushed_at":"2020-07-10T00:46:54.000Z","size":39,"stargazers_count":30,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-19T04:11:14.640Z","etag":null,"topics":["animation","go","golang","graphics","processing"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/h8gi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-07T12:27:27.000Z","updated_at":"2024-03-05T21:55:19.000Z","dependencies_parsed_at":"2022-08-26T13:23:44.392Z","dependency_job_id":null,"html_url":"https://github.com/h8gi/canvas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/h8gi/canvas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h8gi%2Fcanvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h8gi%2Fcanvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h8gi%2Fcanvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h8gi%2Fcanvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h8gi","download_url":"https://codeload.github.com/h8gi/canvas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h8gi%2Fcanvas/sbom","scorecard":{"id":451800,"data":{"date":"2025-08-11","repo":{"name":"github.com/h8gi/canvas","commit":"a6361a06ab49a6fcc89eb649a46a6826460a6592"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"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":"Code-Review","score":0,"reason":"Found 0/22 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":"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":"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":"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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2023-1572 / GHSA-qgc7-mgm3-q253","Warn: Project is vulnerable to: GO-2023-1990 / GHSA-j3p8-6mrq-6g7h","Warn: Project is vulnerable to: GO-2023-1989 / GHSA-x92r-3vfx-4cv3","Warn: Project is vulnerable to: GO-2024-2937 / GHSA-9phm-fm57-rhg8"],"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-19T08:21:41.802Z","repository_id":57484976,"created_at":"2025-08-19T08:21:41.802Z","updated_at":"2025-08-19T08:21:41.802Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29017941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T18:51:31.335Z","status":"ssl_error","status_checked_at":"2026-02-02T18:49:20.777Z","response_time":58,"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":["animation","go","golang","graphics","processing"],"created_at":"2026-02-02T19:07:00.586Z","updated_at":"2026-02-02T19:07:01.242Z","avatar_url":"https://github.com/h8gi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Canvas\n\n`canvas` is 2d animation library.\n\n## Installatioin\n\n```sh\ngo get -u github.com/h8gi/canvas\n```\n\n## Usage\n\nCreate canvas object.\n\n```go\nc := canvas.NewCanvas(\u0026canvas.CanvasConfig{\n\tWidth: 300,\n\tHeight: 300,\n\tFrameRate: 60,\n})\n```\n\nSet drawing function and start loop.\n\n```go\nc.Draw(func(ctx *canvas.Context) {\n\tif ctx.IsMouseDragged {\n\t\tctx.DrawCircle(ctx.Mouse.X, ctx.Mouse.Y, 5)\n\t\tctx.Fill()\n\t}\n})\n```\n\nStruct `gg.Context` is embedded in `canvas.Context`.\nSee [https://github.com/fogleman/gg](https://github.com/fogleman/gg) about details.\n\n## Example\n\nSee [example](example) directory.\n\n```go\npackage main\n\nimport (\n\t\"github.com/faiface/pixel/pixelgl\"\n\t\"github.com/h8gi/canvas\"\n\t\"golang.org/x/image/colornames\"\n)\n\nfunc main() {\n\tc := canvas.NewCanvas(\u0026canvas.CanvasConfig{\n\t\tWidth:     640,\n\t\tHeight:    400,\n\t\tFrameRate: 30,\n\t\tTitle:     \"Hello Canvas!\",\n\t})\n\n\tc.Setup(func(ctx *canvas.Context) {\n\t\tctx.SetColor(colornames.White)\n\t\tctx.Clear()\n\t\tctx.SetColor(colornames.Green)\n\t\tctx.SetLineWidth(5)\n\t})\n\n\tc.Draw(func(ctx *canvas.Context) {\n\t\tctx.Push()\n\t\tif ctx.IsMouseDragged {\n\t\t\tctx.SetColor(colornames.Red)\n\t\t}\n\t\tctx.DrawLine(ctx.Mouse.X, ctx.Mouse.Y,\n\t\t\tctx.PMouse.X, ctx.PMouse.Y)\n\t\tctx.Stroke()\n\t\tctx.Pop()\n\n\t\tif ctx.IsKeyPressed(pixelgl.KeyUp) {\n\t\t\tctx.Push()\n\t\t\tctx.SetColor(colornames.White)\n\t\t\tctx.Clear()\n\t\t\tctx.Pop()\n\t\t}\n\t})\n}\n``` \n\n## Built With\n\n- [gg](https://github.com/fogleman/gg) - 2D graphics library.\n- [pixel](https://github.com/faiface/pixel) - 2D game library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh8gi%2Fcanvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh8gi%2Fcanvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh8gi%2Fcanvas/lists"}