Move release profile to opt-level 3 (#110)

Co-authored-by: rewin <rewin1996@gmail.com>
This commit is contained in:
Lee-Orr
2024-03-27 15:19:59 -04:00
committed by GitHub
parent d63709c578
commit 9b2f1636c3
15 changed files with 540 additions and 156 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
use std::ops::{Deref, DerefMut};
use bevy::{
app::{App, Plugin, PostUpdate, Update},
+3 -3
View File
@@ -1,11 +1,11 @@
use std::fmt;
use bevy::{prelude::*, window::PrimaryWindow};
use bevy_inspector_egui::{bevy_egui::EguiPlugin, DefaultInspectorConfigPlugin};
use bevy_inspector_egui::{DefaultInspectorConfigPlugin};
use bevy_mod_picking::debug::DebugPickingMode;
use space_editor::{
prelude::*,
space_editor_ui::{tools::gizmo::GizmoToolPlugin, EditorGizmoConfigPlugin, EditorPluginGroup},
space_editor_ui::{tools::gizmo::GizmoToolPlugin, EditorPluginGroup},
};
use crate::{
@@ -118,7 +118,7 @@ fn update_gizmo_line_thickness(
mut config_store: ResMut<GizmoConfigStore>,
q_window: Query<&Window, (Changed<Window>, With<PrimaryWindow>)>,
) {
if let Ok(scale_factor) = q_window.get_single().map(|win| win.scale_factor() as f32) {
if let Ok(scale_factor) = q_window.get_single().map(|win| win.scale_factor()) {
let (config, _) = config_store.config_mut::<DefaultGizmoConfigGroup>();
config.line_width = 2. * scale_factor;
}
+1 -1
View File
@@ -76,7 +76,7 @@ pub fn start_headless(
Startup,
move |mut cmd: Commands,
mut ew: EventWriter<EditorEvent>,
mut asset_server: Res<AssetServer>| {
asset_server: Res<AssetServer>| {
cmd.insert_resource(SkyboxHolder(Some(Skybox {
image: asset_server.load(skybox.clone()),
brightness: 1.0,
+1 -1
View File
@@ -237,7 +237,7 @@ fn translate_fps_camera_events(
mut input: EventWriter<InputAction>,
) {
// Camera Translation (FPS-like)
use KeyCode::*;
let wasd_keys = [
KeyCode::KeyW,
KeyCode::KeyA,
+1 -1
View File
@@ -288,7 +288,7 @@ pub(super) fn on_rotate(
early_exit_test: &early_exit_test,
..default()
};
let hits = raycast.cast_ray(ray.into(), &settings);
let hits = raycast.cast_ray(ray, &settings);
// If the pointer is no longer in the vicinity of the sphere, we'll
// invoke this closure to extrapolate additional rotation from the
+4 -1
View File
@@ -1,6 +1,9 @@
#![allow(clippy::type_complexity, clippy::too_many_arguments)]
use bevy::{app::PluginGroupBuilder, prelude::*};
use bevy::{
app::PluginGroupBuilder,
prelude::*,
};
use bevy_mod_picking::DefaultPickingPlugins;
use bevy_web_asset::WebAssetPlugin;
use scene::ImportSceneEvent;
+1 -1
View File
@@ -111,7 +111,7 @@ pub struct SkyboxHolder(pub Option<Skybox>);
fn attach_skybox(
mut cmd: Commands,
mut skybox_holder: ResMut<SkyboxHolder>,
skybox_holder: ResMut<SkyboxHolder>,
mut q_camera: Query<Entity, (With<Camera3d>, Without<Skybox>)>,
) {
let Some(skybox) = skybox_holder.0.as_ref() else {
+1 -1
View File
@@ -1,4 +1,4 @@
use bevy::render::render_graph::RenderSubGraph;
use bevy::{
app::AppExit,
core_pipeline::{core_3d, prepass::ViewPrepassTextures},
+5 -8
View File
@@ -2,9 +2,7 @@ use core::fmt;
use bevy::{
asset::LoadState,
core_pipeline::Skybox,
prelude::*,
render::render_resource::{TextureViewDescriptor, TextureViewDimension},
};
use crate::MainCamera;
@@ -38,7 +36,7 @@ struct SkyboxAssets {
env_specular: Handle<Image>,
}
fn load_skybox(mut cmd: Commands, assets: Res<AssetServer>, id: Res<SkyboxId>) {
fn load_skybox(mut cmd: Commands, _assets: Res<AssetServer>, id: Res<SkyboxId>) {
let id = &**id;
if let Ok(color) = Color::hex(id) {
cmd.insert_resource(ClearColor(color));
@@ -47,7 +45,6 @@ fn load_skybox(mut cmd: Commands, assets: Res<AssetServer>, id: Res<SkyboxId>) {
brightness: 1.0,
})
} else {
let color = Color::hex("AAAAAA").unwrap();
cmd.insert_resource(ClearColor(color));
cmd.insert_resource(AmbientLight {
@@ -89,10 +86,10 @@ fn skybox_assets_loaded(
}
fn spawn_skybox(
mut cmd: Commands,
mut images: ResMut<Assets<Image>>,
skybox_assets: Res<SkyboxAssets>,
q_camera: Query<Entity, With<MainCamera>>,
_cmd: Commands,
_images: ResMut<Assets<Image>>,
_skybox_assets: Res<SkyboxAssets>,
_q_camera: Query<Entity, With<MainCamera>>,
) {
// // Configure the skybox texture as a cubemap
// let image = images.get_mut(&skybox_assets.cubemap).unwrap();
-1
View File
@@ -1,5 +1,4 @@
use bevy::{
a11y::accesskit::TextAlign,
diagnostic::{DiagnosticsStore, FrameTimeDiagnosticsPlugin},
prelude::*,
};
+1 -1
View File
@@ -153,7 +153,7 @@ fn take_screenshots(
src_buffer,
img.width(),
img.height(),
ColorType::Rgb8,
ColorType::Rgb8.into(),
) {
error!("{err}");
return;