Trying to build a contrast & saturation filter

This commit is contained in:
Devine Lu Linvega
2017-04-09 08:47:44 -10:00
parent 3562c81d57
commit 1454ef2dea
16 changed files with 97 additions and 107 deletions

View File

@@ -19,6 +19,12 @@ function Color(hex = '#000000')
{
return "rgba("+this.rgb().r+","+this.rgb().g+","+this.rgb().b+",1)";
}
this.floats = function()
{
var rgb = this.rgb();
return { r:rgb.r/255, g:rgb.g/255, b:rgb.b/255 }
}
this.render = function()
{

View File

@@ -44,4 +44,13 @@ function Position(position_str = "0,0",y = null)
{
return (isNaN(this.x) ? 0 : this.x)+","+(isNaN(this.y) ? 0 : this.y);
}
this.is_outside = function()
{
if(this.x < 0){ return true; }
if(this.y < 0){ return true; }
if(this.x > ronin.frame.element.width/2){ return true; }
if(this.y > ronin.frame.element.height/2){ return true; }
return false;
}
}