用这个模板做的 2 个案例
同一份提示词,不同的 [VARIABLES] 变量。点一个在上方预览。关于这个模板
Lo-fi 房间氛围混音器是一个单页专注空间,围绕原创插画房间构建,而非传统的营销主视觉。雨丝划过窗户,热气从杯中袅袅升起,火焰点亮壁炉,唱片缓缓旋转,窗外鸟儿轻动。每个细节都对应各自的音量滑块,让混音不仅可听,更可见。专注计时器和本地保存的混音方案,将这一场景变成实用的日常仪式。
这个模板适合创作者、学生、开发者和设计师,无论是想要一个舒缓的浏览器小玩具、作品集中的互动展示,还是专注类产品的起点。它也是 SVG 动画协同、Web Audio 混音、无障碍控件和无需账户或后端的客户端持久化的优秀示例。界面紧凑而富有触感:五个带标签的声道、一个圆形计时器、三个实用预设,以及一个搁架,用来存放访客自己命名的氛围。
Fraunces 标题、DM Sans 控件、茄紫色墙面、温暖的琥珀色光线和手绘 SVG 细节,共同营造出温柔的夜晚氛围。场景中没有人物、品牌物品、下载的插画或库存照片。五个原创的程序化音频循环由一个无依赖的 Node 脚本在本地生成,打包为小型 WAV 文件,以 CC0 协议发布;声音仅在明确激活后开始播放。
在一个内容文件中更改品牌、房间名称、场景设定、邀请语或默认专注时长,并重写配套文案以匹配。布局和交互模型保持不变,适用于阅读角、写作室、创意休息空间或安静的学习角落。保存的混音保留在当前设备上,尊重减少动态效果偏好,完整的生产站点以静态文件形式发布,无外部媒体请求。
模板提示词
在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。
# Lo-fi Room Ambience Mixer
Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.
## Brief
Build [BRAND], an original single-page ambience mixer set in [ROOM_NAME], [ROOM_SETTING]. The first screen is a rich hand-drawn SVG room with five independently controlled ambient channels: rain, café murmur, fireplace, vinyl crackle, and birds. Each slider changes both a bundled local audio loop and a corresponding part of the room. Include a focus timer whose default duration is [FOCUS_MINUTES] minutes, three presets, and named mixes saved in localStorage. The default invitation is '[ROOM_TAGLINE]'. Sound is opt-in; everything else works immediately without an account.
- Audience: Creators, students, developers, designers, and anyone building a quiet focus space, an interactive portfolio piece, or a polished browser toy for people who enjoy customizable ambient sound.
- Goal: Let visitors understand the experience within five seconds, shape a visible and audible atmosphere without instructions, start a focused work interval, and return to favorite mixes on the same device. Keep the room dominant and make every visible control perform a real local action.
- Tone: Warm, unhurried, concise, and lightly poetic without becoming whimsical or vague. Use practical control labels and small moments of hospitality. Make no medical, sleep, productivity, or mental-health claims.
## Stack
- Framework: Vite 7 + React 19 + TypeScript 5
- Styling: Tailwind CSS 3.4 + custom CSS
- Libraries: react (MIT), react-dom (MIT), lucide-react (ISC), @fontsource-variable/fraunces (OFL), @fontsource-variable/dm-sans (OFL), @fontsource/ibm-plex-mono (OFL)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
- Use React 19.2, TypeScript 5.9, Vite 7.2, @vitejs/plugin-react, Tailwind CSS 3.4, PostCSS, and Autoprefixer. package.json scripts are dev='vite', audio='node scripts/generate-audio.mjs', build='npm run audio && tsc -b && vite build', and preview='vite preview'. Do not add a component, animation, audio, state-management, or routing library.
- In vite.config.ts set base='./', plugins=[react()], build.outDir='dist', build.sourcemap=false, and assetsInlineLimit=0. Keep all production asset URLs relative and do not copy src/ into dist/.
- Configure Tailwind content for ./index.html and ./src/**/*.{ts,tsx}. Add every Design color to theme.extend.colors, font families display=['Fraunces Variable','Georgia','serif'], sans=['DM Sans Variable','system-ui','sans-serif'], and mono=['IBM Plex Mono','monospace']. Put room-specific keyframes, range styling, SVG texture, and reduced-motion overrides in src/index.css.
- Import @fontsource-variable/fraunces, @fontsource-variable/dm-sans, @fontsource/ibm-plex-mono/400.css, and @fontsource/ibm-plex-mono/500.css in src/fonts.ts. Self-host only the emitted Fontsource files; never request a font CDN.
- Keep every visitor-facing string, channel definition, preset, SVG label, default variable value, and audio path in typed src/content.ts. Suggested component files are Header.tsx, RoomScene.tsx, MixerPanel.tsx, FocusTimer.tsx, MixShelf.tsx, SaveMixDialog.tsx, HowItWorksDialog.tsx, Toast.tsx, and Footer.tsx, composed by src/App.tsx for the single index.html page.
- Create scripts/generate-audio.mjs with no dependencies. Use a fixed seeded PRNG, 22050Hz mono 16-bit PCM, and 12-second loops. Generate public/audio/rain.wav from layered filtered noise and droplet ticks; cafe.wav from band-limited unintelligible murmur-like noise with soft cup and spoon ticks, never speech or music; fireplace.wav from low filtered noise and seeded crackle envelopes; vinyl.wav from restrained pink noise, dust pops, and subtle mechanical hiss; birds.wav from seven original sine-glissando chirp motifs over faint leaf noise. Apply short seam crossfades, normalize peaks below 0.82, write canonical WAV headers, and make repeated runs byte-identical. Commit the five generated files; together they should be about 2.6 MB.
- Implement src/lib/audio.ts with one lazily created AudioContext. Only after an explicit Listen press, fetch and decode the five exact local WAV paths, create one looping AudioBufferSourceNode and GainNode per channel, connect them through a master GainNode capped at 0.7, and start playback. Sliders call setTargetAtTime for click-free gain changes. Mute preserves the prior nonzero value; Pause sounds suspends the context without losing levels. Handle loading and decode failures visibly and never autoplay.
- Implement src/lib/storage.ts with safe JSON parsing, schema checks, try/catch around localStorage, and keys derived from a lowercase hyphenated BRAND slug. Persist current channel levels, mute states, and up to eight named custom mixes. Do not persist or display calendar dates. Timer state may reset on reload.
- Drive RoomScene.tsx from React state and CSS custom properties for the five channel levels. Update SVG attributes and classes only when controls change; use CSS transforms and opacity for continuous motion rather than rerendering the SVG every animation frame. Honor prefers-reduced-motion with static rain, flame, steam, record, birds, and instant interface state changes.
- Use performance.now() and an absolute end time for the focus timer, updating the visible remaining time four times per second. Pause stores remaining milliseconds, reset restores the selected duration, and switching duration while stopped updates the ring. Completion announces 'Session complete. Take a breath.' in an aria-live region and may play a short synthesized chime only when the visitor already enabled sound.
## Variables
- [BRAND] — Ambience space name (default: "Nooklight"). An invented short name used in the wordmark, document title, storage prefix, and footer.
- [ROOM_NAME] — Room name (default: "The Amber Study"). A specific invented name for this illustrated space.
- [ROOM_SETTING] — Room setting (default: "an upstairs reading room on a rainy evening"). A short lowercase phrase describing the room and moment.
- [ROOM_TAGLINE] — Hero invitation (default: "Make a little weather for your thoughts."). One gentle sentence of roughly 35–55 characters; rewrite it when the room changes.
- [FOCUS_MINUTES] — Default focus length (default: "25"). A positive whole number of minutes from 1 to 120; use it for the initial timer and middle duration preset.
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/lo-fi-room-ambience-mixer 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
- Night Ink `#211C2A` — Page background, deepest shadows, and dark text on amber buttons.
- Panel Plum `#2D2637` — Mixer, timer, dialog, and saved-mix surfaces.
- Dusk Wall `#493C55` — Back wall of the illustrated room and secondary surfaces.
- Muted Lavender `#B9AAC2` — Secondary text and inactive icons on dark surfaces.
- Warm Cream `#F6E9D2` — Primary text, lampshade, paper, and highlights.
- Old Paper `#DFC9A9` — Books, labels, and soft border details.
- Honey Amber `#E8AA62` — Primary action, active slider, lamplight, and selected states.
- Ember Coral `#D87350` — Flame core, record label, and warm accents; not body text.
- Rain Blue `#8299B6` — Window sky, rain streaks, and cool ambient highlights.
- Leaf Sage `#8FA489` — Plants, birds' branch, success feedback, and quiet accents.
- Walnut `#765044` — Floor, desk, fireplace mantel, and furniture outlines.
- Fine Line `#51445D` — One-pixel borders and dividers on dark UI surfaces.
### Typography
- Room invitation and large timer numerals: Fraunces Variable (OFL), weights 600/700
- Interface, body copy, buttons, labels, and dialogs: DM Sans Variable (OFL), weights 400/500/600/700
- Volume percentages, timer presets, and tiny status labels: IBM Plex Mono (OFL), weights 400/500
### Layout & motion
- Spacing: Use a 4px base grid with an 8px dominant rhythm. Page maximum width is 1480px; desktop gutters are 28px, tablet 20px, and mobile 14px. Header height is 68px. Intro has 28px top and 24px bottom padding. Workspace columns have a 20px gap. Scene and panel padding is 20px; compact control rows use 10px vertical gaps. Keep 44px minimum pointer targets and at least 8px between adjacent targets.
- Radius: Scene card 24px, mixer and dialog panels 20px, preset cards 16px, standard buttons and inputs 12px, small icon buttons 10px, and status pills 999px. SVG furniture uses softly rounded joins rather than sharp geometric corners. Borders are one pixel; avoid nested floating cards and heavy glass effects.
- Motion: Rain streaks fall on three staggered linear loops while droplets creep down the glass. Rain level controls visible streak count, opacity from 0 to 0.8, and duration from 2.8 seconds at high volume to a frozen hidden state at zero.
- Motion: Café level raises two cup-steam paths and shortens their drift loop from 5.5 to 2.8 seconds; a tiny spoon glints every 4 seconds only above 35 percent. This is a restrained visual metaphor, not a separate café illustration.
- Motion: Fireplace flames scale and skew gently on staggered 700–1200ms loops. Fire level controls flame height, ember opacity, and the amber wash on the nearby floor; zero leaves unlit logs without smoke.
- Motion: The vinyl disc rotates once every 1.8 seconds while its level is above zero, with a subtle tonearm bob and two level bars. Reduced motion holds the disc still and uses the label and bars to show the setting.
- Motion: Two small generic bird silhouettes on the outdoor branch hop at most once every 5 seconds and leaves sway slowly. Bird level controls their visibility and motion; there are no mascots, speech bubbles, or musical-note particles.
- Motion: Buttons and cards respond in 120–180ms with at most 2px translation. Dialogs fade and rise 8px over 180ms. Toasts remain for 2.4 seconds. No scroll-jacking, parallax, autoplay, flashing, infinite text marquee, or cursor follower.
- Motion: Under prefers-reduced-motion, remove every ambient and entrance animation, show a complete static room, keep all state cues readable, and leave audio behavior unchanged.
- Imagery: Create one detailed original inline SVG room, viewBox 0 0 1200 760, with no raster images or external illustration. Use a straight-on slightly elevated cutaway composition: large rain window and branch on the left, books and a turntable on a walnut desk in the foreground, steaming cup on a side table, fireplace and amber floor glow on the right, an empty upholstered reading chair, shaded lamp, plants, framed abstract lines, and layered rugs. Add a static low-opacity SVG grain filter and two or three broad color washes for depth; do not animate noise. No people, faces, pets, characters, logos, branded products, recognizable landmarks, copied room compositions, or text baked into the artwork. The complete room is the first-screen visual anchor, not a small decorative thumbnail.
## Pages & Sections
### [BRAND] — [ROOM_NAME] (`index.html`)
1. **Header and room invitation** — The header contains an original inline SVG mark made from a rounded window and three rain strokes, the [BRAND] wordmark, and a small sage status dot with 'Room ready'. On the right, a BookOpen icon and text open 'How it works'; do not add navigation to nonexistent pages. Below, an uppercase mono eyebrow reads '[ROOM_NAME] · [ROOM_SETTING]'. The H1 is exactly [ROOM_TAGLINE], rendered as one or two balanced lines. Supporting copy reads 'Five sounds. One slower moment.' The document title is [BRAND] and the favicon uses the same original window mark.
Layout: Use a full-width header inside the 1480px container with brand left and help action right. The intro is a flex row: eyebrow and H1 at left, supporting copy aligned to the lower right. H1 uses Fraunces 600, clamp(36px,4vw,56px), line-height 1.04, letter-spacing -0.025em, and Warm Cream. On screens below 760px, stack the intro with a 10px gap, use 36px H1, hide only the redundant 'Room ready' text, and keep the help control available.
Motion: Header and intro appear together with a 300ms opacity transition; there is no staggered text reveal or typewriter effect. The help button uses a quiet border brightening on hover.
2. **Interactive illustrated room** — Fill the left workspace with the complete original SVG room described in Design. Every visual channel has a distinct location: rain and birds at the window, café steam at the cup, fire and light at the hearth, and vinyl at the desk. The initial levels are Rain 62, Café 24, Fireplace 48, Vinyl 18, Birds 0, so the first view visibly includes rain, steam, firelight, and a turning record without starting audio. A bottom-left scene caption shows [ROOM_NAME] and 'Visual mix active'; a bottom-right primary Honey Amber button with Volume2 or Pause icon reads 'Listen' before activation, 'Pause sounds' while playing, and 'Warming up…' while decoding. If audio cannot load, show 'Audio could not load. The visual mixer still works.' in an inline status region. The SVG has an accessible summary, while internal decorative paths are hidden from assistive technology.
Layout: The workspace is a grid with minmax(0,1.65fr) for the scene and minmax(340px,1fr) for the controls. The scene card has a 16/10 aspect ratio, minimum height 520px, overflow hidden, Panel Plum background, Fine Line border, and a subtle 0 20px 60px #15101966 shadow. The SVG fills the card with preserveAspectRatio xMidYMid meet. Scene captions sit on #211C2AD9 solid-backed pills rather than over unprotected detailed art. Below 980px use one column with the scene first and controls second; below 600px use a 4/3 scene aspect ratio, no minimum height, 12px caption insets, and no horizontal cropping or page overflow.
Motion: Apply the five reactive animation systems in Design directly from channel levels. The Listen button fades its label state over 120ms. Master pause affects audio only; the visible mix still responds to sliders. Reduced-motion users see all selected elements in static positions.
3. **Sound mixer and focus timer** — The right panel begins with 'Soundscape' and a small TextButton 'Reset levels'. Five rows in this exact order are Rain, Café, Fireplace, Vinyl, Birds, using CloudRain, Coffee, Flame, Disc3, and Bird Lucide icons. Each row has a text label, a separate mute icon button with an accessible name, a 0–100 step-1 range input, and a mono percentage output. The initial values are 62, 24, 48, 18, and 0. Moving a slider updates gain and scene intensity immediately; mute sets that channel to silence without erasing its previous level, and unmute restores it. Reset levels restores the five initial values with a toast 'Back to the original room.'
Below a divider, 'Focus timer' appears beside a Timer icon. Show remaining mm:ss in Fraunces 600 inside a circular SVG progress ring. Duration buttons read '15 min', '[FOCUS_MINUTES] min', and '60 min', with [FOCUS_MINUTES] selected initially. Primary button text cycles through 'Start focus', 'Pause', and 'Resume'; a separate RotateCcw button resets. The timer never starts automatically and completion changes the status line to 'Session complete. Take a breath.' without opening external notifications.
Layout: Keep the entire right panel visible as one aligned surface with 20px padding and the same height as the desktop scene. Mixer rows are 58px high with 12px gaps; labels occupy 112px, the range flexes, and percentages are right-aligned at 42px. Use custom range tracks in Fine Line with Honey Amber fill and a 20px Warm Cream thumb with Night Ink border. The timer block is a 116px row with a 92px ring at left and duration/actions at right. On narrow mobile, keep each slider on its own full-width line below its label, maintain 44px targets, and let the panel height grow naturally rather than shrinking controls.
Motion: Range fill and active states update without animated lag. The timer ring uses a 200ms linear stroke-dashoffset update. Timer buttons respond in 120ms. No pulsing ring, gamified streak, confetti, or celebratory modal on completion.
4. **Preset and saved-mix shelf** — Below the workspace, title the shelf 'Rooms for a moment' with supporting text 'Start with a blend, then make it yours.' Provide exactly three preset cards: 'Slow Evening' with Rain 62 / Café 24 / Fireplace 48 / Vinyl 18 / Birds 0 and copy 'Rain at the glass, a low fire, a little crackle.'; 'Café Corner' with Rain 18 / Café 72 / Fireplace 36 / Vinyl 24 / Birds 0 and copy 'Cup nearby, soft murmur, nothing urgent.'; 'Morning Pages' with Rain 0 / Café 12 / Fireplace 0 / Vinyl 8 / Birds 82 and copy 'Open the window and begin with the birds.' Each card shows five tiny labeled level bars, not an image. Activating a card updates all channels and the room, marks the card with aria-pressed, and does not start audio.
A bordered custom-mix area contains 'Your saved mixes', a 'Save current mix' button, and an initial empty line 'No saved mixes yet. Shape the room and keep one here.' Saving opens an inline dialog with a required input labeled 'Mix name', placeholder 'Rainy chapter', 24-character maximum, Cancel, and 'Save mix'. Store levels and mute states locally, show the name with miniature level bars, and provide Load and Delete actions. Limit saved mixes to eight with a visible explanation when full. Deletion requires one inline confirmation. Toast text is 'Mix saved on this device.' Do not show dates, accounts, cloud-sync claims, or fake sharing.
Layout: Use a three-column preset grid with 16px gaps and a separate full-width saved-mix shelf 20px below. Preset cards are left-aligned with 18px padding, a 16px radius, Panel Plum background, and Fine Line border. The active preset has a Honey Amber border and small 'Current' pill. Saved mixes use a responsive two-column grid; at mobile widths presets and saved mixes become one column. The save dialog is centered at maximum width 420px with a Night Ink scrim at 70 percent, never a full new page.
Motion: Loading a preset crossfades scene intensities over 220ms while audio gains ramp smoothly. The selected card changes border immediately. Dialogs use the standard 180ms entrance; deleting a row uses opacity only and reduced motion removes all transitions.
5. **How-it-works dialog and footer** — The help dialog is titled 'A room that follows your mix.' It contains three numbered rows: '01 Blend' with 'Move any slider. The matching corner of the room changes with the sound.'; '02 Listen' with 'Press Listen to begin all five local loops together. Pause whenever you like; your levels stay put.'; '03 Keep a mix' with 'Save up to eight atmospheres on this device, or start a focus interval while you listen.' A small note reads 'Five original procedural loops · CC0 · Stored with the site. No account, no streaming, no autoplay.' Close with a clearly labeled button, the X icon, Escape, or scrim click; trap focus and return it to the help trigger.
The footer left reads [BRAND] followed by 'A quieter corner of the browser.' The right contains plain text 'Original room art · Local audio · Your mixes stay on this device' and the optional [CREDIT] footer link when enabled. No social links, newsletter form, pricing, member counts, date, health claims, or invented accolades.
Layout: The dialog uses Panel Plum, 20px radius, 24px padding, a Fine Line border, and three rows separated by subtle rules. Footer is a full-width flex row with 28px vertical padding and a top Fine Line border. On mobile it stacks with 12px gaps and the credit remains legible at 14px.
Motion: Use only the standard dialog fade and 8px rise. The footer is static.
## Assets
- image: No third-party, stock, raster, or generated image files. Draw the entire hero room, window mark, favicon, furniture, plants, birds, fireplace, rain, vinyl, and texture as original inline SVG/CSS in RoomScene.tsx and the local favicon. Record in ASSETS.md that all scene art is code-drawn for this template and no external image assets are used.
- icon: Use only tree-shaken lucide-react icons (ISC) for CloudRain, Coffee, Flame, Disc3, Bird, BookOpen, Volume2, VolumeX, Pause, Play, RotateCcw, Timer, Save, Trash2, X, Plus, and Check. Do not import a brand icon set. In ASSETS.md list the imported modules, https://www.npmjs.com/package/lucide-react, Lucide contributors, and the ISC license.
- font: Self-host Fraunces Variable, DM Sans Variable, and IBM Plex Mono 400/500 through the specified Fontsource packages (OFL). In ASSETS.md list emitted local woff2 paths, package source URLs, copyright holders copied from the bundled OFL files, and the OFL license. No Google Fonts, Adobe Fonts, or other font CDN.
- video: Audio assets; no video. scripts/generate-audio.mjs deterministically creates public/audio/rain.wav, cafe.wav, fireplace.wav, vinyl.wav, and birds.wav as 12-second 22050Hz mono 16-bit original procedural loops. Bundle the generator and WAV files locally. These newly synthesized loops and generator source are original template assets released under CC0 1.0; document all five paths, the generator path, 'Original procedural audio generated for this template', and https://creativecommons.org/publicdomain/zero/1.0/ in ASSETS.md. Do not download recordings, imitate existing songs, or use intelligible voices.
## Don'ts
- Do not copy any existing ambience app's room artwork, layout, control styling, code, prompt, or exact copy; the specified SVG composition and interface must be implemented from scratch.
- Do not use recognizable brand names, logos, mascots, signature characters, product slogans, branded objects, custom fonts, unique reference icons, or an existing site's exact palette.
- Do not add real people, faces, celebrity likenesses, anime, game or film characters, pets, or recognizable landmarks. Birds are small generic silhouettes only.
- Do not hotlink or stream audio and do not use recordings without a verified redistribution-compatible CC0 license. Use only the five locally generated original CC0 WAV files and never fetch third-party audio.
- Do not autoplay sound, create an AudioContext before a user gesture, add background video, use intelligible speech, reproduce an existing melody, or make audio necessary to operate the visual mixer.
- Do not use a backend, server code, API routes, accounts, databases, external APIs, analytics, notifications, forms that submit anywhere, cloud sync, or sharing claims. Saved mixes and settings stay in localStorage.
- Do not load scripts, styles, fonts, icons, images, or media from a CDN. Self-host the fixed Fontsource fonts, tree-shake Lucide, use original SVG art, and keep all five WAV files in the build.
- Do not add npm dependencies beyond the fixed stack or use restricted UI source, commercial fonts, CC BY-NC, CC BY-SA, unlicensed packages, placeholder-image services, Unsplash, Pexels, or Pixabay.
- Do not turn the first screen into a typography-led landing page, a generic bento dashboard, a stock-photo hero, a pricing page, or a multi-step signup funnel. The interactive room and mixer are the product.
- Do not add scroll-jacking, parallax, flashing, autoplaying carousels, cursor followers, fake online activity, user counts, streaks, productivity scores, dates, medical claims, sleep claims, or mental-health claims.
- Do not emit source maps, copy src/ into dist/, use absolute root asset URLs, exceed 20 MB, or require a server. The single npm run build command must regenerate audio and produce minified relative-path static files in dist/.
- Do not add routes or bare-directory links. This is one index.html page; dialogs are local interface states and every internal help or preset control performs the behavior described here.
- Do not ignore mobile or accessibility requirements. At 1440×900 and 390×844 there must be zero console errors and no page-level horizontal overflow; all controls need labels, keyboard operation, visible focus, 44px targets, appropriate pressed states, and reduced-motion behavior.
---
— Prompt by VibeFather · https://vibefather.ai/t/lo-fi-room-ambience-mixer · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# Lo-fi 房间氛围混音器
完全按照下面的描述构建这个网站。将 [VARIABLES] 替换为你自己的值;其余内容保持不变。
## 简介
构建 [BRAND],一个原创的单页氛围混音器,场景设定在 [ROOM_NAME],[ROOM_SETTING]。首屏是一个丰富的手绘 SVG 房间,包含五个独立控制的环境声道:雨声、咖啡馆低语、壁炉、黑胶爆裂声和鸟鸣。每个滑块同时改变一段内置的本地音频循环和房间中对应的部分。包含一个专注计时器,默认时长为 [FOCUS_MINUTES] 分钟,三个预设,以及保存在 localStorage 中的命名混音。默认邀请语为 '[ROOM_TAGLINE]'。声音为选择性开启;其余一切无需账户即可立即使用。
- 受众:创作者、学生、开发者、设计师,以及任何正在打造安静专注空间、交互式作品集页面,或为喜欢可定制环境音的人制作的精致浏览器玩具的人。
- 目标:让访客在五秒内理解这一体验,无需说明即可塑造可见且可听的氛围,开始一个专注工作时段,并在同一设备上回到喜爱的混音。保持房间为主体,让每个可见控件都执行真实的本地操作。
- 语调:温暖、从容、简洁,略带诗意但不流于 whimsical 或含糊。使用实用的控件标签和细微的待客之道。不做任何医疗、睡眠、生产力或心理健康方面的声明。
## 技术栈(Stack)
- 框架(Framework):Vite 7 + React 19 + TypeScript 5
- 样式(Styling):Tailwind CSS 3.4 + 自定义 CSS
- 库(Libraries):react(MIT)、react-dom(MIT)、lucide-react(ISC)、@fontsource-variable/fraunces(OFL)、@fontsource-variable/dm-sans(OFL)、@fontsource/ibm-plex-mono(OFL)
- 构建(Build):`npm run build` → `dist/` 中的静态文件。无后端、无服务端代码、无外部 API。
- 配置(Setup):
- 使用 React 19.2、TypeScript 5.9、Vite 7.2、@vitejs/plugin-react、Tailwind CSS 3.4、PostCSS 和 Autoprefixer。package.json 脚本为 dev='vite'、audio='node scripts/generate-audio.mjs'、build='npm run audio && tsc -b && vite build'、preview='vite preview'。不要添加组件、动画、音频、状态管理或路由库。
- 在 vite.config.ts 中设置 base='./'、plugins=[react()]、build.outDir='dist'、build.sourcemap=false、assetsInlineLimit=0。保持所有生产资源 URL 为相对路径,不要将 src/ 复制到 dist/。
- 为 ./index.html 和 ./src/**/*.{ts,tsx} 配置 Tailwind content。将每个 Design 颜色添加到 theme.extend.colors,字体族 display=['Fraunces Variable','Georgia','serif']、sans=['DM Sans Variable','system-ui','sans-serif']、mono=['IBM Plex Mono','monospace']。将房间专属 keyframes、range 样式、SVG 纹理和 reduced-motion 覆盖放入 src/index.css。
- 在 src/fonts.ts 中导入 @fontsource-variable/fraunces、@fontsource-variable/dm-sans、@fontsource/ibm-plex-mono/400.css 和 @fontsource/ibm-plex-mono/500.css。仅自托管生成的 Fontsource 文件;绝不请求字体 CDN。
- 将所有面向访客的字符串、频道定义、预设、SVG 标签、默认变量值和音频路径保存在带类型的 src/content.ts 中。建议的组件文件为 Header.tsx、RoomScene.tsx、MixerPanel.tsx、FocusTimer.tsx、MixShelf.tsx、SaveMixDialog.tsx、HowItWorksDialog.tsx、Toast.tsx 和 Footer.tsx,由 src/App.tsx 组合用于单个 index.html 页面。
- 创建无依赖的 scripts/generate-audio.mjs。使用固定种子的 PRNG、22050Hz 单声道 16 位 PCM 和 12 秒循环。从分层滤波噪声和液滴滴答声生成 public/audio/rain.wav;从带限的不可辨识低语状噪声并加入轻柔的杯子和勺子滴答声生成 cafe.wav,绝不包含语音或音乐;从低通滤波噪声和种子化爆裂包络生成 fireplace.wav;从克制的粉红噪声、灰尘爆音和细微机械嘶声生成 vinyl.wav;从七个原创正弦滑音啁啾动机叠加微弱叶片噪声生成 birds.wav。应用短接缝交叉淡化,将峰值归一化到 0.82 以下,写入规范 WAV 头,并使重复运行字节完全一致。提交这五个生成文件;它们合计应约为 2.6 MB。
- 实现 src/lib/audio.ts,使用一个延迟创建的 AudioContext。仅在显式按下 Listen 后,获取并解码五个确切的本地 WAV 路径,为每个频道创建一个循环 AudioBufferSourceNode 和 GainNode,通过上限为 0.7 的主 GainNode 连接它们,并开始播放。滑块调用 setTargetAtTime 以实现无点击的增益变化。Mute 保留先前的非零值;Pause sounds 挂起上下文而不丢失电平。可见地处理加载和解码失败,绝不自动播放。
- 实现 src/lib/storage.ts,包含安全 JSON 解析、模式检查、围绕 localStorage 的 try/catch,以及从小写连字符 BRAND slug 派生的键。持久化当前频道电平、静音状态和最多八个命名自定义混音。不要持久化或显示日历日期。计时器状态可在重新加载时重置。
- 由 React 状态和五个频道电平的 CSS 自定义属性驱动 RoomScene.tsx。仅在控件变化时更新 SVG 属性和类;使用 CSS transforms 和 opacity 实现连续运动,而不是每个动画帧重新渲染 SVG。遵循 prefers-reduced-motion,使用静态雨、火焰、蒸汽、唱片、鸟和即时界面状态变化。
- 使用 performance.now() 和绝对结束时间实现专注计时器,每秒更新可见剩余时间四次。暂停存储剩余毫秒数,重置恢复所选时长,停止时切换时长更新圆环。完成时在 aria-live 区域宣布 'Session complete. Take a breath.',并且仅当访客已启用声音时播放短合成提示音。
## 变量
- [BRAND] — 氛围空间名称(默认:“Nooklight”)。一个自创的短名称,用于字标、文档标题、存储前缀和页脚。
- [ROOM_NAME] — 房间名称(默认:“The Amber Study”)。为这个插画空间自创的具体名称。
- [ROOM_SETTING] — 房间设定(默认:“an upstairs reading room on a rainy evening”)。一个简短的小写短语,描述房间和时刻。
- [ROOM_TAGLINE] — 主视觉邀请语(默认:“Make a little weather for your thoughts.”)。一句温和的话,约 35–55 个字符;房间变化时重写它。
- [FOCUS_MINUTES] — 默认专注时长(默认:“25”)。1 到 120 之间的正整数分钟数;用于初始计时器和中间时长预设。
- [CREDIT] — 在页脚保留一个小型“Template by VibeFather”链接指向 https://vibefather.ai/t/lo-fi-room-ambience-mixer(默认:是;删除此行即可移除)
页面与区块下的文案是为默认值编写的。如果你的值不同,请为它们重写每个标题、段落、标签和图片——保持相同的长度、语气和结构。布局、颜色、字体和动效保持所述不变。
将所有文案、图片路径和链接放在一个内容文件中(例如 `src/content.ts`),按区块作为键,以便之后无需改动组件即可替换内容。
## 设计
### 颜色(Colors)
- 夜墨(Night Ink)`#211C2A` — 页面背景、最深的阴影,以及琥珀色按钮上的深色文字。
- 面板紫(Panel Plum)`#2D2637` — 混音器、计时器、对话框和已保存混音的表面。
- 暮墙(Dusk Wall)`#493C55` — 插画房间的后墙和次级表面。
- 淡薰衣草(Muted Lavender)`#B9AAC2` — 深色表面上的次级文字和非活动图标。
- 暖奶油(Warm Cream)`#F6E9D2` — 主文字、灯罩、纸张和高光。
- 旧纸(Old Paper)`#DFC9A9` — 书籍、标签和柔和的边框细节。
- 蜜琥珀(Honey Amber)`#E8AA62` — 主操作、活动滑块、灯光和选中状态。
- 余烬珊瑚(Ember Coral)`#D87350` — 火焰核心、唱片标签和暖色点缀;不用于正文文字。
- 雨蓝(Rain Blue)`#8299B6` — 窗外的天空、雨丝和冷色环境高光。
- 叶鼠尾草(Leaf Sage)`#8FA489` — 植物、鸟的树枝、成功反馈和安静的点缀。
- 胡桃木(Walnut)`#765044` — 地板、书桌、壁炉架和家具轮廓。
- 细线(Fine Line)`#51445D` — 深色 UI 表面上的单像素边框和分隔线。
### 字体排印(Typography)
- 房间邀请语和大型计时器数字:Fraunces Variable(OFL),字重 600/700
- 界面、正文、按钮、标签和对话框:DM Sans Variable(OFL),字重 400/500/600/700
- 音量百分比、计时器预设和微小状态标签:IBM Plex Mono(OFL),字重 400/500
### 布局与动效(Layout & motion)
- 间距:使用 4px 基础网格,以 8px 为主导节奏。页面最大宽度为 1480px;桌面端边距为 28px,平板端为 20px,移动端为 14px。页头高度为 68px。介绍区顶部内边距为 28px,底部为 24px。工作区各列间距为 20px。场景和面板的内边距为 20px;紧凑控件行的垂直间距为 10px。保持最小 44px 的指针目标,相邻目标之间至少间隔 8px。
- 圆角:场景卡片 24px,混音器和对话框面板 20px,预设卡片 16px,标准按钮和输入框 12px,小图标按钮 10px,状态胶囊 999px。SVG 家具使用柔和的圆角连接,而非尖锐的几何转角。边框为一像素;避免嵌套的浮动卡片和厚重的玻璃效果。
- 动效:雨丝以三条错开的线性循环下落,同时水滴沿玻璃缓缓滑下。雨量级别控制可见雨丝数量、0 到 0.8 的不透明度,以及从高音量下的 2.8 秒到零音量下冻结隐藏状态的持续时间。
- 动效:咖啡馆级别会升起两条杯口蒸汽路径,并将其飘动循环从 5.5 秒缩短至 2.8 秒;仅在高于 35% 时,一把小勺子每 4 秒闪烁一次。这是一种克制的视觉隐喻,而非单独的咖啡馆插画。
- 动效:壁炉火焰以错开的 700–1200ms 循环轻柔地缩放和倾斜。火焰级别控制火焰高度、余烬不透明度以及附近地板上的琥珀色光晕;零级别时留下未点燃的木柴,且无烟雾。
- 动效:黑胶唱片在其级别高于零时每 1.8 秒旋转一圈,并带有微妙的唱臂摆动和两条级别条。减少动效时,唱片保持静止,并使用标签和级别条来显示设置。
- 动效:室外树枝上的两个小型通用鸟剪影最多每 5 秒跳跃一次,树叶缓慢摇曳。鸟级别控制其可见性和动效;没有吉祥物、对话气泡或音符粒子。
- 动效:按钮和卡片在 120–180ms 内响应,位移最多 2px。对话框在 180ms 内淡入并上升 8px。提示消息停留 2.4 秒。无滚动劫持、视差、自动播放、闪烁、无限文字跑马灯或光标跟随。
- 动效:在 prefers-reduced-motion 下,移除所有环境动画和入场动画,显示完整的静态房间,保持所有状态提示可读,并保持音频行为不变。
- 图像:创建一个详细的原创内联 SVG 房间,viewBox 0 0 1200 760,不使用栅格图像或外部插画。采用正面略微抬高的剖面构图:左侧是大雨窗和树枝,前景是胡桃木书桌上的书籍和唱机,边桌上放着冒热气的杯子,右侧是壁炉和琥珀色地板光晕,还有一把空着的软垫阅读椅、带灯罩的台灯、植物、带框的抽象线条和分层地毯。添加静态低透明度的 SVG 颗粒滤镜和两到三片大面积色彩晕染以增加深度;不要对噪点做动画。不出现人物、面孔、宠物、角色、标志、品牌产品、可识别地标、复制的房间构图或烘焙进画面的文字。完整的房间是第一屏的视觉锚点,而不是小型装饰缩略图。
## 页面与区块
### [BRAND] — [ROOM_NAME] (`index.html`)
1. **页眉与房间邀请** — 页眉包含一个原创内联 SVG 标志(由一扇圆角窗户和三道雨丝组成)、[BRAND] 字标,以及一个带 'Room ready' 的小鼠尾草绿状态点。右侧,一个 BookOpen 图标和文字打开 'How it works';不要添加指向不存在页面的导航。下方,一行大写等宽眉题写着 '[ROOM_NAME] · [ROOM_SETTING]'。H1 精确为 [ROOM_TAGLINE],渲染为一行或两行均衡的文本。辅助文案为 'Five sounds. One slower moment.'。文档标题为 [BRAND],favicon 使用相同的原创窗户标志。
布局:在 1480px 容器内使用全宽页眉,品牌居左,帮助操作居右。介绍区为 flex 行:眉题和 H1 居左,辅助文案对齐到右下。H1 使用 Fraunces 600、clamp(36px,4vw,56px)、行高 1.04、字距 -0.025em,颜色为 Warm Cream(暖奶油色)。在低于 760px 的屏幕上,介绍区堆叠,间距 10px,H1 使用 36px,仅隐藏冗余的 'Room ready' 文字,并保持帮助控件可用。
动效:页眉和介绍区一起以 300ms 不透明度过渡出现;没有交错文字显现或打字机效果。帮助按钮在悬停时使用安静的边框提亮。
2. **交互式插画房间** — 用 Design 中描述的完整原创 SVG 房间填充左侧工作区。每个视觉通道都有独特的位置:雨和鸟在窗户处,咖啡蒸汽在杯子处,火焰和光在壁炉处,黑胶在书桌处。初始级别为 Rain 62、Café 24、Fireplace 48、Vinyl 18、Birds 0,因此首次视图可见地包含雨、蒸汽、火光和一张转动的唱片,而不启动音频。左下角场景说明显示 [ROOM_NAME] 和 'Visual mix active';右下角一个 Honey Amber(蜂蜜琥珀色)主按钮,带 Volume2 或 Pause 图标,在激活前显示 'Listen',播放时显示 'Pause sounds',解码时显示 'Warming up…'。如果音频无法加载,在内联状态区域显示 'Audio could not load. The visual mixer still works.'。SVG 具有可访问的摘要,而内部装饰性路径对辅助技术隐藏。
布局:工作区为网格,场景使用 minmax(0,1.65fr),控件使用 minmax(340px,1fr)。场景卡片宽高比 16/10,最小高度 520px,溢出隐藏,Panel Plum(面板紫李色)背景,Fine Line(细线色)边框,以及微妙的 0 20px 60px #15101966 阴影。SVG 以 preserveAspectRatio xMidYMid meet 填充卡片。场景说明位于 #211C2AD9 实底胶囊上,而非覆盖在无保护的细节艺术上。低于 980px 使用单列,场景在前、控件在后;低于 600px 使用 4/3 场景宽高比,无最小高度,说明内边距 12px,且无水平裁切或页面溢出。
动效:直接从通道级别应用 Design 中的五个响应式动画系统。Listen 按钮在 120ms 内淡出其标签状态。主暂停仅影响音频;可见混音仍响应滑块。减少动效用户看到所有选定元素处于静态位置。
3. **声音混音器与专注计时器** — 右侧面板以 'Soundscape' 和一个小型 TextButton 'Reset levels' 开始。五行按此精确顺序为 Rain、Café、Fireplace、Vinyl、Birds,使用 CloudRain、Coffee、Flame、Disc3 和 Bird Lucide 图标。每行有一个文本标签、一个带可访问名称的独立静音图标按钮、一个 0–100 步长 1 的范围输入,以及一个等宽百分比输出。初始值为 62、24、48、18 和 0。移动滑块立即更新增益和场景强度;静音将该通道设为静音而不清除其先前级别,取消静音则恢复。Reset levels 恢复五个初始值,并弹出 toast 'Back to the original room.'
在分隔线下方,'Focus timer' 出现在 Timer 图标旁。在圆形 SVG 进度环内以 Fraunces 600 显示剩余 mm:ss。时长按钮为 '15 min'、'[FOCUS_MINUTES] min' 和 '60 min',初始选中 [FOCUS_MINUTES]。主按钮文本循环显示 'Start focus'、'Pause' 和 'Resume';一个单独的 RotateCcw 按钮重置。计时器从不自动启动,完成时将状态行改为 'Session complete. Take a breath.',而不打开外部通知。
布局:保持整个右侧面板作为一个对齐表面可见,内边距 20px,高度与桌面场景相同。混音器行高 58px,间距 12px;标签占 112px,范围输入弹性伸缩,百分比右对齐于 42px。使用 Fine Line 中的自定义范围轨道,Honey Amber 填充,以及 20px Warm Cream 滑块拇指,Night Ink 边框。计时器区块为 116px 行,左侧 92px 圆环,右侧时长/操作。在窄移动端,每个滑块保持在其标签下方独占全宽行,保持 44px 触控目标,并让面板高度自然增长,而非缩小控件。
动效:范围填充和激活状态更新无动画延迟。计时器圆环使用 200ms 线性 stroke-dashoffset 更新。计时器按钮在 120ms 内响应。完成时无脉冲圆环、游戏化连续记录、彩纸或庆祝模态框。
4. **预设与已保存混音架** — 在工作区下方,将架子标题设为 'Rooms for a moment',辅助文本为 'Start with a blend, then make it yours.'。提供恰好三张预设卡片:'Slow Evening',Rain 62 / Café 24 / Fireplace 48 / Vinyl 18 / Birds 0,文案 'Rain at the glass, a low fire, a little crackle.';'Café Corner',Rain 18 / Café 72 / Fireplace 36 / Vinyl 24 / Birds 0,文案 'Cup nearby, soft murmur, nothing urgent.';'Morning Pages',Rain 0 / Café 12 / Fireplace 0 / Vinyl 8 / Birds 82,文案 'Open the window and begin with the birds.'。每张卡片显示五个带标签的微型级别条,而非图像。激活卡片会更新所有通道和房间,用 aria-pressed 标记卡片,且不启动音频。
一个有边框的自定义混音区域包含 'Your saved mixes'、一个 'Save current mix' 按钮,以及初始空行 'No saved mixes yet. Shape the room and keep one here.'。保存会打开一个内联对话框,包含一个必填输入框,标签为 'Mix name',占位符 'Rainy chapter',最多 24 个字符,Cancel 和 'Save mix'。在本地存储级别和静音状态,显示名称和微型级别条,并提供 Load 和 Delete 操作。已保存混音限制为八个,满时显示可见说明。删除需要一次内联确认。Toast 文本为 'Mix saved on this device.'。不要显示日期、账户、云同步声明或虚假分享。
布局:使用三列预设网格,间距 16px,并在下方 20px 处使用单独的全宽已保存混音架。预设卡片左对齐,内边距 18px,圆角 16px,Panel Plum 背景,Fine Line 边框。激活的预设具有 Honey Amber 边框和小型 'Current' 胶囊。已保存混音使用响应式两列网格;在移动宽度下,预设和已保存混音变为一列。保存对话框居中,最大宽度 420px,Night Ink 遮罩 70%,绝不使用全新页面。
动效:加载预设时,场景强度在 220ms 内交叉淡入淡出,同时音频增益平滑渐变。选中卡片立即改变边框。对话框使用标准 180ms 入场;删除行仅使用不透明度,减少动效会移除所有过渡。
5. **工作原理对话框与页脚** — 帮助对话框标题为 'A room that follows your mix.'。它包含三个编号行:'01 Blend',文案 'Move any slider. The matching corner of the room changes with the sound.';'02 Listen',文案 'Press Listen to begin all five local loops together. Pause whenever you like; your levels stay put.';'03 Keep a mix',文案 'Save up to eight atmospheres on this device, or start a focus interval while you listen.'。一个小注释写着 'Five original procedural loops · CC0 · Stored with the site. No account, no streaming, no autoplay.'。通过一个清晰标注的按钮、X 图标、Escape 或遮罩点击关闭;捕获焦点并将其返回帮助触发器。
页脚左侧显示 [BRAND],后跟 'A quieter corner of the browser.'。右侧包含纯文本 'Original room art · Local audio · Your mixes stay on this device',以及启用时可选的 [CREDIT] 页脚链接。无社交链接、新闻通讯表单、定价、成员数量、日期、健康声明或虚构荣誉。
布局:对话框使用 Panel Plum、20px 圆角、24px 内边距、Fine Line 边框,以及由微妙分隔线隔开的三个行。页脚为全宽 flex 行,垂直内边距 28px,顶部 Fine Line 边框。在移动端堆叠,间距 12px,鸣谢在 14px 下保持清晰可读。
动效:仅使用标准对话框淡入和 8px 上升。页脚为静态。
## 资产(Assets)
- 图片(image):不使用任何第三方、图库、位图或生成的图像文件。将整个主视觉房间(hero room)、窗口标记、favicon、家具、植物、鸟、壁炉、雨、黑胶唱片和纹理,全部作为原创内联 SVG/CSS 绘制在 RoomScene.tsx 和本地 favicon 中。在 ASSETS.md 中记录:所有场景艺术均为本模板用代码绘制,未使用任何外部图像资产。
- 图标(icon):仅使用经过 tree-shaking 的 lucide-react 图标(ISC),包括 CloudRain、Coffee、Flame、Disc3、Bird、BookOpen、Volume2、VolumeX、Pause、Play、RotateCcw、Timer、Save、Trash2、X、Plus 和 Check。不要导入品牌图标集。在 ASSETS.md 中列出所导入的模块、https://www.npmjs.com/package/lucide-react、Lucide 贡献者以及 ISC 许可证。
- 字体(font):通过指定的 Fontsource 包(OFL)自托管 Fraunces Variable、DM Sans Variable 和 IBM Plex Mono 400/500。在 ASSETS.md 中列出生成的本地 woff2 路径、包源 URL、从随附 OFL 文件中复制的版权持有人以及 OFL 许可证。不使用 Google Fonts、Adobe Fonts 或其他字体 CDN。
- 视频(video):音频资产;无视频。scripts/generate-audio.mjs 以确定性方式生成 public/audio/rain.wav、cafe.wav、fireplace.wav、vinyl.wav 和 birds.wav,作为 12 秒、22050Hz、单声道、16 位的原创程序化循环。将生成器和 WAV 文件打包在本地。这些新合成的循环和生成器源码是原创模板资产,以 CC0 1.0 发布;在 ASSETS.md 中记录全部五个路径、生成器路径、“Original procedural audio generated for this template”以及 https://creativecommons.org/publicdomain/zero/1.0/。不要下载录音、模仿现有歌曲或使用可理解的人声。
## 禁止事项
- 不得复制任何现有氛围应用(ambience app)的房间插画、布局、控件样式、代码、提示词或原文文案;指定的 SVG 构图和界面必须从零实现。
- 不得使用可识别的品牌名称、标志、吉祥物、标志性角色、产品口号、品牌化物品、自定义字体、独特参考图标,或现有网站的精确配色。
- 不得添加真实人物、人脸、名人肖像、动漫、游戏或影视角色、宠物,或可识别的地标。鸟类仅限小型通用剪影。
- 不得热链或流式播放音频,不得使用未经核实具备再分发兼容 CC0 许可的录音。仅使用五个本地生成的原创 CC0 WAV 文件,绝不获取第三方音频。
- 不得自动播放声音、在用户手势之前创建 AudioContext、添加背景视频、使用可理解的语音、复现现有旋律,或让音频成为操作视觉混音器的必要条件。
- 不得使用后端、服务器代码、API 路由、账户、数据库、外部 API、分析、通知、会向任何地方提交的表单、云同步或分享声明。保存的混音和设置保留在 localStorage 中。
- 不得从 CDN 加载脚本、样式、字体、图标、图片或媒体。自托管固定的 Fontsource 字体,对 Lucide 进行 tree-shaking,使用原创 SVG 插画,并将全部五个 WAV 文件保留在构建产物中。
- 不得在固定技术栈之外添加 npm 依赖,或使用受限 UI 源码、商业字体、CC BY-NC、CC BY-SA、未授权包、占位图服务、Unsplash、Pexels 或 Pixabay。
- 不得将首屏做成以排版为主导的落地页、通用 bento 仪表盘、图库照片 hero、定价页或多步注册漏斗。交互式房间和混音器就是产品本身。
- 不得添加滚动劫持、视差、闪烁、自动播放轮播、光标跟随、虚假在线活动、用户数、连续打卡、生产力评分、日期、医疗声明、睡眠声明或心理健康声明。
- 不得输出 source map、将 src/ 复制到 dist/、使用绝对根路径资源 URL、超过 20 MB,或要求服务器。单条 npm run build 命令必须重新生成音频,并在 dist/ 中产出压缩的、使用相对路径的静态文件。
- 不得添加路由或裸目录链接。这是一个 index.html 页面;对话框是本地界面状态,每个内部帮助或预设控件都执行此处描述的行为。
- 不得忽略移动端或无障碍要求。在 1440×900 和 390×844 下必须零控制台错误,且无页面级横向溢出;所有控件都需要标签、键盘操作、可见焦点、44px 目标、适当的按下状态和减少动态效果行为。
---
— Prompt by VibeFather · https://vibefather.ai/t/lo-fi-room-ambience-mixer · 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: "Lo-fi Room Ambience Mixer"
colors:
night_ink: "#211C2A"
panel_plum: "#2D2637"
dusk_wall: "#493C55"
muted_lavender: "#B9AAC2"
warm_cream: "#F6E9D2"
old_paper: "#DFC9A9"
honey_amber: "#E8AA62"
ember_coral: "#D87350"
rain_blue: "#8299B6"
leaf_sage: "#8FA489"
walnut: "#765044"
fine_line: "#51445D"
typography:
room_invitation_and_large_timer_numerals: { family: "Fraunces Variable", weights: [600, 700] }
interface_body_copy_buttons_labels_and_dialogs: { family: "DM Sans Variable", weights: [400, 500, 600, 700] }
volume_percentages_timer_presets_and_tiny_status_labels: { family: "IBM Plex Mono", weights: [400, 500] }
spacing: "Use a 4px base grid with an 8px dominant rhythm. Page maximum width is 1480px; desktop gutters are 28px, tablet 20px, and mobile 14px. Header height is 68px. Intro has 28px top and 24px bottom padding. Workspace columns have a 20px gap. Scene and panel padding is 20px; compact control rows use 10px vertical gaps. Keep 44px minimum pointer targets and at least 8px between adjacent targets."
radius: "Scene card 24px, mixer and dialog panels 20px, preset cards 16px, standard buttons and inputs 12px, small icon buttons 10px, and status pills 999px. SVG furniture uses softly rounded joins rather than sharp geometric corners. Borders are one pixel; avoid nested floating cards and heavy glass effects."
---
# Lo-fi Room Ambience Mixer — 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
- **Night Ink** `#211C2A` — Page background, deepest shadows, and dark text on amber buttons.
- **Panel Plum** `#2D2637` — Mixer, timer, dialog, and saved-mix surfaces.
- **Dusk Wall** `#493C55` — Back wall of the illustrated room and secondary surfaces.
- **Muted Lavender** `#B9AAC2` — Secondary text and inactive icons on dark surfaces.
- **Warm Cream** `#F6E9D2` — Primary text, lampshade, paper, and highlights.
- **Old Paper** `#DFC9A9` — Books, labels, and soft border details.
- **Honey Amber** `#E8AA62` — Primary action, active slider, lamplight, and selected states.
- **Ember Coral** `#D87350` — Flame core, record label, and warm accents; not body text.
- **Rain Blue** `#8299B6` — Window sky, rain streaks, and cool ambient highlights.
- **Leaf Sage** `#8FA489` — Plants, birds' branch, success feedback, and quiet accents.
- **Walnut** `#765044` — Floor, desk, fireplace mantel, and furniture outlines.
- **Fine Line** `#51445D` — One-pixel borders and dividers on dark UI surfaces.
## Typography
- **Room invitation and large timer numerals** — Fraunces Variable (OFL), weights 600/700. Self-host the font files.
- **Interface, body copy, buttons, labels, and dialogs** — DM Sans Variable (OFL), weights 400/500/600/700. Self-host the font files.
- **Volume percentages, timer presets, and tiny status labels** — IBM Plex Mono (OFL), weights 400/500. Self-host the font files.
## Spacing & shape
- Spacing: Use a 4px base grid with an 8px dominant rhythm. Page maximum width is 1480px; desktop gutters are 28px, tablet 20px, and mobile 14px. Header height is 68px. Intro has 28px top and 24px bottom padding. Workspace columns have a 20px gap. Scene and panel padding is 20px; compact control rows use 10px vertical gaps. Keep 44px minimum pointer targets and at least 8px between adjacent targets.
- Radius: Scene card 24px, mixer and dialog panels 20px, preset cards 16px, standard buttons and inputs 12px, small icon buttons 10px, and status pills 999px. SVG furniture uses softly rounded joins rather than sharp geometric corners. Borders are one pixel; avoid nested floating cards and heavy glass effects.
## Motion
- Rain streaks fall on three staggered linear loops while droplets creep down the glass. Rain level controls visible streak count, opacity from 0 to 0.8, and duration from 2.8 seconds at high volume to a frozen hidden state at zero.
- Café level raises two cup-steam paths and shortens their drift loop from 5.5 to 2.8 seconds; a tiny spoon glints every 4 seconds only above 35 percent. This is a restrained visual metaphor, not a separate café illustration.
- Fireplace flames scale and skew gently on staggered 700–1200ms loops. Fire level controls flame height, ember opacity, and the amber wash on the nearby floor; zero leaves unlit logs without smoke.
- The vinyl disc rotates once every 1.8 seconds while its level is above zero, with a subtle tonearm bob and two level bars. Reduced motion holds the disc still and uses the label and bars to show the setting.
- Two small generic bird silhouettes on the outdoor branch hop at most once every 5 seconds and leaves sway slowly. Bird level controls their visibility and motion; there are no mascots, speech bubbles, or musical-note particles.
- Buttons and cards respond in 120–180ms with at most 2px translation. Dialogs fade and rise 8px over 180ms. Toasts remain for 2.4 seconds. No scroll-jacking, parallax, autoplay, flashing, infinite text marquee, or cursor follower.
- Under prefers-reduced-motion, remove every ambient and entrance animation, show a complete static room, keep all state cues readable, and leave audio behavior unchanged.
## Imagery
Create one detailed original inline SVG room, viewBox 0 0 1200 760, with no raster images or external illustration. Use a straight-on slightly elevated cutaway composition: large rain window and branch on the left, books and a turntable on a walnut desk in the foreground, steaming cup on a side table, fireplace and amber floor glow on the right, an empty upholstered reading chair, shaded lamp, plants, framed abstract lines, and layered rugs. Add a static low-opacity SVG grain filter and two or three broad color washes for depth; do not animate noise. No people, faces, pets, characters, logos, branded products, recognizable landmarks, copied room compositions, or text baked into the artwork. The complete room is the first-screen visual anchor, not a small decorative thumbnail.
## Tone
Warm, unhurried, concise, and lightly poetic without becoming whimsical or vague. Use practical control labels and small moments of hospitality. Make no medical, sleep, productivity, or mental-health claims.
---
— Prompt by VibeFather · https://vibefather.ai/t/lo-fi-room-ambience-mixer · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
改成你自己的
- 大学学习技能页面:将 BRAND 设为你的图书馆或学习中心,ROOM_NAME 设为安静的学习角落,并将邀请语指向考试季专注时段。
- 治疗师或教练的候诊室链接:使用平静的房间名称和场景设定,保留计时器,并将邀请语改写为简短的接地提示,不包含健康声明。
- 游戏或应用工作室的作品集项目:将 BRAND 设为工作室,以关卡或世界命名房间,并将预设替换为你自己项目中的氛围。
- 创意写作社区:以写作小屋命名房间,将 FOCUS_MINUTES 设为冲刺时长,并围绕共享写作会话重写搁架文案。
Lo-fi 房间氛围混音器:常见问题
如何更改 Lo-fi 房间氛围混音器模板中的房间、品牌和专注时长?
Lo-fi 房间氛围混音器模板将所有面向访客的字符串和默认值集中在一个内容文件中。将 BRAND 设为你的空间名称,ROOM_NAME 设为房间标题,ROOM_SETTING 设为描述该地点的简短小写短语,ROOM_TAGLINE 设为主视觉邀请语,FOCUS_MINUTES 设为 1 到 120 的整数,用于初始计时器和中间预设。重写配套文案以匹配新的房间。
怎么用 AI 做一个Lo-fi 房间氛围混音器?
复制本页的提示词,或者运行 npx vibefather add lo-fi-room-ambience-mixer,把 [BRAND]、[ROOM_NAME]、[ROOM_SETTING]、[ROOM_TAGLINE] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。
Lo-fi 房间氛围混音器模板的演示是哪个 AI 模型做的?
演示由 Kimi K3.1 Pro 在 Kimi Code 里完成;另一个案例由 DeepSeek V4.1 Flash 在 DeepSeek Harness 里完成。每次都用公开的提示词原样生成,没有额外补充,可以并排比较不同模型的效果。