house
This commit is contained in:
17
Cargo.lock
generated
17
Cargo.lock
generated
@@ -2372,6 +2372,8 @@ dependencies = [
|
|||||||
"byteorder-lite",
|
"byteorder-lite",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"png",
|
"png",
|
||||||
|
"zune-core",
|
||||||
|
"zune-jpeg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4960,3 +4962,18 @@ dependencies = [
|
|||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zune-core"
|
||||||
|
version = "0.4.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zune-jpeg"
|
||||||
|
version = "0.4.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028"
|
||||||
|
dependencies = [
|
||||||
|
"zune-core",
|
||||||
|
]
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ version = "0.1.0"
|
|||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy = "0.15.3"
|
bevy = { version="0.15.3", features = ["jpeg"]}
|
||||||
bevy_asset_loader = { version ="0.22.0", features = ["standard_dynamic_assets"] }
|
bevy_asset_loader = { version ="0.22.0", features = ["standard_dynamic_assets"] }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
({
|
({
|
||||||
"lebron": File (path: "images/KingLebron.png"),
|
"lebron": File (path: "images/KingLebron.png"),
|
||||||
"wall": File (path: "meshes/wall.glb"),
|
"wall": File (path: "meshes/House.glb"),
|
||||||
})
|
})
|
||||||
|
|||||||
BIN
assets/meshes/House.glb
Normal file
BIN
assets/meshes/House.glb
Normal file
Binary file not shown.
@@ -13,8 +13,9 @@ pub(super) fn plugin(app: &mut App) {
|
|||||||
LoadingState::new(GameState::Loading)
|
LoadingState::new(GameState::Loading)
|
||||||
.continue_to_state(GameState::Menu)
|
.continue_to_state(GameState::Menu)
|
||||||
.with_dynamic_assets_file::<StandardDynamicAssetCollection>("main.assets.ron")
|
.with_dynamic_assets_file::<StandardDynamicAssetCollection>("main.assets.ron")
|
||||||
.load_collection::<ImageAssets>(), // .load_collection::<AudioAssets>()
|
.load_collection::<ImageAssets>()
|
||||||
// .load_collection::<GltfAssets>()
|
.load_collection::<GltfAssets>(),
|
||||||
|
// .load_collection::<AudioAssets>()
|
||||||
// .load_collection::<TextureAssets>()
|
// .load_collection::<TextureAssets>()
|
||||||
// .load_collection::<GrassAssets>()
|
// .load_collection::<GrassAssets>()
|
||||||
// .load_collection::<ConfigAssets>(),
|
// .load_collection::<ConfigAssets>(),
|
||||||
|
|||||||
@@ -3,17 +3,15 @@ use bevy::prelude::*;
|
|||||||
use crate::{asset_loading::GltfAssets, GameState};
|
use crate::{asset_loading::GltfAssets, GameState};
|
||||||
|
|
||||||
pub fn map_plugin(app: &mut App) {
|
pub fn map_plugin(app: &mut App) {
|
||||||
// app.add_systems(OnEnter(GameState::Playing), spawn_level);
|
app.add_systems(OnEnter(GameState::Playing), spawn_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn spawn_level(
|
fn spawn_level(
|
||||||
mut commands: Commands,
|
mut commands: Commands,
|
||||||
models: Res<Assets<Gltf>>,
|
models: Res<Assets<Gltf>>,
|
||||||
gltf_assets: Res<GltfAssets>) {
|
gltf_assets: Res<GltfAssets>
|
||||||
|
) {
|
||||||
let gltf = models.get(&gltf_assets.wall).unwrap();
|
let gltf = models.get(&gltf_assets.wall).unwrap();
|
||||||
|
|
||||||
// commands.spawn(SceneBundle {
|
commands.spawn(SceneRoot(gltf.scenes[0].clone()));
|
||||||
// scene: gltf.scenes[0].clone(),
|
|
||||||
// ..default()
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user