Skip to main content

Function: addDepthComponent()

addDepthComponent(world, entity, options?): DepthEcsComponent

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

Attaches a DepthEcsComponent to entity.

Parameters

world

EcsWorld

The ECS world entity belongs to.

entity

number

The entity to attach the component to.

options?

Partial<DepthEcsComponent> = {}

Options for configuring the depth.

Returns

DepthEcsComponent

The attached component, for further tuning or runtime changes.