Function: addAudioComponent()
addAudioComponent(
world,entity,options):AudioEcsComponent
Defined in: audio/components/audio-component.ts:50
Attaches a AudioEcsComponent to entity.
Parameters
world
The ECS world entity belongs to.
entity
number
The entity to attach the component to.
options
AudioRequiredOptions & Partial<AudioEcsComponent>
Options for configuring the audio. sound has no
sensible default and must always be provided.
Returns
The attached component, for further tuning or runtime changes.