Sync to released Jecs 0.5.5-nightly.20250413T001101Z (#32)
Reviewed-on: #32
This commit is contained in:
parent
f41558cadc
commit
024bb62b3b
10 changed files with 121 additions and 179 deletions
|
@ -4,7 +4,7 @@
|
||||||
"testkit": "tools/testkit",
|
"testkit": "tools/testkit",
|
||||||
"mirror": "mirror",
|
"mirror": "mirror",
|
||||||
"tools": "tools",
|
"tools": "tools",
|
||||||
"addons": "addons",
|
"addons": "addons"
|
||||||
},
|
},
|
||||||
"languageMode": "strict"
|
"languageMode": "strict"
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,8 @@ The format is based on [Keep a Changelog][kac], and this project adheres to
|
||||||
- This should allow a more lenient window for modifying data
|
- This should allow a more lenient window for modifying data
|
||||||
- Changed `OnRemove` to lazily lookup which archetype the entity will move to
|
- Changed `OnRemove` to lazily lookup which archetype the entity will move to
|
||||||
- Can now have interior structural changes within `OnRemove` hooks
|
- Can now have interior structural changes within `OnRemove` hooks
|
||||||
|
- Optimized `world:has` for both single component and multiple component presence.
|
||||||
|
- This comes at the cost that it cannot check the component presence for more than 4 components at a time. If this is important, consider calling to this function multiple times.
|
||||||
|
|
||||||
## [0.5.0] - 2024-12-26
|
## [0.5.0] - 2024-12-26
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,32 @@
|
||||||
local jecs = require("@jecs")
|
local jecs = require("@jecs")
|
||||||
local testkit = require("@testkit")
|
|
||||||
|
type Observer<T...> = {
|
||||||
|
callback: (jecs.Entity) -> (),
|
||||||
|
query: jecs.Query<T...>,
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PatchedWorld = jecs.World & {
|
||||||
|
added: (PatchedWorld, jecs.Id, (e: jecs.Entity, id: jecs.Id, value: any) -> ()) -> (),
|
||||||
|
removed: (PatchedWorld, jecs.Id, (e: jecs.Entity, id: jecs.Id) -> ()) -> (),
|
||||||
|
changed: (PatchedWorld, jecs.Id, (e: jecs.Entity, id: jecs.Id) -> ()) -> (),
|
||||||
|
observer: (PatchedWorld, Observer<any>) -> (),
|
||||||
|
monitor: (PatchedWorld, Observer<any>) -> (),
|
||||||
|
}
|
||||||
|
|
||||||
local function observers_new(world, description)
|
local function observers_new(world, description)
|
||||||
local query = description.query
|
local query = description.query
|
||||||
local callback = description.callback
|
local callback = description.callback
|
||||||
local terms = query.filter_with
|
local terms = query.filter_with :: { jecs.Id }
|
||||||
if not terms then
|
if not terms then
|
||||||
local ids = query.ids
|
local ids = query.ids
|
||||||
query.filter_with = ids
|
query.filter_with = ids
|
||||||
terms = ids
|
terms = ids
|
||||||
end
|
end
|
||||||
|
|
||||||
local entity_index = world.entity_index
|
local entity_index = world.entity_index :: any
|
||||||
local function emplaced(entity)
|
local function emplaced(entity: jecs.Entity)
|
||||||
local r = jecs.entity_index_try_get_fast(
|
local r = jecs.entity_index_try_get_fast(
|
||||||
entity_index, entity)
|
entity_index, entity :: any)
|
||||||
|
|
||||||
if not r then
|
if not r then
|
||||||
return
|
return
|
||||||
|
@ -33,18 +45,20 @@ local function observers_new(world, description)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function world_track(world, ...)
|
local function monitors_new(world, description)
|
||||||
local entity_index = world.entity_index
|
local query = description.query
|
||||||
local terms = { ... }
|
local callback = description.callback
|
||||||
local q_shim = { filter_with = terms }
|
local terms = query.filter_with :: { jecs.Id }
|
||||||
|
if not terms then
|
||||||
|
local ids = query.ids
|
||||||
|
query.filter_with = ids
|
||||||
|
terms = ids
|
||||||
|
end
|
||||||
|
|
||||||
local n = 0
|
local entity_index = world.entity_index :: any
|
||||||
local dense_array = {}
|
local function emplaced(entity: jecs.Entity)
|
||||||
local sparse_array = {}
|
|
||||||
|
|
||||||
local function emplaced(entity)
|
|
||||||
local r = jecs.entity_index_try_get_fast(
|
local r = jecs.entity_index_try_get_fast(
|
||||||
entity_index, entity)
|
entity_index, entity :: any)
|
||||||
|
|
||||||
if not r then
|
if not r then
|
||||||
return
|
return
|
||||||
|
@ -52,55 +66,39 @@ local function world_track(world, ...)
|
||||||
|
|
||||||
local archetype = r.archetype
|
local archetype = r.archetype
|
||||||
|
|
||||||
if jecs.query_match(q_shim :: any, archetype) then
|
if jecs.query_match(query, archetype) then
|
||||||
n += 1
|
callback(entity, jecs.OnAdd)
|
||||||
dense_array[n] = entity
|
|
||||||
sparse_array[entity] = n
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function removed(entity)
|
local function removed(entity: jecs.Entity, component: jecs.Id)
|
||||||
local i = sparse_array[entity]
|
local r = jecs.entity_index_try_get_fast(
|
||||||
if i ~= n then
|
entity_index, entity :: any)
|
||||||
dense_array[i] = dense_array[n]
|
|
||||||
|
if not r then
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
dense_array[n] = nil
|
local archetype = r.archetype
|
||||||
|
|
||||||
|
if jecs.query_match(query, archetype) then
|
||||||
|
callback(entity, jecs.OnRemove)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, term in terms do
|
for _, term in terms do
|
||||||
world:added(term, emplaced)
|
world:added(term, emplaced)
|
||||||
world:changed(term, emplaced)
|
world:removed(term, removed)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function iter()
|
|
||||||
local i = n
|
|
||||||
return function()
|
|
||||||
local row = i
|
|
||||||
if row == 0 then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
i -= 1
|
|
||||||
return dense_array[row] :: any
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local it = {
|
|
||||||
__iter = iter,
|
|
||||||
without = function(self, ...)
|
|
||||||
q_shim.filter_without = { ... }
|
|
||||||
return self
|
|
||||||
end
|
|
||||||
}
|
|
||||||
return setmetatable(it, it)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function observers_add(world)
|
local function observers_add(world: jecs.World & { [string]: any }): PatchedWorld
|
||||||
local signals = {
|
local signals = {
|
||||||
added = {},
|
added = {},
|
||||||
emplaced = {},
|
emplaced = {},
|
||||||
removed = {}
|
removed = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
world.added = function(_, component, fn)
|
world.added = function(_, component, fn)
|
||||||
local listeners = signals.added[component]
|
local listeners = signals.added[component]
|
||||||
if not listeners then
|
if not listeners then
|
||||||
|
@ -109,7 +107,7 @@ local function observers_add(world)
|
||||||
local idr = jecs.id_record_ensure(world, component)
|
local idr = jecs.id_record_ensure(world, component)
|
||||||
idr.hooks.on_add = function(entity)
|
idr.hooks.on_add = function(entity)
|
||||||
for _, listener in listeners do
|
for _, listener in listeners do
|
||||||
listener(entity)
|
listener(entity, component)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -124,7 +122,7 @@ local function observers_add(world)
|
||||||
local idr = jecs.id_record_ensure(world, component)
|
local idr = jecs.id_record_ensure(world, component)
|
||||||
idr.hooks.on_change = function(entity, value)
|
idr.hooks.on_change = function(entity, value)
|
||||||
for _, listener in listeners do
|
for _, listener in listeners do
|
||||||
listener(entity, value)
|
listener(entity, component, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -139,7 +137,7 @@ local function observers_add(world)
|
||||||
local idr = jecs.id_record_ensure(world, component)
|
local idr = jecs.id_record_ensure(world, component)
|
||||||
idr.hooks.on_remove = function(entity)
|
idr.hooks.on_remove = function(entity)
|
||||||
for _, listener in listeners do
|
for _, listener in listeners do
|
||||||
listener(entity)
|
listener(entity, component)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -148,9 +146,10 @@ local function observers_add(world)
|
||||||
|
|
||||||
world.signals = signals
|
world.signals = signals
|
||||||
|
|
||||||
world.track = world_track
|
|
||||||
|
|
||||||
world.observer = observers_new
|
world.observer = observers_new
|
||||||
|
|
||||||
|
world.monitor = monitors_new
|
||||||
|
|
||||||
return world
|
return world
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
modified = ["addons/observers.luau", ".luaurc", "CHANGELOG.md", "jecs.luau"]
|
modified = ["addons/observers.luau", ".luaurc", "CHANGELOG.md", "jecs.luau"]
|
||||||
version = "0.5.5-nightly.20250412T181729Z"
|
version = "0.5.5-nightly.20250413T001101Z"
|
||||||
|
|
|
@ -466,7 +466,9 @@ local function world_has_one_inline(world: ecs_world_t, entity: i53, id: i53): b
|
||||||
return records[id] ~= nil
|
return records[id] ~= nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local function world_has(world: ecs_world_t, entity: i53, ...: i53): boolean
|
local function world_has(world: ecs_world_t, entity: i53,
|
||||||
|
a: i53, b: i53?, c: i53?, d: i53?, e: i53?): boolean
|
||||||
|
|
||||||
local record = entity_index_try_get_fast(world.entity_index, entity)
|
local record = entity_index_try_get_fast(world.entity_index, entity)
|
||||||
if not record then
|
if not record then
|
||||||
return false
|
return false
|
||||||
|
@ -479,13 +481,11 @@ local function world_has(world: ecs_world_t, entity: i53, ...: i53): boolean
|
||||||
|
|
||||||
local records = archetype.records
|
local records = archetype.records
|
||||||
|
|
||||||
for i = 1, select("#", ...) do
|
return records[a] ~= nil and
|
||||||
if not records[select(i, ...)] then
|
(b == nil or records[b] ~= nil) and
|
||||||
return false
|
(c == nil or records[c] ~= nil) and
|
||||||
end
|
(d == nil or records[d] ~= nil) and
|
||||||
end
|
(e == nil or error("args exceeded"))
|
||||||
|
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function world_target(world: ecs_world_t, entity: i53, relation: i24, index: number?): i24?
|
local function world_target(world: ecs_world_t, entity: i53, relation: i24, index: number?): i24?
|
||||||
|
@ -2420,7 +2420,10 @@ export type World = {
|
||||||
& <A, B, C, D>(self: World, id: Entity, Id<A>, Id<B>, Id<C>, Id<D>) -> (A?, B?, C?, D?),
|
& <A, B, C, D>(self: World, id: Entity, Id<A>, Id<B>, Id<C>, Id<D>) -> (A?, B?, C?, D?),
|
||||||
|
|
||||||
--- Returns whether the entity has the ID.
|
--- Returns whether the entity has the ID.
|
||||||
has: (self: World, entity: Entity, ...Id) -> boolean,
|
has: (<A>(World, Entity, A) -> boolean)
|
||||||
|
& (<A, B>(World, Entity, A, B) -> boolean)
|
||||||
|
& (<A, B, C>(World, Entity, A, B, C) -> boolean)
|
||||||
|
& <A, B, C, D>(World, Entity, A, B, C, D) -> boolean,
|
||||||
|
|
||||||
--- Get parent (target of ChildOf relationship) for entity. If there is no ChildOf relationship pair, it will return nil.
|
--- Get parent (target of ChildOf relationship) for entity. If there is no ChildOf relationship pair, it will return nil.
|
||||||
parent:(self: World, entity: Entity) -> Entity,
|
parent:(self: World, entity: Entity) -> Entity,
|
||||||
|
@ -2487,9 +2490,9 @@ return {
|
||||||
|
|
||||||
ECS_ID_DELETE = ECS_ID_DELETE,
|
ECS_ID_DELETE = ECS_ID_DELETE,
|
||||||
|
|
||||||
IS_PAIR = ECS_IS_PAIR,
|
IS_PAIR = (ECS_IS_PAIR :: any) :: <P, O>(pair: Pair<P, O>) -> boolean,
|
||||||
pair_first = ecs_pair_first,
|
pair_first = (ecs_pair_first :: any) :: <P, O>(world: World, pair: Pair<P, O>) -> Id<P>,
|
||||||
pair_second = ecs_pair_second,
|
pair_second = (ecs_pair_second :: any) :: <P, O>(world: World, pair: Pair<P, O>) -> Id<O>,
|
||||||
entity_index_get_alive = entity_index_get_alive,
|
entity_index_get_alive = entity_index_get_alive,
|
||||||
|
|
||||||
archetype_append_to_records = archetype_append_to_records,
|
archetype_append_to_records = archetype_append_to_records,
|
||||||
|
|
|
@ -3,7 +3,7 @@ includes = ["init.luau", "pesde.toml", "README.md", "CHANGELOG.md", "LICENSE", "
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "marked/jecs_nightly"
|
name = "marked/jecs_nightly"
|
||||||
repository = "https://git.devmarked.win/marked/jecs-nightly"
|
repository = "https://git.devmarked.win/marked/jecs-nightly"
|
||||||
version = "0.5.5-nightly.20250412T181729Z"
|
version = "0.5.5-nightly.20250413T001101Z"
|
||||||
|
|
||||||
[indices]
|
[indices]
|
||||||
default = "https://github.com/pesde-pkg/index"
|
default = "https://github.com/pesde-pkg/index"
|
||||||
|
|
|
@ -3,7 +3,7 @@ includes = ["init.luau", "pesde.toml", "README.md", "CHANGELOG.md", "LICENSE", "
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "marked/jecs_nightly"
|
name = "marked/jecs_nightly"
|
||||||
repository = "https://git.devmarked.win/marked/jecs-nightly"
|
repository = "https://git.devmarked.win/marked/jecs-nightly"
|
||||||
version = "0.5.5-nightly.20250412T181729Z"
|
version = "0.5.5-nightly.20250413T001101Z"
|
||||||
|
|
||||||
[indices]
|
[indices]
|
||||||
default = "https://github.com/pesde-pkg/index"
|
default = "https://github.com/pesde-pkg/index"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
passed = true
|
passed = true
|
||||||
timestamp = "20250412T181730Z"
|
timestamp = "20250413T001103Z"
|
||||||
|
|
|
@ -1,77 +1,39 @@
|
||||||
*created [32;1me271[0m[33;1mv0[0m
|
|
||||||
*created [32;1me272[0m[33;1mv0[0m
|
|
||||||
*created [32;1me273[0m[33;1mv0[0m
|
|
||||||
*created [32;1me274[0m[33;1mv0[0m
|
|
||||||
*created [32;1me275[0m[33;1mv0[0m
|
|
||||||
*created [32;1me276[0m[33;1mv0[0m
|
|
||||||
*created [32;1me277[0m[33;1mv0[0m
|
|
||||||
*created [32;1me278[0m[33;1mv0[0m
|
|
||||||
*created [32;1me279[0m[33;1mv0[0m
|
|
||||||
*created [32;1me280[0m[33;1mv0[0m
|
|
||||||
|-alive--|
|
|
||||||
| [32;1me271[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
| [32;1me272[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
| [32;1me273[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
| [32;1me274[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
| [32;1me275[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
| [32;1me276[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
| [32;1me277[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
| [32;1me278[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
| [32;1me279[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
| [32;1me280[0m[33;1mv0[0m |
|
|
||||||
|--------|
|
|
||||||
|
|
||||||
|
|
||||||
*deleted [32;1me270[0m[33;1mv0[0m
|
|
||||||
*deleted [32;1me271[0m[33;1mv0[0m
|
|
||||||
*deleted [32;1me272[0m[33;1mv0[0m
|
|
||||||
*deleted [32;1me273[0m[33;1mv0[0m
|
|
||||||
*deleted [32;1me274[0m[33;1mv0[0m
|
|
||||||
*deleted [32;1me275[0m[33;1mv0[0m
|
|
||||||
*deleted [32;1me274[0m[33;1mv1[0m
|
|
||||||
*deleted [32;1me273[0m[33;1mv1[0m
|
|
||||||
*deleted [32;1me272[0m[33;1mv1[0m
|
|
||||||
*deleted [32;1me271[0m[33;1mv1[0m
|
|
||||||
*deleted [32;1me270[0m[33;1mv1[0m
|
|
||||||
----idempotent
|
----idempotent
|
||||||
1_2
|
1_2
|
||||||
1_2
|
[38;1m7.4[0m [33;1mus[0m [38;1m 2[0m [33;1mkB[0m[38;1m│[0m [38;1mdelete children of entity[0m
|
||||||
[38;1m7.1[0m [33;1mus[0m [38;1m 1[0m [33;1mkB[0m[38;1m│[0m [38;1mdelete children of entity[0m
|
[38;1m9.5[0m [33;1mus[0m [38;1m 1[0m [33;1mkB[0m[38;1m│[0m [38;1mremove friends of entity[0m
|
||||||
[38;1m9.2[0m [33;1mus[0m [38;1m 1[0m [33;1mkB[0m[38;1m│[0m [38;1mremove friends of entity[0m
|
[38;1m352[0m [32;1mns[0m [38;1m 0[0m [32;1m B[0m[38;1m│[0m [38;1msimple deletion of entity[0m
|
||||||
[38;1m346[0m [32;1mns[0m [38;1m 0[0m [32;1m B[0m[38;1m│[0m [38;1msimple deletion of entity[0m
|
[37;1mworld:add()[0m
|
||||||
[37;1mthe great reset[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1midempotent[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1marchetype move[0m
|
||||||
|
|
||||||
|
[37;1mworld:children()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
||||||
|
|
||||||
[37;1m#repro3[0m
|
[37;1mworld:clear()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould add the correct ModelBase for parts[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mshould remove its components[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould add the correct ModelBase for parts[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mremove cleared ID from entities[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
|
||||||
|
|
||||||
[37;1m#adding a recycled target[0m
|
[37;1mworld:component()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1monly components should have EcsComponent trait[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mtag[0m
|
||||||
|
|
||||||
[37;1m#repro2[0m
|
[37;1mworld:contains()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mshould not exist after delete[0m
|
||||||
|
|
||||||
[37;1manother[0m
|
[37;1mworld:delete()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1minvoke OnRemove hooks[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mdelete recycled entity id used as component[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mbug: Empty entity does not respect cleanup policy[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mshould allow deleting components[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mdelete entities using another Entity as component with Delete cleanup action[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mdelete children[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mremove deleted ID from entities[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mfast delete[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mcycle[0m
|
||||||
|
|
||||||
[37;1m#repro[0m
|
[37;1mworld:each()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
|
||||||
|
|
||||||
[37;1marchetype[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
|
||||||
|
|
||||||
[37;1mworld:cleanup()[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
||||||
|
|
||||||
[37;1mworld:entity()[0m
|
[37;1mworld:entity()[0m
|
||||||
|
@ -81,16 +43,9 @@
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mRecycling[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mRecycling[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mRecycling max generation[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mRecycling max generation[0m
|
||||||
|
|
||||||
[37;1mworld:set()[0m
|
[37;1mworld:has()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1marchetype move[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mshould find Tag on entity[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mpairs[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mshould return false when missing one tag[0m
|
||||||
|
|
||||||
[37;1mworld:remove()[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould allow remove a component that doesn't exist on entity[0m
|
|
||||||
|
|
||||||
[37;1mworld:add()[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1midempotent[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1marchetype move[0m
|
|
||||||
|
|
||||||
[37;1mworld:query()[0m
|
[37;1mworld:query()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mcached[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mcached[0m
|
||||||
|
@ -110,49 +65,32 @@
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould error when setting invalid pair[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mshould error when setting invalid pair[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould find target for ChildOf[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mshould find target for ChildOf[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mdespawning while iterating[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mdespawning while iterating[0m
|
||||||
[38;5;208mNONE[0m[38;1m│[0m [38;1miterator invalidation[0m
|
|
||||||
[33;1mSKIP[0m[38;1m│[0m [38;1madding[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mspawning[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould not find any entities[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mshould not find any entities[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mwithout[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mworld:query():without()[0m
|
||||||
|
|
||||||
[37;1mworld:each[0m
|
[37;1mworld:remove()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mshould allow remove a component that doesn't exist on entity[0m
|
||||||
|
|
||||||
[37;1mworld:children[0m
|
[37;1mworld:set()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1marchetype move[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1mpairs[0m
|
||||||
[37;1mworld:clear()[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould remove its components[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mremove cleared ID from entities[0m
|
|
||||||
|
|
||||||
[37;1mworld:has()[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould find Tag on entity[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould return false when missing one tag[0m
|
|
||||||
|
|
||||||
[37;1mworld:component()[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1monly components should have EcsComponent trait[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mtag[0m
|
|
||||||
|
|
||||||
[37;1mworld:delete[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1minvoke OnRemove hooks[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mdelete recycled entity id used as component[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mbug: Empty entity does not respect cleanup policy[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould allow deleting components[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mdelete entities using another Entity as component with Delete cleanup action[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mdelete children[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mremove deleted ID from entities[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mfast delete[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mcycle[0m
|
|
||||||
|
|
||||||
[37;1mworld:target[0m
|
[37;1mworld:target[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mnth index[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mnth index[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1minfer index when unspecified[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1minfer index when unspecified[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mloop until no target[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mloop until no target[0m
|
||||||
|
|
||||||
[37;1mworld:contains[0m
|
[37;1m#adding a recycled target[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
||||||
|
|
||||||
|
[37;1m#repro2[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
||||||
|
|
||||||
|
[37;1manother[0m
|
||||||
|
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
||||||
|
|
||||||
|
[37;1m#repro[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mshould not exist after delete[0m
|
|
||||||
|
|
||||||
[37;1mHooks[0m
|
[37;1mHooks[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mOnAdd[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mOnAdd[0m
|
||||||
|
@ -177,5 +115,5 @@
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m#2[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1m#2[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m#3[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1m#3[0m
|
||||||
|
|
||||||
[38;1m77/77 test cases passed in 29.411 ms.[0m
|
[38;1m68/68 test cases passed in 29.621 ms.[0m
|
||||||
[32;1m0 fails[0m
|
[32;1m0 fails[0m
|
||||||
|
|
|
@ -5,4 +5,4 @@ license = "MIT"
|
||||||
name = "mark-marks/jecs-nightly"
|
name = "mark-marks/jecs-nightly"
|
||||||
realm = "shared"
|
realm = "shared"
|
||||||
registry = "https://github.com/UpliftGames/wally-index"
|
registry = "https://github.com/UpliftGames/wally-index"
|
||||||
version = "0.5.5-nightly.20250412T181729Z"
|
version = "0.5.5-nightly.20250413T001101Z"
|
||||||
|
|
Loading…
Reference in a new issue