Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion site/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
import { ArchitectureDiagram } from "./components/ArchitectureDiagram";
import { Console } from "./components/Console";
import { DotField } from "./components/DotField";
import { HookFeed, HoldLog } from "./components/DemoAnims";
import { DemoNumbers, HookFeed, HoldLog } from "./components/DemoAnims";
import { Frame } from "./components/Frame";
import { Logo } from "./components/Logo";
import { MorseField } from "./components/MorseField";
Expand Down Expand Up @@ -468,6 +468,7 @@ export default function App() {
</div>
{i === 0 && <HookFeed />}
{i === 4 && <HoldLog />}
{i === 5 && <DemoNumbers />}
<div className="dbody"><h3>{title}</h3><p>{text}</p></div>
</li>
);
Expand Down
28 changes: 28 additions & 0 deletions site/src/components/DemoAnims.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { useEffect, useRef, useState } from "react";
import { ArrowRight, Check, Hourglass, LoaderCircle } from "lucide-react";
import { prefersReducedMotion } from "../motion.js";
import results from "../../../docs/results/results.json";
import { formatResultNumber, headline } from "../results.js";
import { PROJECT_NAME } from "../config.js";

// Runs `tick` every `ms` while the element is on screen; never under reduced motion.
function useTicker(ref, ms, tick) {
Expand Down Expand Up @@ -65,3 +68,28 @@ export function HoldLog() {
</div>
);
}

// Demo card 06: the committed evaluation numbers, no defense against Jev fusion + conformal threshold.
// Same source and rows as the Results section headline, so the two never disagree.
const NUMBERS = (() => {
const top = headline(results);
if (!top) return [];
const row = (label, key) => [label, top.base[key], top.best[key]];
return [row("Missed attacks", "missed_attacks_pct"), row("False blocks", "false_blocks_pct"), row("False holds", "false_holds_pct")];
})();

export function DemoNumbers() {
if (!NUMBERS.length) return null;
return (
<div className="dnums">
<div className="dn-row dn-head" aria-hidden="true"><span /><span>No defense</span><span>{PROJECT_NAME}</span></div>
{NUMBERS.map(([label, base, best]) => (
<div className="dn-row" key={label}>
<span>{label}</span>
<span className="dn-base">{formatResultNumber(base)}%</span>
<b>{formatResultNumber(best)}%</b>
</div>
))}
</div>
);
}
25 changes: 18 additions & 7 deletions site/src/components/Eclipse.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ function Node({ position, Icon, label, filled }) {

function Scene({ progress, pointer, reduce }) {
// On wide canvases the eclipse sits left of centre so the overlay text has room on the right.
const { viewport } = useThree();
const { viewport, camera } = useThree();
// The Agent node sits nearer the camera (z 1.6), where the visible width is smaller than at z 0;
// clamp it against that width so its ring and label never cross the canvas edge.
const agentHalfW = viewport.getCurrentViewport(camera, [0, 0, 1.6]).width / 2;
const offsetX = viewport.aspect > 1.3 ? -viewport.width * 0.22 : 0;
const group = useRef();
const sun = useRef();
Expand All @@ -157,8 +160,12 @@ function Scene({ progress, pointer, reduce }) {
}
const g = group.current;
if (g) {
g.rotation.y += (pointer.current.x * 0.25 - g.rotation.y) * 0.05;
g.rotation.x += (0.1 + pointer.current.y * 0.15 - g.rotation.x) * 0.05;
// Follows the cursor: the whole eclipse turns toward it and drifts a little after it.
const px = reduce ? 0 : pointer.current.x, py = reduce ? 0 : pointer.current.y;
g.rotation.y += (px * 0.7 - g.rotation.y) * 0.06;
g.rotation.x += (0.1 + py * 0.45 - g.rotation.x) * 0.06;
g.position.x += (offsetX + px * 0.35 - g.position.x) * 0.06;
g.position.y += (-py * 0.25 - g.position.y) * 0.06;
}
});

Expand All @@ -178,7 +185,7 @@ function Scene({ progress, pointer, reduce }) {
<Node position={[0, -MOON_R - 0.25, 0]} Icon={Landmark} label="Guardian" filled />
</group>
<Particles occ={occ} />
<Node position={[Math.max(-2.0, -viewport.width / 2 + 1.15 - offsetX), 1.15, 1.6]} Icon={Bot} label="Agent" />
<Node position={[Math.max(-2.0, -agentHalfW + 1.3 - offsetX), 1.15, 1.6]} Icon={Bot} label="Agent" />
<Node position={[0, SUN_R + 0.45, 0]} Icon={Cpu} label="Checker" />
</group>
);
Expand All @@ -194,14 +201,18 @@ export default function Eclipse({ progress }) {
const el = wrap.current;
const io = new IntersectionObserver(([e]) => setOnScreen(e.isIntersecting));
io.observe(el);
// Listen on the whole stage, so the cursor over the step cards still turns the eclipse.
// Mouse only: on touch, a drag is a scroll.
const stage = el.parentElement || el;
const move = (e) => {
if (e.pointerType !== "mouse") return;
const r = el.getBoundingClientRect();
pointer.current = { x: (e.clientX - r.left) / r.width - 0.5, y: (e.clientY - r.top) / r.height - 0.5 };
};
const leave = () => { pointer.current = { x: 0, y: 0 }; };
el.addEventListener("pointermove", move);
el.addEventListener("pointerleave", leave);
return () => { io.disconnect(); el.removeEventListener("pointermove", move); el.removeEventListener("pointerleave", leave); };
stage.addEventListener("pointermove", move);
stage.addEventListener("pointerleave", leave);
return () => { io.disconnect(); stage.removeEventListener("pointermove", move); stage.removeEventListener("pointerleave", leave); };
}, []);

return (
Expand Down
7 changes: 4 additions & 3 deletions site/src/motion.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export async function startMotion(refs) {
const adSvg = document.querySelector(".ad-svg");
if (adSvg) {
const tl = gsap.timeline({
scrollTrigger: { trigger: adSvg, start: "top 80%", end: "bottom 55%", scrub: 0.6 },
scrollTrigger: { trigger: adSvg, start: "top 85%", end: "bottom 95%", scrub: 0.6 },
defaults: { ease: "none" },
});
for (let k = 0; k <= 8; k++) {
Expand All @@ -112,10 +112,11 @@ export async function startMotion(refs) {
const boxes = [...items].filter((el) => !el.classList.contains("ad-arrow"));
if (paths.length) {
// Fade the whole arrow (line, head and label) in as its line draws, so no head shows early.
tl.fromTo(adSvg.querySelectorAll(`.ad-arrow[data-at="${k}"]`), { opacity: 0.12 }, { opacity: 1, duration: 0.3 }, k);
tl.fromTo(adSvg.querySelectorAll(`.ad-arrow[data-at="${k}"]`), { opacity: 0.3 }, { opacity: 1, duration: 0.3 }, k);
tl.fromTo(paths, { strokeDashoffset: 1 }, { strokeDashoffset: 0, duration: 0.6 }, k);
}
if (boxes.length) tl.fromTo(boxes, { opacity: 0.18, y: 10 }, { opacity: 1, y: 0, duration: 0.6 }, k + 0.3);
// Opacity only: a transform on SVG groups can misplace them, and a low floor read as missing boxes.
if (boxes.length) tl.fromTo(boxes, { opacity: 0.4 }, { opacity: 1, duration: 0.6 }, k + 0.3);
const flows = adSvg.querySelectorAll(`[data-flow-at="${k}"]`);
if (flows.length) tl.fromTo(flows, { opacity: 0 }, { opacity: 1, duration: 0.3 }, k + 0.4);
}
Expand Down
9 changes: 9 additions & 0 deletions site/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,15 @@ footer { margin-top: clamp(40px, 5vw, 64px); border-top: 1px dashed var(--dash);
@keyframes hl-in { from { opacity: 0; transform: translateX(-4px); } }
@keyframes hl-spin { to { transform: rotate(360deg); } }
@keyframes hl-blink { 50% { opacity: 0; } }
/* Demo card 06: no defense vs Eclipse, from results.json */
.dnums { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: #121019; }
.dn-row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5em 7.5em; align-items: baseline; gap: 12px; padding: 12px 16px; font-size: 14px; color: var(--muted); }
.dn-row + .dn-row { border-top: 1px solid var(--line); }
.dn-row > :not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.dn-head { padding-block: 10px 8px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.dn-base { font: 15px var(--mono); color: var(--dim); }
.dn-row b { font: 400 24px/1.1 var(--mono); color: var(--accent); }
@media (max-width: 560px) { .dn-row { grid-template-columns: minmax(0, 1fr) 5.5em 5.5em; padding-inline: 12px; } .dn-row b { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .hf-row.fresh, .hl-line, .hl-spin, .hl-caret { animation: none; } }

/* Demo cards: soft lilac light rising from the bottom-right, with a dotted texture that only shows
Expand Down
Loading