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

Preparing Changes for Bevy 0.11-dev #179

Merged
merged 9 commits into from
Jul 8, 2023
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ rand_pcg = "0.3"
serde = { version = "1.0", features = ["derive"] }
anyhow = "1.0"
ron = "0.8"
bitflags = "1.3"
bitflags = "2.3"
typetag = "0.2"

[dependencies.bevy]
version = "0.10"
git = "https://github.com/bevyengine/bevy"
default-features = false
features = [ "bevy_core_pipeline", "bevy_render", "bevy_asset", "x11" ]

[package.metadata.docs.rs]
all-features = true

[dev-dependencies]
# Same version as Bevy 0.10 (bevy_render)
wgpu = "0.15"
# Same version as Bevy 0.11 (bevy_render)
wgpu = "0.16"
# For shader snippet validation
naga = "0.11"
naga = "0.12"

futures = "0.3"
bevy-inspector-egui = "0.18"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use bevy_hanabi::prelude::*;

App::default()
.add_plugins(DefaultPlugins)
.add_plugin(HanabiPlugin)
.add_plugins(HanabiPlugin)
.run();
```

Expand Down
12 changes: 6 additions & 6 deletions examples/2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use bevy::{
},
sprite::{MaterialMesh2dBundle, Mesh2dHandle},
};
use bevy_inspector_egui::quick::WorldInspectorPlugin;
// use bevy_inspector_egui::quick::WorldInspectorPlugin;

use bevy_hanabi::prelude::*;

Expand All @@ -32,11 +32,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
})
.set(RenderPlugin { wgpu_settings }),
)
.add_system(bevy::window::close_on_esc)
.add_plugin(HanabiPlugin)
.add_plugin(WorldInspectorPlugin::default())
.add_startup_system(setup)
.add_system(update_plane)
.add_plugins(HanabiPlugin)
// Have to wait for update.
// .add_plugins(WorldInspectorPlugin::default())
.add_systems(Startup, setup)
.add_systems(Update, (bevy::window::close_on_esc, update_plane))
.run();

Ok(())
Expand Down
18 changes: 11 additions & 7 deletions examples/activate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! A circle bobs up and down in the water,
//! spawning square bubbles when in the water.
use bevy::{
core_pipeline::tonemapping::Tonemapping,
log::LogPlugin,
prelude::*,
render::{
Expand All @@ -10,7 +11,7 @@ use bevy::{
RenderPlugin,
},
};
use bevy_inspector_egui::quick::WorldInspectorPlugin;
// use bevy_inspector_egui::quick::WorldInspectorPlugin;

use bevy_hanabi::prelude::*;

Expand All @@ -30,11 +31,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
})
.set(RenderPlugin { wgpu_settings }),
)
.add_system(bevy::window::close_on_esc)
.add_plugin(HanabiPlugin)
.add_plugin(WorldInspectorPlugin::default())
.add_startup_system(setup)
.add_system(update)
.add_plugins(HanabiPlugin)
// Have to wait for update.
// .add_plugins(WorldInspectorPlugin::default())
.add_systems(Startup, setup)
.add_systems(Update, (bevy::window::close_on_esc, update))
.run();

Ok(())
Expand All @@ -51,7 +52,10 @@ fn setup(
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<StandardMaterial>>,
) {
let mut camera = Camera3dBundle::default();
let mut camera = Camera3dBundle {
tonemapping: Tonemapping::None,
..default()
};
let mut projection = OrthographicProjection::default();
projection.scaling_mode = ScalingMode::FixedVertical(2.);
projection.scale = 1.0;
Expand Down
14 changes: 8 additions & 6 deletions examples/billboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
//! particles to always render facing the camera.

use bevy::{
core_pipeline::tonemapping::Tonemapping,
log::LogPlugin,
prelude::*,
render::{
camera::Projection, render_resource::WgpuFeatures, settings::WgpuSettings, RenderPlugin,
},
};
use bevy_inspector_egui::quick::WorldInspectorPlugin;
// use bevy_inspector_egui::quick::WorldInspectorPlugin;

use bevy_hanabi::prelude::*;

Expand All @@ -28,11 +29,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
})
.set(RenderPlugin { wgpu_settings }),
)
.add_system(bevy::window::close_on_esc)
.add_plugin(HanabiPlugin)
.add_plugin(WorldInspectorPlugin::default())
.add_startup_system(setup)
.add_system(rotate_camera)
.add_plugins(HanabiPlugin)
// Have to wait for update.
// .add_plugins(WorldInspectorPlugin::default())
.add_systems(Startup, setup)
.add_systems(Update, (bevy::window::close_on_esc, rotate_camera))
.run();

Ok(())
Expand All @@ -51,6 +52,7 @@ fn setup(
fov: 120.0,
..Default::default()
}),
tonemapping: Tonemapping::None,
..Default::default()
};

Expand Down
17 changes: 11 additions & 6 deletions examples/circle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
//! A sphere spawns dust in a circle.

use bevy::{
core_pipeline::tonemapping::Tonemapping,
log::LogPlugin,
prelude::*,
render::{render_resource::WgpuFeatures, settings::WgpuSettings, RenderPlugin},
};
use bevy_inspector_egui::quick::WorldInspectorPlugin;
// use bevy_inspector_egui::quick::WorldInspectorPlugin;

use bevy_hanabi::prelude::*;

Expand All @@ -27,10 +28,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
})
.set(RenderPlugin { wgpu_settings }),
)
.add_system(bevy::window::close_on_esc)
.add_plugin(HanabiPlugin)
.add_plugin(WorldInspectorPlugin::default())
.add_startup_system(setup)
.add_systems(Update, bevy::window::close_on_esc)
.add_plugins(HanabiPlugin)
// Have to wait for update.
// .add_plugins(WorldInspectorPlugin::default())
.add_systems(Startup, setup)
.run();

Ok(())
Expand All @@ -43,7 +45,10 @@ fn setup(
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<StandardMaterial>>,
) {
let mut camera = Camera3dBundle::default();
let mut camera = Camera3dBundle {
tonemapping: Tonemapping::None,
..default()
};
camera.transform =
Transform::from_xyz(3.0, 3.0, 5.0).looking_at(Vec3::new(0.0, 1.0, 0.0), Vec3::Y);
commands.spawn(camera);
Expand Down
15 changes: 9 additions & 6 deletions examples/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
//! based on [`ExprWriter::time()`] then assigned to the [`AccelModifier`].

use bevy::{
core_pipeline::{bloom::BloomSettings, clear_color::ClearColorConfig},
core_pipeline::{
bloom::BloomSettings, clear_color::ClearColorConfig, tonemapping::Tonemapping,
},
log::LogPlugin,
prelude::*,
};
use bevy_inspector_egui::quick::WorldInspectorPlugin;
// use bevy_inspector_egui::quick::WorldInspectorPlugin;

use bevy_hanabi::prelude::*;

Expand All @@ -22,10 +24,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
level: bevy::log::Level::WARN,
filter: "bevy_hanabi=warn,expr=trace".to_string(),
}))
.add_system(bevy::window::close_on_esc)
.add_plugin(HanabiPlugin)
.add_plugin(WorldInspectorPlugin::default())
.add_startup_system(setup)
.add_systems(Update, bevy::window::close_on_esc)
.add_plugins(HanabiPlugin)
//.add_plugins(WorldInspectorPlugin::default())
.add_systems(Startup, setup)
.run();

Ok(())
Expand All @@ -44,6 +46,7 @@ fn setup(mut commands: Commands, mut effects: ResMut<Assets<EffectAsset>>) {
clear_color: ClearColorConfig::Custom(Color::BLACK),
..default()
},
tonemapping: Tonemapping::None,
..default()
},
BloomSettings::default(),
Expand Down
16 changes: 10 additions & 6 deletions examples/firework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
//! increased realism. This is a subtle effect, but of importance.

use bevy::{
core_pipeline::{bloom::BloomSettings, clear_color::ClearColorConfig},
core_pipeline::{
bloom::BloomSettings, clear_color::ClearColorConfig, tonemapping::Tonemapping,
},
log::LogPlugin,
prelude::*,
};
use bevy_inspector_egui::quick::WorldInspectorPlugin;
// use bevy_inspector_egui::quick::WorldInspectorPlugin;

use bevy_hanabi::prelude::*;

Expand All @@ -29,10 +31,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
level: bevy::log::Level::WARN,
filter: "bevy_hanabi=warn,firework=trace".to_string(),
}))
.add_system(bevy::window::close_on_esc)
.add_plugin(HanabiPlugin)
.add_plugin(WorldInspectorPlugin::default())
.add_startup_system(setup)
.add_systems(Update, bevy::window::close_on_esc)
.add_plugins(HanabiPlugin)
// Have to wait for update.
// .add_plugins(WorldInspectorPlugin::default())
.add_systems(Startup, setup)
.run();

Ok(())
Expand All @@ -50,6 +53,7 @@ fn setup(mut commands: Commands, mut effects: ResMut<Assets<EffectAsset>>) {
clear_color: ClearColorConfig::Custom(Color::BLACK),
..default()
},
tonemapping: Tonemapping::None,
..default()
},
BloomSettings::default(),
Expand Down
22 changes: 13 additions & 9 deletions examples/force_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
//! killing all particles entering it.

use bevy::{
core_pipeline::tonemapping::Tonemapping,
log::LogPlugin,
prelude::*,
render::{
camera::Projection, render_resource::WgpuFeatures, settings::WgpuSettings, RenderPlugin,
},
};
use bevy_inspector_egui::quick::WorldInspectorPlugin;
// use bevy_inspector_egui::quick::WorldInspectorPlugin;

use bevy_hanabi::prelude::*;

Expand All @@ -42,13 +43,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
})
.set(RenderPlugin { wgpu_settings }),
)
.add_system(bevy::window::close_on_esc)
//.add_plugin(LookTransformPlugin)
//.add_plugin(OrbitCameraPlugin::default())
.add_plugin(HanabiPlugin)
.add_plugin(WorldInspectorPlugin::default())
.add_startup_system(setup)
.add_system(update)
//.add_plugins(LookTransformPlugin)
//.add_plugins(OrbitCameraPlugin::default())
.add_plugins(HanabiPlugin)
// Have to wait for update.
// .add_plugins(WorldInspectorPlugin::default())
.add_systems(Startup, setup)
.add_systems(Update, (bevy::window::close_on_esc, update))
.run();

Ok(())
Expand All @@ -62,7 +63,10 @@ fn setup(
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<StandardMaterial>>,
) {
let mut camera = Camera3dBundle::default();
let mut camera = Camera3dBundle {
tonemapping: Tonemapping::None,
..default()
};
let mut projection = OrthographicProjection::default();
projection.scaling_mode = bevy::render::camera::ScalingMode::FixedVertical(5.);
camera.transform.translation.z = projection.far / 2.0;
Expand Down
14 changes: 8 additions & 6 deletions examples/gradient.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use bevy::{
core_pipeline::tonemapping::Tonemapping,
log::LogPlugin,
prelude::*,
render::{
mesh::shape::Cube, render_resource::WgpuFeatures, settings::WgpuSettings,
view::RenderLayers, RenderPlugin,
},
};
use bevy_inspector_egui::quick::WorldInspectorPlugin;
// use bevy_inspector_egui::quick::WorldInspectorPlugin;
use std::f32::consts::PI;

use bevy_hanabi::prelude::*;
Expand All @@ -27,11 +28,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
})
.set(RenderPlugin { wgpu_settings }),
)
.add_system(bevy::window::close_on_esc)
.add_plugin(HanabiPlugin)
.add_plugin(WorldInspectorPlugin::default())
.add_startup_system(setup)
.add_system(update)
.add_plugins(HanabiPlugin)
// Have to wait for update.
// .add_plugins(WorldInspectorPlugin::default())
.add_systems(Startup, setup)
.add_systems(Update, (bevy::window::close_on_esc, update))
.run();

Ok(())
Expand All @@ -51,6 +52,7 @@ fn setup(
hdr: true,
..default()
},
tonemapping: Tonemapping::None,
..default()
};
camera.transform.translation = Vec3::new(0.0, 0.0, 100.0);
Expand Down
Loading
Loading