Skip to content

N43: pecs #1301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions content/news/043/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,29 @@ generated Metal/GLSL preview.
[web demo]: https://not-fl3.github.io/miniquad-samples/shadertoy_cross.html
[macroquad-shadertoy]: https://github.com/not-fl3/macroquad/blob/master/examples/shadertoy.rs

### [pecs]

![pecs example, same as in the README](pecs.png)
_Promise chaining example_

In the ECS environment, you can't use the standard async/await
approach, which can make implementing asynchronous logic painful.

[pecs] is a plugin for the [Bevy][bevy] engine that solves this problem.
It allows you to execute the code asynchronously by chaining multiple
promises as part of [Bevy's `ecs`][ecs] environment.

Each promise takes state and the result of the previous promise as arguments,
as well as any Bevy ECS system parameter, and passes the modified
state and new promise/result to the next promise. It's easy to register custom
promises that wait for user input, events, asset loading, and so on. You can
also use [pecs] to wait for any or all of multiple promises to complete
before continuing with the rest of the code, as well as to loop asynchronously
until a condition is met.

[pecs]: https://github.com/jkb0o/pecs
[ecs]: https://bevyengine.org/learn/book/getting-started/ecs

## Popular Workgroup Issues in Github

<!-- Up to 10 links to interesting issues -->
Expand Down
Binary file added content/news/043/pecs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.