Gradual Blur Effect with MOG_PixiFilters plugin

Hi. I'm trying to make a gradual blur effect using one of Moghunter's plugin: MOG_PixiFilters.js

With this plugin, the blur filter happens instantly. What I want to do is make the blur effect gradually stronger over time. What I had in mind is to use linear interpolation or lerp, where the formula is newValue = value + (maxValue - value)*t, and 0<t<1.

I opened the plugin's JS file, and tried to change line 327 into this:

Code:
if (filter_id === 0) { // BLUR
    for (i = 0; i <= 800; i++) {
        var x = [0];
        x[i] = x[i-1] + 0.01 * (8-x[i-1]);
        return new PIXI.filters.BlurFilter(x[i]);
    }

What I'm trying to do here is I want the BlurFilter strength to go from 0 to 8 gradually, with t=0.01.

However, it doesn't work. I tried some other ways as well but to no avail. I admit that my JS is very very rusty, so I'd appreciate if any experts out there can lend some helping hand 🙂
hi, for gradientBlur you need use TiltShiftFilter filter

http://pixijs.io/pixi-filters/docs/PIXI.filters.TiltShiftFilter.html

TiltShiftXFilter and TiltShiftYFilter or both

new PIXI.filters.TiltShiftFilter (blur, gradientBlur, start, end)
Of course it won't work because no matter how many for loop you put there, the system will run it all immediately in a blink before execute the next code lines
@Jonforum

Thanks for the reply Jon. However, that filter you suggested is for gradient blur, i.e., its effect is something like half the screen is blurred and the other half of the screen is not so blurred. What I'm looking for is blur effect that applies to the whole screen, and the blur effect gradually increases over time.

@Isabella Ava

Yeah, I'm sensing that too. Is there in any way I can make the system wait before the next loop starts?
Actually i think you can try insert $gameVariables.value(x) into the filter formula?
And change the variable value in RPGMV over time + insert wait between them?
I am not sure about that
only code i found is this
JavaScript:
SceneManager.snapForBackground = function() {
    this._backgroundBitmap = this.snap();
    this._backgroundBitmap.blur();
};

Original thread: https://forums.rpgmakerweb.com/threads/gradual-blur-effect-with-mog_pixifilters-plugin.90788/