phaser/wip/blendmodes/ColorDodge.js
2018-01-25 15:48:33 +00:00

10 lines
246 B
JavaScript

/**
* Brightens the backdrop color to reflect the source color.
* Painting with black produces no change.
*/
var ColorDodge = function (a, b)
{
return (b === 255) ? b : Math.min(255, ((a << 8) / (255 - b)));
};
module.exports = ColorDodge;