Last active
April 26, 2017 16:45
-
-
Save Ekdohibs/5faf1fb804a1bc8d7d88ed0a8829384a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local t = 0 | |
local function make_color(x, y, z) | |
return string.format("#%02x%02x%02x", math.floor(x * 255), math.floor(y * 255), math.floor(z * 255)) | |
end | |
minetest.register_globalstep(function(dtime) | |
t = t + dtime | |
if t > 30 then t = 0 end | |
for _, player in ipairs(minetest.get_connected_players()) do | |
player:set_clouds({ | |
density = t * 0.03, | |
--color = "#fff0f0", | |
color = make_color(1 - t / 50, 1 - t / 50, 1 - t / 50), | |
ambient = "#000000", | |
height = 120.0 - 3 * t, | |
thickness = 2 + 0.5 * t, | |
speed = {x = 2, y = t * t / 10}}) | |
--player:set_sky(make_color(0.5, 0.5, 1 - t / 60), "plain") | |
end | |
end) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment