From fc2b156e79c9c83bc549d8092b915facefcd8318 Mon Sep 17 00:00:00 2001 From: EncodedVenom Date: Sat, 15 Jun 2024 15:10:09 -0400 Subject: [PATCH] Remove non-user facing types --- lib/index.d.ts | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index e4f6f81..18d27c1 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1,48 +1,39 @@ -type i53 = number; -type i24 = number; - -type Ty = Array; - -type Column = Array; - type Archetype = { id: number, edges: { - [key: i53]: { + [key: number]: { add: Archetype, remove: Archetype, }, }, - types: Ty, + types: Array, type: string | number, entities: Array, - columns: Array, + columns: Array>, records: { [key: number]: number }, } type ArchetypeMap = { - cache: Array, + cache: Array, first: ArchetypeMap, second: ArchetypeMap, parent: ArchetypeMap, size: number, } -type ArchetypeRecord = number; - type EntityIndex = { dense: { - [key: i24]: i53 + [key: number]: number }; sparse: { - [key: i53]: Record + [key: number]: Record } } type Record = { archetype: Archetype, row: number, - dense: i24, + dense: number, componentRecord: ArchetypeMap, } @@ -174,12 +165,12 @@ export const Wildcard: Entity; export const w: Entity; export const REST: Entity; -export const IS_PAIR: (e: number) => boolean; -export const ECS_ID: (e: i53) => i24; -export const ECS_PAIR: (pred: i53, obj: i53) => i53; -export const ECS_GENERATION_INC: (e: i53) => i53; -export const ECS_GENERATION: (e: i53) => i53; -export const ECS_PAIR_RELATION: (entityIndex: EntityIndex, e: Entity) => i53; -export const ECS_PAIR_OBJECT: (entityIndex: EntityIndex, e: Entity) => i53; +export const IS_PAIR: (e: Entity) => boolean; +export const ECS_ID: (e: Entity) => Entity; +export const ECS_PAIR: (pred: Entity, obj: Entity) => Entity; +export const ECS_GENERATION_INC: (e: Entity) => Entity; +export const ECS_GENERATION: (e: Entity) => Entity; +export const ECS_PAIR_RELATION: (entityIndex: EntityIndex, e: Entity) => Entity; +export const ECS_PAIR_OBJECT: (entityIndex: EntityIndex, e: Entity) => Entity; -export const getAlive: (entityIndex: EntityIndex, id: i24) => i53; \ No newline at end of file +export const getAlive: (entityIndex: EntityIndex, id: Entity) => Entity; \ No newline at end of file