跳到正文
VibeFather
免费注册

用这个模板做的 2 个案例

同一份提示词,不同的 [VARIABLES] 变量。点一个在上方预览。

关于这个模板

参数化台灯设计器是一个专注的浏览器工作区,把几个数值选择变成一盏发光、原创的灯具概念。它适合产品设计师、创客、创意工作室,以及任何喜欢在精美渲染的 3D 场景中看到因果变化的人。默认的 Loom & Ember 工作室展示的是 Strata 格栅灯,而所有名称、受众文案和界面文字都可以通过一小组变量修改。

核心不是视频,也不是静态渲染图。它是一个由代码构建的实时 Three.js 模型,带有水平圆环、交叉格栅肋条、磨砂内扩散罩,以及洒在哑光工作室地面上的暖光。高度、圆环数量、格栅密度和开口形状会立即更新几何体。访客可以环绕、缩放、在前视图和顶视图之间切换、开关灯光,或回到精心构图的相机位置。三个预设提供不同的起点,但不会取代手动控制。

深绿色工作区、紧凑的等宽字体测量值和克制的桃色高光,让注意力始终集中在物体上。在移动端,预览和控制区会重新排布为适合触摸的操作顺序,而不是把桌面界面硬塞进去。

导出操作完全在浏览器中生成一张精美的 PNG 规格表。它把当前渲染视图与尺寸、圆环和肋条数量、开口设置、预设名称,以及所选的品牌和产品组合在一起。无需账号、服务器、外部 API 或制造文件。这张表明确是概念摘要,不是工程图纸。

要改编这个模板,可以修改内容变量、调整配色或预设值,并把几何逻辑保留在它专用的模块里。最终得到一个自包含的交互工具,有清晰的视觉核心和令人满意、实用的输出。

模板提示词

在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。

# Parametric Lamp Designer

Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.

## Brief
Build an original single-page parametric lamp studio for [BRAND], presenting [PRODUCT_NAME] in a real-time Three.js workspace. The default brand is Loom & Ember and the default product is Strata Lattice Lamp. The page is a working design tool, not a marketing landing page: a rich, glowing 3D lamp fills the main viewport while precise controls sit in a compact rail. Four sliders regenerate the lattice immediately, three presets offer starting points, and Export spec creates a polished PNG concept sheet locally.

- Audience: Design for [AUDIENCE], by default independent lighting designers and hands-on makers. The interface should feel approachable to a curious first-time visitor while giving experienced designers exact values, predictable controls, and a useful exported summary.
- Goal: Let a visitor shape an original lattice table lamp, inspect it from any angle, compare preset silhouettes, switch the warm internal light on or off, and download a PNG specification sheet that faithfully represents the current settings. Every control must work entirely on the client with no sign-in or network dependency.
- Tone: A quiet, precise design workshop: deep botanical greens, warm peach illumination, crisp measurements, restrained motion, and succinct functional copy. The lamp is sculptural and contemporary, with no architectural, cultural, or brand-specific motifs.

## Stack
- Framework: Vite 5 + React 18 + TypeScript
- Styling: Vanilla CSS
- Libraries: three (MIT), lucide-react (ISC), @fontsource/space-grotesk (OFL-1.1), @fontsource/ibm-plex-mono (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - Configure Vite with base './' and build.sourcemap set to false; the build script runs tsc && vite build and emits only static production files to dist/.
  - Use Three.js directly inside a React LampViewer component and import OrbitControls from three/examples/jsm/controls/OrbitControls.js; do not add a second 3D framework.
  - Self-host Space Grotesk and IBM Plex Mono through the listed Fontsource packages, importing only weights 400, 500, 600, and 700 as needed.
  - Keep all variable values, interface copy, preset descriptions, accessibility labels, and export-sheet copy in src/content.ts. Rewrite product-specific copy naturally when variable values change; never leave default brand or product text behind.
  - Separate responsibilities into src/App.tsx for state and layout, src/components/LampViewer.tsx for rendering, src/lib/lampGeometry.ts for parametric geometry, src/lib/specSheet.ts for PNG generation, and src/styles.css for the visual system.
  - Create ASSETS.md listing Space Grotesk and IBM Plex Mono as OFL fonts, Lucide as ISC, and Three.js as MIT; state that all lamp and environmental visuals are generated in code and that no raster image assets are used.

## Variables
- [BRAND] — Studio brand (default: "Loom & Ember"). Invented studio name used in the header, specification sheet, footer, and download filename.
- [PRODUCT_NAME] — Lamp product name (default: "Strata Lattice Lamp"). Name of the current lamp family, used in the project title, canvas description, and export.
- [AUDIENCE] — Intended audience (default: "independent lighting designers and hands-on makers"). Lowercase phrase that fits after 'A concept workspace for'.
- [TAGLINE] — Workspace tagline (default: "Shape light, one line at a time."). One short sentence shown beneath the control-panel heading.
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/parametric-lamp-designer 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.

## Design
### Colors
- Canvas `#111714` — Full-page and WebGL background
- Panel `#18211C` — Control rail and header surfaces
- Raised `#222D26` — Preset cards, input tracks, and floating viewport tools
- Border `#354238` — One-pixel dividers and control outlines
- Text `#F1F4EE` — Primary labels and numeric values
- Muted `#9DABA1` — Secondary copy and measurement units
- Glow `#FFB080` — Warm lamp light, active slider fill, and primary export action
- Sage `#B9D5BE` — Focus rings, active preset accents, and success feedback
- Sheet `#EEF2ED` — Pale sage background of the exported PNG specification sheet

### Typography
- Interface, brand, and specification headings: Space Grotesk (OFL), weights 400/500/600/700
- Slider values, dimensions, status labels, and specification data: IBM Plex Mono (OFL), weights 400/500

### Layout & motion
- Spacing: Use a 4px base unit with 8px control gaps, 16px card padding, 20px rail section gaps, and 24px major separations. Desktop header is 68px high, left control rail is 320px wide, and the viewport consumes all remaining width. Keep the complete primary workspace visible at 1440×900 without page scrolling.
- Radius: Use 16px for the viewport and preset cards, 10px for buttons and parameter groups, 6px for small value chips, and fully rounded tracks and toggles. Avoid excessive pill-shaped containers.
- Motion: Rebuild changed lamp geometry on the next animation frame after each slider input; values and active states update immediately with no Apply button.
- Motion: Use OrbitControls with damping factor 0.07 when motion is allowed, no auto-rotation, no idle camera movement, and no decorative page transitions.
- Motion: Preset selection changes geometry in one frame and crossfades the active-card border and warm glow over 160ms; camera movement is limited to explicit Front, Top, and Reset view actions.
- Motion: Slider thumbs and buttons use 120ms hover and focus transitions. Under prefers-reduced-motion, remove damping and all nonessential transitions while preserving instant functional updates.
- Imagery: The hero and only major visual is a rich, code-generated WebGL studio scene: an original open-lattice lamp with crossing ribs, horizontal contour rings, a low circular plinth, a translucent inner diffuser, warm light on a matte floor, and a faint technical grid. No photographs, stock renders, downloaded models, HDRIs, logos, people, or image placeholders are used. On mobile the live viewport remains the first large visual and is never replaced by a static screenshot.

## Pages & Sections
### Live Parametric Lamp Workspace (`index.html`)
1. **App header and project identity** — A slim top bar shows a small original three-line lattice glyph drawn with inline SVG, [BRAND] (Loom & Ember by default), and a divider followed by [PRODUCT_NAME] (Strata Lattice Lamp by default). Center a muted PROJECT 01 label. Right-side actions are a ghost Reset button and a peach Download icon button labeled Export spec. Reset restores the Ripple preset, all four default parameters, light on, and the initial camera; it does not reload the page.
   Layout: Use a 68px full-width header with 20px horizontal padding, a 16px brand glyph, and 12px action gaps. Keep Export spec visible at every width. Below 760px, use a 56px sticky header, hide PROJECT 01 and the product suffix, shorten Reset to an accessible icon button, and retain the text Export on the primary action.
   Motion: Buttons brighten over 120ms. A successful reset shows the status message Ripple restored in the footer and an aria-live toast for 1.8 seconds.
2. **Parameter control rail** — Start with the eyebrow LAMP BUILDER, the heading Shape the light, and [TAGLINE] (Shape light, one line at a time. by default). Four labeled range controls are Height, Rings, Lattice density, and Opening shape. Height ranges 180–420 mm in steps of 5 and defaults to 280 mm. Rings ranges 4–16 in steps of 1 and defaults to 9. Lattice density ranges 12–48 ribs per direction in steps of 2 and defaults to 28; its helper reads 56 crossing ribs at the default. Opening shape ranges 0–100 in steps of 1 and defaults to 20, with Circle at the left and Soft square at the right; show Circle below 20, Rounded from 20–69, and Soft square from 70 upward alongside the numeric value. Every input updates the model on input, and each label has an associated monospaced output value.
   Layout: Place this rail left of the viewport with 20px padding. Each parameter occupies an 80px group: label and value on one row, a 4px custom range track below, and small endpoint or helper text. Use native keyboard-accessible range inputs with a 24px visual thumb and at least a 44px touch target. At mobile widths, move the complete rail below the preview in document flow, use 16px padding, and keep all four controls visible rather than hiding them in accordions.
   Motion: Fill the track left of the thumb with Glow peach. Schedule geometry regeneration with requestAnimationFrame so rapid drag events coalesce, and dispose replaced geometries before adding the new mesh group.
3. **Live 3D lamp studio** — Render [PRODUCT_NAME] from geometry, never a model file. Use 100mm as one scene unit. Set a low plinth of radius 0.94 and height 0.18 at y=0.09. For the shade, let t run from 0 at the base to 1 at Height/100 above it and define radius r(t)=0.72+0.18*sin(π*t)-0.10*t. Build the requested number of closed horizontal rings evenly from t=0 to t=1 with 0.018-unit tubing. Build two crossing families of diagonal ribs, with Lattice density curves in each direction (2N total), using θ=2π*i/N±0.34*t and 0.012-unit tubing. Map every circular contour through a superellipse with exponent n=2+2*(Opening shape/100): x=r*sign(cosθ)*abs(cosθ)^(2/n), z=r*sign(sinθ)*abs(sinθ)^(2/n). Use CatmullRomCurve3 and TubeGeometry for both closed rings and ribs so the opening control genuinely changes the mesh. The result is one open, gently belled lattice surface, not concentric walls or a building. Add an inner frosted cylinder of radius 0.30 reaching 70% of the shade height. Use MeshStandardMaterial with color #DDE7DF for ribs and rings, roughness 0.58, and metalness 0.05. The diffuser uses color #F6D6B8, emissive #FF9C62, emissiveIntensity 1.4 when lit, opacity 0.48, and depthWrite false. Add a warm PointLight inside, a soft directional key, hemisphere fill, a matte floor receiving shadows, subtle grid lines, and fog matching Canvas.
   Layout: The viewport fills the remaining workspace with a 16px outer margin and a 16px radius. Set camera FOV 34, near 0.1, far 100, initial position (4.2,3.1,5.2), and target the shade midpoint. Cap pixel ratio at 2, use sRGB output, ACES filmic tone mapping, exposure 1.1, antialiasing, and soft shadows. Top-left overlays read LIVE PREVIEW and Warm 2700 K. Top-right controls are Light on/off, Front, Top, and Reset view. Bottom-left helper reads Drag to orbit · Scroll to zoom; bottom-right shows the calculated maximum diameter and total rib count. On mobile, place the viewport before the rail at 390px high with compact controls that wrap without covering the lamp.
   Motion: OrbitControls enables rotate and zoom, disables pan, limits distance to 3–10, and prevents moving below the floor. Front and Top buttons set deterministic cameras; Reset view restores the initial composition. Changing height recenters only the orbit target and preserves the visitor's chosen angle. The light toggle switches the point light and diffuser emissive intensity between 1.4 and 0.08 without moving the model.
4. **Preset style library** — Below the parameters, label the group QUICK START and add the line Three silhouettes. Yours to adjust. Ripple defaults to Height 280, Rings 9, Density 28, Opening 20 and the description Balanced and open. Halo uses Height 220, Rings 12, Density 36, Opening 0 and Compact and dense. Weave uses Height 340, Rings 7, Density 20, Opening 75 and Tall and airy. Selecting a preset updates every slider, the mesh, the active-card state, and the export data. Manual slider changes keep the last preset name as the starting point but append Custom to its label until another preset is chosen.
   Layout: Use one column of three compact cards in the 320px rail. Each card has a tiny original line-icon silhouette generated from the same contour math, name and description at left, and four compact parameter values beneath. Active cards use a Sage border and a small check icon; inactive cards use Raised green with a Border outline. On mobile, use a three-column grid with cards at least 104px wide, hiding only the secondary descriptions at 390px while keeping names and values readable.
   Motion: Active-card border and background crossfade over 160ms. Geometry changes immediately, with no carousel, auto-cycling, or animated camera flight.
5. **PNG specification export** — Export spec generates a 1600×1000 PNG entirely in an offscreen 2D canvas. Use the Sheet background, a dark ink header with [BRAND] and [PRODUCT_NAME], and the section title Concept specification. Render the Three.js scene synchronously, copy the current view into a 960×700 image area on the left, and place a clean data column on the right with Height, Estimated maximum diameter, Horizontal rings, Ribs per direction, Total crossing ribs, Opening shape, Light temperature 2700 K, and the selected preset or Custom label. Footer copy reads A concept workspace for [AUDIENCE]. and Concept summary only — not a fabrication-ready engineering drawing. Generate the filename by slugifying the current [BRAND] and [PRODUCT_NAME], then appending -spec.png. Trigger a local download and announce Spec sheet exported. No SVG, STL, PDF, account, upload, or server export is offered.
   Layout: The exported sheet uses 64px outer margins, a 96px header, a 32px gap between preview and data, 14px monospaced labels, 22px values, and thin sage dividers. Match the current model and parameters exactly. In the app, the export button enters a brief Preparing… disabled state while drawing, then returns to Export spec; failures show a readable inline error rather than throwing an uncaught exception.
   Motion: No modal or animated progress sequence. Use a 1.8-second aria-live success toast after the download begins.
6. **Workspace status footer** — A restrained footer within the app shell shows Geometry ready with a small Sage status dot, the current mesh group count, A concept workspace for [AUDIENCE]., and the optional [CREDIT] link. The screen-reader canvas label identifies [PRODUCT_NAME] and summarizes the current height, rings, density, and opening. All icon-only buttons have accessible names, focus indicators use Sage, and every operation is available by keyboard except free-form pointer orbiting, which has deterministic Front, Top, and Reset view alternatives.
   Layout: Use a 32px desktop status row with 20px horizontal padding, small monospaced text, and flexible spacing. On mobile, stack the audience line and status into two short rows below the control rail without covering content. Maintain at least 4.5:1 contrast for functional text and zero horizontal overflow at 390×844.
   Motion: Only the status dot changes between busy and ready states; there is no pulsing, blinking, or perpetual animation.

## Assets
- image: Generate the lamp, plinth, diffuser, floor, grid, shadows, preset silhouettes, and brand glyph entirely with Three.js and original inline SVG or Canvas code. Do not download or create raster image assets; the first-screen visual anchor is the interactive WebGL viewport.
- icon: Use locally bundled lucide-react icons for Download, RotateCcw, Sun, SunDim, Check, Box, and SlidersHorizontal. Do not use brand logos, third-party icon images, or recognizable product marks.
- font: Self-host Space Grotesk weights 400, 500, 600, and 700 with @fontsource/space-grotesk; record the package and OFL license in ASSETS.md.
- font: Self-host IBM Plex Mono weights 400 and 500 with @fontsource/ibm-plex-mono; record the package and OFL license in ASSETS.md.

## Don'ts
- Do not copy the reference prompt, wording, code, images, model geometry, textures, interface, or any distinctive architectural design.
- Do not use Tulou or other building silhouettes, concentric architectural walls, arched doorways, tapered roofs, cultural ornaments, or decorative motifs from the inspiration.
- Do not use the reference's bone-white, charcoal, and amber palette as a set; retain the specified botanical green, sage, and peach system instead.
- Do not mention or display Kimi, Moonshot AI, or any other external brand inside the generated site, and do not create logos or icons resembling theirs.
- Do not use real people, recognizable products, stock photography, downloaded 3D models, HDRIs, placeholder-image services, or externally hosted assets.
- Do not replace the parametric mesh with a static render, video, canned animation, or fixed model; all four sliders must visibly and mathematically alter the current lamp.
- Do not add a backend, account system, database, API route, remote form, analytics, third-party API, external font request, CDN script, or CDN stylesheet.
- Do not claim the concept is fabrication-ready and do not add STL, 3D-printing, manufacturing, pricing, commerce, or certification features.
- Do not hard-code default brand or product copy outside src/content.ts, and do not leave Loom & Ember or Strata Lattice Lamp visible when variables change.
- Do not display dates, member counts, fake measurements beyond the calculated model dimensions, or claims about saved cloud projects.
- Do not introduce SEO metadata blocks, structured data, sitemaps, marketing sections, or extra pages; use only a plain document title containing [BRAND] and [PRODUCT_NAME] plus a simple local favicon.
- Do not emit source maps, copy src/ into dist/, exceed 20 MB, use bare-directory links, or require a server rewrite; the only page is index.html and all production assets use relative paths.
- Do not allow continuous auto-rotation, excessive glow bloom, unreadable text over the canvas, horizontal mobile overflow, or controls that ignore prefers-reduced-motion.
- Do not leak GPU resources: dispose replaced geometries and materials, cancel animation frames and remove observers on unmount, and avoid uncaught WebGL or export errors.

---
Inspired by Parametric Lamp Designer — https://www.kimi.com/showcases/3dmake
— Prompt by VibeFather · https://vibefather.ai/t/parametric-lamp-designer · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# 参数化灯具设计器(Parametric Lamp Designer)

完全按照以下描述构建此网站。将 [VARIABLES] 替换为你自己的值;其余内容保持不变。

## 简介
为 [BRAND] 构建一个原创的单页参数化灯具工作室,在实时 Three.js 工作区中展示 [PRODUCT_NAME]。默认品牌为 Loom & Ember,默认产品为 Strata Lattice Lamp。该页面是一个可用的设计工具,而非营销落地页:一盏富有光泽的 3D 灯具占据主视口,精确的控制项位于紧凑的侧栏中。四个滑块可即时重新生成格栅,三个预设提供起点,Export spec 可在本地生成一张精美的 PNG 概念图。

- 受众:为 [AUDIENCE] 而设计,默认为独立照明设计师和动手实践的制作爱好者。界面应对充满好奇的首次访客保持亲和,同时为经验丰富的设计师提供精确数值、可预测的控制项和有用的导出摘要。
- 目标:让访客塑造一盏原创的格栅台灯,从任意角度查看它,比较预设轮廓,开启或关闭温暖的内部灯光,并下载一张忠实呈现当前设置的 PNG 规格图。每个控制项都必须完全在客户端运行,无需登录或网络依赖。
- 基调:一个安静、精确的设计工坊:深植物绿、温暖桃色照明、清晰的测量、克制的动效,以及简洁的功能性文案。灯具具有雕塑感和当代感,不包含建筑、文化或品牌特定的母题。

## 技术栈
- 框架:Vite 5 + React 18 + TypeScript
- 样式:原生 CSS
- 库:three(MIT)、lucide-react(ISC)、@fontsource/space-grotesk(OFL-1.1)、@fontsource/ibm-plex-mono(OFL-1.1)
- 构建:`npm run build` → `dist/` 中的静态文件。无后端、无服务器代码、无外部 API。
- 设置:
  - 将 Vite 配置为 base './',并将 build.sourcemap 设为 false;构建脚本运行 tsc && vite build,并且只向 dist/ 输出静态生产文件。
  - 在 React 的 LampViewer 组件中直接使用 Three.js,并从 three/examples/jsm/controls/OrbitControls.js 导入 OrbitControls;不要添加第二个 3D 框架。
  - 通过列出的 Fontsource 包自托管 Space Grotesk 和 IBM Plex Mono,仅按需导入 400、500、600 和 700 字重。
  - 将所有变量值、界面文案、预设描述、无障碍标签和导出表文案保留在 src/content.ts 中。当变量值变化时,自然地重写产品特定文案;绝不要留下默认品牌或产品文本。
  - 将职责分离到 src/App.tsx(用于状态和布局)、src/components/LampViewer.tsx(用于渲染)、src/lib/lampGeometry.ts(用于参数化几何)、src/lib/specSheet.ts(用于 PNG 生成)和 src/styles.css(用于视觉系统)。
  - 创建 ASSETS.md,将 Space Grotesk 和 IBM Plex Mono 列为 OFL 字体,Lucide 列为 ISC,Three.js 列为 MIT;说明所有灯具和环境视觉均在代码中生成,且不使用任何栅格图像资源。

## 变量
- [BRAND] — 工作室品牌(默认:“Loom & Ember”)。虚构的工作室名称,用于页眉、规格表、页脚和下载文件名。
- [PRODUCT_NAME] — 灯具产品名称(默认:“Strata Lattice Lamp”)。当前灯具系列的名称,用于项目标题、画布描述和导出。
- [AUDIENCE] — 目标受众(默认:“independent lighting designers and hands-on makers”)。小写短语,适合放在 'A concept workspace for' 之后。
- [TAGLINE] — 工作区标语(默认:“Shape light, one line at a time.”)。显示在控制面板标题下方的一句简短句子。
- [CREDIT] — 在页脚保留一个小型“Template by VibeFather”链接,指向 https://vibefather.ai/t/parametric-lamp-designer(默认:是;删除此行即可移除)

页面与区块下的文案是为默认值编写的。如果你的值不同,请为它们重写每个标题、段落、标签和图片——保持相同的长度、语气和结构。布局、颜色、字体和动效保持所述不变。
将所有文案、图片路径和链接放在一个内容文件中(例如 `src/content.ts`),按区块作为键,以便之后无需改动组件即可替换内容。

## 设计
### 颜色(Colors)
- 画布(Canvas)`#111714` — 全页面和 WebGL 背景
- 面板(Panel)`#18211C` — 控制栏和头部表面
- 凸起(Raised)`#222D26` — 预设卡片、输入轨道和浮动视口工具
- 边框(Border)`#354238` — 一像素分隔线和控件轮廓
- 文本(Text)`#F1F4EE` — 主标签和数值
- 弱化(Muted)`#9DABA1` — 次要文案和测量单位
- 辉光(Glow)`#FFB080` — 暖灯光、活动滑块填充和主导出操作
- 鼠尾草绿(Sage)`#B9D5BE` — 焦点环、活动预设强调和成功反馈
- 纸张(Sheet)`#EEF2ED` — 导出的 PNG 规格表的浅鼠尾草绿背景

### 排版
- 界面、品牌和规格标题:Space Grotesk(OFL),字重 400/500/600/700
- 滑块数值、尺寸、状态标签和规格数据:IBM Plex Mono(OFL),字重 400/500

### 布局与动效
- 间距:使用 4px 基准单位,控件间距 8px,卡片内边距 16px,栏区段间距 20px,主要分隔 24px。桌面端头部高 68px,左侧控制栏宽 320px,视口占据所有剩余宽度。在 1440×900 下保持完整主工作区可见,无需页面滚动。
- 圆角:视口和预设卡片使用 16px,按钮和参数组使用 10px,小数值芯片使用 6px,轨道和开关使用全圆角。避免过度使用胶囊形容器。
- 动效:每次滑块输入后,在下一动画帧重建变更的灯具几何体;数值和活动状态立即更新,无 Apply 按钮。
- 动效:允许动效时使用 OrbitControls,阻尼系数 0.07,无自动旋转,无空闲相机移动,无装饰性页面过渡。
- 动效:预设选择在一帧内改变几何体,并在 160ms 内交叉淡入活动卡片边框和暖辉光;相机移动仅限于显式的 Front、Top 和 Reset 视图操作。
- 动效:滑块拇指和按钮使用 120ms 悬停和焦点过渡。在 prefers-reduced-motion 下,移除阻尼和所有非必要过渡,同时保留即时功能更新。
- 图像:主视觉和唯一主要视觉是一个丰富的、代码生成的 WebGL 工作室场景:一个原创的开放式格架灯具,带有交叉肋条、水平轮廓环、低矮圆形底座、半透明内部漫射器、哑光地板上的暖光,以及微弱的技术网格。不使用照片、库存渲染、下载模型、HDRI、标志、人物或图像占位符。在移动端,实时视口仍是第一个大视觉,且永远不会被静态截图替代。

## 页面与区块
### 实时参数化灯具工作区(`index.html`)
1. **应用页头与项目标识** — 一条纤细的顶栏展示一个用内联 SVG 绘制的小型原创三线格栅图标、[BRAND](默认为 Loom & Ember),以及一个分隔符,后接 [PRODUCT_NAME](默认为 Strata Lattice Lamp)。居中放置一个低调的 PROJECT 01 标签。右侧操作是一个幽灵样式 Reset 按钮和一个桃色 Download 图标按钮,标签为 Export spec。Reset 会恢复 Ripple 预设、全部四个默认参数、灯光开启状态以及初始相机;它不会重新加载页面。
   布局:使用 68px 全宽页头,水平内边距 20px,品牌图标 16px,操作间距 12px。在所有宽度下都保持 Export spec 可见。低于 760px 时,使用 56px 粘性页头,隐藏 PROJECT 01 和产品后缀,将 Reset 缩短为可访问的图标按钮,并在主操作上保留文本 Export。
   动效:按钮在 120ms 内变亮。成功重置后,在页脚显示状态消息 Ripple restored,并显示一个持续 1.8 秒的 aria-live toast。
2. **参数控制栏** — 以眉题 LAMP BUILDER、标题 Shape the light 和 [TAGLINE](默认为 Shape light, one line at a time.)开头。四个带标签的范围控件分别是 Height、Rings、Lattice density 和 Opening shape。Height 范围为 180–420 mm,步长 5,默认 280 mm。Rings 范围为 4–16,步长 1,默认 9。Lattice density 范围为每个方向 12–48 条肋,步长 2,默认 28;其辅助文本在默认值下显示 56 crossing ribs。Opening shape 范围为 0–100,步长 1,默认 20,左端为 Circle,右端为 Soft square;在数值旁显示:低于 20 显示 Circle,20–69 显示 Rounded,70 及以上显示 Soft square。每个输入在 input 时更新模型,每个标签都有一个关联的等宽输出值。
   布局:将此栏放在视口左侧,内边距 20px。每个参数占据一个 80px 分组:标签和值在同一行,下方是 4px 自定义范围轨道,以及小的端点或辅助文本。使用原生键盘可访问的范围输入,视觉滑块为 24px,触摸目标至少 44px。在移动端宽度下,将整个栏按文档流移到预览下方,使用 16px 内边距,并保持全部四个控件可见,而不是将它们隐藏在折叠面板中。
   动效:用 Glow peach 填充滑块左侧的轨道。使用 requestAnimationFrame 调度几何体重建,以便快速拖动事件合并,并在添加新网格组之前释放被替换的几何体。
3. **实时 3D 灯具工作室** — 从几何体渲染 [PRODUCT_NAME],绝不使用模型文件。使用 100mm 作为一个场景单位。在 y=0.09 处设置一个半径为 0.94、高度为 0.18 的低矮底座。对于灯罩,令 t 从底部的 0 到其上方 Height/100 处的 1,并定义半径 r(t)=0.72+0.18*sin(π*t)-0.10*t。从 t=0 到 t=1 均匀构建所需数量的闭合水平环,管径 0.018 单位。构建两个交叉的对角肋族,每个方向按 Lattice density 弯曲(共 2N 条),使用 θ=2π*i/N±0.34*t 和 0.012 单位管径。将每条圆形轮廓通过指数 n=2+2*(Opening shape/100) 的超椭圆映射:x=r*sign(cosθ)*abs(cosθ)^(2/n),z=r*sign(sinθ)*abs(sinθ)^(2/n)。对闭合环和肋都使用 CatmullRomCurve3 和 TubeGeometry,使开口控件真正改变网格。结果是一个开放的、轻微外扩的格栅表面,而不是同心墙或建筑。添加一个半径为 0.30 的内磨砂圆柱,达到灯罩高度的 70%。对肋和环使用 MeshStandardMaterial,颜色 #DDE7DF,粗糙度 0.58,金属度 0.05。漫射器使用颜色 #F6D6B8,自发光 #FF9C62,点亮时 emissiveIntensity 为 1.4,不透明度 0.48,depthWrite 为 false。在内部添加一个暖色 PointLight、一个柔和的方向主光、半球补光、一个接收阴影的哑光地板、细微网格线,以及与 Canvas 匹配的雾。
   布局:视口填充剩余工作区,外边距 16px,圆角 16px。设置相机 FOV 34,near 0.1,far 100,初始位置 (4.2,3.1,5.2),目标为灯罩中点。像素比上限为 2,使用 sRGB 输出、ACES 电影色调映射、曝光 1.1、抗锯齿和柔和阴影。左上角叠加文本为 LIVE PREVIEW 和 Warm 2700 K。右上角控件为 Light on/off、Front、Top 和 Reset view。左下角辅助文本为 Drag to orbit · Scroll to zoom;右下角显示计算出的最大直径和总肋数。在移动端,将视口放在栏之前,高度 390px,紧凑控件可换行且不遮挡灯具。
   动效:OrbitControls 启用旋转和缩放,禁用平移,距离限制为 3–10,并防止移动到地板以下。Front 和 Top 按钮设置确定性相机;Reset view 恢复初始构图。更改高度时仅重新居中轨道目标,并保留访问者选择的角度。灯光开关在 1.4 和 0.08 之间切换点光源和漫射器自发光强度,而不移动模型。
4. **预设样式库** — 在参数下方,将组标记为 QUICK START,并添加一行 Three silhouettes. Yours to adjust.。Ripple 默认为 Height 280、Rings 9、Density 28、Opening 20,描述为 Balanced and open。Halo 使用 Height 220、Rings 12、Density 36、Opening 0,描述为 Compact and dense。Weave 使用 Height 340、Rings 7、Density 20、Opening 75,描述为 Tall and airy。选择预设会更新每个滑块、网格、活动卡片状态和导出数据。手动更改滑块会保留上一个预设名称作为起点,但在其标签后追加 Custom,直到选择另一个预设。
   布局:在 320px 栏中使用一列三张紧凑卡片。每张卡片有一个由相同轮廓数学生成的小型原创线图标剪影,左侧为名称和描述,下方为四个紧凑参数值。活动卡片使用 Sage 边框和一个小勾选图标;非活动卡片使用 Raised green 和 Border 轮廓。在移动端,使用三列网格,卡片至少 104px 宽,在 390px 时仅隐藏次要描述,同时保持名称和值可读。
   动效:活动卡片的边框和背景在 160ms 内交叉淡入淡出。几何体立即变化,没有轮播、自动循环或动画相机飞行。
5. **PNG 规格导出** — Export spec 完全在离屏 2D canvas 中生成 1600×1000 PNG。使用 Sheet 背景、带有 [BRAND] 和 [PRODUCT_NAME] 的深色墨水页头,以及区块标题 Concept specification。同步渲染 Three.js 场景,将当前视图复制到左侧 960×700 的图像区域,并在右侧放置一个干净的数据列,包含 Height、Estimated maximum diameter、Horizontal rings、Ribs per direction、Total crossing ribs、Opening shape、Light temperature 2700 K,以及所选预设或 Custom 标签。页脚文案为 A concept workspace for [AUDIENCE]. 和 Concept summary only — not a fabrication-ready engineering drawing.。通过将当前 [BRAND] 和 [PRODUCT_NAME] 转换为 slug,然后追加 -spec.png 来生成文件名。触发本地下载并播报 Spec sheet exported.。不提供 SVG、STL、PDF、账户、上传或服务器导出。
   布局:导出的图纸使用 64px 外边距、96px 页头、预览和数据之间 32px 间距、14px 等宽标签、22px 值,以及细鼠尾草色分隔线。精确匹配当前模型和参数。在应用中,导出按钮在绘制时进入短暂的 Preparing… 禁用状态,然后返回 Export spec;失败时显示可读的内联错误,而不是抛出未捕获异常。
   动效:没有模态框或动画进度序列。下载开始后使用 1.8 秒的 aria-live 成功 toast。
6. **工作区状态页脚** — 应用外壳内一个克制的页脚显示 Geometry ready 和一个小型 Sage 状态点、当前网格组数量、A concept workspace for [AUDIENCE].,以及可选的 [CREDIT] 链接。屏幕阅读器 canvas 标签标识 [PRODUCT_NAME],并概括当前高度、环数、密度和开口。所有仅图标按钮都有可访问名称,焦点指示器使用 Sage,除自由指针轨道外,每项操作都可通过键盘使用,而自由指针轨道有确定性的 Front、Top 和 Reset view 替代方案。
   布局:使用 32px 桌面状态行,水平内边距 20px,小型等宽文本,以及灵活间距。在移动端,将受众行和状态堆叠为控制栏下方的两个短行,不遮挡内容。保持功能文本至少 4.5:1 对比度,并在 390×844 下零水平溢出。
   动效:只有状态点在忙碌和就绪状态之间变化;没有脉冲、闪烁或永久动画。

## 资产(Assets)
- 图像(image):完全使用 Three.js 和原创的内联 SVG 或 Canvas 代码生成灯具(lamp)、基座(plinth)、漫射器(diffuser)、地面(floor)、网格(grid)、阴影(shadows)、预设剪影(preset silhouettes)和品牌字形(brand glyph)。不要下载或创建栅格图像资产;首屏视觉锚点是可交互的 WebGL 视口(viewport)。
- 图标(icon):使用本地打包的 lucide-react 图标,包括 Download、RotateCcw、Sun、SunDim、Check、Box 和 SlidersHorizontal。不要使用品牌标志、第三方图标图像或可识别的产品标识。
- 字体(font):使用 @fontsource/space-grotesk 自托管 Space Grotesk 字重 400、500、600 和 700;在 ASSETS.md 中记录包和 OFL 许可证。
- 字体(font):使用 @fontsource/ibm-plex-mono 自托管 IBM Plex Mono 字重 400 和 500;在 ASSETS.md 中记录包和 OFL 许可证。

## 禁止事项
- 不要复制参考提示词、措辞、代码、图像、模型几何结构、纹理、界面或任何有辨识度的建筑设计。
- 不要使用土楼或其他建筑轮廓、同心建筑墙体、拱形门洞、锥形屋顶、文化装饰或灵感来源中的装饰图案。
- 不要将参考中的骨白色、炭黑色和琥珀色调作为一套配色使用;应保留指定的植物绿(botanical green)、鼠尾草绿(sage)和蜜桃色(peach)体系。
- 不要在生成的网站内提及或展示 Kimi、Moonshot AI 或任何其他外部品牌,也不要创建与其相似的标志或图标。
- 不要使用真实人物、可识别的产品、图库照片、下载的 3D 模型、HDRI、占位图服务或外部托管的资源。
- 不要用静态渲染、视频、预设动画或固定模型替代参数化网格;四个滑块都必须以可见且数学上可验证的方式改变当前灯具。
- 不要添加后端、账户系统、数据库、API 路由、远程表单、分析、第三方 API、外部字体请求、CDN 脚本或 CDN 样式表。
- 不要声称该概念可直接用于制造,也不要添加 STL、3D 打印、制造、定价、商业或认证功能。
- 不要在 src/content.ts 之外硬编码默认品牌或产品文案,并且当变量变化时,不要使 Loom & Ember 或 Strata Lattice Lamp 仍然可见。
- 不要显示日期、成员数量、超出计算模型尺寸的虚假测量值,或关于云端保存项目的声明。
- 不要引入 SEO 元数据块、结构化数据、站点地图、营销区块或额外页面;只使用包含 [BRAND] 和 [PRODUCT_NAME] 的纯文档标题,以及一个简单的本地 favicon。
- 不要生成 source map、将 src/ 复制到 dist/、超过 20 MB、使用裸目录链接或要求服务器重写;唯一的页面是 index.html,所有生产资源都使用相对路径。
- 不要允许持续自动旋转、过度的辉光泛光、画布上不可读的文字、移动端水平溢出,或忽略 prefers-reduced-motion 的控件。
- 不要泄漏 GPU 资源:释放被替换的几何体和材质,在卸载时取消动画帧并移除观察器,并避免未捕获的 WebGL 或导出错误。

---
Inspired by Parametric Lamp Designer — https://www.kimi.com/showcases/3dmake
— Prompt by VibeFather · https://vibefather.ai/t/parametric-lamp-designer · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

个人项目可免费使用(CC BY-NC 4.0)。 商业用途需要 Pro.

DESIGN.md

单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。

---
name: "Parametric Lamp Designer"
colors:
  canvas: "#111714"
  panel: "#18211C"
  raised: "#222D26"
  border: "#354238"
  text: "#F1F4EE"
  muted: "#9DABA1"
  glow: "#FFB080"
  sage: "#B9D5BE"
  sheet: "#EEF2ED"
typography:
  interface_brand_and_specification_headings: { family: "Space Grotesk", weights: [400, 500, 600, 700] }
  slider_values_dimensions_status_labels_and_specification_data: { family: "IBM Plex Mono", weights: [400, 500] }
spacing: "Use a 4px base unit with 8px control gaps, 16px card padding, 20px rail section gaps, and 24px major separations. Desktop header is 68px high, left control rail is 320px wide, and the viewport consumes all remaining width. Keep the complete primary workspace visible at 1440×900 without page scrolling."
radius: "Use 16px for the viewport and preset cards, 10px for buttons and parameter groups, 6px for small value chips, and fully rounded tracks and toggles. Avoid excessive pill-shaped containers."
---

# Parametric Lamp Designer — 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
- **Canvas** `#111714` — Full-page and WebGL background
- **Panel** `#18211C` — Control rail and header surfaces
- **Raised** `#222D26` — Preset cards, input tracks, and floating viewport tools
- **Border** `#354238` — One-pixel dividers and control outlines
- **Text** `#F1F4EE` — Primary labels and numeric values
- **Muted** `#9DABA1` — Secondary copy and measurement units
- **Glow** `#FFB080` — Warm lamp light, active slider fill, and primary export action
- **Sage** `#B9D5BE` — Focus rings, active preset accents, and success feedback
- **Sheet** `#EEF2ED` — Pale sage background of the exported PNG specification sheet

## Typography
- **Interface, brand, and specification headings** — Space Grotesk (OFL), weights 400/500/600/700. Self-host the font files.
- **Slider values, dimensions, status labels, and specification data** — IBM Plex Mono (OFL), weights 400/500. Self-host the font files.

## Spacing & shape
- Spacing: Use a 4px base unit with 8px control gaps, 16px card padding, 20px rail section gaps, and 24px major separations. Desktop header is 68px high, left control rail is 320px wide, and the viewport consumes all remaining width. Keep the complete primary workspace visible at 1440×900 without page scrolling.
- Radius: Use 16px for the viewport and preset cards, 10px for buttons and parameter groups, 6px for small value chips, and fully rounded tracks and toggles. Avoid excessive pill-shaped containers.

## Motion
- Rebuild changed lamp geometry on the next animation frame after each slider input; values and active states update immediately with no Apply button.
- Use OrbitControls with damping factor 0.07 when motion is allowed, no auto-rotation, no idle camera movement, and no decorative page transitions.
- Preset selection changes geometry in one frame and crossfades the active-card border and warm glow over 160ms; camera movement is limited to explicit Front, Top, and Reset view actions.
- Slider thumbs and buttons use 120ms hover and focus transitions. Under prefers-reduced-motion, remove damping and all nonessential transitions while preserving instant functional updates.

## Imagery
The hero and only major visual is a rich, code-generated WebGL studio scene: an original open-lattice lamp with crossing ribs, horizontal contour rings, a low circular plinth, a translucent inner diffuser, warm light on a matte floor, and a faint technical grid. No photographs, stock renders, downloaded models, HDRIs, logos, people, or image placeholders are used. On mobile the live viewport remains the first large visual and is never replaced by a static screenshot.

## Tone
A quiet, precise design workshop: deep botanical greens, warm peach illumination, crisp measurements, restrained motion, and succinct functional copy. The lamp is sculptural and contemporary, with no architectural, cultural, or brand-specific motifs.

---
Inspired by Parametric Lamp Designer — https://www.kimi.com/showcases/3dmake
— Prompt by VibeFather · https://vibefather.ai/t/parametric-lamp-designer · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

改成你自己的

  • 灯具工作室发布新系列:把 BRAND 和 PRODUCT_NAME 设成该系列,调整三个预设以匹配你的轮廓,并把导出的 PNG 表格交给客户,替代静态渲染图。
  • 出售可下载台灯图纸的创客:保留实时滑块,把工作区标题改成面向业余制作爱好者,并在导出的概念表中加入你的联系方式,方便买家跟进。
  • 开设参数化建模课程的设计学校:把 AUDIENCE 设成学生,保留全部四个参数,并用前视图、顶视图和重置视图演示圆环数量和格栅密度如何改变形态。
  • 创意代理公司推介产品概念:把深绿色配色换成客户的颜色,重命名产品,并把导出的规格表作为首次会议的轻量视觉材料。

参数化台灯设计器:常见问题

访客在参数化台灯设计器页面上实际能改什么?

参数化台灯设计器页面给访客提供四个实时控件:高度从 180 到 420 mm,圆环数量从 4 到 16,格栅密度从每个方向 12 到 48 根肋条,开口形状从圆形到柔方形。每个滑块都会在下一个动画帧重建 Three.js 台灯几何体,所以访客不用点应用按钮就能立即看到发光的格栅变化。

哪些 AI 编程代理可以根据提示词构建参数化台灯设计器?

参数化台灯设计器的演示由 Kimi K3.1 Pro 在 Kimi Code 中、以及 DeepSeek V4.1 Flash 在 DeepSeek Harness 中构建,发布的提示词是为在 Claude Code、Codex、Cursor、Windsurf 或 Gemini CLI 等 AI 编程代理中运行而写的。提示词指定了 Vite、React、TypeScript 和 Three.js 技术栈、颜色系统以及确切的区块,所以代理有固定目标,而不是空白聊天。