[Celestia-developers] New scripts commands
Real-time 3D visualization of space
Status: Beta
Brought to you by:
cjlaurel
From: Chris L. <cl...@ww...> - 2003-04-24 23:04:36
|
I made this checkin a couple days ago . . . It adds a getstarcount and getstar method to the celestia 'object'. find() is a more generally useful command, but it's not helpful when you need to iterate over all the stars, or when you want to write a script like the following: -- randstar.celx -- Visit random stars until the script is cancelled obs = celestia:getobserver() while 1 do nstars = celestia:getstarcount() index = math.floor(nstars * math.random()) star = celestia:getstar(index) celestia:select(star) obs:goto(star, 10) wait(10) end --Chris |