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

9 lines
231 B
JavaScript

/**
* Reflect blend mode. This mode is useful when adding shining objects or light zones to images.
*/
var Reflect = function (a, b)
{
return (b === 255) ? b : Math.min(255, (a * a / (255 - b)));
};
module.exports = Reflect;