core.component
apply-system
(apply-system system m & args)
def
macro
(def k attr-map)
(def k attr-map v & sys-impls)
Defines a component with key 'k'. User-data attr-map.
v is let-bound over every fn-implementation;
Example:
(defcomponent :entity/animation {:schema animation}
animation
(entity/render [_ g]
(g/render-animation animation)))
defn
macro
(defn sys-name params)
Defines a component function with the given parameter vector.
See also core.component/def.
Obligatory first parameter: component, a vector of [key/attribute value].
Dispatching on component attribute.
update-map
(update-map m multimethod & args)
Recursively calls (assoc m k (apply component/fn [k v] args)) for every k of (keys (methods component/fn)),
which is non-nil/false in m.