mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
16 lines
595 B
JavaScript
16 lines
595 B
JavaScript
gdjs.PixiFiltersTools.registerFilterCreator('BlackAndWhite', {
|
|
makePIXIFilter: function(layer, effectData) {
|
|
var colorMatrix = new PIXI.filters.ColorMatrixFilter();
|
|
colorMatrix.blackAndWhite();
|
|
return colorMatrix;
|
|
},
|
|
update: function(filter, layer) {},
|
|
updateDoubleParameter: function(filter, parameterName, value) {
|
|
if (parameterName !== 'opacity') return;
|
|
|
|
filter.alpha = gdjs.PixiFiltersTools.clampValue(value, 0, 1);
|
|
},
|
|
updateStringParameter: function(filter, parameterName, value) {},
|
|
updateBooleanParameter: function(filter, parameterName, value) {},
|
|
});
|