Declares a system and returns it; nothing runs. The arguments tell the forms apart:
create(body): a system that declares nothing, whose body runs once per run with its resources and commands.create(declaration, body): a system.create([move, collide]): a composite of the systems listed, which may live on different threads.create({ systems: [move, collide], after: [input] }): a composite with constraints.What a body reads, writes and reduces into the build infers from it. Each run passes a composite's members one
input, with every field of theirs. Throws if a system names a key that isn't registered as its kind, its body writes
a reference, a lookup's rows are read where it writes them or it goes through an index keyed by what it writes, its
rows are ordered by an index it isn't sorted or keyed by what it writes, its object components and resources live on
different threads, or its reductions, conditions, up, order or placement can't hold, or it's an observer and
writes, reduces, takes input, is a kernel, has up or is ordered; if the build couldn't follow how its body uses its
resources, lookups or parent; or if a composite's member isn't a system a constructor returned, or two members
declare an input field with different schemas. A composite's observer members run after its sync point, ordered
with nothing.
A run of a system without components resolves to what its body returns, or undefined when its conditions, resource
change filters or index lookups' changed: true skip it; a run of any other system or a composite to nothing. A
body returns no promise, by type and at runtime, where returning one fails its system: a run never waits for one.
One argument, a body or a composite, is one overload, so a mistake in it is reported where it is rather than as no overload matching.
Declares a system and returns it; nothing runs. The arguments tell the forms apart:
create(body): a system that declares nothing, whose body runs once per run with its resources and commands.create(declaration, body): a system.create([move, collide]): a composite of the systems listed, which may live on different threads.create({ systems: [move, collide], after: [input] }): a composite with constraints.What a body reads, writes and reduces into the build infers from it. Each run passes a composite's members one input, with every field of theirs. Throws if a system names a key that isn't registered as its kind, its body writes a reference, a lookup's rows are read where it writes them or it goes through an index keyed by what it writes, its rows are ordered by an index it isn't sorted or keyed by what it writes, its object components and resources live on different threads, or its reductions, conditions,
up,orderor placement can't hold, or it's an observer and writes, reduces, takes input, is a kernel, hasupor is ordered; if the build couldn't follow how its body uses its resources, lookups or parent; or if a composite's member isn't a system a constructor returned, or two members declare an input field with different schemas. A composite's observer members run after its sync point, ordered with nothing.A run of a system without components resolves to what its body returns, or
undefinedwhen its conditions, resource change filters or index lookups'changed: trueskip it; a run of any other system or a composite to nothing. A body returns no promise, by type and at runtime, where returning one fails its system: a run never waits for one.One argument, a body or a composite, is one overload, so a mistake in it is reported where it is rather than as no overload matching.