Skip to content
Back to skills

3d-interactive-website

ASecurity

Build cinema-grade, Awwwards-level 3D interactive websites with React Three Fiber: studio lighting, scroll-driven camera and object story, GLSL particles, liquid-chrome materials, touch and tilt input, sound, multi-page transitions, a working contact form, prerendered SEO, i18n and a performance budget. Use for any landing page, portfolio, product site or hero section that needs real-time 3D, WebGL, scroll animation or mouse/touch-reactive scenes. Works in Claude Code and in any AI coding age...

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
developmentpythongoshellreactnextjsrailsapiperformance

Works with

  • claude code
  • cursor
  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 19 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add Kaushal830/3d-interactive-website-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 3d-interactive-website?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 3d-interactive-website
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kaushal830-3d-interactive-website/badge)](https://www.skillsdirectory.com/skills/kaushal830-3d-interactive-website)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: 3d-interactive-website
description: Build cinema-grade, Awwwards-level 3D interactive websites with React Three Fiber: studio lighting, scroll-driven camera and object story, GLSL particles, liquid-chrome materials, touch and tilt input, sound, multi-page transitions, a working contact form, prerendered SEO, i18n and a performance budget. Use for any landing page, portfolio, product site or hero section that needs real-time 3D, WebGL, scroll animation or mouse/touch-reactive scenes. Works in Claude Code and in any AI coding agent that reads SKILL.md / AGENTS.md style instruction files (Codex, Cursor, Windsurf, Gemini CLI, Copilot).
---

# 3D Interactive Website

Build a production 3D website, never a demo. Every scene you ship must look lit, art-directed and expensive, even when the geometry is simple.

## Mandatory stack

- Scaffold with Vite + React + Tailwind CSS. Never substitute Create React App, plain HTML, or a different framework unless the user names one.

- Install exactly these packages for the 3D layer: `three @react-three/fiber @react-three/drei @react-three/postprocessing postprocessing gsap lenis`.

- Optional, only when used: `react-router-dom` (multi-page), `@react-three/rapier` (physics recipe), `opentype.js` as a dev dependency (brand font for 3D text).

- Use React Three Fiber for every scene. Raw Three.js is allowed only inside a custom shader or loader, never as the scene framework.

## Execution workflow

Follow in order. Do not skip steps 1 and 8; they are what separate a polished site from a tech demo.

1. **Brief.** Read `DIRECTION.md`. Fill the brief (subject, audience, one-line promise, mood, 4 to 6 chapters, CTA) before writing code. If the user gave almost nothing, make the choices yourself, state them in two lines, and proceed.
2. **Optional reference study.** If the user names or links reference sites, follow `STUDY_REFERENCE.md` (techniques only, never copy a site).
3. **Scaffold.** Vite + React + Tailwind via `@tailwindcss/vite`. Install the packages above. Copy `templates/index.css` to `src/index.css` and `templates/index.html` + `favicon.svg` to the project root/public (edit title, description, OG).
4. **Copy the kit.** `references/*` to `src/components/3d/`, `recipes/*.jsx` to `src/components/3d/recipes/` (physics is optional: only if used, `npm i @react-three/rapier` and copy `recipes/optional/` to `src/components/3d/recipes/optional/`; without them the build still passes), `ui/*` to `src/components/ui/`, `templates/content/*.json` to `src/content/`, `templates/main.jsx` to `src/main.jsx`, `assets/fonts/` to `public/fonts/` (only for 3D text). Start from a template, never from a blank scene:
   - Full one-page site: `templates/FullPage.jsx` (loader, cursor, nav, scroll story, marquee, features, horizontal process, stats, testimonial, working form, footer, sound, language switch).
   - Several pages (work, case studies, about, 404) over one persistent canvas with page transitions: `templates/MultiPage.jsx` (render it in `main.jsx`; needs `react-router-dom`).
   - Single hero / minimal story: `templates/App.jsx`.
   - Effect preview: `templates/RecipeLab.jsx` (`?recipe=...`).
5. **Pick preset and recipes** from the tables below. One preset. One or two recipes. Call `applyPresetCss(preset)` once.
6. **Hero model.** Read `ASSETS.md`: user file, then connected generator, then procedural fallback. The bundled knot is a placeholder only. Run `scripts/optimize-model.sh`; serve at `/assets/<name>.glb`.
7. **Write the story.** Edit `CHAPTERS` in `ScrollStory.jsx` (camera, object pose, particle level), placing cameras by eye with `?author` (CameraAuthor), and keep one chapter section per entry (the `Chapters` component renders them from `content.chapters`). Keep text and object on opposite sides. Replace ALL copy in `src/content/*.json` with copy specific to the subject (rules in `DIRECTION.md`); delete languages and sections the brief does not need.
   Then switch on only the site features the brief needs (next section).
8. **Verify, measure and score.** `npm run build`, serve the build, then:
   - `python3 -I scripts/verify.py http://localhost:4173 verify-out <chapters>` (`VERIFY_FAST=1` while iterating). Open every screenshot, desktop and mobile, including no-webgl and reduced-motion.
   - `python3 -I scripts/perf.py dist "http://localhost:4173/?debug"` and fix budget warnings.
   - Score with `QUALITY_BAR.md`. Below 16/20: fix the lowest lines, repeat. Copy `verify-out/poster.webp` to `public/poster.webp`.
9. **Ship.** `SEO.md` prerender (with `VITE_SITE_URL`), then the `DEPLOY.md` checklist. Report the final score, the weakest line, and what was not tested (see Limits).

## Style presets (pick exactly one per site)

`references/presets.js` holds complete art directions. Pass the preset to `SceneShell`/`SceneRig`, `ScrollStory`, `InteractiveMesh`, `ParticleField` and the recipes; `?preset=` overrides via `presetFromUrl()` for previews.

| Preset | Use for | Look |
| --- | --- | --- |
| `chrome` | tech, luxury, automotive, studios | near-black, liquid metal, ice-blue light |
| `glass` | beauty, fintech, premium SaaS | smoky refractive crystal, iridescent edges (reads dark; known limit) |
| `clay` | wellness, lifestyle, kids, editorial (LIGHT theme) | soft matte pastel, no bloom, no particles |
| `neon` | gaming, music, nightlife, crypto | magenta/cyan emissive, strong bloom, chromatic split |
| `pedestal` | physical products, jewelry, objects | satin ceramic on a stone plinth, warm gallery spot |

Add a preset by copying one and keeping every key. Never hard-code colours in the overlay; use the CSS variables so light themes keep dark text.

## Recipe library (`recipes/`)

Self-contained effects reading the shared `story` state (`<ScrollStory />` must be mounted). Preview with `templates/RecipeLab.jsx` (`?recipe=morph|explode|liquid|gallery|text|atmosphere|physics|video|text3d&preset=glass`). Use one or two per site.

| Recipe | Effect | Use when |
| --- | --- | --- |
| `ParticleMorph.jsx` | particle cloud flows sphere, knot, ring, cube on scroll | brand has a mark; story is "assembly" |
| `ExplodeGroup.jsx` | multi-part model separates mid-scroll, re-assembles | product with visible parts |
| `LiquidImage.jsx` | image plane ripples at cursor, RGB-splits on fast scroll | image-led sections, case studies |
| `GalleryRing.jsx` | cards on a ring that turns with scroll | portfolio, work, lineup |
| `BackdropText.jsx` | giant type behind the object (`transparent` rig) | one-word brand statements |
| `AuroraBackdrop.jsx` | drifting preset-coloured shader field behind the scene | any hero that feels empty; neon, glass |
| `InstancedShapes.jsx` | ~56 instanced floating shapes with pointer parallax | depth and scale around the hero |
| `optional/PhysicsPlayground.jsx` | rigid-body shapes pile up, scatter from the pointer, burst on tap | playful brands, one section (heavy: lazy-load) |
| `VideoPlane.jsx` | video texture that leans with the pointer | showreel, product loop |
| `Extruded3DText.jsx` | bevelled 3D type in the preset material | one-word brand statement |
| `Cursor.jsx` | custom cursor, hover labels, `useMagnetic` | every fine-pointer site (in the templates already) |

## Page kit (`ui/`)

`Nav` (sticky, blur, mobile menu), `SplitText` (line/word reveal), `Marquee`, and `Sections` (`FeatureGrid` bento, `Stats` with `CountUp`, `Testimonial`, `ContactForm`, `Footer`). Styles are in `templates/index.css`. All read CSS variables, so they follow the preset. Replace every placeholder string; sample copy shipped as-is is a failure on `QUALITY_BAR.md` line 5.

## Site features (details and wiring: `SITE_FEATURES.md`)

| Need | Use | Rule |
| --- | --- | --- |
| Works on phones | `input.js` (swipe spin, tap pulse, optional tilt) + `TiltToggle` | read `input`, never `state.pointer`; tilt is opt-in |
| Lead capture | `ContactForm` + `templates/server/contact-handler.js` | set an endpoint or mailto; never ship "not connected" |
| Sound | `Sound.js` + `SoundToggle` | off by default, starts only on the visitor's click |
| Several pages | `MultiPage.jsx` + `Transition.jsx` | one persistent canvas; `fixedChapter` poses; `as={TLink}` on Nav/Footer |
| Search visibility | `Seo` + `scripts/prerender.py` | prerender every route; absolute URLs via `VITE_SITE_URL` |
| Several languages / CMS | `i18n.jsx`, `content/*.json`, `fetch-content.mjs` | copy only in JSON; real `/es` routes for multi-language SEO |
| Extra moves | `HorizontalScroll`, `PhysicsPlayground`, `VideoPlane`, `Extruded3DText`, `CameraAuthor` | one or two per site; physics must be lazy-loaded |
| Budget | `scripts/perf.py` | initial JS 500 KB gzip, 150 draw calls, 600k triangles, 3 MB transfer |

## Anti-generic aesthetic rules

### Banned

- Never ship raw Three.js boilerplate as the main scene.

- Never use `OrbitControls` without `enableDamping`. Prefer no orbit controls on marketing pages, use pointer parallax instead.

- Never render a basic un-textured primitive (`<boxGeometry />`, `<sphereGeometry />`, `<torusGeometry />`) with a flat color as the hero object. Primitives are allowed only inside a procedural fallback or as secondary set dressing with a physical material.

- Never use harsh primary RGB colors such as `#ff0000`, `#00ff00` or `#0000ff` anywhere in the scene or UI.

- Never light a scene with flat ambient light alone.

### Required

- Use a dark luxury palette. Backgrounds stay between `#050505` and `#0f1115`. Accents are muted metal, ice blue, warm white or one restrained brand color.

- Light every scene with the `SceneRig` setup: an offline studio environment (`StudioEnvironment` in `SceneRig`, built from three's `RoomEnvironment`). Never use `<Environment preset=...>`: it fetches an HDR from a CDN at runtime and a failed request blanks the whole canvas, one key spot light with soft shadows, and one cool rim or fill light.

- Give hero objects a `MeshPhysicalMaterial` with real parameters: `metalness` or `transmission`, `roughness` below 0.35, `clearcoat`, and `iridescence` where it suits chrome or glass.

- Add post-processing through `<EffectComposer>` with subtle `<Bloom mipmapBlur luminanceThreshold={1} />` and a `<Vignette />`. Never crank bloom until the scene glows white.

- Animate every pointer and scroll interaction with interpolation: `THREE.MathUtils.lerp`, a damped value (`1 - Math.exp(-k * delta)`), or a GSAP scrub. Never set camera or mesh transforms directly from raw input.

- Add soft grounding with `<ContactShadows />` or a real shadow-catching light, so objects never float in a void.

## Typography and UI overlay rules

- Render the canvas fixed and behind everything: `position: fixed; inset: 0; z-index: 0`. Page content scrolls over it.

- Set overlay containers to `pointer-events: none` and interactive elements (buttons, links, inputs) to `pointer-events: auto`, so the 3D scene still receives pointer movement everywhere else.

- Use massive kinetic display typography for the hero: `clamp(3.5rem, 11vw, 10rem)`, tight leading (0.9 to 1.0), uppercase or editorial mixed case, with a light sans (Inter, Manrope or the project font) and generous letter-spacing on small labels.

- Reveal headline lines on load with a GSAP stagger (y offset plus opacity, 0.8 to 1.2 s, power3 easing). Keep motion smooth, never bouncy.

- Style cards and panels as glassmorphism: `background: rgba(255,255,255,0.04)`, `backdrop-filter: blur(16px)`, a 1 px border of `rgba(255,255,255,0.09)`, and a radius of 16 to 24 px.

- Keep copy short and editorial. One strong headline, one supporting line, one call to action per section.

## Scroll and camera rules

- Drive scroll experiences with `ScrollStory.jsx`: Lenis for smooth scroll, GSAP ScrollTrigger scrubbing one progress value, and the camera and hero object interpolating between authored chapters.

- Author exactly one `<section data-chapter>` per entry in `CHAPTERS`, in the same order, each at least `100vh`.

- Never attach scroll listeners that write camera position directly. Scroll sets a target, `useFrame` moves the camera.

## Known pitfalls (verified in a headless build)

- Never apply film grain (or any soft-light/overlay noise) as a post-processing effect: it runs on HDR values and punches black holes into highlights. Grain is a CSS overlay (`body::after` in `templates/index.css`, strength from `--grain`).
- Anything with `position: fixed` and `mix-blend-mode` over the canvas (cursor, grain) must have `pointer-events: none`.
- A site without `<Loader />` still works: `ScrollStory` starts the intro itself.
- Never combine `metalness: 1` with `transmission`. It renders black and costs an extra render pass. Keep `transmission: 0` on chrome.
- `assets/hero-sculpture.glb` has no normals. `InteractiveMesh` calls `computeVertexNormals()` on load; keep that line, or the chrome renders flat grey.
- Set `html, body { background: #050505; margin: 0 }` in the project CSS, or the Vite template shows white (`templates/index.css` does this; light presets override via CSS vars).
- The WebGL-off fallback shows `/poster.webp`. Copy `verify-out/poster.webp` to `public/poster.webp` or the fallback is text on a plain background.
- Scene components read `input` from `input.js`, never `state.pointer`, or touch devices get no interaction.
- ScrollTrigger `pin: true` moves the pinned element into a `.pin-spacer`. Always wrap a pinned section in your own container (HorizontalScroll does), or React throws `removeChild` on route changes.
- `useLenisScrollTrigger` must only kill its own ScrollTrigger on cleanup; killing all of them breaks reveals on other components.
- Inner-page hero strips need `position: relative; z-index: 1` (like `.overlay`) or the fixed canvas paints over or under them wrongly.
- Fixed toggles (sound, language, tilt) cover footer links unless the footer keeps bottom padding (the CSS does).
- Never ship the contact form without an endpoint or mailto.
- Never import `@react-three/rapier` statically in the entry bundle: it adds about 830 KB gzip.
- Never wrap the Canvas in a component that can throw without `SceneShell`; a WebGL failure must degrade to the poster, not a blank page.
- Recipes for non-knot subjects need `cameras={orbitPath(r)}` or the default close-ups clip them.

## Performance guardrails

- Clamp pixel ratio with `dpr={[1, 2]}` on every Canvas. On narrow mobile screens (below 768 px), reduce particle count by at least half and disable or reduce bloom.

- Build geometries and materials with `useMemo`, and reuse one material instance across meshes where the look is shared.

- Dispose what you create: return cleanup from `useEffect` for geometries, materials, GSAP tweens, ScrollTriggers and Lenis instances.

- Keep particle systems in one draw call with a single `ShaderMaterial` and a single buffer geometry. The reference field renders 12,000 particles in one call.

- Lazy load heavy models with a procedural or low-poly fallback in the same material, so first paint never waits on a `.glb` download.

- Target 60 fps on a mid-range laptop. If a scene drops frames, cut particle count and shadow map size before cutting visual quality of the hero object.

## File map

- Docs: `SKILL.md` (this), `DIRECTION.md` brief and copy rules, `QUALITY_BAR.md` scoring, `STUDY_REFERENCE.md`, `ASSETS.md`, `SITE_FEATURES.md`, `SEO.md`, `DEPLOY.md`.
- `references/` core: `SceneShell`, `SceneRig`, `presets.js`, `ScrollStory`, `ScrollCamera`, `InteractiveMesh`, `ParticleField`, `Loader`, `input.js`, `Sound.js`.
- `recipes/` effects (table above). `ui/` page kit: `Nav`, `SplitText`, `Marquee`, `Sections`, `Chapters`, `HorizontalScroll`, `Seo`, `Transition`, `i18n`, `SoundToggle`, `TiltToggle`.
- `templates/` `FullPage.jsx`, `MultiPage.jsx`, `App.jsx`, `RecipeLab.jsx`, `main.jsx`, `index.css`, `index.html`, `favicon.svg`, `content/en.json` + `es.json`, `server/contact-handler.js`.
- `scripts/` `optimize-model.sh`, `verify.py`, `perf.py`, `prerender.py`, `fetch-content.mjs`, `font-to-typeface.mjs`.
- `assets/` `hero-sculpture.glb` placeholder knot, `fonts/inter-bold.typeface.json` (OFL).

## Limits to state honestly in the final report

- Verification is headless software rendering: no real GPU, no real finger touch, no real tilt sensor, no real speakers. Say so; recommend a check on a real phone. `perf.py` fps is only valid for before/after comparison.
- The bundled knot is a placeholder; a site is only as good as its hero model (rubric line 1 caps at 1 without a real one). AI-generated models are usually weaker than purpose-made ones.
- Not tested: a real Resend send, a real CMS, H.264 video in the test browser, the Next.js path (documented, not built), iOS permission flows.
- The `glass` preset reads as smoked glass. Combining many recipes is heavy; keep to one or two.
- The skill raises the floor and the polish. It cannot supply a custom model, brand, or art direction the user has not provided.

## Definition of done

- Builds with no errors; `verify.py` passes (desktop, mobile, reduced-motion, no-WebGL) and every screenshot has been looked at; `perf.py` has no unexplained warnings.
- `QUALITY_BAR.md` score of 16 or more, reported with the weakest line.
- Loader counts and lifts, camera flies in, each chapter visibly changes the object, all content replaced, form connected and test-sent, every route prerendered, poster and `og.webp` in `public/`, meta set.
- No banned item from the aesthetic rules appears in the code.

Files in this skill

  • AGENTS.md269 B
  • ASSETS.md2.2 KB
  • DEPLOY.md3.3 KB
  • DIRECTION.md4.9 KB
  • QUALITY_BAR.md2.5 KB
  • SEO.md2.8 KB
  • SITE_FEATURES.md6.9 KB
  • SKILL.md17.1 KB
  • STUDY_REFERENCE.md2.3 KB
  • recipes/AuroraBackdrop.jsx3.8 KB
  • recipes/BackdropText.jsx2.1 KB
  • recipes/CameraAuthor.jsx3.2 KB
  • recipes/Cursor.jsx4.2 KB
  • recipes/ExplodeGroup.jsx4.2 KB
  • recipes/Extruded3DText.jsx2.2 KB
  • recipes/GalleryRing.jsx3.4 KB
  • recipes/InstancedShapes.jsx4.1 KB
  • recipes/LiquidImage.jsx4.7 KB
  • recipes/ParticleMorph.jsx6.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.