[PR #7489] [MERGED] Launcher: the redesign's pixel sunset (redesign 2) #7626

Closed
opened 2026-11-03 07:21:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7489
Author: @ludovic111
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: feat/launcher-scene


📝 Commits (1)

  • d518320 launcher: the redesign's pixel sunset (scene.rs)

📊 Changes

3 files changed (+1213 additions, -15 deletions)

View changed files

📝 launcher/src/main.rs (+27 -10)
➕ launcher/src/scene.rs (+1181 -0)
📝 launcher/src/sky.rs (+5 -5)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Redesign 2 of the series that ports Anthony S.'s launcher mockup (playhorizon.dev/launcher) to the GPUI launcher. Design reviewer: dezer-x. Stacked on #7447 (GPUI Fast 0.1.13).

This PR swaps the dark appearance's background for the mockup's pixel sunset. The pages on top are unchanged here; the glass sidebar, top bar and pages follow in the next PRs.

What it is

  • launcher/src/scene.rs ports the website's HorizonScene (horizon-site components/horizon-scene.tsx) the way the mockup draws it (wideSun x 0.72, scale 1.1, rise 0.1). It keeps the same seeds, makes the random draws in the same order, uses the same colour sums and Math.round/bit-op rounding, and builds the land and sun at the same size. A window of the same size therefore shows the same picture.
  • Moving parts work as on the site: twinkling stars, a meteor in some 9-second windows, drifting clouds, the sun, fireflies and pointer parallax (eased at dt * 3). It all stops 10 s after the window loses focus, and HORIZON_LAUNCHER_MOTION=off stills it.
  • GPUI Fast primitives:
    • The scene is its own retained view, so a frame of it redraws nothing else; the launcher's pages are copied from the last frame.
    • The sky's gradients, the sun's halo and the three ridges (with their trees and fog) are baked into images once per window size.
    • What moves is a few hundred quads per frame.
  • Light appearance keeps the dawn sky. The mockup has no light design.

Checked against the mockup

  • Golden test: the_scene_matches_the_website_pixel_for_pixel holds values computed by the website's own code, run in Node at 1280×772: the first random draws, the scene's measures, every cloud, and FNV hashes of the whole pixel layer at t = 0 and t = 5.3.
  • Pixel diff: the launcher at 1280×800 (a 1280×768 content area) against Chrome showing playhorizon.dev/launcher at 1280×768 with the UI hidden.
    • Mean difference 0.56/255.
    • 0.18 % of pixels differ by more than 8/255. These are the twinkling stars, which reduced motion leaves at another phase.
  • Idle cost over 20 s with the window in front: 0.66 s CPU with this scene, 0.78 s with the old sky.
  • Two GPUI Fast details the scene works around:
    • Sprites blend as straight alpha, so the images are stored that way.
    • The atlas is sampled linearly with no padding, so a stretched image's edge picks up its atlas neighbour and shows a 1 px seam. Each smooth image gets a one-texel border copied from its edges, painted just outside its bounds through paint_image's new image_bounds.
Mockup (Chrome, 1280×768) Launcher (this PR, title bar cut)
scene

Home and Servers, mockup left, launcher right. The pages are still the old ones; the scene is behind them, and Sculk's card and banner are unchanged:

home
servers

pr_ready

pr_ready (tools/pr_ready.py on ludovics-mac-mini, against origin/main at 7504abf07, 7 min 7 s)

Check Result
Scope ⚠️ 6 files, +1355 −110; 1465 lines of code: over 500, split it if it can ship in parts; mixes game, launcher
Cargo.lock ✅ changes with a Cargo.toml
Public tree ✅
Python tests ✅ 612 passed (4 min 16 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
mod API up to date ➖ native hooks untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (1 min 14 s)
launcher tests ✅ 452 passed (1 min 36 s)
Parity ➖ 18 affected, to run in CI (no vanilla data here): anvil_turtle_egg, armor_stand_frost, armor_stand_turtle_egg, arrow_wind_charge, boat_authority, boat_paddle_reset, boat_submerged, dragon_contacts, dragon_render, enchantment_components, fishing_hook_entities, inline_object and 6 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The scope line counts #7447's lock file too, since this PR is stacked on it. Of the 1355 added lines, about 300 are the scene's colour, tree and golden-value tables and its tests; the port can't ship in smaller working parts. pr_ready runs the launcher's --lib tests. The scene tests are in the binary: they pass locally (cargo test --release scene) and CI's cargo test --release runs them on all three OSes.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7489 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-scene` --- ### 📝 Commits (1) - [`d518320`](https://github.com/horizon-rust/horizon/commit/d518320301ac22581afe3e779eea18f124d53f8d) launcher: the redesign's pixel sunset (scene.rs) ### 📊 Changes **3 files changed** (+1213 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/main.rs` (+27 -10) ➕ `launcher/src/scene.rs` (+1181 -0) 📝 `launcher/src/sky.rs` (+5 -5) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Redesign 2 of the series that ports Anthony S.'s launcher mockup (playhorizon.dev/launcher) to the GPUI launcher. Design reviewer: dezer-x. Stacked on #7447 (GPUI Fast 0.1.13). This PR swaps the dark appearance's background for the mockup's pixel sunset. The pages on top are unchanged here; the glass sidebar, top bar and pages follow in the next PRs. ## What it is - `launcher/src/scene.rs` ports the website's `HorizonScene` (horizon-site `components/horizon-scene.tsx`) the way the mockup draws it (`wideSun` x 0.72, scale 1.1, rise 0.1). It keeps the same seeds, makes the random draws in the same order, uses the same colour sums and `Math.round`/bit-op rounding, and builds the land and sun at the same size. A window of the same size therefore shows the same picture. - Moving parts work as on the site: twinkling stars, a meteor in some 9-second windows, drifting clouds, the sun, fireflies and pointer parallax (eased at `dt * 3`). It all stops 10 s after the window loses focus, and `HORIZON_LAUNCHER_MOTION=off` stills it. - GPUI Fast primitives: - The scene is its own retained view, so a frame of it redraws nothing else; the launcher's pages are copied from the last frame. - The sky's gradients, the sun's halo and the three ridges (with their trees and fog) are baked into images once per window size. - What moves is a few hundred quads per frame. - Light appearance keeps the dawn sky. The mockup has no light design. ## Checked against the mockup - **Golden test:** `the_scene_matches_the_website_pixel_for_pixel` holds values computed by the website's own code, run in Node at 1280×772: the first random draws, the scene's measures, every cloud, and FNV hashes of the whole pixel layer at t = 0 and t = 5.3. - **Pixel diff:** the launcher at 1280×800 (a 1280×768 content area) against Chrome showing playhorizon.dev/launcher at 1280×768 with the UI hidden. - Mean difference 0.56/255. - 0.18 % of pixels differ by more than 8/255. These are the twinkling stars, which reduced motion leaves at another phase. - **Idle cost** over 20 s with the window in front: 0.66 s CPU with this scene, 0.78 s with the old sky. - Two GPUI Fast details the scene works around: - Sprites blend as straight alpha, so the images are stored that way. - The atlas is sampled linearly with no padding, so a stretched image's edge picks up its atlas neighbour and shows a 1 px seam. Each smooth image gets a one-texel border copied from its edges, painted just outside its bounds through `paint_image`'s new `image_bounds`. | Mockup (Chrome, 1280×768) | Launcher (this PR, title bar cut) | | --- | --- | | ![scene](https://raw.githubusercontent.com/horizon-rust/horizon/screenshots/launcher-redesign-4/pr2-scene/scene-only.png) | | Home and Servers, mockup left, launcher right. The pages are still the old ones; the scene is behind them, and Sculk's card and banner are unchanged: ![home](https://raw.githubusercontent.com/horizon-rust/horizon/screenshots/launcher-redesign-4/pr2-scene/home.png) ![servers](https://raw.githubusercontent.com/horizon-rust/horizon/screenshots/launcher-redesign-4/pr2-scene/servers.png) ## pr_ready **pr_ready** (`tools/pr_ready.py` on ludovics-mac-mini, against origin/main at 7504abf07, 7 min 7 s) | Check | Result | | --- | --- | | Scope | ⚠️ 6 files, +1355 −110; 1465 lines of code: over 500, split it if it can ship in parts; mixes game, launcher | | Cargo.lock | ✅ changes with a Cargo.toml | | Public tree | ✅ | | Python tests | ✅ 612 passed (4 min 16 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (1 min 14 s) | | launcher tests | ✅ 452 passed (1 min 36 s) | | Parity | ➖ 18 affected, to run in CI (no vanilla data here): anvil_turtle_egg, armor_stand_frost, armor_stand_turtle_egg, arrow_wind_charge, boat_authority, boat_paddle_reset, boat_submerged, dragon_contacts, dragon_render, enchantment_components, fishing_hook_entities, inline_object and 6 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The scope line counts #7447's lock file too, since this PR is stacked on it. Of the 1355 added lines, about 300 are the scene's colour, tree and golden-value tables and its tests; the port can't ship in smaller working parts. pr_ready runs the launcher's `--lib` tests. The scene tests are in the binary: they pass locally (`cargo test --release scene`) and CI's `cargo test --release` runs them on all three OSes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:21:03 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7626
No description provided.