Enumeration BLEND_MODES

Various blend modes supported by PIXI.

IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes. Anything else will silently act like NORMAL.

Memberof

PIXI

Enumeration Members

ADD: 1

Default

1
ADD_NPM: 18

Default

18
COLOR: 15

Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.

Canvas Renderer only.

Default

15
COLOR_BURN: 8

Divides the inverted bottom layer by the top layer, and then inverts the result.

Canvas Renderer only.

Default

8
COLOR_DODGE: 7

Divides the bottom layer by the inverted top layer.

Canvas Renderer only.

Default

7
DARKEN: 5

Retains the darkest pixels of both layers.

Canvas Renderer only.

Default

5
DIFFERENCE: 11

Subtracts the bottom layer from the top layer or the other way round to always get a positive value.

Canvas Renderer only.

Default

11
DST_ATOP: 27

The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.

Default

27
DST_IN: 25

The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.

Default

25
DST_OUT: 26

The existing content is kept where it doesn't overlap the new shape.

Default

26
DST_OVER: 24

New shapes are drawn behind the existing canvas content.

Default

24
ERASE: 26

Default

26
EXCLUSION: 12

Like difference, but with lower contrast.

Canvas Renderer only.

Default

12
HARD_LIGHT: 9

A combination of multiply and screen like overlay, but with top and bottom layer swapped.

Canvas Renderer only.

Default

9
HUE: 13

Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.

Canvas Renderer only.

Default

13
LIGHTEN: 6

Retains the lightest pixels of both layers.

Canvas Renderer only.

Default

6
LUMINOSITY: 16

Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.

Canvas Renderer only.

Default

16
MULTIPLY: 2

The pixels of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.

Default

2
NONE: 20

Default

20
NORMAL: 0

Default

0
NORMAL_NPM: 17

Default

17
OVERLAY: 4

A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.

Canvas Renderer only.

Default

4
SATURATION: 14

Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.

Canvas Renderer only.

Default

14
SCREEN: 3

The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)

Default

3
SCREEN_NPM: 19

Default

19
SOFT_LIGHT: 10

A softer version of hard-light. Pure black or white does not result in pure black or white.

Canvas Renderer only.

Default

10
SRC_ATOP: 23

The new shape is only drawn where it overlaps the existing canvas content.

Default

23
SRC_IN: 21

The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.

Default

21
SRC_OUT: 22

The new shape is drawn where it doesn't overlap the existing canvas content.

Default

22
SRC_OVER: 0

Draws new shapes on top of the existing canvas content.

Default

0
SUBTRACT: 28

Default

28
XOR: 29

Shapes are made transparent where both overlap and drawn normal everywhere else.

Default

29

Generated using TypeDoc