Skip to main content

Function: addPositionComponent()

addPositionComponent(world, entity, options?): PositionEcsComponent

Defined in: common/components/position-component.ts:39

Attaches a PositionEcsComponent to entity.

Parameters

world

EcsWorld

The ECS world entity belongs to.

entity

number

The entity to attach the component to.

options?

Partial<PositionEcsComponent> = {}

Options for configuring the position.

Returns

PositionEcsComponent

The attached component, for further tuning or runtime changes.