use bevy::{ prelude::*, window::{close_on_esc, WindowPlugin, WindowResolution}, }; use bevy_mod_paramap::*; fn main() { let mut app = App::new(); app.add_plugins( DefaultPlugins .set(WindowPlugin { primary_window: Some(Window { title: "simple cube".into(), resolution: WindowResolution::new(756., 574.), ..default() }), ..default() }) // Tell the asset server to watch for asset changes on disk: .set(AssetPlugin { watch_for_changes: !cfg!(target_arch = "wasm32"), ..default() }), ) .add_plugin(ParallaxMaterialPlugin) .insert_resource(AmbientLight { color: Color::WHITE, brightness: 0.2, }) .add_startup_system(setup) .add_system(spin_cube) .add_system(handle_camera) .add_system(close_on_esc); app.run(); } /// SPIN THE CUBE, SPIN IT! SPINNNN! #[derive(Component)] struct Spin; /// The camera, used to move camera on click. #[derive(Component)] struct OurCamera; fn spin_cube(time: Res