pub fn add(
        &mut self,
        entity: Entity,
        sprite: &Sprite,
        texture: TextureHandle,
        texture_size: (f32, f32),
    ) -> Result<()> {
        let (mesh, material) = self.build_mesh_and_material(sprite, texture, texture_size);
        self.meshes.insert(entity, mesh)?;
        self.materials.insert(entity, material)?;
        Ok(())
    }
/// Adds a mesh and a material to an entity corresponding to the sprite and texture given.
/// Note that is you need to insert the same sprite and texture, using ``add_multiple`` allows for better performances.
Adds a mesh and a material to an entity corresponding to the sprite and texture given.
Note that is you need to insert the same sprite and texture, using ``add_multiple`` allows for better performances.
Adds a mesh and a material to an entity corresponding to the sprite and texture given . Note that is you need to insert the same sprite and texture using ` ` add_multiple ` ` allows for better performances .
pub fn add(
        &mut self,
        entity: Entity,
        sprite: &Sprite,
        texture: TextureHandle,
        texture_size: (f32, f32),
    ) -> Result<()> {
        let (mesh, material) = self.build_mesh_and_material(sprite, texture, texture_size);
        self.meshes.insert(entity, mesh)?;
        self.materials.insert(entity, material)?;
        Ok(())
    }
pub fn add ( & mut self , entity : Entity , sprite : & Sprite , texture : TextureHandle , texture_size : ( f32 , f32 ) , ) -> Result < ( ) > { let ( mesh , material ) = self . build_mesh_and_material ( sprite , texture , texture_size ) ; self . meshes . insert ( entity , mesh ) ? ; self . materials . insert ( entity , material ) ? ; Ok ( ( ) ) }
Adds a mesh and a material to an entity corresponding to the sprite and texture given.
Adds a mesh and a material to an entity corresponding to the sprite and texture given .
&mut self
entity
Entity
sprite
&Sprite
texture
TextureHandle
texture_size
(f32, f32)
&mut self
entity
Entity
sprite
&Sprite
texture
TextureHandle
texture_size
(f32, f32)