pub enum StandardDynamicAsset {
File {
path: String,
},
Folder {
path: String,
},
Files {
paths: Vec<String>,
},
Image {
path: String,
sampler: ImageSamplerType,
wrap: ImageAddressModeType,
array_texture_layers: Option<u32>,
},
StandardMaterial {
path: String,
},
TextureAtlasLayout {
tile_size_x: u32,
tile_size_y: u32,
columns: u32,
rows: u32,
padding_x: Option<u32>,
padding_y: Option<u32>,
offset_x: Option<u32>,
offset_y: Option<u32>,
},
}
Available on crate feature
standard_dynamic_assets
only.Expand description
These asset variants can be loaded from configuration files. They will then replace a dynamic asset based on their keys.
Variants§
File
A dynamic asset directly loaded from a single file
Folder
A folder to load all including asset files from
Subdirectories are also included.
This is not supported for web builds! If you need compatibility with web builds,
consider using StandardDynamicAsset::Files
instead.
Files
A list of files to be loaded as a vector of handles
Image
An image asset
StandardMaterial
A dynamic standard material asset directly loaded from an image file
TextureAtlasLayout
A dynamic texture atlas asset loaded from a sprite sheet
Fields
Trait Implementations§
Source§impl Clone for StandardDynamicAsset
impl Clone for StandardDynamicAsset
Source§fn clone(&self) -> StandardDynamicAsset
fn clone(&self) -> StandardDynamicAsset
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StandardDynamicAsset
impl Debug for StandardDynamicAsset
Source§impl<'de> Deserialize<'de> for StandardDynamicAsset
impl<'de> Deserialize<'de> for StandardDynamicAsset
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DynamicAsset for StandardDynamicAsset
impl DynamicAsset for StandardDynamicAsset
Source§fn load(&self, asset_server: &AssetServer) -> Vec<UntypedHandle>
fn load(&self, asset_server: &AssetServer) -> Vec<UntypedHandle>
Return handles to all required asset paths
Source§impl PartialEq for StandardDynamicAsset
impl PartialEq for StandardDynamicAsset
Source§impl Serialize for StandardDynamicAsset
impl Serialize for StandardDynamicAsset
impl StructuralPartialEq for StandardDynamicAsset
Auto Trait Implementations§
impl Freeze for StandardDynamicAsset
impl RefUnwindSafe for StandardDynamicAsset
impl Send for StandardDynamicAsset
impl Sync for StandardDynamicAsset
impl Unpin for StandardDynamicAsset
impl UnwindSafe for StandardDynamicAsset
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> 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> 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn 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>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which 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)
Converts
&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)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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