Class

BlendMode

BlendMode(modeopt)

Blend manipulation

Constructor

new BlendMode(modeopt)

Constructor
Parameters:
Name Type Attributes Description
mode BlendMode <optional>
Mode to use, preset values.

View Source BlendMode.js, line 6

Members

number

static Equation

Blend equations
Properties:
Name Type Description
Add number
Subtract number

View Source BlendMode.js, line 164

number

static Factor

Blend factors
Properties:
Name Type Description
DestinationAlpha number
DestinationColor number
One number
OneMinusDestinationAlpha number
OneMinusDestinationColor number
OneMinusSourceAlpha number
OneMinusSourceColor number
SourceAlpha number
SourceColor number
Zero number

View Source BlendMode.js, line 146

number

static Mode

Default modes availables
Properties:
Name Type Description
Alpha number
Add number
Multiply number
None number

View Source BlendMode.js, line 134

BlendMode.Factor

alphaDestinationFactor

Destination blending factor for the alpha channel

View Source BlendMode.js, line 27

BlendMode.Equation

alphaEquation

Blending equation for the alpha channel

View Source BlendMode.js, line 35

BlendMode.Factor

alphaSourceFactor

Source blending factor for the alpha channel

View Source BlendMode.js, line 19

BlendMode.Factor

colorDestinationFactor

Blending color (destination)

View Source BlendMode.js, line 51

BlendMode.Equation

colorEquation

Equation to use on source and destination color

View Source BlendMode.js, line 59

BlendMode.Factor

colorSourceFactor

Blending color (source)

View Source BlendMode.js, line 43

Methods

isEqual(blendMode) → {boolean}

Check if the given BlendMode instance is equal to this one
Parameters:
Name Type Description
blendMode BlendMode A BlendMode instance

View Source BlendMode.js, line 119

True if the two blend mode are equals, otherwise false
boolean

setMode(modeopt)

Set blending mode to use: this method erase the previous configuration, be careful
Parameters:
Name Type Attributes Description
mode BlendMode.Mode <optional>
Mode to use, preset values

View Source BlendMode.js, line 71