{"id":13569617,"url":"https://github.com/SolarLune/egpbc","last_synced_at":"2025-04-04T06:31:06.831Z","repository":{"id":64646251,"uuid":"532436261","full_name":"SolarLune/egpbc","owner":"SolarLune","description":"egpbc is a gamepad constant library for Ebitengine games.","archived":false,"fork":false,"pushed_at":"2022-09-21T22:40:56.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T02:07:56.491Z","etag":null,"topics":["ebitengine","framework","gamedev","gamepad","golang"],"latest_commit_sha":null,"homepage":"","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/SolarLune.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":"2022-09-04T04:18:18.000Z","updated_at":"2025-02-02T02:20:49.000Z","dependencies_parsed_at":"2022-12-12T10:30:38.756Z","dependency_job_id":null,"html_url":"https://github.com/SolarLune/egpbc","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/SolarLune%2Fegpbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLune%2Fegpbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLune%2Fegpbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolarLune%2Fegpbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SolarLune","download_url":"https://codeload.github.com/SolarLune/egpbc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247134392,"owners_count":20889396,"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":["ebitengine","framework","gamedev","gamepad","golang"],"created_at":"2024-08-01T14:00:42.003Z","updated_at":"2025-04-04T06:31:06.540Z","avatar_url":"https://github.com/SolarLune.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# egpbc :video_game:\n\negpbc is named constants for Nintendo, Sony, and Xbox game console controllers for [Ebitengine](https://github.com/hajimehoshi/ebiten). \n\n(And so, egpbc stands for Ebitengine GamePad Button Constants.)\n\n# Why?\n\nBecause this is easier to visualize and use in development than using ebitengine's built-in gamepad constants, and it should be consistent \nregardless of what brand of controller you or your players use, as long as they're capable of being internally mapped to a standard gamepad \ndevice. In other words, this should mean that you can use Xbox constants while developing and the player should be able to use a PS5 controller\nwithout issue.\n\n# How to install\n\n`go get github.com/solarlune/egpbc`\n\n# How to use\n\nEach brand is contained within its own struct.\n\n```go\n\nimport \"github.com/solarlune/egpbc\"\n\nfunc main() {\n\n    // Each brand has its own constants struct that contains its button and axis \n    // constants and directions; this is done to make things easy to manage.\n    xbox := egpbc.MicrosoftConstants\n\n    if ebiten.IsStandardGamepadButtonPressed(0, xbox.A) {\n        fmt.Println(\"The A Button was pressed.\")\n    }\n\n    lsX := ebiten.StandardGamepadAxisValue(0, xbox.LeftStickX)\n\tlsY := ebiten.StandardGamepadAxisValue(0, xbox.LeftStickY)\n\n    isLeftPressed := egpbc.AxisIsLeft(lsX)\n    fmt.Println(\"left is pressed: \", isLeftPressed)\n\n}\n\n```\n\nThat's it.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSolarLune%2Fegpbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSolarLune%2Fegpbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSolarLune%2Fegpbc/lists"}