pub struct WebLayer2D { /* private fields */ }
Implementations§
Source§impl WebLayer2D
impl WebLayer2D
pub fn new( id: LayerID, dimensions: PhysicalSize<u32>, textures: Vec<WebTexture2D>, device: &Device, queue: &Queue, bind_group_layout: &BindGroupLayout, texture_size: PhysicalSize<u32>, pixel_art: bool, ) -> Result<Self>
pub fn tex_coord_size(&self) -> PhysicalSize<f32>
pub fn id(&self) -> LayerID
pub fn contains_texture(&self, texture_id: &TextureID) -> bool
pub fn texture_ids<'a>(&'a self) -> Keys<'a, TextureID, WebTexture2D>
pub fn vertex_buffer(&self) -> BufferSlice<'_>
pub fn entity_buffer(&self) -> Option<BufferSlice<'_>>
pub fn index_count(&self) -> usize
pub fn entity_count(&self) -> usize
pub fn entity_maximum(&self) -> usize
pub fn get_texture(&self, id: TextureID) -> Option<&WebTexture2D>
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn bind_group(&self) -> &BindGroup
pub fn atlas_dimensions(&self) -> PhysicalSize<u32>
Auto Trait Implementations§
impl !Freeze for WebLayer2D
impl !RefUnwindSafe for WebLayer2D
impl Send for WebLayer2D
impl Sync for WebLayer2D
impl Unpin for WebLayer2D
impl !UnwindSafe for WebLayer2D
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.