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

Function setupAndReturnFramebuffer

test/unit/webgl/p5.Framebuffer.js:265–278  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263
264 suite('rendering', function() {
265 function setupAndReturnFramebuffer() {
266 myp5.createCanvas(10, 10, myp5.WEBGL);
267
268 // Draw a box to the framebuffer
269 const fbo = myp5.createFramebuffer();
270 fbo.draw(() => {
271 myp5.background(255);
272 myp5.noStroke();
273 myp5.fill('red');
274 myp5.box(5, 5, 5);
275 });
276
277 return fbo;
278 }
279
280 test('rendering works with fbo.color as a texture', function() {
281 const fbo = setupAndReturnFramebuffer();

Callers 1

p5.Framebuffer.jsFile · 0.85

Calls 5

noStrokeMethod · 0.80
createFramebufferMethod · 0.45
drawMethod · 0.45
backgroundMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected