first commit
This commit is contained in:
25
web-app/node_modules/three/src/audio/AudioContext.js
generated
vendored
Normal file
25
web-app/node_modules/three/src/audio/AudioContext.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
let _context;
|
||||
|
||||
class AudioContext {
|
||||
|
||||
static getContext() {
|
||||
|
||||
if ( _context === undefined ) {
|
||||
|
||||
_context = new ( window.AudioContext || window.webkitAudioContext )();
|
||||
|
||||
}
|
||||
|
||||
return _context;
|
||||
|
||||
}
|
||||
|
||||
static setContext( value ) {
|
||||
|
||||
_context = value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export { AudioContext };
|
||||
Reference in New Issue
Block a user