object:setatmosphere celx updated

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 2 months

object:setatmosphere celx updated

Post #1by onetwothree » 15.10.2023, 19:43

Original object:setatmosphere had 22 (!) parameters, today I updated it to have only one - a table. Example usage:

Code: Select all

-- This snippet assigns Titan's atmosphere to Earth

sel = celestia:find("Sol/Earth")

t = {}

t.height = 950
t.miescaleheight = 130
t.rayleigh = { 0.00125, 0.00176, 0.00274 }
t.absorption = { 0.0001, 0.0005, 0.001 }
t.mieasymmetry = 0
t.mie = 0

sel:setatmosphere(t)


Have anybody ever used original method? I want to understand how it's safe to break API.

Return to “Development”