-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Description
Increasing access
Both directionalLight() and pointLight() in src/webgl/light.js have a @TODO: check parameters number comment but no actual validation. Invalid argument counts silently cause unexpected behavior instead of showing a helpful error.
These functions accept 2, 4, or 6 arguments but currently don't validate the count.
I have a PR ready for this.
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
Both directionalLight() and pointLight() in src/webgl/light.js have a @TODO: check parameters number comment (lines 644 and 920) but no actual validation. These functions accept 2, 4, or 6 arguments but currently don't check the count — invalid argument counts silently cause unexpected behavior instead of showing a helpful error.
Reactions are currently unavailable