Capítulo 305 de 859
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 );
Constructor
| Signature |
|---|
new PositionalAudioHelper( audio : PositionalAudio, range : number, divisionsInnerAngle : number, divisionsOuterAngle : number ) |
Properties
| Property | Description |
|---|---|
.audio : PositionalAudio | The audio to visualize. |
.divisionsInnerAngle : number | The number of divisions of the inner part of the directional cone. |
.divisionsOuterAngle : number | The number of divisions of the outer part of the directional cone. |
.range : number | The range of the directional cone. |
Methods
| Method | Description |
|---|---|
.dispose() | Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app. |
.update() | Updates the helper. This method must be called whenever the directional cone of the positional audio is changed. |