Crate veloren_common_assets

Source
Expand description

Load assets (images or voxel data) from files

Modules§

fs 🔒
loader
Generic asset loading definition
plugin_cache 🔒
source
Bytes sources to load assets from.
walk 🔒

Structs§

ASSETS 🔒
The HashMap where all loaded assets are stored in.
ASSETS_PATH
Lazy static to find and cache where the asset directory is. Cases we need to account for:
AnyCache
A non-generic version of [AssetCache].
AssetCache
The main structure of this crate, used to cache assets.
BincodeLoader
Loads assets from Bincode encoded files.
BytesLoader
Loads assets as raw bytes.
DotVoxAsset
DotVoxLoader
Error
The error type which is used when loading an asset.
Image
ImageLoader
JsonLoader
Loads assets from JSON files.
LoadFrom
Loads assets from another type.
MultiRon
This wrapper combines several RON files from multiple sources
ObjAsset
ObjAssetLoader
Ron
Loads a value from a JSON file.
RonLoader
Loads assets from RON files.
SharedString
A string that can easily be shared.
StringLoader
Loads assets as a String.

Enums§

Walk
Represent tree of directory, result of [generate_tree].

Traits§

Asset
An asset is a type loadable from raw bytes.
AssetCombined
Extension to AssetExt to combine Ron files from filesystem and plugins
AssetExt
The Asset trait, which is implemented by all structures that have their data stored in the filesystem.
CacheCombined
Extension to AnyCache to combine Ron files from filesystem and plugins
Compound
An asset type that can load other kinds of assets.
Concatenate
DirLoadable
Assets that are loadable from directories
Loader
Specifies how an asset is loaded.
Source
Bytes sources to load assets from.

Functions§

find_root
Return path to repository root by searching 10 directories back
load_rec_dir
Loads directory and all files in it
register_tar
start_hot_reloading
walk_tree
Helper function to Walk::generate(), prefer using it instead.

Type Aliases§

AssetDirHandle
AssetHandle
AssetReadGuard
BoxedError
A boxed error
ReloadWatcher