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

Function assertSameIn2D

test/unit/webgl/p5.RendererGL.js:1410–1420  ·  view source on GitHub ↗
(colorA, colorB, mode)

Source from the content-addressed store, hash-verified

1408 };
1409
1410 const assertSameIn2D = function(colorA, colorB, mode) {
1411 const refColor = testBlend(myp5, colorA, colorB, mode);
1412 const webglColor = testBlend(ref, colorA, colorB, mode);
1413 // console.log(`Blending ${colorA} with ${colorB} using ${mode}: ${JSON.stringify(refColor)}, ${JSON.stringify(webglColor)}`)
1414 assert.arrayApproximately(
1415 refColor,
1416 webglColor,
1417 10,
1418 `Blending ${colorA} with ${colorB} using ${mode}`
1419 );
1420 };
1421
1422 for (const alpha of [1, 200/255]) {
1423 const red = myp5.color('#F53');

Callers 1

p5.RendererGL.jsFile · 0.85

Calls 1

testBlendFunction · 0.85

Tested by

no test coverage detected