Skip to content

Commit

Permalink
feat: add examples dir
Browse files Browse the repository at this point in the history
  • Loading branch information
cs50victor committed Jan 25, 2024
1 parent a45e003 commit f99dd55
Show file tree
Hide file tree
Showing 11 changed files with 208 additions and 392 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["crates/*"]
members = ["crates/*", "examples/*"]

package.rust-version = "1.75.0"

Expand Down
2 changes: 0 additions & 2 deletions crates/bevy_frame_capture/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ version = "0.1.0"
edition = "2021"
rust-version.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = { workspace = true }
bevy = { workspace = true }
Expand Down
20 changes: 18 additions & 2 deletions crates/bevy_frame_capture/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/// Derived from: https://github.com/bevyengine/bevy/pull/5550
pub mod image_copy;
pub mod scene;
mod image_copy;
mod scene;

use bevy::app::{App, Plugin, PostUpdate};
use image_copy::ImageCopyPlugin;
use scene::update;
pub use scene::{SceneInfo,setup_render_target, white_img_placeholder, CurrImageBase64};

pub struct FrameCapturePlugin;

impl Plugin for FrameCapturePlugin {
fn build(&self, app: &mut App) {
app.add_plugins(ImageCopyPlugin);
app.add_systems(PostUpdate, update);
app.init_resource::<scene::SceneInfo>();
app.add_event::<scene::SceneInfo>();
}
}
Loading

0 comments on commit f99dd55

Please sign in to comment.