Add skybox.get_skies()
This commit is contained in:
parent
de87a485c0
commit
176bef035d
4
init.lua
4
init.lua
@ -86,6 +86,10 @@ skybox.add = function(def)
|
|||||||
table.add(skies, def)
|
table.add(skies, def)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
skybox.get_skies = function()
|
||||||
|
return table.copy(skies)
|
||||||
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
-- registrations and load/save code
|
-- registrations and load/save code
|
||||||
--
|
--
|
||||||
|
10
readme.md
10
readme.md
@ -36,6 +36,16 @@ The `skybox` handle can be used to perform various actions:
|
|||||||
`skybox.add(skyboxdef)`
|
`skybox.add(skyboxdef)`
|
||||||
-- Add a new skybox with skyboxdef to the list of available skyboxes.
|
-- Add a new skybox with skyboxdef to the list of available skyboxes.
|
||||||
|
|
||||||
|
`skybox.get_skies()`
|
||||||
|
-- Get a list of availiable skyboxes
|
||||||
|
-- Example value of `skybox.get_skies()[1]`:
|
||||||
|
--[[
|
||||||
|
```lua
|
||||||
|
{"DarkStormy", "#1f2226", 0.5, { density = 0.5, color = "#aaaaaae0", ambient = "#000000",
|
||||||
|
height = 64, thickness = 32, speed = {x = 6, y = -6},}},
|
||||||
|
```
|
||||||
|
]]
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
skyboxdef = {
|
skyboxdef = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user