Skip to content

Commit 28f6240

Browse files
N22: bevy_asset_loader (#655)
* Add a section about bevy_asset_loader * Note future plans for loading more complex assets Co-authored-by: Forest Anderson <[email protected]>
1 parent 65e5eb3 commit 28f6240

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
public/
2+
.idea/
121 KB
Loading

content/news/022/index.md

+25
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,31 @@ The [current release] focuses on furniture.
304304
[Orchaldir]: https://github.com/Orchaldir
305305
[current release]: https://github.com/Orchaldir/texture_generator/projects/8
306306

307+
### [bevy_asset_loader]
308+
309+
![Configuring two asset collections](bevy_asset_loader.png)
310+
311+
`bevy_asset_loader` by [@nikl_me] is a plugin for [Bevy][bevy] apps aiming to
312+
improve a common pattern for asset-loading. The boilerplate required to load
313+
assets during a "loading state" is reduced to a minimum. At the same time, the
314+
plugin brings together the internal names of assets and their filepath, making
315+
it easier to add new assets and to keep an overview over already existing ones.
316+
317+
The library introduces the `AssetCollection` trait that can be derived. Any
318+
number of asset collections can be loaded by a single `AssetLoader` during a
319+
configured app state. When all assets are loaded, the collections will be
320+
inserted into Bevy's ECS as resources. Afterwards, the `AssetLoader` will
321+
switch into a second configurable app state. At this point, your app can use
322+
the asset collections that now contain loaded asset handles.
323+
324+
Currently, a single file always corresponds to one asset and more complex
325+
assets like e.g. `TextureAtlas` are not yet supported. There are plans to
326+
extend the `asset` attribute to allow loading more complex assets. Stay tuned!
327+
328+
[bevy_asset_loader]: https://github.com/NiklasEi/bevy_asset_loader
329+
[bevy]: https://github.com/bevyengine/bevy
330+
[@nikl_me]: https://twitter.com/nikl_me
331+
307332
## Popular Workgroup Issues in Github
308333

309334
<!-- Up to 10 links to interesting issues -->

0 commit comments

Comments
 (0)