ronin/scripts/modules/render.js
Devine Lu Linvega ded226c16f Improved stencil
2016-12-29 09:57:53 -07:00

33 lines
640 B
JavaScript

function Render(rune)
{
Module.call(this,rune);
this.parameters = [Any];
this.collection = {};
this.collection["stencil"] = new Filter_Stencil();
this.active = function(cmd)
{
var name = cmd.content[0];
if(!this.collection[name]){ console.log("Unknown filter:"+name); return; }
cmd.content.shift();
return this.collection[name].render(cmd);
}
this.passive = function(cmd)
{
var name = cmd.content[0];
if(!this.collection[name]){ console.log("Unknown filter:"+name); return; }
cmd.content.shift();
console.log(name);
return this.collection[name].preview(cmd);
}
}