use bevy::asset::AssetServerSettings; use bevy::prelude::*; use bevy::render::texture::ImageSettings; use bevy::window::PresentMode; use crate::system::load_config::{get_asset_path_string, initial_size}; pub struct DefaultResourcesPlugin; impl Plugin for DefaultResourcesPlugin { fn build(&self, app: &mut App) { let (width, height) = initial_size(); app.insert_resource(WindowDescriptor { width: width * 3.0, height: height * 3.0, resizable: true, title: String::from("Ludum Dare 51"), present_mode: PresentMode::AutoNoVsync, ..Default::default() }) .insert_resource(ImageSettings::default_nearest()) .insert_resource(Msaa { samples: 1 }) .insert_resource(ClearColor(Color::hex("040720").unwrap())) .insert_resource(AssetServerSettings { asset_folder: get_asset_path_string(), watch_for_changes: false, }); } }