pub struct ParticleLibrary { /* private fields */ }Expand description
Registry of named particle effects.
Implementations§
Source§impl ParticleLibrary
impl ParticleLibrary
pub fn new() -> Self
pub fn register(&mut self, effect: ParticleEffect)
pub fn get(&self, name: &str) -> Option<&ParticleEffect>
pub fn names(&self) -> Vec<&str>
Sourcepub fn instantiate(&self, name: &str) -> Option<ContinuousEmitter>
pub fn instantiate(&self, name: &str) -> Option<ContinuousEmitter>
Instantiate an effect into a ContinuousEmitter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParticleLibrary
impl RefUnwindSafe for ParticleLibrary
impl Send for ParticleLibrary
impl Sync for ParticleLibrary
impl Unpin for ParticleLibrary
impl UnsafeUnpin for ParticleLibrary
impl UnwindSafe for ParticleLibrary
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