Hausputz: UV-Doppel-Flip raus, tga::load → Result, hide_object entfernt
UVs laufen jetzt durchgehend in glTF-/tga-Konvention (der Flip-Hin-und- Zurück stammte vom gelöschten OBJ-Pfad). Kaputte Welt-Texturen fallen auf den Platzhalter statt zu panicken. Player::eye() statt vierfacher Augenpunkt-Rechnung. hide_object war ein irl3d-Demo-Relikt ohne Konsument. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -19,9 +19,9 @@ pub struct Image {
|
||||
pub rgba: Vec<u8>,
|
||||
}
|
||||
|
||||
pub fn load(path: &str) -> Image {
|
||||
let bytes = std::fs::read(path).unwrap_or_else(|e| panic!("tga load {path}: {e}"));
|
||||
decode(&bytes).unwrap_or_else(|e| panic!("tga decode {path}: {e}"))
|
||||
pub fn load(path: &str) -> Result<Image, String> {
|
||||
let bytes = std::fs::read(path).map_err(|e| format!("tga load {path}: {e}"))?;
|
||||
decode(&bytes).map_err(|e| format!("tga {path}: {e}"))
|
||||
}
|
||||
|
||||
pub fn decode(d: &[u8]) -> Result<Image, String> {
|
||||
|
||||
Reference in New Issue
Block a user