mirror of
https://github.com/Ukendio/jecs.git
synced 2025-08-03 18:59:18 +00:00
Update query.md - formatting
Some checks are pending
Some checks are pending
This commit is contained in:
parent
0606bf70f0
commit
998b1d3528
1 changed files with 6 additions and 1 deletions
|
@ -13,6 +13,8 @@ function Query:cached(): Query -- Returns the cached Query
|
|||
```
|
||||
Example:
|
||||
|
||||
::: code-group
|
||||
|
||||
```luau [luau]
|
||||
local lerps = world:query(Lerp):cached() -- Ensure that you cache this outside a system so you do not create a new cache for a query every frame
|
||||
|
||||
|
@ -31,6 +33,9 @@ function system(dt) {
|
|||
// Do something
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
## with
|
||||
|
||||
|
@ -142,4 +147,4 @@ local iterator = query:iter()
|
|||
for entity, position, velocity in iterator do
|
||||
-- Process entity
|
||||
end
|
||||
```
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue