Merge remote-tracking branch 'origin/main' into fix/vanilla-item-use-animations

This commit is contained in:
Cosmic
2026-10-13 22:41:21 -04:00
15 changed files with 133 additions and 155 deletions
+4 -13
View File
@@ -52,7 +52,7 @@ Horizon is downloaded only through **the Horizon launcher**: get it from [playho
</tr>
</table>
It lists Horizon's releases and installs the build for your platform, shows each release's patch notes and the roadmap, updates Horizon and itself, and doubles as a command-line tool and an MCP server. See [the launcher's README](launcher/README.md).
It lists Horizon's releases and installs the build for your platform, shows each release's patch notes, updates Horizon and itself, and doubles as a command-line tool and an MCP server. See [the launcher's README](launcher/README.md).
## Screenshots
@@ -151,7 +151,7 @@ The client starts on the title screen. Command-line options (`--world`, `--seed`
## Project status
The table below is the project's own audit of each subsystem. Every subsystem now matches vanilla in every harness that compares it. 100% means 100% of what the harnesses compare, not proof that nothing else differs. The remaining known differences and the final checks are listed in the roadmap.
The table below is the project's own audit of each subsystem. Every subsystem now matches vanilla in every harness that compares it. 100% means 100% of what the harnesses compare, not proof that nothing else differs. The remaining known differences are listed below.
### Java parity: 100%
@@ -180,18 +180,9 @@ them too (Rust uses Java's own float maths on each platform).
| Audio | 1 | None: the sound engine, sound events, music, situational music, ambience and subtitles match vanilla |
| Block behaviours and ticking | 1 | None: block updates, random ticks, redstone, dispensers (6,000 cases), crafters (4,000 crafts), block entity removal (containers spill, 4,000 cases), copper golem chest sorting and the sculk family (435 scenarios: shrieker warnings and warden summoning included) match vanilla |
### Roadmap
### Known issues
**Known differences.** Online-mode servers (Mojang's session servers) are not supported; skins served over https show the default skin unless already cached; pack icons show the unknown-pack texture in game; the creative hotbar keys (C/X) aren't wired to the hotbar loader; item tooltips lack attribute lines.
**Final checks.** A from-scratch audit (`tools/parity.py --all`) on Linux and on macOS, and the launch checks on the packaged Linux, macOS and Windows builds listed in [Rust rewrite status](docs/rust-parity.md#completion-criteria-and-playable-builds).
**Next.** With vanilla parity as the base:
- **Performance optimisation:** take the client and the server as far as they can go (rendering, chunk generation and meshing, memory, multithreaded ticking), building on v2026.10.13.1's faster renderer, while the differential harnesses keep gameplay identical to vanilla.
- **Mod support:** a stable API for writing and loading mods against Horizon.
- **Built-in recording:** capture gameplay video in a keypress, without external tools.
- **Automatic version updates:** a pipeline that ports each new Minecraft release on its own: compare the new version with the pinned one, regenerate the data, rewrite the changed parts and prove them with the same differential harnesses.
Online-mode servers (Mojang's session servers) are not supported; skins served over https show the default skin unless already cached; pack icons show the unknown-pack texture in game; the creative hotbar keys (C/X) aren't wired to the hotbar loader; item tooltips lack attribute lines.
## Contributing
+1 -3
View File
@@ -18,7 +18,6 @@ The opening, then Play ([clip](docs/opening.webm)):
26.3 server jar from that version's own json, Python 3.10+ and Java 25), then starts the
client, or a server (`--dedicated --nogui`) in a folder you choose, with a live console.
- **Patch notes**: each release's notes, newest first, with a link to GitHub Sponsors. Quiet "Join Discord" and "Website" links sit in the sidebar footer.
- **What's next**: the README's roadmap, from main.
Data lives in the platform's data directory (`~/.local/share/horizon-launcher` on Linux,
`~/Library/Application Support/horizon-launcher` on macOS, `%APPDATA%\horizon-launcher` on
@@ -62,7 +61,6 @@ The same binary is a command-line tool; without a subcommand it opens the window
horizon-launcher play [--version <tag>]
horizon-launcher server [--dir <dir>] [--version <tag>] [--accept-eula]
horizon-launcher notes [<tag>] patch notes as plain text
horizon-launcher next the roadmap
horizon-launcher links the Discord, sponsor and website links
horizon-launcher menu-style [horizon|classic] show or set the game's menu style
horizon-launcher update [--check] Horizon and the launcher
@@ -80,7 +78,7 @@ scripts and tests).
(with the full path to the binary if it is not on your `PATH`). Its tools: `list_versions`,
`install_version`, `remove_version`, `prepare_resources`, `launch_client`, `start_server`,
`server_command`, `server_log`, `stop_server`, `patch_notes`, `roadmap`, `links`, `menu_style` and `check_updates`.
`server_command`, `server_log`, `stop_server`, `patch_notes`, `links`, `menu_style` and `check_updates`.
A server started through MCP stops (cleanly, with `stop`) when the session ends. Starting one
needs `accept_eula`, which an agent should only pass with the player's consent.
-24
View File
@@ -188,29 +188,6 @@ pub fn latest(releases: &[Release]) -> Option<&Release> {
releases.iter().find(|r| r.asset.is_some())
}
/// The README's roadmap section from main (the project status section if it has none).
pub fn roadmap() -> Result<String, String> {
let url = format!("https://raw.githubusercontent.com/{REPO}/main/README.md");
let readme = get(&url)?.into_string().map_err(|e| e.to_string())?;
let level = |l: &str| l.chars().take_while(|c| *c == '#').count();
for title in ["Roadmap", "Project status"] {
let lines: Vec<&str> = readme.lines().collect();
if let Some(start) = lines
.iter()
.position(|l| level(l) > 0 && l.trim_start_matches('#').trim() == title)
{
let depth = level(lines[start]);
let section: Vec<&str> = lines[start + 1..]
.iter()
.take_while(|l| !(level(l) > 0 && level(l) <= depth))
.copied()
.collect();
return Ok(section.join("\n").trim().to_string());
}
}
Err("The README has no roadmap section yet.".into())
}
/// The community, sponsor and website links, from `launcher/links.json` on main, so they can change
/// without a launcher release. An empty address hides its button.
#[derive(Clone, Debug, PartialEq, serde::Serialize)]
@@ -1094,7 +1071,6 @@ pub enum Job {
pub enum Msg {
Releases(Result<Vec<Release>, String>),
Roadmap(Result<String, String>),
Links(Links),
Progress(String, f32),
Installed(String, Result<(), String>),
-10
View File
@@ -59,8 +59,6 @@ enum Cmd {
},
/// Show a release's patch notes (default: the newest)
Notes { tag: Option<String> },
/// Show the roadmap
Next,
/// Show the Discord, sponsor and website links
Links,
/// Show or set the game's menu style (classic is vanilla's own screens)
@@ -240,14 +238,6 @@ fn execute(command: Cmd, as_json: bool) -> Result<(), String> {
);
}
}
Cmd::Next => {
let roadmap = backend::roadmap()?;
if as_json {
json(serde_json::json!({ "roadmap": roadmap }));
} else {
print!("{}", backend::markdown_to_text(&roadmap));
}
}
Cmd::Links => {
let links = backend::links();
if as_json {
+1 -37
View File
@@ -26,16 +26,14 @@ enum Page {
Play,
Versions,
Notes,
Next,
Settings,
}
impl Page {
const ALL: [(Page, &'static str); 5] = [
const ALL: [(Page, &'static str); 4] = [
(Page::Play, "Play"),
(Page::Versions, "Versions"),
(Page::Notes, "Patch notes"),
(Page::Next, "What's next"),
(Page::Settings, "Settings"),
];
fn index(self) -> usize {
@@ -121,7 +119,6 @@ struct Launcher {
bar: (f32, f32),
mode: Mode,
releases: Load<Vec<Release>>,
roadmap: Load<String>,
installed: Vec<String>,
installing: Option<(String, f32)>,
install_error: Option<(String, String)>,
@@ -202,7 +199,6 @@ impl Launcher {
bar: (0., 0.),
mode: Mode::Client,
releases: Load::Loading,
roadmap: Load::Loading,
installed,
installing: None,
install_error: None,
@@ -235,7 +231,6 @@ impl Launcher {
}
});
this.fetch_releases();
this.fetch_roadmap();
this.fetch_links();
this.check_updates();
this
@@ -312,21 +307,12 @@ impl Launcher {
});
}
fn fetch_roadmap(&mut self) {
self.roadmap = Load::Loading;
let tx = self.tx.clone();
std::thread::spawn(move || {
let _ = tx.send(Msg::Roadmap(backend::roadmap()));
});
}
fn drain(&mut self, cx: &mut Context<Self>) {
let mut changed = false;
while let Ok(msg) = self.rx.try_recv() {
changed = true;
match msg {
Msg::Releases(r) => self.releases = r.map_or_else(Load::Failed, Load::Ready),
Msg::Roadmap(r) => self.roadmap = r.map_or_else(Load::Failed, Load::Ready),
Msg::Links(links) => self.links = links,
// The page reads is_prepared when drawn; `changed` redraws it.
Msg::Reused(_) => self.installed = backend::installed(),
@@ -2044,27 +2030,6 @@ impl Launcher {
}
page.child(list)
}
fn next_page(&mut self, cx: &mut Context<Self>) -> Div {
let t = self.theme;
let page = div().flex().flex_col().gap(px(24.)).child(page_header(
"What's next",
"The roadmap, from the README on GitHub.",
&t,
));
match &self.roadmap {
Load::Loading => page.child(centered("Loading the roadmap…", &t)),
Load::Failed(e) => page.child(centered(e, &t).child(
button("retry-roadmap", "Try again", Kind::Secondary, &t).on_click(cx.listener(
|this, _: &ClickEvent, _, cx| {
this.fetch_roadmap();
cx.notify();
},
)),
)),
Load::Ready(text) => page.child(divider(&t)).child(markdown::render(text, &t)),
}
}
}
/// A thin bar. A known fraction eases from its previous value; an unknown one shuttles slowly.
@@ -2111,7 +2076,6 @@ impl Render for Launcher {
Page::Play => self.play_page(cx),
Page::Versions => self.versions_page(cx),
Page::Notes => self.notes_page(cx),
Page::Next => self.next_page(cx),
Page::Settings => self.settings_page(cx),
};
// The new page fades in and rises a few pixels.
+1 -1
View File
@@ -1,4 +1,4 @@
//! Release notes and the roadmap: pulldown-cmark events into gpui elements.
//! Release notes: pulldown-cmark events into gpui elements.
use crate::theme::Theme;
use gpui::{
div, prelude::*, px, AnyElement, FontStyle, FontWeight, HighlightStyle, SharedString,
-2
View File
@@ -37,7 +37,6 @@ fn tools() -> Value {
{ "name": "stop_server", "description": "Stop the running server cleanly (it saves the world), killing it if it does not stop within 30 seconds.", "inputSchema": none },
{ "name": "patch_notes", "description": "A release's patch notes as markdown.",
"inputSchema": { "type": "object", "properties": { "tag": { "type": "string", "description": "Default: the newest release." } } } },
{ "name": "roadmap", "description": "What's planned next for Horizon, from the README's roadmap.", "inputSchema": none },
{ "name": "links", "description": "The Horizon links: the Discord invite, the GitHub Sponsors page and the website (an empty one is not offered).", "inputSchema": none },
{ "name": "menu_style", "description": "Show or set the game's menu style. \"horizon\" is Horizon's own menus, \"classic\" is vanilla's screens, which have no way back inside the game. The game reads it when it starts.",
"inputSchema": { "type": "object", "properties": { "style": { "type": "string", "enum": ["horizon", "classic"], "description": "Omit to show the current style." } } } },
@@ -193,7 +192,6 @@ impl Session {
r.body
))
}
"roadmap" => backend::roadmap(),
"links" => Ok(serde_json::to_string_pretty(&backend::links()).unwrap()),
"menu_style" => {
if let Some(name) = arg_str(args, "style") {
+1 -1
View File
@@ -20,7 +20,7 @@
Referrer-Policy strict-origin-when-cross-origin
X-Frame-Options DENY
Permissions-Policy "interest-cohort=(), browsing-topics=(), camera=(), microphone=(), geolocation=()"
Content-Security-Policy "default-src 'self'; script-src 'self' {$CSP_SCRIPT}; style-src 'self' {$CSP_STYLE}; img-src 'self' data:; font-src 'self'; connect-src 'self' https://api.github.com https://raw.githubusercontent.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self'"
Content-Security-Policy "default-src 'self'; script-src 'self' {$CSP_SCRIPT}; style-src 'self' {$CSP_STYLE}; img-src 'self' data: https://avatars.githubusercontent.com; font-src 'self'; connect-src 'self' https://api.github.com https://raw.githubusercontent.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self'"
-Server
}
@assets path /assets/*
+9 -3
View File
@@ -14,8 +14,7 @@ Mojang or Microsoft. Minecraft is a trademark of Mojang Synergies AB.
The site loads no third-party code at runtime: no frameworks, CDNs, analytics, trackers or
cookies. The only requests to other hosts are the browser's calls to `api.github.com`
(releases and patch notes) and `raw.githubusercontent.com` (the README's roadmap and
`launcher/links.json`), both on Horizon's own repository.
(releases and patch notes) and `raw.githubusercontent.com` (`launcher/links.json`), both on Horizon's own repository.
## Fonts
@@ -72,5 +71,12 @@ files: players need their own legally obtained copy of Minecraft: Java Edition.
## Text
The parity table and the roadmap are generated from Horizon's README, and the patch notes
The parity table is generated from Horizon's README, and the patch notes
come from Horizon's GitHub releases: Horizon's own text, MIT.
## Contributors
The Contributors block lists the GitHub accounts that have committed to Horizon: login,
commit count and profile link, from GitHub's API. Their avatars are not stored in this repository;
the visitor's browser loads them from `avatars.githubusercontent.com`, each one the picture its
owner chose for their GitHub account. Bots are left out.
+10 -6
View File
@@ -6,7 +6,7 @@ One static page in the launcher's design language rather than its layout: the pa
violet accent of `crates/horizon-theme`, Instrument Serif for display type and Geist for the
rest, 1px dividers and short, eased motion. A full-viewport hero over Horizon's own sunset,
then a scroll through what it is, the screenshots, the parity grid, the launcher, the patch
notes, the roadmap and the community links. Plain HTML, CSS and JavaScript; no framework and
notes, the community links and the contributors. Plain HTML, CSS and JavaScript; no framework and
no runtime dependencies.
## Layout
@@ -17,9 +17,10 @@ serve.mjs a tiny static server for local checks
src/index.html the page, with {{placeholders}} build.mjs fills
src/404.html the not-found page
src/style.css the design tokens and every style
src/main.js download buttons, patch notes, roadmap, links, nav and menu, tabs, lightbox, motion
src/main.js download buttons, patch notes, links, contributors, nav and menu, tabs, lightbox, motion
src/markdown.js a small Markdown renderer (escapes everything), shared by build and page
src/releases.js the patch notes' markup, shared by build and page
src/contributors.js the contributors' filtering and markup, shared by build and page
public/ fonts, screenshots, the hero, icons, og.png, robots.txt, sitemap.xml: copied as is
scripts/assets.mjs rebuilds public/ from the repo (fonts to WOFF2, images to WebP)
scripts/shots.mjs Playwright screenshots at every width, and og.png
@@ -31,13 +32,16 @@ shots/ (gitignored) full-page screenshots at 360–1920 px, a 1250×
## What comes from where
- **Built in** (`build.mjs`): the parity table, its score, harness count and audit date,
and the roadmap, all from `README.md`; the Discord and Sponsor links from
`launcher/links.json`; the latest releases, when GitHub answers. Locally these come from
all from `README.md`; the Discord and Sponsor links from
`launcher/links.json`; the latest releases and the contributors (`/repos/ludovic111/horizon/contributors`,
bots left out, the owner first), when GitHub answers; without an answer the build still succeeds and
the Contributors block and its menu entries stay hidden until the page loads them. Locally these come from
the checkout; on Railway, which builds only this folder, from `main` on GitHub. The build
fails if the README has no parity table or roadmap, so a broken README never deploys.
fails if the README has no parity table, so a broken README never deploys.
- **Fetched by the page**: the releases (the download button picks the newest
`launcher-v*` release's asset for the visitor's OS, and the three latest game releases'
notes are rendered), the roadmap from the raw README on `main`, and `links.json`. Each
notes are rendered), the contributors (avatars come from `avatars.githubusercontent.com`),
and `links.json` from `main`. Each
falls back to what was built in, and the download button to the releases page.
## Run it locally
+23 -11
View File
@@ -1,9 +1,9 @@
// Builds the site into dist/: src/index.html with the README's parity table, roadmap and
// the community links baked in, plus public/ and fingerprinted CSS and JS. No dependencies.
// Builds the site into dist/: src/index.html with the README's parity table and
// the community links and contributors baked in, plus public/ and fingerprinted CSS and JS. No dependencies.
//
// Railway builds only website/, so the README and links.json come from the repo when they
// are next to it (a local checkout) and from main on GitHub otherwise. The latest releases
// are baked in when GitHub answers, so the page reads well before (or without) JavaScript.
// are next to it (a local checkout) and from main on GitHub otherwise. The latest releases and
// the contributors are baked in when GitHub answers, so the page reads well before (or without) JavaScript.
import { readFile, writeFile, mkdir, rm, cp } from "node:fs/promises";
import { existsSync } from "node:fs";
import { createHash } from "node:crypto";
@@ -11,6 +11,7 @@ import { join, dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { markdown, inline, section, escape } from "./src/markdown.js";
import { releasesHtml } from "./src/releases.js";
import { contributorsFrom, contributorsHtml } from "./src/contributors.js";
const site = dirname(fileURLToPath(import.meta.url));
const dist = join(site, "dist");
@@ -50,6 +51,18 @@ try {
console.warn(`releases: ${e.message}; the page will load them itself`);
}
let contributors = [];
try {
const res = await fetch(`https://api.github.com/repos/${REPO}/contributors?per_page=100`, {
headers: { Accept: "application/vnd.github+json", ...(process.env.GITHUB_TOKEN ? { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` } : {}) },
signal: AbortSignal.timeout(15000),
});
if (res.ok) contributors = contributorsFrom(await res.json());
else console.warn(`contributors: ${res.status} from GitHub; the page will load them itself`);
} catch (e) {
console.warn(`contributors: ${e.message}; the page will load them itself`);
}
// --- The parity table ------------------------------------------------------------------
const status = section(readme, "Project status") ?? "";
@@ -93,10 +106,7 @@ const parityCells = body
const matching = body.filter(([, score]) => Number(score) === 1).length;
const parityHeadline = matching === body.length ? "Every subsystem matches vanilla." : `${matching} of ${body.length} subsystems match vanilla.`;
// --- The roadmap and the latest notes -------------------------------------------------
const roadmap = section(readme, "Roadmap");
if (!roadmap) throw new Error("README: no Roadmap section");
// --- The latest notes -------------------------------------------------
const isGame = (tag) => /^v\d{4}\.\d{1,2}\.\d{1,2}/.test(tag);
const isLauncher = (tag) => tag.startsWith("launcher-v");
@@ -115,7 +125,7 @@ await cp(join(site, "LEGAL.md"), join(dist, "LEGAL.md"));
// The page's modules, fingerprinted; each import of a shared module is rewritten to its name.
const names = {};
const rewrite = (code) => code.replace(/"\.\/(\w+\.js)"/g, (all, file) => (names[file] ? `"./${names[file]}"` : all));
for (const file of ["markdown.js", "releases.js", "main.js"]) {
for (const file of ["markdown.js", "releases.js", "contributors.js", "main.js"]) {
const code = rewrite(await readFile(join(site, "src", file), "utf8"));
names[file] = `${file.replace(".js", "")}.${fingerprint(code)}.js`;
await writeFile(join(dist, "assets", names[file]), code);
@@ -129,6 +139,7 @@ const inlineCss = css.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s*\n\s*/g, "\n"
const baked = {
links,
contributors,
releases: releases.slice(0, 12).map((r) => ({
tag_name: r.tag_name,
name: r.name,
@@ -155,11 +166,12 @@ const values = {
PARITY_CELLS: parityCells,
PARITY_HEADLINE: parityHeadline,
SUBSYSTEMS: String(body.length),
ROADMAP: markdown(roadmap, { shift: 1 }),
NOTES: notesHtml,
LAUNCHER_META: `${launcher ? `Launcher ${escape(launcher.tag_name.replace("launcher-v", ""))} for` : "For"} Linux x86-64, macOS on Apple Silicon and Windows x64.`,
DISCORD: escape(links.discord || DEFAULT_LINKS.discord),
SPONSOR: escape(links.sponsor || DEFAULT_LINKS.sponsor),
CONTRIBUTORS: contributorsHtml(contributors),
CONTRIBUTORS_HIDDEN: contributors.length ? "" : " hidden",
BAKED: JSON.stringify(baked).replace(/</g, "\\u003c"),
YEAR: String(new Date().getUTCFullYear()),
};
@@ -182,5 +194,5 @@ await writeFile(join(dist, ".csp-style"), hashes(/<style>([\s\S]*?)<\/style>/g))
console.log(
`built dist/ from ${readmeFrom}: ${body.length} subsystems, ${percent}, ${harnesses} harnesses, ` +
`${game.length} game releases baked${launcher ? `, launcher ${launcher.tag_name}` : ""}`,
`${game.length} game releases baked${launcher ? `, launcher ${launcher.tag_name}` : ""}, ${contributors.length} contributors`,
);
+39
View File
@@ -0,0 +1,39 @@
// The contributors: GitHub's list for the repository, without bots, the owner first. Shared by
// build.mjs (baked into the page) and main.js (refreshed from GitHub).
import { escape } from "./markdown.js";
const OWNER = "ludovic111";
const AVATARS = "https://avatars.githubusercontent.com/";
// Reduces GitHub's contributor objects to what the page shows; bots (type Bot, or a login
// ending in [bot]) and anything without a login or a profile address are dropped.
export function contributorsFrom(list) {
if (!Array.isArray(list)) return [];
return list
.filter((c) => c && typeof c.login === "string" && c.login && c.type !== "Bot" && !/\[bot\]$/i.test(c.login))
.map((c) => ({
login: c.login,
html_url: typeof c.html_url === "string" ? c.html_url : `https://github.com/${c.login}`,
avatar_url: typeof c.avatar_url === "string" ? c.avatar_url : "",
contributions: Number(c.contributions) || 0,
}))
.sort((a, b) => (b.login === OWNER) - (a.login === OWNER) || b.contributions - a.contributions);
}
// GitHub serves avatars at any size: 96 px is twice what the page draws, for sharp screens.
function avatar(url) {
if (!url.startsWith(AVATARS)) return "";
const u = new URL(url);
u.searchParams.set("s", "96");
return u.href;
}
export function contributorsHtml(list) {
return list
.map((c) => {
const src = avatar(c.avatar_url);
const count = `${c.contributions.toLocaleString("en-US")} ${c.contributions === 1 ? "commit" : "commits"}`;
return `<li><a class="contributor" href="${escape(c.html_url)}">${src ? `<img class="contributor-avatar" loading="lazy" decoding="async" src="${escape(src)}" width="48" height="48" alt="">` : `<span class="contributor-avatar" aria-hidden="true"></span>`}<span class="contributor-name">${escape(c.login)}</span><span class="contributor-count">${count}</span></a></li>`;
})
.join("");
}
+9 -15
View File
@@ -44,8 +44,8 @@
<a href="#parity">Parity</a>
<a href="#launcher">Launcher</a>
<a href="#patch-notes">Notes</a>
<a href="#next">Roadmap</a>
<a href="#community">Community</a>
<a href="#contributors" data-contributors{{CONTRIBUTORS_HIDDEN}}>Contributors</a>
</nav>
<div class="nav-end">
<a class="nav-github" href="https://github.com/ludovic111/horizon">GitHub</a>
@@ -62,8 +62,8 @@
<a href="#parity">Parity</a>
<a href="#launcher">Launcher</a>
<a href="#patch-notes">Patch notes</a>
<a href="#next">Roadmap</a>
<a href="#community">Community</a>
<a href="#contributors" data-contributors{{CONTRIBUTORS_HIDDEN}}>Contributors</a>
</nav>
<div class="menu-foot">
<a class="button secondary large" href="https://github.com/ludovic111/horizon">GitHub</a>
@@ -208,26 +208,20 @@
</div>
</section>
<section id="next" class="section next" aria-labelledby="next-title">
<div class="container next-grid">
<div class="next-head">
<p class="kicker reveal"><span>06</span>What's next</p>
<h2 id="next-title" class="title reveal">With parity as the base</h2>
<p class="lede reveal">The roadmap from the README, as it stands on main.</p>
</div>
<div class="prose roadmap reveal" id="roadmap">{{ROADMAP}}</div>
</div>
</section>
<section id="community" class="section community" aria-labelledby="community-title">
<div class="container">
<p class="kicker reveal"><span>07</span>Community</p>
<p class="kicker reveal"><span>06</span>Community</p>
<h2 id="community-title" class="title reveal">Built in the open</h2>
<div class="cards">
<a class="card reveal" data-card data-link="discord" href="{{DISCORD}}"><span class="card-title">Discord</span><span class="card-text">Questions, bug reports and screenshots.</span><span class="card-arrow" aria-hidden="true">→</span></a>
<a class="card reveal" data-card data-link="sponsor" href="{{SPONSOR}}"><span class="card-title">Sponsor</span><span class="card-text">Sponsors on GitHub fund the next release.</span><span class="card-arrow" aria-hidden="true">→</span></a>
<a class="card reveal" data-card href="https://github.com/ludovic111/horizon"><span class="card-title">Source</span><span class="card-text">Issues and pull requests are welcome.</span><span class="card-arrow" aria-hidden="true">→</span></a>
</div>
<div class="contributors" id="contributors" aria-labelledby="contributors-title" data-contributors{{CONTRIBUTORS_HIDDEN}}>
<h3 class="contributors-title reveal" id="contributors-title">Contributors</h3>
<p class="contributors-text reveal">Everyone who has committed to Horizon on GitHub, with how many commits.</p>
<ul class="contributors-list reveal" id="contributors-list">{{CONTRIBUTORS}}</ul>
</div>
</div>
</section>
</main>
@@ -238,7 +232,7 @@
<div class="footer-cols">
<p>Horizon is made by <a href="https://lu4ovic.com">Ludovic Marie</a>, who is responsible for it and for this site; reach him through <a href="https://lu4ovic.com/#contact">lu4ovic.com</a>. Horizon contains no Minecraft code, assets or data, and this site offers no game files: you need your own legally obtained copy of Minecraft: Java Edition. Minecraft is a trademark of Mojang Synergies AB.</p>
<p>Horizon's original work is under the <a href="https://github.com/ludovic111/horizon/blob/main/LICENSE">MIT licence</a>. The fonts are Geist and Instrument Serif, under the SIL Open Font License (<a href="/fonts/OFL-Geist.txt">Geist</a>, <a href="/fonts/OFL-InstrumentSerif.txt">Instrument Serif</a>). Every asset on this site is listed in <a href="/LEGAL.md">LEGAL.md</a>.</p>
<p>Privacy: this site sets no cookies, has no analytics or trackers and loads nothing from third parties except GitHub. To show the latest releases, patch notes, roadmap and links, your browser asks <code>api.github.com</code> and <code>raw.githubusercontent.com</code> for them; <a href="https://docs.github.com/site-policy/privacy-policies/github-general-privacy-statement">GitHub's privacy statement</a> covers those requests.</p>
<p>Privacy: this site sets no cookies, has no analytics or trackers and loads nothing from third parties except GitHub. To show the latest releases, patch notes, links and contributors, your browser asks <code>api.github.com</code> and <code>raw.githubusercontent.com</code> for them, and <code>avatars.githubusercontent.com</code> for the contributors' pictures; <a href="https://docs.github.com/site-policy/privacy-policies/github-general-privacy-statement">GitHub's privacy statement</a> covers those requests.</p>
</div>
<div class="footer-bar">
<span class="footer-mark">Horizon</span>
+17 -14
View File
@@ -1,8 +1,9 @@
// The page's behaviour: the download buttons for this platform, the latest releases, the
// roadmap and links from main, the navigation, the menus' tabs, the lightbox and the motion.
// links and contributors, the navigation, the menus' tabs, the lightbox and the motion.
// Everything degrades to the baked-in content when GitHub can't be reached.
import { markdown, escape, section } from "./markdown.js";
import { escape } from "./markdown.js";
import { releasesHtml } from "./releases.js";
import { contributorsFrom, contributorsHtml } from "./contributors.js";
const REPO = "ludovic111/horizon";
const RELEASES_PAGE = `https://github.com/${REPO}/releases?q=launcher-v&expanded=true`;
@@ -46,6 +47,16 @@ const releases = cached("horizon:releases", () =>
),
).catch(() => baked.releases);
async function setUpContributors() {
let list = baked.contributors || [];
try {
list = contributorsFrom(await cached("horizon:contributors", () => get(`https://api.github.com/repos/${REPO}/contributors?per_page=100`)));
} catch {}
if (list.length) document.getElementById("contributors-list").innerHTML = contributorsHtml(list);
// With nobody to show, the block and its menu entries go, as an empty link's card does.
document.querySelectorAll("[data-contributors]").forEach((el) => (el.hidden = !list.length));
}
// --- Download ------------------------------------------------------------------------
function platform() {
@@ -74,7 +85,7 @@ async function setUpDownload() {
document.querySelectorAll("[data-download-meta]").forEach((p) => (p.innerHTML = meta));
}
// --- Patch notes, the roadmap and the links from main ---------------------------------
// --- Patch notes and the links from main ---------------------------------
const isGame = (tag) => /^v\d{4}\.\d{1,2}\.\d{1,2}/.test(tag);
@@ -83,14 +94,6 @@ async function setUpNotes() {
if (list.length) document.getElementById("releases").innerHTML = releasesHtml(list.slice(0, 3));
}
async function setUpRoadmap() {
try {
const readme = await cached("horizon:readme", () => get(`https://raw.githubusercontent.com/${REPO}/main/README.md`, "text"));
const roadmap = section(readme, "Roadmap");
if (roadmap) document.getElementById("roadmap").innerHTML = markdown(roadmap, { shift: 1 });
} catch {}
}
async function setUpLinks() {
let links = baked.links;
try {
@@ -119,7 +122,7 @@ function setUpNav() {
const line = innerHeight * 0.4;
let index = -1;
sections.forEach((s, i) => {
if (s.getBoundingClientRect().top <= line) index = i;
if (s.getClientRects().length && s.getBoundingClientRect().top <= line) index = i;
});
if (index !== current) {
current = index;
@@ -237,7 +240,7 @@ function setUpReveal() {
// Siblings that enter together come in one after another.
const stagger = (els, step) => els.forEach((el, i) => el.style.setProperty("--d", `${i * step}ms`));
document.querySelectorAll(".facts, .features, .cards, .mosaic").forEach((group) => stagger([...group.children], 90));
document.querySelectorAll(".section-head, .parity-count, .parity-copy, .next-head, .launcher-copy").forEach((group) => stagger([...group.querySelectorAll(":scope > .reveal")], 70));
document.querySelectorAll(".section-head, .parity-count, .parity-copy, .launcher-copy").forEach((group) => stagger([...group.querySelectorAll(":scope > .reveal")], 70));
stagger([...document.querySelectorAll(".system")], 45);
const count = document.querySelector("[data-digits]");
@@ -314,5 +317,5 @@ setUpTabs();
setUpLightbox();
setUpDownload();
setUpNotes();
setUpRoadmap();
setUpLinks();
setUpContributors();
+18 -15
View File
@@ -58,6 +58,7 @@ p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; transition: color var(--quick) var(--ease); }
a:hover { color: var(--text); }
[hidden] { display: none !important; }
/* Links inside running text are underlined, so they don't rely on colour alone. */
p a:not(.button):not(.link-arrow) { text-decoration: underline; text-decoration-color: rgba(164, 138, 230, 0.45); text-decoration-thickness: 1px; text-underline-offset: 3px; }
p a:not(.button):not(.link-arrow):hover { text-decoration-color: currentColor; }
@@ -527,21 +528,6 @@ code {
.release summary::after { grid-column: 2; margin-left: 0; }
}
/* What's next: the README's roadmap, its bold leads set as headings. */
.next-grid { display: grid; gap: 48px; }
.next-head .title { margin-bottom: 24px; }
.roadmap { font-size: 16px; }
.roadmap > p { padding-top: 22px; border-top: 1px solid var(--border); margin-top: 0; margin-bottom: 36px; max-width: 56ch; }
.roadmap > p > strong:first-child { display: block; margin-bottom: 8px; font-size: 13px; letter-spacing: 0.02em; }
.roadmap > ul { list-style: none; padding: 0; margin: 0; }
.roadmap > ul > li { padding: 24px 0; border-top: 1px solid var(--border); margin: 0; max-width: 56ch; }
.roadmap > ul > li:last-child { border-bottom: 1px solid var(--border); }
.roadmap > ul > li > strong:first-child { display: block; margin-bottom: 8px; font: 400 30px/1.1 var(--display); letter-spacing: -0.01em; }
@media (min-width: 1000px) {
.next-grid { grid-template-columns: 5fr 7fr; column-gap: clamp(48px, 6vw, 96px); }
.next-head { position: sticky; top: calc(var(--nav) + 32px); align-self: start; }
}
/* Community. */
.community .title { margin-bottom: clamp(44px, 6vw, 72px); }
.cards {
@@ -561,6 +547,23 @@ code {
.card:hover .card-arrow { transform: translateX(6px); color: var(--accent-text); }
@media (min-width: 860px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.contributors { margin-top: clamp(64px, 8vw, 112px); }
.contributors-title { font: 400 clamp(28px, 3vw, 40px)/1.1 var(--display); letter-spacing: -0.015em; color: var(--text); }
.contributors-text { margin-top: 10px; font-size: 15px; color: var(--muted); max-width: 46ch; }
.contributors-list {
display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); column-gap: 32px;
list-style: none; margin-top: clamp(24px, 3vw, 36px); padding: 0;
}
.contributors-list li { border-top: 1px solid var(--border); }
.contributor {
display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center;
min-height: 44px; padding: 20px 0; color: var(--text);
}
.contributor-avatar { grid-row: 1 / 3; width: 48px; height: 48px; border-radius: 50%; background: var(--raised); border: 1px solid var(--border); object-fit: cover; }
.contributor-name { align-self: end; font-size: 16px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; transition: color var(--quick) var(--ease); }
.contributor-count { align-self: start; font: 12px/1.7 var(--mono); color: var(--faint); }
.contributor:hover .contributor-name { color: var(--accent-text); }
/* --- Footer ------------------------------------------------------------------------- */
.footer { margin-top: clamp(112px, 14vw, 200px); border-top: 1px solid var(--border); padding-top: clamp(64px, 8vw, 104px); overflow: hidden; }