diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 42 |
1 files changed, 27 insertions, 15 deletions
@@ -1,26 +1,33 @@ -# bevy_framebuffer_extract +# bevy_headless_render +[](https://crates.io/crates/bevy_headless_render)  - - -[](https://exvacuum.github.io/bevy_framebuffer_extract) + + +[](https://exvacuum.github.io/bevy_headless_render) -A plugin for the [Bevy](https://bevyengine.org) engine which allows for exporting framebuffer data from a camera. +A plugin for the [Bevy](https://bevyengine.org) engine which allows for headless rendering. -Currently it only supports cameras which render to a render texture. +Every frame will be copied from `HeadlessRenderSource` render textures into `HeadlessRenderDestination` images each frame. ## Compatibility | Crate Version | Bevy Version | |--- |--- | -| 0.1 | 0.13 | +| 0.1 | 0.14 | ## Installation +### crates.io +```toml +[dependencies] +bevy_headless_render = "0.2" +``` + ### Using git URL in Cargo.toml ```toml -[dependencies.bevy_framebuffer_extract] -git = "https://github.com/exvacuum/bevy_framebuffer_extract.git" +[dependencies.bevy_headless_render] +git = "https://github.com/exvacuum/bevy_headless_render.git" ``` ## Usage @@ -28,13 +35,13 @@ git = "https://github.com/exvacuum/bevy_framebuffer_extract.git" In `main.rs`: ```rs use bevy::prelude::*; -use bevy_framebuffer_extract; +use bevy_headless_render; fn main() { App::new() .add_plugins(( DefaultPlugins, - bevy_framebuffer_extract::FramebufferExtractPlugin, + bevy_headless_render::HeadlessRenderPlugin, )) .run(); } @@ -76,11 +83,16 @@ commands.spawn(( }, ..Default::default() }, - bevy_framebuffer_extract::ExtractFramebufferBundle { - source: framebuffer_extract_sources.add(FramebufferExtractSource(image_handle.clone())), // ResMut<Assets<FramebufferExtractSource>> - destination: FramebufferExtractDestination::default(), + bevy_headless_render::HeadlessRenderBundle { + source: headless_render_sources.add(HeadlessRenderSource(image_handle.clone())), // ResMut<Assets<HeadlessRenderSource>> + destination: HeadlessRenderDestination::default(), }, )); ``` -The FramebufferExtractDestination component will contain the extracted image which can be used or saved for whatever you need. +The HeadlessRenderDestination component will contain the extracted image which can be used or saved for whatever you need. + +## License + +This crate is licensed under your choice of 0BSD, Apache-2.0, or MIT license. + |