{"id":15178469,"url":"https://github.com/selene-amanita/bevy_basic_portals","last_synced_at":"2025-04-05T22:09:15.423Z","repository":{"id":167773984,"uuid":"643394719","full_name":"Selene-Amanita/bevy_basic_portals","owner":"Selene-Amanita","description":"Bevy Simple Portals is a Bevy game engine plugin aimed to create portals.","archived":false,"fork":false,"pushed_at":"2025-04-02T01:20:59.000Z","size":164,"stargazers_count":41,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T22:09:02.164Z","etag":null,"topics":["bevy","game-development","game-engine","gamedev","open-source","plugin","plugins","portal","portals","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"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/Selene-Amanita.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":"2023-05-21T02:44:50.000Z","updated_at":"2025-04-02T01:21:03.000Z","dependencies_parsed_at":"2024-06-07T04:47:24.048Z","dependency_job_id":"7f011e80-1ae7-4d96-9454-67438c3161ce","html_url":"https://github.com/Selene-Amanita/bevy_basic_portals","commit_stats":{"total_commits":40,"total_committers":4,"mean_commits":10.0,"dds":0.09999999999999998,"last_synced_commit":"8df3f302399c716bba4597815e3ee11be6cd999e"},"previous_names":["selene-amanita/bevy_basic_portals"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Selene-Amanita%2Fbevy_basic_portals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Selene-Amanita%2Fbevy_basic_portals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Selene-Amanita%2Fbevy_basic_portals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Selene-Amanita%2Fbevy_basic_portals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Selene-Amanita","download_url":"https://codeload.github.com/Selene-Amanita/bevy_basic_portals/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406091,"owners_count":20933803,"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":["bevy","game-development","game-engine","gamedev","open-source","plugin","plugins","portal","portals","rust"],"created_at":"2024-09-27T15:03:38.259Z","updated_at":"2025-04-05T22:09:15.390Z","avatar_url":"https://github.com/Selene-Amanita.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Portals for Bevy\n\n[![crates.io](https://img.shields.io/crates/v/bevy_basic_portals)](https://crates.io/crates/bevy_basic_portals)\n[![docs.rs](https://img.shields.io/docsrs/bevy_basic_portals)](https://docs.rs/bevy_basic_portals/latest/bevy_basic_portals/)\n[![NVPLv7+](https://img.shields.io/badge/license-NPLv7+-blue.svg)](https://git.pixie.town/thufie/npl-builder/src/branch/main/nvpl.md)\n[![Following released Bevy versions](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://bevyengine.org/learn/quick-start/plugin-development/#main-branch-tracking)\n\nBevy Basic Portals is a Bevy game engine plugin aimed to create portals.\n\nThose portals are (for now) purely visual and can be used to make mirrors, indoor renderings, crystal balls, and more!\n\n![Portal Cube example](https://github.com/Selene-Amanita/bevy_basic_portal/assets/134181069/9864c08c-7826-4b4a-bea1-082c4434fd74) ![Moving portals and destination example](https://github.com/Selene-Amanita/bevy_basic_portal/assets/134181069/14474b43-c5df-41ca-9d60-cb604fb4997b) ![Mirror example](https://github.com/Selene-Amanita/bevy_basic_portals/assets/134181069/b34e34b7-08ca-483c-8ff7-d31869e1b22d)\n\n## Basic Usage\nThis example illustrates how to create a simple portal, it uses a single sphere that will be displayed two times on screen thanks to the portal:\n```rust\nuse bevy::prelude::*;\nuse bevy_basic_portals::*;\n\nfn main() {\n    App::new()\n        .add_plugins((DefaultPlugins, PortalsPlugin::MINIMAL))\n        .add_systems(Startup, setup)\n        .run();\n}\n\nfn setup(mut commands: Commands, mut meshes: ResMut\u003cAssets\u003cMesh\u003e\u003e) {\n    commands.spawn((\n        Camera3d::default(),\n        Transform::from_xyz(-20.0, 0., 20.0).looking_at(Vec3::ZERO, Vec3::Y),\n    ));\n\n    let portal_mesh = meshes.add(Mesh::from(Rectangle::new(10., 10.)));\n    commands.spawn((\n        // This component will be deleted and things that are needed to create the portal will be created\n        CreatePortal {\n            destination: AsPortalDestination::Create(Transform::from_xyz(20., 0., 0.).into()),\n            // Uncomment this to see the portal\n            /*debug: Some(DebugPortal {\n                show_window: false,\n                ..default()\n            }),*/\n            ..default()\n        },\n        Mesh3d(portal_mesh),\n    ));\n\n    let sphere_mesh = meshes.add(Mesh::from(Sphere::new(2.).mesh().uv(32, 18)));\n    commands.spawn((\n        Mesh3d(sphere_mesh),\n        MeshMaterial3d::\u003cStandardMaterial\u003e::default(),\n        Transform::from_xyz(20., 0., -5.),\n    ));\n}\n```\nMore complex examples are available in the examples folder.\n\n## Vocabulary\n- A Portal is an entity used to visualise the effect\n- A Main Camera is a camera used to visualize the effect\n- A (portal) Destination is an entity representing the point in space where a portal is \"looking\"\n- A Portal Camera is a camera being used to render the effect, its position to the destination is the same as the main camera's position to the portal\n- All of those are Portal Parts, their references are stored in a separate entity\n\n## Known limitations\n(may be fixed in the future)\n- portals created by this crate are uni-directionnal, you can only look from one space to the other,\nif you want a bidirectional portal you can crate two portals manually\n- this crate doesn't handle \"portal recursion\", as in viewing a portal through another portal\n- portals created by this crate have no visible borders (not counting aliasing artifacts), you can \"see\" them with `DebugPortal`\n- this crate doesn't handle moving stuff through the portal, it is only visual, more like a crystal ball\n- this crate doesn't handle raycasting through the portal, it has to be done manually\n- this crate doesn't handle changing the portal's or the destination's scale\n- this crate doesn't handle changing camera settings after creation\n\n## Bevy versions\n| Bevy version | Bevy Basic Portals recommended version |\n|--------------|----------------------------------------|\n| 0.15.*       | 0.7.1                                  |\n| 0.14.*       | 0.6.0                                  |\n| 0.13.*       | 0.5.0                                  |\n| 0.12.*       | 0.4.0                                  |\n| 0.11.1       | 0.3.0                                  |\n| 0.10.*       | 0.2.1                                  |\n\n## License\n\nBevy Basic Portals is non-violent software: you can use, redistribute, and/or modify it under the terms of the `NVPLv7+` as found in the `LICENSE` file in the source code root directory or at [the CNPL repository](https://git.pixie.town/thufie/npl-builder/src/branch/main/nvpl.md).\n\nBevy Basic Portals comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.\n\nSee [the CNPL website](https://thufie.lain.haus/NPL.html) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselene-amanita%2Fbevy_basic_portals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselene-amanita%2Fbevy_basic_portals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselene-amanita%2Fbevy_basic_portals/lists"}