Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wasm32 workaround for missing pipelined_rendering #56

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
use bevy_app::prelude::*;
use bevy_ecs::prelude::*;
use bevy_reflect::prelude::*;
use bevy_render::{pipelined_rendering::RenderExtractApp, Render, RenderApp, RenderSet};
use bevy_render::{Render, RenderApp, RenderSet};
use bevy_utils::Instant;
use bevy_window::prelude::*;

#[cfg(not(target_arch = "wasm32"))]
use bevy_render::pipelined_rendering::RenderExtractApp;
#[cfg(not(target_arch = "wasm32"))]
use bevy_winit::WinitWindows;

Expand All @@ -45,6 +47,11 @@ use std::{
#[cfg(feature = "framepace_debug")]
pub mod debug;

/// A dummy label for the subapp of the rendered pipeline that does not exist in wasm32
#[cfg(target_arch = "wasm32")]
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, bevy_app::AppLabel)]
struct RenderExtractApp;

/// Adds framepacing and framelimiting functionality to your [`App`].
#[derive(Debug, Clone, Component)]
pub struct FramepacePlugin;
Expand Down