<commit_before>export default function() {
    const app = this;
    app.addFilter('GlitchFilter', {
        enabled: true,
        global: false,
        opened: false,
        args: [8, app.initWidth / 4 >> 0, {
            maxBandCount: 32,
            average: false,
            red: [2, 2],
            green: [-10, 4],
            blue: [10, -4],
            seed: 0.5,
        }, 0],
        oncreate(folder) {
            const filter = this;

            window.glitchFilter = filter;

            filter.animating = true;

            app.events.on('animate', function() {
                if (filter.animating) {
                    filter.seed = Math.random();
                }
            });

            folder.add(this, 'animating').name('(animating)');
            folder.add(this, 'seed', 0, 1).name('shake-seed');
            folder.add(this, 'bandCount', 4, 20).onChange(function(value) {
                filter.bandCount = value >> 0;
            });
            folder.add(this, 'offset', 0, app.initWidth / 2 >> 0);
            folder.add(this, 'loop');
            folder.add(this.red, '0', -20, 20).name('red.x');
            folder.add(this.red, '1', -20, 20).name('red.y');
            folder.add(this.blue, '0', -20, 20).name('blue.x');
            folder.add(this.blue, '1', -20, 20).name('blue.y');
            folder.add(this.green, '0', -20, 20).name('green.x');
            folder.add(this.green, '1', -20, 20).name('green.y');
        }
    });
}<commit_msg>update example<commit_after>export default function() {
    const app = this;
    app.addFilter('GlitchFilter', {
        enabled: true,
        global: false,
        opened: false,
        args: [8, app.initWidth / 4 >> 0, {
            maxBandCount: 32,
            average: false,
            red: [2, 2],
            green: [-10, 4],
            blue: [10, -4],
            seed: 0.5,
            loop: true,
        }, 0],
        oncreate(folder) {
            const filter = this;

            window.glitchFilter = filter;

            filter.animating = true;

            app.events.on('animate', function() {
                if (filter.animating) {
                    filter.seed = Math.random();
                }
            });

            folder.add(this, 'animating').name('(animating)');
            folder.add(this, 'seed', 0, 1).name('shake-seed');
            folder.add(this, 'bandCount', 4, 20).onChange(function(value) {
                filter.bandCount = value >> 0;
            });
            folder.add(this, 'offset', 0, app.initWidth / 2 >> 0);
            folder.add(this, 'loop');
            folder.add(this.red, '0', -20, 20).name('red.x');
            folder.add(this.red, '1', -20, 20).name('red.y');
            folder.add(this.blue, '0', -20, 20).name('blue.x');
            folder.add(this.blue, '1', -20, 20).name('blue.y');
            folder.add(this.green, '0', -20, 20).name('green.x');
            folder.add(this.green, '1', -20, 20).name('green.y');
        }
    });
}
{'fraction_non_alphanumeric': 0.17867818000664232, 'fraction_numerical': 0.036532713384257724, 'mean_word_length': 1.5268456375838926, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4802090', 'n_tokens_mistral': 1016, 'n_tokens_neox': 922, 'n_words': 189}