mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
fix paths
This commit is contained in:
parent
f2e2defddf
commit
4709f4d915
1 changed files with 5 additions and 5 deletions
10
README.md
10
README.md
|
@ -28,10 +28,10 @@ local pair = jecs.pair
|
||||||
local ChildOf = world:component()
|
local ChildOf = world:component()
|
||||||
local Name = world:component()
|
local Name = world:component()
|
||||||
|
|
||||||
local function parent(entity)
|
local function parent(entity)
|
||||||
return world:target(entity, ChildOf)
|
return world:target(entity, ChildOf)
|
||||||
end
|
end
|
||||||
local function getName(entity)
|
local function getName(entity)
|
||||||
return world:get(entity, Name)
|
return world:get(entity, Name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ world:set(sara, Name, "sara")
|
||||||
|
|
||||||
print(getName(parent(sara)))
|
print(getName(parent(sara)))
|
||||||
|
|
||||||
for e in world:query(pair(ChildOf, alice)) do
|
for e in world:query(pair(ChildOf, alice)) do
|
||||||
print(getName(e), "is the child of alice")
|
print(getName(e), "is the child of alice")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@ end
|
||||||
|
|
||||||
21,000 entities 125 archetypes 4 random components queried.
|
21,000 entities 125 archetypes 4 random components queried.
|
||||||

|

|
||||||
Can be found under /benches/query.lua
|
Can be found under /benches/visual/query.luau
|
||||||
|
|
||||||
Inserting 8 components to an entity and updating them over 50 times.
|
Inserting 8 components to an entity and updating them over 50 times.
|
||||||

|

|
||||||
Can be found under /benches/insertions.lua
|
Can be found under /benches/visual/insertions.luau
|
||||||
|
|
Loading…
Reference in a new issue