pub struct SkinData {
pub name: String,
pub attachments: Vec<HashMap<String, AttachmentData>>,
pub bones: Vec<usize>,
pub ik_constraints: Vec<usize>,
pub transform_constraints: Vec<usize>,
pub path_constraints: Vec<usize>,
pub physics_constraints: Vec<usize>,
pub slider_constraints: Vec<usize>,
}Fields§
§name: String§attachments: Vec<HashMap<String, AttachmentData>>§bones: Vec<usize>§ik_constraints: Vec<usize>§transform_constraints: Vec<usize>§path_constraints: Vec<usize>§physics_constraints: Vec<usize>§slider_constraints: Vec<usize>Implementations§
Source§impl SkinData
impl SkinData
Sourcepub fn new(name: impl Into<String>, slot_count: usize) -> Self
pub fn new(name: impl Into<String>, slot_count: usize) -> Self
Creates an empty skin with storage for slot_count slots.
This is intended for runtime composition use-cases (eg. “mix and match” skins).
Sourcepub fn add_skin(&mut self, other: &SkinData)
pub fn add_skin(&mut self, other: &SkinData)
Merges other into self (union of bones/constraints + last-write-wins attachments).
Mirrors the behaviour of the official runtimes’ Skin::addSkin.
pub fn attachment( &self, slot_index: usize, attachment_name: &str, ) -> Option<&AttachmentData>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SkinData
impl RefUnwindSafe for SkinData
impl Send for SkinData
impl Sync for SkinData
impl Unpin for SkinData
impl UnwindSafe for SkinData
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