Commit graph

60 commits

Author SHA1 Message Date
Marcus
42401f93ae
Add component registration and metadata API (#219)
* Add component registration and metadata API

* Fix test case erroring

* Fix type issues

* Add component to hook calls' arguments

* Add is_tag function

* Allow focus to capture a single Test

* Add test cases for preregistered tags
2025-04-22 04:38:30 +02:00
Ukendio
f9bacf3f54 Remove until end of range for relationship 2025-04-13 05:21:41 +02:00
Ukendio
fc4f4a6a3a Add type overloads for World.has method 2025-04-13 01:52:41 +02:00
Ukendio
447bb76bb8 Optimize world:has and improve type annotations 2025-04-13 01:51:21 +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
74ef525092 Fix dst clone 2025-04-05 04:55:11 +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
cf88c259f8 Replace OnSet hook with OnChange 2025-03-30 21:31:18 +02:00
lolmanurfunny
0046dcdf1a
find_archetype_with shouldn't clone types unconditionally (#210)
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-29 02:22:15 +01:00
Ukendio
34777b51c4 Fix typos 2025-03-28 01:52:33 +01:00
Ukendio
4eb15bbb55 Update removal functions to handle more variants 2025-03-27 21:49:44 +01:00
Ukendio
75f2584bf4 Clear ID will remove ID from all entities 2025-03-27 05:08:38 +01:00
Ukendio
4d6c2ccbb8 Change generic to unknown 2025-03-27 04:17:23 +01:00
Ukendio
9a22b38bb3 Reorganize repo 2025-03-27 02:33: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
b26fc39fce Add options to lifetime tracker
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-12 18:49:18 +01:00
Ukendio
18019679d5 Alias for world consttructor 2025-03-12 15:29:24 +01:00
Ukendio
ac79638599 Prevent invalidation during removal of pairs with deleted target 2025-03-12 13:10:17 +01:00
lolmanurfunny
b29f6c5037
Remove unused EMPTY_QUERY table (#204)
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-07 19:54:44 +01:00
lolmanurfunny
a703e2c361
Remove redundant check in entity_index_try_get_any (#203)
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-07 02:16:49 +01:00
Ukendio
a5dad9aa4d Fix entity deletion swap logic 2025-03-01 20:15:52 +01:00
Ukendio
1bfcba7422 Optimized queries for more than 4 components
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-02-26 17:26:11 +01:00
Ukendio
c9b07433aa Reduce memory usage for archetype records 2025-02-26 17:04:17 +01:00
Ukendio
61e0df82ae Remove invoke_hook
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-02-25 02:39:41 +01:00
lolmanurfunny
4c5e5e1968
Fix redundant checks in world_remove (#198) 2025-02-21 18:10:24 +01:00
Ukendio
3815c62442 Fix critical issue with deleted entity being swapped with the last
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-02-20 22:55:07 +01:00
Ketasaja
7af6908781
Fix types (#190)
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-02-14 10:51:30 +01:00
Ukendio
0064f24924 Merge branch 'main' of https://github.com/Ukendio/jecs
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-02-09 20:38:08 +01:00
Ketasaja
6ec0b0bb8b
Change entity type (#189) 2025-02-09 20:37:20 +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
Ukendio
0cb7558fbb Fix types on idr 2025-01-17 11:17:07 +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
Magic
0296c4b2f9
fix 'jecs.World.new()' being inferred to return 'any' (#177) 2025-01-17 00:45:55 +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
bacf056851 Optimize removal of children
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 22:11:45 +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
Ukendio
f8b3772bce Fix spelling error
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-27 04:50:15 +01:00
Ukendio
fad88419a3 Fix type errors 2024-12-27 04:34:17 +01:00