Compare commits
1 commit
62a8db2fdb
...
78dd3c5dc8
Author | SHA1 | Date | |
---|---|---|---|
![]() |
78dd3c5dc8 |
9 changed files with 34 additions and 286 deletions
|
@ -11,8 +11,6 @@ The format is based on [Keep a Changelog][kac], and this project adheres to
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- `[world]`:
|
- `[world]`:
|
||||||
- Added `world:range` to restrict entity range
|
|
||||||
- Changed `world:entity` to accept the overload to create an entity at the desired index
|
|
||||||
- Changed `world:clear` to also look through the component record for the cleared `ID`
|
- Changed `world:clear` to also look through the component record for the cleared `ID`
|
||||||
- Removes the cleared ID from every entity that has it
|
- Removes the cleared ID from every entity that has it
|
||||||
- Changed entity ID layouts by putting the index in the lower bits, which should make every world function 1-5 nanoseconds faster
|
- Changed entity ID layouts by putting the index in the lower bits, which should make every world function 1-5 nanoseconds faster
|
||||||
|
|
|
@ -24,7 +24,7 @@ local function observers_new(world, description)
|
||||||
end
|
end
|
||||||
|
|
||||||
local entity_index = world.entity_index :: any
|
local entity_index = world.entity_index :: any
|
||||||
local function emplaced(entity, id, value)
|
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 :: any)
|
entity_index, entity :: any)
|
||||||
|
|
||||||
|
@ -45,106 +45,6 @@ local function observers_new(world, description)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function join(world, component)
|
|
||||||
local sparse_array = {}
|
|
||||||
local dense_array = {}
|
|
||||||
local values = {}
|
|
||||||
local max_id = 0
|
|
||||||
|
|
||||||
world:added(component, function(entity, id, value)
|
|
||||||
max_id += 1
|
|
||||||
sparse_array[entity] = max_id
|
|
||||||
dense_array[max_id] = entity
|
|
||||||
values[max_id] = value
|
|
||||||
end)
|
|
||||||
|
|
||||||
world:removed(component, function(entity, id)
|
|
||||||
local e_swap = dense_array[max_id]
|
|
||||||
local v_swap = values[max_id]
|
|
||||||
|
|
||||||
local dense = sparse_array[entity]
|
|
||||||
dense_array[dense] = e_swap
|
|
||||||
values[dense] = v_swap
|
|
||||||
|
|
||||||
sparse_array[entity] = nil
|
|
||||||
dense_array[max_id] = nil
|
|
||||||
values[max_id] = nil
|
|
||||||
end)
|
|
||||||
|
|
||||||
world:changed(component, function(entity, id, value)
|
|
||||||
values[sparse_array[entity]] = value
|
|
||||||
end)
|
|
||||||
|
|
||||||
return function()
|
|
||||||
local i = max_id
|
|
||||||
return function(): ...any
|
|
||||||
i -= 1
|
|
||||||
if i == 0 then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
local e = dense_array[i]
|
|
||||||
return e, values[i]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function query_changed(world, component)
|
|
||||||
assert(jecs.IS_PAIR(component) == false)
|
|
||||||
local callerid = debug.info(2, "sl")
|
|
||||||
|
|
||||||
local tracker = world.trackers[callerid]
|
|
||||||
if not tracker then
|
|
||||||
local records = {}
|
|
||||||
local connections = {}
|
|
||||||
tracker = {
|
|
||||||
records = records,
|
|
||||||
connections = connections
|
|
||||||
}
|
|
||||||
world.trackers[callerid] = tracker
|
|
||||||
|
|
||||||
table.insert(connections, world:added(component, function(entity, id, v)
|
|
||||||
tracker[entity] = {
|
|
||||||
new = v
|
|
||||||
}
|
|
||||||
end))
|
|
||||||
table.insert(connections, world:changed(component, function(entity, id, v)
|
|
||||||
local record = tracker[entity]
|
|
||||||
record.old = record.new
|
|
||||||
record.new = v
|
|
||||||
end))
|
|
||||||
|
|
||||||
table.insert(connections, world:removed(component, function(entity, id)
|
|
||||||
local record = tracker[entity]
|
|
||||||
record.old = record.new
|
|
||||||
record.new = nil
|
|
||||||
end))
|
|
||||||
end
|
|
||||||
|
|
||||||
local entity = nil
|
|
||||||
local record = nil
|
|
||||||
return function()
|
|
||||||
entity, record = next(tracker, entity)
|
|
||||||
if entity == nil then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
return entity, record
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function spy_on_world_delete(world)
|
|
||||||
local world_delete = world.delete
|
|
||||||
world.delete = function(world, entity)
|
|
||||||
world_delete(world, entity)
|
|
||||||
for _, tracker in world.trackers do
|
|
||||||
tracker.records[entity] = nil
|
|
||||||
for _, connection in tracker.connections do
|
|
||||||
connection()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function monitors_new(world, description)
|
local function monitors_new(world, description)
|
||||||
local query = description.query
|
local query = description.query
|
||||||
local callback = description.callback
|
local callback = description.callback
|
||||||
|
@ -193,11 +93,10 @@ local function monitors_new(world, description)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function observers_add(world: jecs.World & { [string]: any }): PatchedWorld
|
local function observers_add(world: jecs.World & { [string]: any }): PatchedWorld
|
||||||
type Signal = { [jecs.Entity]: { (...any) -> () } }
|
|
||||||
local signals = {
|
local signals = {
|
||||||
added = {} :: Signal,
|
added = {},
|
||||||
emplaced = {} :: Signal,
|
emplaced = {},
|
||||||
removed = {} :: Signal
|
removed = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
world.added = function(_, component, fn)
|
world.added = function(_, component, fn)
|
||||||
|
@ -207,21 +106,13 @@ local function observers_add(world: jecs.World & { [string]: any }): PatchedWorl
|
||||||
if not listeners then
|
if not listeners then
|
||||||
listeners = {}
|
listeners = {}
|
||||||
signals.added[component] = listeners
|
signals.added[component] = listeners
|
||||||
|
|
||||||
local function on_add(entity: number, id: number, value: any)
|
local function on_add(entity: number, id: number, value: any)
|
||||||
for _, listener in listeners :: any do
|
for _, listener in listeners :: any do
|
||||||
listener(entity, id, value)
|
listener(entity, id, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
world:set(component, jecs.OnAdd, on_add)
|
world:set(component, jecs.OnAdd, on_add) end
|
||||||
end
|
|
||||||
table.insert(listeners, fn)
|
table.insert(listeners, fn)
|
||||||
return function()
|
|
||||||
local n = #listeners
|
|
||||||
local i = table.find(listeners, fn)
|
|
||||||
listeners[i] = listeners[n]
|
|
||||||
listeners[n] = nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
world.changed = function(_, component, fn)
|
world.changed = function(_, component, fn)
|
||||||
|
@ -239,12 +130,6 @@ local function observers_add(world: jecs.World & { [string]: any }): PatchedWorl
|
||||||
world:set(component, jecs.OnChange, on_change)
|
world:set(component, jecs.OnChange, on_change)
|
||||||
end
|
end
|
||||||
table.insert(listeners, fn)
|
table.insert(listeners, fn)
|
||||||
return function()
|
|
||||||
local n = #listeners
|
|
||||||
local i = table.find(listeners, fn)
|
|
||||||
listeners[i] = listeners[n]
|
|
||||||
listeners[n] = nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
world.removed = function(_, component, fn)
|
world.removed = function(_, component, fn)
|
||||||
|
@ -262,12 +147,6 @@ local function observers_add(world: jecs.World & { [string]: any }): PatchedWorl
|
||||||
world:set(component, jecs.OnRemove, on_remove)
|
world:set(component, jecs.OnRemove, on_remove)
|
||||||
end
|
end
|
||||||
table.insert(listeners, fn)
|
table.insert(listeners, fn)
|
||||||
return function()
|
|
||||||
local n = #listeners
|
|
||||||
local i = table.find(listeners, fn)
|
|
||||||
listeners[i] = listeners[n]
|
|
||||||
listeners[n] = nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
world.signals = signals
|
world.signals = signals
|
||||||
|
@ -276,8 +155,6 @@ local function observers_add(world: jecs.World & { [string]: any }): PatchedWorl
|
||||||
|
|
||||||
world.monitor = monitors_new
|
world.monitor = monitors_new
|
||||||
|
|
||||||
world.trackers = {}
|
|
||||||
|
|
||||||
return world :: PatchedWorld
|
return world :: PatchedWorld
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
modified = ["addons/observers.luau", "CHANGELOG.md", "jecs.luau"]
|
modified = ["addons/observers.luau", "jecs.luau"]
|
||||||
version = "0.5.5-nightly.20250426T001101Z"
|
version = "0.5.5-nightly.20250423T001100Z"
|
||||||
|
|
159
jecs/jecs.luau
159
jecs/jecs.luau
|
@ -62,8 +62,6 @@ type ecs_entity_index_t = {
|
||||||
sparse_array: Map<i24, ecs_record_t>,
|
sparse_array: Map<i24, ecs_record_t>,
|
||||||
alive_count: number,
|
alive_count: number,
|
||||||
max_id: number,
|
max_id: number,
|
||||||
range_begin: number?,
|
|
||||||
range_end: number?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ecs_query_data_t = {
|
type ecs_query_data_t = {
|
||||||
|
@ -127,12 +125,6 @@ local ECS_INTERNAL_ERROR = [[
|
||||||
https://github.com/Ukendio/jecs/issues/new?template=BUG-REPORT.md
|
https://github.com/Ukendio/jecs/issues/new?template=BUG-REPORT.md
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local function ecs_assert(condition, msg: string?)
|
|
||||||
if not condition then
|
|
||||||
error(msg)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local ecs_metadata: Map<i53, Map<i53, any>> = {}
|
local ecs_metadata: Map<i53, Map<i53, any>> = {}
|
||||||
local ecs_max_component_id = 0
|
local ecs_max_component_id = 0
|
||||||
local ecs_max_tag_id = EcsRest
|
local ecs_max_tag_id = EcsRest
|
||||||
|
@ -193,10 +185,6 @@ local function ECS_ENTITY_T_LO(e: i53): i24
|
||||||
return e % ECS_ENTITY_MASK
|
return e % ECS_ENTITY_MASK
|
||||||
end
|
end
|
||||||
|
|
||||||
local function ECS_ID(e: i53)
|
|
||||||
return e % ECS_ENTITY_MASK
|
|
||||||
end
|
|
||||||
|
|
||||||
local function ECS_GENERATION(e: i53)
|
local function ECS_GENERATION(e: i53)
|
||||||
return e // ECS_ENTITY_MASK
|
return e // ECS_ENTITY_MASK
|
||||||
end
|
end
|
||||||
|
@ -261,10 +249,10 @@ local function entity_index_is_alive(entity_index: ecs_entity_index_t, entity: i
|
||||||
return entity_index_try_get(entity_index, entity) ~= nil
|
return entity_index_try_get(entity_index, entity) ~= nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local function entity_index_get_alive(entity_index: ecs_entity_index_t, entity: i53): i53?
|
local function entity_index_get_alive(index: ecs_entity_index_t, entity: i53): i53?
|
||||||
local r = entity_index_try_get_any(entity_index, entity)
|
local r = entity_index_try_get_any(index, entity)
|
||||||
if r then
|
if r then
|
||||||
return entity_index.dense_array[r.dense]
|
return index.dense_array[r.dense]
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
@ -292,15 +280,11 @@ local function ecs_get_alive(world, entity)
|
||||||
return current
|
return current
|
||||||
end
|
end
|
||||||
|
|
||||||
local ECS_INTERNAL_ERROR_INCOMPATIBLE_ENTITY = "Entity is outside range"
|
|
||||||
|
|
||||||
local function entity_index_new_id(entity_index: ecs_entity_index_t): i53
|
local function entity_index_new_id(entity_index: ecs_entity_index_t): i53
|
||||||
local dense_array = entity_index.dense_array
|
local dense_array = entity_index.dense_array
|
||||||
local alive_count = entity_index.alive_count
|
local alive_count = entity_index.alive_count
|
||||||
local sparse_array = entity_index.sparse_array
|
|
||||||
local max_id = entity_index.max_id
|
local max_id = entity_index.max_id
|
||||||
|
if alive_count ~= max_id then
|
||||||
if alive_count < max_id then
|
|
||||||
alive_count += 1
|
alive_count += 1
|
||||||
entity_index.alive_count = alive_count
|
entity_index.alive_count = alive_count
|
||||||
local id = dense_array[alive_count]
|
local id = dense_array[alive_count]
|
||||||
|
@ -308,14 +292,11 @@ local function entity_index_new_id(entity_index: ecs_entity_index_t): i53
|
||||||
end
|
end
|
||||||
|
|
||||||
local id = max_id + 1
|
local id = max_id + 1
|
||||||
local range_end = entity_index.range_end
|
|
||||||
ecs_assert(range_end == nil or id < range_end, ECS_INTERNAL_ERROR_INCOMPATIBLE_ENTITY)
|
|
||||||
|
|
||||||
entity_index.max_id = id
|
entity_index.max_id = id
|
||||||
alive_count += 1
|
alive_count += 1
|
||||||
entity_index.alive_count = alive_count
|
entity_index.alive_count = alive_count
|
||||||
dense_array[alive_count] = id
|
dense_array[alive_count] = id
|
||||||
sparse_array[id] = { dense = alive_count } :: ecs_record_t
|
entity_index.sparse_array[id] = { dense = alive_count } :: ecs_record_t
|
||||||
|
|
||||||
return id
|
return id
|
||||||
end
|
end
|
||||||
|
@ -602,10 +583,10 @@ local function id_record_ensure(world: ecs_world_t, id: number): ecs_id_record_t
|
||||||
local is_pair = ECS_IS_PAIR(id)
|
local is_pair = ECS_IS_PAIR(id)
|
||||||
if is_pair then
|
if is_pair then
|
||||||
relation = entity_index_get_alive(entity_index, ECS_PAIR_FIRST(id)) :: i53
|
relation = entity_index_get_alive(entity_index, ECS_PAIR_FIRST(id)) :: i53
|
||||||
ecs_assert(relation and entity_index_is_alive(
|
assert(relation and entity_index_is_alive(
|
||||||
entity_index, relation), ECS_INTERNAL_ERROR)
|
entity_index, relation), ECS_INTERNAL_ERROR)
|
||||||
target = entity_index_get_alive(entity_index, ECS_PAIR_SECOND(id)) :: i53
|
target = entity_index_get_alive(entity_index, ECS_PAIR_SECOND(id)) :: i53
|
||||||
ecs_assert(target and entity_index_is_alive(
|
assert(target and entity_index_is_alive(
|
||||||
entity_index, target), ECS_INTERNAL_ERROR)
|
entity_index, target), ECS_INTERNAL_ERROR)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -738,101 +719,8 @@ local function archetype_create(world: ecs_world_t, id_types: { i24 }, ty, prev:
|
||||||
return archetype
|
return archetype
|
||||||
end
|
end
|
||||||
|
|
||||||
local function world_range(world: ecs_world_t, range_begin: number, range_end: number?)
|
local function world_entity(world: ecs_world_t): i53
|
||||||
local entity_index = world.entity_index
|
return entity_index_new_id(world.entity_index)
|
||||||
|
|
||||||
entity_index.range_begin = range_begin
|
|
||||||
entity_index.range_end = range_end
|
|
||||||
|
|
||||||
local max_id = entity_index.max_id
|
|
||||||
|
|
||||||
if range_begin > max_id then
|
|
||||||
local dense_array = entity_index.dense_array
|
|
||||||
local sparse_array = entity_index.sparse_array
|
|
||||||
|
|
||||||
for i = max_id + 1, range_begin do
|
|
||||||
dense_array[i] = i
|
|
||||||
sparse_array[i] = {
|
|
||||||
dense = 0
|
|
||||||
} :: ecs_record_t
|
|
||||||
end
|
|
||||||
entity_index.max_id = range_begin - 1
|
|
||||||
entity_index.alive_count = range_begin - 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function world_entity(world: ecs_world_t, entity: i53?): i53
|
|
||||||
local entity_index = world.entity_index
|
|
||||||
if entity then
|
|
||||||
local index = ECS_ID(entity)
|
|
||||||
local max_id = entity_index.max_id
|
|
||||||
local sparse_array = entity_index.sparse_array
|
|
||||||
local dense_array = entity_index.dense_array
|
|
||||||
local alive_count = entity_index.alive_count
|
|
||||||
local r = sparse_array[index]
|
|
||||||
if r then
|
|
||||||
local dense = r.dense
|
|
||||||
if not dense or dense == 0 then
|
|
||||||
dense = index
|
|
||||||
end
|
|
||||||
local any = dense_array[dense]
|
|
||||||
if any == entity then
|
|
||||||
if alive_count > dense then
|
|
||||||
r.dense = dense
|
|
||||||
return entity
|
|
||||||
end
|
|
||||||
local e_swap = dense_array[alive_count]
|
|
||||||
local r_swap = sparse_array[alive_count]
|
|
||||||
r_swap.dense = dense
|
|
||||||
r.dense = alive_count
|
|
||||||
dense_array[alive_count] = entity
|
|
||||||
dense_array[dense] = e_swap
|
|
||||||
return entity
|
|
||||||
end
|
|
||||||
|
|
||||||
-- assert(any ~= 0) should never happen
|
|
||||||
|
|
||||||
local e_swap = dense_array[alive_count]
|
|
||||||
local r_swap = sparse_array[alive_count]
|
|
||||||
|
|
||||||
if dense <= alive_count then
|
|
||||||
alive_count += 1
|
|
||||||
entity_index.alive_count = alive_count
|
|
||||||
end
|
|
||||||
|
|
||||||
r_swap.dense = dense
|
|
||||||
r.dense = alive_count
|
|
||||||
dense_array[alive_count] = any
|
|
||||||
dense_array[dense] = e_swap
|
|
||||||
return any
|
|
||||||
else
|
|
||||||
for i = max_id + 1, index do
|
|
||||||
sparse_array[i] = { dense = i } :: ecs_record_t
|
|
||||||
dense_array[i] = i
|
|
||||||
end
|
|
||||||
entity_index.max_id = index
|
|
||||||
|
|
||||||
local e_swap = dense_array[alive_count]
|
|
||||||
local r_swap = sparse_array[alive_count]
|
|
||||||
r_swap.dense = index
|
|
||||||
|
|
||||||
alive_count += 1
|
|
||||||
entity_index.alive_count = alive_count
|
|
||||||
|
|
||||||
r = sparse_array[index]
|
|
||||||
|
|
||||||
r.dense = alive_count
|
|
||||||
|
|
||||||
sparse_array[index] = r
|
|
||||||
|
|
||||||
dense_array[index] = e_swap
|
|
||||||
dense_array[alive_count] = entity
|
|
||||||
|
|
||||||
|
|
||||||
return entity
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return entity_index_new_id(entity_index, entity)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function world_parent(world: ecs_world_t, entity: i53)
|
local function world_parent(world: ecs_world_t, entity: i53)
|
||||||
|
@ -2423,8 +2311,6 @@ export type EntityIndex = {
|
||||||
sparse_array: Map<i24, Record>,
|
sparse_array: Map<i24, Record>,
|
||||||
alive_count: number,
|
alive_count: number,
|
||||||
max_id: number,
|
max_id: number,
|
||||||
range_begin: number?,
|
|
||||||
range_end: number?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local World = {}
|
local World = {}
|
||||||
|
@ -2446,7 +2332,6 @@ World.contains = world_contains
|
||||||
World.cleanup = world_cleanup
|
World.cleanup = world_cleanup
|
||||||
World.each = world_each
|
World.each = world_each
|
||||||
World.children = world_children
|
World.children = world_children
|
||||||
World.range = world_range
|
|
||||||
|
|
||||||
local function world_new()
|
local function world_new()
|
||||||
local entity_index = {
|
local entity_index = {
|
||||||
|
@ -2485,7 +2370,16 @@ local function world_new()
|
||||||
for i = EcsRest + 1, ecs_max_tag_id do
|
for i = EcsRest + 1, ecs_max_tag_id do
|
||||||
-- Initialize built-in components
|
-- Initialize built-in components
|
||||||
entity_index_new_id(entity_index)
|
entity_index_new_id(entity_index)
|
||||||
print("hm...", i)
|
end
|
||||||
|
|
||||||
|
for i, bundle in ecs_metadata do
|
||||||
|
for ty, value in bundle do
|
||||||
|
if value == NULL then
|
||||||
|
world_add(self, i, ty)
|
||||||
|
else
|
||||||
|
world_set(self, i, ty, value)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
world_add(self, EcsName, EcsComponent)
|
world_add(self, EcsName, EcsComponent)
|
||||||
|
@ -2510,16 +2404,6 @@ local function world_new()
|
||||||
|
|
||||||
world_add(self, EcsChildOf, ECS_PAIR(EcsOnDeleteTarget, EcsDelete))
|
world_add(self, EcsChildOf, ECS_PAIR(EcsOnDeleteTarget, EcsDelete))
|
||||||
|
|
||||||
for i, bundle in ecs_metadata do
|
|
||||||
for ty, value in bundle do
|
|
||||||
if value == NULL then
|
|
||||||
world_add(self, i, ty)
|
|
||||||
else
|
|
||||||
world_set(self, i, ty, value)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2570,9 +2454,6 @@ export type World = {
|
||||||
|
|
||||||
observable: any,
|
observable: any,
|
||||||
|
|
||||||
--- Enforce a check on entities to be created within desired range
|
|
||||||
range: (self: World, range_begin: number, range_end: number?) -> (),
|
|
||||||
|
|
||||||
--- Creates a new entity
|
--- Creates a new entity
|
||||||
entity: (self: World, id: Entity?) -> Entity,
|
entity: (self: World, id: Entity?) -> Entity,
|
||||||
--- Creates a new entity located in the first 256 ids.
|
--- Creates a new entity located in the first 256 ids.
|
||||||
|
@ -2677,8 +2558,6 @@ return {
|
||||||
ECS_META_RESET = ECS_META_RESET,
|
ECS_META_RESET = ECS_META_RESET,
|
||||||
|
|
||||||
IS_PAIR = (ECS_IS_PAIR :: any) :: <P, O>(pair: Pair<P, O>) -> boolean,
|
IS_PAIR = (ECS_IS_PAIR :: any) :: <P, O>(pair: Pair<P, O>) -> boolean,
|
||||||
ECS_PAIR_FIRST = ECS_PAIR_FIRST,
|
|
||||||
ECS_PAIR_SECOND = ECS_PAIR_SECOND,
|
|
||||||
pair_first = (ecs_pair_first :: any) :: <P, O>(world: World, pair: Pair<P, O>) -> Id<P>,
|
pair_first = (ecs_pair_first :: any) :: <P, O>(world: World, pair: Pair<P, O>) -> Id<P>,
|
||||||
pair_second = (ecs_pair_second :: any) :: <P, O>(world: World, pair: Pair<P, O>) -> Id<O>,
|
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,
|
||||||
|
|
|
@ -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.20250426T001101Z"
|
version = "0.5.5-nightly.20250423T001100Z"
|
||||||
|
|
||||||
[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.20250426T001101Z"
|
version = "0.5.5-nightly.20250423T001100Z"
|
||||||
|
|
||||||
[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 = "20250426T001103Z"
|
timestamp = "20250425T001100Z"
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
hm... 271
|
[38;1m7.3[0m [33;1mus[0m [38;1m 2[0m [33;1mkB[0m[38;1m│[0m [38;1mdelete children of entity[0m
|
||||||
[38;1m7.7[0m [33;1mus[0m [38;1m 3[0m [33;1mkB[0m[38;1m│[0m [38;1mdelete children of entity[0m
|
[38;1m8.8[0m [33;1mus[0m [38;1m 1[0m [33;1mkB[0m[38;1m│[0m [38;1mremove friends of entity[0m
|
||||||
[38;1m9.3[0m [33;1mus[0m [38;1m 1[0m [33;1mkB[0m[38;1m│[0m [38;1mremove friends 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
|
||||||
[38;1m349[0m [32;1mns[0m [38;1m 0[0m [32;1m B[0m[38;1m│[0m [38;1msimple deletion of entity[0m
|
|
||||||
*created [32;1me1000[0m[33;1mv0[0m
|
|
||||||
[37;1mworld:add()[0m
|
[37;1mworld:add()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1midempotent[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1midempotent[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1marchetype move[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1marchetype move[0m
|
||||||
|
@ -39,11 +37,7 @@ hm... 271
|
||||||
[37;1mworld:each()[0m
|
[37;1mworld:each()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
||||||
|
|
||||||
[37;1mworld:range()[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1m[0m
|
|
||||||
|
|
||||||
[37;1mworld:entity()[0m
|
[37;1mworld:entity()[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mdesired id[0m
|
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1munique IDs[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1munique IDs[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mgenerations[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mgenerations[0m
|
||||||
[32;1mPASS[0m[38;1m│[0m [38;1mpairs[0m
|
[32;1mPASS[0m[38;1m│[0m [38;1mpairs[0m
|
||||||
|
@ -119,5 +113,5 @@ hm... 271
|
||||||
[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;1m72/72 test cases passed in 31.076 ms.[0m
|
[38;1m70/70 test cases passed in 32.159 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.20250426T001101Z"
|
version = "0.5.5-nightly.20250423T001100Z"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue