method
Light.point
Light.point(x, y, radius, color, energy)
Additively accumulates a radial point light centred at (x, y). Brightness is full at the centre and falls off linearly to zero at radius pixels, scaled by energy (a fixed multiplier — 1.0 is full, 2.0 over-drives toward white, 0.5 is dim), and clamped per channel at 255 so overlapping lights add without wrapping. Only the light's bounding box is touched, and any Light.occlude rectangle between the centre and a pixel puts that pixel in shadow. Colours are 0x00RRGGBB.
Parameters
radiusthe reach in pixels; brightness is zero at and beyond itcolorthe light colour, 0x00RRGGBBenergya fixed brightness multiplier (1.0 = full)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(32, 32, 48))
Light.point(80, 60, 70, Color.rgb(255, 210, 130), 1.0) # a warm torch
Screen.show()
}
}