Run prettier
This commit is contained in:
parent
2a18df61cd
commit
6e92c4915a
2 changed files with 4 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue