Celestia/Celx 指令碼/CELX Lua 方法/CEL 命令 renderflags
外觀
renderflags { set <renderflagstring> }
-- 或者 --
renderflags { clear <renderflagstring> }
設定(開啟)或清除(關閉)以下一個或多個專案,以顯示在螢幕上。
引數
- set <renderflagstring> -- 或者 -- clear <renderflagstring>
- set 或 clear 字串值可以是下面列出的任何組合。沒有預設值。
多個值透過空格或豎線 "|"(例如 "orbits|stars")分隔,在單個引號(")內指定。- atmospheres
- automag
- boundaries
- cloudmaps
- 1.6.0 cloudshadows
- comettails
- constellations
- eclipseshadows
- 1.6.0 ecliptic
- 1.6.0 eclipticgrid
- 1.6.0 equatorialgrid
- 1.6.0 galacticgrid
- galaxies
- grid
- 1.6.0 horizontalgrid
- markers
- nightmaps
- orbits
- partialtrajectories
- planets
- pointstars →(不再使用 - 請參閱 set 命令)
- ringshadows
- smoothlines
- stars
- 注意:lightdelay 是此命令的(尚未)未知 renderflag。
CELX 等效項-1
基於 celestia:show() 和 celestia:hide() 方法。
- 啟用一個或多個渲染功能。此方法是為了向後相容舊指令碼而存在的;應改用 celestia:setrenderflags()。
<renderflagstring> 是一個字串,描述要啟用的渲染功能。
可以透過向此方法提供以逗號分隔的多個引數,一次啟用多個功能。
必須是以下之一- orbits, cloudmaps, constellations, galaxies, planets, stars, nightmaps, eclipseshadows, ringshadows, comettails, boundaries, markers, automag, atmospheres, grid, smoothlines, lightdelay, partialtrajectories, 1.6.0 cloudshadows, 1.6.0 ecliptic, 1.6.0 equatorialgrid, 1.6.0 galacticgrid, 1.6.0 eclipticgrid, 1.6.0 horizontalgrid。
celestia:show( <renderflagstring> )
- 停用一個或多個渲染功能。此方法是為了向後相容舊指令碼而存在的;應改用 celestia:setrenderflags()。
<renderflagstring> 是一個字串,描述要啟用的渲染功能。
可以透過向此方法提供以逗號分隔的多個引數,一次啟用多個功能。
必須是以下之一- orbits, cloudmaps, constellations, galaxies, planets, stars, nightmaps, eclipseshadows, ringshadows, comettails, boundaries, markers, automag, atmospheres, grid, smoothlines, lightdelay, partialtrajectories, 1.6.0 cloudshadows, 1.6.0 ecliptic, 1.6.0 equatorialgrid, 1.6.0 galacticgrid, 1.6.0 eclipticgrid, 1.6.0 horizontalgrid。
celestia:hide( <renderflagstring> )
CELX 等效項-2
基於 celestia:setrenderflags() 方法。
- 您可以使用 celestia:show() 和 celestia:hide() 或 celestia:setrenderflags() 方法,它們都具有等效的功能。此方法存在的主要原因是作為 celestia:getrenderflags() 的對應方法,例如,將所有 renderflag 重置為指令碼開始時儲存的值(請參閱 清理)。
"renderflagstable" 是一個表,它包含 <renderflagstring> 作為鍵,以及每個鍵的布林值。
可以透過提供多個表鍵,一次啟用和停用多個功能。
<renderflagstring> 必須是以下之一- orbits, cloudmaps, constellations, galaxies, planets, stars, nightmaps, eclipseshadows, ringshadows, comettails, boundaries, markers, automag, atmospheres, grid, smoothlines, lightdelay, partialtrajectories, 1.6.0 cloudshadows, 1.6.0 ecliptic, 1.6.0 equatorialgrid, 1.6.0 galacticgrid, 1.6.0 eclipticgrid, 1.6.0 horizontalgrid。
-- Define and initialize renderflagstable first, before setting renderflags:
renderflagstable = { }
renderflagstable.<renderflagstring1> = true
renderflagstable.<renderflagstring2> = false
-- more renderflag keys may be initialized.
celestia:setrenderflags(renderflagstable)
-- 或者 --
-- Shorter notation, but note the curly braces.
celestia:setrenderflags{ <renderflagstring1> = true, <renderflagstring2> = false }
示例
CEL
renderflags { set "automag|atmospheres|nightmaps" }
renderflags { clear "boundaries|galaxies|markers" }
CELX 使用 celestia:show() 和 celestia:hide() 方法
celestia:show("automag", "atmospheres", "nightmaps")
celestia:hide("boundaries", "galaxies", "markers")
CELX 使用 celestia:setrenderflags() 方法
renderflagstable = { }
renderflagstable.automag = true
renderflagstable.atmospheres =true
renderflagstable.nightmaps = true
renderflagstable.boundaries = false
renderflagstable.galaxies = false
renderflagstable.markers = false
celestia:setrenderflags(renderflagstable)
-- 或者 --
-- Shorter notation, but note the curly braces.
celestia:setrenderflags{automag=true, atmospheres=true, nightmaps=true,
boundaries=false, galaxies=false, markers=false}