Baseline Widely available
The distanceModel
property of the PannerNode
interface is an enumerated value determining which algorithm to use to reduce the volume of the audio source as it moves away from the listener.
The possible values are:
linear
: A linear distance model calculating the gain induced by the distance according to: 1 - rolloffFactor * (distance - refDistance) / (maxDistance - refDistance)
inverse
: An inverse distance model calculating the gain induced by the distance according to: refDistance / (refDistance + rolloffFactor * (Math.max(distance, refDistance) - refDistance))
exponential
: An exponential distance model calculating the gain induced by the distance according to: pow((Math.max(distance, refDistance) / refDistance, -rolloffFactor)
.inverse
is the default value of distanceModel
.
An enum â see DistanceModelType
.
See BaseAudioContext.createPanner()
for example code.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4