## Summary - split development dynamic linking from production builds - add headless processed-asset generation - add a separate production CI cache and static Bevy/Rust linkage verification - keep custom debug features enabled for production builds behind a feature gate Reviewed-on: #46 Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
45 lines
1.5 KiB
Rust
45 lines
1.5 KiB
Rust
use bevy::asset::AssetMode::Processed;
|
|
#[cfg(feature = "debug_features")]
|
|
use bevy::camera_controller::free_camera::FreeCameraPlugin;
|
|
use bevy::image::{ImageAddressMode, ImagePlugin, ImageSamplerDescriptor};
|
|
use bevy::prelude::*;
|
|
#[cfg(feature = "debug_features")]
|
|
use bevy_egui::EguiPlugin;
|
|
#[cfg(feature = "debug_features")]
|
|
use bevy_inspector_egui::quick::WorldInspectorPlugin;
|
|
|
|
fn main() -> AppExit {
|
|
// A `Repeat` sampler so the tileable materials authored in the
|
|
// editor render the same way at runtime; Bevy's default
|
|
// `ClampToEdge` smears texture edges on brush geometry.
|
|
let default_plugins = DefaultPlugins
|
|
.set(ImagePlugin {
|
|
default_sampler: ImageSamplerDescriptor {
|
|
address_mode_u: ImageAddressMode::Repeat,
|
|
address_mode_v: ImageAddressMode::Repeat,
|
|
address_mode_w: ImageAddressMode::Repeat,
|
|
..ImageSamplerDescriptor::linear()
|
|
},
|
|
})
|
|
.set(AssetPlugin {
|
|
mode: Processed,
|
|
use_asset_processor_override: Some(cfg!(feature = "development")),
|
|
..default()
|
|
});
|
|
|
|
let mut app = App::new();
|
|
app.add_plugins(default_plugins)
|
|
.add_plugins(avian3d::prelude::PhysicsPlugins::default())
|
|
.add_plugins(shinespark::GamePlugin)
|
|
.insert_resource(Time::<Fixed>::from_hz(60.0));
|
|
|
|
#[cfg(feature = "debug_features")]
|
|
app.add_plugins((
|
|
FreeCameraPlugin,
|
|
EguiPlugin::default(),
|
|
WorldInspectorPlugin::default(),
|
|
));
|
|
|
|
app.run()
|
|
}
|