-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Increasing access
Using p5._friendlyError() instead of raw console.log/warn ensures that device capability and texture wrap mode warnings are displayed consistently through the Friendly Error System. This helps beginners understand issues more clearly and allows advanced users to suppress these messages via p5.disableFriendlyErrors.
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
src/webgl/p5.Texture.js uses 4 console.log and 4 console.warn calls instead of p5._friendlyError():
- Lines 64, 72, 77, 85:
console.logfor device capability fallback messages (HALF_FLOAT, FLOAT, linear filtering) - Lines 400, 412, 429, 441:
console.warnfor texture wrap mode warnings (REPEAT/MIRROR on non-power-of-two textures)
These should use p5._friendlyError() for consistency with the rest of the codebase.
I have a PR ready for this.
Reactions are currently unavailable