pub struct PartMaterial {
pub texture: Option<TextureRecipe>,
pub color: [f32; 4],
pub emissive: f32,
pub resolution: Option<u32>,
pub uv: String,
pub uv_scale: f32,
pub name: String,
}Expand description
A part’s PBR material: a procedural recipe plus the knobs a renderer applies on top of the baked maps.
Fields§
§texture: Option<TextureRecipe>The bakeable recipe (albedo ramp, normal height, roughness/metallic bands, AO). Absent → a plain tinted surface.
color: [f32; 4]Multiplied over the baked base color — one recipe, many tints.
emissive: f32Glow strength (0 = lit normally).
resolution: Option<u32>Meshing density for this part’s carve (default 40, cap 96).
uv: StringUV projection: auto (default — cylindrical for lathes and rotational
prims, spherical for spheres, box otherwise), box, cylindrical,
spherical.
uv_scale: f32Texture repeats per metre (UV scale). Default 0.5.
name: StringTrait Implementations§
Source§impl Clone for PartMaterial
impl Clone for PartMaterial
Source§impl Debug for PartMaterial
impl Debug for PartMaterial
Source§impl Default for PartMaterial
impl Default for PartMaterial
Source§impl<'de> Deserialize<'de> for PartMaterial
impl<'de> Deserialize<'de> for PartMaterial
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PartMaterial
impl PartialEq for PartMaterial
Source§impl Serialize for PartMaterial
impl Serialize for PartMaterial
impl StructuralPartialEq for PartMaterial
Auto Trait Implementations§
impl Freeze for PartMaterial
impl RefUnwindSafe for PartMaterial
impl Send for PartMaterial
impl Sync for PartMaterial
impl Unpin for PartMaterial
impl UnsafeUnpin for PartMaterial
impl UnwindSafe for PartMaterial
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more