{"id":21638860,"url":"https://github.com/dfirebaugh/banana","last_synced_at":"2025-03-19T01:47:59.393Z","repository":{"id":264282096,"uuid":"892921442","full_name":"dfirebaugh/banana","owner":"dfirebaugh","description":"a 2d graphics library","archived":false,"fork":false,"pushed_at":"2024-11-24T12:51:25.000Z","size":8337,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T02:48:26.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/dfirebaugh.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":"2024-11-23T03:56:17.000Z","updated_at":"2024-11-24T12:51:28.000Z","dependencies_parsed_at":"2024-11-23T05:28:51.538Z","dependency_job_id":null,"html_url":"https://github.com/dfirebaugh/banana","commit_stats":null,"previous_names":["dfirebaugh/banana"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfirebaugh%2Fbanana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfirebaugh%2Fbanana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfirebaugh%2Fbanana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfirebaugh%2Fbanana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfirebaugh","download_url":"https://codeload.github.com/dfirebaugh/banana/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244338994,"owners_count":20437167,"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":[],"created_at":"2024-11-25T04:12:11.341Z","updated_at":"2025-03-19T01:47:59.366Z","avatar_url":"https://github.com/dfirebaugh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# banana engine\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/dfirebaugh/banana)](https://goreportcard.com/report/github.com/dfirebaugh/banana)\n[![Go Reference](https://pkg.go.dev/badge/github.com/dfirebaugh/banana.svg)](https://pkg.go.dev/github.com/dfirebaugh/banana)\n\n\nbanana engine is a 2d graphics engine.\n\ncurrently supported\n- basic shape rendering\n- texture rendering\n- rendering to a framebuffer\n- input detection (keyboard and mouse)\n- bitmap font\n\nI'm currently researching strategies to implement a gui system.\n\nCheck out the `examples` dir...\n\n### drawing a triangle\n\n`go run ./examples/triangle`\n\n```golang\nimport (\n\t\"github.com/dfirebaugh/banana\"\n\t\"golang.org/x/image/colornames\"\n)\n\nconst (\n\tscreenWidth  = 240\n\tscreenHeight = 160\n)\n\nfunc main() {\n\tbanana.SetWindowSize(screenWidth, screenHeight)\n\tbanana.Run(nil, func() {\n\t\tbanana.Clear(colornames.Skyblue)\n\t\tbanana.RenderShape(\u0026banana.Polygon{\n\t\t\tVertices: []banana.Vertex{\n\t\t\t\t{\n\t\t\t\t\tX:     0,\n\t\t\t\t\tY:     float32(screenHeight),\n\t\t\t\t\tColor: colornames.Red,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tX:     float32(screenWidth / 2),\n\t\t\t\t\tY:     0,\n\t\t\t\t\tColor: colornames.Green,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tX:     float32(screenWidth),\n\t\t\t\t\tY:     float32(screenHeight),\n\t\t\t\t\tColor: colornames.Blue,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t})\n}\n```\n\n![color triangle](./assets/images/color_triangle_example00.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfirebaugh%2Fbanana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfirebaugh%2Fbanana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfirebaugh%2Fbanana/lists"}