[p5.strands] Better error messages when uniform methods return the wrong data types
Open
@Ayaan005-sudo is already working on this.
Since Feb 7, 2026.
Area:WebGL
Enhancement
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Increasing access
If I call const myMouse = uniformVec2(() => mouseX), I get TypeError: data.slice is not a function.
This would be a lot clearer if it said that uniformVec2 expects an array with 2 items.
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 enhancement details
There are existing internal error loggers for p5.strands that this should be using.
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.
Assessment
This issue has not been assessed yet.