-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Labels
Description
Description
The CSM constructor in the cascaded shadowmap addon is written as if a null (or undefined) parameter object is a valid use case:
https://github.com/mrdoob/three.js/blob/dev/examples/jsm/csm/CSM.js#L27
However, in practice this will just lead to a null dereference a few lines later in the code:
https://github.com/mrdoob/three.js/blob/dev/examples/jsm/csm/CSM.js#L69
Either it should allow a null (or undefined) parameter, or it should fail early and not pretend that it works at first, thus obfuscating the actual problem.
I don't know which of the two matches the API design philosophy in this project.
Reproduction steps
new CSM()
Code
not applicable
Live example
not applicable
Screenshots
No response
Version
r151
Device
No response
Browser
No response
OS
No response