ADD constant

BlendMode const ADD

Adds the values of the constituent colors of the display object to the colors of its background, applying a ceiling of 0xFF.

This setting is commonly used for animating a lightening dissolve between two objects.

For example, if the display object has a pixel with an RGB value of 0xAAA633, and the background pixel has an RGB value of 0xDD2200, the resulting RGB value for the displayed pixel is 0xFFC833 (because 0xAA + 0xDD > 0xFF, 0xA6 + 0x22 = 0xC8, and 0x33 + 0x00 = 0x33).

Implementation

static const BlendMode ADD = BlendMode(gl.WebGL.ONE, gl.WebGL.ONE, 'lighter');