Visit the Documentation of the upcoming Threlte 6.
  1. @threlte/core
  2. PositionalAudioHelper

@threlte/core

PositionalAudioHelper

This module will be moved to @threlte/extras at some point in the future. Please read the update notice.

This helper displays the directional cone of a <PositionalAudio> component and needs to be a direct child it.

Import

Source

Github View Source Code

Package

NPM View Package

Related Docs


Example

<script>
  import { PositionalAudio, PositionalAudioHelper } from '@threlte/core'
</script>

<PositionalAudio
  directionalCone={{
    coneInnerAngle: 90,
    coneOuterAngle: 220,
    coneOuterGain: 0.3
  }}
  source={'/audio/some-track.mp3'}
>
  <PositionalAudioHelper />
</PositionalAudio>

Properties

// required
pass: THREE.Pass