From feded2aa456934df304391bf87252b31c80405c5 Mon Sep 17 00:00:00 2001 From: cstuncsik Date: Wed, 10 Jun 2015 07:57:21 +0200 Subject: [PATCH] improve music --- .jshintrc | 3 +- README.md | 2 +- app/index.html | 3 + app/scripts/core.js | 21 +- app/scripts/music.js | 2112 ++++++++++++++++------------------- dist/index.html | 2 +- dist/inlined-compressed.zip | Bin 12743 -> 12762 bytes dist/j-0a2ea4c1de.js | 3 + 8 files changed, 981 insertions(+), 1165 deletions(-) create mode 100644 dist/j-0a2ea4c1de.js diff --git a/.jshintrc b/.jshintrc index e4b8122..a320d44 100644 --- a/.jshintrc +++ b/.jshintrc @@ -88,6 +88,7 @@ "globals" : { "game": true, "jsfxr": true, - "Stats": true + "Stats": true, + "sonantx": true } } diff --git a/README.md b/README.md index 85cfc4d..1a399bd 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ You can try it [here](http://fewa.comformity.hu/) **Game sound inspired by:** [@jackrugile](https://twitter.com/jackrugile) (http://codepen.io/jackrugile/blog/arcade-audio-for-js13k-games) -**Game music** Sonant-X (https://github.com/nicolas-van/sonant-x) +**Game music:** Sonant-X (https://github.com/nicolas-van/sonant-x) by nicolas-van **Game random number utility inspired by:** # JS13KGames Boilerplate (https://github.com/ooflorent/js13k-boilerplate/blob/master/src/rng.js) diff --git a/app/index.html b/app/index.html index 6c8f2a4..1a833a0 100644 --- a/app/index.html +++ b/app/index.html @@ -45,6 +45,9 @@

Credits

(http://codepen.io/jackrugile/blog/arcade-audio-for-js13k-games)

+

Game music: Sonant-X (https://github.com/nicolas-van/sonant-x) by @nicolas-van +

+

Game random number utility inspired by: # JS13KGames Boilerplate (https://github.com/ooflorent/js13k-boilerplate/blob/master/src/rng.js)

diff --git a/app/scripts/core.js b/app/scripts/core.js index ff48310..5b6dab1 100644 --- a/app/scripts/core.js +++ b/app/scripts/core.js @@ -62,6 +62,12 @@ }, mute: function () { game.audio.mute = !game.audio.mute; + for (var track in game.music.pool) { + if (game.music.pool.hasOwnProperty(track)) { + var music = game.music.pool[track]; + music.volume(game.audio.mute ? 0 : 0.4); + } + } }, menu: function (resume) { game.paused = true; @@ -431,6 +437,12 @@ }, init: function () { + game.music.generate('main', function (music) { + music.loop = true; + music.volume(0.4); + music.start(); + }); + game.obj.extend(true, game, { ww: window.innerWidth, wh: window.innerHeight, @@ -496,15 +508,6 @@ game.stats(); game.menu(); - var audioCtx = new AudioContext(); - var songGen = new sonantx.MusicGenerator(song); - songGen.createAudioBuffer(function(buffer) { - var source = audioCtx.createBufferSource(); // Create Sound Source - source.buffer = buffer; // Add Buffered Data to Object - source.connect(audioCtx.destination); // Connect Sound Source to Output - source.start(); - }); - } }); diff --git a/app/scripts/music.js b/app/scripts/music.js index 42c5bc3..122074f 100644 --- a/app/scripts/music.js +++ b/app/scripts/music.js @@ -1,1175 +1,981 @@ (function () { "use strict"; - window.song = { - "songLen": 145, - "songData": [ - { - "osc1_oct": 9, - "osc1_det": 0, - "osc1_detune": 0, - "osc1_xenv": 0, - "osc1_vol": 161, - "osc1_waveform": 0, - "osc2_oct": 9, - "osc2_det": 0, - "osc2_detune": 4, - "osc2_xenv": 0, - "osc2_vol": 182, - "osc2_waveform": 0, - "noise_fader": 0, - "env_attack": 100, - "env_sustain": 1818, - "env_release": 18181, - "env_master": 192, - "fx_filter": 0, - "fx_freq": 0, - "fx_resonance": 254, - "fx_delay_time": 6, - "fx_delay_amt": 108, - "fx_pan_freq": 3, - "fx_pan_amt": 61, - "lfo_osc1_freq": 0, - "lfo_fx_freq": 0, - "lfo_freq": 3, - "lfo_amt": 94, - "lfo_waveform": 2, - "p": [ - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 0, - 2, - 3, - 4, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 5 - ], - "c": [ - { - "n": [ - 142, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 140, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 138, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - { - "n": [ - 135, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 135, - 0, - 0, - 0, - 138, - 0, - 0, - 0 - ] - }, - { - "n": [ - 140, - 0, - 138, - 0, - 135, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 130, - 0, - 142, - 0, - 140, - 0, - 135, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 138, - 0, - 0, - 0 - ] - }, - { - "n": [ - 135, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 130, - 0, - 142, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 135, - 0, - 0, - 0, - 138, - 0, - 0, - 0 - ] - }, - { - "n": [ - 123, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - { - "n": [ - 130, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - { - "n": [ - 128, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - { - "n": [ - 119, - 131, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 126, - 114, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - } - ] - }, - { - "osc1_oct": 8, - "osc1_det": 0, - "osc1_detune": 0, - "osc1_xenv": 0, - "osc1_vol": 0, - "osc1_waveform": 0, - "osc2_oct": 8, - "osc2_det": 0, - "osc2_detune": 0, - "osc2_xenv": 0, - "osc2_vol": 0, - "osc2_waveform": 0, - "noise_fader": 19, - "env_attack": 100, - "env_sustain": 0, - "env_release": 3636, - "env_master": 192, - "fx_filter": 1, - "fx_freq": 8100, - "fx_resonance": 156, - "fx_delay_time": 2, - "fx_delay_amt": 22, - "fx_pan_freq": 3, - "fx_pan_amt": 43, - "lfo_osc1_freq": 0, - "lfo_fx_freq": 0, - "lfo_freq": 0, - "lfo_amt": 0, - "lfo_waveform": 0, - "p": [ - 0, - 0, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2, - 1, - 2 - ], - "c": [ - { - "n": [ - 135, - 0, - 135, - 0, - 0, - 135, - 0, - 135, - 135, - 0, - 135, - 0, - 0, - 135, - 0, - 135, - 135, - 0, - 135, - 0, - 0, - 135, - 0, - 135, - 135, - 0, - 135, - 0, - 0, - 135, - 0, - 135 - ] - }, - { - "n": [ - 135, - 0, - 135, - 0, - 0, - 135, - 0, - 135, - 135, - 0, - 135, - 0, - 0, - 135, - 0, - 135, - 135, - 0, - 135, - 0, - 0, - 135, - 0, - 135, - 135, - 0, - 135, - 0, - 135, - 0, - 135, - 135 - ] + + game.music = { + generate: function (name, cb) { + var audioCtx = new AudioContext(); + var songGen = new sonantx.MusicGenerator(this.tracks[name]); + + songGen.createAudioBuffer(function (buffer) { + var source = audioCtx.createBufferSource(), + gainNode = audioCtx.createGain(); + + source.buffer = buffer; + source.connect(gainNode); + gainNode.connect(audioCtx.destination); + source.volume = function (vol) { + if (vol > -1) { + gainNode.gain.value = vol; + } else { + return gainNode.gain.value; } - ] - }, - { - "osc1_oct": 6, - "osc1_det": 0, - "osc1_detune": 0, - "osc1_xenv": 0, - "osc1_vol": 192, - "osc1_waveform": 1, - "osc2_oct": 8, - "osc2_det": 0, - "osc2_detune": 8, - "osc2_xenv": 0, - "osc2_vol": 82, - "osc2_waveform": 2, - "noise_fader": 0, - "env_attack": 100, - "env_sustain": 4545, - "env_release": 2727, - "env_master": 192, - "fx_filter": 3, - "fx_freq": 2700, - "fx_resonance": 85, - "fx_delay_time": 6, - "fx_delay_amt": 60, - "fx_pan_freq": 6, - "fx_pan_amt": 86, - "lfo_osc1_freq": 0, - "lfo_fx_freq": 1, - "lfo_freq": 7, - "lfo_amt": 106, - "lfo_waveform": 0, - "p": [ - 0, - 0, - 0, - 0, - 1, - 1, - 2, - 3, - 1, - 1, - 2, - 3, - 1, - 1, - 2, - 3, - 1, - 1, - 2, - 3, - 1, - 1, - 2, - 3 - ], - "c": [ + }; + this.pool[name] = source; + cb(source); + }.bind(this)); + }, + pool: {}, + tracks: { + main: { + "songLen": 198, + "songData": [ { - "n": [ - 135, - 135, - 147, - 135, - 0, - 135, - 147, - 135, - 135, - 135, - 147, - 135, - 0, - 135, - 147, - 135, - 135, - 135, - 147, - 135, - 0, - 135, - 147, - 135, - 135, - 135, - 147, - 135, - 0, - 135, - 147, - 135 + "osc1_oct": 9, + "osc1_det": 0, + "osc1_detune": 0, + "osc1_xenv": 0, + "osc1_vol": 161, + "osc1_waveform": 0, + "osc2_oct": 9, + "osc2_det": 0, + "osc2_detune": 4, + "osc2_xenv": 0, + "osc2_vol": 182, + "osc2_waveform": 0, + "noise_fader": 0, + "env_attack": 100, + "env_sustain": 1818, + "env_release": 18181, + "env_master": 192, + "fx_filter": 0, + "fx_freq": 0, + "fx_resonance": 254, + "fx_delay_time": 6, + "fx_delay_amt": 108, + "fx_pan_freq": 3, + "fx_pan_amt": 61, + "lfo_osc1_freq": 0, + "lfo_fx_freq": 0, + "lfo_freq": 3, + "lfo_amt": 94, + "lfo_waveform": 2, + "p": [ + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 0, + 2, + 3, + 4, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 1, + 2, + 1, + 2, + 3, + 4, + 5, + 6, + 5, + 6, + 7, + 8 + ], + "c": [ + { + "n": [ + 142, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 140, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 138, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "n": [ + 135, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 135, + 0, + 0, + 0, + 138, + 0, + 0, + 0 + ] + }, + { + "n": [ + 140, + 0, + 138, + 0, + 135, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 130, + 0, + 142, + 0, + 140, + 0, + 135, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 138, + 0, + 0, + 0 + ] + }, + { + "n": [ + 135, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 130, + 0, + 142, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 135, + 0, + 0, + 0, + 138, + 0, + 0, + 0 + ] + }, + { + "n": [ + 123, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "n": [ + 130, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "n": [ + 128, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + "n": [ + 119, + 131, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 126, + 114, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } ] }, { - "n": [ - 140, - 140, - 152, - 140, - 0, - 140, - 152, - 140, - 140, - 140, - 152, - 140, - 0, - 140, - 152, - 140, - 140, - 140, - 152, - 140, - 0, - 140, - 152, - 140, - 140, - 140, - 152, - 140, - 0, - 140, - 152, - 142 + "osc1_oct": 8, + "osc1_det": 0, + "osc1_detune": 0, + "osc1_xenv": 0, + "osc1_vol": 0, + "osc1_waveform": 0, + "osc2_oct": 8, + "osc2_det": 0, + "osc2_detune": 0, + "osc2_xenv": 0, + "osc2_vol": 0, + "osc2_waveform": 0, + "noise_fader": 19, + "env_attack": 100, + "env_sustain": 0, + "env_release": 3636, + "env_master": 192, + "fx_filter": 1, + "fx_freq": 8100, + "fx_resonance": 156, + "fx_delay_time": 2, + "fx_delay_amt": 22, + "fx_pan_freq": 3, + "fx_pan_amt": 43, + "lfo_osc1_freq": 0, + "lfo_fx_freq": 0, + "lfo_freq": 0, + "lfo_amt": 0, + "lfo_waveform": 0, + "p": [ + 0, + 0, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2, + 1, + 2 + ], + "c": [ + { + "n": [ + 135, + 0, + 135, + 0, + 0, + 135, + 0, + 135, + 135, + 0, + 135, + 0, + 0, + 135, + 0, + 135, + 135, + 0, + 135, + 0, + 0, + 135, + 0, + 135, + 135, + 0, + 135, + 0, + 0, + 135, + 0, + 135 + ] + }, + { + "n": [ + 135, + 0, + 135, + 0, + 0, + 135, + 0, + 135, + 135, + 0, + 135, + 0, + 0, + 135, + 0, + 135, + 135, + 0, + 135, + 0, + 0, + 135, + 0, + 135, + 135, + 0, + 135, + 0, + 135, + 0, + 135, + 135 + ] + } ] }, { - "n": [ - 131, - 131, - 143, - 131, - 0, - 131, - 143, - 131, - 131, - 131, - 143, - 131, - 0, - 131, - 143, - 131, - 138, - 138, - 150, - 138, - 0, - 138, - 150, - 138, - 138, - 138, - 150, - 138, - 0, - 138, - 150, - 137 - ] - } - ] - }, - { - "osc1_oct": 7, - "osc1_det": 0, - "osc1_detune": 0, - "osc1_xenv": 0, - "osc1_vol": 187, - "osc1_waveform": 2, - "osc2_oct": 5, - "osc2_det": 0, - "osc2_detune": 2, - "osc2_xenv": 1, - "osc2_vol": 161, - "osc2_waveform": 2, - "noise_fader": 0, - "env_attack": 100, - "env_sustain": 1818, - "env_release": 2727, - "env_master": 123, - "fx_filter": 1, - "fx_freq": 1900, - "fx_resonance": 162, - "fx_delay_time": 2, - "fx_delay_amt": 153, - "fx_pan_freq": 6, - "fx_pan_amt": 61, - "lfo_osc1_freq": 0, - "lfo_fx_freq": 1, - "lfo_freq": 2, - "lfo_amt": 196, - "lfo_waveform": 3, - "p": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 2, - 1, - 1, - 1, - 2, - 3 - ], - "c": [ - { - "n": [ - 135, - 135, - 138, - 135, - 142, - 135, - 140, - 138, - 135, - 135, - 138, - 135, - 142, - 135, - 140, - 138, - 135, - 135, - 138, - 135, - 142, - 135, - 140, - 138, - 135, - 135, - 138, - 135, - 142, - 135, - 140, - 138 + "osc1_oct": 6, + "osc1_det": 0, + "osc1_detune": 0, + "osc1_xenv": 0, + "osc1_vol": 192, + "osc1_waveform": 1, + "osc2_oct": 8, + "osc2_det": 0, + "osc2_detune": 8, + "osc2_xenv": 0, + "osc2_vol": 82, + "osc2_waveform": 2, + "noise_fader": 0, + "env_attack": 100, + "env_sustain": 4545, + "env_release": 2727, + "env_master": 192, + "fx_filter": 3, + "fx_freq": 2700, + "fx_resonance": 85, + "fx_delay_time": 6, + "fx_delay_amt": 60, + "fx_pan_freq": 6, + "fx_pan_amt": 86, + "lfo_osc1_freq": 0, + "lfo_fx_freq": 1, + "lfo_freq": 7, + "lfo_amt": 106, + "lfo_waveform": 0, + "p": [ + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 3, + 1, + 1, + 2, + 3, + 1, + 1, + 2, + 3, + 1, + 1, + 2, + 3, + 1, + 1, + 2, + 3, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 2, + 3 + ], + "c": [ + { + "n": [ + 135, + 135, + 147, + 135, + 0, + 135, + 147, + 135, + 135, + 135, + 147, + 135, + 0, + 135, + 147, + 135, + 135, + 135, + 147, + 135, + 0, + 135, + 147, + 135, + 135, + 135, + 147, + 135, + 0, + 135, + 147, + 135 + ] + }, + { + "n": [ + 140, + 140, + 152, + 140, + 0, + 140, + 152, + 140, + 140, + 140, + 152, + 140, + 0, + 140, + 152, + 140, + 140, + 140, + 152, + 140, + 0, + 140, + 152, + 140, + 140, + 140, + 152, + 140, + 0, + 140, + 152, + 142 + ] + }, + { + "n": [ + 131, + 131, + 143, + 131, + 0, + 131, + 143, + 131, + 131, + 131, + 143, + 131, + 0, + 131, + 143, + 131, + 138, + 138, + 150, + 138, + 0, + 138, + 150, + 138, + 138, + 138, + 150, + 138, + 0, + 138, + 150, + 137 + ] + } ] }, { - "n": [ - 143, - 143, - 155, - 143, - 0, - 143, - 155, - 143, - 143, - 143, - 150, - 143, - 147, - 143, - 140, - 143, - 138, - 138, - 143, - 138, - 143, - 140, - 138, - 140, - 138, - 138, - 143, - 138, - 142, - 140, - 138, - 140 + "osc1_oct": 7, + "osc1_det": 0, + "osc1_detune": 0, + "osc1_xenv": 0, + "osc1_vol": 187, + "osc1_waveform": 2, + "osc2_oct": 5, + "osc2_det": 0, + "osc2_detune": 2, + "osc2_xenv": 1, + "osc2_vol": 161, + "osc2_waveform": 2, + "noise_fader": 0, + "env_attack": 100, + "env_sustain": 1818, + "env_release": 2727, + "env_master": 123, + "fx_filter": 1, + "fx_freq": 1900, + "fx_resonance": 162, + "fx_delay_time": 2, + "fx_delay_amt": 153, + "fx_pan_freq": 6, + "fx_pan_amt": 61, + "lfo_osc1_freq": 0, + "lfo_fx_freq": 1, + "lfo_freq": 2, + "lfo_amt": 196, + "lfo_waveform": 3, + "p": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 2 + ], + "c": [ + { + "n": [ + 135, + 135, + 138, + 135, + 142, + 135, + 140, + 138, + 135, + 135, + 138, + 135, + 142, + 135, + 140, + 138, + 135, + 135, + 138, + 135, + 142, + 135, + 140, + 138, + 135, + 135, + 138, + 135, + 142, + 135, + 140, + 138 + ] + }, + { + "n": [ + 143, + 143, + 155, + 143, + 0, + 143, + 155, + 143, + 143, + 143, + 150, + 143, + 147, + 143, + 140, + 143, + 138, + 138, + 143, + 138, + 143, + 140, + 138, + 140, + 138, + 138, + 143, + 138, + 142, + 140, + 138, + 140 + ] + } ] }, { - "n": [ - 135, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - } - ] - }, - { - "osc1_oct": 8, - "osc1_det": 0, - "osc1_detune": 0, - "osc1_xenv": 1, - "osc1_vol": 192, - "osc1_waveform": 0, - "osc2_oct": 7, - "osc2_det": 0, - "osc2_detune": 0, - "osc2_xenv": 1, - "osc2_vol": 70, - "osc2_waveform": 2, - "noise_fader": 8, - "env_attack": 100, - "env_sustain": 0, - "env_release": 9090, - "env_master": 164, - "fx_filter": 2, - "fx_freq": 5500, - "fx_resonance": 240, - "fx_delay_time": 6, - "fx_delay_amt": 51, - "fx_pan_freq": 3, - "fx_pan_amt": 66, - "lfo_osc1_freq": 0, - "lfo_fx_freq": 0, - "lfo_freq": 0, - "lfo_amt": 0, - "lfo_waveform": 0, - "p": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 - ], - "c": [ - { - "n": [ - 135, - 0, - 0, - 0, - 0, - 0, - 135, - 0, - 0, - 0, - 135, - 0, - 0, - 0, - 0, - 0, - 135, - 0, - 0, - 0, - 0, - 0, - 135, - 0, - 0, - 0, - 135, - 0, - 0, - 0, - 0, - 0 + "osc1_oct": 8, + "osc1_det": 0, + "osc1_detune": 0, + "osc1_xenv": 1, + "osc1_vol": 192, + "osc1_waveform": 0, + "osc2_oct": 7, + "osc2_det": 0, + "osc2_detune": 0, + "osc2_xenv": 1, + "osc2_vol": 70, + "osc2_waveform": 2, + "noise_fader": 8, + "env_attack": 100, + "env_sustain": 0, + "env_release": 9090, + "env_master": 164, + "fx_filter": 2, + "fx_freq": 5500, + "fx_resonance": 240, + "fx_delay_time": 6, + "fx_delay_amt": 51, + "fx_pan_freq": 3, + "fx_pan_amt": 66, + "lfo_osc1_freq": 0, + "lfo_fx_freq": 0, + "lfo_freq": 0, + "lfo_amt": 0, + "lfo_waveform": 0, + "p": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "c": [ + { + "n": [ + 135, + 0, + 0, + 0, + 0, + 0, + 135, + 0, + 0, + 0, + 135, + 0, + 0, + 0, + 0, + 0, + 135, + 0, + 0, + 0, + 0, + 0, + 135, + 0, + 0, + 0, + 135, + 0, + 0, + 0, + 0, + 0 + ] + } ] } - ] - }, - { - "osc1_oct": 7, - "osc1_det": 0, - "osc1_detune": 0, - "osc1_xenv": 0, - "osc1_vol": 192, - "osc1_waveform": 2, - "osc2_oct": 8, - "osc2_det": 0, - "osc2_detune": 6, - "osc2_xenv": 0, - "osc2_vol": 184, - "osc2_waveform": 2, - "noise_fader": 21, - "env_attack": 40000, - "env_sustain": 25454, - "env_release": 90909, - "env_master": 77, - "fx_filter": 2, - "fx_freq": 7100, - "fx_resonance": 188, - "fx_delay_time": 8, - "fx_delay_amt": 147, - "fx_pan_freq": 4, - "fx_pan_amt": 69, - "lfo_osc1_freq": 0, - "lfo_fx_freq": 1, - "lfo_freq": 7, - "lfo_amt": 176, - "lfo_waveform": 1, - "p": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 2, - 3, - 4, - 1, - 2, - 3, - 4, - 1, - 2, - 3, - 4, - 1, - 2, - 3, - 4, - 5 ], - "c": [ - { - "n": [ - 135, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - { - "n": [ - 142, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - { - "n": [ - 128, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - { - "n": [ - 143, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 138, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - }, - { - "n": [ - 135, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ] - } - ] + "rowLen": 6615, + "endPattern": 41 } - ], - "rowLen": 6615, - "endPattern": 30 + } }; })(); diff --git a/dist/index.html b/dist/index.html index 8f95ea7..8ccd266 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1 @@ -FEWA
LEVEL: SCORE:

Controls

Swap/Move elements: Click highlighted column to select an element and click to drop to another column

Pause: P, Mute: M,
Stop bg anim: B
(because of performance issues on some devices)

Credits

Created by: Zoltan Pasztor & Csaba Tuncsik

Audio Processing: [JSFXR](https://github.com/mneubrand/jsfxr) by [@markusneubrand](https://twitter.com/markusneubrand)

Game sound inspired by: [@jackrugile](https://twitter.com/jackrugile) (http://codepen.io/jackrugile/blog/arcade-audio-for-js13k-games)

Game random number utility inspired by: # JS13KGames Boilerplate (https://github.com/ooflorent/js13k-boilerplate/blob/master/src/rng.js)

★FEWA★

  • RESUME
  • NEW GAME
  • HELP
  • CREDITS
\ No newline at end of file +FEWA
LEVEL: SCORE:

Controls

Swap/Move elements: Click highlighted column to select an element and click to drop to another column

Pause: P, Mute: M,
Stop bg anim: B
(because of performance issues on some devices)

Credits

Created by: Zoltan Pasztor & Csaba Tuncsik

Audio Processing: [JSFXR](https://github.com/mneubrand/jsfxr) by [@markusneubrand](https://twitter.com/markusneubrand)

Game sound inspired by: [@jackrugile](https://twitter.com/jackrugile) (http://codepen.io/jackrugile/blog/arcade-audio-for-js13k-games)

Game music: Sonant-X (https://github.com/nicolas-van/sonant-x) by @nicolas-van

Game random number utility inspired by: # JS13KGames Boilerplate (https://github.com/ooflorent/js13k-boilerplate/blob/master/src/rng.js)

★FEWA★

  • RESUME
  • NEW GAME
  • HELP
  • CREDITS
\ No newline at end of file diff --git a/dist/inlined-compressed.zip b/dist/inlined-compressed.zip index 4b7117a5fdc85bf9238a5f5ff55c8aa7cf72ef7d..8e7578d5246c0a0c26ef78e4b37964a20512a002 100644 GIT binary patch literal 12762 zcmV<0F(uAWO9KQH000OG0C_sfM#=Wu(PS|I04<^b015yA0BLSyWq2-VbZuRO z)}TH*PyIBYqZgOIJUwso=kp}JgP&T>Xw>kok9dlzscHbR-geYwy|RGeij8$?0hpA z40fKgLhNKwo@wqja$R=0u3o9Gt~v+-U8L1@vrcaV68QJ~={vf{guqXrVk815j6%BC zDc&%V9M2VmJQRu`p@KXPpLdyLgEkB&oTgR3OI$lma z&F=L`_A$(^zWZjH!)G|*$ZMt12FL_h06Uq1Gaz8q5VH&be6^it*jg+WGIIJAB&Z+@n<+nMLysK6BFc#9n*{%izRv2c zO$FJs;v9%b_$HaDY0%PjvaCXzNFv{?!|gHr{3*3k!bZ2uBxP(2u)`7} z_oY~d9^OrCtti^*NW!RP^|?ebSsoy_cuu~FsnT`8Qn0Db{p$=#Vq7hbK}ef<;kB3C zgNXD}&cU2KI?|wd+ce6NSi@Rb&AV?F6?hcL1M zR~)DbM(4bFHGl5br=U05JUlvwF7ZeUV<99(+51tQy{N@r4Df8d2*uJfP+EQT`ts+? z*G}zx%A$g6EI%F9-aY^E?PVUF%y_f_Ewz4D)p{Vuy=K6mK-|h6JqIF+qaXo<*rW5! z=-rLCX}V^k2a+<1Ye65wGAj|6z1WK*8C*d(xeuFT8!4THmBGAj3zp3QE8;&xj<1& z=YE=F2!bBsV0u^7{jVrU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!wOW|Ag zk_}t(pp-|>!?g%}m-Htv=q66RSeroVXONKgM2NV>2o+cC_Hd|J?6Yl#YzBdBoo6Lwr0|@6b4kvr*L} zDWO{xZzv}mTbR;siuI=AK0}MgR9*6#?Ox1RLCPDab+NQKt14cOCN9YBt#_esn6+52 z_0+o~?e)bZq0nT=&R)zn*$%-c^eJVe`3_%fm0FN5I@t6K?E|FEY(fE-MupX=K92s; zHz72aYs#&%aMRUudPx(1ZZ@Itf@|{3<>qO)`-siS%Ru%PtFEtY?i*7RfZ=$(k|OzL zs!ac*ePgo;2Ar6wQ>O(?3Hy$!PBAIK=_zV$h_T6xy6N=Iz&sLykQZD+F%msQhzz$< zWVnS$a3RG=^e9yVzN7>bTuYV6m4oXBye!ocE-5@29EBzWgQ$fVv%tn-XG+;1aw>tJ z(wM{^-%X`x6RWU|9Vx|I2jbg2ezH?@F3MgpxMmlWimXLr@r^F#g)uhC@(ZQeq>Y$K zD4!)xmqk_AEG*=bI9!HaIA2XFT+Nb8mKFU$dMAS4k;>$eRIn|`jGfhkHx97d4V1by zr^J3vlL5)SG;yWCu3ljSRU;0~00_L-c@(p5$kPB=ZVTH6=W>Hk@x${&s4HtfF@zUg zeR|Vtwsn@TEtTj>;{@6c^I6b^i*E_B9UJm$8`E`s+Dpk@4En@oM!3o?Uk5>AekiYe zwy1(fdaA>C|71~V3Z9vtk#t$ayJ#EFaK5q?(bIvD*wP)h*<9s?8r00;;G<#5SH z52+EbQ854j8l(UK3IG5A0000000000q=5hc003!jWMz0RXmo9CP)h{{000000RRC2 NH~;_uc`*P0007WcZy*2w diff --git a/dist/j-0a2ea4c1de.js b/dist/j-0a2ea4c1de.js new file mode 100644 index 0000000..045f5d4 --- /dev/null +++ b/dist/j-0a2ea4c1de.js @@ -0,0 +1,3 @@ +!function(){"use strict";function e(){this.setSettings=function(e){for(var t=0;24>t;t++)this[String.fromCharCode(97+t)]=e[t]||0;this.c<.01&&(this.c=.01);var i=this.b+this.c+this.e;if(.18>i){var r=.18/i;this.b*=r,this.c*=r,this.e*=r}}}function t(){this._params=new e;var t,i,r,o,n,s,a,c,l,h,u,f;this.reset=function(){var e=this._params;o=100/(e.f*e.f+.001),n=100/(e.g*e.g+.001),s=1-e.h*e.h*e.h*.01,a=-e.i*e.i*e.i*1e-6,e.a||(u=.5-e.n/2,f=5e-5*-e.o),c=1+e.l*e.l*(e.l>0?-.9:10),l=0,h=1==e.m?0:(1-e.m)*(1-e.m)*2e4+32},this.totalReset=function(){this.reset();var e=this._params;return t=e.b*e.b*1e5,i=e.c*e.c*1e5,r=e.e*e.e*1e5+12,3*((t+i+r)/3|0)},this.synthWave=function(e,d){var m=this._params,p=1!=m.s||m.v,v=m.v*m.v*.1,g=1+3e-4*m.w,b=m.s*m.s*m.s*.1,y=1+1e-4*m.t,w=1!=m.s,k=m.x*m.x,x=m.g,_=m.q||m.r,A=m.r*m.r*m.r*.2,W=m.q*m.q*(m.q<0?-1020:1020),R=m.p?((1-m.p)*(1-m.p)*2e4|0)+32:0,T=m.d,E=m.j/2,C=m.k*m.k*.01,H=m.a,I=t,S=1/t,M=1/i,q=1/r,B=5/(1+m.u*m.u*20)*(.01+b);B>.8&&(B=.8),B=1-B;for(var D,F,L,G,P,j,O=!1,K=0,z=0,U=0,N=0,V=0,X=0,J=0,Q=0,Y=0,Z=0,$=new Array(1024),ee=new Array(32),te=$.length;te--;)$[te]=0;for(var te=ee.length;te--;)ee[te]=2*Math.random()-1;for(var te=0;d>te;te++){if(O)return te;if(R&&++Y>=R&&(Y=0,this.reset()),h&&++l>=h&&(h=0,o*=c),s+=a,o*=s,o>n&&(o=n,x>0&&(O=!0)),F=o,E>0&&(Z+=C,F*=1+Math.sin(Z)*E),F|=0,8>F&&(F=8),H||(u+=f,0>u?u=0:u>.5&&(u=.5)),++z>I)switch(z=0,++K){case 1:I=i;break;case 2:I=r}switch(K){case 0:U=z*S;break;case 1:U=1+2*(1-z*M)*T;break;case 2:U=1-z*q;break;case 3:U=0,O=!0}_&&(W+=A,L=0|W,0>L?L=-L:L>1023&&(L=1023)),p&&g&&(v*=g,1e-5>v?v=1e-5:v>.1&&(v=.1)),j=0;for(var ie=8;ie--;){if(J++,J>=F&&(J%=F,3==H))for(var re=ee.length;re--;)ee[re]=2*Math.random()-1;switch(H){case 0:P=u>J/F?.5:-.5;break;case 1:P=1-J/F*2;break;case 2:G=J/F,G=6.28318531*(G>.5?G-1:G),P=1.27323954*G+.405284735*G*G*(0>G?1:-1),P=.225*((0>P?-1:1)*P*P-P)+P;break;case 3:P=ee[Math.abs(32*J/F|0)]}p&&(D=X,b*=y,0>b?b=0:b>.1&&(b=.1),w?(V+=(P-X)*b,V*=B):(X=P,V=0),X+=V,N+=X-D,N*=1-v,P=N),_&&($[Q%1024]=P,P+=$[(Q-L+1024)%1024],Q++),j+=P}j*=.125*U*k,e[te]=j>=1?32767:-1>=j?-32768:32767*j|0}return d}}for(var i={},r=0,o=["webkit","moz","o","ms"],n=0;nl;++l)if(e=arguments[l],null!==e)for(t in e)o=c[t],n=e[t],c!==n&&(u&&n&&(i(n)||(s=Array.isArray(n)))?(s?(s=!1,a=o&&Array.isArray(o)?o:[]):a=o&&i(o)?o:{},c[t]=r(u,a,n)):void 0!==n&&(c[t]=n));return c}}()},i.obj.extend(!0,i,{vendor:{prefixes:["","ms","webkit","moz","o"],get:function(e){var t,i;for(i=0;io;o+=1)i="undefined"==typeof t?[]:t,r.push(i);return r},move:function(e,t,i){e[t]=e.splice(i,1,e[t])[0]},loop:function(e,t,i){for(var r=e.length,o=0;r>o;o+=1)t.call(i||null,e[o],o)}},rand:{intg:function(e){return Math.random()*(e||268435455)|0},flot:function(){return Math.random()},bool:function(){return Math.random()>.5},range:function(e,t){return i.rand.intg(t-e)+e},rangef:function(e,t){return i.rand.flot()*(t-e)+e},select:function(e){return e[i.rand.range(0,e.length)]}},PI2:2*Math.PI,RAD:Math.PI/180,DEG:180/Math.PI,noop:function(){},line:function(e,t,i,r,o,n,s){e.strokeStyle=n,e.lineWidth=s,e.beginPath(),e.moveTo(t,i),e.lineTo(r,o),e.stroke()},rect:function(e,t,r,o,n,s,a,c,l,h){t+=c,o-=2*c,r+=c,n-=2*c,e.beginPath(),e.strokeStyle=a,e.lineWidth=c,e.moveTo(t+s,r),e.lineTo(t+o-s,r),e.quadraticCurveTo(t+o,r,t+o,r+s),e.lineTo(t+o,r+n-s),e.quadraticCurveTo(t+o,r+n,t+o-s,r+n),e.lineTo(t+s,r+n),e.quadraticCurveTo(t,r+n,t,r+n-s),e.lineTo(t,r+s),e.quadraticCurveTo(t,r,t+s,r),e.closePath(),e.stroke(),l&&(e.fillStyle=l,e.fill()),h&&i.rect(e,t-c,r-c,o+2*c,n+2*c,1.2*s,h,c/2)},sine:function(e,t,i,r,o,n,s){var a=(t+r)/2,c=(i+o)/2;e.strokeStyle=n,e.lineWidth=s,e.beginPath(),e.moveTo(t,i),e.bezierCurveTo(t,i,a/2,1.5*c,a,c),e.bezierCurveTo(1.5*a,c/2,r,o,r,o),e.stroke()}}),i.obj.extend(!0,i,{columns:8,gap:2,speed:.1,gravity:.3,moveBg:!0,rumble:{decay:.4},starAmount:Math.floor(window.innerWidth/window.innerHeight*100),starColors:["#ffffff","#ffe9c4","#d4fbff"],elements:{FIRE:{color:"#ff3824",latency:50,against:{FIRE:20,EARTH:2,WATER:1,AIR:5},bricks:{empty:{energy:10},filled:{energy:20},special:{energy:40}},desc:"The Fire element, most effective against fire bricks, but least effective against water bricks.",spec:"Fire special brick explodes the whole column of bricks."},EARTH:{color:"#44db5e",latency:80,against:{FIRE:5,EARTH:20,WATER:2,AIR:1},bricks:{empty:{energy:10},filled:{energy:20},special:{energy:40}},desc:"The Earth element, most effective against earth bricks, but least effective against air bricks.",spec:"Earth special brick explodes surrounding bricks."},WATER:{color:"#54c7fc",latency:70,against:{FIRE:1,EARTH:2,WATER:20,AIR:5},bricks:{empty:{energy:10},filled:{energy:20},special:{energy:40}},desc:"The Water element, most effective against water bricks, but least effective against fire bricks.",spec:"Water special brick explodes the whole row of bricks."},AIR:{color:"#ffcd00",latency:60,against:{FIRE:5,EARTH:1,WATER:2,AIR:20},bricks:{empty:{energy:10},filled:{energy:20},special:{energy:40}},desc:"The Air element, most effective against air bricks, but least effective against earth bricks.",spec:"Air special brick explodes all the weak(stroked) air bricks."}}}),i.sprite={items:{},create:function(e,t,i,r){if(!this.get(e)){var o=document.createElement("canvas");o.width=t,o.height=i;var n=o.getContext("2d");n.save(),r(n),n.restore(),this.set(e,o)}return this.get(e)},set:function(e,t){this.items[e]=t},get:function(e){return this.items[e]},factory:function(){var e=i.brickWidth/10,t=i.brickWidth/2,r=i.brickHeight/2,o=i.brickWidth/10,n=e,s="rgba(255,255,255,0.8)",a="rgba(255,255,0,0.5)";this.create("AIR",i.brickWidth,i.brickWidth,function(e){var t=(i.brickWidth-2*o)/4;i.rect(e,0,0,i.brickWidth,i.brickWidth,n,i.elements.AIR.color,o,null,s),e.lineWidth=o,e.strokeStyle=i.elements.AIR.color,e.translate(o,0);for(var r=0;3>r;r++)e.beginPath(),e.moveTo(t,o),e.lineTo(t,i.brickWidth-o),e.stroke(),e.translate(t,0)}),this.create("AIR-SHOT",i.brickWidth,i.brickHeight,function(r){i.rect(r,t-e,0,2*e,i.brickHeight,2,i.elements.AIR.color,o,i.elements.AIR.color,a)}),this.create("AIR-BRICK-empty",i.brickWidth,i.brickHeight,function(e){i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.AIR.color,o,null,s)}),this.create("AIR-BRICK-filled",i.brickWidth,i.brickHeight,function(e){i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.AIR.color,o,i.elements.AIR.color,s)}),this.create("AIR-BRICK-special",i.brickWidth,i.brickHeight,function(e){e.fillStyle=i.elements.AIR.color,e.fillRect(t-r/2,o,r,i.brickHeight-2*o),i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.AIR.color,o,null,s)}),this.create("EARTH",i.brickWidth,i.brickWidth,function(e){var t=(i.brickWidth-2*o)/4;i.rect(e,0,0,i.brickWidth,i.brickWidth,n,i.elements.EARTH.color,o,null,s),e.lineWidth=o,e.strokeStyle=i.elements.EARTH.color,e.translate(0,o);for(var r=0;3>r;r++)e.beginPath(),e.moveTo(o,t),e.lineTo(i.brickWidth-o,t),e.stroke(),e.translate(0,t)}),this.create("EARTH-SHOT",i.brickWidth,i.brickHeight,function(r){i.rect(r,t-e,0,2*e,i.brickHeight,2,i.elements.EARTH.color,o,i.elements.EARTH.color,a)}),this.create("EARTH-BRICK-empty",i.brickWidth,i.brickHeight,function(e){i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.EARTH.color,o,null,s)}),this.create("EARTH-BRICK-filled",i.brickWidth,i.brickHeight,function(e){i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.EARTH.color,o,i.elements.EARTH.color,s)}),this.create("EARTH-BRICK-special",i.brickWidth,i.brickHeight,function(e){e.fillStyle=i.elements.EARTH.color,e.fillRect(t-r/2,o,r,i.brickHeight-2*o),i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.EARTH.color,o,null,s)}),this.create("WATER",i.brickWidth,i.brickWidth,function(e){var t=(i.brickWidth-2*o)/4;i.rect(e,0,0,i.brickWidth,i.brickWidth,n,i.elements.WATER.color,o,null,s),e.lineWidth=o,e.strokeStyle=i.elements.WATER.color,e.translate(0,o);for(var r=0;3>r;r++)i.sine(e,o,t,i.brickWidth-o,t),e.translate(0,t)}),this.create("WATER-SHOT",i.brickWidth,i.brickHeight,function(r){i.rect(r,t-e,0,2*e,i.brickHeight,2,i.elements.WATER.color,o,i.elements.WATER.color,a)}),this.create("WATER-BRICK-empty",i.brickWidth,i.brickHeight,function(e){i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.WATER.color,o,null,s)}),this.create("WATER-BRICK-filled",i.brickWidth,i.brickHeight,function(e){i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.WATER.color,o,i.elements.WATER.color,s)}),this.create("WATER-BRICK-special",i.brickWidth,i.brickHeight,function(e){i.line(e,2*o,r,i.brickWidth-2*o,r,i.elements.WATER.color,o),i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.WATER.color,o,null,s)}),this.create("FIRE",i.brickWidth,i.brickWidth,function(e){var t=(i.brickWidth-2*o)/4;i.rect(e,0,0,i.brickWidth,i.brickWidth,n,i.elements.FIRE.color,o,null,s),e.lineWidth=o,e.strokeStyle=i.elements.FIRE.color,e.translate(-o,0),e.translate(i.brickWidth/2,i.brickWidth/2),e.rotate(90*i.RAD),e.translate(-i.brickWidth/2,-i.brickWidth/2);for(var r=0;3>r;r++)i.sine(e,o,t,i.brickWidth-o,t),e.translate(0,t)}),this.create("FIRE-SHOT",i.brickWidth,i.brickHeight,function(r){i.rect(r,t-e,0,2*e,i.brickHeight,2,i.elements.FIRE.color,o,i.elements.FIRE.color,a)}),this.create("FIRE-BRICK-empty",i.brickWidth,i.brickHeight,function(e){i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.FIRE.color,o,null,s)}),this.create("FIRE-BRICK-filled",i.brickWidth,i.brickHeight,function(e){i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.FIRE.color,o,i.elements.FIRE.color,s)}),this.create("FIRE-BRICK-special",i.brickWidth,i.brickHeight,function(e){i.line(e,t,2*o,t,i.brickHeight-2*o,i.elements.FIRE.color,o),i.rect(e,0,0,i.brickWidth,i.brickHeight,n,i.elements.FIRE.color,o,null,s)}),["#ffffff","#ed8500","#ffff00"].forEach(function(e){this.create("explosion"+e,i.brickWidth,i.brickHeight,function(t){i.rect(t,0,0,i.brickWidth,i.brickHeight,0,e,0,e)})},this)}};var s=new t;window.jsfxr=function(e){s._params.setSettings(e);var t=s.totalReset(),i=new Uint8Array(4*((t+1)/2|0)+44),r=2*s.synthWave(new Uint16Array(i.buffer,44),t),o=new Uint32Array(i.buffer,0,44);o[0]=1179011410,o[1]=r+36,o[2]=1163280727,o[3]=544501094,o[4]=16,o[5]=65537,o[6]=44100,o[7]=88200,o[8]=1048578,o[9]=1635017060,o[10]=r,r+=44;for(var n=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="data:audio/wav;base64,";r>n;n+=3){var l=i[n]<<16|i[n+1]<<8|i[n+2];c+=a[l>>18]+a[l>>12&63]+a[l>>6&63]+a[63&l]}return c};var a;!function(){function e(e){return Math.sin(6.283184*e)}function t(t){return e(t)<0?-1:1}function i(e){return e%1-.5}function r(e){var t=e%1*4;return 2>t?t-1:3-t}function o(e){return.00390625*Math.pow(1.059463094,e-128)}function n(e,t){setTimeout(function(){var i=new Uint8Array(e*l*2),r=i.length-2,o=function(){for(var e=new Date,n=0;r>=0;)if(i[r]=0,i[r+1]=128,r-=2,n+=1,n%1e3===0&&new Date-e>h)return void setTimeout(o,0);setTimeout(function(){t(i)},0)};setTimeout(o,0)},0)}function s(e,t,i,r,o){var n=i.fx_delay_time*r>>1,s=i.fx_delay_amt/255,a=0,c=function(){for(var i=new Date,r=0;t-n>a;){var l=4*a,u=4*(a+n),f=e[u]+(e[u+1]<<8)+(e[l+2]+(e[l+3]<<8)-32768)*s;if(e[u]=255&f,e[u+1]=f>>8&255,f=e[u+2]+(e[u+3]<<8)+(e[l]+(e[l+1]<<8)-32768)*s,e[u+2]=255&f,e[u+3]=f>>8&255,++a,r+=1,r%1e3===0&&new Date-i>h)return void setTimeout(c,0)}setTimeout(o,0)};setTimeout(c,0)}a={};var c=44100,l=2,h=33,u=null,f=[e,t,i,r];a.AudioGenerator=function(e){this.mixBuf=e,this.waveSize=e.length/l/2},a.AudioGenerator.prototype.getWave=function(){var e,t,i,r,o,n,s,a=this.mixBuf,c=this.waveSize,h=c*l*2;for(o=h-8,n=o-36,r=String.fromCharCode(82,73,70,70,255&o,o>>8&255,o>>16&255,o>>24&255,87,65,86,69,102,109,116,32,16,0,0,0,1,0,2,0,68,172,0,0,16,177,2,0,4,0,16,0,100,97,116,97,255&n,n>>8&255,n>>16&255,n>>24&255),e=0;h>e;){for(i="",t=0;256>t&&h>e;++t,e+=2)s=4*(a[e]+(a[e+1]<<8)-32768),s=-32768>s?-32768:s>32767?32767:s,i+=String.fromCharCode(255&s,s>>8&255);r+=i}return r},a.AudioGenerator.prototype.getAudio=function(){var e=this.getWave(),t=new Audio("data:audio/wav;base64,"+btoa(e));return t.preload="none",t.load(),t},a.AudioGenerator.prototype.getAudioBuffer=function(e){null===u&&(u=new AudioContext);var t=this.mixBuf,i=this.waveSize,r=u.createBuffer(l,this.waveSize,c),o=r.getChannelData(0),n=r.getChannelData(1),s=0,a=function(){for(var c=new Date,l=0;i>s;){var u=4*(t[4*s]+(t[4*s+1]<<8)-32768);if(u=-32768>u?-32768:u>32767?32767:u,o[s]=u/32768,u=4*(t[4*s+2]+(t[4*s+3]<<8)-32768),u=-32768>u?-32768:u>32767?32767:u,n[s]=u/32768,s+=1,l+=1,l%1e3===0&&new Date-c>h)return void setTimeout(a,0)}setTimeout(function(){e(r)},0)};setTimeout(a,0)},a.SoundGenerator=function(e,t){this.instr=e,this.rowLen=t||5605,this.osc_lfo=f[e.lfo_waveform],this.osc1=f[e.osc1_waveform],this.osc2=f[e.osc2_waveform],this.attack=e.env_attack,this.sustain=e.env_sustain,this.release=e.env_release,this.panFreq=Math.pow(2,e.fx_pan_freq-8)/this.rowLen,this.lfoFreq=Math.pow(2,e.lfo_freq-8)/this.rowLen},a.SoundGenerator.prototype.genSound=function(t,i,r){for(var n=(new Date,0),s=0,a=o(t+12*(this.instr.osc1_oct-8)+this.instr.osc1_det)*(1+8e-4*this.instr.osc1_detune),l=o(t+12*(this.instr.osc2_oct-8)+this.instr.osc2_det)*(1+8e-4*this.instr.osc2_detune),h=this.instr.fx_resonance/255,u=0,f=0,d=this.attack+this.sustain+this.release-1;d>=0;--d){var m=d+r,p=this.osc_lfo(m*this.lfoFreq)*this.instr.lfo_amt/512+.5,v=1;d=this.attack+this.sustain&&(v-=(d-this.attack-this.sustain)/this.release);var g=a;this.instr.lfo_osc1_freq&&(g+=p),this.instr.osc1_xenv&&(g*=v*v),n+=g;var b=this.osc1(n)*this.instr.osc1_vol;g=l,this.instr.osc2_xenv&&(g*=v*v),s+=g,b+=this.osc2(s)*this.instr.osc2_vol,this.instr.noise_fader&&(b+=(2*Math.random()-1)*this.instr.noise_fader*v),b*=v/255;var y=this.instr.fx_freq;this.instr.lfo_fx_freq&&(y*=p),y=1.5*Math.sin(3.141592*y/c),u+=y*f;var w=h*(b-f)-u;switch(f+=y*w,this.instr.fx_filter){case 1:b=w;break;case 2:b=u;break;case 3:b=f;break;case 4:b=u+w}if(g=e(m*this.panFreq)*this.instr.fx_pan_amt/512+.5,b*=39*this.instr.env_master,m=4*m,m+3>8&255,k=i[m+2]+(i[m+3]<<8)+b*g,i[m+2]=255&k,i[m+3]=k>>8&255}}},a.SoundGenerator.prototype.getAudioGenerator=function(e,t){var i=this.attack+this.sustain+this.release-1+32*this.rowLen,r=this;n(i,function(o){r.genSound(e,o,0),s(o,i,r.instr,r.rowLen,function(){t(new a.AudioGenerator(o))})})},a.SoundGenerator.prototype.createAudio=function(e,t){this.getAudioGenerator(e,function(e){t(e.getAudio())})},a.SoundGenerator.prototype.createAudioBuffer=function(e,t){this.getAudioGenerator(e,function(e){e.getAudioBuffer(t)})},a.MusicGenerator=function(e){this.song=e,this.waveSize=c*e.songLen},a.MusicGenerator.prototype.generateTrack=function(e,t,i){var r=this;n(this.waveSize,function(o){var n=r.waveSize,c=r.waveSize*l*2,u=r.song.rowLen,f=r.song.endPattern,d=new a.SoundGenerator(e,u),m=0,p=0,v=0,g=function(){for(var t=new Date;;)if(32!==v){if(p===f-1)return void setTimeout(b,0);var i=e.p[p];if(i){var r=e.c[i-1].n[v];r&&d.genSound(r,o,m)}if(m+=u,v+=1,new Date-t>h)return void setTimeout(g,0)}else v=0,p+=1},b=function(){s(o,n,e,u,w)},y=0,w=function(){for(var e=new Date,r=0;c>y;){var n=t[y]+(t[y+1]<<8)+o[y]+(o[y+1]<<8)-32768;if(t[y]=255&n,t[y+1]=n>>8&255,y+=2,r+=1,r%1e3===0&&new Date-e>h)return void setTimeout(w,0)}setTimeout(i,0)};setTimeout(g,0)})},a.MusicGenerator.prototype.getAudioGenerator=function(e){var t=this;n(this.waveSize,function(i){var r=0,o=function(){r-1?void(n.gain.value=e):n.gain.value},this.pool[e]=o,t(o)}.bind(this))},pool:{},tracks:{main:{songLen:198,songData:[{osc1_oct:9,osc1_det:0,osc1_detune:0,osc1_xenv:0,osc1_vol:161,osc1_waveform:0,osc2_oct:9,osc2_det:0,osc2_detune:4,osc2_xenv:0,osc2_vol:182,osc2_waveform:0,noise_fader:0,env_attack:100,env_sustain:1818,env_release:18181,env_master:192,fx_filter:0,fx_freq:0,fx_resonance:254,fx_delay_time:6,fx_delay_amt:108,fx_pan_freq:3,fx_pan_amt:61,lfo_osc1_freq:0,lfo_fx_freq:0,lfo_freq:3,lfo_amt:94,lfo_waveform:2,p:[1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,0,2,3,4,1,2,3,4,5,6,7,8,1,2,1,2,3,4,5,6,5,6,7,8],c:[{n:[142,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,140,0,0,0,0,0,0,0,138,0,0,0,0,0,0,0]},{n:[135,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,0,0,0,138,0,0,0]},{n:[140,0,138,0,135,0,0,0,0,0,0,0,0,0,130,0,142,0,140,0,135,0,0,0,0,0,0,0,138,0,0,0]},{n:[135,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,142,0,0,0,0,0,0,0,135,0,0,0,138,0,0,0]},{n:[123,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{n:[130,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{n:[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{n:[119,131,0,0,0,0,0,0,0,0,0,0,0,0,0,0,126,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}]},{osc1_oct:8,osc1_det:0,osc1_detune:0,osc1_xenv:0,osc1_vol:0,osc1_waveform:0,osc2_oct:8,osc2_det:0,osc2_detune:0,osc2_xenv:0,osc2_vol:0,osc2_waveform:0,noise_fader:19,env_attack:100,env_sustain:0,env_release:3636,env_master:192,fx_filter:1,fx_freq:8100,fx_resonance:156,fx_delay_time:2,fx_delay_amt:22,fx_pan_freq:3,fx_pan_amt:43,lfo_osc1_freq:0,lfo_fx_freq:0,lfo_freq:0,lfo_amt:0,lfo_waveform:0,p:[0,0,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2],c:[{n:[135,0,135,0,0,135,0,135,135,0,135,0,0,135,0,135,135,0,135,0,0,135,0,135,135,0,135,0,0,135,0,135]},{n:[135,0,135,0,0,135,0,135,135,0,135,0,0,135,0,135,135,0,135,0,0,135,0,135,135,0,135,0,135,0,135,135]}]},{osc1_oct:6,osc1_det:0,osc1_detune:0,osc1_xenv:0,osc1_vol:192,osc1_waveform:1,osc2_oct:8,osc2_det:0,osc2_detune:8,osc2_xenv:0,osc2_vol:82,osc2_waveform:2,noise_fader:0,env_attack:100,env_sustain:4545,env_release:2727,env_master:192,fx_filter:3,fx_freq:2700,fx_resonance:85,fx_delay_time:6,fx_delay_amt:60,fx_pan_freq:6,fx_pan_amt:86,lfo_osc1_freq:0,lfo_fx_freq:1,lfo_freq:7,lfo_amt:106,lfo_waveform:0,p:[0,0,0,0,1,1,2,3,1,1,2,3,1,1,2,3,1,1,2,3,1,1,2,3,0,0,0,0,1,1,1,1,2,3],c:[{n:[135,135,147,135,0,135,147,135,135,135,147,135,0,135,147,135,135,135,147,135,0,135,147,135,135,135,147,135,0,135,147,135]},{n:[140,140,152,140,0,140,152,140,140,140,152,140,0,140,152,140,140,140,152,140,0,140,152,140,140,140,152,140,0,140,152,142]},{n:[131,131,143,131,0,131,143,131,131,131,143,131,0,131,143,131,138,138,150,138,0,138,150,138,138,138,150,138,0,138,150,137]}]},{osc1_oct:7,osc1_det:0,osc1_detune:0,osc1_xenv:0,osc1_vol:187,osc1_waveform:2,osc2_oct:5,osc2_det:0,osc2_detune:2,osc2_xenv:1,osc2_vol:161,osc2_waveform:2,noise_fader:0,env_attack:100,env_sustain:1818,env_release:2727,env_master:123,fx_filter:1,fx_freq:1900,fx_resonance:162,fx_delay_time:2,fx_delay_amt:153,fx_pan_freq:6,fx_pan_amt:61,lfo_osc1_freq:0,lfo_fx_freq:1,lfo_freq:2,lfo_amt:196,lfo_waveform:3,p:[0,0,0,0,0,0,0,0,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2],c:[{n:[135,135,138,135,142,135,140,138,135,135,138,135,142,135,140,138,135,135,138,135,142,135,140,138,135,135,138,135,142,135,140,138]},{n:[143,143,155,143,0,143,155,143,143,143,150,143,147,143,140,143,138,138,143,138,143,140,138,140,138,138,143,138,142,140,138,140]}]},{osc1_oct:8,osc1_det:0,osc1_detune:0,osc1_xenv:1,osc1_vol:192,osc1_waveform:0,osc2_oct:7,osc2_det:0,osc2_detune:0,osc2_xenv:1,osc2_vol:70,osc2_waveform:2,noise_fader:8,env_attack:100,env_sustain:0,env_release:9090,env_master:164,fx_filter:2,fx_freq:5500,fx_resonance:240,fx_delay_time:6,fx_delay_amt:51,fx_pan_freq:3,fx_pan_amt:66,lfo_osc1_freq:0,lfo_fx_freq:0,lfo_freq:0,lfo_amt:0,lfo_waveform:0,p:[0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1],c:[{n:[135,0,0,0,0,0,135,0,0,0,135,0,0,0,0,0,135,0,0,0,0,0,135,0,0,0,135,0,0,0,0,0]}]}],rowLen:6615,endPattern:41}}},i.fx={click:{count:4,params:[[2,,.06,,.61,.58,,.0092,-.0248,.0059,.9077,-1,-.855,,-1,,-.24,-.4599,.9991,-.647,-.5371,,-1,.33]]},hover:{count:4,params:[[2,.46,.01,.0058,,.29,,-.06,-.02,,,-.7,.5,,-1,,-.5125,-.2453,.4399,-.7,,.0058,-1,.51]]},select:{count:4,params:[[2,,.0138,,.86,.52,,.04,-.04,,,-1,,,-1,,-1,-.56,.63,-.4,.35,,-1,.16]]},move:{count:4,params:[[2,.18,.01,,.3702,.14,,-.0799,.26,.41,.67,-1,,,-1,,-.1999,-.3199,.46,-.0799,,,-1,.4]]},hit:{count:18,params:[[2,.16,.18,,,.4,,-.3199,-.4399,,,-1,,,-1,,-1,-1,.74,-1,,.54,-1,.55]]},explosion:{count:4,params:[[3,,.11,.81,.4543,.11,,-1,-1,,,.36,.21,.45,-.6599,,-.04,.72,.26,-.4399,,,-.64,.34]]},explosionBig:{count:4,params:[[3,,.87,,,.22,,,-.14,,,-1,,,-1,,.08,-.28,.44,-.3399,,,-1,.17]]},levelup:{count:1,params:[[3,.0061,.1462,.0048,.9138,.5027,,.065,,,.6737,.1527,,,-.9567,,.081,-.0307,.071,.0945,,2e-4,,.26]]},death:{count:1,params:[[0,1e-4,.7618,.1376,.81,.1,,.3358,3e-4,,,.3006,,,.048,.6803,-1,-.76,.9985,.6463,.3453,,-1,.27]]}},i.audio={sounds:{},references:[],mute:!1,play:function(e){if(!i.audio.mute){var t=i.audio.sounds[e];t=t.length>1?i.audio.sounds[e][i.rand.range(0,t.length)]:i.audio.sounds[e][0],t.pool[t.tick].play(),t.tickthis.maxDistance&&(this.distance=this.maxDistance,this.destroy())},i.particle.prototype.draw=function(){i.ctx.save(),i.ctx.globalAlpha=1-this.distance/this.maxDistance,i.entity.prototype.draw.call(this),i.ctx.restore()},i.explosion=function(e){i.entity.apply(this,arguments),this.distance=0,this.rotate=i.rand.range(0,360),this.rot=e.rot||i.rand.range(-5,5),this.delta=e.delta||.1,this.maxDistance=i.rand.range(8*this.delta,15*this.delta)},i.explosion.prototype=Object.create(i.entity.prototype),i.explosion.prototype.constructor=i.explosion,i.explosion.prototype.update=function(){this.distance+=this.delta,this.w+=this.delta,this.h+=this.delta,this.rotate+=this.rot,this.distance>this.maxDistance&&(this.distance=this.maxDistance,this.destroy())},i.explosion.prototype.draw=function(){i.ctx.save(),i.ctx.globalAlpha=1-this.distance/this.maxDistance,i.entity.prototype.draw.call(this),i.ctx.restore()},i.bullet=function(e){this.column=e.column,this.type=e.type,this.speed=5,this.width=i.brickWidth,this.height=i.brickHeight,this.x=this.column*this.width+i.gap*(this.column+1),this.y=i.stage.height-i.brickWidth,this.hw=this.width/2,this.hh=this.height/2,this.rad=1,this.removed=!1,this.power=100,this.sprite=i.sprite.get(this.type+"-SHOT")},i.bullet.prototype.destroy=function(){Array.prototype.push.apply(i.explosions,[new i.explosion({name:"explosion#ffffff",x:this.x+this.hw,y:this.y,w:this.power/4,h:this.power/4,col:"#ffffff",delta:2,rot:0}),new i.explosion({name:"explosion#ed8500",x:this.x+this.hw,y:this.y,w:this.power/7,h:this.power/7,col:"#ed8500",delta:1.5,rot:-5}),new i.explosion({name:"explosion#ffff00",x:this.x+this.hw,y:this.y,w:this.power/8,h:this.power/8,col:"#ffff00",delta:1,rot:4})]),this.removed=!0},i.bullet.prototype.update=function(){this.y-=this.speed*i.timer.delta,i.arr.loop(i.bricks[this.column],function(e,t){null!==e&&e.y>this.y-i.brickHeight&&(this.power=i.elements[this.type].against[e.type],this.type===e.type&&(i.rumble.level=1),e.hit(this.power,this.type),this.destroy())},this)},i.bullet.prototype.draw=function(){i.ctx.save(),i.ctx.translate(this.x,this.y),i.ctx.drawImage(this.sprite,0,0),i.ctx.restore()},i.tower=function(e){this.type=e.type,this.w=i.brickWidth,this.h=i.brickWidth,this.setColumn(e.column),this.y=i.stage.height-this.h,this.col=i.elements[this.type].color,this.hw=this.w/2,this.hh=this.h/2,this.rad=Math.round(this.w/10),this.removed=!1,this.sprite=i.sprite.get(this.type),this.shootDelay=this.latency=i.elements[this.type].latency},i.tower.prototype.setColumn=function(e){this.column=e,this.x=this.column*this.w+i.gap*(this.column+1)},i.tower.prototype.destroy=function(){this.removed=!0;var e,t,r=this.w/6,o=this.h/6;for(i.rumble.level=10,e=1;6>e;e++)for(t=1;6>t;t++)i.particles.push(new i.particle({name:"particle"+this.col,x:this.x+e*r,y:this.y+t*o,w:r,h:o,col:this.col,speed:i.rand.range(1,5),dist:100*i.rand.range(3,5)}));i.audio.play("explosion")},i.tower.prototype.shoot=function(){0!==i.s&&i.bullets.push(new i.bullet({column:this.column,type:this.type}))},i.tower.prototype.update=function(){this.shootDelay-=i.timer.delta,this.shootDelay<0&&(this.shoot(),this.shootDelay=this.latency)},i.tower.prototype.draw=function(){i.ctx.save(),i.ctx.translate(this.x,this.y),i.ctx.drawImage(this.sprite,0,0),i.ctx.restore()},i.brick=function(e){if(this.column=e.column,this.type=e.type,this.w=i.brickWidth,this.h=i.brickHeight,this.x=this.column*this.w+i.gap*(this.column+1),this.y=-this.h,this.hw=this.w/2,this.hh=this.h/2,this.rad=Math.round(this.w/10),this.removed=!1,this.col=i.elements[this.type].color,this.add=0,this.explode=i.noop,this.sprite=i.sprite.get(this.type+"-BRICK-"+e.item),this.val=this.energy=i.elements[this.type].bricks[e.item].energy,"special"===e.item)switch(e.type){case"FIRE":this.explode=function(){i.rumble.level=10,i.arr.loop(i.bricks[this.column],function(e,t){e&&!e.removed&&(e.hitType=e.type,e.destroy())}),i.audio.play("explosionBig")};break;case"EARTH":this.explode=function(){i.rumble.level=10;for(var e=0,t=i.columns;t>e;e+=1)i.arr.loop(i.bricks[e],function(e,t){e&&!e.removed&&e.row>=this.row-1&&e.row<=this.row+1&&e.column>=this.column-1&&e.column<=this.column+1&&(e.hitType=e.type,e.destroy())},this);i.audio.play("explosionBig")};break;case"WATER":this.explode=function(){i.rumble.level=10;for(var e=0,t=i.columns;t>e;e+=1)e!==this.column&&i.arr.loop(i.bricks[e],function(e,t){e&&!e.removed&&e.row===this.row&&(e.hitType=e.type,e.destroy())},this);i.audio.play("explosionBig")};break;case"AIR":this.explode=function(){i.rumble.level=10;for(var e=0,t=i.columns;t>e;e+=1)i.arr.loop(i.bricks[e],function(e,t){e&&!e.removed&&e.type===this.type&&(e.hitType=e.type,e.destroy())},this);i.audio.play("explosionBig")}}},i.brick.prototype.destroy=function(e){this.removed=!0,this.type===this.hitType&&(this.explode(),i.flash=8),i.rumble.level=5;for(var t=12,r=0,o=10;o>r;r+=1)i.particles.push(new i.particle({name:"particle"+this.col,x:this.x+this.w/2,y:this.y+this.h,w:this.w/t,h:this.h/(t/2),col:this.col,speed:i.rand.range(1,5),dist:100*i.rand.range(3,5)}));e||i.countScore(this.val),i.audio.play("explosion")},i.brick.prototype.hit=function(e,t){this.hitType=t,this.energy-=e,this.energy<=0&&!this.removed&&this.destroy(),i.audio.play("hit")},i.brick.prototype.update=function(){this.y+=i.timer.move+this.add,0===this.add?0!==i.s&&this.y>i.stage.height-this.h-i.brickWidth&&i.over():this.add-=i.gravity},i.brick.prototype.draw=function(){i.ctx.save(),i.ctx.translate(this.x,this.y),i.ctx.drawImage(this.sprite,0,0),i.ctx.restore()},i.star=function(e){this.x=i.rand.flot()*i.bgCtx.canvas.width,this.y=i.rand.flot()*i.bgCtx.canvas.height,this.brightness=15*e+i.rand.range(14*e,18*e)/100,this.radius=i.rand.flot()/e*4,this.color=i.starColors[i.rand.range(0,i.starColors.length)],this.draw()},i.star.prototype.draw=function(){i.bgCtx.save(),i.bgCtx.beginPath(),i.bgCtx.globalAlpha=this.brightness,i.bgCtx.fillStyle=this.color,i.bgCtx.arc(this.x,this.y,this.radius,0,i.PI2),i.bgCtx.fill(),i.bgCtx.closePath(),i.bgCtx.restore()},i.obj.extend(!0,i,{timer:{date:new Date,curr:null,timestamp:Date.now(),delta:1,msec:0,move:0,t:1e3/60,tick:function(){i.timer.curr=Date.now(),i.timer.d=i.timer.curr-i.timer.timestamp,i.timer.delta=i.timer.d/i.timer.t,i.timer.delta=i.timer.delta<0?.001:i.timer.delta,i.timer.delta=i.timer.delta>10?10:i.timer.delta,i.timer.msec+=i.timer.delta,i.timer.timestamp=i.timer.curr,i.timer.move=i.s*i.timer.delta}},emitter:{sum:0,row:0,emit:function(){if(i.emitter.sum>i.brickHeight+i.gap||0===i.emitter.sum){i.emitter.sum=0;for(var e,t,r,o=0,n=i.columns;n>o;o+=1)t=i.rand.select(i.elementTypes),r=i.rand.select(Object.keys(i.elements[t].bricks)),e=new i.brick({column:o,type:t,item:r}),e.row=i.emitter.row,i.bricks[o].unshift(e);i.emitter.row++,i.s+=.001}i.emitter.sum+=i.timer.move}},initBackground:function(){for(var e=null,t=0,r=i.bgs.length;r>t;t+=1){i.bgCtx.clearRect(0,0,i.bgCtx.canvas.width,i.bgCtx.canvas.height);for(var o=0,n=i.starAmount;n>o;o+=1)e=new i.star(i.bgs.length-t+1),e.draw();i.bgs[t].b.style.backgroundImage="url("+i.bg.toDataURL()+")"}},noBg:function(){i.moveBg=!i.moveBg},mute:function(){i.audio.mute=!i.audio.mute;for(var e in i.music.pool)if(i.music.pool.hasOwnProperty(e)){var t=i.music.pool[e];t.volume(i.audio.mute?0:.4)}},menu:function(e){i.paused=!0,e&&i.bricks&&(i.re.style.display="block"),i.mnu.style.display="block",i.msg.style.display="none"},newgame:function(){i.bricks=i.arr.create(i.columns),i.towers=[],i.bullets=[],i.particles=[],i.explosions=[],i.activeColumn=null,i.hoverColumn=null;var e=i.elementTypes.concat(i.arr.create(i.columns-4,0)).sort(function(){return.5-Math.random()});i.arr.loop(e,function(t,r){i.towers[r]=e[r]?new i.tower({column:r,type:e[r]}):!1}),i.score=0,i.s=i.speed,i.countScore(0),i.paused=!1,i.msg.style.display="none"},over:function(){var e=600;i.s=0,i.message("GAME OVER",0,"MAIN MENU"),i.audio.play("death"),i.towers.forEach(function(e,t){setTimeout(function(){e&&e.x&&e.destroy()},100*t)}),i.bricks.forEach(function(t){setTimeout(function(){t.forEach(function(e){e&&!e.removed&&(e.add=-.001)})},e),e+=100})},pause:function(){i.paused?(i.paused=!1,i.message()):(i.paused=!0,i.message("PAUSE")); + +},help:function(){if(!i.buildHelp){for(var e in i.elements)if(i.elements.hasOwnProperty(e)){var t=e,r=i.elements[e],o=i.dom.create("div"),n=i.dom.create("h2"),s=i.dom.create("p"),a=i.dom.create("p");n.innerHTML=t+"
",s.innerHTML=r.desc,a.innerHTML=r.spec,o.appendChild(n),s.insertBefore(i.sprite.get(t),s.firstChild),o.appendChild(s),a.insertBefore(i.sprite.get(t+"-BRICK-special"),a.firstChild),o.appendChild(a),i.hlp.appendChild(o)}i.buildHelp=!0}i.message(i.hlp,0,"MAIN MENU")},message:function(e,t,r){var o,n=i.msg.style;i.mnu.style.display="none",e?("object"==typeof e?(i.msg.innerHTML="",e.style.display="block",i.msg.appendChild(e)):i.msg.innerHTML=e,r&&(o=i.dom.create("em"),o.innerHTML=r,i.msg.appendChild(o)),n.opacity=0,n.display="block",n.marginTop=-i.msg.offsetHeight/2+"px",n.opacity=1):n.display="none",t&&setTimeout(function(){n.display="none"},t)},credits:function(){i.message(i.crd,0,"MAIN MENU")},controls:function(){window.addEventListener("keyup",function(e){switch(e.keyCode){case 27:i.menu(!0);break;case 80:i.pause();break;case 77:i.mute();break;case 66:i.noBg()}},!1),i.ng.addEventListener("click",function(){i.newgame(),i.audio.play("click"),i.mnu.style.display="none"},!1),i.hl.addEventListener("click",function(){i.help(),i.audio.play("click")},!1),i.re.addEventListener("click",function(){i.pause()},!1),["hlp","msg","crd"].forEach(function(e){i[e].addEventListener("click",function(){i.menu()},!1)}),i.cr.addEventListener("click",function(){i.credits(),i.audio.play("click")},!1),["ng","hl","cr","re"].forEach(function(e){i[e].addEventListener("mouseover",function(){i.audio.play("hover")},!1)}),i.cnt.addEventListener("mousemove",function(e){if(!i.paused&&i.s>0){var t=e.pageX-this.offsetLeft,r=Math.floor(t/(i.brickWidth+i.gap+i.gap/i.columns));i.hoverColumn=r}else i.hoverColumn=null},!1),i.cnt.addEventListener("click",function(e){if(!i.paused&&i.s>0){var t=e.pageX-this.offsetLeft,r=Math.floor(t/(i.brickWidth+i.gap+i.gap/i.columns));i.towers[r]&&!i.towers[r].removed?null===i.activeColumn?(i.activeColumn=r,i.audio.play("select")):(i.towers[i.activeColumn].setColumn(r),i.towers[r].setColumn(i.activeColumn),i.arr.move(i.towers,i.activeColumn,r),i.activeColumn=null,i.audio.play("move")):(null!==i.activeColumn&&(i.towers[i.activeColumn].setColumn(r),i.arr.move(i.towers,i.activeColumn,r),i.audio.play("move")),i.activeColumn=null)}else i.activeColumn=null},!1)},stats:function(){var e;"function"==typeof Stats?(e=new Stats,e.setMode(0),e.domElement.style.position="absolute",e.domElement.style.left="0px",e.domElement.style.top="0px",document.body.appendChild(e.domElement),i.stats=e):i.stats={begin:i.noop,end:i.noop}},countScore:function(e){i.score+=e,i.level=Math.ceil(i.s/.12),i.hud.score.innerHTML=i.score,i.hud.level.innerHTML=i.level,i.level>i.prevLevel&&(i.prevLevel=i.level,i.message("LEVEL UP",2e3),i.audio.play("levelup"))},update:function(){i.arr.loop(i.bricks,function(e,t){i.arr.loop(e,function(t,i){t&&(t.removed?e.splice(i,1):t.update())})}),i.arr.loop([i.towers,i.bullets,i.particles,i.explosions],function(e){i.arr.loop(e,function(t,i){t&&(t.removed?e.splice(i,1):t.update())})}),i.rumble.update()},updateBackground:function(){if(i.moveBg)for(var e=0,t=i.bgs.length;t>e;e+=1)i.bgs[e].c+=e+1,i.bgs[e].b.style.backgroundPosition="0px "+i.bgs[e].c/3+"px"},rumble:{update:function(){i.rumble.level>0?(i.rumble.level-=i.rumble.decay,i.rumble.level=i.rumble.level<0?0:i.rumble.level,i.rumble.x=i.rand.rangef(-i.rumble.level,i.rumble.level),i.rumble.y=i.rand.rangef(-i.rumble.level,i.rumble.level)):(i.rumble.x=0,i.rumble.y=0)},draw:function(){(0!==i.rumble.x||0!==i.rumble.y)&&(i.stage.style[i.transformName]="translate("+i.rumble.x+"px,"+i.rumble.y+"px)")}},draw:function(){i.ctx.save(),i.ctx.clearRect(0,0,i.ctx.canvas.width,i.ctx.canvas.height),i.arr.loop(i.bricks,function(e){i.arr.loop(e,function(e){e&&!e.removed&&e.draw()})}),i.arr.loop([i.towers,i.bullets,i.particles,i.explosions],function(e){i.arr.loop(e,function(e){e&&!e.removed&&e.draw()})}),i.drawFlash(),i.rumble.draw(),i.drawSelection()},drawSelection:function(){var e,t;if(null!==i.activeColumn&&(e=i.towers[i.activeColumn],e&&e.x&&(i.ctx.save(),i.ctx.translate(e.x,0),i.ctx.lineWidth=2,i.ctx.fillStyle=i.elements[e.type].color,i.ctx.globalAlpha=.2,i.ctx.fillRect(0,0,i.brickWidth,i.stage.height),i.ctx.restore())),null!==i.hoverColumn){e=i.towers[i.activeColumn],t=i.towers[i.hoverColumn];var r="#ffffff";t&&t.x&&(r=i.elements[t.type].color),e&&e.x&&(r=i.elements[e.type].color),i.ctx.save(),i.ctx.translate(i.gap+i.hoverColumn*(i.brickWidth+i.gap),0),i.ctx.lineWidth=2,i.ctx.fillStyle=r,i.ctx.globalAlpha=.2,i.ctx.fillRect(0,0,i.brickWidth,i.stage.height),i.ctx.restore()}},drawFlash:function(){i.flash>0&&(i.flash--,i.f.style.opacity=i.flash/10)},init:function(){i.music.generate("main",function(e){e.loop=!0,e.volume(.4),e.start()}),i.obj.extend(!0,i,{ww:window.innerWidth,wh:window.innerHeight,rumble:{body:i.dom.get("r")},hud:{level:i.dom.get("lv"),score:i.dom.get("sc")},cnt:i.dom.get("cnt"),msg:i.dom.get("msg"),mnu:i.dom.get("mnu"),hlp:i.dom.get("hlp"),crd:i.dom.get("crd"),re:i.dom.get("re"),ng:i.dom.get("ng"),hl:i.dom.get("hl"),cr:i.dom.get("cr"),f:i.dom.get("f"),stage:i.dom.get("c"),bg:i.dom.get("b"),bgs:[{b:i.dom.get("b1"),c:0},{b:i.dom.get("b2"),c:0},{b:i.dom.get("b3"),c:0}]}),i.stage.width=i.wh/2,i.stage.height=i.wh-30,i.cnt.style.width=i.stage.width+"px",i.cnt.style.height=i.wh+"px",i.bg.width=i.ww,i.bg.height=i.wh,i.brickWidth=i.stage.width/i.columns-i.gap-i.gap/i.columns,i.brickHeight=i.brickWidth/2+i.gap,i.obj.extend(!0,i,{ctx:i.stage.getContext("2d"),bgCtx:i.bg.getContext("2d"),elementTypes:Object.keys(i.elements),transformName:i.vendor.get("transform"),prevLevel:0,score:0,flash:0,paused:!0});for(var e=0;3>e;e++)i.bgs[e].width=i.ww,i.bgs[e].height=i.wh;i.sprite.factory(),i.initBackground(),i.controls(),i.stats(),i.menu()}}),i.init(),function l(){requestAnimationFrame(l,i.stage.canvas),i.timer.tick(),i.stats.begin(),i.updateBackground(),i.paused||(i.emitter.emit(),i.update(),i.draw()),i.stats.end()}()}(); \ No newline at end of file