processing / processing/p5.js

[p5.js 2.0+ Bug Report]: `noLoop()` not working on WebGPU mode

Open
#8,931 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:WebGPU p5.js 2.0+
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • WebGPU
  • p5.strands
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)
p5.js version

2.3.0

Web browser and version

Firefox 151.0.4

Operating system

MacOSX 26.5.1

Steps to reproduce this
Steps:
  1. Create a WebGPU sketch
  2. Run following snippet
  3. Canvas should be grey, but isn't
Snippet:

async function setup() {
  await createCanvas(400, 400, WEBGPU);
  noLoop();
}

function draw() {
  background(128);
}

Image

Canvas exists, but the draw doesn't seem to run. A workaround is using noLoop() when frameCount > 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided WebGPU sketch in p5.js 2.3.0 with Firefox to confirm that noLoop prevents the expected draw. Trace the WebGPU rendering and animation-loop entry points, then add or update coverage for this setup so the canvas is grey after noLoop() and the workaround is no longer needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.