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?
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.log for device capability fallback messages (HALF_FLOAT, FLOAT, linear filtering)
- Lines 400, 412, 429, 441:
console.warn for 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.
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?
Feature enhancement details
src/webgl/p5.Texture.js uses 4
console.logand 4console.warncalls instead ofp5._friendlyError():console.logfor device capability fallback messages (HALF_FLOAT, FLOAT, linear filtering)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.