Repository navigation
Landing page (site/): every light traced at 60 fps, three.js everywhere else - #14
Conversation
…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>
| 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 }), | ||
| }; |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit beca528. Configure here.
| 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); |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit beca528. Configure here.
| 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)); |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit beca528. Configure here.
…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>
| $("#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)); |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 6266303. Configure here.
There was a problem hiding this comment.
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>
| 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)); |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 5367474. Configure here.
There was a problem hiding this comment.
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.
…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>
| 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)); |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit c253e57. Configure here.
| draw(); | ||
| } | ||
| requestAnimationFrame(loop); | ||
| }; |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit c253e57. Configure here.
| requestAnimationFrame(loop); | ||
| }; | ||
| const io = new IntersectionObserver(([en]) => { if (en.isIntersecting && !frames) { load(); requestAnimationFrame(loop); } }, { rootMargin: "400px" }); | ||
| io.observe(el); |
There was a problem hiding this comment.
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).
Reviewed by Cursor Bugbot for commit c253e57. Configure here.
| // 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)); |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit c253e57. Configure here.
…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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
There are 12 total unresolved issues (including 9 from previous reviews).
❌ 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.
| seg($("#leftPick"), (v) => { st.left = v; render(); }).pick("tuned"); | ||
| $("#leftPick").addEventListener("pointerdown", (e) => e.stopPropagation()); | ||
|
|
||
| reveal(); |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit a3f723b. Configure here.
| 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); |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit a3f723b. Configure here.
| ready = true; | ||
| $(".loading", el).remove(); | ||
| draw(); | ||
| }); |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit a3f723b. Configure here.
…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>


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/andgames/are untouched;site/is outsidenpm run typecheckandnpm test.What is on the page
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 bybun site/tools/media.tsfromout/milestone1andout/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).site/serve.tsmaps the import map tonode_modules/three(the existing devDependency, r187);bun site/tools/build.tscopies it intoout/site/for static hosting.Merge gate
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.tsproduces 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 injs/devices.js; branding insite/brand/.Bun tooling serves and ships the site:
serve.ts(local dev, three.js via import map fromnode_modules),tools/build.ts(static copy toout/site/),tools/media.ts(WebP from benchmarkout/),tools/device-stills.ts(headless Chrome fallbacks), andtools/vendor.ts(three.js paths for serve/build). Hello-worldmedia/code/*.threert.tssnippets 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.