跳转到内容

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.

C extends object

K extends string | number | symbol

World

number

ComponentDef<C>

K

ReadonlySignal<C[K]>

() => void