Compare commits

..

No commits in common. "998b1d35281f54aa562710cba61851a2194ae0c9" and "3e46b723e9f2fa04a761fe953ef3bda04693677f" have entirely different histories.

2 changed files with 3 additions and 8 deletions

View file

@ -13,8 +13,6 @@ function Query:cached(): Query -- Returns the cached Query
``` ```
Example: Example:
::: code-group
```luau [luau] ```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 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
@ -33,9 +31,6 @@ function system(dt) {
// Do something // Do something
} }
} }
```
:::
## with ## with

4
jecs.d.ts vendored
View file

@ -156,8 +156,8 @@ export class World {
* @param hook The hook to install. * @param hook The hook to install.
* @param value The hook callback. * @param value The hook callback.
*/ */
set<T>(component: Entity<T>, hook: StatefulHook, value: (e: Entity, id: Id<T>, data: T) => void): void; set<T>(component: Entity<T>, hook: StatefulHook, value: (e: Entity<T>, id: Id<T>, data: T) => void): void;
set<T>(component: Entity<T>, hook: StatelessHook, value: (e: Entity, id: Id<T>) => void): void; set<T>(component: Entity<T>, hook: StatelessHook, value: (e: Entity<T>, id: Id<T>) => void): void;
/** /**
* Assigns a value to a component on the given entity. * Assigns a value to a component on the given entity.
* @param entity The target entity. * @param entity The target entity.