{"id":15059349,"url":"https://github.com/ryan-haskell/elm-3d","last_synced_at":"2026-03-17T05:43:46.949Z","repository":{"id":240940839,"uuid":"796314684","full_name":"ryan-haskell/elm-3d","owner":"ryan-haskell","description":"A package for making 3D games and apps in Elm","archived":false,"fork":false,"pushed_at":"2024-09-13T14:45:39.000Z","size":37718,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-06T02:47:30.960Z","etag":null,"topics":["3d","elm","package"],"latest_commit_sha":null,"homepage":"https://package.elm-lang.org/packages/ryan-haskell/elm-3d/latest","language":"Elm","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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":"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-05-05T15:27:37.000Z","updated_at":"2025-01-08T08:38:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"73450ca4-7d27-4497-9a1c-5c9766d2ae85","html_url":"https://github.com/ryan-haskell/elm-3d","commit_stats":null,"previous_names":["ryan-haskell/elm-3d"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Felm-3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryan-haskell","download_url":"https://codeload.github.com/ryan-haskell/elm-3d/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225462,"owners_count":21068077,"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":["3d","elm","package"],"created_at":"2024-09-24T22:41:47.423Z","updated_at":"2026-03-17T05:43:41.906Z","avatar_url":"https://github.com/ryan-haskell.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **@ryan-haskell/elm-3d**\nA package for making 3D games and apps in Elm\n\n## **Local installation**\n\n```\nelm install ryan-haskell/elm-3d\n```\n\n## **Quick example**\n\n![Demo of two 3D buildings spinning on a white background](https://github.com/ryan-haskell/elm-3d/blob/main/example/webgl_obj_mtl.gif?raw=true)\n\n\n```elm\nimport Elm3d.Camera exposing (Camera)\nimport Elm3d.Frame exposing (Frame)\nimport Elm3d.Node exposing (Node)\nimport Elm3d.Program exposing (Program, View)\nimport Elm3d.Viewport\n\n\nmain : Program () Model Msg\nmain =\n    Elm3d.Program.sandbox\n        { init = init\n        , update = update\n        , view = view\n        }\n\n\n\n-- MODEL\n\n\ntype alias Model =\n    { angle : Float\n    }\n\n\ninit : Model\ninit =\n    { angle = 0\n    }\n\n\n\n-- UPDATE\n\n\ntype Msg\n    = Spin Frame\n\n\nupdate : Msg -\u003e Model -\u003e Model\nupdate msg model =\n    case msg of\n        Spin frame -\u003e\n            { model | angle = model.angle + frame.dt }\n\n\n\n-- VIEW\n\n\nview : Model -\u003e View Msg\nview model =\n    { viewport = Elm3d.Viewport.fullscreen\n    , background = Elm3d.Color.white\n    , camera =\n        Elm3d.Camera.perspective\n            { fov = 60\n            , range = ( 1, 100 )\n            }\n            |\u003e Elm3d.Camera.withPositionZ 5\n    , nodes =\n        [ buildings model\n        ]\n    }\n\n\nbuildings : Model -\u003e Node Msg\nbuildings model =\n    Elm3d.Node.group\n        [ tavern\n        , church\n        ]\n        |\u003e Elm3d.Node.withOnFrame Spin\n        |\u003e Elm3d.Node.withRotationY model.angle\n\n\ntavern : Node Msg\ntavern =\n    Elm3d.Node.obj { url = \"/assets/tavern.obj\" }\n        |\u003e Elm3d.Node.withPositionX 1\n\n\nchurch : Node Msg\nchurch =\n    Elm3d.Node.obj { url = \"/assets/church.obj\" }\n        |\u003e Elm3d.Node.withPositionX -1\n```\n\nYou can [view more examples here](https://github.com/ryan-haskell/elm-3d/blob/main/example) using `elm reactor`.\n\n## **Disclaimer**\n\nThis package was originally created from code for use on my website. Rather than keeping that code private, I extracted out and documented the parts that I thought would be helpful for others creating 3D things in Elm.\n\nI encourage you to use this package to create your own 3D programs. Please feel welcome to modify my open source code if there are any features you would like to add.\n\nAlthough my code is free to take, and the package is free to use, it __does not come with any promise for future maintenance__. This is a tiny gift from me to the Elm community, and there are many other cool Elm things I want to spend my time on after sharing it.\n\nI would love to see support for _lighting_, _GLTF imports_, _physics_, _raycasting_, and much more. My initial goal for this package was making it the easiest way for folks to quickly create 3D games and experiences with Elm.\n\nIf you are personally interested in driving any fraction of that vision forward, I'm happy to chat about those designs and features. Please reach out to me on the [Elm Slack](https://elm-lang.org/community/slack) (`@ryan`) and we can make it happen!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Felm-3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryan-haskell%2Felm-3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Felm-3d/lists"}