pub struct AvatarPart {
pub id: StructuredId,
pub slot: AvatarSlot,
pub display_name: String,
pub tint: [f32; 4],
pub owned_by_default: bool,
pub mesh: Option<String>,
pub sprite: Option<String>,
pub sorting_order: i32,
}Expand description
A catalog entry: one wearable/biological part, with its 3D and 2D assets.
Asset references are abstract string keys here — the renderer resolves them
to a mesh/material or a sprite. (The Unity package held GameObject/Sprite
directly; the Rust engine loads by key.)
Fields§
§id: StructuredId§slot: AvatarSlot§display_name: String§tint: [f32; 4]Tint applied to the part (skin tone, hair color, …). RGBA 0..1.
owned_by_default: boolfalse = locked until granted (SkinCard / NFT / account).
mesh: Option<String>3D asset key (mesh + material), if this part has a 3D form.
sprite: Option<String>2D asset key (sprite), if this part has a 2D form.
sorting_order: i32Layer order for the 2D sprite stack (back-to-front).
Implementations§
Source§impl AvatarPart
impl AvatarPart
Sourcepub fn mesh_part(
id: StructuredId,
slot: AvatarSlot,
name: &str,
mesh: &str,
) -> Self
pub fn mesh_part( id: StructuredId, slot: AvatarSlot, name: &str, mesh: &str, ) -> Self
A minimal 3D part.
Trait Implementations§
Source§impl Clone for AvatarPart
impl Clone for AvatarPart
Auto Trait Implementations§
impl Freeze for AvatarPart
impl RefUnwindSafe for AvatarPart
impl Send for AvatarPart
impl Sync for AvatarPart
impl Unpin for AvatarPart
impl UnsafeUnpin for AvatarPart
impl UnwindSafe for AvatarPart
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