[p5.js 2.0+ Bug Report]: `noLoop()` not working on WebGPU mode
Open
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:
- Create a WebGPU sketch
- Run following snippet
- Canvas should be grey, but isn't
Snippet:
async function setup() {
await createCanvas(400, 400, WEBGPU);
noLoop();
}
function draw() {
background(128);
}
Canvas exists, but the draw doesn't seem to run. A workaround is using noLoop() when frameCount > 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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