Struct bevy::prelude::SpriteSheetBundle

pub struct SpriteSheetBundle {
    pub sprite: Sprite,
    pub transform: Transform,
    pub global_transform: GlobalTransform,
    pub texture: Handle<Image>,
    pub atlas: TextureAtlas,
    pub visibility: Visibility,
    pub inherited_visibility: InheritedVisibility,
    pub view_visibility: ViewVisibility,
}
๐Ÿ‘ŽDeprecated since 0.14.0: Use TextureAtlas alongside a SpriteBundle instead
Expand description

A Bundle of components for drawing a single sprite from a sprite sheet (also referred to as a TextureAtlas) or for animated sprites.

Note: This bundle is identical to SpriteBundle with an additional TextureAtlas component.

Check the following examples for usage:

Fieldsยง

ยงsprite: Sprite
๐Ÿ‘ŽDeprecated since 0.14.0: Use TextureAtlas alongside a SpriteBundle instead

Specifies the rendering properties of the sprite, such as color tint and flip.

ยงtransform: Transform
๐Ÿ‘ŽDeprecated since 0.14.0: Use TextureAtlas alongside a SpriteBundle instead

The local transform of the sprite, relative to its parent.

ยงglobal_transform: GlobalTransform
๐Ÿ‘ŽDeprecated since 0.14.0: Use TextureAtlas alongside a SpriteBundle instead

The absolute transform of the sprite. This should generally not be written to directly.

ยงtexture: Handle<Image>
๐Ÿ‘ŽDeprecated since 0.14.0: Use TextureAtlas alongside a SpriteBundle instead

The sprite sheet base texture

ยงatlas: TextureAtlas
๐Ÿ‘ŽDeprecated since 0.14.0: Use TextureAtlas alongside a SpriteBundle instead

The sprite sheet texture atlas, allowing to draw a custom section of texture.

ยงvisibility: Visibility
๐Ÿ‘ŽDeprecated since 0.14.0: Use TextureAtlas alongside a SpriteBundle instead

User indication of whether an entity is visible

ยงinherited_visibility: InheritedVisibility
๐Ÿ‘ŽDeprecated since 0.14.0: Use TextureAtlas alongside a SpriteBundle instead

Inherited visibility of an entity.

ยงview_visibility: ViewVisibility
๐Ÿ‘ŽDeprecated since 0.14.0: Use TextureAtlas alongside a SpriteBundle instead

Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering

Trait Implementationsยง

ยง

impl Clone for SpriteSheetBundle

ยง

fn clone(&self) -> SpriteSheetBundle

Returns a copy of the value. Read more
1.0.0 ยท sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
ยง

impl Debug for SpriteSheetBundle

ยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
ยง

impl Default for SpriteSheetBundle

ยง

fn default() -> SpriteSheetBundle

Returns the โ€œdefault valueโ€ for a type. Read more
ยง

impl Bundle for SpriteSheetBundle

ยง

impl DynamicBundle for SpriteSheetBundle

Auto Trait Implementationsยง

Blanket Implementationsยง

sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
ยง

impl<T, U> AsBindGroupShaderType<U> for T
where U: ShaderType, &'a T: for<'a> Into<U>,

ยง

fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U

Return the T ShaderType for self. When used in AsBindGroup derives, it is safe to assume that all images in self exist.
sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
ยง

impl<T> Downcast<T> for T

ยง

fn downcast(&self) -> &T

ยง

impl<T> Downcast for T
where T: 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.
ยง

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.
ยง

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.
ยง

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.
ยง

impl<T> DowncastSync for T
where T: Any + Send + Sync,

ยง

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
sourceยง

impl<T> From<T> for T

sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

ยง

impl<S> FromSample<S> for S

ยง

fn from_sample_(s: S) -> S

ยง

impl<T> FromWorld for T
where T: Default,

ยง

fn from_world(_world: &mut World) -> T

Creates Self using data from the given World.
ยง

impl<T> Instrument for T

ยง

fn instrument(self, span: Span) -> Instrumented<Self> โ“˜

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
ยง

fn in_current_span(self) -> Instrumented<Self> โ“˜

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

sourceยง

impl<T> IntoEither for T

sourceยง

fn into_either(self, into_left: bool) -> Either<Self, Self> โ“˜

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ“˜
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
ยง

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

ยง

fn into_sample(self) -> T

ยง

impl<T> NoneValue for T
where T: Default,

ยง

type NoneType = T

ยง

fn null_value() -> T

The none-equivalent value.
ยง

impl<T> Pointable for T

ยง

const ALIGN: usize = _

The alignment of pointer.
ยง

type Init = T

The type for initializers.
ยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
ยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
ยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
ยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
sourceยง

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

sourceยง

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
sourceยง

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
sourceยง

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
sourceยง

impl<T> Same for T

ยง

type Output = T

Should always be Self
sourceยง

impl<T> ToOwned for T
where T: Clone,

ยง

type Owned = T

The resulting type after obtaining ownership.
sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
ยง

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

ยง

fn to_sample_(self) -> U

sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

ยง

type Error = Infallible

The type returned in the event of a conversion error.
sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

ยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
ยง

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

ยง

impl<T> Upcast<T> for T

ยง

fn upcast(&self) -> Option<&T>

ยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

ยง

fn vzip(self) -> V

ยง

impl<T> WithSubscriber for T

ยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> โ“˜
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
ยง

fn with_current_subscriber(self) -> WithDispatch<Self> โ“˜

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
ยง

impl<T> ConditionalSend for T
where T: Send,

ยง

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

ยง

impl<T> Settings for T
where T: 'static + Send + Sync,

ยง

impl<T> WasmNotSend for T
where T: Send,

ยง

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

ยง

impl<T> WasmNotSync for T
where T: Sync,