mirror of
https://github.com/photonstorm/phaser
synced 2024-12-04 18:40:59 +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;
|