Add `src` property to p5.Image objects
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Increasing access
Would make it easier to identify p5.Image objects in the console and could also be useful for p5 addons.
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
Feature request details
When storing images in arrays it can be difficult for users to keep track of which p5.Image object corresponds to what image file.
This could be especially true in p5.js v2 if the user wants to load images in parallel using Promise.all.
Storing the image's url path on p5.Image objects in either a src property could alleviate this.
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 locating the p5.Image entry point and the image-loading path, then review any related tests or API documentation. Confirm how images loaded individually and through Promise.all should expose the source URL, and use that behavior as the completion criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100