41 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			41 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
|  | export default Attenuation; | ||
|  | /** | ||
|  |  * @class Attenuation | ||
|  |  * @description Distance-based attenuation filter. | ||
|  |  * @param {AudioContext} context | ||
|  |  * Associated {@link | ||
|  | https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext}.
 | ||
|  |  * @param {Object} options | ||
|  |  * @param {Number} options.minDistance | ||
|  |  * Min. distance (in meters). Defaults to | ||
|  |  * {@linkcode Utils.DEFAULT_MIN_DISTANCE DEFAULT_MIN_DISTANCE}. | ||
|  |  * @param {Number} options.maxDistance | ||
|  |  * Max. distance (in meters). Defaults to | ||
|  |  * {@linkcode Utils.DEFAULT_MAX_DISTANCE DEFAULT_MAX_DISTANCE}. | ||
|  |  * @param {string} options.rolloff | ||
|  |  * Rolloff model to use, chosen from options in | ||
|  |  * {@linkcode Utils.ATTENUATION_ROLLOFFS ATTENUATION_ROLLOFFS}. Defaults to | ||
|  |  * {@linkcode Utils.DEFAULT_ATTENUATION_ROLLOFF DEFAULT_ATTENUATION_ROLLOFF}. | ||
|  |  */ | ||
|  | declare class Attenuation { | ||
|  |     constructor(context: any, options: any); | ||
|  |     minDistance: any; | ||
|  |     maxDistance: any; | ||
|  |     _gainNode: any; | ||
|  |     input: any; | ||
|  |     output: any; | ||
|  |     /** | ||
|  |      * Set distance from the listener. | ||
|  |      * @param {Number} distance Distance (in meters). | ||
|  |      */ | ||
|  |     setDistance(distance: number): void; | ||
|  |     /** | ||
|  |      * Set rolloff. | ||
|  |      * @param {string} rolloff | ||
|  |      * Rolloff model to use, chosen from options in | ||
|  |      * {@linkcode Utils.ATTENUATION_ROLLOFFS ATTENUATION_ROLLOFFS}. | ||
|  |      */ | ||
|  |     setRolloff(rolloff: string): void; | ||
|  |     _rolloff: string; | ||
|  | } |