mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
10 lines
286 B
JavaScript
10 lines
286 B
JavaScript
/**
|
|
* Produces an effect similar to that of the Difference mode, but lower in contrast.
|
|
* Painting with white inverts the backdrop color; painting with black produces no change.
|
|
*/
|
|
var Exclusion = function (a, b)
|
|
{
|
|
return a + b - 2 * a * b / 255;
|
|
};
|
|
|
|
module.exports = Exclusion;
|