mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
9 lines
231 B
JavaScript
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;
|