Struct comfy_core::Assets
source · pub struct Assets {Show 15 fields
pub texture_send: Arc<Mutex<Sender<Vec<LoadRequest>>>>,
pub texture_recv: Arc<Mutex<Receiver<Vec<LoadRequest>>>>,
pub textures: HashMap<String, TextureHandle>,
pub texture_load_queue: Vec<(String, String)>,
pub texture_image_map: Arc<Mutex<HashMap<TextureHandle, DynamicImage>>>,
pub sound_load_queue: Vec<(String, String)>,
pub sound_ids: HashMap<String, Sound>,
pub sounds: Arc<Mutex<HashMap<Sound, StaticSoundData>>>,
pub sound_handles: HashMap<Sound, StaticSoundHandle>,
pub sound_groups: HashMap<String, Vec<Sound>>,
pub sound_send: Arc<Mutex<Sender<LoadSoundRequest>>>,
pub sound_recv: Arc<Mutex<Receiver<LoadSoundRequest>>>,
pub thread_pool: ThreadPool,
pub current_queue: Arc<Mutex<Option<TextureLoadQueue>>>,
pub asset_source: Option<AssetSource>,
}Fields§
§texture_send: Arc<Mutex<Sender<Vec<LoadRequest>>>>§texture_recv: Arc<Mutex<Receiver<Vec<LoadRequest>>>>§textures: HashMap<String, TextureHandle>§texture_load_queue: Vec<(String, String)>§texture_image_map: Arc<Mutex<HashMap<TextureHandle, DynamicImage>>>§sound_load_queue: Vec<(String, String)>§sound_ids: HashMap<String, Sound>§sounds: Arc<Mutex<HashMap<Sound, StaticSoundData>>>§sound_handles: HashMap<Sound, StaticSoundHandle>§sound_groups: HashMap<String, Vec<Sound>>§sound_send: Arc<Mutex<Sender<LoadSoundRequest>>>§sound_recv: Arc<Mutex<Receiver<LoadSoundRequest>>>§thread_pool: ThreadPool§current_queue: Arc<Mutex<Option<TextureLoadQueue>>>§asset_source: Option<AssetSource>Implementations§
source§impl Assets
impl Assets
pub fn new() -> Self
pub fn load_sound_from_bytes( &mut self, name: &str, bytes: &[u8], settings: StaticSoundSettings )
pub fn process_load_queue(&mut self)
pub fn process_sound_queue(&mut self)
pub fn handle_name(handle: TextureHandle) -> Option<String>
pub fn insert_handle(&mut self, name: &str, handle: TextureHandle)
pub fn get_texture(&self, key: &str) -> TextureHandle
pub fn image_size(handle: TextureHandle) -> Option<UVec2>
pub fn load_image_data( path: &str, texture: TextureHandle ) -> Option<DynamicImage>
pub fn error_loading_image(path: &str)
Auto Trait Implementations§
impl !RefUnwindSafe for Assets
impl Send for Assets
impl Sync for Assets
impl Unpin for Assets
impl !UnwindSafe for Assets
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