Skip to content

r3f-xr-widgets / AudioEffects

Function: AudioEffects()

AudioEffects(): Element

Defined in: src/components/HandleWithAudio.tsx:49

Global audio effect sources for HandleWithAudio interactions

Renders two invisible PositionalAudio sources that HandleWithAudio components reference for spatial audio feedback. The audio sources are positioned at the handle's location when interactions begin and end.

Must be placed somewhere in your scene (typically at the root level) for HandleWithAudio components to have audio feedback.

Returns

Element

Example

tsx
import { Canvas } from '@react-three/fiber'
import { AudioEffects, ResizableWindow } from 'r3f-xr-widgets'

function App() {
  return (
    <Canvas>
      <AudioEffects />
      <ResizableWindow>
        {/* content */}
      </ResizableWindow>
    </Canvas>
  )
}

See

HandleWithAudio

Released under the MIT License.