Skip to content

Commit

Permalink
Merge commit 'a1974a473809c2c6c31fad08174898c220d777bd' into meshlet
Browse files Browse the repository at this point in the history
  • Loading branch information
JMS55 committed Mar 7, 2024
2 parents 24fe534 + a1974a4 commit c687e59
Show file tree
Hide file tree
Showing 50 changed files with 936 additions and 455 deletions.
28 changes: 28 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ bevy_winit = ["bevy_internal/bevy_winit"]
# Adds support for rendering gizmos
bevy_gizmos = ["bevy_internal/bevy_gizmos", "bevy_color"]

# Provides a collection of developer tools
bevy_dev_tools = ["bevy_internal/bevy_dev_tools"]

# Tracing support, saving a file in Chrome Tracing format
trace_chrome = ["trace", "bevy_internal/trace_chrome"]

Expand Down Expand Up @@ -321,6 +324,9 @@ bevy_debug_stepping = ["bevy_internal/bevy_debug_stepping"]
# Enables processing meshes into meshlet meshes for bevy_pbr
meshlet_processor = ["bevy_internal/meshlet_processor"]

# Enable support for the ios_simulator by downgrading some rendering capabilities
ios_simulator = ["bevy_internal/ios_simulator"]

[dependencies]
bevy_dylib = { path = "crates/bevy_dylib", version = "0.14.0-dev", default-features = false, optional = true }
bevy_internal = { path = "crates/bevy_internal", version = "0.14.0-dev", default-features = false }
Expand Down Expand Up @@ -1251,6 +1257,17 @@ description = "Embed an asset in the application binary and load it"
category = "Assets"
wasm = true

[[example]]
name = "extra_asset_source"
path = "examples/asset/extra_source.rs"
doc-scrape-examples = true

[package.metadata.example.extra_asset_source]
name = "Extra asset source"
description = "Load an asset from a non-standard asset source"
category = "Assets"
wasm = true

[[example]]
name = "hot_asset_reloading"
path = "examples/asset/hot_asset_reloading.rs"
Expand Down Expand Up @@ -1702,6 +1719,17 @@ description = "Displays each contributor as a bouncy bevy-ball!"
category = "Games"
wasm = true

[[example]]
name = "desk_toy"
path = "examples/games/desk_toy.rs"
doc-scrape-examples = true

[package.metadata.example.desk_toy]
name = "Desk Toy"
description = "Bevy logo as a desk toy using transparent windows! Now with Googly Eyes!"
category = "Games"
wasm = false

[[example]]
name = "game_menu"
path = "examples/games/game_menu.rs"
Expand Down
4 changes: 0 additions & 4 deletions crates/bevy_animation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,6 @@ impl Plugin for AnimationPlugin {
app.init_asset::<AnimationClip>()
.register_asset_reflect::<AnimationClip>()
.register_type::<AnimationPlayer>()
.register_type::<VariableCurve>()
.register_type::<Vec<VariableCurve>>()
.register_type::<Interpolation>()
.register_type::<Keyframes>()
.register_type::<AnimationTarget>()
.add_systems(
PostUpdate,
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ keywords = ["bevy"]

[features]
trace = []
bevy_ci_testing = ["serde", "ron"]
bevy_debug_stepping = []
default = ["bevy_reflect", "bevy_debug_stepping"]
bevy_reflect = ["dep:bevy_reflect", "bevy_ecs/bevy_reflect"]
Expand Down
5 changes: 0 additions & 5 deletions crates/bevy_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ impl Default for App {

app.add_event::<AppExit>();

#[cfg(feature = "bevy_ci_testing")]
{
crate::ci_testing::setup_app(&mut app);
}

app
}
}
Expand Down
3 changes: 0 additions & 3 deletions crates/bevy_app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ mod plugin;
mod plugin_group;
mod schedule_runner;

#[cfg(feature = "bevy_ci_testing")]
pub mod ci_testing;

pub use app::*;
pub use bevy_derive::DynamicPlugin;
pub use main_schedule::*;
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_asset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ impl AssetApp for App {
.add_event::<AssetEvent<A>>()
.add_event::<AssetLoadFailedEvent<A>>()
.register_type::<Handle<A>>()
.register_type::<AssetId<A>>()
.add_systems(
First,
Assets::<A>::asset_events
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ bevy_app = { path = "../bevy_app", version = "0.14.0-dev", features = [
bevy_ecs = { path = "../bevy_ecs", version = "0.14.0-dev", features = [
"bevy_reflect",
] }
bevy_math = { path = "../bevy_math", version = "0.14.0-dev" }
bevy_reflect = { path = "../bevy_reflect", version = "0.14.0-dev", features = [
"bevy",
] }
Expand Down
77 changes: 0 additions & 77 deletions crates/bevy_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,9 @@ pub mod prelude {
}

use bevy_app::prelude::*;
use bevy_ecs::component::{ComponentId, ComponentTicks, Tick};
use bevy_ecs::prelude::*;
use bevy_reflect::{ReflectDeserialize, ReflectSerialize};
use bevy_utils::{Duration, HashSet, Instant, Uuid};
use std::borrow::Cow;
use std::ffi::OsString;
use std::marker::PhantomData;
use std::ops::Range;
use std::path::{Path, PathBuf};

#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(target_arch = "wasm32"))]
use bevy_tasks::tick_global_task_pools_on_main_thread;

Expand All @@ -40,78 +32,9 @@ pub struct TypeRegistrationPlugin;
impl Plugin for TypeRegistrationPlugin {
fn build(&self, app: &mut App) {
app.register_type::<Name>();

register_ecs_types(app);
register_rust_types(app);
register_math_types(app);
}
}

fn register_ecs_types(app: &mut App) {
app.register_type::<Entity>()
.register_type::<ComponentId>()
.register_type::<Tick>()
.register_type::<ComponentTicks>();
}

fn register_rust_types(app: &mut App) {
app.register_type::<Range<f32>>()
.register_type_data::<Range<f32>, ReflectSerialize>()
.register_type_data::<Range<f32>, ReflectDeserialize>()
.register_type::<String>()
.register_type::<PathBuf>()
.register_type::<OsString>()
.register_type::<HashSet<String>>()
.register_type::<Option<String>>()
.register_type::<Option<bool>>()
.register_type::<Option<f32>>()
.register_type::<Option<f64>>()
.register_type::<Vec<f32>>()
.register_type::<Cow<'static, str>>()
.register_type::<Cow<'static, Path>>()
.register_type::<Duration>()
.register_type::<Instant>()
.register_type::<Uuid>();
}

fn register_math_types(app: &mut App) {
app.register_type::<bevy_math::IVec2>()
.register_type::<bevy_math::IVec3>()
.register_type::<bevy_math::IVec4>()
.register_type::<bevy_math::UVec2>()
.register_type::<bevy_math::UVec3>()
.register_type::<bevy_math::UVec4>()
.register_type::<bevy_math::DVec2>()
.register_type::<Option<bevy_math::DVec2>>()
.register_type::<bevy_math::DVec3>()
.register_type::<bevy_math::DVec4>()
.register_type::<bevy_math::BVec2>()
.register_type::<bevy_math::BVec3>()
.register_type::<bevy_math::BVec3A>()
.register_type::<bevy_math::BVec4>()
.register_type::<bevy_math::BVec4A>()
.register_type::<bevy_math::Vec2>()
.register_type::<bevy_math::Vec3>()
.register_type::<bevy_math::Vec3A>()
.register_type::<bevy_math::Vec4>()
.register_type::<bevy_math::DAffine2>()
.register_type::<bevy_math::DAffine3>()
.register_type::<bevy_math::Affine2>()
.register_type::<bevy_math::Affine3A>()
.register_type::<bevy_math::DMat2>()
.register_type::<bevy_math::DMat3>()
.register_type::<bevy_math::DMat4>()
.register_type::<bevy_math::Mat2>()
.register_type::<bevy_math::Mat3>()
.register_type::<bevy_math::Mat3A>()
.register_type::<bevy_math::Mat4>()
.register_type::<bevy_math::DQuat>()
.register_type::<bevy_math::Quat>()
.register_type::<bevy_math::Rect>()
.register_type::<Vec<bevy_math::Quat>>()
.register_type::<Vec<bevy_math::Vec3>>();
}

/// Setup of default task pools: [`AsyncComputeTaskPool`](bevy_tasks::AsyncComputeTaskPool),
/// [`ComputeTaskPool`](bevy_tasks::ComputeTaskPool), [`IoTaskPool`](bevy_tasks::IoTaskPool).
#[derive(Default)]
Expand Down
2 changes: 0 additions & 2 deletions crates/bevy_core_pipeline/src/core_3d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ pub struct Core3dPlugin;
impl Plugin for Core3dPlugin {
fn build(&self, app: &mut App) {
app.register_type::<Camera3d>()
.register_type::<Camera3dDepthLoadOp>()
.register_type::<Camera3dDepthTextureUsage>()
.register_type::<ScreenSpaceTransmissionQuality>()
.add_plugins((SkyboxPlugin, ExtractComponentPlugin::<Camera3d>::default()))
.add_systems(PostUpdate, check_msaa);
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_core_pipeline/src/fxaa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl Plugin for FxaaPlugin {
fn build(&self, app: &mut App) {
load_internal_asset!(app, FXAA_SHADER_HANDLE, "fxaa.wgsl", Shader::from_wgsl);

app.register_type::<Fxaa>().register_type::<Sensitivity>();
app.register_type::<Fxaa>();
app.add_plugins(ExtractComponentPlugin::<Fxaa>::default());

let Ok(render_app) = app.get_sub_app_mut(RenderApp) else {
Expand Down
25 changes: 25 additions & 0 deletions crates/bevy_dev_tools/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "bevy_dev_tools"
version = "0.14.0-dev"
edition = "2021"
description = "Collection of developer tools for the Bevy Engine"
homepage = "https://bevyengine.org"
repository = "https://github.com/bevyengine/bevy"
license = "MIT OR Apache-2.0"
keywords = ["bevy"]

[features]
bevy_ci_testing = ["serde", "ron"]

[dependencies]
# bevy
bevy_app = { path = "../bevy_app", version = "0.14.0-dev" }
bevy_utils = { path = "../bevy_utils", version = "0.14.0-dev" }
bevy_ecs = { path = "../bevy_ecs", version = "0.14.0-dev" }

# other
serde = { version = "1.0", features = ["derive"], optional = true }
ron = { version = "0.8.0", optional = true }

[lints]
workspace = true
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Utilities for testing in CI environments.
use crate::{app::AppExit, App, Update};
use bevy_app::{App, AppExit, Update};
use serde::Deserialize;

use bevy_ecs::prelude::Resource;
Expand Down
44 changes: 44 additions & 0 deletions crates/bevy_dev_tools/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//! This crate provides additional utilities for the [Bevy game engine](https://bevyengine.org),
//! focused on improving developer experience.
use bevy_app::prelude::*;
#[cfg(feature = "bevy_ci_testing")]
pub mod ci_testing;

/// Enables developer tools in an [`App`]. This plugin is added automatically with `bevy_dev_tools`
/// feature.
///
/// Warning: It is not recommended to enable this in final shipped games or applications.
/// Dev tools provide a high level of access to the internals of your application,
/// and may interfere with ordinary use and gameplay.
///
/// To enable developer tools, you can either:
///
/// - Create a custom crate feature (e.g "`dev_mode`"), which enables the `bevy_dev_tools` feature
/// along with any other development tools you might be using:
///
/// ```toml
/// [feature]
/// dev_mode = ["bevy/bevy_dev_tools", "other_dev_tools"]
/// ```
///
/// - Use `--feature bevy/bevy_dev_tools` flag when using the `cargo run` command:
///
/// `cargo run --features bevy/bevy_dev_tools`
///
/// - Add the `bevy_dev_tools` feature to the bevy dependency in your `Cargo.toml` file:
///
/// `features = ["bevy_dev_tools"]`
///
/// Note: The third method is not recommended, as it requires you to remove the feature before
/// creating a build for release to the public.
pub struct DevToolsPlugin;

impl Plugin for DevToolsPlugin {
fn build(&self, _app: &mut App) {
#[cfg(feature = "bevy_ci_testing")]
{
ci_testing::setup_app(_app);
}
}
}
Loading

0 comments on commit c687e59

Please sign in to comment.