mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 13:48:34 +00:00
Run prettier
This commit is contained in:
parent
2a18df61cd
commit
6e92c4915a
@ -1318,7 +1318,7 @@ const generic_params = [
|
|||||||
];
|
];
|
||||||
// TODO: slice / splice https://www.youtube.com/watch?v=hKhPdO0RKDQ&list=PL2lW1zNIIwj3bDkh-Y3LUGDuRcoUigoDs&index=13
|
// 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;
|
const name = Array.isArray(names) ? names[0] : names;
|
||||||
|
|
||||||
var withVal;
|
var withVal;
|
||||||
@ -1342,7 +1342,7 @@ controls.createParam = function(names) {
|
|||||||
|
|
||||||
const func = (...pats) => sequence(...pats).withValue(withVal);
|
const func = (...pats) => sequence(...pats).withValue(withVal);
|
||||||
|
|
||||||
const setter = function(...pats) {
|
const setter = function (...pats) {
|
||||||
if (!pats.length) {
|
if (!pats.length) {
|
||||||
return this.fmap(withVal);
|
return this.fmap(withVal);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ function getNoiseBuffer(type, density) {
|
|||||||
output[i] *= 0.11;
|
output[i] *= 0.11;
|
||||||
b6 = white * 0.115926;
|
b6 = white * 0.115926;
|
||||||
} else if (type === 'crackle') {
|
} else if (type === 'crackle') {
|
||||||
const probability = density * 0.01
|
const probability = density * 0.01;
|
||||||
if (Math.random() < probability) {
|
if (Math.random() < probability) {
|
||||||
output[i] = Math.random() * 2 - 1;
|
output[i] = Math.random() * 2 - 1;
|
||||||
} else {
|
} else {
|
||||||
@ -45,8 +45,7 @@ function getNoiseBuffer(type, density) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent caching to randomize crackles
|
// Prevent caching to randomize crackles
|
||||||
if (type !== "crackle")
|
if (type !== 'crackle') noiseCache[type] = noiseBuffer;
|
||||||
noiseCache[type] = noiseBuffer;
|
|
||||||
return noiseBuffer;
|
return noiseBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user