diff --git a/jecs.d.ts b/jecs.d.ts index b347d12..767f068 100755 --- a/jecs.d.ts +++ b/jecs.d.ts @@ -321,3 +321,6 @@ export type ComponentRecord = { } export function component_record(world: World, id: Id): ComponentRecord + +export function bulk_insert(world: World, entity: Entity, ids: C, values: InferComponents): void +export function bulk_remove(world: World, entity: Entity, ids: Entity[]): void \ No newline at end of file diff --git a/jecs.luau b/jecs.luau index f77f817..d027d8c 100755 --- a/jecs.luau +++ b/jecs.luau @@ -2033,7 +2033,7 @@ local function world_children(world: World, parent: Id) return world_each(world, ECS_PAIR(EcsChildOf, parent::number)) end -local function ecs_bulk_insert(world: World, entity: Entity, ids: { Entity }, values: { any }) +local function ecs_bulk_insert(world: World, entity: Entity, ids: { Id }, values: { any }) local entity_index = world.entity_index local r = entity_index_try_get(entity_index, entity) if not r then @@ -2111,7 +2111,7 @@ local function ecs_bulk_insert(world: World, entity: Entity, ids: { Entity }, va end end -local function ecs_bulk_remove(world: World, entity: Entity, ids: { Entity }) +local function ecs_bulk_remove(world: World, entity: Entity, ids: { Id }) local entity_index = world.entity_index local r = entity_index_try_get(entity_index, entity) if not r then @@ -2123,7 +2123,7 @@ local function ecs_bulk_remove(world: World, entity: Entity, ids: { Entity }) return end - local remove: { [Entity]: boolean } = {} + local remove: { [Id]: boolean } = {} local columns_map = from.columns_map