bind
bind<
C,K>(world,entity,component,field,source): () =>void
Defined in: ui/binding/bind.ts:23
Bind source to entity’s component.field: applied now and on every change.
Writes are guarded (skipped if the entity is gone or lacks the component), and
the binding tears itself down when the entity despawns. Returns a dispose to
unbind early.
Type Parameters
Section titled “Type Parameters”C extends object
K extends string | number | symbol
Parameters
Section titled “Parameters”entity
Section titled “entity”number
component
Section titled “component”ComponentDef<C>
K
source
Section titled “source”ReadonlySignal<C[K]>
Returns
Section titled “Returns”() => void