MULTIPLY constant

BlendMode const MULTIPLY

Multiplies the values of the display object constituent colors by the colors of the background color, and then normalizes by dividing by 0xFF, resulting in darker colors.

This setting is commonly used for shadows and depth effects.

For example, if a constituent color (such as red) of one pixel in the display object and the corresponding color of the pixel in the background both have the value 0x88, the multiplied result is 0x4840. Dividing by 0xFF yields a value of 0x48 for that constituent color, which is a darker shade than the color of the display object or the color of the background.

Implementation

static const BlendMode MULTIPLY =
    BlendMode(gl.WebGL.DST_COLOR, gl.WebGL.ONE_MINUS_SRC_ALPHA, 'multiply');