Commit graph

142 commits

Author SHA1 Message Date
Ukendio
699beccc1c Change display to explicit pair 2024-09-12 16:24:59 +02:00
Marcus
f8b2c8c2b3
Name the builtin components (#117)
* Add nth parameter to world:target

* Put archetype record creation into function

* Fix docs and comments

* Make EcsWildcard a component

* Name the builtin components
2024-09-11 02:53:15 +02:00
EncodedVenom
07efaf39e9
Update world::target for typescript 2024-09-10 20:09:58 -04:00
Marcus
244d799cec
Add nth parameter to world:target (#116)
* Add nth parameter to world:target

* Put archetype record creation into function

* Fix docs and comments
2024-09-10 23:56:42 +02:00
juste
8e0a9409f5
fixed typescript types (#115) 2024-09-09 21:44:45 +02:00
Ukendio
1503d7e462 Add a hooks cache 2024-09-09 03:22:20 +02:00
Ukendio
adeb562baa decouple start 2024-09-08 19:45:49 +02:00
Ukendio
5deb7e5b35 Update typescript types 2024-09-07 22:42:35 +02:00
Ukendio
1067a17101 Fix docs titles 2024-09-07 22:12:07 +02:00
Ukendio
aa3e0258e3 Make world:set idempotent for tags 2024-08-31 05:31:58 +02:00
Ukendio
d6179637af Collapse ORs 2024-08-31 05:02:09 +02:00
Marcus
f91ab4049f
Docs addons (#112)
* Fix indentations

* Add addons page

* Fix indent
2024-08-31 04:13:47 +02:00
Marcus
c37bc3c440
Add EcsOnDelete support (#111)
* Add EcsOnDelete support

* Shrink mask

* Add indentation for flags

* Rename page

* Add page to items

* IDs should be plural

* Polish changelog

* Cleanup action Remove is default
2024-08-30 19:19:20 +02:00
Magic
5b163a29c1
Expose world:contains() and query:drain() in types (#110)
* chore: Expose world:contains and query:drain in types

* chore: Actually expose query:drain(), ?

* chore: Document these and previous changes in CHANGELOG.md

* fix: Fix type of world:has() to explicitly take in an entity
2024-08-29 23:36:34 +02:00
Magic
bfb3db272a
Allow functions to accept any ID including pairs in type parameters (#109) 2024-08-28 19:42:01 +02:00
Marcus
3dd0bd30cd
Add EcsTag (#108)
* Add EcsTag

* Add tests
2024-08-28 19:26:57 +02:00
Magic
ff98e8b5fb
fix: OnAdd, OnRemove and OnSet were typed as Entity<any> rendering them unusable with strict types (#107) 2024-08-28 10:12:04 +02:00
Ketasaja
a54928ee03
Avoid unused variable warnings (#91) 2024-08-24 01:50:22 +02:00
Ukendio
f302fad3b6 Fix types in export 2024-08-18 16:46:52 +02:00
Ukendio
f2d6d76686 Fix file paths 2024-08-17 02:38:00 +02:00
Marcus
4e5a40f75b
Fix hooks not notifying (#103)
* Fix world_has_any checking for inverse statement

* invoke onAdd for set
2024-08-17 01:10:35 +02:00
Marcus
6d45af93f0
Add OnDeleteTarget (#102) 2024-08-16 19:13:30 +02:00
Ukendio
461c3f6862 Remove comment section 2024-08-14 18:53:24 +02:00
Marcus
6d6cc37a25
Add bit flags to id_record (#101)
* Add bit flags to id_record

* set should not invoke OnAdd
2024-08-14 17:18:05 +02:00
Ukendio
33f359a150 Handle cycles in deletion 2024-08-14 01:15:04 +02:00
Ukendio
49d5bd0d4a optimize bulk remove 2024-08-13 21:23:40 +02:00
Ukendio
c22007671d Expose EcsDelete 2024-08-13 21:17:49 +02:00
Ukendio
8dd53b8c2a optimize deletion 2024-08-13 20:58:07 +02:00
Ukendio
735eb01526 Initial commit 2024-08-13 20:08:58 +02:00
Ukendio
0b9d9530b9 Fix types for iter 2024-08-12 22:43:46 +02:00
Michael
3de4789c03
Avoid recomputing column size (#100) 2024-08-12 15:05:40 +02:00
EncodedVenom
aa21b5ee47
Sync TS types 2024-08-12 13:36:48 +01:00
Ukendio
3175d5e94c Add back multret ;C 2024-08-11 15:03:05 +02:00
Ukendio
b57239fac2 optimize hook calls and add tests 2024-08-11 04:03:18 +02:00
Ukendio
a0935fe0f1 deduplicate get 2024-08-11 03:51:51 +02:00
Conz
71569bba60
component Hooks (#98)
Co-authored-by: Marcus <ukendio@gmail.com>
2024-08-11 03:30:58 +02:00
Marcus
e6983a3356
Remove multret (#99)
* Initial commit

* Move functions for get and has

* Update docs
2024-08-11 03:27:29 +02:00
Ukendio
a2dedf128a Change pair function names 2024-08-10 04:55:04 +02:00
Ukendio
f2e2defddf Add iter shim to EmptyQuery 2024-08-08 02:56:57 +02:00
Ukendio
56694ba99f Merge branch 'main' of https://github.com/Ukendio/jecs 2024-08-07 18:44:38 +02:00
Ukendio
727d70cab5 self should not be explicit 2024-08-07 18:43:49 +02:00
Ukendio
c5147ac296 Add explicit iter method 2024-08-07 18:43:01 +02:00
EncodedVenom
6ea5c09a10
Update index.d.ts (#95)
* Update index.d.ts

Some doc changes and flattened world:get

* Update index.d.ts

doc comment on query:with
2024-08-05 17:49:18 +02:00
Ukendio
d302588081 Fix indentation and variable names 2024-08-05 17:13:00 +02:00
Ukendio
fd40993ceb Select should use j not i 2024-08-05 14:32:25 +02:00
Ukendio
ec9d58fe5d Add archetypes to EmptyQuery 2024-08-04 23:07:32 +02:00
Ukendio
843f8c1914 Fix luau types 2024-08-03 22:39:45 +02:00
Ukendio
337f388093 Fix ts types 2024-08-03 22:22:36 +02:00
Ukendio
e5634b10b2 Fix upvalues conflict in nested queries 2024-08-03 04:49:45 +02:00
Ukendio
3e639db371 Fix upvalues conflict in nested queries 2024-08-03 04:17:36 +02:00
Ukendio
6b465d1ed1 Change param 2024-08-02 22:24:05 +02:00
Ukendio
af8e15ef45 Remove index from tr 2024-08-01 02:41:03 +02:00
Ukendio
4a8250af4f Add .column 2024-08-01 02:16:09 +02:00
Ukendio
7476952f89 Specialize iterator 2024-07-31 18:48:34 +02:00
Marcus
51ed9e2173
Add pages to docs (#92)
* Explicit error for query:next

* Add drain to docs

* Fix next call

* Add relationships page
2024-07-31 02:43:24 +02:00
Ukendio
24f9f5868b Add test for querying more than 8 components 2024-07-30 20:58:48 +02:00
Ukendio
6d9122cfe9 Add tombstone column 2024-07-30 20:37:27 +02:00
Ukendio
5090ae0d1c Use not X instead of queryLength 2024-07-30 20:34:28 +02:00
Ukendio
dadcfacd6f Add indentation for collapsing 2024-07-30 20:00:40 +02:00
Ukendio
023e7ace5b Save column indexing 2024-07-30 19:36:53 +02:00
Ukendio
d5baf52977 Fix variable names 2024-07-30 17:27:58 +02:00
Ukendio
e9d2154988 Query Rework 2024-07-30 17:17:18 +02:00
Ukendio
0f7cb78a59 Unit tests 2024-07-30 01:11:22 +02:00
Ukendio
ff54fb3d62 Reduce indexing 2024-07-29 13:59:48 +02:00
Ukendio
87e986b6aa Rest should be last 2024-07-28 21:45:47 +02:00
Ukendio
7f2d6a9e79 Add comment to world_query_archetypes 2024-07-28 14:36:53 +02:00
Ukendio
207c9b5268 Swap remove in without 2024-07-28 14:31:47 +02:00
Ukendio
d5de1ad425 Self contained changetracker 2024-07-28 14:17:44 +02:00
Ukendio
18ead3ed19 Make it static 2024-07-28 12:33:38 +02:00
Marcus
49305f73dd
Add archetypes method (#89)
* Add method

* Remove unnecessary shadowed variable
2024-07-28 02:39:19 +02:00
Marcus
d46df8c0a0
Initial commit (#86) 2024-07-26 16:21:13 +02:00
Ukendio
2f0f817b08 Optimize remove 2024-07-26 16:15:12 +02:00
Ukendio
059a3f9bed Fix world:remove 2024-07-26 04:36:30 +02:00
Ukendio
65984b6c65 Remove indices 2024-07-26 03:03:00 +02:00
Marcus
0f8f9348f5
Fix column pointers invalidated by upvalues (#88)
* Initial commit

* Add types to world:has()
2024-07-26 02:55:36 +02:00
Marcus
76d1ff91c0
Add has function (#85) 2024-07-23 04:44:56 +02:00
Ukendio
02548f2ac0 Fix typo 2024-07-15 20:31:51 +02:00
Ukendio
459e670ce9 Change casing 2024-07-15 20:29:06 +02:00
Ukendio
1b6cdd4791 Should return noop 2024-07-14 08:34:50 +02:00
Ukendio
48cc4dc7d5 Properly type EmptyQuery 2024-07-14 08:30:20 +02:00
Ukendio
150afc46e4 Rename replace function 2024-07-14 07:30:13 +02:00
Ukendio
43a19f5328 FLAGS_ADD 2024-07-14 07:16:24 +02:00
Marcus
8a7b3de004
Revert mirror (#79) 2024-07-14 06:35:13 +02:00
Ukendio
85a970e9ff Less memory footprint 2024-07-14 05:38:44 +02:00
Marcus
45adef066d
Fixed regression in Without (#72)
* Return empty query when Without removes all archetypes

* Type replace callback as Any

* Add test with ChangeTracker
2024-07-13 04:32:31 +02:00
Ukendio
fb3b8a5f67 Extract logic from ensureComponentRecord 2024-07-08 23:31:13 +02:00
EncodedVenom
7d2cd6219b
Add world.clear to types (#68)
* Sync typescript types to 0.2.2

* semicolon

* Add world.clear to the types

* Add luau type for clear
2024-07-08 16:04:28 +02:00
EncodedVenom
6b8dde8fd3
Fix EmptyQuery to properly return an empty iterator (#70)
* Fix EmptyQuery to properly return an empty iterator

* Remove actualNoOperation and enforce style guide
2024-07-08 16:04:04 +02:00
EncodedVenom
97d6955da0
Sync typescript types (v0.2.2) (#65)
* Sync typescript types to 0.2.2

* semicolon
2024-07-07 22:29:30 +02:00
Marcus
0fe23e151c
Add replace method to query (#46)
* Add replace function

* Add next method

* Remove tostring

* Fix EmptyQuery

* add replace method

* merge conflicts

* return self in without

* Make aliases relative

* Add test

* add to changelog
2024-07-07 04:53:17 +02:00
Marcus
c0e73273d1
Add backwards iteration (#61)
* Iterate backwards

* Should test for removing as well

* Add test

* Add faíling test

* Add to changelog
2024-07-06 16:36:00 +02:00
Marcus
6559c56d47
Initial commit (#63) 2024-07-06 16:21:44 +02:00