Function: addTextComponent()
addTextComponent(
world,entity,options):TextEcsComponent
Defined in: text/components/text-component.ts:197
Attaches a TextEcsComponent to entity.
Parameters
world
The ECS world entity belongs to.
entity
number
The entity to attach the component to.
options
TextRequiredOptions & Partial<TextEcsComponent>
Options for configuring the text. text, fontAtlas,
and size have no sensible default and must always be provided.
Returns
The attached component, for further tuning or runtime changes.