Skip to content

Immersive scroll-driven storytelling homepage (Three.js + GSAP + Lenis) - #10

Open
farhanashrafdev wants to merge 2 commits into
mainfrom
feat/immersive-storytelling-homepage
Open

Immersive scroll-driven storytelling homepage (Three.js + GSAP + Lenis)#10
farhanashrafdev wants to merge 2 commits into
mainfrom
feat/immersive-storytelling-homepage

Conversation

@farhanashrafdev

Copy link
Copy Markdown
Member

This pull request was created by @kiro-agent on behalf of @farhanashrafdev 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro Web


What this does

Rebuilds the homepage (index.html) as a scroll-driven cinematic story. Each scroll section is a "chapter" that animates in as a scene, over a painted WebGL background whose colours flow fluidly from one chapter to the next.

The four requested features

  1. Storytelling, chapter-per-section with fluid colour transitions — seven chapters (Prologue → Origin → Practice → Pillars → The Field → The Creed → The Door). Each chapter owns a colour palette; the background eases between palettes as you scroll.
  2. Three.js painted-texture background that reacts to the cursor — a full-screen GLSL shader using domain-warped fBm noise to create a "wet paint" flow. A soft swell follows the pointer.
  3. GSAP ScrollTrigger cinematic reveals — masked line-by-line headlines, staggered content rises, parallax drift, and animated stat count-ups, all triggered per section.
  4. Lenis.js smooth scroll — buttery momentum scrolling, fed into ScrollTrigger so animations stay perfectly in sync.

Content

Uses real CNSPK content — 280+ engineers, 11 events, 3 cities, the four pillars (Rigor / Belonging / Bridge / Practice), real event titles, and the kubectl apply -f pakistan.yaml / "Read the CVE. Drink the chai." voice.

Robustness

  • WebGL/library fallback: if three.js/GSAP/Lenis fail to load or WebGL is unavailable, falls back to a CSS gradient and shows all content statically.
  • prefers-reduced-motion: disables smooth scroll + shader motion and reveals all content immediately.
  • CSP updated to allow cdn.jsdelivr.net ES-module imports.
  • Navbar, Footer, brand tokens, and every other route are untouched.

Also

  • Adds vercel.json (cleanUrls, trailingSlash, security + cache headers) so the preview deploy serves routes cleanly.

Testing

  • Verified valid JSON (vercel.json), 7 chapters present, all three library refs resolve, Navbar/Footer imports match the existing component API, and all CSS tokens referenced exist in tokens.css.
  • Note: a live WebGL/scroll render is best confirmed on the Vercel preview generated by this PR.

Known limitations

  • This PR redesigns the homepage only; inner pages (events, members, etc.) keep their current functional layouts.

- Seven-chapter narrative (Prologue → Origin → Practice → Pillars →
  The Field → The Creed → The Door) using real CNSPK content
- Three.js painted-texture WebGL background with domain-warped fbm
  that flows and reacts to the cursor; palette transitions per chapter
- GSAP ScrollTrigger cinematic reveals: masked line headlines,
  staggered rises, parallax drift, animated stat count-ups
- Lenis.js smooth scroll fed into ScrollTrigger
- Fixed chapter counter with scroll-progress rail
- Graceful fallbacks: CSS gradient when WebGL/libs unavailable,
  full prefers-reduced-motion support (no smooth scroll, content shown)
- CSP updated to allow cdn.jsdelivr.net module imports
- Add vercel.json (cleanUrls, trailingSlash, security + cache headers)

Navbar/Footer, brand tokens, and all other routes untouched.

Co-authored-by: Farhan Ashraf <53370109+farhanashrafdev@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 10, 2026 03:49
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
websitev2 Ready Ready Preview, Comment Jun 15, 2026 12:06pm

Copilot AI 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.

Pull request overview

Rebuilds the site homepage into a scroll-driven “chapter” experience with a Three.js shader background and GSAP/Lenis-driven reveals, plus adds a Vercel configuration for clean URLs, trailing slashes, security headers, and asset caching.

Changes:

  • Replaces index.html with a seven-chapter, scroll-triggered storytelling layout (painted WebGL background + GSAP ScrollTrigger + Lenis).
  • Updates homepage CSP to allow ES-module imports from cdn.jsdelivr.net, and adds performance preconnects.
  • Adds vercel.json to configure clean URLs/trailing slashes, baseline security headers, and cache headers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
vercel.json Adds global security headers and caching behavior for static assets.
index.html Implements the immersive scroll-driven homepage (shader canvas, chapter sections, GSAP/Lenis wiring, CSP adjustments).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vercel.json
Comment on lines +1 to +21
{
"cleanUrls": true,
"trailingSlash": true,
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "X-Frame-Options", "value": "SAMEORIGIN" },
{ "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" },
{ "key": "Permissions-Policy", "value": "geolocation=(), microphone=(), camera=()" }
]
},
{
"source": "/(.*)\\.(js|css|png|jpg|jpeg|svg|webp|ico|woff2)",
"headers": [
{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }
]
}
]
}
@farhanashrafdev

Copy link
Copy Markdown
Member Author

/kiro fix check these copilot comments and give me your feedback on them, use opus 4.8

Addresses Copilot review on PR #10. The site serves stable, unversioned
asset URLs (/js/Navbar.js, /css/tokens.css), so a 1-year immutable cache
made clients run stale code/styles after deploys.

- JS/CSS: public, max-age=0, must-revalidate (revalidate via ETag, 304 when unchanged)
- Images/fonts: public, max-age=86400, stale-while-revalidate=604800
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.

3 participants