2.1.0 (#123)
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m9s
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m9s
# Patchnotes 2.1.0 The changes in this update are more than just "patches". With a new UI, a new feature, and a bunch of bug fixes, improvements and a new member on the dev team, we thought this was more of a minor update. We would like to introduce @tsubasahane of MareCN to the team! We’re happy to work with them to bring Lightless and its features to the CN client as well as having another talented dev bring features and ideas to us. Speaking of which: # Location Sharing (Big shout out to @tsubasahane for bringing this feature) - Are you TIRED of scrambling to find the address of the venue you're in to share with your friends? We are introducing Location Sharing! An optional feature where you can share your location with direct pairs temporarily [30 minutes, 1 hour, 3 hours] minutes or until you turn it off for them. That's up to you! [#125](<#125>) [#49](<Lightless-Sync/LightlessServer#49>) - To share your location with a pair, click the three dots beside the pair and choose a duration to share with them. [#125](<#125>) [#49](<Lightless-Sync/LightlessServer#49>) - To view the location of someone who's shared with you, simply hover over the globe icon! [#125](<#125>) [#49](<Lightless-Sync/LightlessServer#49>) [1] # Model Optimization (Mesh Decimating) - This new option can automatically “simplify” incoming character meshes to help performance by reducing triangle counts. You choose how strong the reduction is (default/recommended is 80%). [#131](<#131>) - Decimation only kicks in when a mesh is above a certain triangle threshold, and only for the items that qualify for it and you selected for. [#131](<#131>) - Hair meshes is always excluded, since simplifying hair meshes is very prone to breaking. - You can find everything under Settings → Performance → Model Optimization. [#131](<#131>) + ** IF YOU HAVE USED DECIMATION IN TESTING, PLEASE CLEAR YOUR CACHE ❗ ** [2] # Animation (PAP) Validation (Safer animations) - Lightless now checks your currently animations to see if they work with your local skeleton/bone mod. If an animation matches, it’s included in what gets sent to other players. If it doesn’t, Lightless will skip it and write a warning to your log showing how many were skipped due to skeleton changes. Its defaulted to Unsafe (off). turn it on if you experience crashes from others users. [#131](<#131>) - Lightless also does the same kind of check for incoming animation files, to make sure they match the body/skeleton they were sent with. [#131](<#131>) - Because these checks can sometimes be a little picky, you can adjust how strict they are in Settings -> General -> Animation & Bones to reduce false positives. [#131](<#131>) # UI Changes (Thanks to @kyuwu for UI Changes) - The top part of the main screen has gotten a makeover. You can adjust the colors of the gradiant in the Color settings of Lightless. [#127](<#127>) [3] - Settings have gotten some changes as well to make this change more universal, and will use the same color settings. [#127](<#127>) - The particle effects of the gradient are toggleable in 'Settings -> UI -> Behavior' [#127](<#127>) - Instead of showing download/upload on bottom of Main UI, it will show VRAM usage and triangles with their optimization options next to it [#138](<#138>) # LightFinder / ShellFinder - UI Changes that follow our new design follow the color codes for the Gradient top as the main screen does. [#127](<#127>) [4] Co-authored-by: defnotken <itsdefnotken@gmail.com> Co-authored-by: azyges <aaaaaa@aaa.aaa> Co-authored-by: cake <admin@cakeandbanana.nl> Co-authored-by: Tsubasa <tsubasa@noreply.git.lightless-sync.org> Co-authored-by: choco <choco@patat.nl> Co-authored-by: celine <aaa@aaa.aaa> Co-authored-by: celine <celine@noreply.git.lightless-sync.org> Co-authored-by: Tsubasahane <wozaiha@gmail.com> Co-authored-by: cake <cake@noreply.git.lightless-sync.org> Reviewed-on: #123
This commit was merged in pull request #123.
This commit is contained in:
@@ -43,10 +43,23 @@ public class AnimatedHeader
|
||||
private const float _extendedParticleHeight = 40f;
|
||||
|
||||
public float Height { get; set; } = 150f;
|
||||
|
||||
// Color keys for theming
|
||||
public string? TopColorKey { get; set; } = "HeaderGradientTop";
|
||||
public string? BottomColorKey { get; set; } = "HeaderGradientBottom";
|
||||
public string? StaticStarColorKey { get; set; } = "HeaderStaticStar";
|
||||
public string? ShootingStarColorKey { get; set; } = "HeaderShootingStar";
|
||||
|
||||
// Fallbacks if the color keys are not found
|
||||
public Vector4 TopColor { get; set; } = new(0.08f, 0.05f, 0.15f, 1.0f);
|
||||
public Vector4 BottomColor { get; set; } = new(0.12f, 0.08f, 0.20f, 1.0f);
|
||||
public Vector4 StaticStarColor { get; set; } = new(1f, 1f, 1f, 1f);
|
||||
public Vector4 ShootingStarColor { get; set; } = new(0.4f, 0.8f, 1.0f, 1.0f);
|
||||
|
||||
public bool EnableParticles { get; set; } = true;
|
||||
public bool EnableBottomGradient { get; set; } = true;
|
||||
|
||||
public float GradientHeight { get; set; } = 60f;
|
||||
|
||||
/// <summary>
|
||||
/// Draws the animated header with some customizable content
|
||||
@@ -146,16 +159,21 @@ public class AnimatedHeader
|
||||
{
|
||||
var drawList = ImGui.GetWindowDrawList();
|
||||
|
||||
var top = ResolveColor(TopColorKey, TopColor);
|
||||
var bottom = ResolveColor(BottomColorKey, BottomColor);
|
||||
|
||||
drawList.AddRectFilledMultiColor(
|
||||
headerStart,
|
||||
headerEnd,
|
||||
ImGui.GetColorU32(TopColor),
|
||||
ImGui.GetColorU32(TopColor),
|
||||
ImGui.GetColorU32(BottomColor),
|
||||
ImGui.GetColorU32(BottomColor)
|
||||
ImGui.GetColorU32(top),
|
||||
ImGui.GetColorU32(top),
|
||||
ImGui.GetColorU32(bottom),
|
||||
ImGui.GetColorU32(bottom)
|
||||
);
|
||||
|
||||
// Draw static background stars
|
||||
var starBase = ResolveColor(StaticStarColorKey, StaticStarColor);
|
||||
|
||||
var random = new Random(42);
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
@@ -164,23 +182,28 @@ public class AnimatedHeader
|
||||
(float)random.NextDouble() * (headerEnd.Y - headerStart.Y)
|
||||
);
|
||||
var brightness = 0.3f + (float)random.NextDouble() * 0.4f;
|
||||
drawList.AddCircleFilled(starPos, 1f, ImGui.GetColorU32(new Vector4(1f, 1f, 1f, brightness)));
|
||||
var starColor = starBase with { W = starBase.W * brightness };
|
||||
|
||||
drawList.AddCircleFilled(starPos, 1f, ImGui.GetColorU32(starColor));
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawBottomGradient(Vector2 headerStart, Vector2 headerEnd, float width)
|
||||
{
|
||||
var drawList = ImGui.GetWindowDrawList();
|
||||
var gradientHeight = 60f;
|
||||
var gradientHeight = GradientHeight;
|
||||
var bottom = ResolveColor(BottomColorKey, BottomColor);
|
||||
|
||||
for (int i = 0; i < gradientHeight; i++)
|
||||
{
|
||||
var progress = i / gradientHeight;
|
||||
var smoothProgress = progress * progress;
|
||||
var r = BottomColor.X + (0.0f - BottomColor.X) * smoothProgress;
|
||||
var g = BottomColor.Y + (0.0f - BottomColor.Y) * smoothProgress;
|
||||
var b = BottomColor.Z + (0.0f - BottomColor.Z) * smoothProgress;
|
||||
|
||||
var r = bottom.X + (0.0f - bottom.X) * smoothProgress;
|
||||
var g = bottom.Y + (0.0f - bottom.Y) * smoothProgress;
|
||||
var b = bottom.Z + (0.0f - bottom.Z) * smoothProgress;
|
||||
var alpha = 1f - smoothProgress;
|
||||
|
||||
var gradientColor = new Vector4(r, g, b, alpha);
|
||||
drawList.AddLine(
|
||||
new Vector2(headerStart.X, headerEnd.Y + i),
|
||||
@@ -308,9 +331,11 @@ public class AnimatedHeader
|
||||
? baseAlpha * (0.6f + 0.4f * MathF.Sin(particle.Twinkle))
|
||||
: baseAlpha;
|
||||
|
||||
var shootingBase = ResolveColor(ShootingStarColorKey, ShootingStarColor);
|
||||
|
||||
if (particle.Type == ParticleType.ShootingStar && particle.Trail != null && particle.Trail.Count > 1)
|
||||
{
|
||||
var cyanColor = new Vector4(0.4f, 0.8f, 1.0f, 1.0f);
|
||||
var baseColor = shootingBase;
|
||||
|
||||
for (int t = 1; t < particle.Trail.Count; t++)
|
||||
{
|
||||
@@ -319,17 +344,18 @@ public class AnimatedHeader
|
||||
var trailWidth = (1f - trailProgress) * 3f + 1f;
|
||||
|
||||
var glowAlpha = trailAlpha * 0.4f;
|
||||
|
||||
drawList.AddLine(
|
||||
bannerStart + particle.Trail[t - 1],
|
||||
bannerStart + particle.Trail[t],
|
||||
ImGui.GetColorU32(cyanColor with { W = glowAlpha }),
|
||||
ImGui.GetColorU32(baseColor with { W = glowAlpha }),
|
||||
trailWidth + 4f
|
||||
);
|
||||
|
||||
drawList.AddLine(
|
||||
bannerStart + particle.Trail[t - 1],
|
||||
bannerStart + particle.Trail[t],
|
||||
ImGui.GetColorU32(cyanColor with { W = trailAlpha }),
|
||||
ImGui.GetColorU32(baseColor with { W = trailAlpha }),
|
||||
trailWidth
|
||||
);
|
||||
}
|
||||
@@ -448,6 +474,13 @@ public class AnimatedHeader
|
||||
Hue = 270f
|
||||
});
|
||||
}
|
||||
private static Vector4 ResolveColor(string? key, Vector4 fallback)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(key))
|
||||
return fallback;
|
||||
|
||||
return UIColors.Get(key);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears all active particles. Useful when closing or hiding a window with an animated header.
|
||||
|
||||
@@ -43,6 +43,7 @@ internal static class MainStyle
|
||||
new("color.titleBg", "Title Background", () => Rgba(24, 24, 24, 232), ImGuiCol.TitleBg),
|
||||
new("color.titleBgActive", "Title Background (Active)", () => Rgba(30, 30, 30, 255), ImGuiCol.TitleBgActive),
|
||||
new("color.titleBgCollapsed", "Title Background (Collapsed)", () => Rgba(27, 27, 27, 255), ImGuiCol.TitleBgCollapsed),
|
||||
|
||||
new("color.menuBarBg", "Menu Bar Background", () => Rgba(36, 36, 36, 255), ImGuiCol.MenuBarBg),
|
||||
new("color.scrollbarBg", "Scrollbar Background", () => Rgba(0, 0, 0, 0), ImGuiCol.ScrollbarBg),
|
||||
new("color.scrollbarGrab", "Scrollbar Grab", () => Rgba(62, 62, 62, 255), ImGuiCol.ScrollbarGrab),
|
||||
|
||||
@@ -29,6 +29,7 @@ public sealed class SeluneGradientSettings
|
||||
public Vector4 GradientColor { get; init; } = UIColors.Get("LightlessPurple");
|
||||
public Vector4? HighlightColor { get; init; }
|
||||
public float GradientPeakOpacity { get; init; } = 0.07f;
|
||||
public float GradientPeakPosition { get; init; } = 0.035f;
|
||||
public float HighlightPeakAlpha { get; init; } = 0.13f;
|
||||
public float HighlightEdgeAlpha { get; init; } = 0f;
|
||||
public float HighlightMidpoint { get; init; } = 0.45f;
|
||||
@@ -378,6 +379,7 @@ internal static class SeluneRenderer
|
||||
topColorVec,
|
||||
midColorVec,
|
||||
bottomColorVec,
|
||||
settings,
|
||||
settings.BackgroundMode);
|
||||
}
|
||||
|
||||
@@ -403,19 +405,21 @@ internal static class SeluneRenderer
|
||||
Vector4 topColorVec,
|
||||
Vector4 midColorVec,
|
||||
Vector4 bottomColorVec,
|
||||
SeluneGradientSettings settings,
|
||||
SeluneGradientMode mode)
|
||||
{
|
||||
var peakPosition = Math.Clamp(settings.GradientPeakPosition, 0.01f, 0.99f);
|
||||
switch (mode)
|
||||
{
|
||||
case SeluneGradientMode.Vertical:
|
||||
DrawVerticalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec);
|
||||
DrawVerticalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec, peakPosition);
|
||||
break;
|
||||
case SeluneGradientMode.Horizontal:
|
||||
DrawHorizontalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec);
|
||||
DrawHorizontalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec, peakPosition);
|
||||
break;
|
||||
case SeluneGradientMode.Both:
|
||||
DrawVerticalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec);
|
||||
DrawHorizontalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec);
|
||||
DrawVerticalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec, peakPosition);
|
||||
DrawHorizontalBackground(drawList, gradientLeft, gradientRight, clampedTopY, clampedBottomY, topColorVec, midColorVec, bottomColorVec, peakPosition);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -428,13 +432,14 @@ internal static class SeluneRenderer
|
||||
float clampedBottomY,
|
||||
Vector4 topColorVec,
|
||||
Vector4 midColorVec,
|
||||
Vector4 bottomColorVec)
|
||||
Vector4 bottomColorVec,
|
||||
float peakPosition)
|
||||
{
|
||||
var topColor = ImGui.ColorConvertFloat4ToU32(topColorVec);
|
||||
var midColor = ImGui.ColorConvertFloat4ToU32(midColorVec);
|
||||
var bottomColor = ImGui.ColorConvertFloat4ToU32(bottomColorVec);
|
||||
|
||||
var midY = clampedTopY + (clampedBottomY - clampedTopY) * 0.035f;
|
||||
var midY = clampedTopY + (clampedBottomY - clampedTopY) * peakPosition;
|
||||
drawList.AddRectFilledMultiColor(
|
||||
new Vector2(gradientLeft, clampedTopY),
|
||||
new Vector2(gradientRight, midY),
|
||||
@@ -460,13 +465,14 @@ internal static class SeluneRenderer
|
||||
float clampedBottomY,
|
||||
Vector4 leftColorVec,
|
||||
Vector4 midColorVec,
|
||||
Vector4 rightColorVec)
|
||||
Vector4 rightColorVec,
|
||||
float peakPosition)
|
||||
{
|
||||
var leftColor = ImGui.ColorConvertFloat4ToU32(leftColorVec);
|
||||
var midColor = ImGui.ColorConvertFloat4ToU32(midColorVec);
|
||||
var rightColor = ImGui.ColorConvertFloat4ToU32(rightColorVec);
|
||||
|
||||
var midX = gradientLeft + (gradientRight - gradientLeft) * 0.035f;
|
||||
var midX = gradientLeft + (gradientRight - gradientLeft) * peakPosition;
|
||||
drawList.AddRectFilledMultiColor(
|
||||
new Vector2(gradientLeft, clampedTopY),
|
||||
new Vector2(midX, clampedBottomY),
|
||||
|
||||
Reference in New Issue
Block a user