File tree Expand file tree Collapse file tree 2 files changed +473
-92
lines changed Expand file tree Collapse file tree 2 files changed +473
-92
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,17 @@ let initializedAudioWorklets = false;
9
9
10
10
function loadAudioWorkletModules ( ) {
11
11
return Promise . all (
12
- moduleSources . map ( function ( moduleSrc ) {
12
+ moduleSources . map ( function ( moduleSrc ) {
13
13
const blob = new Blob ( [ moduleSrc ] , { type : 'application/javascript' } ) ;
14
14
const objectURL = URL . createObjectURL ( blob ) ;
15
- return ac . audioWorklet
16
- . addModule ( objectURL )
17
- // in "p5 instance mode," the module may already be registered
18
- . catch ( ( ) => Promise . resolve ( ) ) ;
19
- } ) ) ;
15
+ return (
16
+ ac . audioWorklet
17
+ . addModule ( objectURL )
18
+ // in "p5 instance mode," the module may already be registered
19
+ . catch ( ( ) => Promise . resolve ( ) )
20
+ ) ;
21
+ } )
22
+ ) ;
20
23
}
21
24
22
25
p5 . prototype . registerMethod ( 'init' , function ( ) {
You can’t perform that action at this time.
0 commit comments