Minor sound tweaks

This commit is contained in:
zenoamaro committed 2019-06-30 16:11:10 +02:00
1 parent 58ee03f8a8
commit 243682ed4a
1 file changed
+4 -4
+4 -4
View File
@@ -36,7 +36,7 @@ export const EXPLOSION_TYPES = {
}, },
draw(explosion, foreground) { draw(explosion, foreground) {
const {x, y, cr, osc} = explosion; const {x, y, cr, osc} = explosion;
const f = cycle(explosion.cr, 6) % 2 === 0 ? 110 : 220; const f = cycle(explosion.cr, 6) % 2 === 0 ? 55 : 110;
osc.frequency.setValueAtTime(f, audio.currentTime); osc.frequency.setValueAtTime(f, audio.currentTime);
drawExplosion(foreground, x, y, cr); drawExplosion(foreground, x, y, cr);
}, },
@@ -62,7 +62,7 @@ export const EXPLOSION_TYPES = {
dirt: { dirt: {
create(spec, x, y) { create(spec, x, y) {
const {r} = spec; const {r} = spec;
const osc = createOsc('sawtooth'); const osc = createOsc('triangle');
osc.start(); osc.start();
return {type:'dirt', x, y, r, cr:0, osc}; return {type:'dirt', x, y, r, cr:0, osc};
}, },
@@ -89,7 +89,7 @@ export const EXPLOSION_TYPES = {
digBomb: { digBomb: {
create(spec, x, y) { create(spec, x, y) {
const {r} = spec; const {r} = spec;
const osc = createOsc('sawtooth'); const osc = createOsc('triangle');
osc.start(); osc.start();
return {type:'digBomb', x, y, r, cr:0, osc}; return {type:'digBomb', x, y, r, cr:0, osc};
}, },
@@ -117,7 +117,7 @@ export const EXPLOSION_TYPES = {
create(spec, x, y) { create(spec, x, y) {
const {r} = spec; const {r} = spec;
const pattern = []; const pattern = [];
const osc = createOsc('sawtooth'); const osc = createOsc('triangle');
osc.start(); osc.start();
return {type:'dirtCone', x, y, r, cr:0, osc, pattern}; return {type:'dirtCone', x, y, r, cr:0, osc, pattern};
}, },