Hello!
Right now I'm trying to make a custom script to run Pixi.Filters.ColorMapFilter using Tsukimi-Neko's Pixi Filter Controller.
Following the guide in that thread, I have made the following script to attempt to run Color Map Filter.
However, when I attempt to call on the script function, nothing happens.
Converting texture1 into a sprite causes the entire screen to become black, but it does at least cause something to happen.
What am I doing wrong here? I would appreciate any help you can give!
I look forward to hearing from you!
Right now I'm trying to make a custom script to run Pixi.Filters.ColorMapFilter using Tsukimi-Neko's Pixi Filter Controller.
Following the guide in that thread, I have made the following script to attempt to run Color Map Filter.
JavaScript:
var newFilterName = "colormap";
Filter_Controller.filterNameMap[newFilterName] = PIXI.filters.ColorMapFilter;
Filter_Controller.defaultFilterParam[newFilterName] = [1,1];
let texture1 = ImageManager.loadSystem('ColorMap');
Filter_Controller.updateFilterHandler[newFilterName] = function(filter, param) {
filter.colorMap = [texture1];
filter.nearest = [param[1]];
filter.mix = [param[2]];
};
However, when I attempt to call on the script function, nothing happens.
Converting texture1 into a sprite causes the entire screen to become black, but it does at least cause something to happen.
What am I doing wrong here? I would appreciate any help you can give!
I look forward to hearing from you!