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

Function brightnessValue

test/unit/webgl/p5.Shader.js:2536–2542  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2534
2535 const testShader = myp5.baseFilterShader().modify(() => {
2536 function brightnessValue() {
2537 let sum = 0;
2538 for (let i = 0; i < 3; i++) {
2539 sum += i;
2540 }
2541 return sum / 10; // 0+1+2=3, 3/10=0.3
2542 }
2543 const brightness = myp5.uniformFloat(brightnessValue);
2544
2545 myp5.filterColor.begin();

Callers

nothing calls this directly

Calls 1

getValueFunction · 0.85

Tested by

no test coverage detected