ecs/query
imperative for-each iteration over component storages,
Since: E0/E1' (for-each1..3); E1 (Query, for-each4..8, defquery,
for-each
(for-each [world comps binds body])
truly variadic iteration over the intersection of
Since: E1
for-each1
(for-each1 [world A1 e v1 body])
thin shim over the variadic for-each.
Since: E1'
for-each2
(for-each2 [world A1 A2 e v1 v2 body])
thin shim over the variadic for-each.
Since: E1'
for-each3
(for-each3 [world A1 A2 A3 e v1 v2 v3 body])
thin shim over the variadic for-each.
Since: E1'
world-tagged?
(world-tagged? [world Tag e])
true if entity slot idx carries the named tag in the
Since: E1'
world-untagged?
(world-untagged? [world Tag e])
inverse of world-tagged?. Sugar for "the entity
Since: E1'
Query
(defstruct Query [^&in ^&out])
row-typed query handle, parameterised by *rows* of input and
Since: E1
make-query
(make-query [w : int] :)
wrap a world handle as an *untyped* Query (no row info).
Since: E1
query-world
(query-world)
unpack the world handle from a Query value. Returns the
Since: E1
defquery
(defquery [name w-sym world-type comps binds body])
name a for-each iteration as a `defn` over a specific
Since: E1
run-query!
(run-query! [q world])
call a defquery-defined query against a world. Sugar
Since: E1
Internal definitions
__fe-storages-- ----------------------------------------------------------------__fe-min-cap-- recursive helper: emit a tower of `if/<` that picks__fe-has-conj-- recursive helper: emit a chain of `if` short-__fe-value-binds-- recursive helper: wrap inner in nested `let`s