MCPcopy Index your code
hub / github.com/processing/p5.js / setupSketch

Function setupSketch

test/unit/visual/cases/webgpu.js:371–386  ·  view source on GitHub ↗
(p5)

Source from the content-addressed store, hash-verified

369
370 visualSuite('filters', function() {
371 const setupSketch = async (p5) => {
372 await p5.createCanvas(50, 50, p5.WEBGPU);
373 p5.translate(-p5.width/2, -p5.height/2);
374 p5.clear();
375 p5.noStroke();
376 p5.fill('red');
377 p5.circle(20, 20, 15);
378 p5.beginShape(p5.QUAD_STRIP);
379 p5.fill('cyan');
380 p5.vertex(35, 35);
381 p5.vertex(45, 35);
382 p5.fill('blue');
383 p5.vertex(35, 45);
384 p5.vertex(45, 45);
385 p5.endShape();
386 };
387
388 visualTest('It can apply GRAY', async function(p5, screenshot) {
389 await setupSketch(p5);

Callers 1

webgpu.jsFile · 0.70

Calls 7

noStrokeMethod · 0.80
translateMethod · 0.45
clearMethod · 0.45
fillMethod · 0.45
beginShapeMethod · 0.45
vertexMethod · 0.45
endShapeMethod · 0.45

Tested by

no test coverage detected