mrdoob/texgen.js

Inheritance in TG.Program

fernandojsg opened this issue · 1 comments

Every TG.Program needs the same two functions getParamsand setParamValue.

getParams: function () {
    return params;
},
setParamValue: function ( id, value ) {
    params[ id ] = value;
},

Could be nice to be implemented just in TG.Program, not on every subclass.

Yeah, the problem is that inheritance works backwards now... TG.Program adds stuff to the program. In order to implement the proper way the code becomes a bit more verbose but I'll see if I can find a way 👍