PHP 7.4.33
Preview: AudioContext.js Size: 617 B
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/three/src/audio/AudioContext.js
let _context;

/**
 * Manages the global audio context in the engine.
 *
 * @hideconstructor
 */
class AudioContext {

	/**
	 * Returns the global native audio context.
	 *
	 * @return {AudioContext} The native audio context.
	 */
	static getContext() {

		if ( _context === undefined ) {

			_context = new ( window.AudioContext || window.webkitAudioContext )();

		}

		return _context;

	}

	/**
	 * Allows to set the global native audio context from outside.
	 *
	 * @param {AudioContext} value - The native context to set.
	 */
	static setContext( value ) {

		_context = value;

	}

}

export { AudioContext };

Directory Contents

Dirs: 0 × Files: 5
Name Size Perms Modified Actions
14.96 KB lrw-r--r-- 2025-03-28 11:04:37
Edit Download
2.27 KB lrw-r--r-- 2025-03-28 11:04:37
Edit Download
617 B lrw-r--r-- 2025-03-28 11:04:37
Edit Download
4.65 KB lrw-r--r-- 2025-03-28 11:04:37
Edit Download
5.94 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).