Import
PositionalAudioHelper is an addon, and must be imported explicitly, see Installation#Addons.
import { PositionalAudioHelper } from 'three/addons/helpers/PositionalAudioHelper.js';
Constructor
new PositionalAudioHelper( audio : PositionalAudio, range : number, divisionsInnerAngle : number, divisionsOuterAngle : number )
Constructs a new positional audio helper.
| audio |
The audio to visualize. |
| range |
The range of the directional cone. Default is |
| divisionsInnerAngle |
The number of divisions of the inner part of the directional cone. Default is |
| divisionsOuterAngle |
The number of divisions of the outer part of the directional cone. Default is |
Properties
.audio : PositionalAudio
The audio to visualize.
.divisionsInnerAngle : number
The number of divisions of the inner part of the directional cone.
Default is 16.
.divisionsOuterAngle : number
The number of divisions of the outer part of the directional cone.
Default is 2.
.range : number
The range of the directional cone.
Default is 1.
Methods
.dispose()
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
- Overrides: Line#dispose
.update()
Updates the helper. This method must be called whenever the directional cone of the positional audio is changed.