Skip to content

Instantly share code, notes, and snippets.

@Jordach

Jordach/example.lua

Last active Dec 6, 2018
Embed
What would you like to do?
Skybox PR V2
player:set_skybox({
type = "texture", -- "dynamic", "plain", "texture", "texture_dome"
textures = {"top.png", "bottom.png", "side.png", "side.png", "side.png", "side.png"},
base_color = "#rrggbb",
dynamic_color = { --applies to type = "dyanmic"
day_sky = "#rrggbb",
day_horizon = "#rrggbb",
dawn_sky = "#rrggbb",
dawn_horizon = "#rrggbb",
night_sky = "#rrggbb",
night_horizon = "#rrggbb",
indoors = "#rrggbb",
cloud_diffuse = "#rrggbb",
cloud_diffuse_dawn = "#rrggbb"
},
directional_fog = true, -- can apply to: type = "texture", "texture_dome" and "dynamic"
directional_color = {
sun = "#rrggbb",
moon = "#rrggbb"
},
})
player:set_clouds({
visible = true, -- setting to false will ignore other cloud settings
density = 0.4,
color = "#fff0f0e5",
ambient = "#000000",
height = 120,
thickness = 16,
speed = {x=0, z=-2}
})
player:set_sun({
visible = true, -- setting to false will ignore other sun settings
texture = "sun.png",
tonemap = "sun_tonemap.png",
sunrise = "sunrise_texture.png",
rotation = 90, -- valid numbers 0 -> 360
size = {x=1, y=1}
})
player:set_moon({
visible = true, -- setting to false will ignore other moon settings
texture = "moon.png",
tonemap = "moon_tonemap.png",
rotation = 270, -- valid numbers 0 -> 360
size = {x=1, y=1}
})
player:set_stars({
visible = true, -- setting to false will ignore other star settings
amount = 200,
color = "#rrggbb",
flicker = "#rrggbb", -- what colour is minimum for flickering stars?
texture = "star.png",
rotation = 90, -- valid numbers 0 -> 360
size = 1,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment