Update logo and tweak colors and positions. (#92)

* Update logo and tweak colors and positions.

Co-Authored-By: LJSTAR <31629427+ljstarbird@users.noreply.github.com>

* Make wrapper animation resilient against large delta times.

---------

Co-authored-by: LJSTAR <31629427+ljstarbird@users.noreply.github.com>
This commit is contained in:
Darío
2026-01-17 20:18:27 -03:00
committed by GitHub
parent a36dffce3e
commit fa74069094
3 changed files with 156 additions and 270 deletions
+1 -1
View File
@@ -2,6 +2,6 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 2180 2160" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(0.837799,0,0,0.823158,362.599,628.361)">
<path d="M2169.26,-763.354L2169.26,1860.69L-432.8,1860.69L-432.8,-763.354L2169.26,-763.354ZM576.269,847.984L660.512,1167.98L950.699,1088.84C912.269,1067.12 882.2,1030.18 869.936,983.6C845.93,892.416 899.177,798.549 988.767,774.117C1078.36,749.684 1170.58,803.878 1194.59,895.062C1206.85,941.647 1198.96,988.933 1176.35,1027.3L1466.53,948.162L1382.27,628.092C1360.47,662.883 1326.33,689.805 1284.12,701.316C1194.53,725.75 1102.3,671.558 1078.3,580.372C1054.29,489.188 1107.54,395.321 1197.13,370.888C1239.34,359.377 1282.13,365.317 1318.1,384.358L1250.56,127.805L960.463,206.919C983.019,168.569 990.892,121.33 978.639,74.789C954.634,-16.395 862.407,-70.589 772.817,-46.157C683.227,-21.724 629.98,72.143 653.985,163.327C666.238,209.868 696.263,246.771 734.637,268.505L444.539,347.619L512.06,604.091C476.111,585.098 433.361,579.18 391.193,590.679C301.6,615.113 248.356,708.979 272.362,800.163C296.368,891.349 388.591,945.541 478.184,921.108C520.352,909.608 554.468,882.73 576.269,847.984Z" style="fill:#0F53B2"/>
<path d="M2169.26,-763.354L2169.26,1860.69L-432.8,1860.69L-432.8,-763.354L2169.26,-763.354ZM576.269,847.984L660.512,1167.98L950.699,1088.84C912.269,1067.12 882.2,1030.18 869.936,983.6C845.93,892.416 899.177,798.549 988.767,774.117C1078.36,749.684 1170.58,803.878 1194.59,895.062C1206.85,941.647 1198.96,988.933 1176.35,1027.3L1466.53,948.162L1382.27,628.092C1360.47,662.883 1326.33,689.805 1284.12,701.316C1194.53,725.75 1102.3,671.558 1078.3,580.372C1054.29,489.188 1107.54,395.321 1197.13,370.888C1239.34,359.377 1282.13,365.317 1318.1,384.358L1250.56,127.805L960.463,206.919C983.019,168.569 990.892,121.33 978.639,74.789C954.634,-16.395 862.407,-70.589 772.817,-46.157C683.227,-21.724 629.98,72.143 653.985,163.327C666.238,209.868 696.263,246.771 734.637,268.505L444.539,347.619L512.06,604.091C476.111,585.098 433.361,579.18 391.193,590.679C301.6,615.113 248.356,708.979 272.362,800.163C296.368,891.349 388.591,945.541 478.184,921.108C520.352,909.608 554.468,882.73 576.269,847.984Z" style="fill:#1F63C2"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

+143 -245
View File
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 56 KiB

+12 -24
View File
@@ -44,6 +44,7 @@ struct LauncherContext {
AnimatedSvg logo_svg;
std::array<AnimatedSvg, 4> cloud_svgs;
recompui::Element *wrapper;
float wrapper_phase = -1.0f;
std::chrono::steady_clock::time_point last_update_time;
float seconds = 0.0f;
bool started = false;
@@ -141,7 +142,7 @@ const float jiggy_shine_length = 0.8f;
void banjo::launcher_animation_setup(recompui::LauncherMenu *menu) {
auto context = recompui::get_current_context();
recompui::Element *background_container = menu->get_background_container();
background_container->set_background_color({ 0x0F, 0x53, 0xB2, 0xFF });
background_container->set_background_color({ 0x1F, 0x63, 0xC2, 0xFF });
launcher_context.wrapper = context.create_element<recompui::Element>(background_container, 0);
launcher_context.wrapper->set_position(recompui::Position::Absolute);
@@ -161,7 +162,7 @@ void banjo::launcher_animation_setup(recompui::LauncherMenu *menu) {
launcher_context.cloud_svgs[2] = create_animated_svg(context, background_container, "Cloud3.svg", 295.0f, 167.0f);
launcher_context.cloud_svgs[3] = create_animated_svg(context, background_container, "Cloud1.svg", 461.0f, 154.0f);
launcher_context.logo_svg = create_animated_svg(context, background_container, "Logo.svg", 6189.0f * 0.125f, 2626.0f * 0.125f);
launcher_context.logo_svg = create_animated_svg(context, background_container, "Logo.svg", 6187.0f * 0.125f, 2625.0f * 0.125f);
// Animate the jiggy hole.
launcher_context.jiggy_hole_svg.position_keyframes = {
@@ -258,7 +259,7 @@ void banjo::launcher_animation_setup(recompui::LauncherMenu *menu) {
launcher_context.logo_svg.position_keyframes = {
{ 0.0f, 0.0f, -900.0f },
{ 1.0f, 0.0f, -900.0f },
{ 2.0f, 0.0f, -350.0f },
{ 2.0f, 0.0f, -365.0f },
};
launcher_context.logo_svg.position_animation.interpolation_method = InterpolationMethod::Smootherstep;
@@ -341,36 +342,23 @@ void banjo::launcher_animation_update(recompui::LauncherMenu *menu) {
update_animated_svg(launcher_context.cloud_svgs[i], delta_time, bg_width, bg_height);
}
if (launcher_context.seconds > jiggy_move_over_start && launcher_context.seconds < jiggy_move_over_end) {
float t = (launcher_context.seconds - jiggy_move_over_start) / (jiggy_move_over_end - jiggy_move_over_start);
float x_translation = interpolate_value(0, 1440 * -0.2f, t, InterpolationMethod::Smootherstep);
float wrapper_phase = std::clamp((launcher_context.seconds - jiggy_move_over_start) / (jiggy_move_over_end - jiggy_move_over_start), 0.0f, 1.0f);
if (wrapper_phase != launcher_context.wrapper_phase) {
float x_translation = interpolate_value(0, 1440 * -0.2f, wrapper_phase, InterpolationMethod::Smootherstep);
launcher_context.wrapper->set_translate_2D(x_translation, 0, recompui::Unit::Dp);
float y_translation = interpolate_value(0, launcher_options_top_offset, t, InterpolationMethod::Smootherstep);
float y_translation = interpolate_value(0, launcher_options_top_offset, wrapper_phase, InterpolationMethod::Smootherstep);
launcher_context.wrapper->set_top(y_translation);
float scale = interpolate_value(1, 0.666f, t, InterpolationMethod::Smootherstep);
float scale = interpolate_value(1, 0.666f, wrapper_phase, InterpolationMethod::Smootherstep);
launcher_context.wrapper->set_scale_2D(scale, scale);
float game_option_menu_opacity = interpolate_value(0, 1.0f, t, InterpolationMethod::Smootherstep);
float game_option_menu_opacity = interpolate_value(0, 1.0f, wrapper_phase, InterpolationMethod::Smootherstep);
for (auto option : menu->get_game_options_menu()->get_options()) {
option->set_opacity(game_option_menu_opacity);
}
float game_option_menu_right = interpolate_value(
launcher_options_right_position_start, launcher_options_right_position_end, t, InterpolationMethod::Smootherstep);
float game_option_menu_right = interpolate_value(launcher_options_right_position_start, launcher_options_right_position_end, wrapper_phase, InterpolationMethod::Smootherstep);
menu->get_game_options_menu()->set_right(game_option_menu_right);
}
if (launcher_context.seconds <= jiggy_move_over_start) {
for (auto option : menu->get_game_options_menu()->get_options()) {
option->set_opacity(0);
}
menu->get_game_options_menu()->set_right(launcher_options_right_position_start);
} else if (launcher_context.seconds >= jiggy_move_over_end) {
for (auto option : menu->get_game_options_menu()->get_options()) {
option->set_opacity(1.0f);
}
menu->get_game_options_menu()->set_right(launcher_options_right_position_end);
launcher_context.wrapper_phase = wrapper_phase;
}
}