method
Light.falloff
Light.falloff(exponent)
Sets the **falloff curve** applied to every light emitted after it. A light's brightness ramps from full at the centre to zero at its radius; the ramp is raised to exponent, so 1 is the original linear falloff, 2 is quadratic (a softer, more concentrated core), 3 cubic, and so on. Like the occluder store, the setting persists across frames until changed — a game sets it once, or per light, and it rides alongside the short Light.point / Light.spot signatures. Integer exponent, Q16.16 ramp — deterministic.
Parameters
exponentthe ramp power, an integer >= 1 (1 = linear, the default)Example
program Demo {
property Torch { x: int = 0, y: int = 0 }
model Lamp { Torch }
handler Render phase Update {
Screen.clear(0)
Light.ambient(Color.rgb(24, 24, 32))
Light.falloff(2) # a tighter, quadratic glow
Light.point(80, 60, 70, Color.rgb(255, 210, 130), 1.0)
Screen.show()
}
}