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?
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.
Increasing access
Both
directionalLight()andpointLight()insrc/webgl/light.jshave a@TODO: check parameters numbercomment 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?
Feature enhancement details
Both directionalLight() and pointLight() in src/webgl/light.js have a
@TODO: check parameters numbercomment (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.