Repository navigation
feat: added new components in new section called as animation section - #49
Merged
Merged
Conversation
✅ Deploy Preview for zepaui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…egories. I added the animations
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
Eight components across two sections — plus a new
animationscategory.paper-gridgrid-sectionscards-animationanimations(new)scroll1-animation…scroll6-animationanimations(new)Description
New section:
animations. Categories auto-discover from folder names, so thisonly needed
"animations"appending toCATEGORY_ORDERinapp/components/page.tsx.Renders as the "Animations" chip. Playground route added at
/playground/animation.paper-grid— Three translucent certificates printed on glass, hanging side byside and bending like real paper. Drag a sheet to turn it, hover to light it. All
three share one WebGL context, one renderer and one procedural environment map.
3D scene ported from ThreeUI's
<ThreeDPaper />(MIT, Meng To / Design+Code).Upstream ships this as an
<iframe srcDoc>wrapping 630KB of HTML with Three.jsr149 inlined — it relies on
position:fixed,window.innerWidth, globalhtml/bodyrules and a Google Fonts
<link>, none of which survive outside an iframe. The scenewas lifted out and re-hosted on the project's
three@0.184. Three r149→r184 breakagesland directly on the shader injection and are fixed:
#include <output_fragment>#include <opaque_fragment>.replace()no-ops, rim light silently gonegeometry.normal/.viewDirgeometryNormal/geometryViewDirsRGBEncoding,outputEncodingcolorSpace,outputColorSpacecards-animation— Eighteen cards fly in from alternating sides and settle onto agiant wheel that scrolling turns. Mostly duotone monochrome with warm and cool accents;
click a card to open its detail panel. Inspired by @deadrabbbbit.
scroll1–scroll6-animation— The six on-scroll perspective grid animations fromCodrops' Scroll3DGrid (MIT), split one component per animation rather than six grids on
one page. Each owns its own scroll runway: Lenis is bound to the root as its
wrapperand ScrollTrigger gets that same root as its
scroller.Ported animation logic was diffed against the source — every CSS custom property, every
numeric constant and every animated property matches:
Tile counts (48/48/48/24/48/21) taken from the original markup.
Embed-safety across all eight: no
position:fixed, nowindow.innerWidth/innerHeight/scrollY,no
@importor external font links, no globalhtml/body/*/aselectors, every classand keyframe prefixed per component (
pg-,ca-,s1-…s6-).Featured:
paper-gridat position 1;cards-animation,scroll1-animationandscroll3-animationat 13–15 (mid-list). All 28 featured slugs verified to resolve —that file skips unknown slugs silently.
Preview
All eight recorded and compressed to
1280×720 @ 30fps,+faststart, audio stripped.Sources were
3022×1698 @ 120fps; the frame-rate drop did more than the CRF.paper-gridcards-animationscroll1-animationscroll2-animationscroll3-animationscroll4-animationscroll5-animationscroll6-animation430 MB → 5.1 MB. SSIM measured against a visually-lossless encode of each.
cards-animationis the outlier at 0.992 / 1.5 MB — its film-grain overlay is closeto random noise, so the encoder can't predict it.
Dependencies Added
None. All three were already in
package.json:three@^0.184.0—paper-gridgsap@^3.15.0—cards-animation,scroll1–scroll6lenis@^1.3.23—scroll1–scroll6Checklist
meta.ts— all 8, all 13 fields, slugs match folder namesdemo.tsx— all 8 (paper-gridalso hasui/paper-sheets.tsx)public/previews/{category}/{slug}/preview.mov) — all 8npm run build:registry— outstanding, must run before mergenpm run lint— cleannpm run test— not run@mediabreakpoints in every componentconsole.log— the source'sconsole.log(rotation)was removedLicensing
All ported source is MIT, notices retained in file headers and
meta.ts:3d-paper— MIT, Meng To / Design+CodeDemo images replaced with the project's own Cloudinary assets — no hotlinked
third-party media added.