Skip to content

Commit

Permalink
Add 30% sin wave
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultzer committed Nov 30, 2016
1 parent 594256f commit 0dbb179
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions benchmark/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ function randomizeOption (i, cb) {
rotate: biasedRotation(),
paperWashout: biasedWashout(),
photoGamma: biasedWashout(),
// 20% has some degree of paper bend
implode: shouldAdd(0.2) ? biasedImplode() : null
// 20% has some degree of paper imposion bend
implode: shouldAdd(0.2) ? biasedImplode() : null,
// 30% has some degree if paper wave bend
wave: shouldAdd(0.3) ? biasedWave() : null
}))

// 20% has some lightning gradient
Expand Down Expand Up @@ -134,6 +136,10 @@ function biasedImplode () {
return biasedRandom(-0.2, 0.2, 0)
}

function biasedWave () {
return [biasedRandom(10, 50, 10), biasedRandom(772*2, 772*3, 772*2.5)]
}

function randomGradientLightning (number, cb) {
var min = 0.4
var max = 0.8
Expand Down Expand Up @@ -166,6 +172,7 @@ function processStream (stream, out, options, cb) {
if (options.paperWashout) imagemagick.level(options.paperWashout.join(',')) // Washout the paper
if (options.photoGamma) imagemagick.level(options.photoGamma.join(',')) // Washout the photo
if (options.implode) imagemagick.implode(options.implode)
if (options.wave) imagemagick.wave(options.wave[0], options.wave[1])
if (options.rotate) imagemagick.rotate('green', options.rotate)

// Rotated images will touch the border, so adding another 100px margin to clear
Expand Down

0 comments on commit 0dbb179

Please sign in to comment.