Lighting:tween
method#Smoothly changes the time of day, the fog or the light over a set time.
world.lighting:tween({ clock = 18, duration = 5 })Use it forsunsets, storms rolling in, or a spooky night slowly falling.
optionsThe target values, how long it takes and the easing.Build a tween callduration · clock · cycle_minutes · ambient_color · ambient_strength · exposure · 8 more
durationrequiredHow many seconds the tween takes to finish.
clockThe time of day to reach, from 0 to 24, and the clock always moves forward to get there.
cycle_minutesHow many minutes a whole day takes, where 0 stops the clock.
ambient_colorThe color the ambient light blends to over the tween.
ambient_strengthHow strong the ambient light becomes by the end of the tween.
exposureThe camera exposure to blend to over the tween.
brightnessHow bright the sun becomes by the end of the tween.
fog_colorThe color of both fogs, the distance fog and the ground fog.
fog_startHow many studs from the camera the fog begins.
fog_endHow many studs from the camera the fog is at its thickest.
fog_heightThe height at which the ground fog is at its thickest.
fog_thicknessHow many studs above
fog_heightthe ground fog takes to thin out.fog_densityHow thick the ground fog is, from 0, which is off, to 1.
easingHow the change speeds up and slows down:
linear, or quad, sine, cubic, quart, expo, back, bounce or elastic followed by_in,_outor_in_out.for example