トップページ > .CELXスクリプトガイド > レンダリング
レンダリング
celestia:show
celestia:show(string:renderflag)
Celestiaでの様々なレンダリングをONにします。
例:
celestia:show("orbits", "boundaries", "grid", "cloudmaps")
celestia:hide
celestia:hide(string:renderflag)
Celestiaでの様々なレンダリングをOFFにします。
例:
celestia:hide("orbits", "boundaries", "grid", "cloudmaps")
celestia:getrenderflags
table celestia:getrenderflags()
Celestiaでのレンダリングの状態をテーブルとして取得します。
例:
t = celestia:getrenderflags() --
celestia:show("orbits", "boundaries", "grid", "cloudmaps")
wait(3)
celestia:hide("nightmaps", "comettails")
wait(3)
celestia:setrenderflags(t)
celestia:setrenderflags
celestia:setrenderflags(table:renderflags)
テーブルよりCelestiaでのレンダリングの状態を設定します。
例:
t = {}
t.nightmaps = false
t.comettails = true
celestia:setrenderflags(t)
例2:
celestia:setrenderflags{nightmaps = false, comettails = true}
celestia:showlabel
celestia:showlabel(string:labelflag)
天体の名称をONにします。
例:
celestia:showlabel("planets", "moons", "asteroids")
celestia:hidelabel
celestia:hidelabel(string:labelflag)
天体の名称をOFFにします。
例:
celestia:hidelabel("planets", "moons", "asteroids")
celestia:getlabelflags
table celestia:getlabelflags()
天体名称表示の状態をテーブルとして取得します。
例:
t = celestia:getlabelflags()
celestia:show("planets", "moons", "asteroids")
wait(3)
celestia:hide("comets", "stars")
wait(3)
celestia:setlabelflags(t)
celestia:setlabelflags
celestia:setlabelflags(table:labelflags)
テーブルより天体名称表示の状態を設定します。
例:
t = {}
t.nightmaps = false
t.comettails = true
celestia:setlabelflags(t)
例2:
celestia:setlabelflags{nightmaps = false, comettails = true}
celestia:getorbitflags
table celestia:getorbitflags()
軌道表示の状態をテーブルとして取得します。返されるキーは
例:
t = celestia:getorbitflags()
celestia:show("planets", "moons", "asteroids")
wait(3)
celestia:hide("comets", "stars")
wait(3)
celestia:setorbitflags(t)
celestia:setorbitflags
celestia:setorbitflags(table:orbitflags)
テーブルより軌道表示の状態を設定します。
例:
t = {}
t.Planet = false
t.Moon = true
celestia:setorbitflags(t)
例2:
celestia:setorbitflags{Planet = false, Moon = true}
celestia:getambient
number celestia:getambient()
現在の周辺光の値を0〜1の間で取得します。
例:
a = celestia:getambient()
a = math.floor(a * 100)
celestia:flash("Current ambient light: " .. a .. "%")
celestia:setambient
celestia:setambient(number:ambient)
周辺光の明るさを設定します。
例:
obs = celestia:getobserver()
earth = celestia:find("Sol/Earth")
celestia:select(earth)
obs:gotodistance(earth, 106378.1, 3)
wait(3)
for i = 0, 1, 0.05 do
celestia:setambient(i)
wait(0.1)
end
wait(1)
for i = 1, 0, -0.05 do
celestia:setambient(i)
wait(0.1)
end
celestia:getfaintestvisible
number celestia:getfaintestvisible()
現在の限界等級を取得します。
自動限界等級調整がONになっている場合は、視野45°での限界等級を取得します。
例:
a = celestia:getfaintestvisible()
a = math.floor(a * 100)
celestia:flash("Current faintestvisible light: " .. a .. "%")
celestia:setfaintestvisible
celestia:setfaintestvisible(number:faintest)
限界等級を設定します。
自動限界等級調整がONになっている場合は、視野45°での限界等級が設定されます。
例:
obs = celestia:getobserver()
obj= celestia:find("Rigel Kentaurus")
obs:goto(obj, 3)
wait(3)
obj = celestia:find("Gam Vir")
celestia:select(obj)
obs:center(obj, 3)
wait(3)
a = celestia:getfaintestvisible()
for i = 6, 10, 0.1 do
celestia:setfaintestvisible(i)
celestia:flash("Current magnitude limit: " .. i)
wait(0.1)
end
wait(1)
for i = 10, 6, -0.1 do
celestia:setfaintestvisible(i)
celestia:flash("Current magnitude limit: " .. i)
wait(0.1)
end
celestia:setfaintestvisible(a)
celestia:getminorbitsize
number celestia:getminorbitsize()
現在の最小軌道表示を取得します。単位は[ピクセル]。
例:
a = celestia:getminorbitsize()
celestia:flash("Current minimum orbit size: " .. a .. " pixel")
celestia:setminorbitsize
celestia:setminorbitsize(number:orbitsize)
最小軌道表示を設定します。単位は[ピクセル]。
例:
celestia:showlabel("planets", "moons")
celestia:setorbitflags{Planet = true, Moon = true}
celestia:show("orbits")
obs = celestia:getobserver()
earth= celestia:find("Sol/Earth")
obs:gotolonglat(earth, math.rad(0), math.rad(90), 106783.1, 3)
wait(3) --
jupiter = celestia:find("Sol/Jupiter")
celestia:select(jupiter)
obs:center(jupiter, 3)
wait(3)
a = celestia:getminorbitsize()
for i = 0, 100, 5 do
celestia:setminorbitsize(i)
celestia:flash("Current magnitude limit: " .. i)
wait(0.1)
end
wait(1)
for i = 100, 0, -5 do
celestia:setminorbitsize(i)
celestia:flash("Current magnitude limit: " .. i)
wait(0.1)
end
celestia:setminorbitsize(a)
celestia:getstardistancelimit
number celestia:getstardistancelimit()
表示される恒星の限界距離を取得します。
例:
a = celestia:getstardistancelimit()
a = math.floor(a * 100)
celestia:flash("Current stardistancelimit light: " .. a .. "%")
celestia:setstardistancelimit
celestia:setstardistancelimit(number:distance)
表示される恒星の限界距離を設定します。
例:
obs = celestia:getobserver()
obj= celestia:find("Rigel Kentaurus")
obs:goto(obj, 3)
wait(3)
obj = celestia:find("Gam Vir")
celestia:select(obj)
obs:center(obj, 3)
wait(3)
a = celestia:getstardistancelimit()
for i = 1000, 0, -10 do
celestia:setstardistancelimit(i)
celestia:flash("Current star distance limit: " .. i)
wait(0.1)
end
wait(1)
for i = 0, 1000, 10 do
celestia:setstardistancelimit(i)
celestia:flash("Current star distance limit: " .. i)
wait(0.1)
end
celestia:setstardistancelimit(a)
celestia:getminfeaturesize
number celestia:getminfeaturesize()
地名表示の表示量を取得します。
例:
a = celestia:getminfeaturesize()
a = math.floor(a * 100)
celestia:flash("Current minfeaturesize light: " .. a .. "%")
celestia:setminfeaturesize
celestia:setminfeaturesize(number:size)
地名表示の表示量を設定します。
例:
celestia:showlabel("locations")
obs = celestia:getobserver()
earth= celestia:find("Sol/Earth")
celestia:select(earth)
obs:gotodistance(earth, 56783.1, 3)
wait(3) -- 3秒待つ
a = celestia:getminfeaturesize()
for i = 100, 5, -5 do
celestia:setminfeaturesize(i)
celestia:flash("Current magnitude limit: " .. i)
wait(0.1)
end
wait(1)
for i = 0, 100, 5 do
celestia:setminfeaturesize(i)
celestia:flash("Current magnitude limit: " .. i)
wait(0.1)
end
wait(1)
celestia:setminfeaturesize(a)
celestia:getstarstyle
string celestia:getstarstyle()
恒星表示を取得します。返される文字列はsetstarstyleを参照してください。
例:
if string.find(celestia:getstarstyle(), "point") == nil then
celestia:flash("Stars are not rendered as a point.\n It may drop FPS.")
end
celestia:setstarstyle
celestia:setstarstyle(number:starstyle)
地名表示の表示量を設定します。
例:
celestia:setstarstyle("point")
celestia:flash("Stars are rendered as a point.")
celestia:getscreendimension
x, y celestia:getscreendimension()
Celestia画面の幅と高さを取得します。
※ これらの値を設定するコマンドはありません。
例:
while 1 do
width, height = celestia:getscreendimension()
celestia:flash("Width:" .. width .. " Height: " .. height, 5)
wait(0.1)
end
celestia:getaltazimuthmode
boolean celestia:getaltazimuthmode()
1.5.0
高度角・方位角モードのON/OFFを取得します。
例:
celestia:setaltazimuthmode
celestia:setaltazimuthmode(boolean:enabled)
1.5.0
高度角・方位角モードのON/OFFを設定します。
例:
celestia:getoverlayelements
table celestia:getoverlayelements()
1.5.0
Celestia画面上のオーバーレイ表示の状態を取得します。
例:
celestia:setoverlayelements
celestia:setoverlayelements(table:overlayelements)
1.5.0
Celestia画面上のオーバーレイ表示の状態を設定します。
例:
celestia:setoverlayelements({Selection=true, Velocity=true, Time=false, Frame=false})
例:
while(1) do
celestia:setoverlayelements({Selection=true, Velocity=false, Time=false, Frame=false})
wait(1)
celestia:setoverlayelements({Selection=false, Velocity=true, Time=false, Frame=false})
wait(1)
celestia:setoverlayelements({Selection=false, Velocity=false, Time=true, Frame=false})
wait(1)
celestia:setoverlayelements({Selection=false, Velocity=false, Time=false, Frame=true})
wait(1)
celestia:setoverlayelements({Selection=false, Velocity=false, Time=false, Frame=false})
wait(1)
celestia:setoverlayelements({Selection=true, Velocity=true, Time=true, Frame=true})
wait(1)
end
celestia:getgalaxylightgain
number celestia:getgalaxylightgain()
1.5.0
銀河の光度利得を取得します。
例:
celestia:setgalaxylightgain
celestia:setgalaxylightgain(number:lightgain)
1.5.0
銀河の光度利得を設定します。
例:
celestia:show("galaxies")
obs = celestia:getobserver()
milkyway = celestia:find("Milky Way")
celestia:select(milkyway)
obs:goto(milkyway, 3)
while 1 do
for i = 0, 100 do
celestia:setgalaxylightgain(i / 100)
wait(0.01)
end
for i = 100, 0, -1 do
celestia:setgalaxylightgain(i / 100)
wait(0.01)
end
end
celestia:gettextwidth
number celestia:gettextwidth(string:text)
1.5.0
文字列の幅のピクセル数を取得します。
celestia.cfgで定義されたTitleFontでの幅となります。
例:
w = celestia:gettextwidth("Celestia")
celestia:flash("The width of Celesia: " .. w)
celestia:setlabelcolor
celestia:setlabelcolor(string:label, number:red, number:green, number:blue)
1.5.0
天体名や座標軸の数値の色を設定します。
例:
while 1 do
celestia:setlabelcolor("stars", 1,0,0)
wait(0.01)
celestia:setlabelcolor("stars", 1,1,0)
wait(0.01)
celestia:setlabelcolor("stars", 0,1,0)
wait(0.01)
celestia:setlabelcolor("stars", 0,1,1)
wait(0.01)
celestia:setlabelcolor("stars", 0,0,1)
wait(0.01)
celestia:setlabelcolor("stars", 1,0,1)
wait(0.01)
end
celestia:setlinecolor
celestia:setlinecolor(string:line, number:red, number:green, number:blue)
1.5.0
軌道や座標軸の線の色を設定します。
例:
while 1 do
celestia:setlinecolor("contellations", 1,0,0)
wait(0.01)
celestia:setlinecolor("contellations", 1,1,0)
wait(0.01)
celestia:setlinecolor("contellations", 0,1,0)
wait(0.01)
celestia:setlinecolor("contellations", 0,1,1)
wait(0.01)
celestia:setlinecolor("contellations", 0,0,1)
wait(0.01)
celestia:setlinecolor("contellations", 1,0,1)
wait(0.01)
end
celestia:getlabelcolor
number celestia:getlabelcolor(string:label)
1.6.0
天体名や座標軸の数値の色を取得します。
例:
function celestia_cleanup_callback()
celestia:setlabelcolor("stars", r, g, b)
end
r, g, b = celestia:getlabelcolor("stars")
while 1 do
celestia:setlabelcolor("stars", r, g, b)
wait(0.1)
celestia:setlabelcolor("stars", 0, 0, 0)
wait(0.1)
end
celestia:getlinecolor
number celestia:getlinecolor(string:label)
1.6.0
軌道や座標軸の線の色を取得します。
例:
function celestia_cleanup_callback()
celestia:setlinecolor("constellations", r, g, b)
end
r, g, b = celestia:getlinecolor("constellations")
while 1 do
celestia:setlinecolor("constellations", r, g, b)
wait(0.1)
celestia:setlinecolor("constellations", 0, 0, 0)
wait(0.1)
end
celestia:showconstellations
celestia:showconstellations(table:constellation_names)
1.6.0
星座線・星座名の表示を星座ごとに設定します。
なお、「/」キーや「=」キーで制御されるON/OFFとは別となっています。
例:
celestia:showconstellations({"Aquila", "Lyra", "Cygnus"})
celestia:hideconstellations
celestia:hideconstellations(table:constellation_names)
1.6.0
星座名の非表示を星座ごとに設定します。
なお、「/」キーや「=」キーで制御されるON/OFFとは別となっています。
例:
celestia:hideconstellations({"Aquila", "Lyra", "Cygnus"})
celestia:setconstellationcolor
celestia:setconstellationcolor(number:red, number:green, number:blue, table:constellation_names)
1.6.0
星座線の色を星座ごとに設定します。
例:
celestia:setconstellationcolor(1, 1, 1, {"Aquila", "Lyra", "Cygnus"})
celestia:gettexturesolution
number celestia:gettexturesolution()
1.6.0
テクスチャの解像度を取得します。
低解像度(lore)で0、中解像度(medres)で1、高解像度(hires)で2が返されます。
例:
celestia:settexturesolution
celestia:settexturesolution(number:resolution)
1.6.0
テクスチャの解像度を取得します。
例:
celestia:windowbordervisible
boolean celestia:windowbordervisible()
1.6.0
画面を分割した時の境界線の表示・非表示の状態を取得します。
表示時でtrue、非表示時でfalseです。
例:
celestia:setwindowbordervisible
celestia:setwindowbordervisible(boolean:visible)
1.6.0
画面を分割した時の境界線の表示・非表示の状態を設定します。
例:
トップページ > .CELXスクリプトガイド > レンダリング