mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 14:40:38 +00:00
10 lines
246 B
JavaScript
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;
|