fix bevy_embedded_assets not finding '../textures' by moving it into models/

This commit is contained in:
yuni 2024-10-05 03:55:15 +02:00
parent 2873894003
commit bfc5e2666a
22 changed files with 9 additions and 9 deletions

View file

@ -75,7 +75,7 @@
{ {
"mimeType":"image/jpeg", "mimeType":"image/jpeg",
"name":"mercury", "name":"mercury",
"uri":"../textures/mercury.jpg" "uri":"textures/mercury.jpg"
} }
], ],
"accessors":[ "accessors":[

View file

@ -1936,22 +1936,22 @@
{ {
"mimeType":"image/jpeg", "mimeType":"image/jpeg",
"name":"mercury", "name":"mercury",
"uri":"../textures/mercury.jpg" "uri":"textures/mercury.jpg"
}, },
{ {
"mimeType":"image/jpeg", "mimeType":"image/jpeg",
"name":"solarpanel", "name":"solarpanel",
"uri":"../textures/solarpanel.jpg" "uri":"textures/solarpanel.jpg"
}, },
{ {
"mimeType":"image/jpeg", "mimeType":"image/jpeg",
"name":"metal", "name":"metal",
"uri":"../textures/metal.jpg" "uri":"textures/metal.jpg"
}, },
{ {
"mimeType":"image/jpeg", "mimeType":"image/jpeg",
"name":"plant", "name":"plant",
"uri":"../textures/plant.jpg" "uri":"textures/plant.jpg"
} }
], ],
"accessors":[ "accessors":[

View file

@ -299,7 +299,7 @@
{ {
"mimeType":"image/jpeg", "mimeType":"image/jpeg",
"name":"solarpanel", "name":"solarpanel",
"uri":"../textures/solarpanel.jpg" "uri":"textures/solarpanel.jpg"
} }
], ],
"accessors":[ "accessors":[

View file

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View file

Before

Width:  |  Height:  |  Size: 770 KiB

After

Width:  |  Height:  |  Size: 770 KiB

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View file

Before

Width:  |  Height:  |  Size: 2 MiB

After

Width:  |  Height:  |  Size: 2 MiB

View file

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View file

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 180 KiB

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View file

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View file

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View file

Before

Width:  |  Height:  |  Size: 332 KiB

After

Width:  |  Height:  |  Size: 332 KiB

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

@ -84,7 +84,7 @@
{ {
"mimeType":"image/jpeg", "mimeType":"image/jpeg",
"name":"mercury", "name":"mercury",
"uri":"../textures/mercury.jpg" "uri":"textures/mercury.jpg"
} }
], ],
"accessors":[ "accessors":[

View file

@ -908,7 +908,7 @@ fn spawn_entities(
actor.insert(Position::from(absolute_pos)); actor.insert(Position::from(absolute_pos));
if state.is_sphere { if state.is_sphere {
let sphere_texture_handle = if let Some(model) = &state.model { let sphere_texture_handle = if let Some(model) = &state.model {
Some(asset_server.load(format!("textures/{}.jpg", model))) Some(asset_server.load(format!("models/textures/{}.jpg", model)))
} else { } else {
None None
}; };

View file

@ -171,7 +171,7 @@ pub fn spawn_effects(
)); ));
} }
Effects::ThrusterParticle(pos, v) => { Effects::ThrusterParticle(pos, v) => {
let texture = asset_server.load("textures/exhaust.png"); let texture = asset_server.load("models/textures/exhaust.png");
commands.spawn(( commands.spawn((
IsEffect, IsEffect,
hud::ToggleableHudElement, hud::ToggleableHudElement,