Skip to content

Commit

Permalink
migrate enhance curves to new file and delete old presets file
Browse files Browse the repository at this point in the history
  • Loading branch information
rendro committed Feb 21, 2017
1 parent 2545b0c commit 29f23ea
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 108 deletions.
11 changes: 9 additions & 2 deletions examples/example.js
Expand Up @@ -15,18 +15,25 @@ const r = c =>
const g = c => (-0.001045244139166791) * c * c + 1.2665372554875318 * c;
const b = c => 0.57254902 * c + 53;

const curves = {
const curves1 = {
r: idArr.map(compose(r, rgb)),
g: idArr.map(compose(g, rgb)),
b: idArr.map(compose(b, rgb)),
};

const rgb2 = c => (-12) * Math.sin(c * 2 * Math.PI / 255) + c;
const curves2 = {
r: idArr.map(rgb2),
g: idArr.map(rgb2),
b: idArr.map(rgb2),
};

vintagejs(img, {
vignette: 0.3,
lighten: 0.2,
brightness: -0.1,
contrast: 0.15,
curves,
curves: curves1,
screen: {
r: 227,
g: 12,
Expand Down
13 changes: 11 additions & 2 deletions examples/vintage.js
Expand Up @@ -32,18 +32,27 @@ var b = function b(c) {
return 0.57254902 * c + 53;
};

var curves = {
var curves1 = {
r: idArr.map(compose(r, rgb)),
g: idArr.map(compose(g, rgb)),
b: idArr.map(compose(b, rgb))
};

var rgb2 = function rgb2(c) {
return -12 * Math.sin(c * 2 * Math.PI / 255) + c;
};
var curves2 = {
r: idArr.map(rgb2),
g: idArr.map(rgb2),
b: idArr.map(rgb2)
};

(0, _index2.default)(img, {
vignette: 0.3,
lighten: 0.2,
brightness: -0.1,
contrast: 0.15,
curves: curves,
curves: curves1,
screen: {
r: 227,
g: 12,
Expand Down
104 changes: 0 additions & 104 deletions vintage.presets.js

This file was deleted.

0 comments on commit 29f23ea

Please sign in to comment.