The staging light contract, per kind: each placement takes exactly the parameters its type can act on, so stageScene can lower it to the scene light that kind names without guessing.
An aimed light (directional, spot, area) needs a finite non-zero direction, and a point light must not carry one, since it radiates every way.
A positioned light (point, spot, area) needs a finite position, and a directional light must not carry one, since it is infinitely distant.
range belongs to the two punctual falloff kinds and must be finite and at least zero; coneAngle belongs to spot alone, within (0, 90]; width and height belong to area alone and must be finite and positive, and both are reported when both are wrong.
color, when given, follows validateColor's canonical linear RGBA rule, including nullable alpha and an optional matching sRGB hex label.
castShadow is a boolean, is refused on an area light, which renders no shadow map, and when true requires shadow; shadow requires castShadow: true and carries a positive safe-integer mapSize, finite biases, a positive near and a finite far beyond it.
A parameter that cannot act is refused rather than ignored, because silently dropping a coneAngle on a point light stages a light that is not the one authored. An unknown type is reported once and nothing else is judged, since no rule set applies. The caller supplies a light record; malformed ordinary JSON fields, including null vectors, colors and shadows, produce located findings. A failed string conversion uses an uninspectable value only in text and retains the authored value. Throwing property accessors and nonterminating conversion hooks are outside that guarantee.
The staging light contract, per kind: each placement takes exactly the parameters its
typecan act on, sostageScenecan lower it to the scene light that kind names without guessing.directional,spot,area) needs a finite non-zerodirection, and apointlight must not carry one, since it radiates every way.point,spot,area) needs a finiteposition, and adirectionallight must not carry one, since it is infinitely distant.rangebelongs to the two punctual falloff kinds and must be finite and at least zero;coneAnglebelongs tospotalone, within(0, 90];widthandheightbelong toareaalone and must be finite and positive, and both are reported when both are wrong.color, when given, follows validateColor's canonical linear RGBA rule, including nullable alpha and an optional matching sRGB hex label.castShadowis a boolean, is refused on anarealight, which renders no shadow map, and whentruerequiresshadow;shadowrequirescastShadow: trueand carries a positive safe-integermapSize, finite biases, a positivenearand a finitefarbeyond it.A parameter that cannot act is refused rather than ignored, because silently dropping a
coneAngleon a point light stages a light that is not the one authored. An unknowntypeis reported once and nothing else is judged, since no rule set applies. The caller supplies a light record; malformed ordinary JSON fields, including null vectors, colors and shadows, produce located findings. A failed string conversion usesan uninspectable valueonly in text and retains the authored value. Throwing property accessors and nonterminating conversion hooks are outside that guarantee.