From 7f3770cf4918f8e7290a6b8ffa8de9baa8fa13b1 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 13 May 2024 00:55:49 +0200 Subject: [PATCH] add bevy::math::{DVec3,DQuat} import to common --- src/actor.rs | 1 - src/camera.rs | 1 - src/chat.rs | 1 - src/cmd.rs | 1 - src/common.rs | 2 ++ src/game.rs | 1 - src/hud.rs | 1 - src/nature.rs | 3 +-- src/world.rs | 2 +- 9 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index c2a29d3..48a4fd7 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -16,7 +16,6 @@ use bevy::prelude::*; use bevy_xpbd_3d::prelude::*; -use bevy::math::DVec3; use crate::prelude::*; pub const ENGINE_SPEED_FACTOR: f32 = 30.0; diff --git a/src/camera.rs b/src/camera.rs index 7b9fbdf..f6f296d 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -19,7 +19,6 @@ use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings}; use bevy::core_pipeline::tonemapping::Tonemapping; use bevy::pbr::{CascadeShadowConfigBuilder, DirectionalLightShadowMap}; use bevy::transform::TransformSystem; -use bevy::math::{DVec3, DQuat}; use bevy_xpbd_3d::prelude::*; use bevy_xpbd_3d::plugins::sync; use crate::prelude::*; diff --git a/src/chat.rs b/src/chat.rs index 5c4a79e..c114223 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -13,7 +13,6 @@ use crate::prelude::*; use bevy::prelude::*; -use bevy::math::DVec3; use bevy_xpbd_3d::prelude::*; use serde_yaml::Value; use serde::Deserialize; diff --git a/src/cmd.rs b/src/cmd.rs index 87190da..9e0b8b0 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -13,7 +13,6 @@ extern crate regex; use bevy::prelude::*; use bevy_xpbd_3d::prelude::*; -use bevy::math::DVec3; use bevy::pbr::{NotShadowCaster, NotShadowReceiver}; use crate::prelude::*; use regex::Regex; diff --git a/src/common.rs b/src/common.rs index 1970bdd..3e44f06 100644 --- a/src/common.rs +++ b/src/common.rs @@ -12,6 +12,8 @@ use bevy::prelude::*; +pub use bevy::math::{DVec3, DQuat}; + pub use std::f32::consts::PI as PI32; pub use std::f64::consts::PI; pub const EPSILON32: f32 = 1e-9; diff --git a/src/game.rs b/src/game.rs index 289ce2a..5ee3351 100644 --- a/src/game.rs +++ b/src/game.rs @@ -12,7 +12,6 @@ use crate::prelude::*; use bevy::prelude::*; -use bevy::math::DVec3; use bevy::pbr::ExtendedMaterial; use bevy::scene::SceneInstance; use bevy_xpbd_3d::prelude::*; diff --git a/src/hud.rs b/src/hud.rs index e22a7e3..abb45ec 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -16,7 +16,6 @@ use bevy::prelude::*; use bevy::diagnostic::{DiagnosticsStore, FrameTimeDiagnosticsPlugin}; use bevy::transform::TransformSystem; use bevy_xpbd_3d::prelude::*; -use bevy::math::DVec3; use std::collections::VecDeque; use std::time::SystemTime; diff --git a/src/nature.rs b/src/nature.rs index e4b0a4b..558879f 100644 --- a/src/nature.rs +++ b/src/nature.rs @@ -10,8 +10,7 @@ // // This module manages the messy, impure parts of our universe. -use bevy::math::DVec3; -use std::f64::consts::PI as PI; +use crate::prelude::*; pub const OXYGEN_USE_KG_PER_S: f32 = 1e-5; pub const OXY_S: f32 = OXYGEN_USE_KG_PER_S; diff --git a/src/world.rs b/src/world.rs index eee3a3d..b3e1533 100644 --- a/src/world.rs +++ b/src/world.rs @@ -12,7 +12,7 @@ use crate::prelude::*; use bevy::prelude::*; -use bevy::math::{DVec3, I64Vec3}; +use bevy::math::I64Vec3; use bevy::scene::{InstanceId, SceneInstance}; use bevy::render::mesh::Indices; use bevy_xpbd_3d::prelude::*;