{"id":15876967,"url":"https://github.com/zimbatm/elm-gamepad","last_synced_at":"2025-03-16T05:31:04.557Z","repository":{"id":30797930,"uuid":"34354992","full_name":"zimbatm/elm-gamepad","owner":"zimbatm","description":"Elm wrapper around the W3C Gamepad API","archived":false,"fork":false,"pushed_at":"2023-12-15T20:26:40.000Z","size":530,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-27T09:04:13.748Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/zimbatm.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-04-21T22:16:27.000Z","updated_at":"2017-05-09T09:02:44.000Z","dependencies_parsed_at":"2024-10-06T02:11:32.224Z","dependency_job_id":null,"html_url":"https://github.com/zimbatm/elm-gamepad","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbatm%2Felm-gamepad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbatm%2Felm-gamepad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbatm%2Felm-gamepad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimbatm%2Felm-gamepad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zimbatm","download_url":"https://codeload.github.com/zimbatm/elm-gamepad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806122,"owners_count":20350773,"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-10-06T02:01:12.808Z","updated_at":"2025-03-16T05:31:03.310Z","avatar_url":"https://github.com/zimbatm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Elm Gamepad\n===========\n\nWrapper around the [W3C Gamepad API\n(draft)](https://w3c.github.io/gamepad/gamepad.html). It's still all very\nexperimental.\n\nUsage\n-----\n\n```elm\n-- Get a list of gamepads whenever one of them changes\nGamepad.gamepads : Signal List Gamepad\n```\n\nCurrent limitations\n-------------------\n\nBecause the Gamepad API is missing controller update events we're forced to\npoll. The current implementation depends on requestAnimationFrame which might\nor might not conflict with Elm's reactor loop. I've put some effort to limit\nGC but it's still taking quite a bit of time on the game loop.\n\nTo avoid fingerprinting controllers, browsers only show them when a first\nbutton is pressed.\n\nTested under Firefox 37.\n\nChrome is also supposed to work but I only managed to make the controller\nappear once.\n\nIdeas\n-----\n\nIt might be helpful to translate the above signal to a single gamepad.\nThe Gamepad would have an additional connected property to signal when it\ncomes and goes.\n\n```elm\nGamepad.gamepad1 : Signal Gamepad\n```\n\nLicense\n-------\n\nMIT 2015 zimbatm\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimbatm%2Felm-gamepad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzimbatm%2Felm-gamepad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimbatm%2Felm-gamepad/lists"}