MCPcopy
hub / github.com/processing/p5.js / blendMode

Method blendMode

src/core/p5.Renderer3D.js:1064–1089  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

1062 }
1063
1064 blendMode(mode) {
1065 if (
1066 mode === constants.DARKEST ||
1067 mode === constants.LIGHTEST ||
1068 mode === constants.ADD ||
1069 mode === constants.BLEND ||
1070 mode === constants.SUBTRACT ||
1071 mode === constants.SCREEN ||
1072 mode === constants.EXCLUSION ||
1073 mode === constants.REPLACE ||
1074 mode === constants.MULTIPLY ||
1075 mode === constants.REMOVE
1076 )
1077 this.states.setValue('curBlendMode', mode);
1078 else if (
1079 mode === constants.BURN ||
1080 mode === constants.OVERLAY ||
1081 mode === constants.HARD_LIGHT ||
1082 mode === constants.SOFT_LIGHT ||
1083 mode === constants.DODGE
1084 ) {
1085 console.warn(
1086 'BURN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, and DODGE only work for blendMode in 2D mode.'
1087 );
1088 }
1089 }
1090
1091 erase(opacityFill, opacityStroke) {
1092 if (!this._isErasing) {

Callers 14

filterMethod · 0.95
eraseMethod · 0.95
noEraseMethod · 0.95
rendering.jsFile · 0.45
setting.jsFile · 0.45
p5.RendererGL.jsFile · 0.45
testBlendFunction · 0.45
mixAndReturnFunction · 0.45
_copyHelperMethod · 0.45
pixelsFunction · 0.45
_renderPassMethod · 0.45
applyFilterMethod · 0.45

Calls 1

setValueMethod · 0.45

Tested by

no test coverage detected