Added sharpen filter

This commit is contained in:
Devine Lu Linvega
2017-02-22 16:05:11 -07:00
parent d163987e9a
commit 1d5e4ec476
10 changed files with 110 additions and 27 deletions

View File

@@ -22,12 +22,10 @@ function Module(rune)
this.active = function(cmd)
{
console.log("Nothing to do.");
}
this.passive = function(cmd)
{
console.log("Nothing to do.");
}
this.update_variables = function(cmd)

View File

@@ -7,8 +7,12 @@ function Preset(rune)
this.collection["grid"]["glyph"] = "@ 300x300; @ layer=background ; @ #A1A1A1 ; . 15x15 4,4 ; @ layer=main";
this.collection["grid"]["icon"] = "@ 360x360; @ layer=background ; @ #000000 ; . 15x15 4,4 ; @ layer=main";
this.collection["watermark"] = {};
this.collection["watermark"]["default"] = "@ 720x405 ; / ../assets/todo.jpg 720x 0,0 ; % chromatic 2 ; / ../assets/logo.png 35x35 15,355";
this.collection["custom"] = {};
this.collection["custom"]["default"] = "@ 720x405 ; / ../assets/todo.jpg 720x 0,0 ; % chromatic 2 ; / ../assets/logo.png 35x35 15,355";
this.collection["custom"]["black"] = "@ 720x405 #ff0000 ; / ../assets/todo.jpg 720x 0,-30 ; % grey ; % sharpen ; % sharpen ; % chromatic 2 ; @ layer=icon ; / ../assets/logo.png 35x35 15,355 ";
this.collection["photo"] = {};
this.collection["photo"]["black"] = "@ 720x405 #ff0000 ; / ../assets/todo.jpg 720x 0,-30 ; % sharpen ; % grey % chromatic 2 ; % grey";
this.collection["brush"] = {};
this.collection["brush"]["radial6"] = "> 600,400 60';> 600,400 120';> 600,400 180';> 600,400 240';> 600,400 300'";
@@ -22,9 +26,14 @@ function Preset(rune)
{
var input = cmd.content.join(" ").trim().split(" ")[0];
var name = cmd.content.join(" ").trim().split(" ")[1];
var value = this.collection[input][name];
if(this.collection[input] && this.collection[input][name]){
commander.query(this.collection[input][name]);
setTimeout(function(){
commander.element.setAttribute('class','visible');
commander.element_input.focus();
commander.element_input.value = value;
}, 100);
}
}

View File

@@ -7,10 +7,11 @@ function Render(rune)
this.collection["rotate"] = new Filter_Rotate();
this.collection["balance"] = new Filter_Balance();
this.collection["saturation"] = new Filter_Saturation();
this.collection["grey"] = new Filter_Grey();
this.collection["stencil"] = new Filter_Stencil();
this.collection["invert"] = new Filter_Invert();
this.collection["chromatic"] = new Filter_Chromatic();
this.collection["sharpen"] = new Filter_Sharpen();
this.active = function(cmd)
{
@@ -28,7 +29,8 @@ function Render(rune)
if(!this.layer){ this.create_layer(); }
var name = cmd.content[0];
if(!this.collection[name]){ return; }
if(!this.collection[name]){ console.log("unknown ",name); return; }
return this.collection[name].preview(cmd);
}
@@ -51,4 +53,5 @@ function Render(rune)
return s;
}
}