Skip to content

Releases: pmndrs/koota

v0.2.3 - Trust

05 Mar 23:30
Compare
Choose a tag to compare

This release fixes some bugs and adds a new method for entities for checking if they are alive.

entity.isAlive() // ture
entity.destroy()
entity.isAlive() // false

What's Changed

  • 🐛 core: query all removes destroyed entities by @krispya in #61
  • ✨ core: add isAlive method to entity by @krispya in #59
  • 🐛 core: query version was not incrementing on remove by @krispya in #60
  • ♻️ core: replace entity methods with functions internally by @krispya in #62

Full Changelog: v0.2.1...v0.2.3

v0.2.1 - Lemon Days

28 Feb 16:04
Compare
Choose a tag to compare

This release simply makes Koota compatible to install with React 18 or 19.

What's Changed

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

v0.2.0 - Words Without Sound

28 Feb 00:08
Compare
Choose a tag to compare

This release includes breaking changes so we are bumping to v0.2.0.

Querying the world with empty parameters now returns all queryable entities.
Previously querying a world with empty parameters (ie world.query()) would give empty results. But there was two problems, one this doesn't really follow set theory where the empty set is the set of all entities, but also there was no public API for getting all queryable entities. What we mean by queryable entities? Some entities are system level and cannot be queried, but will still show up in world.entities. This is any entity with the IsExcluded trait and includes entities that represent the world and any other abstract entity that comes up for future features. This will exclude these entities. Thank you @wrangelvid and @DanAmador for your help here!

world.spawn(Position)
world.entities.length // Is 2 since a system entity is create for world
world.query().length // Is 1 since the system entity is excluded

useQuery is immutable and more stable
Previously, useQuery returned a memoized array that was mutated with rerenders being triggered. However, this led to subtle bugs as it broke React's rules about immutable state so we fixed it. useQuery now returns a new array result each time it rerenders and effects will work as expected. Also, it will not longer rerender twice on first call even if the entities does not change.


What's Changed

  • 💥 core: queries with empty params return all queryable entities by @krispya in #45
  • 🔧 🐛 Peer dependencies are properly optional, including types by @krispya in #48
  • Update README.md by @stephencorwin in #51
  • 🐛 react: useQuery was unstable with the same params by @krispya in #52
  • Fix relation store get type with get method by @krispya in #56
  • Make useQuery immutable and more stable by @krispya in #55

New Contributors

Full Changelog: v0.1.12...v0.2.0

v0.1.12 - Cloak and Dagger

03 Jan 21:41
Compare
Choose a tag to compare

Quick bug fix release to fix my oopsie. Last one of the day... I hope!

What's Changed

  • 🐛 core: fix updateEach instability by @krispya in #44

Full Changelog: v0.1.11...v0.1.12

v0.1.11 - Come Around

03 Jan 21:25
d17fac8
Compare
Choose a tag to compare

The last couple releases revealed some long standing bugs nestled deep inside of core. Tests are now updated to root them out along with fixes. Happy coding everyone.

What's Changed

  • 🐛 core: fix entities sometimes not being destroyed properly by @krispya in #41
  • 🐛 core: entity get works with multi-generation entities again by @krispya in #42
  • 🐛 core: fix updateEach failing when it has a mix of tracked and untracked traits by @krispya in #43

Full Changelog: v0.1.10...v0.1.11

v0.1.10 - Sunday Night in Chicago

03 Jan 17:02
Compare
Choose a tag to compare

This is a quick maintenance release. The dist folders were getting polluted and I thought it might be causing bugs.

What's Changed

  • 💚 publish: fix dist being polluted by @krispya in #39

Full Changelog: v0.1.9...v0.1.10

v0.1.9 - Spatter/Splatter

03 Jan 15:29
Compare
Choose a tag to compare

The star update for this release is updateEach will now automatically turn on change detection when a trait is subscribed to with onChange or tracked with a query using the Changed modifier. You no longer need to manually configure the loop for useTrait to work!

What's Changed

  • ✨ core: auto change detection for updateEach by @krispya #38
  • 🏷️ core: wildcard string typed as '*' by @iwoplaza in #34
  • 🐛 core: entity.get always returns undefined for missing trait. by @iwoplaza in #33

Full Changelog: v0.1.8...v0.1.9

v0.1.8 - Lemon Day

01 Jan 20:08
Compare
Choose a tag to compare

Highlights here are updating useTrait to take undefined or null as its target so it can be used conditionally and then various fixes to types and internal edge cases. You'll notice Or is properly exported now!

What's Changed

  • 🐛 core: onChange properly registers traits being tracked by @krispya in #24
  • 🐛 core: export Or modifier by @krispya in #26
  • ✨ core: entity set can take a callback with previous state passed in by @krispya in #27
  • ✨ react: useTrait allows conditional targets by @krispya in #28
  • 🏷️ core: fix relation types by @krispya in #29
  • fix: Wildcard relation is a valid RelationTarget. by @iwoplaza in #32

New Contributors

Full Changelog: v0.1.7...v0.1.8

v0.1.7 - Satellite Anthem Icarus

29 Nov 02:32
Compare
Choose a tag to compare

A small maintenance release that fixes bugs with useTrait and action memoization.

What's Changed

  • 🐛 react: fix useTrait re-render issue with effects by @Ctrlmonster in #21
  • 🐛 core: multiple actions per world work again

Full Changelog: v0.1.6...v0.1.7

v0.1.6 - Lovers Melt

14 Nov 19:50
Compare
Choose a tag to compare

This update includes breaking changes to the React API.
We did some reshuffling to make working with React easier. Less code for more impact, and smarter separate of concerns. The docs and examples have been updated to reflect the changes! Also I am trying to submit all my changes as PRs now so hopefully logs will be more automatic in the future.

What's Changed

  • useObserve renamed to useTrait
  • useTraitEffect has been added to the React package
  • useEntityRef has been removed
  • createActions moved to core
  • useActions now takes actions returned by createActions, the same pattern as Zustand
  • ✨ react: useWorld uses a default world if there is no provider by @krispya in #18
  • 📝 update React docs by @krispya in #19

Full Changelog: v0.1.5...v0.1.6