mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-14 09:30:50 -05:00
Remove spaces from constellation images (closes #1219)
This commit is contained in:
@@ -9,7 +9,7 @@ local images = asset.syncedResource({
|
||||
})
|
||||
|
||||
--function that reads the file
|
||||
local createConstellations = function (guiPath, constellationfile)
|
||||
local createConstellations = function (baseIdentifier, guiPath, constellationfile)
|
||||
local genConstellations = {};
|
||||
--skip the first line
|
||||
local notFirstLine = false;
|
||||
@@ -33,7 +33,8 @@ local createConstellations = function (guiPath, constellationfile)
|
||||
group = (group == '' and globe or group)
|
||||
|
||||
local aconstellation = {
|
||||
Identifier = guiPath .. '-' .. name,
|
||||
-- Identifier = guiPath .. '-' .. name,
|
||||
Identifier = baseIdentifier .. '-' .. abbreviation,
|
||||
Parent = transforms.SolarSystemBarycenter.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
@@ -83,7 +84,7 @@ local nodes = {}
|
||||
asset.onInitialize(function ()
|
||||
local constellationsCSV = images .. "/constellation_data.csv"
|
||||
|
||||
nodes = createConstellations('Constellation Art', constellationsCSV)
|
||||
nodes = createConstellations('ConstellationArt', 'Constellation Art', constellationsCSV)
|
||||
for _, n in ipairs(nodes) do
|
||||
openspace.addSceneGraphNode(n);
|
||||
end
|
||||
|
||||
@@ -4,9 +4,9 @@ local Keybindings = {
|
||||
{
|
||||
Key = "c",
|
||||
Name = "Show Constellation Art",
|
||||
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0);" ..
|
||||
"openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', true);" ..
|
||||
"openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0.1, 2);",
|
||||
Command = "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Opacity', 0);" ..
|
||||
"openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Enabled', true);" ..
|
||||
"openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Opacity', 0.1, 2);",
|
||||
Documentation = "Enables and fades up constellation art work",
|
||||
GuiPath = "/Rendering",
|
||||
Local = false
|
||||
@@ -14,7 +14,7 @@ local Keybindings = {
|
||||
{
|
||||
Key = "SHIFT+c",
|
||||
Name = "Hide Constellation Art",
|
||||
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0, 2);",
|
||||
Command = "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Opacity', 0, 2);",
|
||||
Documentation = "Fades out constellation artwork",
|
||||
GuiPath = "/Rendering",
|
||||
Local = false
|
||||
@@ -22,7 +22,7 @@ local Keybindings = {
|
||||
{
|
||||
Key = "CTRL+c",
|
||||
Name = "Disable Constellation Art",
|
||||
Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', false);",
|
||||
Command = "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Enabled', false);",
|
||||
Documentation = "Disable constellation artwork",
|
||||
GuiPath = "/Rendering",
|
||||
Local = false
|
||||
|
||||
Reference in New Issue
Block a user