[p5.js 2.0+ Bug Report]: Loading indication
Open
Nobody has claimed this yet.
p5.js 2.0+
Patch
Reserved (CodeDay)
- 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.0+
Web browser and version
any
Operating system
any
Steps to reproduce this
Steps:
- Run the below code
- Observe that while loading, the canvas is blank with no feedback to user at all (this is a regression compared to p5.js version 1)
Snippet:
// for p5.js versions 2.0 or later only
async function setup() {
createCanvas(400, 400);
// Delay to simulate loading large files (for demo only, not actual usage)
await fakeLoad(7000);
// Your usual setup things below
background("#EB5580");
fill(255);
circle(width / 2, height / 2, 100);
}
function draw() {
circle(mouseX, mouseY, 20);
}
async function fakeLoad(delay) {
await new Promise(resolve => setTimeout(resolve, delay));
}
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
Run the supplied asynchronous setup example in p5.js 2.0+ and compare its loading behavior with p5.js 1.x. Trace the startup path responsible for canvas feedback while setup is awaiting, then define and restore the expected indication so the canvas is not blank during loading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100