Skip to content

Commit

Permalink
using strict
Browse files Browse the repository at this point in the history
  • Loading branch information
KilledByAPixel committed Aug 31, 2019
1 parent 9141801 commit 6cb0393
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 5 additions & 3 deletions ZzFX.js
Expand Up @@ -28,6 +28,8 @@
*/

"use strict"; // strict mode

// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @output_file_name ZzFx.min.js
Expand Down Expand Up @@ -170,9 +172,9 @@ let ZZFX = new ZZFXLib;
// @output_file_name ZzFx.micro.js
// @js_externs zzfx, zzfx_x, zzfx_v
// ==/ClosureCompiler==
zzfx_v = .5; // volume
zzfx_x = new AudioContext; // audio context
zzfx = function // play a sound
let zzfx_v = .5; // volume
let zzfx_x = new AudioContext; // audio context
function zzfx // play a sound
(
volume,
randomness,
Expand Down
Binary file modified favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions index.html
Expand Up @@ -151,6 +151,8 @@
<script src="ZzFX.micro.js"></script>
<script>

"use strict"; // strict mode

///////////////////////////////////////////////////////////////////////////////
// ZzFX audio code

Expand Down Expand Up @@ -225,7 +227,10 @@
}
if (!first)
code += '}';
code += '); // ZZFX.Z(';
code += ');';

/*
code += '// ZZFX.Z(';
// show full parameters as comment
first = 1;
Expand All @@ -244,7 +249,7 @@
first = 0;
}
code += '); // ZzFX ' + sound.seed;
code += '); // ZzFX ' + sound.seed;*/
return code;
}

Expand Down

0 comments on commit 6cb0393

Please sign in to comment.