From d022549a761ff32d5d0c4c1eb9089b134c3dce8c Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 28 Sep 2023 18:36:51 -0700 Subject: [PATCH] fix decal Color3 --- src/load_roblox.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/load_roblox.rs b/src/load_roblox.rs index 4554b0b..823746d 100644 --- a/src/load_roblox.rs +++ b/src/load_roblox.rs @@ -151,12 +151,12 @@ pub fn generate_indexed_models_roblox(dom:rbx_dom_weak::WeakDom) -> Result<(Inde if let ( Some(rbx_dom_weak::types::Variant::Content(content)), Some(rbx_dom_weak::types::Variant::Enum(normalid)), - Some(rbx_dom_weak::types::Variant::Color3uint8(decal_color3)), + Some(rbx_dom_weak::types::Variant::Color3(decal_color3)), Some(rbx_dom_weak::types::Variant::Float32(decal_transparency)), ) = ( decal.properties.get("Texture"), decal.properties.get("Face"), - decal.properties.get("Color"), + decal.properties.get("Color3"), decal.properties.get("Transparency"), ) { if let Ok(asset_id)=content.clone().into_string().parse::(){ @@ -199,7 +199,7 @@ pub fn generate_indexed_models_roblox(dom:rbx_dom_weak::WeakDom) -> Result<(Inde offset_u:*ox/(*sx),offset_v:*oy/(*sy), scale_u:size_u/(*sx),scale_v:size_v/(*sy), }; - roblox_texture_color=glam::vec4(decal_color3.r as f32/255f32, decal_color3.g as f32/255f32, decal_color3.b as f32/255f32, 1.0-*decal_transparency); + roblox_texture_color=glam::vec4(decal_color3.r,decal_color3.g,decal_color3.b,1.0-*decal_transparency); } } part_texture_description[face as usize]=Some(RobloxFaceTextureDescription{