fixes #147, fixes #136, is related to but doesnt entirely complete #144

This commit is contained in:
logsol 2016-08-28 22:40:25 +02:00
parent 502cf72a7e
commit c87997c774
13 changed files with 134 additions and 27 deletions

View file

@ -174,6 +174,11 @@ function (Parent, PIXI, ColorRangeReplaceFilter, Settings, ColorConverter, Nc) {
Layer.prototype.addFilter = function(mesh, filterName, options) {
// use game container if mesh null
if(mesh === null) {
}
if (!this.getAvailableMeshFilters().hasOwnProperty(filterName)) {
throw new Exception('Filter ' + filterName + ' is not available');
}
@ -228,6 +233,8 @@ function (Parent, PIXI, ColorRangeReplaceFilter, Settings, ColorConverter, Nc) {
return;
}
// FIXME this should throw an error i think since "options" is not defined here
// maybe we never actually call this method?
var MeshFilter = this.getAvailableMeshFilters()[options.filter];
filters = filters.filter(function(filter){