<commit_before>local transforms = asset.require("./transforms")
asset.require("spice/base")

local Sun = {
  Identifier = "Sun",
  Parent = transforms.SunIAU.Identifier,
  Renderable = {
    Type = "RenderableGlobe",
    Enabled = false,
    Radii = { 6.957E8, 6.957E8, 6.957E8 },
    SegmentsPerPatch = 64,
    Layers = {},
    PerformShading = false
  },
  ApproachFactor = 15.0,
  GUI = {
    Name = "Sun",
    Path = "/Solar System/Sun",
    Description = "Globe for the sun in our solar system"
  }
}

local SunLabel = {
  Identifier = "SunLabel",
  Parent = Sun.Identifier,
  Renderable = {
    Enabled = false,
    Type = "RenderableLabels",
    Text = "Sun",
    FontSize = 70.0,
    Size = 14.17,
    MinMaxSize = { 1, 50 },
    OrientationOption = "Camera View Direction",
    BlendMode = "Additive",
    EnableFading = true,
    FadeUnit = "pc",
    FadeDistances = { 1.33, 15.0 },
    FadeWidths = { 1.0, 20.0 }
  },
  Tag = { "solarsystem_labels" },
  GUI = {
    Name = "Sun Label",
    Path = "/Solar System/Sun",
    Description = "Label for the sun in our solar system"
  }
}

local LightSource = {
  Type = "SceneGraphLightSource",
  Identifier = "Sun",
  Node = transforms.SolarSystemBarycenter.Identifier,
  Intensity = 1.0
}

asset.onInitialize(function()
  openspace.addSceneGraphNode(Sun)
  openspace.addSceneGraphNode(SunLabel)
end)
    
asset.onDeinitialize(function()
  openspace.removeSceneGraphNode(SunLabel)
  openspace.removeSceneGraphNode(Sun)
end)
    
asset.export(Sun)
asset.export(SunLabel)<commit_msg>Use Sun position instead of SSB in Sun light source (see #2223)<commit_after>local transforms = asset.require("./transforms")
asset.require("spice/base")

local Sun = {
  Identifier = "Sun",
  Parent = transforms.SunIAU.Identifier,
  Renderable = {
    Type = "RenderableGlobe",
    Enabled = false,
    Radii = { 6.957E8, 6.957E8, 6.957E8 },
    SegmentsPerPatch = 64,
    Layers = {},
    PerformShading = false
  },
  ApproachFactor = 15.0,
  GUI = {
    Name = "Sun",
    Path = "/Solar System/Sun",
    Description = "Globe for the sun in our solar system"
  }
}

local SunLabel = {
  Identifier = "SunLabel",
  Parent = Sun.Identifier,
  Renderable = {
    Enabled = false,
    Type = "RenderableLabels",
    Text = "Sun",
    FontSize = 70.0,
    Size = 14.17,
    MinMaxSize = { 1, 50 },
    OrientationOption = "Camera View Direction",
    BlendMode = "Additive",
    EnableFading = true,
    FadeUnit = "pc",
    FadeDistances = { 1.33, 15.0 },
    FadeWidths = { 1.0, 20.0 }
  },
  Tag = { "solarsystem_labels" },
  GUI = {
    Name = "Sun Label",
    Path = "/Solar System/Sun",
    Description = "Label for the sun in our solar system"
  }
}

local LightSource = {
  Type = "SceneGraphLightSource",
  Identifier = "Sun",
  Node = Sun.Identifier,
  Intensity = 1.0
}

asset.onInitialize(function()
  openspace.addSceneGraphNode(Sun)
  openspace.addSceneGraphNode(SunLabel)
end)

asset.onDeinitialize(function()
  openspace.removeSceneGraphNode(SunLabel)
  openspace.removeSceneGraphNode(Sun)
end)

asset.export(Sun)
asset.export(SunLabel)
{'fraction_non_alphanumeric': 0.13151927437641722, 'fraction_numerical': 0.029154518950437316, 'mean_word_length': 3.178619756427605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5440253', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1065, 'n_words': 240}