{"id":21497297,"url":"https://github.com/jazzfool/e2","last_synced_at":"2025-07-15T20:30:38.189Z","repository":{"id":51026185,"uuid":"463388654","full_name":"jazzfool/e2","owner":"jazzfool","description":"Lightweight 2D rendering toolbox","archived":false,"fork":false,"pushed_at":"2022-08-05T10:00:20.000Z","size":691,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-09T05:09:21.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/jazzfool.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}},"created_at":"2022-02-25T03:50:48.000Z","updated_at":"2022-03-28T14:20:31.000Z","dependencies_parsed_at":"2022-08-26T03:00:40.703Z","dependency_job_id":null,"html_url":"https://github.com/jazzfool/e2","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/jazzfool%2Fe2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzfool%2Fe2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzfool%2Fe2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzfool%2Fe2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jazzfool","download_url":"https://codeload.github.com/jazzfool/e2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226065958,"owners_count":17568292,"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-23T16:23:02.881Z","updated_at":"2024-11-23T16:23:04.256Z","avatar_url":"https://github.com/jazzfool.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **e2**\n\n## Lightweight 2D rendering toolbox for WGPU\n\n*What does it do?*\n\ne2 makes your life easier when doing 2D game rendering with WGPU.\nIt provides utilities such as simplified resource creation and loading,\ntext rendering, batched rendering, sprite rendering, and more.\n\n*What if I only want to use X feature, and nothing else?*\n\ne2's API is designed to support that. Almost every type in e2 can be constructed\nfrom existing WGPU handles. Everything has an escape hatch.\n\n*Does it handle physics, audio, etc?*\n\nNo, and we don't plan supporting these things. e2 is exclusively for rendering.\n\n*Can it do 3D?*\n\nNot with the built-in renderers, but there's nothing stopping you from\ncreating your own 3D renderer using e2.\n\n---\n\nTo give you a better picture of what exactly e2 does, look at the examples.\nBut in short:\n\n```rs\nlet cx = e2::Context::new(\u0026window, wgpu::Backends::PRIMARY);\ncx.configure_surface(width, height, wgpu::PresentMode::Mailbox);\n\nlet mesh_pipe = e2::MeshRenderPipeline::new();\nlet mut renderer = e2::SpriteRenderer::new(\u0026cx, \u0026mesh_pipe);\n\nlet sampler = e2::SimleSampler::linear_clamp().create(\u0026cx);\nlet tile = e2::ImageTexture::from_path(\"tile.png\", true)?.create(\u0026cx);\n\nloop {\n\tlet swapchain = cx.next_frame().unwrap();\n\tlet view = swapchain.texture.create_view(\u0026Default::default());\n\n\tlet mut frame = e2::Frame::new(\u0026cx);\n\trenderer.free();\n\n\t{\n\t\tlet mut pass = e2::SimpleRenderPass {\n\t\t\ttarget: \u0026view,\n\t\t\tresolve: None,\n\t\t\tclear: Some(e2::Color::BLACK),\n\t\t\tdepth_stencil: None,\n\t\t}\n\t\t.begin(\u0026mut frame);\n\n\t\tmesh_pipe.bind(\u0026mut pass, \u0026mut renderer);\n\t\trenderer.set_matrix(glam::Mat4::orthographic_rh(0., width as _, height as _, 0., 0., 1.));\n\t\trenderer.bind_sampler(\u0026cx, \u0026mut pass, \u0026sampler);\n\t\trenderer.draw(\u0026cx, \u0026mut pass, \u0026tile, e2::Rect::new(10., 10., 50., 50.), 0.);\n\t}\n\n\tframe.submit(\u0026cx);\n\tswapchain.present();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazzfool%2Fe2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjazzfool%2Fe2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazzfool%2Fe2/lists"}