Skip to main content

Function: addRotationComponent()

addRotationComponent(world, entity, options?): RotationEcsComponent

Defined in: common/components/rotation-component.ts:26

Attaches a RotationEcsComponent to entity.

Parameters

world

EcsWorld

The ECS world entity belongs to.

entity

number

The entity to attach the component to.

options?

Partial<RotationEcsComponent> = {}

Options for configuring the rotation.

Returns

RotationEcsComponent

The attached component, for further tuning or runtime changes.