i-audio-source-2d.component overview
Table of contents
utils
IAudioSource2dComponent (interface)
2D audio source: distance-rolloff tuning over the flat {x, y} ground plane, no cone/elevation
- there's no
Zin 2D, the same reasonPnt2has noZ/nZaxis constant.packages/audio's 2D implementation has no native distance-panning primitive to lean on (Web Audio'sStereoPannerNodeis pan-only) - it computes gain/pan itself everyIAudioSceneComponent.updatecall from these fields, using the same distance-model formulas 3D gets natively fromPannerNode.
Signature
export interface IAudioSource2dComponent<ATypeDoc extends AudioTypeDocRepo2D = AudioTypeDocRepo2D>
extends IAudioSourceComponent<Point2, number, ATypeDoc> {
refDistance: number
maxDistance: number
rolloffFactor: number
distanceModel: AudioDistanceModel
}