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

Function mixAndReturn

test/unit/webgl/p5.RendererGL.js:1364–1372  ·  view source on GitHub ↗
(mode, bgCol)

Source from the content-addressed store, hash-verified

1362 });
1363
1364 var mixAndReturn = function(mode, bgCol) {
1365 myp5.background(bgCol);
1366 myp5.blendMode(mode);
1367 myp5.fill(255, 0, 0, 122);
1368 myp5.plane(10);
1369 myp5.fill(0, 0, 255, 122);
1370 myp5.plane(10);
1371 return myp5.get(5, 5);
1372 };
1373
1374 test('blendModes change pixel colors as expected', function() {
1375 myp5.createCanvas(10, 10, myp5.WEBGL);

Callers 1

p5.RendererGL.jsFile · 0.85

Calls 4

backgroundMethod · 0.45
blendModeMethod · 0.45
fillMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected