File: PositionalAudioHelper.md | Updated: 11/15/2025
This helper displays the directional cone of a positional audio.
PositionalAudioHelper must be added as a child of the positional audio.
const positionalAudio = new THREE.PositionalAudio( listener );
positionalAudio.setDirectionalCone( 180, 230, 0.1 );
scene.add( positionalAudio );
const helper = new PositionalAudioHelper( positionalAudio );
positionalAudio.add( helper );
PositionalAudioHelper is an addon, and must be imported explicitly, see Installation#Addons.
import { PositionalAudioHelper } from 'three/addons/helpers/PositionalAudioHelper.js';
Constructs a new positional audio helper.
audio | The audio to visualize.
---|---
range | The range of the directional cone. Default is 1.
divisionsInnerAngle | The number of divisions of the inner part of the directional cone. Default is 16.
divisionsOuterAngle | The number of divisions of the outer part of the directional cone. Default is 2.
The audio to visualize.
The number of divisions of the inner part of the directional cone.
Default is 16.
The number of divisions of the outer part of the directional cone.
Default is 2.
The range of the directional cone.
Default is 1.
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
Updates the helper. This method must be called whenever the directional cone of the positional audio is changed.