mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-25 09:30:03 +00:00
Fix typo
This commit is contained in:
parent
459e670ce9
commit
02548f2ac0
1 changed files with 65 additions and 73 deletions
|
@ -649,8 +649,8 @@ do
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local records = archetype.records
|
local tr = archetype.records
|
||||||
local columns = archetype.records
|
local columns = archetype.columns
|
||||||
local row = record.row
|
local row = record.row
|
||||||
|
|
||||||
local va = fetch(a, tr, columns, row)
|
local va = fetch(a, tr, columns, row)
|
||||||
|
@ -855,23 +855,17 @@ do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local cache
|
|
||||||
|
|
||||||
function world_query(world: World, ...: number): Query
|
function world_query(world: World, ...: number): Query
|
||||||
-- breaking?
|
-- breaking?
|
||||||
if (...) == nil then
|
if (...) == nil then
|
||||||
error("Missing components")
|
error("Missing components")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
indices = {}
|
indices = {}
|
||||||
|
compatibleArchetypes = {}
|
||||||
length = 0
|
length = 0
|
||||||
components = { ... }
|
components = { ... }
|
||||||
|
|
||||||
if cache then
|
|
||||||
compatibleArchetypes = cache
|
|
||||||
else
|
|
||||||
compatibleArchetypes = {}
|
|
||||||
local archetypes: { Archetype } = world.archetypes :: any
|
local archetypes: { Archetype } = world.archetypes :: any
|
||||||
local firstArchetypeMap: ArchetypeMap
|
local firstArchetypeMap: ArchetypeMap
|
||||||
local componentIndex = world.componentIndex
|
local componentIndex = world.componentIndex
|
||||||
|
@ -913,8 +907,6 @@ do
|
||||||
indices[length] = records
|
indices[length] = records
|
||||||
end
|
end
|
||||||
|
|
||||||
cache = compatibleArchetypes
|
|
||||||
end
|
|
||||||
lastArchetype = 1
|
lastArchetype = 1
|
||||||
archetype = compatibleArchetypes[lastArchetype]
|
archetype = compatibleArchetypes[lastArchetype]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue