pub struct Library {
pub meshes: BTreeMap<MeshId, Mesh>,
pub skeletons: BTreeMap<SkeletonId, Skeleton>,
pub animations: BTreeMap<AnimationId, Animation>,
pub materials: BTreeMap<MaterialId, Material>,
pub tilesets: BTreeMap<TileSetId, TileSet>,
pub tilemaps: BTreeMap<TileMapId, TileMap>,
/* private fields */
}Expand description
Reusable asset store: everything a scene node can reference.
Fields§
§meshes: BTreeMap<MeshId, Mesh>§skeletons: BTreeMap<SkeletonId, Skeleton>§animations: BTreeMap<AnimationId, Animation>§materials: BTreeMap<MaterialId, Material>§tilesets: BTreeMap<TileSetId, TileSet>§tilemaps: BTreeMap<TileMapId, TileMap>Implementations§
Source§impl Library
impl Library
pub fn add_mesh(&mut self, mesh: Mesh) -> MeshId
pub fn add_skeleton(&mut self, sk: Skeleton) -> SkeletonId
pub fn add_animation(&mut self, anim: Animation) -> AnimationId
pub fn add_material(&mut self, mat: Material) -> MaterialId
pub fn add_tileset(&mut self, ts: TileSet) -> TileSetId
pub fn add_tilemap(&mut self, tm: TileMap) -> TileMapId
Sourcepub fn duplicate_mesh(&mut self, id: MeshId) -> Result<MeshId>
pub fn duplicate_mesh(&mut self, id: MeshId) -> Result<MeshId>
Copy an asset under a fresh id (so instances can be edited independently).
pub fn duplicate_skeleton(&mut self, id: SkeletonId) -> Result<SkeletonId>
pub fn duplicate_animation(&mut self, id: AnimationId) -> Result<AnimationId>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Library
impl<'de> Deserialize<'de> for Library
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
impl StructuralPartialEq for Library
Auto Trait Implementations§
impl Freeze for Library
impl RefUnwindSafe for Library
impl Send for Library
impl Sync for Library
impl Unpin for Library
impl UnsafeUnpin for Library
impl UnwindSafe for Library
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