method
Light.ambient
Light.ambient(color)
Multiplies every framebuffer pixel by color (a 0x00RRGGBB tint), channel by channel (channel * tint / 255). This is the global modulate that sets mood before any light adds brightness back: a dim blue-grey gives night, a warm brown gives a cave, and 0xFFFFFF is a no-op. Call it once, after drawing the scene and before the Light.point calls that light it back up.
Parameters
colorthe ambient tint, 0x00RRGGBB (darker/cooler = a darker scene)Example
program Demo {
property Tag { v: int = 0 }
model Marker { Tag }
handler Render phase Update {
Screen.clear(Color.rgb(120, 120, 140))
Light.ambient(Color.rgb(48, 48, 72)) # dusk: dim and cool
Light.point(160, 120, 90, Color.Amber, 1.0)
Screen.show()
}
}