一个单页产品配置器,围绕一个完全用代码绘制的大尺寸头戴式耳机 3D 模型构建。访客拖动模型即可旋转,从四种双色表面处理中任选一种,挑选蛋白皮、天鹅绒或针织网眼耳垫,并输入一段简短刻字——刻字会随着输入实时出现在耳罩外侧面板上,可选无衬线、衬线或等宽字体。每次选择都会以短暂的颜色和材质渐变更新模型,面板和页头中的价格里程表也会重新计算。继续滚动,舞台保持固定,耳机拆解成八个带编号的部件并配有细引线,然后点击重新组装,随后出现功能、规格、评价和 FAQ。加入购物车会打开一个滑入式抽屉,里面包含从 3D 画布截取的当前配置快照、数量步进器和小计,全部使用本地状态。
它适合硬件创始人、小型音频或数码品牌,以及想要一个具有真实状态而非静态主图的产品页的开发者。视觉上是一个安静的工作室舞台:暖白色背景、柔和的接触阴影、Bricolage Grotesque 和 Inter 的中性字体,技术标签使用 JetBrains Mono,以及一个随访客所选表面处理变化的强调色。无需照片或 3D 文件:几何体、光照和纹理全部程序化生成。要适配它,只需更改品牌、产品名称、产品类型、基础价格和目标受众:提示词会相应重写规格、选项名称、部件注释、评价和 FAQ。模型始终保持为头戴式耳机,因此适用于任何耳机产品线。对于偏好减少动态效果的访客,滚动、拖拽惯性和空闲旋转都会关闭,爆炸视图会变成带标签的静态示意图。
在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。
# 3D Product Configurator Page Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else. ## Brief A single-page 3D product configurator for [BRAND]'s [PRODUCT_NAME] [PRODUCT_TYPE]. A large procedural 3D model sits on a pinned studio stage: drag to rotate, pick a two-tone finish, a cushion material and a live engraving that is drawn onto the ear-cup plate; the price recalculates with an odometer. Scrolling keeps the stage pinned and takes the headphones apart into eight labeled parts, then puts them back together, before features, a grouped spec table, reviews, an FAQ and a live build summary. Add to cart opens a drawer with a snapshot of the exact configuration. - Audience: [AUDIENCE] who want to see exactly what they are buying and make it theirs before paying [BASE_PRICE] or more. - Goal: Get the visitor to configure a pair and add it to the cart, while proving build quality and repairability through the exploded view and the spec table. - Tone: Calm, precise and practical, like a well-labeled workshop. Short sentences, real numbers, no superlatives; technical labels in mono, warmth in the reviews. ## Stack - Framework: Vite 5 + React 18 + TypeScript - Styling: Tailwind CSS 3.4 - Libraries: react@18 + react-dom@18 (MIT), [email protected] (MIT), @react-three/[email protected] (v8 line, React 18) (MIT), @react-three/[email protected] (Environment, Lightformer, ContactShadows, Html, Line, RoundedBox) (MIT), [email protected]+ with ScrollTrigger (GSAP Standard License (free, commercial use allowed)), [email protected] (MIT), lucide-react (ISC), [email protected] + postcss + autoprefixer (MIT), vite@5 + @vitejs/plugin-react (MIT), typescript (Apache-2.0), @fontsource-variable/bricolage-grotesque (OFL-1.1), @fontsource-variable/inter (OFL-1.1), @fontsource/jetbrains-mono (OFL-1.1), @fontsource/instrument-serif (OFL-1.1) - Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs. - Setup: - Scaffold with npm create vite@latest using the react-ts template. One page: index.html at the project root with entry src/main.tsx. <title> is '[PRODUCT_NAME] by [BRAND] — Configure yours'. Favicon: public/favicon.svg, a 32×32 SVG of a #17181B filled circle with a 3px #F3F1EC ring inset 7px (no letters, no logo). - vite.config.ts: base './', plugins [react()], build { outDir 'dist', sourcemap false, assetsInlineLimit 0, chunkSizeWarningLimit 1600 }. Do not copy src/ into dist/. - Tailwind 3.4 via PostCSS, content ['./index.html', './src/**/*.{ts,tsx}']. In tailwind.config.ts extend colors with every Design color in kebab-case (paper, stage, stage-edge, surface, surface-2, ink, muted, line, line-strong, footer, footer-text) plus accent: 'rgb(var(--accent) / <alpha-value>)'. fontFamily display ['Bricolage Grotesque Variable', 'system-ui', 'sans-serif'], sans ['Inter Variable', 'system-ui', 'sans-serif'], mono ['JetBrains Mono', 'ui-monospace', 'monospace'], serif ['Instrument Serif', 'Georgia', 'serif']. maxWidth container '1200px'. - src/index.css: @tailwind base/components/utilities; :root { --accent: 53 87 212; } (Graphite accent as space-separated RGB); body bg #F3F1EC, color #17181B, font Inter, -webkit-font-smoothing antialiased; .tabular { font-variant-numeric: tabular-nums } ; the drag-hint and scroll-cue keyframes live here; a @media (prefers-reduced-motion: reduce) block disables them. - src/fonts.ts imports '@fontsource-variable/bricolage-grotesque', '@fontsource-variable/inter', '@fontsource/jetbrains-mono/400.css', '@fontsource/jetbrains-mono/500.css', '@fontsource/instrument-serif/400.css' and '@fontsource/instrument-serif/400-italic.css'; import it first in src/main.tsx. - File layout: src/content.ts (every string, option, price delta, spec row, part label, review, FAQ entry and footer fact, typed), src/lib/brand.ts (brandSlug = [BRAND] lowercased, non-alphanumerics to '-'; email = 'care@' + brandSlug without hyphens + '.com'; basePrice = the digits of [BASE_PRICE] parsed as a number), src/lib/price.ts (total and line items from a config), src/lib/useReducedMotion.ts (matchMedia hook), src/store/config.ts, src/store/cart.ts, src/store/scene.ts, src/three/ (Headphones.tsx, parts/*.tsx, materials.ts, engravingTexture.ts, knitTexture.ts, StageCanvas.tsx, Labels.tsx, useDragRotate.ts), src/components/ (Header, Stage, ConfiguratorPanel, PriceOdometer, FeatureStrip, Specs, Reviews, Faq, BuildBand, Footer, CartDrawer, MobileBuyBar). - State with zustand: config store { colorId: 'graphite', cushionId: 'leather', engraving: 'For long nights', engraveStyle: 'serif', setters }; cart store { items: CartItem[], open: boolean, add(config, thumbnail), setQty(id, n), remove(id), openDrawer(), closeDrawer() } where adding an identical config (same color, cushion, engraving text and style) increases quantity instead of adding a line; scene store { phase: 'configure' | 'inside' | 'after', setPhase } that is only written when the phase changes. Scroll progress p and explode value e are NOT React state: keep them in a mutable module object sceneRef = { p: 0, e: 0 } in src/store/scene.ts that ScrollTrigger writes and useFrame reads. - Register ScrollTrigger once in src/main.tsx (gsap.registerPlugin(ScrollTrigger)). Call ScrollTrigger.refresh() after fonts load (document.fonts.ready) and on resize; kill all triggers on unmount. - Canvas: <Canvas dpr={[1, 2]} gl={{ antialias: true, alpha: true, preserveDrawingBuffer: true }} camera={{ fov: 32, position: [0, 0.15, 6.2], near: 0.1, far: 50 }} onCreated sets gl.toneMapping = ACESFilmicToneMapping, toneMappingExposure 1.0, outputColorSpace SRGBColorSpace>. The canvas is transparent; the backdrop is CSS. Expose gl, scene and camera to the Add to cart handler through a small ref module (src/three/glRef.ts) so the snapshot can be taken outside the Canvas tree. - Never use drei Environment presets or files (they download from a CDN). Lighting is only the Lightformer rig and two lights described under Design imagery. - package.json scripts: dev 'vite', build 'tsc -b && vite build', preview 'vite preview'. ## Variables - [BRAND] — Brand name (default: "Orvane"). Invented audio brand. Used in the header wordmark, <title>, footer, support email (care@ + brandSlug without hyphens + .com) and the cart line. Never a real headphone or electronics brand. - [PRODUCT_NAME] — Product name (default: "Tern"). Short invented model name, one or two words. It is the giant H1 on the stage and appears in the price summary, cart line, part-diagram heading and build band. No real model names. - [PRODUCT_TYPE] — Product type (default: "wireless over-ear headphones"). Lowercase noun phrase. Drives the stage eyebrow, the canvas aria-label and the spec emphasis. The 3D model is always an over-ear headphone, so keep it a kind of over-ear headphone (studio, gaming, kids, travel, DJ). - [BASE_PRICE] — Base price (default: "$329"). US dollars with a $ sign, whole number. Parsed as the base price; option deltas (+$20 finish, +$15 / +$25 cushions, +$15 engraving) are added on top. Rewrite the deltas only if they look out of proportion. - [AUDIENCE] — Who it is for (default: "people who wear headphones for hours: editors, night-shift workers and remote developers"). Shapes the stage subline, feature emphasis, the three reviewers and the FAQ answers. - [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/3d-product-configurator-page in the footer (default: yes; delete this line to remove it) The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described. Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.
Pro 模板
解锁完整提示词和源码
在线演示和 DESIGN.md 仍然免费。
单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。
---
name: "3D Product Configurator Page"
colors:
paper: "#F3F1EC"
stage: "#FBFAF7"
stage_edge: "#E3DFD6"
surface: "#FFFFFF"
surface_2: "#F8F7F3"
ink: "#17181B"
muted: "#6B6A66"
line: "#DCD8CF"
line_strong: "#A9A59C"
accent_graphite_default: "#3557D4"
footer: "#17181B"
footer_text: "#ECE9E2"
typography:
display_h1_product_name_h2s_big_stat_numbers_odometer_total: { family: "Bricolage Grotesque Variable", weights: [600, 700] }
text_body_buttons_option_names_spec_values_faq: { family: "Inter Variable", weights: [400, 500, 600] }
mono_eyebrows_step_numbers_price_deltas_part_numbers_readouts_character_counter_uppercase_eyebrows_with_0_14em_tracking: { family: "JetBrains Mono", weights: [400, 500] }
engraving_style_serif_only_canvas_texture_and_its_segmented_control_label: { family: "Instrument Serif", weights: [400] }
spacing: "8px base. Container max 1200px with 48px side padding on desktop, 20px on mobile. Sections below the stage use 128px vertical padding on desktop, 80px on mobile. Configurator panel padding 24px, gap 28px between steps. Header 64px desktop, 56px mobile."
radius: "Panel and drawer 20px (drawer only on its left corners), review cards 16px, option cards and inputs 12px, buttons 999px (pill), swatches and badges fully round, part label pills 999px."
---
# 3D Product Configurator Page — Design System
Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.
## Colors
- **Paper** `#F3F1EC` — Page background, header background (at 86% with 10px backdrop blur once scrolled)
- **Stage** `#FBFAF7` — Center of the stage radial backdrop
- **Stage Edge** `#E3DFD6` — Outer edge of the stage radial backdrop; contact shadow sits on this tone
- **Surface** `#FFFFFF` — Configurator panel (at 94%), review cards, cart drawer, spec table rows
- **Surface 2** `#F8F7F3` — Input fields, inactive segmented control, odometer well, cart line thumbnail well
- **Ink** `#17181B` — Headings, body text, primary icons, label pills text
- **Muted** `#6B6A66` — Secondary text, captions, spec labels, mono eyebrows
- **Line** `#DCD8CF` — 1px borders, table rules, dividers
- **Line Strong** `#A9A59C` — 3D leader lines, input borders on hover, unselected radio rings
- **Accent (Graphite, default)** `#3557D4` — CSS var --accent. Follows the chosen finish: Chalk #96643B, Graphite #3557D4, Signal #C94A22, Lagoon #1E6F6B. Used for the Add to cart button, selected rings and borders, focus rings, star icons, cart badge, odometer underline, active part badge. Transitions over 400ms when the finish changes.
- **Footer** `#17181B` — Footer background
- **Footer Text** `#ECE9E2` — Footer text; links at 70% opacity, 100% on hover
## Typography
- **Display: H1 product name, H2s, big stat numbers, odometer total** — Bricolage Grotesque Variable (OFL), weights 600/700. Self-host the font files.
- **Text: body, buttons, option names, spec values, FAQ** — Inter Variable (OFL), weights 400/500/600. Self-host the font files.
- **Mono: eyebrows, step numbers, price deltas, part numbers, readouts, character counter (uppercase eyebrows with 0.14em tracking)** — JetBrains Mono (OFL), weights 400/500. Self-host the font files.
- **Engraving style 'Serif' only (canvas texture and its segmented-control label)** — Instrument Serif (OFL), weights 400. Self-host the font files.
## Spacing & shape
- Spacing: 8px base. Container max 1200px with 48px side padding on desktop, 20px on mobile. Sections below the stage use 128px vertical padding on desktop, 80px on mobile. Configurator panel padding 24px, gap 28px between steps. Header 64px desktop, 56px mobile.
- Radius: Panel and drawer 20px (drawer only on its left corners), review cards 16px, option cards and inputs 12px, buttons 999px (pill), swatches and badges fully round, part label pills 999px.
## Motion
- Easing tokens: --ease-out cubic-bezier(0.22, 0.61, 0.36, 1) for drawers, reveals and fades; --ease-io cubic-bezier(0.65, 0, 0.35, 1) for the FAQ accordion; GSAP 'power2.inOut' for explode curves. Nothing bounces except the 240ms cart badge pop.
- Model idle spin: yaw increases at 0.18 rad/s while phase is 'configure' and the user has not touched the canvas for 6 s; it stops immediately on pointerdown.
- Drag rotate (custom hook useDragRotate, not OrbitControls, so the page can still scroll on touch): pointer drag on the canvas wrapper sets yaw += dx × 0.008 and pitch += dy × 0.005, pitch clamped to [-0.35, 0.35] rad. On release the yaw velocity carries on and decays with velocity *= exp(-dt × 4). Wrapper has touch-action: pan-y so vertical swipes scroll the page and horizontal swipes rotate. Cursor grab / grabbing. Left and Right arrow keys rotate 15° when the wrapper is focused.
- Option changes: every material color, roughness, sheen and bump scale damps toward its target with value += (target - value) × (1 - exp(-dt × 9)), about 350ms to settle. The accent CSS variable transitions with a 400ms color transition on elements that use it.
- Price odometer: each digit is a 1em-tall overflow-hidden column of 0–9 that translates to -digit × 10% over 380ms cubic-bezier(0.2, 0.8, 0.2, 1); a 2px accent underline under the total flashes from opacity 0 to 1 and back over 500ms on change.
- Exploded view (desktop): a GSAP ScrollTrigger on #product (start 'top top', end 'bottom bottom', scrub 0.6) writes p ∈ [0, 1] to sceneRef. e = power2.inOut(clamp((p - 0.25) / 0.30)) while p < 0.55, e = 1 for 0.55 ≤ p ≤ 0.75, e = power2.inOut(1 - clamp((p - 0.75) / 0.20)) after. Each part i (0–7, in the label order) uses e_i = power2.inOut(clamp(e × 1.4 - i × 0.05, 0, 1)) so parts leave in sequence. Positions = assembled + offset × e_i, computed in useFrame.
- Phase transitions driven by p: 0–0.15 configure; 0.15–0.25 the panel and hero headline fade out and move 24px right, the model group slides from x -0.7 to x 0 and the camera dollies from z 6.2 to z 7.6; 0.25–0.75 the inside headline is visible; during 0.55–0.75 the model turns an extra 0.44 rad; 0.95–1 phase becomes 'after'. Within the inside phase the model yaw blends to -0.6 rad and pitch to 0.14 rad with weight w = smoothstep(0.15, 0.25, p) × (1 - smoothstep(0.95, 1, p)), so the user's own rotation returns when scrolling back up.
- Part labels: label i fades in (opacity and 8px rise) as e_i passes 0.6 → 1.0 and fades out in reverse; its leader line uses the same opacity.
- Reveals below the stage: elements with data-reveal start at opacity 0 and translateY(24px) and animate to rest over 700ms --ease-out when their top crosses 85% of the viewport (ScrollTrigger.batch, once), siblings staggered 80ms.
- Cart drawer: slides from translateX(100%) to 0 over 380ms --ease-out, backdrop #17181B at 0 → 35% over 300ms. Cart badge pops scale 1 → 1.25 → 1 over 240ms on add.
- Drag hint chip pulses its icon (rotate -12° → 12°, 1.6s ease-in-out, infinite) and fades out after the first drag. Scroll cue chevron bobs 6px over 2s infinite.
- prefers-reduced-motion: no idle spin, no drag inertia (rotation stops on release), option changes apply instantly, odometer swaps digits without sliding, no reveals (content visible), no bobbing or pulsing, drawer appears with a 150ms opacity fade only. The exploded view becomes a still diagram: e is a step function (e = 1 for 0.25 ≤ p ≤ 0.75, else 0) applied with no interpolation and no stagger, labels appear at full opacity together, the extra 0.44 rad turn is skipped, and the panel and headlines switch instantly at p 0.2.
## Imagery
No photos and no 3D files. The headphones are built from three.js primitives (LatheGeometry, TorusGeometry, TubeGeometry along a CatmullRomCurve3, CylinderGeometry, drei RoundedBox) with MeshPhysicalMaterial; the engraving and the knit-mesh bump pattern are CanvasTextures; swatch and cushion previews are CSS. Lighting: <Environment resolution={256} frames={1}> containing four drei Lightformers — rect, intensity 2.2, position [0, 4, 2], rotation-x π/2, scale [8, 2] (top softbox); rect, intensity 1.2, position [-5, 1, 1], rotation-y π/2, scale [2, 6] (left strip); rect, intensity 1.6, position [5, 1, -1], rotation-y -π/2, scale [2, 6] (right rim); ring, intensity 0.8, position [0, 0.5, 6], scale 3 (front fill) — plus ambientLight 0.25 and directionalLight [3, 5, 4] intensity 1.4, no shadow maps. drei <ContactShadows position={[0, -1.32, 0]} opacity={0.38} scale={6} blur={2.6} far={2.2} resolution={512} color='#2a2620'>. Stage backdrop: radial-gradient(ellipse 70% 60% at 50% 45%, #FBFAF7 0%, #ECE9E2 60%, #E3DFD6 100%). Icons are Lucide, 1.75px stroke. The model carries no logo, letters or marks except the visitor's own engraving.
## Tone
Calm, precise and practical, like a well-labeled workshop. Short sentences, real numbers, no superlatives; technical labels in mono, warmth in the reviews.
---
— Prompt by VibeFather · https://vibefather.ai/t/3d-product-configurator-page · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
3D 产品配置页模板已经内置了可用的加入购物车抽屉。当访客点击加入购物车时,会滑出一个面板,显示从 3D 画布截取的当前配置快照、数量步进器和小计。添加相同配置(即相同的表面处理、耳垫、刻字文本和刻字样式)会增加该行的数量,而不是创建重复项。所有购物车状态都保存在浏览器中;无需连接后端。
3D 产品配置页模板允许你通过变量更改品牌、产品名称、产品类型、基础价格和目标受众,提示词会相应重写选项名称、部件注释、规格、评价和 FAQ。模型本身仍是用代码绘制的头戴式耳机,具有四种双色表面处理、三种耳垫材质和出现在耳罩面板上的简短刻字。选项价格增量在内容文件中设置。
在 3D 产品配置页中,滚动时 3D 舞台保持固定,耳机拆解成八个带编号的部件并配有细引线,然后点击重新组装,随后出现功能、规格、评价和 FAQ 部分。爆炸进度由滚动位置驱动,而非 React 状态,因此保持流畅。对于偏好减少动态效果的访客,滚动和空闲旋转会关闭,爆炸视图会变成带标签的静态示意图。
不需要。3D 产品配置页完全用代码绘制头戴式耳机,包括几何体、光照、针织纹理和刻字纹理,因此无需提供照片或 3D 文件。舞台使用暖白色 CSS 背景和柔和的接触阴影,以及一个随访客所选表面处理变化的强调色。你只需设置品牌、产品名称、产品类型、基础价格和目标受众。
3D 产品配置页的商业和客户使用需要 Pro。Pro 模板会公开展示简介、技术栈和变量,完整提示词和演示的源代码随 Pro 会员提供。VibeFather 上的免费提示词和 DESIGN.md 文件仅授权用于个人、非商业用途。没有后端,因此购物车和配置都保存在访客的浏览器中。
复制本页的完整提示词(Pro),或者运行 npx vibefather add 3d-product-configurator-page,把 [BRAND]、[AUDIENCE]、[BASE_PRICE]、[PRODUCT_NAME] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。
演示由 MiniMax M4 在 MiniMax Code 里完成;另一个案例由 Claude Sonnet 5.5 在 Claude Code 里完成;另一个案例由 DeepSeek V4.1 Flash 在 DeepSeek Harness 里完成。每次都用公开的提示词原样生成,没有额外补充,可以并排比较不同模型的效果。
3D 产品配置页是一个单页网站,用 GSAP、Three.js、React 构建。提示词固定了技术栈,不同 AI 工具做出来的都是同一类项目,成品是静态网站,部署到哪里都可以。
3D 产品配置页是 Pro 模板:说明、技术栈和变量公开,完整提示词、在线演示的源码和商用授权包含在 VibeFather Pro 里,支持支付宝和微信支付。它的 DESIGN.md 个人项目可以免费用。
能。每个3D 产品配置页的演示上线前都在手机和电脑尺寸上检查过布局、字号和点击区域。可以直接用手机打开在线演示,或者在本页把预览切到手机视图看看。