use bevy::{core_pipeline::bloom::BloomSettings, prelude::*}; use bevy_vox_scene::VoxScenePlugin; use utilities::{PanOrbitCamera, PanOrbitCameraPlugin}; fn main() { App::new() .add_plugins(( DefaultPlugins, PanOrbitCameraPlugin, VoxScenePlugin::default(), )) .add_systems(Startup, setup) .run(); } fn setup(mut commands: Commands, assets: Res) { // An hdr and bloom-enabled camera is needed to create the emissive glowing effect commands.spawn(( Camera3dBundle { camera: Camera { hdr: true, ..Default::default() }, transform: Transform::from_xyz(-20.0, 10.0, 60.0).looking_at(Vec3::ZERO, Vec3::Y), ..Default::default() }, PanOrbitCamera::default(), BloomSettings { intensity: 0.3, ..default() }, EnvironmentMapLight { diffuse_map: assets.load("pisa_diffuse.ktx2"), specular_map: assets.load("pisa_specular.ktx2"), intensity: 500.0, }, )); commands.spawn(SceneBundle { // Load a single model using the name assigned to it in MagicaVoxel scene: assets.load("study.vox#workstation/computer"), ..default() }); }