Skip to content

Releases: jkb0o/pecs

v0.6.0

18 Mar 10:23
Compare
Choose a tag to compare

Update to bevy-0.13
Full Changelog: v0.5.0...v0.6.0

v0.5.0

21 Nov 14:27
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.4.0...v0.5.0

v0.4.0

25 Jul 12:13
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.3.0...v0.4.0

v0.3.0

21 Mar 10:27
Compare
Choose a tag to compare

Update to bevy 0.10

v0.2.3

13 Mar 09:40
Compare
Choose a tag to compare
  • Add wasm support (for http as well).

v0.2.1

17 Feb 07:25
Compare
Choose a tag to compare

Summary

  • the state inside asyn! is not mutable by default
  • the result arg in the asyn! may be omited
  • () now implements Into<PromiseResult>, you can return nothing from asyn!
  • add Asyn![R, S => R2, S2] macro for simplify the asyn! signature writing
  • add PromiseLike trait to group the API of promise-like constructs (then, map, ect)
  • Promise is PromiseLike itself
  • promises created from commands.promise(...) are PromiseLike, so you can chain
  • add Promise::repeat you can create async loops
  • PromiseState impl Deref/DerefMut for its value
  • add basic asyn::ui ops (awaiting for button presses)
  • more docs
  • add combine_vecs example to show how any/all works with Vec<Promise>
  • add repeat example to show how async loops work
  • add confirmation complex example to show how async ui could work
  • add system_state example to show how system params keep state between calls

Detailed

  • () now implements Into<PromiseResult>, you can return nothing from asyn!
commands.add(
  Promise::start(asyn! {
    // resolves as PromiseResult::Resolve((), ())
    info!("First call");
  })
  .then(asyn! {
    info!("Second call");
  });
  • promises created from commands.promise(...) are PromiseLike, so you can chain
// create new promise with state 0
commands
  .promise(|| 0)
  .then(asyn!(state => {
    state.value += 1;
    state.asyn().timeout(1.0)
  }))
  .then(asyn!(state => {
    info!("count: {}", state.value);
  }));  // promises execution scheduled here
  • add Promise::repeat you can create async loops
// wait 3 times and exit
commands
    .promise(|| 3)
    .then_repeat(asyn!( state => {
        info!("{}", state.value);
        state.value -= 1;
        let done = state.value == 0;
        state.asyn().timeout(1.0).with_result(if done {
        Repeat::Break(())
        } else {
        Repeat::Continue
        })
    }))
    .then(asyn!(_ => {
        asyn::app::exit()
    }));

Full Changelog: v0.2.0...v0.2.1

v0.2.0

12 Feb 09:46
Compare
Choose a tag to compare

What's Changed

  • simplify promise to Promise<S, R> (state, result)
  • only Promise::then() left for chaining
  • only Promise::resolve(r)/PromiseState::resolve(r) left for resolving
  • no error mapping anymore
  • no .err()/.ok()/.reject()
  • fix the Promise::map()/with()/map_result()/with_result() workflow
  • any/all implementations for Vec<Promise> bypasses its states when resolving
  • Fix typos and grammar issues in README by @alice-i-cecile in #2

New Contributors

Full Changelog: v0.1.2...v0.2.0