Commit graph

87 commits

Author SHA1 Message Date
Ukendio
765a7f9a36 Removed unnecessary tests 2025-04-13 02:37:58 +02:00
Ukendio
ba31aa98ba Cleanup testing slightly 2025-04-10 19:52:07 +02:00
Ukendio
001431b836 Experiment: rip out linked lists from archetype graph 2025-04-05 06:04:48 +02:00
Ukendio
d24ab71e4c Style fixes 2025-04-05 00:41:38 +02:00
Ukendio
41ebde415f OnChange should invoke after data has been set
Some checks are pending
analysis / Run Luau Analyze (push) Waiting to run
deploy-docs / build (push) Waiting to run
deploy-docs / Deploy (push) Blocked by required conditions
publish-npm / publish (push) Waiting to run
unit-testing / Run Luau Tests (push) Waiting to run
2025-03-30 22:49:11 +02:00
Ukendio
7bcd6bd220 Update docs 2025-03-30 22:29:43 +02:00
Ukendio
2b90fabec5 Add tests for addons 2025-03-30 22:14:22 +02:00
Ukendio
cf88c259f8 Replace OnSet hook with OnChange 2025-03-30 21:31:18 +02:00
Ukendio
dd9db448e3 New coverage reports 2025-03-28 01:53:19 +01:00
Ukendio
4eb15bbb55 Update removal functions to handle more variants 2025-03-27 21:49:44 +01:00
Ukendio
b81bd6eea8 Make tests lazily evaluated 2025-03-27 17:37:36 +01:00
Ukendio
75f2584bf4 Clear ID will remove ID from all entities 2025-03-27 05:08:38 +01:00
unknown
58e67eda0d Target should return the entity with its generation
Some checks are pending
analysis / Run Luau Analyze (push) Waiting to run
deploy-docs / build (push) Waiting to run
deploy-docs / Deploy (push) Blocked by required conditions
publish-npm / publish (push) Waiting to run
unit-testing / Run Luau Tests (push) Waiting to run
2025-03-26 14:23:54 +01:00
Ukendio
045408af37 Rollback types
Some checks are pending
analysis / Run Luau Analyze (push) Waiting to run
deploy-docs / build (push) Waiting to run
deploy-docs / Deploy (push) Blocked by required conditions
publish-npm / publish (push) Waiting to run
unit-testing / Run Luau Tests (push) Waiting to run
2025-03-26 04:59:11 +01:00
Ukendio
59e7fd1f41 Fix nth count for target 2025-03-26 03:39:04 +01:00
Ukendio
f3befa3adb Add dual types 2025-03-25 23:13:53 +01:00
Ukendio
9d83c3bc13 Fix bits arrangement in IDs
Some checks failed
analysis / Run Luau Analyze (push) Has been cancelled
deploy-docs / build (push) Has been cancelled
publish-npm / publish (push) Has been cancelled
unit-testing / Run Luau Tests (push) Has been cancelled
deploy-docs / Deploy (push) Has been cancelled
2025-03-24 17:36:13 +01:00
Ukendio
e073a570b7 Change invocation points for hooks 2025-03-24 14:31:56 +01:00
Ukendio
db1b29fa04 set hook before usage
Some checks failed
analysis / Run Luau Analyze (push) Has been cancelled
deploy-docs / build (push) Has been cancelled
publish-npm / publish (push) Has been cancelled
unit-testing / Run Luau Tests (push) Has been cancelled
deploy-docs / Deploy (push) Has been cancelled
2025-03-13 16:56:02 +01:00
Ukendio
18019679d5 Alias for world consttructor 2025-03-12 15:29:24 +01:00
Ukendio
a5dad9aa4d Fix entity deletion swap logic 2025-03-01 20:15:52 +01:00
Ukendio
c9b07433aa Reduce memory usage for archetype records 2025-02-26 17:04:17 +01:00
Ukendio
44534b7c81 Improve deletion 2025-02-01 13:07:55 +01:00
Ukendio
cc7daa6a06 Cleanup codebase
Some checks failed
analysis / Run Luau Analyze (push) Has been cancelled
deploy-docs / build (push) Has been cancelled
publish-npm / publish (push) Has been cancelled
unit-testing / Run Luau Tests (push) Has been cancelled
deploy-docs / Deploy (push) Has been cancelled
2025-01-29 08:28:08 +01:00
Intrinsic
5e3739036a
Fixed hooks invocation in the event of relationship target deletion. (#179)
Some checks are pending
analysis / Run Luau Analyze (push) Waiting to run
deploy-docs / build (push) Waiting to run
deploy-docs / Deploy (push) Blocked by required conditions
publish-npm / publish (push) Waiting to run
unit-testing / Run Luau Tests (push) Waiting to run
* Fixed hooks invocation (case #3)

* Reverted world:component() to world:entity()

Co-authored-by: lolmanurfunny <77128366+lolmanurfunny@users.noreply.github.com>

* Removed whitespace

---------

Co-authored-by: lolmanurfunny <77128366+lolmanurfunny@users.noreply.github.com>
2025-01-17 01:46:14 +01:00
Intrinsic
c354a29fb1
Fixed world:delete() not invoking OnRemove hooks. (#178)
* Fixed cached wildcard queries

* Fixed world:delete() not calling OnRemove hook

* Typo in hooks fix

* Fixed test case

* Fixed test case (again)

* Fixed test case (again 2x)

* Now it should work
2025-01-17 00:45:29 +01:00
Intrinsic
669c216387
Fixed cached wildcard queries (#176)
Some checks are pending
analysis / Run Luau Analyze (push) Waiting to run
deploy-docs / build (push) Waiting to run
deploy-docs / Deploy (push) Blocked by required conditions
publish-npm / publish (push) Waiting to run
unit-testing / Run Luau Tests (push) Waiting to run
2025-01-16 09:02:21 +01:00
Laud Boateng
bce46bc93f
Fix World Each to iterate multiple archetypes (#174)
* Add tests for entity-child relationships and removal in world queries, fixed world_each

* Correct test case

---------

Co-authored-by: Marcus <ukendio@gmail.com>
2025-01-15 13:03:28 +01:00
Ukendio
4392f94126 Merge branch 'main' of https://github.com/Ukendio/jecs
Some checks are pending
Analysis / Run Luau Analyze (push) Waiting to run
Deploy VitePress site to Pages / build (push) Waiting to run
Deploy VitePress site to Pages / Deploy (push) Blocked by required conditions
Publish to NPM / publish (push) Waiting to run
Unit Testing / Run Luau Tests (push) Waiting to run
2025-01-14 11:09:28 +01:00
Ukendio
6123946e11 Improve cached queries 2025-01-14 11:09:18 +01:00
vnnh
509048b9df
Fix table.move usage in query_cached (#173)
Some checks failed
Analysis / Run Luau Analyze (push) Has been cancelled
Deploy VitePress site to Pages / build (push) Has been cancelled
Publish to NPM / publish (push) Has been cancelled
Unit Testing / Run Luau Tests (push) Has been cancelled
Deploy VitePress site to Pages / Deploy (push) Has been cancelled
* Fix table.move usage in query_cached

* Add test case
2025-01-05 06:41:52 +01:00
Marcus
ec4fa3ff3e
Add cached queries (#166)
* Initial commit

* Add tests

* Dedup observers

* Handle filters on table creation

* Handle Archetype deletion

* Remove print

* Fix type errors

* Cleanup code

* Manually inline code

* Build terms for cached queries

* Specialized cached query iterator

* Remove shadowed variable

* Inverse statement

* Rework demo

* Fix metatable

* Use generalized iteration
2024-12-26 06:15:41 +01:00
Marcus
0f2e0eba76
Initial commit (#167)
Some checks are pending
Analysis / Run Luau Analyze (push) Waiting to run
Deploy VitePress site to Pages / build (push) Waiting to run
Deploy VitePress site to Pages / Deploy (push) Blocked by required conditions
Unit Testing / Run Luau Tests (push) Waiting to run
2024-12-26 01:06:14 +01:00
Marcus
ee9bc6a775
Remove stylua (#163)
* Add support for components in both positions of pairs

* Remove stylua workflow!

* remove file
2024-12-24 22:38:25 +01:00
Marcus
4841915af3
Specialized method to find entities with a single ID (#165)
Some checks are pending
Analysis / Run Luau Analyze (push) Waiting to run
Deploy VitePress site to Pages / build (push) Waiting to run
Deploy VitePress site to Pages / Deploy (push) Blocked by required conditions
Styling / Run Stylua (push) Waiting to run
Unit Testing / Run Luau Tests (push) Waiting to run
* Initial commit

* Export query functions to make Michael happy

* Adding trailing commas
2024-12-20 13:08:50 +01:00
Ukendio
1dd108401f Merge Archetype with its node interface 2024-11-22 23:06:17 +01:00
Ukendio
5de3f7dd15 Remove typeof 2024-11-16 18:07:12 +01:00
Ukendio
b40af9fe9d Fix generation increment overflowing id 2024-11-14 03:38:27 +01:00
Marcus
303bd4ed16
Entity recycling (#156)
* Merge

* Initial commit

* Fix indentations

* Remove sparse_count

* Add whiteline

* return 0 instead

* Add check for friend existing

* Force inlining

* Manual inlining
2024-11-13 20:05:01 +01:00
Christopher Buss
0eb288e057
style: fix inconsistent project formatting (#144)
Closes #138
2024-10-12 22:18:11 +02:00
Ukendio
f82318c642 Merge to main branch 2024-10-12 22:06:31 +02:00
Ukendio
d4be55ead0 Add tests for hooks 2024-10-12 22:01:08 +02:00
Marcus
c5e20aaf50
Reuse archetype_delete on world:clear (#141)
* Reuse archetype_delete on world:clear

* Add tests
2024-10-12 21:55:24 +02:00
Marcus
c80bb0e2fd
Add tests for archetypes (#139)
* Add stylua

* Align HI_COMPONENT_ID
2024-10-06 03:36:36 +02:00
Marcus
c288a5fab5
Remove drain and next (#136) 2024-10-04 23:55:22 +02:00
Ukendio
ca3cc06400 Traverse refs for deletion 2024-10-01 17:30:51 +02:00
EncodedVenom
16e8055983
Allow nil indexing in world:target (#131)
* Allow nil index in world:target

* Fix the fun type at the bottom

* Update tests
2024-09-23 14:29:53 +02:00
Ukendio
5d6c2e8d42 Fix unit tests and debug mode to enforce OnRemove rules 2024-09-21 20:53:12 +02:00
Marcus
b3da0745bc
Fix cycles (#129) 2024-09-20 21:58:18 +02:00
Marcus
2ed869ba93
Archetype deletion (#126)
* initial commit

* cleanup edges

* rename ptr to edge
2024-09-20 21:29:50 +02:00