Created
April 27, 2019 07:44
-
-
Save TorD/58c5618f291ddac5708add96aaed657c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
"use strict"; | |
Filter_Controller.filterNameMap["glitch"] = PIXI.filters.GlitchFilter; | |
Filter_Controller.defaultFilterParam["glitch"] = [ | |
10, // slices, 2 - 20 | |
100, // offset, -400 - 400 | |
0 // direction, -180 - 180 | |
] | |
Filter_Controller.updateFilterHandler["glitch"] = function(filter, params) { | |
filter.slices = params[0]; | |
filter.offset = params[1]; | |
filter.direction = params[2]; | |
} | |
Filter_Controller.filterSpecialInit["glitch"] = function(filter) { | |
filter.fillMode = 2 // TRANSPARENT, ORIGINAL, LOOP, CLAMP, MIRROR | |
filter.red = [2, 2]; | |
filter.blue = [10, -4]; | |
filter.green = [-10, 4]; | |
filter.sampleSize = 512; // Displacement map resolution | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment