Function: addSpriteComponent()
addSpriteComponent(
world,entity,options):SpriteEcsComponent
Defined in: rendering/components/sprite-component.ts:107
Attaches a SpriteEcsComponent to entity.
Parameters
world
The ECS world entity belongs to.
entity
number
The entity to attach the component to.
options
SpriteRequiredOptions & Partial<SpriteEcsComponent>
Options for configuring the sprite. width, height,
and renderable have no sensible default and must always be provided.
Returns
The attached component, for further tuning or runtime changes.