Skip to content

Commit

Permalink
fix compiler warnings & mention breaking in changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-smitherson committed Nov 3, 2023
1 parent 23a7ed5 commit 31518e3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Make `Wheel::friction_slip` public to customize the front friction applied to the vehicle controller’s wheels.
- Add the `DebugRenderBackend::filter_object` predicate that can be implemented to apply custom filtering rules
on the objects being rendered.
- **Breaking** Delete `RapierDebugRenderPlugin::depth_test` after switch to Bevy 0.11 Gizmos.

## v0.17.2 (26 Feb. 2023)
### Fix
Expand Down
9 changes: 1 addition & 8 deletions src_testbed/debug_render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ use rapier::pipeline::{
#[derive(Resource)]
pub struct DebugRenderPipelineResource(pub DebugRenderPipeline);

#[derive(Default)]
pub struct RapierDebugRenderPlugin {
depth_test: bool,
}

impl Default for RapierDebugRenderPlugin {
fn default() -> Self {
Self {
depth_test: cfg!(feature = "dim3"),
}
}
}
impl Plugin for RapierDebugRenderPlugin {
fn build(&self, app: &mut App) {
app.insert_resource(DebugRenderPipelineResource(DebugRenderPipeline::new(
Expand Down
4 changes: 2 additions & 2 deletions src_testbed/graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use rapier::math::{Isometry, Real, Vector};
//#[cfg(feature = "dim2")]
//use crate::objects::polyline::Polyline;
// use crate::objects::mesh::Mesh;
use bevy_pbr::StandardMaterial;
use bevy_sprite::ColorMaterial;
// use bevy_pbr::StandardMaterial;
// use bevy_sprite::ColorMaterial;
use rand::{Rng, SeedableRng};
use rand_pcg::Pcg32;
use std::collections::HashMap;
Expand Down
6 changes: 3 additions & 3 deletions src_testbed/objects/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use std::collections::HashMap;

use bevy::render::render_resource::PrimitiveTopology;
use bevy_pbr::wireframe::Wireframe;
use bevy_pbr::PbrBundle;
use bevy_pbr::StandardMaterial;
use bevy_sprite::ColorMaterial;
// use bevy_pbr::PbrBundle;
// use bevy_pbr::StandardMaterial;
// use bevy_sprite::ColorMaterial;
use rapier::geometry::{ColliderHandle, ColliderSet, Shape, ShapeType};

#[cfg(feature = "dim3")]
Expand Down
8 changes: 2 additions & 6 deletions src_testbed/testbed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy::prelude::*;

use crate::physics::{PhysicsEvents, PhysicsSnapshot, PhysicsState};
use crate::plugin::TestbedPlugin;
use crate::{debug_render, ui};
use crate::ui;
use crate::{graphics::GraphicsManager, harness::RunState};

use na::{self, Point2, Point3, Vector3};
Expand All @@ -28,14 +28,10 @@ use crate::harness::Harness;
#[cfg(all(feature = "dim3", feature = "other-backends"))]
use crate::physx_backend::PhysxWorld;
use bevy::render::camera::Camera;
use bevy_core_pipeline::prelude::Camera2dBundle;
use bevy_core_pipeline::prelude::Camera3dBundle;
use bevy_core_pipeline::prelude::ClearColor;
use bevy_egui::EguiContexts;
use bevy_pbr::wireframe::WireframePlugin;
use bevy_pbr::AmbientLight;
use bevy_pbr::DirectionalLight;
use bevy_pbr::DirectionalLightBundle;

#[cfg(feature = "dim2")]
use crate::camera2d::{OrbitCamera, OrbitCameraPlugin};
Expand Down Expand Up @@ -1005,7 +1001,7 @@ fn draw_contacts(_nf: &NarrowPhase, _colliders: &ColliderSet) {

#[cfg(feature = "dim3")]
fn setup_graphics_environment(mut commands: Commands) {
const HALF_SIZE: f32 = 100.0;
// const HALF_SIZE: f32 = 100.0;

commands.spawn(DirectionalLightBundle {
directional_light: DirectionalLight {
Expand Down

0 comments on commit 31518e3

Please sign in to comment.