{"id":22062764,"url":"https://github.com/ryan-haskell/elm-2d","last_synced_at":"2025-08-17T22:11:01.008Z","repository":{"id":45694024,"uuid":"283383561","full_name":"ryan-haskell/elm-2d","owner":"ryan-haskell","description":"a package for creating 2D games with WebGL","archived":false,"fork":false,"pushed_at":"2022-07-18T02:30:37.000Z","size":13783,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T10:46:28.263Z","etag":null,"topics":["2d","elm","game","webgl"],"latest_commit_sha":null,"homepage":"","language":"Elm","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/ryan-haskell.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":"2020-07-29T03:00:29.000Z","updated_at":"2025-03-12T02:43:09.000Z","dependencies_parsed_at":"2022-07-18T06:47:01.147Z","dependency_job_id":null,"html_url":"https://github.com/ryan-haskell/elm-2d","commit_stats":null,"previous_names":["ryan-haskell/elm-2d"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryan-haskell/elm-2d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryan-haskell","download_url":"https://codeload.github.com/ryan-haskell/elm-2d/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-2d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270912603,"owners_count":24666751,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["2d","elm","game","webgl"],"created_at":"2024-11-30T18:26:49.198Z","updated_at":"2025-08-17T22:11:00.940Z","avatar_url":"https://github.com/ryan-haskell.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ryannhg/elm-2d\n\u003e a package for building games in WebGL\n\n![Animations example](./examples/screenshots/04-animations.gif)\n\n## install\n\n```bash\n# ( 👇 this command won't work unless I publish this! )\nelm install ryannhg/elm-2d\n```\n\n## a simple example\n\n```elm\nmodule Examples.Shapes exposing (main)\n\nimport Elm2D exposing (Html)\nimport Elm2D.Color\n\n\nmain : Html msg\nmain =\n    Elm2D.view\n        { background = Elm2D.Color.fromRgb255 ( 0, 0, 100 )\n        , size = ( 800, 600 )\n        }\n        [ Elm2D.rectangle\n            { color = Elm2D.Color.fromRgb255 ( 200, 200, 0 )\n            , position = ( 350, 250 )\n            , size = ( 100, 100 )\n            }\n        ]\n```\n\n![A screenshot of a yellow rectangle](./examples/screenshots/01-shapes.jpg)\n\n\n## even more examples\n\nYou can see more interesting examples in this project's `examples` folder. Clone this repo and run:\n\n```\ncd examples/\nelm reactor\n```\n\nThe examples will be available at http://localhost:8000\n\n### 2. Images\n\nAn example of how to render images from a file, instead of just colors and shapes.\n\n[(Source code here)](./examples/02-Images.elm)\n\n![Images example](./examples/screenshots/02-images.jpg)\n\n### 3. Spritesheets\n\nAn example of how to use more advanced features like selecting multiple tiles in a spritesheet.\n\n[(Source code here)](./examples/03-Spritesheets.elm)\n\n![Spritesheet example](./examples/screenshots/03-spritesheets.jpg)\n\n### 4. Animations\n\nAn example of how to use `Elm2D.Spritesheet.Animation` to make characters bounce and run around.\n\n[(Source code here)](./examples/04-Animations.elm)\n\n![Animations example](./examples/screenshots/04-animations.gif)\n\n### 5. Platformer\n\nAn example with keyboard support, where players can move something you've rendered.\n\n[(Source code here)](./examples/05-Platformer.elm)\n\n![Platformer example](./examples/screenshots/05-platformer.gif)\n\n### 6. Dungeon\n\nAn example of creating a dungeon from a tileset.\n\n[(Source code here)](./examples/06-Dungeon.elm)\n\n![Dungeon example](./examples/screenshots/06-dungeon.gif)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Felm-2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryan-haskell%2Felm-2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Felm-2d/lists"}