textmode.js / Textmodifier / lightFalloff
Method: lightFalloff()
ts
lightFalloff(
constant,
linear,
quadratic): void;Configure distance attenuation used by point lights.
Uses the p5-style formula: 1 / (constant + d * linear + d * d * quadratic). Negative inputs are clamped to 0. If all inputs resolve to 0, the falloff resets to (1, 0, 0).
Parameters
| Parameter | Type | Description |
|---|---|---|
constant | number | Constant attenuation term |
linear | number | Linear attenuation term |
quadratic | number | Quadratic attenuation term |
Returns
void