ServerConfiguration/Calla/Calla-Lib/js/Calla.CJS.js
/**
     * Performs the spatialization operation for the audio source's latest location.
     * @param {Pose} loc
     */
Performs the spatialization operation for the audio source's latest location.
@param {Pose} loc
Performs the spatialization operation for the audio source ' s latest location . @param { Pose } loc
update(loc) {
        super.update(loc);
        this.delta.sub(loc.p, this.dest.p);
        const dist = this.delta.len,
            distScale = project(dist, this.minDistance, this.maxDistance);
        this.volume = 1 - clamp(distScale, 0, 1);
        this.volume = Math.round(100 * this.volume * this.volume) / 100;
        this.pan = dist > 0
            ? this.delta.x / dist
            : 0;
    }
update ( loc ) { super . update ( loc ) ; this . delta . sub ( loc . p , this . dest . p ) ; const dist = this . delta . len , distScale = project ( dist , this . minDistance , this . maxDistance ) ; this . volume = 1 - clamp ( distScale , 0 , 1 ) ; this . volume = Math . round ( 100 * this . volume * this . volume ) / 100 ; this . pan = dist > 0 ? this . delta . x / dist : 0 ; }
Performs the spatialization operation for the audio source's latest location.
Performs the spatialization operation for the audio source ' s latest location .