Repository navigation
feat: added 2 hero components plane-hero and globe-hero - #54
Merged
Merged
Conversation
✅ Deploy Preview for zepaui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Component Name
plane-heroandglobe-hero— two hero sections built on a dotted WebGL globe.Description
plane-hero— a centred headline over a globe made of ~16k dots sampled off a world map. Ten cities carry anchored labels and six great-circle arcs redraw themselves on a staggered 7s loop. Each arc can carry a 3D plane at its peak, yawed to the real geographic bearing of its own flight line so it always points where it's going.globe-hero— a three-line headline whose middle line swaps every two seconds, each character its own spring so the outgoing word slides up while the incoming one rises from below. The globe beside it carries a spinning tetrahedron at every edge region and a request counter drifting over every arc. Includes a slim navbar.Both place their chips with CSS anchor positioning rather than measured coordinates — cobe publishes a
--cobe-<id>anchor and a--cobe-visible-<id>number per point, so a chip tracks a spot on a rotating sphere and fades as it turns away, in CSS alone.Preview
public/previews/hero-sections/plane-hero/preview.mov— 0.68 MB, 1280×776 @ 30fpspublic/previews/hero-sections/globe-hero/preview.mov— 0.35 MB, 1280×776 @ 30fpsCompressed from 117.59 MB of raw 60fps capture, SSIM 0.991 and 0.992 against a CRF-12 reference.
Dependencies Added
None installed.
plane-heroshipsdependencies: [];globe-herodeclares["motion"], which the project already has and three other components already use.cobe is vendored, not installed. It's MIT and a single 12.9 KB file, so both components carry it at
ui/cobe.tswith the copyright notice restored — the dist bundle ships without one, and MIT requires it. Nothing tonpm install, and the rendering is identical because it is cobe.@google/model-viewerloads from jsDelivr at runtime only when a plane model is configured.Notes
A registry bug this uncovered.
scripts/build-registry.tscollects only.tsx,.tsand.jsonand reads them as UTF-8. The vendored bundle was originallyui/cobe.js, which both demos import — it would have been silently dropped from the published registry, so anyone runningnpx shadcn addwould have received a broken import. Renamed toui/cobe.tsin both.The same filter means
plane-hero/ui/plane.glb(6.1 MB, binary) cannot ship through the registry either — a UTF-8 read would corrupt it. The model is kept in the component for source control, butPLANE_MODELdefaults to"", which is a complete component: every arc renders its text route chip and the model-viewer script never loads. Three ways to enable the planes, and the choice is open:.glband point the constant at it — works everywhere, no tooling changebuild-registry.tsabout binary assets (base64, or apublic/install target)Credits. Plane model: chroma3d on Sketchfab — https://sketchfab.com/vendol21.
plane-heroadapted from the GlobalCare.ai hero;globe-herofrom CohortData.com.Both own their layout and are embed-safe: no
position: fixed, nowindow.innerWidth/innerHeight, nodocument.body, every class and keyframe prefixed (ph-/gh-).Browser support: the anchored chips rely on CSS anchor positioning, which is Chrome/Edge only today. The globes and arcs render everywhere; in Firefox and Safari the chips don't track their points. That's inherited from both references.
Checklist
meta.tsdemo.tsxpublic/previews/{category}/{slug}/preview.mov)npm run build:registrynpm run lintnpm run testconsole.log