diff --git a/docs/api/query.md b/docs/api/query.md index cd372c4..6555eec 100755 --- a/docs/api/query.md +++ b/docs/api/query.md @@ -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 -``` \ No newline at end of file +```