With variations on this basic formula. I keep getting the error
Could not find an asset loader matching: Loader Name: None; Asset Type: None; Extension: None; Path: Some("models/ThunderBeat.png")
here's the code.
use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
// Load the GLB file
let glb_handle: Handle<Scene> = asset_server.load("models/ThunderBeat.png");
// Spawn the GLTF scene into the world
commands.spawn(SceneBundle {
scene: glb_handle,
..default()
});
// Add a camera
commands.spawn(Camera3dBundle {
transform: Transform::from_xyz(0.0, 5.0, 10.0).looking_at(Vec3::ZERO, Vec3::Y),
..default()
});
// Add a light source
commands.spawn(PointLightBundle {
transform: Transform::from_xyz(4.0, 8.0, 4.0),
..default()
});
}