mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 09:00:02 +00:00
Update changelog
This commit is contained in:
parent
042903df93
commit
dec958b058
3 changed files with 208 additions and 195 deletions
396
CHANGELOG.md
396
CHANGELOG.md
|
@ -1,192 +1,204 @@
|
||||||
# Jecs Changelog
|
# Jecs Changelog
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog][kac], and this project adheres to
|
The format is based on [Keep a Changelog][kac], and this project adheres to
|
||||||
[Semantic Versioning][semver].
|
[Semantic Versioning][semver].
|
||||||
|
|
||||||
[kac]: https://keepachangelog.com/en/1.1.0/
|
[kac]: https://keepachangelog.com/en/1.1.0/
|
||||||
[semver]: https://semver.org/spec/v2.0.0.html
|
[semver]: https://semver.org/spec/v2.0.0.html
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- `[query]`:
|
- `[world]`:
|
||||||
- Fixed bug where `world:clear` did not invoke `jecs.OnRemove` hooks
|
- 16% faster `world:get`
|
||||||
- Changed `query.__iter` to drain on iteration
|
- `[typescript]`
|
||||||
- It will initialize once wherever you left iteration off at last time
|
|
||||||
- Changed `query:iter` to restart the iterator
|
- Fixed Entity type to default to `undefined | unknown` instead of just `undefined`
|
||||||
- Removed `query:drain` and `query:next`
|
|
||||||
- If you want to get individual results outside of a for-loop, you need to call `query:iter` to initialize the iterator and then call the iterator function manually
|
- `[query]`:
|
||||||
```lua
|
- Fixed bug where `world:clear` did not invoke `jecs.OnRemove` hooks
|
||||||
local it = world:query(A, B, C):iter()
|
- Changed `query.__iter` to drain on iteration
|
||||||
local entity, a, b, c = it()
|
- It will initialize once wherever you left iteration off at last time
|
||||||
entity, a, b, c = it() -- get next results
|
- Changed `query:iter` to restart the iterator
|
||||||
```
|
- Removed `query:drain` and `query:next`
|
||||||
- `[world`
|
- If you want to get individual results outside of a for-loop, you need to call `query:iter` to initialize the iterator and then call the iterator function manually
|
||||||
- Fixed a bug with `world:clear` not invoking `jecs.OnRemove` hooks
|
```lua
|
||||||
- `[typescript]`:
|
local it = world:query(A, B, C):iter()
|
||||||
- Changed pair to accept generics
|
local entity, a, b, c = it()
|
||||||
- Improved handling of Tags
|
entity, a, b, c = it() -- get next results
|
||||||
|
```
|
||||||
## [0.3.2] - 2024-10-01
|
- `[world`
|
||||||
|
- Fixed a bug with `world:clear` not invoking `jecs.OnRemove` hooks
|
||||||
- `[world]`:
|
- `[typescript]`:
|
||||||
- Changed `world:cleanup` to traverse a header type for graph edges. (Edit)
|
- Changed pair to accept generics
|
||||||
- Fixed a regression that occurred when you call `world:set` following a `world:remove` using the same component
|
- Improved handling of Tags
|
||||||
- Remove explicit error in JECS_DEBUG for `world:target` when not applying an index parameter
|
|
||||||
- `[typescript]` :
|
## [0.3.2] - 2024-10-01
|
||||||
- Fixed `world.set` with NoInfer<T>
|
|
||||||
|
- `[world]`:
|
||||||
## [0.3.1] - 2024-10-01
|
- Changed `world:cleanup` to traverse a header type for graph edges. (Edit)
|
||||||
|
- Fixed a regression that occurred when you call `world:set` following a `world:remove` using the same component
|
||||||
- `[world]`:
|
- Remove explicit error in JECS_DEBUG for `world:target` when not applying an index parameter
|
||||||
- Added an index parameter to `world:target`
|
- `[typescript]` :
|
||||||
- Added a way to change the components limit via `_G.JECS_HI_COMPONENT_ID`
|
- Fixed `world.set` with NoInfer<T>
|
||||||
- Set it to whatever number you want but try to make it as close to the number of components you will use as possible
|
|
||||||
- Make sure to set this before importing jecs or else it will not work
|
## [0.3.1] - 2024-10-01
|
||||||
- Added debug mode, enable via setting `_G.JECS_DEBUG` to true
|
|
||||||
- Make sure to set this before importing jecs or else it will not work
|
- `[world]`:
|
||||||
- Added `world:cleanup` which is called to cleanup empty archetypes manually
|
- Added an index parameter to `world:target`
|
||||||
- Changed `world:delete` to delete archetypes that are dependent on the passed entity
|
- Added a way to change the components limit via `_G.JECS_HI_COMPONENT_ID`
|
||||||
- Changed `world:delete` to delete entity's children before the entity to prevent cycles
|
- Set it to whatever number you want but try to make it as close to the number of components you will use as possible
|
||||||
- `[query]`:
|
- Make sure to set this before importing jecs or else it will not work
|
||||||
- Fixed the iterator to not drain by default
|
- Added debug mode, enable via setting `_G.JECS_DEBUG` to true
|
||||||
- `[typescript]`
|
- Make sure to set this before importing jecs or else it will not work
|
||||||
- Fixed entry point of the package.json file to be `src` rather than `src/init`
|
- Added `world:cleanup` which is called to cleanup empty archetypes manually
|
||||||
- Fixed `query.next` returning a query object whereas it would be expected to return a tuple containing the entity and the corresponding component values
|
- Changed `world:delete` to delete archetypes that are dependent on the passed entity
|
||||||
- Exported `query.archetypes`
|
- Changed `world:delete` to delete entity's children before the entity to prevent cycles
|
||||||
- Changed `pair` to return a number instead of an entity
|
- `[query]`:
|
||||||
- Preventing direct usage of a pair as an entity while still allowing it to be used as a component
|
- Fixed the iterator to not drain by default
|
||||||
- Exported built-in components `ChildOf` and `Name`
|
- `[typescript]`
|
||||||
- Exported `world.parent`
|
- Fixed entry point of the package.json file to be `src` rather than `src/init`
|
||||||
|
- Fixed `query.next` returning a query object whereas it would be expected to return a tuple containing the entity and the corresponding component values
|
||||||
## [0.2.10] - 2024-09-07
|
- Exported `query.archetypes`
|
||||||
|
- Changed `pair` to return a number instead of an entity
|
||||||
- `[world]`:
|
- Preventing direct usage of a pair as an entity while still allowing it to be used as a component
|
||||||
- Improved performance for hooks
|
- Exported built-in components `ChildOf` and `Name`
|
||||||
- Changed `world:set` to be idempotent when setting tags
|
- Exported `world.parent`
|
||||||
- `[traits]`:
|
|
||||||
- Added cleanup condition `jecs.OnDelete` for when the entity or component is deleted
|
## [0.2.10] - 2024-09-07
|
||||||
- Added cleanup action `jecs.Remove` which removes instances of the specified (component) id from all entities
|
|
||||||
- This is the default cleanup action
|
- `[world]`:
|
||||||
- Added component trait `jecs.Tag` which allows for zero-cost components used as tags
|
- Improved performance for hooks
|
||||||
- Setting data to a component with this trait will do nothing
|
- Changed `world:set` to be idempotent when setting tags
|
||||||
- `[luau]`:
|
- `[traits]`:
|
||||||
- Exported `world:contains()`
|
- Added cleanup condition `jecs.OnDelete` for when the entity or component is deleted
|
||||||
- Exported `query:drain()`
|
- Added cleanup action `jecs.Remove` which removes instances of the specified (component) id from all entities
|
||||||
- Exported `Query`
|
- This is the default cleanup action
|
||||||
- Improved types for the hook `OnAdd`, `OnSet`, `OnRemove`
|
- Added component trait `jecs.Tag` which allows for zero-cost components used as tags
|
||||||
- Changed functions to accept any ID including pairs in type parameters
|
- Setting data to a component with this trait will do nothing
|
||||||
- Applies to `world:add()`, `world:set()`, `world:remove()`, `world:get()`, `world:has()` and `world:query()`
|
- `[luau]`:
|
||||||
- New exported type `Id<T = nil> = Entity<T> | Pair`
|
- Exported `world:contains()`
|
||||||
- Changed `world:contains()` to return a `boolean` instead of an entity which may or may not exist
|
- Exported `query:drain()`
|
||||||
- Fixed `world:has()` to take the correct parameters
|
- Exported `Query`
|
||||||
|
- Improved types for the hook `OnAdd`, `OnSet`, `OnRemove`
|
||||||
|
- Changed functions to accept any ID including pairs in type parameters
|
||||||
## [0.2.2] - 2024-07-07
|
- Applies to `world:add()`, `world:set()`, `world:remove()`, `world:get()`, `world:has()` and `world:query()`
|
||||||
|
- New exported type `Id<T = nil> = Entity<T> | Pair`
|
||||||
### Added
|
- Changed `world:contains()` to return a `boolean` instead of an entity which may or may not exist
|
||||||
|
- Fixed `world:has()` to take the correct parameters
|
||||||
- Added `query:replace(function(...T) return ...U end)` for replacing components in place
|
|
||||||
- Method is fast pathed to replace the data to the components for each corresponding entity
|
## [0.2.2] - 2024-07-07
|
||||||
|
|
||||||
### Changed
|
### Added
|
||||||
|
|
||||||
- Iterator now goes backwards instead to prevent common cases of iterator invalidation
|
- Added `query:replace(function(...T) return ...U end)` for replacing components in place
|
||||||
|
- Method is fast pathed to replace the data to the components for each corresponding entity
|
||||||
## [0.2.1] - 2024-07-06
|
|
||||||
|
### Changed
|
||||||
### Added
|
|
||||||
|
- Iterator now goes backwards instead to prevent common cases of iterator invalidation
|
||||||
- Added `jecs.Component` built-in component which will be added to ids created with `world:component()`.
|
|
||||||
- Used to find every component id with `query(jecs.Component)
|
## [0.2.1] - 2024-07-06
|
||||||
|
|
||||||
## [0.2.0] - 2024-07-03
|
### Added
|
||||||
|
|
||||||
### Added
|
- Added `jecs.Component` built-in component which will be added to ids created with `world:component()`.
|
||||||
|
- Used to find every component id with `query(jecs.Component)
|
||||||
- Added `world:parent(entity)` and `jecs.ChildOf` respectively as first class citizen for building parent-child relationships.
|
|
||||||
- Give a parent to an entity with `world:add($source, pair(ChildOf, $target))`
|
## [0.2.0] - 2024-07-03
|
||||||
- Use `world:parent(entity)` to find the target of the relationship
|
|
||||||
- Added user-facing Luau types
|
### Added
|
||||||
|
|
||||||
### Changed
|
- Added `world:parent(entity)` and `jecs.ChildOf` respectively as first class citizen for building parent-child relationships.
|
||||||
- Improved iteration speeds 20-40% by manually indexing rather than using `next()` :scream:
|
- Give a parent to an entity with `world:add($source, pair(ChildOf, $target))`
|
||||||
|
- Use `world:parent(entity)` to find the target of the relationship
|
||||||
|
- Added user-facing Luau types
|
||||||
## [0.1.1] - 2024-05-19
|
|
||||||
|
### Changed
|
||||||
### Added
|
|
||||||
|
- Improved iteration speeds 20-40% by manually indexing rather than using `next()` :scream:
|
||||||
- Added `world:clear(entity)` for removing the components to the corresponding entity
|
|
||||||
- Added Typescript Types
|
## [0.1.1] - 2024-05-19
|
||||||
|
|
||||||
## [0.1.0] - 2024-05-13
|
### Added
|
||||||
|
|
||||||
### Changed
|
- Added `world:clear(entity)` for removing the components to the corresponding entity
|
||||||
- Optimized iterator
|
- Added Typescript Types
|
||||||
|
|
||||||
## [0.1.0-rc.6] - 2024-05-13
|
## [0.1.0] - 2024-05-13
|
||||||
|
|
||||||
### Added
|
### Changed
|
||||||
|
|
||||||
- Added a `jecs.Wildcard` term
|
- Optimized iterator
|
||||||
- it lets you query any partially matched pairs
|
|
||||||
|
## [0.1.0-rc.6] - 2024-05-13
|
||||||
## [0.1.0-rc.5] - 2024-05-10
|
|
||||||
|
### Added
|
||||||
### Added
|
|
||||||
|
- Added a `jecs.Wildcard` term
|
||||||
- Added Entity relationships for creating logical connections between entities
|
- it lets you query any partially matched pairs
|
||||||
- Added `world:__iter method` which allows for iteration over the whole world to get every entity
|
|
||||||
- used for reconciling whole worlds such as via replication, saving/loading, etc
|
## [0.1.0-rc.5] - 2024-05-10
|
||||||
- Added `world:add(entity, component)` which adds a component to the entity
|
|
||||||
- it is an idempotent function, so calling it twice and in any order should be fine
|
### Added
|
||||||
|
|
||||||
### Fixed
|
- Added Entity relationships for creating logical connections between entities
|
||||||
- Fixed component overriding when in disorder
|
- Added `world:__iter method` which allows for iteration over the whole world to get every entity
|
||||||
- Previously setting the components in different order results in it overriding component data because it incorrectly mapped the index of the column. So it took the index from the source archetype rather than the destination archetype
|
- used for reconciling whole worlds such as via replication, saving/loading, etc
|
||||||
|
- Added `world:add(entity, component)` which adds a component to the entity
|
||||||
## [0.0.0-prototype.rc.3] - 2024-05-01
|
- it is an idempotent function, so calling it twice and in any order should be fine
|
||||||
|
|
||||||
### Added
|
### Fixed
|
||||||
|
|
||||||
- Added observers
|
- Fixed component overriding when in disorder
|
||||||
- Added an arm to query `query:without()` for chaining invariants.
|
- Previously setting the components in different order results in it overriding component data because it incorrectly mapped the index of the column. So it took the index from the source archetype rather than the destination archetype
|
||||||
|
|
||||||
### Changed
|
## [0.0.0-prototype.rc.3] - 2024-05-01
|
||||||
- Separates ranges for components and entity IDs.
|
|
||||||
- IDs created with `world:component()` will promote array lookups rather than map lookups in the `componentIndex` which is a significant boost
|
### Added
|
||||||
|
|
||||||
- No longer caches the column pointers directly and instead the column indices which stay persistent even when data is reallocated during swap-removals
|
- Added observers
|
||||||
- This was an issue with the iterator being invalidated when you move an entity to a different archetype.
|
- Added an arm to query `query:without()` for chaining invariants.
|
||||||
|
|
||||||
### Fixedhttps://github.com/Ukendio/jecs/releases/tag/v0.0.0-prototype.rc.3
|
### Changed
|
||||||
|
|
||||||
- Fixed a bug where changing an existing component would be slow because it was always appending changing the row of the entity record
|
- Separates ranges for components and entity IDs.
|
||||||
- The fix dramatically improves times where it is basically down to just the speed of setting a field in a table
|
|
||||||
|
- IDs created with `world:component()` will promote array lookups rather than map lookups in the `componentIndex` which is a significant boost
|
||||||
## [0.0.0-prototype.rc.2] - 2024-04-26
|
|
||||||
|
- No longer caches the column pointers directly and instead the column indices which stay persistent even when data is reallocated during swap-removals
|
||||||
### Changed
|
- This was an issue with the iterator being invalidated when you move an entity to a different archetype.
|
||||||
- Optimized the creation of the query
|
|
||||||
- It will now finds the smallest archetype map to iterate over
|
### Fixedhttps://github.com/Ukendio/jecs/releases/tag/v0.0.0-prototype.rc.3
|
||||||
- Optimized the query iterator
|
|
||||||
- It will now populates iterator with columns for faster indexing
|
- Fixed a bug where changing an existing component would be slow because it was always appending changing the row of the entity record
|
||||||
|
- The fix dramatically improves times where it is basically down to just the speed of setting a field in a table
|
||||||
- Renamed the insertion method from world:add to world:set to better reflect what it does.
|
|
||||||
|
## [0.0.0-prototype.rc.2] - 2024-04-26
|
||||||
## [0.0.0-prototype.rc.2] - 2024-04-23
|
|
||||||
- Initial release
|
### Changed
|
||||||
|
|
||||||
[unreleased]: https://github.com/ukendio/jecs/compare/v0.0.0.0-prototype.rc.2...HEAD
|
- Optimized the creation of the query
|
||||||
[0.2.2]: https://github.com/ukendio/jecs/releases/tag/v0.2.2
|
- It will now finds the smallest archetype map to iterate over
|
||||||
[0.2.1]: https://github.com/ukendio/jecs/releases/tag/v0.2.1
|
- Optimized the query iterator
|
||||||
[0.2.0]: https://github.com/ukendio/jecs/releases/tag/v0.2.0
|
|
||||||
[0.1.1]: https://github.com/ukendio/jecs/releases/tag/v0.1.1
|
- It will now populates iterator with columns for faster indexing
|
||||||
[0.1.0]: https://github.com/ukendio/jecs/releases/tag/v0.1.0
|
|
||||||
[0.1.0-rc.6]: https://github.com/ukendio/jecs/releases/tag/v0.1.0-rc.6
|
- Renamed the insertion method from world:add to world:set to better reflect what it does.
|
||||||
[0.1.0-rc.5]: https://github.com/ukendio/jecs/releases/tag/v0.1.0-rc.5
|
|
||||||
[0.0.0-prototype-rc.3]: https://github.com/ukendio/jecs/releases/tag/v0.0.0-prototype.rc.3
|
## [0.0.0-prototype.rc.2] - 2024-04-23
|
||||||
[0.0.0-prototype.rc.2]: https://github.com/ukendio/jecs/releases/tag/v0.0.0-prototype.rc.2
|
|
||||||
[0.0.0-prototype-rc.1]: https://github.com/ukendio/jecs/releases/tag/v0.0.0-prototype.rc.1
|
- Initial release
|
||||||
|
|
||||||
|
[unreleased]: https://github.com/ukendio/jecs/compare/v0.0.0.0-prototype.rc.2...HEAD
|
||||||
|
[0.2.2]: https://github.com/ukendio/jecs/releases/tag/v0.2.2
|
||||||
|
[0.2.1]: https://github.com/ukendio/jecs/releases/tag/v0.2.1
|
||||||
|
[0.2.0]: https://github.com/ukendio/jecs/releases/tag/v0.2.0
|
||||||
|
[0.1.1]: https://github.com/ukendio/jecs/releases/tag/v0.1.1
|
||||||
|
[0.1.0]: https://github.com/ukendio/jecs/releases/tag/v0.1.0
|
||||||
|
[0.1.0-rc.6]: https://github.com/ukendio/jecs/releases/tag/v0.1.0-rc.6
|
||||||
|
[0.1.0-rc.5]: https://github.com/ukendio/jecs/releases/tag/v0.1.0-rc.5
|
||||||
|
[0.0.0-prototype-rc.3]: https://github.com/ukendio/jecs/releases/tag/v0.0.0-prototype.rc.3
|
||||||
|
[0.0.0-prototype.rc.2]: https://github.com/ukendio/jecs/releases/tag/v0.0.0-prototype.rc.2
|
||||||
|
[0.0.0-prototype-rc.1]: https://github.com/ukendio/jecs/releases/tag/v0.0.0-prototype.rc.1
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
"ReplicatedStorage": {
|
"ReplicatedStorage": {
|
||||||
"$className": "ReplicatedStorage",
|
"$className": "ReplicatedStorage",
|
||||||
"Lib": {
|
"Lib": {
|
||||||
"$path": "src"
|
"$path": "jecs.luau"
|
||||||
},
|
},
|
||||||
"benches": {
|
"benches": {
|
||||||
"$path": "benches"
|
"$path": "benches"
|
||||||
},
|
},
|
||||||
"mirror": {
|
"mirror": {
|
||||||
"$path": "mirror"
|
"$path": "mirror.luau"
|
||||||
},
|
},
|
||||||
"DevPackages": {
|
"DevPackages": {
|
||||||
"$path": "benches/visual/DevPackages"
|
"$path": "benches/visual/DevPackages"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@rbxts/jecs",
|
"name": "@rbxts/jecs",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1-rc.0",
|
||||||
"description": "Stupidly fast Entity Component System",
|
"description": "Stupidly fast Entity Component System",
|
||||||
"main": "jecs.luau",
|
"main": "jecs.luau",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -18,6 +18,7 @@
|
||||||
"types": "jecs.d.ts",
|
"types": "jecs.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"jecs.luau",
|
"jecs.luau",
|
||||||
|
"jecs.d.ts",
|
||||||
"LICENSE.md",
|
"LICENSE.md",
|
||||||
"README.md"
|
"README.md"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue