feat(ui): add Three.js 3D neural prism, 3D tilt cards, cursor aura, and flagship banners
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
# 3D Motion Graphics & Neural Prism Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** Elevate the CRE Innovations front page with interactive Three.js 3D motion graphics, perspective card tilt, specular reflections, and kinetic telemetry inspired by Squared Media (squared-media.nl), while ensuring zero SEO degradation and ultra-fast 60fps performance.
|
||||
|
||||
**Architecture:**
|
||||
- A lightweight, lazy-loaded Three.js WebGL canvas (`Hero3DCanvas`) rendering a 3D neural crystal prism and particle constellation with inertial mouse tracking, paused via `IntersectionObserver` when offscreen.
|
||||
- A high-performance 3D perspective tilt component (`TiltCard`) with dynamic specular glare overlay.
|
||||
- An ambient desktop cursor aura follower (`CursorAura`) delivering agency-grade polish.
|
||||
- Full preservation of semantic HTML, Schema.org JSON-LD, and zero impact on Core Web Vitals or mobile responsiveness.
|
||||
|
||||
**Tech Stack:** Next.js 14 (App Router), React 18, Three.js (`three` + `@types/three`), Tailwind CSS, Lucide React.
|
||||
|
||||
---
|
||||
|
||||
## Global Constraints
|
||||
- Brand name: strictly **CRE Innovations**.
|
||||
- Palette: Light creamy off-white (`#FAF8F5` / `#F5F2EB`) with slate-900 typography and electric neural blue/indigo accents.
|
||||
- Zero SEO degradation: All H1/H2/H3/p tags, Schema.org structured data, and meta tags must remain intact; 3D canvas is `aria-hidden="true"` and non-blocking.
|
||||
- Ultra-fast & lightweight: Canvas uses DPR clamp <= 2, pauses RAF when out of viewport, and disposes WebGL resources on unmount.
|
||||
- Python commands: Use `/home/creserver/extras/local_venv/bin/python` per user global rule.
|
||||
|
||||
---
|
||||
|
||||
## Task Decomposition
|
||||
|
||||
### Task 1: Create `Hero3DCanvas.tsx`
|
||||
- File: `src/components/3d/Hero3DCanvas.tsx`
|
||||
- Build Three.js 3D neural crystal (icosahedron wireframe + inner glowing sphere + 60 floating neural particles).
|
||||
- Implement smooth lerp mouse tracking `(targetX, targetY)`.
|
||||
- Implement `IntersectionObserver` to halt RAF loop when canvas is not visible.
|
||||
- Add full WebGL resource disposal on unmount.
|
||||
|
||||
### Task 2: Create `TiltCard.tsx` and `CursorAura.tsx`
|
||||
- File: `src/components/ui/TiltCard.tsx`
|
||||
- Mouse move perspective tilt (`perspective(1000px) rotateX(...) rotateY(...) scale3d(1.01, 1.01, 1.01)`).
|
||||
- Dynamic radial specular highlight layer.
|
||||
- Smooth spring reset on mouse leave.
|
||||
- Respects `prefers-reduced-motion` and touch devices.
|
||||
- File: `src/components/ui/CursorAura.tsx`
|
||||
- Desktop-only ambient radial glow follower (`@media(hover:hover)`).
|
||||
- RAF lerp smoothing.
|
||||
|
||||
### Task 3: Integrate 3D Motion Graphics into `HeroSection.tsx`
|
||||
- File: `src/components/sections/HeroSection.tsx`
|
||||
- Dynamically import `Hero3DCanvas` with `{ ssr: false }`.
|
||||
- Position the 3D canvas behind/beside the hero headline with subtle atmospheric glow.
|
||||
- Add kinetic floating telemetry chips (`⚡ CRE Neural Core v2.4`, `In-Memory ~340ms`, `Zero Disk Storage Active`) with staggered orbital float.
|
||||
- Wrap TryItWidget in `TiltCard`.
|
||||
|
||||
### Task 4: Enhance Flagship Banners and Studio Suite with 3D Tilt
|
||||
- Files:
|
||||
- `src/components/sections/MajorToolBannersSection.tsx`
|
||||
- `src/components/sections/VerticalToolStackSection.tsx`
|
||||
- Wrap flagship cards and studio suite cards in `TiltCard` with subtle specular gleam.
|
||||
|
||||
### Task 5: Global Layout Integration & Styling
|
||||
- File: `src/app/layout.tsx`
|
||||
- Mount `CursorAura` at body level.
|
||||
- Add CSS animations for floating telemetry badges in `src/app/globals.css`.
|
||||
|
||||
### Task 6: Production Build, Server Restart & Automated Verification
|
||||
- Run `npm run build` to verify clean compilation without TypeScript or SSR errors.
|
||||
- Restart production server daemon task (`npm run start`).
|
||||
- Run Python audit script to verify all 9 routes return 200 OK, 1 H1, 0 missing alt tags.
|
||||
- Test in Puppeteer: evaluate WebGL canvas rendering, 60fps loop, and card tilt.
|
||||
- Commit all changes with descriptive commit message.
|
||||
@@ -0,0 +1,82 @@
|
||||
# Major Tool Banners & Animated Comparisons Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** Eliminate redundant content across pages, implement smooth auto-sliding before/after comparison animations, and create a flagship Major Tool Banners section showcasing flagship AI models in alternating editorial layouts.
|
||||
|
||||
**Architecture:** Next.js 14 App Router, dynamic JSON configs, Canvas/RAF-driven smooth slider oscillation in `BeforeAfterSlider.tsx`, new `MajorToolBannersSection.tsx` registered in `SectionRenderer.tsx`.
|
||||
|
||||
**Tech Stack:** Next.js 14, React 18, TypeScript, Tailwind CSS, Lucide React.
|
||||
|
||||
---
|
||||
|
||||
## Global Constraints
|
||||
- Brand name: strictly **CRE Innovations**.
|
||||
- Color palette: maintain warm, light creamy off-white studio aesthetic (`#FAF8F5` / `#F5F2EB`).
|
||||
- Non-redundancy: eliminate duplicate tool grids and duplicate comparison sliders across pages.
|
||||
- Auto-sliding animation: smooth sine-wave oscillation that pauses instantly on user touch/mouse interaction.
|
||||
|
||||
---
|
||||
|
||||
### Task 1: Auto-Sliding Before/After Animation in `BeforeAfterSlider.tsx`
|
||||
|
||||
**Files:**
|
||||
- Modify: `src/components/ui/BeforeAfterSlider.tsx`
|
||||
|
||||
- [ ] **Step 1: Implement RAF-based Auto-Slide Oscillation**
|
||||
- Add `autoSlide?: boolean` (defaults to `true`).
|
||||
- Use `requestAnimationFrame` with a smooth sine function (`50 + 28 * Math.sin(timestamp * 0.0015)`) to oscillate between ~22% and ~78%.
|
||||
- On mouse enter / touch start: pause animation immediately and allow manual dragging.
|
||||
- On mouse leave: resume after a short grace period.
|
||||
- Add mode indicator pill ("Auto-Scanning" / "Manual Inspect").
|
||||
|
||||
- [ ] **Step 2: Verify component in build**
|
||||
- Run `npm run build` to confirm no compilation issues.
|
||||
|
||||
---
|
||||
|
||||
### Task 2: Create Flagship `MajorToolBannersSection.tsx`
|
||||
|
||||
**Files:**
|
||||
- Create: `src/components/sections/MajorToolBannersSection.tsx`
|
||||
- Modify: `src/components/sections/SectionRenderer.tsx`
|
||||
|
||||
- [ ] **Step 1: Build `MajorToolBannersSection.tsx`**
|
||||
- Spotlight 3 flagship tools:
|
||||
1. *P3M-Net Ultra Cutout Studio* (Hair-strand isolation & alpha PNG)
|
||||
2. *RetouchGAN v2.1 Skin Precision* (Pore-preserving acne & blemish removal)
|
||||
3. *GFPGAN + RealESRGAN 4K Enhancer* (Super-resolution & vintage deblurring)
|
||||
- Alternating layout (Left-Right, Right-Left, Left-Right) for rhythm and aesthetic symmetry.
|
||||
- Large-format auto-sliding before/after animation frames.
|
||||
- 1-click "Launch Tool Online" and "Get Mobile App" CTAs.
|
||||
|
||||
- [ ] **Step 2: Register in `SectionRenderer.tsx`**
|
||||
- Add `case 'majorToolBanners': return <MajorToolBannersSection />`.
|
||||
|
||||
---
|
||||
|
||||
### Task 3: De-duplicate Page Content across JSON Configs
|
||||
|
||||
**Files:**
|
||||
- Modify: `content/pages/home.json`
|
||||
- Modify: `content/pages/tools.json`
|
||||
|
||||
- [ ] **Step 1: Clean Up `home.json`**
|
||||
- Add `majorToolBanners` section after `stats-section`.
|
||||
- Remove duplicate `featured-tools` (`toolGrid`) from homepage (now uniquely represented by The Creative Suite and Flagship Banners).
|
||||
- Remove duplicate `showcase-before-after` (redundant with the animated banners).
|
||||
|
||||
- [ ] **Step 2: Clean Up `tools.json`**
|
||||
- Remove `tools-vertical-stack` from `tools.json` so `/tools` is purely the dedicated search and filter directory (`toolGrid`), giving each page a distinct role.
|
||||
|
||||
---
|
||||
|
||||
### Task 4: Comprehensive Verification & Audit
|
||||
|
||||
**Files:**
|
||||
- Audit homepage and all subpages
|
||||
- Verify clean build, zero TypeScript errors, valid SEO & schemas
|
||||
|
||||
- [ ] **Step 1: Run `npm run build`**
|
||||
- [ ] **Step 2: Restart Server & Test Routes**
|
||||
- [ ] **Step 3: Commit and Final Status**
|
||||
Reference in New Issue
Block a user