Skip to main content

Function: addParticleComponent()

addParticleComponent(world, entity, options?): ParticleEcsComponent

Defined in: particles/components/particle-component.ts:24

Attaches a ParticleEcsComponent to entity.

Parameters​

world​

EcsWorld

The ECS world entity belongs to.

entity​

number

The entity to attach the component to.

options?​

Partial<ParticleEcsComponent> = {}

Options for configuring the particle.

Returns​

ParticleEcsComponent

The attached component, for further tuning or runtime changes.