Repository navigation
feat(site): a tilted table of the examples as the home page hero - #45
Merged
Merged
Conversation
The hero now shows each example as a cluster on a tilted table: the post as a tall page, two of its figures pulled out with leaders, its deck, its video, and for Sunny the room from its post as a 3D model, with the camera orbiting it. The camera settles on a cluster, glides to the next and wraps; a chip types the request that made the cluster in view, and a pager picks one. It's one three.js scene (site/assets/hero/hero.js, layout in layout.js), rendered on demand and only while the hero is on screen, at most 1.25x the screen's density into a 2x multisampled target. Images are cut to the width they're drawn at, in a desktop and a phone size, since the GPU holds them decoded whatever their format. A baked poster shows until the scene is ready, and for good under reduced motion or without WebGL. - site/hero.mjs cuts the images (from site/hero/src) and bakes the posters with Chrome, like card.mjs; its output is committed. - three.js r160 is served from the site, named by an import map. - The build copies site/assets/hero whole; the Worker answers Range requests for the hero's videos too, which Safari needs to play them.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 2
🚫 Excluded labels (none allowed): 1
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
5 files · View all on uploads.sh →
Maintained by uploads.sh · add media: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





The home page hero now shows what the skill makes. Under the headline, each example is laid out as a cluster on a tilted table:
The camera settles on one cluster, glides to the next, and wraps back to the first. A chip types out the request that made the cluster in view, and a pager under it (a bar per cluster, named only for screen readers) jumps to any cluster. Pointing at an object lifts it off the table.
How it's built
site/assets/hero/hero.jsdraws everything; the positions live inlayout.js. The chip and pager are plain HTML over the canvas./buildnotes [post | video | deck] what to explaintemplate sits in a code box like the install command. On a narrow screen it breaks only before the brief, which hangs under the output word, so it still reads as one command.site/hero.mjs: cuts the images fromsite/hero/src/and bakes the posters with Chrome, the same waycard.mjsrenders its link-preview cards. Its output is committed, so the site build still needs nothing installed.room.glb: exported fromsite/hero/room.blend.site/build.mjscopiessite/assets/hero/whole, because the script loads its own files.wrangler.jsoncnow routes the hero's videos through the Worker too, for HTTP Range responses. Safari won't play an MP4 without them.What it costs
These are from headless Chrome on an M3 Max GPU, with three runs each, measured on prototypes of this design before the port.
Screenshots
The table at 1440 px, with Sunny's cluster in view:
Checks
npm testpasses. One new test checks that the import map, the scene, the model, the videos, both image sizes and the posters all reach the build.