Improved help

This commit is contained in:
Devine Lu Linvega
2017-01-18 10:39:54 -07:00
parent 0e06026b10
commit 2bca083af7
4 changed files with 74 additions and 54 deletions

View File

@@ -1,19 +0,0 @@
Filter.prototype.filter_offset = function(pixels = this.pixels(),p = null)
{
var v = 255; // defaults to 255 if no parameter specified
if (p.length > 0 && p[0]) {
v = parseInt(p[0]);
// permissible range is 0 <= v <= 255
if (v > 255) { v = 255;}
if (v < 0) { v = 0;}
}
var d = pixels.data;
for (var i=0; i<d.length; i+=4) {
for (var j=0; j<3; j++) {
d[i+j] = v - d[i+j];
}
}
ronin.canvas.clear();
ronin.surface.context().putImageData(pixels, 0, 0, 0, 0, pixels.width, pixels.height);
}

View File

@@ -1,7 +1,7 @@
function Filter_Stencil()
{
Filter.call(this);
this.parameters = [Angle];
this.parameters = [Angle,Color];
this.render = function(cmd)
{