From 6e92c4915aaad88590fbb8d9ff0b3c8e398d28f7 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Fri, 17 Nov 2023 13:37:16 +0100 Subject: [PATCH] Run prettier --- packages/core/controls.mjs | 4 ++-- packages/superdough/noise.mjs | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 1cd69e81..6449969e 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -1318,7 +1318,7 @@ const generic_params = [ ]; // TODO: slice / splice https://www.youtube.com/watch?v=hKhPdO0RKDQ&list=PL2lW1zNIIwj3bDkh-Y3LUGDuRcoUigoDs&index=13 -controls.createParam = function(names) { +controls.createParam = function (names) { const name = Array.isArray(names) ? names[0] : names; var withVal; @@ -1342,7 +1342,7 @@ controls.createParam = function(names) { const func = (...pats) => sequence(...pats).withValue(withVal); - const setter = function(...pats) { + const setter = function (...pats) { if (!pats.length) { return this.fmap(withVal); } diff --git a/packages/superdough/noise.mjs b/packages/superdough/noise.mjs index 8993f470..24779470 100644 --- a/packages/superdough/noise.mjs +++ b/packages/superdough/noise.mjs @@ -35,7 +35,7 @@ function getNoiseBuffer(type, density) { output[i] *= 0.11; b6 = white * 0.115926; } else if (type === 'crackle') { - const probability = density * 0.01 + const probability = density * 0.01; if (Math.random() < probability) { output[i] = Math.random() * 2 - 1; } else { @@ -45,8 +45,7 @@ function getNoiseBuffer(type, density) { } // Prevent caching to randomize crackles - if (type !== "crackle") - noiseCache[type] = noiseBuffer; + if (type !== 'crackle') noiseCache[type] = noiseBuffer; return noiseBuffer; }