Skip to content

Landing page (site/): every light traced at 60 fps, three.js everywhere else - #14

Merged
doodlewind merged 8 commits into
mainfrom
landing-site
Nov 11, 2026
Merged

doodlewind merged 8 commits into
mainfrom
landing-site

Conversation

@doodlewind

@doodlewind doodlewind commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

The ThreeRT landing page, finalized: a static site in site/ (no build step), plus one row in the README's layout table.

Tier: T (static site and its Bun tools). renderer/, packages/, tools/, tests/ and games/ are untouched; site/ is outside npm run typecheck and npm test.

What is on the page

  1. Hero: Bistro night, three.js | ThreeRT under one draggable divider. "Every light, traced. At 60 fps."; subtitle "The first three.js-style engine to fully path-trace industry-standard scenes in real time."
  2. ThreeRT = Three + RT: Ray Tracing, Real Time, Runtime.
  3. Hello world looks right: an auto-advancing reel (material balls, sunlit room, glTF model), the ThreeRT source next to its output, the divider sweeping from three.js as written to ThreeRT with defaults.
  4. Against three.js at full power: Bistro night and Zero-Day; the left side picks three.js WebGL, WebGPU + SSGI, or the path-traced reference.
  5. A camera move: each scene's FBX camera path, both engines in lockstep (60 poses each).
  6. What a ray finds: four close-ups.
  7. Traced where it can be, three.js everywhere else: native client (desktop RTX 20 / RX 6000+, Mac M3+, Steam Deck, iPhone 15 Pro+) vs the same scene as three.js in any browser or WebView, as live three.js device models at real proportions (still fallback without WebGL). "AAA games, one link away."
  8. Just light.

Files

  • site/index.html, site/css/threert.css (visual system), site/js/threert.js (wipe comparison, synced player, highlighter), site/js/devices.js (3D devices), site/brand/ (the "Orbit" mark and variants).
  • site/media/ (8.5 MB, WebP): generated by bun site/tools/media.ts from out/milestone1 and out/compare (milestone 1, 2026-11-08; hello world, 2026-11-07). Renders are re-encoded only, never retouched. Device stills: bun site/tools/device-stills.ts (headless Chrome, software WebGL, no GPU).
  • three.js is not vendored: site/serve.ts maps the import map to node_modules/three (the existing devDependency, r187); bun site/tools/build.ts copies it into out/site/ for static hosting.

Merge gate

  • CI (typecheck, tests, renderer builds): cannot move for this diff; see the checks on this PR.
  • The page itself, served from this branch's tree (bun site/serve.ts) in headless Chrome (software WebGL): no script errors, no HTTP >= 400, no broken images; the reel advances, the scene tabs and left picker swap images, the camera-move players load, both 3D device rows render; the WebGL-off fallback shows the stills.
  • bun site/tools/build.ts produces a 274-file static copy that serves the same page.

🤖 Generated with Claude Code


Note

Low Risk
Isolated static marketing assets and Bun helpers; no changes to renderer, packages, games, or CI test paths beyond README documentation.

Overview
Adds a new site/ package: a static marketing landing page and documents it in the root README layout table.

The page is HTML/CSS/JS (no bundler): hero and section wipe comparisons, a hello-world reel (code + three.js vs ThreeRT), scene tabs with a left-side renderer picker, synced camera-move players, close-up comparisons, and an “Everywhere” section with live three.js device shelves plus still fallbacks. Shared behavior lives in js/threert.js; device models in js/devices.js; branding in site/brand/.

Bun tooling serves and ships the site: serve.ts (local dev, three.js via import map from node_modules), tools/build.ts (static copy to out/site/), tools/media.ts (WebP from benchmark out/), tools/device-stills.ts (headless Chrome fallbacks), and tools/vendor.ts (three.js paths for serve/build). Hello-world media/code/*.threert.ts snippets are copied in for the reel.

Reviewed by Cursor Bugbot for commit 68b497d. Bugbot is set up for automated code reviews on this repo. Configure here.

…re else

The finalized landing page, a static site in site/ with no build step.

- Hero: Bistro night, three.js | ThreeRT under one divider; "Every light, traced. At 60 fps."
- ThreeRT = Three + RT (Ray Tracing, Real Time, Runtime); an auto-advancing hello-world reel (source + output);
  Bistro night and Zero-Day against three.js WebGL, WebGPU + SSGI and the path-traced reference; the camera move in
  lockstep; four close-ups; native client on ray-tracing hardware vs three.js in any browser or WebView, drawn as live
  three.js device models at real proportions; "Just light."
- Visual system in css/threert.css and the "Orbit" mark in brand/.
- media/ is generated from the benchmark outputs (site/tools/media.ts, WebP via sharp, never retouched; 8.5 MB) and
  the WebGL-off device stills from headless Chrome with software WebGL (site/tools/device-stills.ts).
- three.js comes from the repo's devDependency: site/serve.ts maps it, site/tools/build.ts copies it into out/site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread site/js/devices.js Outdated
glass: new THREE.MeshPhysicalMaterial({ color: 0x030304, metalness: 0, roughness: 0.12, clearcoat: 0.6, clearcoatRoughness: 0.1 }),
sheen: new THREE.MeshPhysicalMaterial({ color: 0x000000, metalness: 0, roughness: 0.05, transparent: true, opacity: 0.1, depthWrite: false }),
black: new THREE.MeshStandardMaterial({ color: 0x020203, metalness: 0, roughness: 0.3 }),
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shared materials break dual WebGL shelves

Medium Severity

M is a module-level material atlas, and each deviceShelf call assigns that shelf’s PMREMGenerator env map onto every entry. The page creates two WebGL renderers, so the second call overwrites envMap with a render-target texture from the other context. The native shelf then samples a texture it does not own, which drops IBL on metals and can emit WebGL bindTexture errors.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit beca528. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 6266303.

Comment thread site/js/devices.js
fit(); placeCaps(); renderer.render(scene, camera);
addEventListener("resize", () => { fit(); placeCaps(); });
const reduce = matchMedia("(prefers-reduced-motion: reduce)").matches;
new IntersectionObserver(([e]) => renderer.setAnimationLoop(e.isIntersecting && !reduce ? frame : null), { rootMargin: "100px" }).observe(el);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resize blanks static device shelves

Medium Severity

The resize handler calls fit(), and fit() uses renderer.setSize, which clears the canvas. A follow-up render only happens if the animation loop is running. With prefers-reduced-motion, that loop is never started, so a window resize or phone rotation leaves the Everywhere devices as an empty box. Captions stay; the 3D row does not.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit beca528. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 6266303.

Comment thread site/index.html Outdated
sts.forEach((b) => b.addEventListener("click", () => show(+b.dataset.i)));
pp.addEventListener("click", () => { playing = !playing; icon(); });
$("#reel").addEventListener("pointerenter", () => (hover = true));
$("#reel").addEventListener("pointerleave", () => (hover = false));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reel sweep fights an in-progress drag

Medium Severity

The hello-world reel pauses its divider sweep only while the pointer is inside #reel. compare captures the pointer, so a wipe drag can continue after pointerleave. That sets hover back to false, and tick starts calling setX(sweep(p)) again, overwriting the drag on every frame. The divider snaps or jitters instead of following the pointer.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit beca528. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 6266303.

…el yields to a drag)

- devices.js: each device shelf builds its own materials. They carry the shelf's PMREM environment map, and the two
  shelves are separate WebGL contexts, so a shared set had the second shelf's env map overwrite the first's.
- devices.js: a resize redraws at once (setSize clears the canvas; with reduced motion no animation loop would).
  PCFShadowMap instead of the removed PCFSoftShadowMap (r187 warned and fell back to it: same pixels).
- index.html: the hello-world reel pauses its divider sweep while the divider is dragged, also when the drag leaves
  the reel (pointer capture), and keeps the reader's position for the rest of that slide.

Checked in headless Chrome (software WebGL): after a 1440 -> 1200 px resize with prefers-reduced-motion both shelves
draw; a drag that leaves the reel holds the divider at the pointer (70 %) during and after release; no console
errors or warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread site/index.html Outdated
$("#reel").addEventListener("pointerleave", () => (hover = false));
// The divider captures the pointer while dragging, so a drag can leave the reel: pause until it ends.
cmpEl.addEventListener("pointerdown", () => { dragging = touched = true; });
for (const ev of ["pointerup", "pointercancel"]) addEventListener(ev, () => (dragging = false));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Touch scroll stops the divider sweep

Medium Severity

A pointerdown on the hello-world comparison sets touched, while pointercancel only clears dragging. Vertical scrolling over that control is allowed (touch-action: pan-y) and cancels the pointer after the flag is set, so the auto-sweep never resumes for the rest of the slide and the divider stays at the finger’s initial x.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6266303. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5367474: only a tap or a horizontal drag (> 4 px) sets the slide's held position; pointercancel (a vertical scroll) lets the sweep continue.

…'s sweep (Bugbot)

Only a tap or a horizontal drag (> 4 px) on the hello-world divider keeps the reader's position for the slide; a
pointerdown that ends in pointercancel (touch-action: pan-y: the browser took it as a vertical scroll) lets the sweep
go on. Checked: a mouse drag that leaves the reel still holds at 70 %; a touch pointerdown + pointercancel keeps
sweeping (92 % -> 11 % over 2.5 s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread site/index.html Outdated
cmpEl.addEventListener("pointerdown", (e) => { dragging = true; downX = e.clientX; });
cmpEl.addEventListener("pointermove", (e) => { if (dragging && Math.abs(e.clientX - downX) > 4) touched = true; });
addEventListener("pointerup", () => { if (dragging) touched = true; dragging = false; });
addEventListener("pointercancel", () => (dragging = false));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scroll jitter freezes reel sweep

Medium Severity

The reel commits touched on pointermove after 4px of horizontal travel, and pointercancel never clears it. A vertical scroll still sends those moves before the browser cancels, and finger jitter routinely exceeds 4px, so a pan that starts on the comparison still freezes the sweep — the case this change was meant to leave running.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5367474. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the next commit: the held position is set on pointerup only; pointermove no longer sets it, so a scroll that jitters sideways and ends in pointercancel keeps the sweep running.

yifeng-meshy and others added 2 commits November 11, 2026 05:28
…se (Bugbot)

The held position for a slide is committed on pointerup, never on pointermove: a vertical scroll that starts on the
comparison can move a few px sideways before the browser cancels the pointer, and must not freeze the sweep. While
the press lasts the sweep is paused either way. Checked: a mouse drag that leaves the reel holds at 70 %; a touch with
3–12 px of sideways jitter that ends in pointercancel keeps sweeping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main's README edits (#13) and this branch's site/ row in its layout table, both kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread site/js/threert.js
const at = (e) => { x = clamp(((e.clientX - el.getBoundingClientRect().left) / el.clientWidth) * 100, 0, 100); draw(); };
el.addEventListener("pointerdown", (e) => { if (e.target.closest(".ctl")) return; drag = true; el.setPointerCapture(e.pointerId); at(e); });
el.addEventListener("pointermove", (e) => drag && at(e));
el.addEventListener("pointerup", () => (drag = false));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sequence wipe ignores pointer cancel

Medium Severity

The camera-move player sets drag on pointerdown but only clears it on pointerup. A vertical scroll (touch-action: pan-y) ends in pointercancel, so drag stays true and later pointermove events keep moving the wipe without a press. The still comparison already clears drag on pointercancel.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c253e57. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7888aba.

Comment thread site/js/threert.js
draw();
}
requestAnimationFrame(loop);
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Camera move ignores reduced motion

Medium Severity

sequence() always starts with playing true, so both camera-move players autoplay their ping-pong loop even when prefers-reduced-motion is set. The reel, device shelves, and .rv fades all honor that preference. The closing orbit SVG also runs an infinite SMIL animate with no reduced-motion alternative.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c253e57. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7888aba.

Comment thread site/js/threert.js
requestAnimationFrame(loop);
};
const io = new IntersectionObserver(([en]) => { if (en.isIntersecting && !frames) { load(); requestAnimationFrame(loop); } }, { rootMargin: "400px" });
io.observe(el);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Players redraw canvases off-screen forever

Low Severity

Each camera-move player starts a requestAnimationFrame loop on first intersection and never stops it. draw() also assigns canvas.width and canvas.height every tick, which resets the backing store even when the size has not changed. Both players keep doing this after they leave the viewport, unlike the device shelves which pause via setAnimationLoop(null).

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c253e57. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7888aba.

Comment thread site/index.html Outdated
// into a scroll ends in pointercancel instead, and the sweep goes on.
cmpEl.addEventListener("pointerdown", () => { dragging = true; });
addEventListener("pointerup", () => { if (dragging) touched = true; dragging = false; });
addEventListener("pointercancel", () => (dragging = false));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweep overrides keyboard divider input

Medium Severity

The hello-world comparison is a keyboard-operable slider, but the reel only sets touched on pointerup. Arrow keys move the divider, then the next animation frame calls setX(sweep(p)) and snaps it back because touched is still false. Keyboard users cannot hold a divider position while a slide is playing.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c253e57. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7888aba.

yifeng-meshy and others added 2 commits November 11, 2026 05:44
…een, end drags on cancel; keyboard holds the reel (Bugbot)

- js/threert.js sequence(): no autoplay with prefers-reduced-motion (the play button still works); the animation
  loop runs only while the player is near the viewport; the canvas backing store is resized only when the box
  changes; pointercancel (a touch taken as a scroll) ends the wipe drag.
- js/threert.js compare(): the hero's intro sweep is skipped with reduced motion.
- index.html: the closing light-path pulse is hidden with reduced motion; arrow keys on the hello-world divider keep
  the reader's position against the sweep, as a tap or drag does.

Checked in headless Chrome: with reduced motion the players stay at 0.0 s, the pulse is display: none and the hero
stays at 44 %; without it the players advance; pointerdown + pointercancel then a move leaves the player's wipe at
50 %; 3 × ArrowLeft on the reel's divider holds at 80 % against the sweep; no broken images, no HTTP errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main's README edits (#15) and this branch's site/ row in its layout table, both kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

There are 12 total unresolved issues (including 9 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a3f723b. Configure here.

Comment thread site/index.html Outdated
seg($("#leftPick"), (v) => { st.left = v; render(); }).pick("tuned");
$("#leftPick").addEventListener("pointerdown", (e) => e.stopPropagation());

reveal();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reveal gated on fallible setup

Medium Severity

Almost every section uses .rv at opacity 0 until reveal() runs, but that call sits after a hard three import, both deviceShelf setups, and an await fetch of the hello-world sources. A missing vendor copy, a throw after the WebGL constructor (the only catch), or a failed code fetch leaves those sections blank instead of visible.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a3f723b. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 68b497d.

Comment thread site/index.html Outdated
helloCmp.set({ a: `media/hello/${id}-three.webp`, b: `media/hello/${id}-rt.webp`, la: "three.js", lb: "ThreeRT", x: reduce ? 45 : 92 });
codeEl.innerHTML = code[id]; codeEl.scrollTop = 0;
cmpEl.classList.remove("fade"); codeEl.classList.remove("fade");
}, 280);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reel slide timeout race

Low Severity

show always schedules a 280ms timeout and never cancels the previous one. Clicking another story tab (or auto-advance overlapping a click) lets an older callback swap in the wrong code and images, un-fade, then get replaced again.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a3f723b. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 68b497d.

Comment thread site/js/threert.js
ready = true;
$(".loading", el).remove();
draw();
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Camera-move frames explode memory

Medium Severity

Each camera-move player creates 120 Image objects and decode()s them as soon as it nears the viewport. Two players keep ~240 bitmaps (960×540) alive, on the order of hundreds of megabytes, which can jank or kill the tab on phones.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a3f723b. Configure here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 68b497d.

…ers don't pre-decode (Bugbot)

- index.html: reveal() runs first and every part sets up on its own (a throw is logged, not fatal): three.js and the
  device rows load with a dynamic import, and if it fails both rows show their stills; a hello-world source that
  fails to fetch leaves that slide without code instead of stopping the script.
- index.html: a newer reel slide cancels a swap still waiting on the fade (clearTimeout), so a quick second click
  can't be overwritten by the first one's images and code.
- js/devices.js: an error after the WebGL context exists also falls back to the still.
- js/threert.js: the camera-move players wait for the frames' bytes, not for decode(): decoding all 120 up front
  pinned ~240 MB of bitmaps per player; drawImage decodes the frame it shows and the browser may drop it again.

Checked in headless Chrome: normal run (sections reveal, reel code shown, players play, both 3D rows); with
vendor/three blocked the same sections reveal and both rows show their stills; clicking slide 2 then 3 within 120 ms
shows slide 3's images and code; no broken images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@doodlewind
doodlewind merged commit fe570e8 into main Nov 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants