-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Description
Increasing access
Using p5._friendlyError() ensures lighting and material warnings are displayed consistently and can be suppressed 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
light.js uses 6 console.warn and material.js uses 3 console.warn instead of p5._friendlyError():
light.js (6 calls):
- Lines 1236, 1243, 1250: lightFalloff() negative value warnings
- Line 1260: lightFalloff() all-zero arguments warning
- Line 1639: spotLight() wrong argument count
- Line 1671: spotLight() concentration < 1
material.js (3 calls):
- Line 2074: textureMode() invalid mode
- Line 3281: blendMode(DARKEST) unsupported in WebGL
- Line 3294: blendMode(LIGHTEST) unsupported in WebGL
I have a PR ready.
Reactions are currently unavailable