hudData beta
Function of @v12-engine/client
ts
export declare function hudData<T, S>(entity: EntityView, component: Component<T, S>): S | undefined;What a game's component says of a unit on this screen, where the host sends it here (Component.replicate, and what its snapshot makes of it for this player): how a plate shows a game's own data on every screen it is meant for. The data lives in the simulation (entity.set(component, …) in the rules); this reads what reached this player, undefined where nothing did. For a widget's value: { bar: (entity) => hudData(entity, rage)?.fill ?? 0 }