use bevy::prelude::*; use bevy::render::mesh::{Indices, Mesh, PrimitiveTopology}; use opensubdiv_petite::{far, tri_mesh_buffers}; use smooth_bevy_cameras::{ controllers::orbit::{OrbitCameraBundle, OrbitCameraController, OrbitCameraPlugin}, LookTransformPlugin, }; // Uniformly refine up to 'max level' of 3. static MAX_LEVEL: usize = 3; fn main() { App::new() .insert_resource(Msaa { samples: 4 }) .add_plugins(DefaultPlugins) .add_plugin(LookTransformPlugin) .add_plugin(OrbitCameraPlugin::default()) .add_startup_system(setup) .add_system(rotator_system) .add_system(bevy::window::close_on_esc) .run(); } /// this component indicates what entities should rotate #[derive(Component)] struct Rotator; /// rotates the parent, which will result in the child also rotating fn rotator_system(time: Res