跳到正文
VibeFather
免费注册

关于这个模板

锦鲤池网页小玩具是一个全屏单场景:从正上方俯瞰的庭院池塘,完全用代码绘制,底层是一个小型 WebGL 水面着色器,上层叠加 Canvas 2D。构建产物中没有任何图片、视频或音频文件。锦鲤游动时带有脊柱链式身体波浪、半透明鱼鳍和滑行-蹬水节奏,水底光斑缓缓爬动,睡莲叶、踏脚石和木桥的朱红栏杆框住水面。配色固定且好记:墨青水色、朱红锦鲤、奶油色文字和金色光。

它适合想要一个可分享的 canvas 演示、想在副屏上挂一个安静页面,或想以它为起点做自己的生成式场景的开发者和创作者。四季之间交叉淡入淡出(春花瓣、夏荷花与蜻蜓、秋银杏、冬冰雪),夜间模式会在任意季节之上叠加萤火虫和摇晃的灯笼倒影。三种手势做三件不同的事:轻点产生涟漪,按住撒食看鱼群聚拢,拖拽画出水流让鱼跟随。下雨开关会在水面播撒雨滴,打开后浏览器内合成生成式五声音阶配乐,专注模式隐藏界面并运行一个 25 分钟计时器,结束时以轻柔铃声收尾。

要改编它,通过变量修改名称、标语、开场季节、锦鲤数量和会话时长。所有文案放在一个内容文件里,每个场景参数放在几个小型 TypeScript 模块中,所以换鱼群名单或季节装饰都是局部修改。手机上会自动降质:限制像素比、减少鱼和粒子,减少动态效果设置会让整个池塘平静下来。默认池塘名为 Emberfin,是虚构的名字。

模板提示词

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

# Koi Pond Web Toy

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

## Brief
[BRAND] is a web toy: one full-viewport garden pond seen from directly above and drawn entirely in code. Koi with undulating bodies and flowing fins swim over light caustics, between lily pads, stepping stones and the edge of a wooden bridge. The visitor switches between four seasons, toggles night and rain, taps for ripples, presses and holds to feed the fish, drags to draw a current, turns on a generative soundtrack, and can start a [FOCUS_MINUTES]-minute focus mode that hides the interface so the page works as a desk background. The scene is the whole site: no marketing sections, no scrolling, no second page.

- Audience: People who keep a calm tab open while they work, and developers and designers who enjoy and share small code-drawn web toys.
- Goal: Look finished and beautiful as a still screenshot in the first two seconds, reward every touch with a believable physical response, and be pleasant enough to leave running for a whole focus session on a laptop or a phone.
- Tone: Quiet, unhurried and precise, like an ink-and-wash painting that happens to be alive. Copy is short, lower-key and concrete. No exclamation marks, no wellness slogans.

## Stack
- Framework: Vite 5 + TypeScript, no UI framework
- Styling: Vanilla CSS
- Libraries: vite (MIT), typescript (Apache-2.0), lucide-static (ISC), @fontsource/shippori-mincho-b1 (OFL-1.1), @fontsource-variable/instrument-sans (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - vite.config.ts: set base to './' and build.sourcemap to false. Nothing from src/ is copied into dist/.
  - index.html: title '[BRAND] · Koi Pond', a link to ./favicon.svg, and an inline style block that sets html and body to background #0E3B43, margin 0, overflow hidden, so the page is ink-teal from the very first paint. public/favicon.svg is hand-written: a vermilion #F2542D koi curved into a C shape on an ink-teal #0E3B43 circle.
  - File layout: src/content.ts holds every string and the variable values; src/main.ts boots the stage; src/quality.ts picks and adjusts the quality tier; src/scene/water.ts (WebGL shader plus 2D fallback), koi.ts, flora.ts (lily pads, lotus, stones, bridge), particles.ts, ripples.ts, seasons.ts, night.ts; src/input.ts for gestures; src/audio.ts for all sound; src/ui.ts and src/styles.css for the title, dock and focus mode.
  - Fonts: import '@fontsource/shippori-mincho-b1/latin-500.css', '@fontsource/shippori-mincho-b1/latin-700.css' and '@fontsource-variable/instrument-sans' in src/main.ts. Only the Latin subset of the display face is imported so the build stays small. Font stacks: display is 'Shippori Mincho B1', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; text is 'Instrument Sans Variable', system-ui, sans-serif.
  - Icons: import the SVG files from lucide-static with Vite's ?raw suffix (for example 'lucide-static/icons/leaf.svg?raw') and inline them, so they inherit currentColor. Set stroke-width to 1.75.
  - All colors are CSS custom properties on :root with the exact hex values from the Design section, and the same values are exported from src/scene/palette.ts for canvas and shader use. Do not approximate or re-tint the four core colors.
  - Use one seeded pseudo-random generator (mulberry32, seed 7) for everything in the scene: fish roster, pad positions, particle paths. Never call Math.random in scene code, so every load opens on the same composition.
  - Read three optional query parameters on load: season (spring, summer, autumn, winter), night (1 or 0) and rain (1 or 0). They override [START_SEASON] and [START_NIGHT] and make any state linkable.
  - Expose a small read-only object window.__pond with firstFrameMs (time from navigation start to the first fully drawn frame), tier (high, mid or low) and fps (rolling average), for checking performance.

## Variables
- [BRAND] — Name of the pond (default: "Emberfin"). Shown as the large title, the small wordmark and the page title. Invented, one or two words.
- [TAGLINE] — One line under the title (default: "A small pond for long thoughts."). Up to about 40 characters, sentence case, ends with a period.
- [START_SEASON] — Season the pond opens in (default: "autumn"). spring, summer, autumn or winter.
- [START_NIGHT] — Open in night mode (default: "off"). on or off.
- [KOI_COUNT] — Number of koi on a desktop screen (default: "9"). A whole number from 4 to 16. Phones and slower devices show fewer automatically.
- [FOCUS_MINUTES] — Length of a focus session in minutes (default: "25"). A whole number from 1 to 90. Used by the timer, the dock label and the session-complete card.
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/koi-pond-web-toy 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
- Ink Teal `#0E3B43` — The water, the page background and text on gold or cream surfaces. Hard-coded exactly; it must cover most of the first screen.
- Vermilion `#F2542D` — Koi bodies and patches, the lacquered rail along the bridge edge, lantern rims, the blush on lotus tips. Hard-coded exactly; never used for body text.
- Cream `#F5EFE0` — All interface text and icons, koi bodies and fins, petals, snow, ripple rings and caustic light. Hard-coded exactly.
- Gold `#E0B04A` — Ginkgo leaves, gold koi, lantern and firefly light, bridge post caps, the Focus button, active toggle marks and the focus progress line. Hard-coded exactly.
- Deep Water `#082A31` — Vignette toward the corners, floor mottling, koi shadows, the tint behind the dock.
- Night Water `#061C24` — Water color in night mode and the night tint drawn over the scene.
- Ink `#10262B` — Koi eyes, speckles and dorsal ridge, gaps between bridge planks.
- Pad Green `#2E6F5E` — Lily pad base and moss on stones. Stays close to the water hue so the four core colors lead.
- Pad Light `#4C9A7A` — Lily pad veins and the fresh spring pads.
- Stone `#6F8480` — Stepping stones, with #8FA39D speckles on top.
- Bridge Wood `#7A4A2E` — Bridge planks, alternating plus and minus 5 percent lightness.
- Blush `#F6B8A8` — Base of spring petals and tips of lotus petals (a mix of cream and vermilion).
- Ice `#CFE6E4` — Winter ice plates at low opacity and frost rims on pads.
- Amber `#C98F3A` — Darker ginkgo leaves and food pellets.

### Typography
- Display: the [BRAND] title, season names, timer digits, the session-complete heading. Weight 500 for large sizes, 700 for the small wordmark. A mincho serif with softened, ink-bled corners.: Shippori Mincho B1 (OFL), weights 500/700
- Text: tagline, gesture hints, dock labels, tooltips, buttons. Labels are 13px, weight 600, uppercase, letter-spacing 0.06em; the tagline is 17px, weight 400, line-height 1.45.: Instrument Sans Variable (OFL), weights 400/500/600

### Layout & motion
- Spacing: No page grid: the scene fills the viewport. Interface elements sit on an 8px scale, inset 56px from the edges on the wide layout and 20px on the tall layout, plus env(safe-area-inset-*) on every side. Dock height 56px with 6px inner padding and 4px gaps. Every control is at least 44px tall; on phones dock cells may narrow to 36px wide but stay 48px tall. Scene sizes use one unit u = sqrt(viewportWidth × viewportHeight) / 1140, so u is 1px at 1440×900 and 0.5px at 390×844.
- Radius: Dock, buttons and tooltips are full pills (999px). Cards are 20px. The focus progress line has square ends. The only interface shadow is 0 12px 40px rgba(4, 22, 27, 0.35) under the dock and cards; text over the water gets text-shadow 0 1px 18px rgba(8, 42, 49, 0.55) instead of a panel.
- Motion: Every movement has a physical cause (water, wind, a fish deciding something) or marks a state change. Nothing loops just to look busy, and no two neighbours share a phase: every period and delay is drawn from a range by the seeded generator.
- Motion: Two interface easings only. Soft out: cubic-bezier(0.22, 1, 0.36, 1) for things arriving. In-out: cubic-bezier(0.65, 0, 0.35, 1) for cross-fades between states. Interface durations: 240ms for hover and reveal, 360ms for the season thumb, 600 to 900ms for the title and focus fades.
- Motion: Koi swim in a glide-and-kick rhythm: 1.6 to 3.2s of tail beats, then 0.8 to 1.6s of gliding with the body wave at 35 percent amplitude while speed decays by a fifth. Speed changes follow a critically damped spring with a 0.8s time constant, and turning is capped at 70 degrees per second at cruise, so turns are arcs, never spins.
- Motion: Ripples expand with an ease-out cubic radius and fade with an exponential opacity curve over 2.6s: fast and bright at birth, slow and faint at the end.
- Motion: Season changes are 2.4s in-out cross-fades with staggered parts; night is 1.8s in-out; rain ramps in over 2.5s and out over 4s. Interrupting a transition continues from the current blended state, never snapping.
- Motion: The simulation runs on real elapsed time with the frame delta clamped to 1/30s, pauses while the tab is hidden, and follows the reduced-motion rules in the last section.
- Imagery: Everything is drawn in code as flat, painterly shapes: solid fills with one lighter and one darker tone, soft offset shadows, no outlines, no photo textures, no sprites. Depth comes from layering (floor and caustics, fish and their shadows, surface plants and structures, ripples and light on top). The first screen's visual anchor is the scene itself: vermilion and gold on ink-teal with a large cream title.

## Pages & Sections
### [BRAND] · Koi Pond (`index.html`)
1. **Stage and first frame** — One fixed stage, 100vw by 100dvh, no scrolling, no other sections. It holds three stacked canvases and a DOM interface layer. The first screen must already be the finished picture: within 2 seconds of navigation start (check window.__pond.firstFrameMs on a normal laptop connection) the frame shows the ink-teal water with caustics, all koi mid-stroke, the lily pads, stepping stones, bridge edge, the season's leaves or petals already floating, the large [BRAND] title and the dock. There is never a black or white screen, a loading spinner, a progress bar, a splash or a 'click to start' state, and nothing on the first screen waits for a click, for sound or for fonts.
   Layout: Stacking order from the bottom: canvas#water (WebGL: floor, caustics, ripple refraction), canvas#life (2D: koi shadows, koi, food), canvas#surface (2D: pads, lotus, stones, bridge, ice, ripple rings, particles, night tint, lights), then the interface layer. All canvases use touch-action: none and user-select: none. Positions are fractions of the viewport width W and height H. Wide layout (W at least 900px and W at least H): the bridge covers the top-right corner, its edge running from (0.56W, 0) to (W, 0.38H); stepping stones arc through the bottom-left corner at (-0.01, 0.62), (0.05, 0.75), (0.12, 0.86), (0.21, 0.95), (0.29, 1.04); lily pad clusters sit at (0.68, 0.62) with 5 pads, (0.24, 0.47) with 4 pads and (0.47, 0.22) with 2 pads; the title is top-left; the dock is bottom-center; the koi school loosely orbits (0.50, 0.54). Tall layout (everything else, including phones): bridge edge from (0.58W, 0) to (W, 0.15H); 4 stones at (-0.03, 0.63), (0.09, 0.71), (0.05, 0.81), (0.14, 0.86); pad clusters at (0.70, 0.56) with 4 pads, (0.26, 0.38) with 3 pads and (0.42, 0.74) with 1 pad; title top-left with max-width 50vw so it never touches the bridge; dock across the bottom. On resize or rotation (debounced 150ms) the anchors are re-laid out, static parts are redrawn into their caches, and fish keep their positions, clamped into view.
   Motion: Boot is synchronous: create the canvases, build the scene from the seeded generator, then run 300 simulation steps (5 seconds of pond time) before the first paint so the first frame shows fish spread along natural arcs, 14 leaves or petals already floating and 8 in the air. Draw the 2D layers in the first animation frame even if the shader is still compiling; canvas#water has a CSS background of a radial gradient from #0E3B43 at the center to #082A31 at the corners, so the frame is complete without WebGL. Total JavaScript stays under 150 KB gzipped.
2. **Water, floor and caustics** — A single raw WebGL fragment shader on a full-screen triangle, written from scratch (no shader library). It paints the pond floor in Ink Teal #0E3B43 with soft value-noise mottling of plus or minus 6 percent lightness and a vignette toward Deep Water #082A31 in the corners, then adds light caustics: a web of thin bright veins in Cream #F5EFE0 with cells about 90u to 140u across, added at 12 percent strength by day. Build the veins from two layers of an animated cellular pattern (distance to the nearest cell edge, sharpened with a power of 6), the second layer at 1.7 times the scale; where veins of both layers cross, the light pools brighter. Seasonal tint: spring pure cream, summer 25 percent brighter, autumn mixed 40 percent toward Gold #E0B04A, winter 60 percent strength and slightly cooler.
   Layout: Fills the viewport behind everything. Uniforms: time, resolution, season mix, night amount, rain amount and an array of up to 24 ripples (x, y, radius, strength). Each ripple displaces the floor and caustic lookup by up to 6u along the ring's normal within an 18u-wide band around its radius, so caustics visibly bend as a ring passes. Fallback when WebGL is unavailable or the context is lost: generate three tileable caustic textures on offscreen 2D canvases at boot (stroked cell edges, softened by drawing them at three slightly different scales) and draw two of them with the 'lighter' blend mode at 10 percent alpha, drifting in opposite directions.
   Motion: The cell points orbit inside their cells so the web breathes with a period of about 7 seconds; the two layers drift in opposite directions at 5u and 8u per second. The motion is slow and continuous, never flickering. Under rain the caustics fade to 35 percent over 1.5s because the sun is gone; at night they fall to 5 percent and read as faint moonlight.
3. **Koi** — [KOI_COUNT] procedural koi (9 by default) drawn on canvas#life, sorted by depth. Roster in order, lengths in u: 1) the elder, 240, cream body with three vermilion saddle patches; 2) 200, solid vermilion with cream-edged fins; 3) 190, gold with a cream head; 4) 180, cream with one round vermilion spot on the crown; 5) 175, vermilion with ink speckles along the back; 6) 170, cream with gold and vermilion patches; 7) 160, solid gold with a faint darker scale net; 8) 150, all cream and slightly translucent; 9) 150, vermilion head fading to a cream tail. A smaller count takes the first N; a larger one repeats the roster from 2 with lengths between 150 and 200. Each fish is built on a spine of 12 points (9 on the low tier). The body is a closed smooth path offset left and right of the spine by a width profile: rounded nose, widest at 30 percent of the length (0.21 of the length across), tapering to 0.035 at the tail root. Patches are 2 to 4 soft blobs stored in body coordinates and clipped to the body, so they bend with it. Two ink eye dots sit 8 percent back from the nose, a thin ink dorsal ridge runs from 30 to 60 percent, and a cream highlight at 12 percent alpha runs along the back. Pectoral fins at 24 percent are translucent fans (cream at 55 percent alpha with five thin ribs). The tail is a two-lobed fan 0.26 of the length long, body color at 70 percent fading to transparent at the tips. Under each fish a soft shadow in Deep Water at 28 percent alpha is offset by (10u, 14u), drawn as the body shape twice at 1.0 and 1.12 scale instead of using canvas blur. Deeper fish are 8 percent smaller, 18 percent more teal and have a closer shadow.
   Layout: Fish live in the whole viewport and may pass under the bridge, the stones and the lily pads, which are drawn above them. Steering combines separation (radius 0.9 body lengths), a little alignment (weight 0.3) and cohesion (weight 0.15) with a slow heading wander whose period is 6 to 11s per fish, plus a soft turn-back that starts 140u from any viewport edge. The school loosely orbits its home point but each fish keeps its own line.
   Motion: The head leads and each spine point follows the one ahead at a fixed distance, which gives natural follow-through in turns. On top of that a travelling sine wave runs head to tail, one wavelength per body length, its sideways amplitude rising from 0 at the head to 0.11 of the length at the tail. Tail-beat frequency follows speed: 0.9 Hz at cruise (38 to 55u per second depending on size, big fish slower), up to 2.4 Hz in a burst (190u per second). Each fish alternates kicks and glides as set in the motion rules. Pectoral fins row between 25 and 70 degrees from the body in antiphase with the tail and flare to 85 degrees when the fish brakes or turns hard. The tail trails with its own spring (stiffness 40, damping 8) and exaggerates the bend of the last two spine segments by 1.6 times, so it sweeps like silk behind the body. Depth drifts slowly for each fish. In winter cruise speed drops to 60 percent.
4. **Lily pads, stepping stones and bridge edge** — Lily pads: 11 on the wide layout and 8 on the tall one, radius 34u to 66u, each a disc in Pad Green #2E6F5E with a 28-degree V notch at a random rotation, nine thin veins in Pad Light #4C9A7A at 25 percent alpha, a slightly darker rim and a soft shadow on the water offset (8u, 11u) at 30 percent. Stepping stones: flat irregular rounded shapes, radius 46u to 70u, in Stone #6F8480 with lighter speckles, a dark waterline rim in Deep Water and a small moss patch on two of them; the outer ones are cut off by the viewport edge. Bridge edge: only the corner of a wooden deck is visible. Planks 44u wide in Bridge Wood #7A4A2E run perpendicular to the edge with 2u ink gaps and alternating lightness, two or three grain lines each. Along the edge runs a 10u lacquered rail in Vermilion #F2542D with a thin cream highlight, and two round posts sit on the rail at 30 and 72 percent of its length, each with a Gold #E0B04A cap and a round paper lantern beside it (cream by day, unlit). The bridge and stones cast a soft shadow on the water offset (14u, 18u). No crests, seals, characters or lettering on any of them, and the bridge is a generic deck, not a recognizable real bridge.
   Layout: Positions as given in the stage section. Stones and bridge are static: render them once per resize and per season into an offscreen canvas and blit it each frame. Pads are drawn live because they move.
   Motion: Each pad drifts on a tiny closed path (plus or minus 3u, two different periods between 5 and 9s) and rocks plus or minus 2 degrees. When a ripple ring passes a pad it is pushed 4u outward and swells to 1.03 scale, then springs back over 500ms. Pads within 60u of a drawn current slide up to 6u along it and return. Stones and bridge never move.
5. **Title and wordmark** — On load the pond is presented like a poster: the title '[BRAND]' in the display face, the tagline '[TAGLINE]' under it, and under that one row of three gesture hints: 'Tap for ripples', 'Hold to feed', 'Drag a current'. After the visitor's first interaction with the water the large title gives way to a small '[BRAND]' wordmark. When the builder supplies a credit line (see the Credit section), show it as an 11px cream link at 60 percent opacity in the bottom-left corner; it hides together with the dock.
   Layout: Top-left, inset 56px on the wide layout and 20px on the tall one. Title: display face, weight 500, size clamp(44px, 8.4vw, 128px), line-height 0.95, letter-spacing -0.01em, Cream, allowed to wrap to two lines. Tagline: text face 17px at 78 percent cream, 16px below the title. Hints: 13px uppercase labels separated by 20px, each with a 14px icon (droplets, hand, waves), 20px below the tagline; on phones they stack vertically. Text sits directly on the water with the soft text-shadow, no panel. The small wordmark is display face, weight 700, 22px, in the same corner.
   Motion: On the first tap, hold or drag on the water, the title block fades and slides up 12px over 600ms (in-out) while the wordmark fades in over 400ms after a 300ms delay. The hint row stays 24px under the wordmark; each hint dims to 35 percent and swaps its icon for a gold check the first time its gesture is used, and the row fades out 2s after all three are done or 20s after the first interaction. Before any interaction nothing here moves.
6. **Control dock** — One floating dock with, in order: a four-way season switch (Spring with the flower-2 icon, Summer with sun, Autumn with leaf, Winter with snowflake), a hairline divider, three toggles (Night with moon, Rain with cloud-rain, Sound with volume-x when off and volume-2 when on) and the Focus button (timer icon and the label 'Focus [FOCUS_MINUTES]:00'). In winter the Rain toggle's label and tooltip read 'Snow'. Keyboard: 1 to 4 pick a season, N night, R rain, M sound, F focus, Escape leaves focus mode. Every control is a real button with an aria-label and aria-pressed, and a 2px gold focus-visible ring offset by 2px.
   Layout: Bottom-center, 24px above the safe area. Background rgba(8, 42, 49, 0.62) with backdrop-filter blur(14px) saturate(1.2), a 1px border of cream at 14 percent alpha, height 56px, full pill. Wide layout: season buttons show icon and label, toggles are 44px icon buttons with a tooltip that appears above after 400ms of hover or on keyboard focus, the Focus button is a Gold #E0B04A pill with Ink Teal text. The active season sits on a Cream thumb with Ink Teal icon and text. A toggle that is on shows its icon in gold with a 4px gold dot beneath. Tall layout: the dock spans the width with 12px margins as eight equal cells, icons only (the Focus cell shows the timer icon and the number of minutes), each at least 36px wide and 48px tall.
   Motion: The season thumb slides to the chosen button in 360ms with the soft-out easing. Buttons brighten on hover in 240ms and press to 0.96 scale. The dock and wordmark stay fully visible until the visitor's first interaction; after that they fade to 0 opacity and drop 8px after 6s without pointer movement, touch or key press (never while the pointer is over the dock or a control has focus), and return in 240ms on any pointer movement, touch or key. For its first 8 seconds the Sound toggle carries one slow gold ring pulse every 2.4s as an invitation; it stops for good when any control is used.
7. **Gestures: tap, hold, drag** — Three gestures on the water, the same for mouse, pen and touch through Pointer Events, with up to three pointers at once. Tap (released within 250ms, moved less than 12px): ripples. Press and hold (350ms without moving 12px): scatter food for as long as the press lasts, following the finger if it then moves. Drag (moved 12px before the hold threshold): draw a current. The long-press context menu, text selection and callout are suppressed on the canvases, and the mouse cursor over the water is a 20px cream ring drawn as an inline SVG data URI.
   Layout: Tap: three concentric rings start 0, 140 and 300ms after the tap. Each grows from 6u to 240u radius, stroke from 2.2u to 0.6u in Cream. At most 24 rings are alive (16 mid tier, 12 low); the oldest is dropped. Hold: while the press is building, a thin gold ring around the pointer fills clockwise over the 350ms so the gesture is discoverable. Then pellets fall at 9 per second within 46u of the pointer: 3.5u Amber #C98F3A dots with a cream speck, each landing with a small ring that reaches 26u in 0.7s. At most 60 pellets are alive (36 on low); uneaten pellets drift with currents and fade after 14s. Drag: the path is sampled every 24u and kept for 9s. It is shown as three thin cream streaks at 35 percent alpha following the path with dashes that travel in the drag direction at 120u per second, fading over the last 3s. At most three currents exist at once.
   Motion: Ripple radius eases out (cubic) over 2.6s; opacity follows 0.55 × e^(-2.2t) across the ring's life with a linear fade to zero in the last fifth. The same rings are sent to the water shader so the caustics bend. Koi within 140u of a tap dart directly away at burst speed for 0.6s and settle back to cruise over 1.8s; koi between 140u and 380u turn toward the spot after 500ms, drift past it and resume. Food: every koi notices pellets, but each reacts after its own delay of 150 to 900ms so the school turns in a wave, not at once. They approach at 1.6 times cruise, slow inside 90u, and circle the feeding spot as a loose rotating rosette. When a mouth comes within 10u of a pellet it vanishes with a tiny cream ring and the fish flicks its head. When the food is gone they linger 2 to 3s, then peel away outward one by one. Current: koi within 180u of the path align to its direction (weight 0.8) and ride it at 1.3 times cruise like a stream, leaving at its end; floating petals, leaves and pellets are carried along at 60u per second.
8. **Seasons** — Four switchable seasons, opening in [START_SEASON]. Each has a name and a line shown on a season card: Spring, 'Petals on the water'; Summer, 'Lotus and dragonflies'; Autumn, 'Ginkgo gold'; Winter, 'Thin ice, slow fish'. Spring: pads are smaller (0.8 radius) and fresher (Pad Light), 60 percent of them present; up to 46 petals in the air and 60 afloat, each a rounded teardrop in Cream with a Blush #F6B8A8 base. Summer: all pads at full size; three lotus blooms on pads, each with two rings of pointed petals in cream with blush tips around a gold seed head; two dragonflies (one on the low tier) with a thin gold body, two pairs of translucent cream wings and a shadow offset (22u, 30u) because they fly high. Autumn: 80 percent of the pads, some with amber edges; up to 38 ginkgo leaves, fan-shaped with a center notch and a short stem, in Gold #E0B04A and Amber. Winter: 30 percent of the pads with a cream frost rim; five to seven large polygonal ice plates in Ice #CFE6E4 at 16 percent alpha with cream crack lines at 35 percent and dark open water between them; snow caps on the stones; 140 snowflakes (98 mid, 60 low) as cream dots 1.5u to 4u.
   Layout: Falling things are drawn on canvas#surface above the pads, with a faint shadow on the water that closes in as they descend; once landed they lie flat on the surface below ripple rings. The season card appears centered horizontally at 38 percent of the height: the name in the display face at clamp(40px, 6vw, 92px), the line under it in the text face at 15px and 78 percent cream. It is not shown on first load, only when the season changes.
   Motion: Switching takes 2.4s with the in-out easing. In the first 1.2s the outgoing season stops spawning and its particles sink and fade; across the whole 2.4s the caustic tint, pad sizes (each pad on a spring, staggered 40ms) and fish speed blend to the new values; from 1.2s to 2.4s the incoming season's spawn rate ramps from zero to full. The season card rises 12px and fades in over 500ms (soft out), holds 1600ms and fades out over 700ms. Petals tumble as they fall (rotation plus a flip in width), land with a tiny ring and then drift on a breeze of 8u per second toward the lower left. Ginkgo leaves fall with a pendulum sway of plus or minus 28 degrees at 0.5 Hz, land with a ring and turn slowly as they float. Lotus blooms open petal by petal over 1.8s when summer arrives and sway 2 degrees. Dragonflies hover with a fine jitter for 1.2 to 2.6s, dart 180u to 320u in 0.35s with a hard ease-out, and now and then rest on a pad or bloom for 3 to 5s. Ice plates drift at 2u per second; koi under ice look a quarter dimmer. A tap on ice does not ring: it draws a star crack of five to seven fine cream lines 30u to 70u long in 180ms, which heals over 6s, with one muted ring at 40 percent strength beneath; a tap on open water ripples as usual. Snowflakes drift diagonally, larger ones faster, shrinking as they near the surface, then vanish on water or settle on ice.
9. **Night mode** — An independent toggle that works on top of any season; the pond opens with it [START_NIGHT]. Water shifts to Night Water #061C24, a tint of #0A2230 at 46 percent is drawn over the whole scene, and lights are added on top with the 'lighter' blend mode: the two bridge lanterns glow (gold core, vermilion rim, a soft halo of 70u), each lays a reflection on the water below the bridge edge, and fireflies appear over the pond: 26 on the high tier, 18 mid, 12 low, at full count in summer and half in spring and autumn. In winter there are no fireflies; instead snowflakes within 220u of a lantern catch its light and turn gold.
   Layout: The tint is one full-screen fill on canvas#surface after all surface objects and before the lights. Each lantern reflection is a gold streak reaching 160u out from the bridge edge, built from seven horizontal slices (five on mid and low tiers) that narrow and fade with distance. Each firefly is a 2u Gold #E0B04A point with a 10u halo and a fainter glow dot on the water directly beneath it.
   Motion: Day to night and back take 1.8s with the in-out easing; lanterns light up 400ms after the tint starts so the dark arrives first. Reflection slices slide sideways independently by plus or minus 6u at 0.4 to 0.9 Hz, and a ripple ring crossing them triples that wobble for 1s. Fireflies wander on slow curved paths at 12u to 20u per second and pulse on their own cycles of 2.8 to 4.5s with a sine ease, dark for about a third of each cycle.
10. **Rain** — A toggle that seeds the surface with raindrops and changes the light and the sound. Drops land at random points: 14 per second on the high tier, 10 mid, 7 low. In winter the same toggle thickens the snowfall to 2.5 times the flakes instead of making drops.
   Layout: Each drop is one ring growing from 4u to 46u in 0.9s with a small cream dot at its center for the first two frames. Raindrop rings count toward a separate cap of 40 and are not sent to the shader. While it rains the whole scene is 8 percent darker.
   Motion: Rain ramps in over 2.5s and out over 4s with the in-out easing: drop rate, darkening and the caustic fade all follow the same ramp. Floating leaves and petals jitter slightly when a drop lands within 30u. Koi ignore rain.
11. **Generative soundtrack** — All sound is synthesized with the Web Audio API; there are no audio files. Sound is off on load and starts only when the visitor turns on the Sound toggle (which also creates the audio context inside that click). The toggle is the mute control and shows its state at all times. Layers: a drone of two soft oscillators at D3 and A3 through a 900 Hz low-pass with a 0.07 Hz tremolo; a melody of bell-like notes (a sine plus a quieter triangle an octave up, 20ms attack, 3.2s exponential decay) picked by a random walk of at most two steps on a pentatonic scale, one note every 1.4 to 4.2s with a one-in-four chance of a second note 380ms later, fed into a feedback delay (0.42s, feedback 0.35, 30 percent wet); a water bed of generated noise through a band-pass that sweeps 400 to 900 Hz at 0.11 Hz. Scale by season: spring and summer D major pentatonic (D E F# A B), autumn D minor pentatonic (D F G A C), winter the same minor scale an octave higher with gaps of 3 to 7s and a glassier tone. Night drops the melody an octave and, outside winter, adds synthesized crickets (short 4.2 kHz chirp triplets every 1.5 to 3s, very quiet). Rain adds a high-passed noise bed and about three small pitched drips per second. Touch sounds: a tap plays a soft 'bloop' (a sine gliding from 520 to 260 Hz in 160ms) panned to the tap's horizontal position; pellets tick lightly (rate-limited to 12 per second); a crack on ice is a short bright click; a season change plays a rising two-note interval from the new scale.
   Layout: Signal path: every layer into a master gain (0.5), a gentle compressor, then the output. No visual panel beyond the Sound toggle.
   Motion: The master fades in over 1.5s and out over 0.8s. Rain and night layers follow the same ramps as their visuals (2.5s in, 4s out; 1.8s). Notes are scheduled slightly ahead on the audio clock so timing stays even when frames drop. Sound keeps playing when the tab is in the background so the pond can accompany other work.
12. **Focus mode** — The Focus button turns the pond into a desk background with a [FOCUS_MINUTES]-minute timer. The dock, wordmark, hints and cursor ring fade away, leaving only the scene, a hairline progress line and small remaining-time digits. The water still answers taps, holds and drags. Moving the pointer or touching the screen reveals one small pill in the top-right corner with 'Pause' (or 'Resume') and 'Exit focus'; Space also pauses and Escape exits. At zero a soft chime plays, one slow gold ring spreads from the center of the pond, and a card appears: heading 'Session complete', line '[FOCUS_MINUTES] minutes by the water. The koi kept watch.', buttons 'Another round' and 'Back to the pond'. The chime is the timer's purpose, so it plays even when the ambient soundtrack is off (starting focus mode is the gesture that unlocks audio).
   Layout: Progress line: 2px tall along the very bottom edge, full width, track in cream at 10 percent, fill in Gold at 55 percent growing left to right. Digits: display face, 28px, cream at 28 percent opacity, bottom-left with the standard inset, format MM:SS, each character in a fixed-width slot of 0.62em so the numbers never jitter. The pill matches the dock's style at 40px height. The card is centered, 360px wide at most, 20px radius, dock background, with the heading in the display face at 36px and the primary button in gold.
   Motion: Entering: interface fades out over 800ms (in-out) and the progress line and digits fade in over the same time. The pill appears in 240ms and hides after 3s without input. The timer is computed from wall-clock timestamps, not frames, so it stays correct when the tab is hidden; where the Screen Wake Lock API exists, hold a screen wake lock during the session and release it on exit, failing silently otherwise. The chime is three strikes 1.6s apart, each a bell of A4, A5 and E6 partials with a 6s decay. The gold ring grows to the far corner in 4s with the ripple easing, and the card fades up 12px in 600ms (soft out) one second after the first strike.
13. **Adaptive quality and phones** — The pond must stay smooth on phones, aiming for 60 frames per second and never settling below 30. Pick a tier at boot: low when the primary pointer is coarse or the shorter viewport side is under 600px; otherwise mid when the device reports 4 or fewer logical cores or 4 GB or less of memory; otherwise high. High: 2D canvases at min(devicePixelRatio, 2), water at min(devicePixelRatio, 1.5), all [KOI_COUNT] koi, full particle counts. Mid: 2D at min(devicePixelRatio, 1.5), water at 0.75 of CSS pixels times min(devicePixelRatio, 1.5), 80 percent of the koi, 70 percent of particles. Low: 2D at min(devicePixelRatio, 2), water at 1.0 of CSS pixels (pixel ratio 1), 60 percent of the koi (at least 4) with 9-point spines, 45 percent of particles, one caustic layer instead of two.
   Layout: No visible quality control. The tier-specific counts quoted in the other sections (rings, fireflies, raindrops, pellets, snow, lantern slices) all come from one table in src/quality.ts.
   Motion: A governor watches the average frame time over the last 90 frames. Above 22ms for 2 seconds it steps one tier down while running: surplus koi swim off-screen and do not return, and particles stop spawning until they are under the new cap, so nothing pops. Below 12ms for 10 seconds it may step back up, never above the tier chosen at boot. Hot loops allocate nothing per frame: ripples, pellets and particles come from fixed pools. The loop stops while the tab is hidden and resumes without a time jump.
14. **Reduced motion** — When prefers-reduced-motion is set to reduce (checked at boot and on change), the pond is still a finished, living picture but much calmer: koi swim at 35 percent speed with half the tail amplitude and never burst; caustics drift at a quarter speed; petals, leaves and snow rest on the surface at 60 percent count with nothing falling; one dragonfly rests on a pad; fireflies stay in place with a slow 6s glow; lantern reflections hold still. A tap makes a single ring lasting 1.2s and pads do not bob. Rain falls at 3 drops per second. Feeding and currents still work, at the reduced fish speed.
   Layout: Same composition and controls.
   Motion: Season, night and focus changes become 400ms opacity cross-fades with no movement; interface transitions are 150ms opacity only; the invitation pulse on the Sound toggle and the sliding of the season thumb are removed.

## Assets
- image: None to download. Every visual is drawn in code: the water in a WebGL fragment shader, everything else with Canvas 2D paths. No photographs, textures, sprite sheets, video or audio files anywhere in the project. public/favicon.svg and the cursor ring are hand-written SVG.
- icon: lucide-static (ISC), installed from npm and inlined from its icons folder: flower-2, sun, leaf, snowflake, moon, cloud-rain, volume-2, volume-x, timer, pause, play, x, check, droplets, hand, waves. If a name is missing in the installed version, draw an equivalent 24px stroke icon by hand. Listed in ASSETS.md.
- font: Self-hosted through npm: @fontsource/shippori-mincho-b1 (Latin subset, weights 500 and 700) and @fontsource-variable/instrument-sans, both OFL-1.1. Vite bundles the woff2 files into dist/. Listed in ASSETS.md with package name, source URL, author and license.

## Don'ts
- Do not show a black or white screen, a loading spinner, a progress bar, a splash screen or a 'click to start' state. The first frame, within 2 seconds, already contains koi, caustics, lily pads, the title and the dock.
- Do not change, approximate or re-tint the four core colors: #0E3B43, #F2542D, #F5EFE0 and #E0B04A are used exactly as written.
- Do not use system default fonts for the title or labels, and do not load fonts from any CDN or font service. Fonts come only from the two Fontsource packages and ship inside dist/.
- Do not add any image, video or audio file: no photo textures, sprite sheets, sampled nature recordings or music loops. Everything is drawn and synthesized in code.
- Do not add a UI framework, an animation library, a 3D engine or a shader library. Raw WebGL, Canvas 2D, the Web Audio API and vanilla CSS only.
- Do not add a backend, API calls, analytics, cookies, forms or any third-party request. Everything is local and static.
- Do not use CDN script or link tags. Do not hotlink anything.
- Do not ship source maps or copy src/ into dist/. Keep dist/ far under 20 MB (it should be well under 1 MB).
- Do not use absolute asset paths; keep Vite's base at './' so the site works from any subfolder. The site is the single file index.html.
- Do not autoplay sound. Audio starts only from the Sound toggle or from starting focus mode, and the Sound toggle always shows the current state.
- Do not add marketing sections, scrolling content, pricing, testimonials, sign-up prompts or a second page. The pond is the whole site.
- Do not move things for decoration: no pulsing buttons (beyond the one 8-second invitation on the Sound toggle), no looping interface animation, no parallax on the title, no screen shake.
- Do not let fish spin in place, turn instantly, swim in sync or pop in and out of existence. Counts change only by fish leaving or entering at the viewport edge.
- Do not hard-cut between seasons or between day and night, and do not snap when a transition is interrupted.
- Do not ignore prefers-reduced-motion, and do not render above the pixel-ratio caps of the quality tiers.
- Do not let a long press open the context menu, select text or scroll the page on touch devices.
- Do not draw recognizable real gardens, temples, bridges or landmarks, and no crest, seal, logo-like mark or lettering on lanterns, stones or the bridge.
- Do not include characters or creatures from films, anime or games, or any named or mascot-like fish, dragons or spirits. The koi are anonymous animals.
- Do not imitate the interface, sounds, mascots or slogans of existing pond or focus-timer apps.
- Do not mention any AI model, tool or company in the copy or interface, and do not use real brand names anywhere. [BRAND] is invented.
- Do not log errors or warnings: zero console output at 1440×900 and at 390×844, with and without WebGL.

---
Inspired by Code-drawn koi pond web toy with switchable seasons, night mode and a focus timer by @ann_nnng — https://www.24vids.com/video/never-seen-a-model-this-powerfulclaude-fable-5-just-helped-me-build-this-whole-p-tw-2072648308846370897
— Prompt by VibeFather · https://vibefather.ai/t/koi-pond-web-toy · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# Koi Pond Web Toy

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

## 简介
[BRAND] 是一个网页小玩具:一个占满整个视口的花园池塘,从正上方俯视,完全用代码绘制。锦鲤摆动着身体、拖着飘逸的鱼鳍,在明亮的水光波纹上游动,穿行于睡莲叶、踏脚石和木桥边缘之间。访客可以在四个季节之间切换,开关夜晚与雨天,轻点产生涟漪,按住喂鱼,拖动划出水流,开启生成式配乐,还可以启动一个 [FOCUS_MINUTES] 分钟的专注模式,隐藏界面,让页面充当桌面背景。整个场景就是整个网站:没有营销区块,没有滚动,没有第二个页面。

- 受众:工作时喜欢开着一个安静标签页的人,以及喜欢并分享小型代码绘制网页玩具的开发者和设计师。
- 目标:在最初两秒内作为一张静态截图看起来就完整而美丽,每一次触摸都能得到可信的物理反馈,并且足够宜人,可以在笔记本电脑或手机上整个专注时段一直开着。
- 基调:安静、从容而精确,像一幅恰好活了起来的水墨画。文案简短、低调而具体。不用感叹号,不用健康养生口号。

## 技术栈
- 框架:Vite 5 + TypeScript,无 UI 框架
- 样式:原生 CSS
- 库:vite(MIT)、typescript(Apache-2.0)、lucide-static(ISC)、@fontsource/shippori-mincho-b1(OFL-1.1)、@fontsource-variable/instrument-sans(OFL-1.1)
- 构建:`npm run build` → `dist/` 中的静态文件。无后端、无服务器代码、无外部 API。
- 设置:
  - vite.config.ts:将 base 设为 './',build.sourcemap 设为 false。src/ 中的任何内容都不会被复制到 dist/。
  - index.html:标题为 '[BRAND] · Koi Pond',链接到 ./favicon.svg,并包含一个内联样式块,将 html 和 body 的背景设为 #0E3B43、margin 为 0、overflow 为 hidden,使页面从首次绘制起就是墨青色。public/favicon.svg 为手写:一条朱红色 #F2542D 的锦鲤弯曲成 C 形,位于墨青色 #0E3B43 的圆形上。
  - 文件布局:src/content.ts 保存所有字符串和变量值;src/main.ts 启动舞台;src/quality.ts 选择并调整质量层级;src/scene/water.ts(WebGL 着色器加 2D 回退)、koi.ts、flora.ts(睡莲叶、荷花、石头、桥)、particles.ts、ripples.ts、seasons.ts、night.ts;src/input.ts 处理手势;src/audio.ts 处理所有声音;src/ui.ts 和 src/styles.css 处理标题、停靠栏和专注模式。
  - 字体:在 src/main.ts 中导入 '@fontsource/shippori-mincho-b1/latin-500.css'、'@fontsource/shippori-mincho-b1/latin-700.css' 和 '@fontsource-variable/instrument-sans'。仅导入展示字体的拉丁子集,以保持构建体积小。字体栈:展示字体为 'Shippori Mincho B1'、'Iowan Old Style'、'Palatino Linotype'、Georgia、serif;文本字体为 'Instrument Sans Variable'、system-ui、sans-serif。
  - 图标:使用 Vite 的 ?raw 后缀从 lucide-static 导入 SVG 文件(例如 'lucide-static/icons/leaf.svg?raw')并内联,使其继承 currentColor。将 stroke-width 设为 1.75。
  - 所有颜色均为 :root 上的 CSS 自定义属性,使用设计部分中的精确十六进制值,相同的值从 src/scene/palette.ts 导出以供 canvas 和着色器使用。不要近似或重新调整四个核心颜色的色调。
  - 为场景中的所有内容使用一个带种子的伪随机生成器(mulberry32,种子 7):鱼群名单、睡莲叶位置、粒子路径。永远不要在场景代码中调用 Math.random,以便每次加载都打开相同的构图。
  - 加载时读取三个可选查询参数:season(spring、summer、autumn、winter)、night(1 或 0)和 rain(1 或 0)。它们覆盖 [START_SEASON] 和 [START_NIGHT],并使任何状态都可链接。
  - 暴露一个小的只读对象 window.__pond,包含 firstFrameMs(从导航开始到第一个完整绘制帧的时间)、tier(high、mid 或 low)和 fps(滚动平均值),用于检查性能。

## 变量
- [BRAND] — 池塘的名称(默认:"Emberfin")。显示为大标题、小字标和页面标题。虚构的,一到两个词。
- [TAGLINE] — 标题下的一行文字(默认:"A small pond for long thoughts.")。最多约 40 个字符,句子式大小写,以句号结尾。
- [START_SEASON] — 池塘开放的季节(默认:"autumn")。spring、summer、autumn 或 winter。
- [START_NIGHT] — 以夜间模式开放(默认:"off")。on 或 off。
- [KOI_COUNT] — 桌面屏幕上锦鲤的数量(默认:"9")。4 到 16 的整数。手机和较慢的设备会自动显示更少。
- [FOCUS_MINUTES] — 专注时段的长度,以分钟为单位(默认:"25")。1 到 90 的整数。用于计时器、停靠栏标签和会话完成卡片。
- [CREDIT] — 在页脚保留一个小型 "Template by VibeFather" 链接指向 https://vibefather.ai/t/koi-pond-web-toy(默认:是;删除此行即可移除)

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

## 设计
### 颜色
- 墨青(Ink Teal)`#0E3B43` — 水体、页面背景,以及金色或奶油色表面上的文字。精确硬编码;必须覆盖首屏的大部分区域。
- 朱红(Vermilion)`#F2542D` — 锦鲤的身体和斑块、桥边漆面栏杆、灯笼边框、荷花尖端的红晕。精确硬编码;绝不用于正文文字。
- 奶油(Cream)`#F5EFE0` — 所有界面文字和图标、锦鲤身体和鱼鳍、花瓣、雪、涟漪环和焦散光。精确硬编码。
- 金色(Gold)`#E0B04A` — 银杏叶、金色锦鲤、灯笼和萤火虫的光、桥柱顶盖、Focus 按钮、激活的切换标记和专注进度线。精确硬编码。
- 深水(Deep Water)`#082A31` — 向四角渐暗的暗角、池底斑驳、锦鲤阴影、码头后方的色调。
- 夜水(Night Water)`#061C24` — 夜间模式的水色,以及覆盖在场景上的夜色。
- 墨色(Ink)`#10262B` — 锦鲤的眼睛、斑点和背脊,桥板之间的缝隙。
- 浮萍绿(Pad Green)`#2E6F5E` — 睡莲叶基部和石头上的苔藓。保持接近水色,让四种核心颜色主导。
- 浮萍浅绿(Pad Light)`#4C9A7A` — 睡莲叶的叶脉和春季新叶。
- 石色(Stone)`#6F8480` — 踏脚石,上面带有 #8FA39D 的斑点。
- 桥木色(Bridge Wood)`#7A4A2E` — 桥板,明度交替加、减 5%。
- 腮红(Blush)`#F6B8A8` — 春季花瓣的基部和荷花瓣的尖端(奶油色与朱红的混合)。
- 冰色(Ice)`#CFE6E4` — 低透明度的冬季冰片和睡莲叶上的霜边。
- 琥珀(Amber)`#C98F3A` — 较深的银杏叶和鱼食颗粒。

### 字体排印
- 展示字体:[BRAND] 标题、季节名称、计时数字、会话完成标题。大字号用字重 500,小字标用 700。一种边角柔和、带墨晕感的明朝体衬线字体。:Shippori Mincho B1 (OFL),字重 500/700
- 正文字体:标语、手势提示、停靠栏标签、工具提示、按钮。标签为 13px、字重 600、大写、字距 0.06em;标语为 17px、字重 400、行高 1.45。:Instrument Sans Variable (OFL),字重 400/500/600

### 布局与动效
- 间距:无页面网格:场景填满视口。界面元素遵循 8px 刻度,宽布局下距边缘内缩 56px,高布局下内缩 20px,且每边都加上 env(safe-area-inset-*)。停靠栏高度 56px,内边距 6px,间隙 4px。每个控件至少 44px 高;手机上停靠栏单元格可窄至 36px 宽,但保持 48px 高。场景尺寸使用一个单位 u = sqrt(viewportWidth × viewportHeight) / 1140,因此在 1440×900 下 u 为 1px,在 390×844 下为 0.5px。
- 圆角:停靠栏、按钮和工具提示为完整胶囊形(999px)。卡片为 20px。专注进度线为方头。唯一的界面阴影是停靠栏和卡片下方的 0 12px 40px rgba(4, 22, 27, 0.35);水面上的文字改用 text-shadow 0 1px 18px rgba(8, 42, 49, 0.55),而非面板。
- 动效:每个动作都有物理成因(水、风、某条鱼做出了决定)或标记状态变化。没有仅为显得忙碌而循环的东西,且任意两个相邻元素不共享相位:每个周期和延迟都由种子生成器从范围内抽取。
- 动效:仅两种界面缓动。柔和出场:cubic-bezier(0.22, 1, 0.36, 1),用于元素到达。进出:cubic-bezier(0.65, 0, 0.35, 1),用于状态间的交叉淡化。界面时长:悬停和显现为 240ms,季节缩略图为 360ms,标题和专注淡入淡出为 600 至 900ms。
- 动效:锦鲤以滑行—摆尾的节奏游动:1.6 至 3.2s 的摆尾,然后 0.8 至 1.6s 的滑行,身体波幅为 35%,同时速度衰减五分之一。速度变化遵循时间常数为 0.8s 的临界阻尼弹簧,巡航时转向上限为每秒 70 度,因此转向是弧线,绝不旋转。
- 动效:涟漪以三次缓出半径扩张,并以指数透明度曲线在 2.6s 内淡出:诞生时快而亮,结束时慢而淡。
- 动效:季节变化为 2.4s 的进出交叉淡化,各部分错开;夜晚为 1.8s 进出;雨在 2.5s 内渐入、4s 内渐出。中断过渡时从当前混合状态继续,绝不跳变。
- 动效:模拟基于真实经过时间运行,帧增量钳制在 1/30s,标签页隐藏时暂停,并遵循最后一节中的减少动效规则。
- 图像:一切都在代码中绘制为扁平、绘画感的形状:纯色填充加一个较亮和一个较暗的色调,柔和的偏移阴影,无轮廓、无照片纹理、无精灵图。深度来自分层(池底与焦散、鱼及其阴影、水面植物与结构、顶层的涟漪与光)。首屏的视觉锚点是场景本身:墨青底上的朱红与金色,配以巨大的奶油色标题。

## 页面与区块
### [BRAND] · 锦鲤池(`index.html`)
1. **舞台与首帧** — 一个固定舞台,100vw × 100dvh,无滚动,无其他区块。它承载三层堆叠的 canvas 和一个 DOM 界面层。首屏必须已经是完成画面:在导航开始后 2 秒内(在普通笔记本连接下检查 window.__pond.firstFrameMs),画面显示带焦散的墨青水面、所有锦鲤游动中、睡莲叶、踏脚石、桥缘、当季的落叶或花瓣已经漂浮、大号 [BRAND] 标题和码头。绝不允许出现黑屏或白屏、加载旋转器、进度条、启动画面或“点击开始”状态,首屏上没有任何内容等待点击、等待声音或等待字体。
   布局:从底部的堆叠顺序:canvas#water(WebGL:池底、焦散、涟漪折射)、canvas#life(2D:锦鲤阴影、锦鲤、食物)、canvas#surface(2D:睡莲叶、荷花、石头、桥、冰、涟漪环、粒子、夜色色调、灯光),然后是界面层。所有 canvas 使用 touch-action: none 和 user-select: none。位置是视口宽度 W 和高度 H 的分数。宽布局(W 至少 900px 且 W 至少 H):桥覆盖右上角,其边缘从 (0.56W, 0) 延伸到 (W, 0.38H);踏脚石沿左下角呈弧形排列于 (-0.01, 0.62)、(0.05, 0.75)、(0.12, 0.86)、(0.21, 0.95)、(0.29, 1.04);睡莲叶簇位于 (0.68, 0.62) 有 5 片叶、(0.24, 0.47) 有 4 片叶和 (0.47, 0.22) 有 2 片叶;标题在左上角;码头在底部中央;锦鲤群松散地环绕 (0.50, 0.54)。高布局(其他所有情况,包括手机):桥边缘从 (0.58W, 0) 到 (W, 0.15H);4 块石头位于 (-0.03, 0.63)、(0.09, 0.71)、(0.05, 0.81)、(0.14, 0.86);睡莲叶簇位于 (0.70, 0.56) 有 4 片叶、(0.26, 0.38) 有 3 片叶和 (0.42, 0.74) 有 1 片叶;标题在左上角,max-width 50vw,使其永不触及桥;码头横跨底部。在调整大小或旋转时(防抖 150ms),锚点重新布局,静态部分重绘到其缓存中,鱼保持其位置,并限制在视野内。
   运动:启动是同步的:创建 canvas,从种子生成器构建场景,然后在首次绘制前运行 300 个模拟步骤(5 秒池时间),使首帧显示鱼沿自然弧线分布、14 片叶或花瓣已经漂浮、8 片在空中。在第一个动画帧中绘制 2D 层,即使着色器仍在编译;canvas#water 有一个 CSS 背景,从中心的 #0E3B43 到角落的 #082A31 的径向渐变,因此即使没有 WebGL 画面也是完整的。总 JavaScript 保持在 150 KB gzipped 以下。
2. **水面、池底与焦散** — 在全屏三角形上使用单个原始 WebGL 片段着色器,从头编写(无着色器库)。它以墨青(Ink Teal)#0E3B43 绘制池底,带有正负 6% 亮度的柔和值噪声斑驳,以及向角落深水(Deep Water)#082A31 的暗角,然后添加光焦散:一张由奶油色(Cream)#F5EFE0 的细亮脉络组成的网,细胞约 90u 到 140u 宽,白天以 12% 强度添加。从动画细胞图案的两层构建脉络(到最近细胞边缘的距离,用 6 次幂锐化),第二层以 1.7 倍比例。两层脉络交叉处,光池更亮。季节色调:春季纯奶油色,夏季亮 25%,秋季向金色(Gold)#E0B04A 混合 40%,冬季 60% 强度且略冷。
   布局:填充视口,位于所有内容之后。Uniforms:时间、分辨率、季节混合、夜间量、雨量以及最多 24 个涟漪的数组(x, y, 半径, 强度)。每个涟漪在其半径周围 18u 宽的带内沿环法线将池底和焦散查找位移最多 6u,因此焦散在环经过时明显弯曲。WebGL 不可用或上下文丢失时的回退:在启动时在离屏 2D canvas 上生成三个可平铺的焦散纹理(描边细胞边缘,通过以三个略微不同的比例绘制来软化),并以 'lighter' 混合模式以 10% alpha 绘制其中两个,向相反方向漂移。
   运动:细胞点在它们的细胞内轨道运行,使网以约 7 秒的周期呼吸;两层以每秒 5u 和 8u 向相反方向漂移。运动缓慢而连续,从不闪烁。雨中焦散在 1.5s 内淡至 35%,因为太阳消失了;夜间降至 5%,读作微弱的月光。
3. **锦鲤** — [KOI_COUNT] 条程序化锦鲤(默认 9 条)绘制在 canvas#life 上,按深度排序。按顺序的名单,长度以 u 为单位:1) 长老,240,奶油色身体带三个朱红色鞍斑;2) 200,纯朱红色带奶油色边缘的鳍;3) 190,金色带奶油色头部;4) 180,奶油色带头顶一个圆形朱红色斑点;5) 175,朱红色带沿背部的墨色斑点;6) 170,奶油色带金色和朱红色斑块;7) 160,纯金色带微弱较暗的鳞网;8) 150,全奶油色且略半透明;9) 150,朱红色头部渐变为奶油色尾部。较小的数量取前 N 条;较大的数量从 2 开始重复名单,长度在 150 到 200 之间。每条鱼建立在 12 个点的脊柱上(低档为 9 个)。身体是一条闭合平滑路径,从脊柱左右偏移一个宽度轮廓:圆润的鼻子,最宽处在长度的 30%(横跨长度的 0.21),向尾根渐细至 0.035。斑块是 2 到 4 个柔和团块,存储在身体坐标中并裁剪到身体,因此它们随身体弯曲。两个墨色眼点位于鼻子后方 8%,一条细墨色背脊从 30% 到 60%,12% alpha 的奶油色高光沿背部延伸。24% 处的胸鳍是半透明扇形(奶油色 55% alpha 带五条细肋)。尾巴是两叶扇形,长度为长度的 0.26,身体颜色 70% 在尖端渐变为透明。每条鱼下方深水色 28% alpha 的柔和阴影偏移 (10u, 14u),以身体形状在 1.0 和 1.12 比例绘制两次,而不是使用 canvas 模糊。更深的鱼小 8%,多 18% 青色,阴影更近。
   布局:鱼生活在整个视口中,可能从桥、石头和睡莲叶下方经过,这些绘制在它们上方。转向结合分离(半径 0.9 体长)、少量对齐(权重 0.3)和凝聚(权重 0.15)与缓慢的航向游荡,每条鱼的周期为 6 到 11s,加上从任何视口边缘 140u 处开始的柔和折返。鱼群松散地环绕其家园点,但每条鱼保持自己的路线。
   运动:头部领先,每个脊柱点以固定距离跟随前一个,这在转弯时给出自然的跟随。在此之上,一个行波正弦波从头到尾运行,每个体长一个波长,其侧向振幅从头部 0 上升到尾部长度的 0.11。尾拍频率跟随速度:巡航时 0.9 Hz(根据大小每秒 38 到 55u,大鱼更慢),爆发时高达 2.4 Hz(每秒 190u)。每条鱼按照运动规则交替踢水和滑行。胸鳍与尾巴反相在身体 25 到 70 度之间划动,当鱼刹车或急转弯时张开到 85 度。尾巴以自己的弹簧拖曳(刚度 40,阻尼 8),并将最后两个脊柱段的弯曲放大 1.6 倍,因此它像丝绸一样在身体后方扫过。每条鱼的深度缓慢漂移。冬季巡航速度降至 60%。
4. **睡莲叶、踏脚石与桥缘** — 睡莲叶:宽布局 11 片,高布局 8 片,半径 34u 到 66u,每片是叶绿(Pad Green)#2E6F5E 的圆盘,带随机旋转的 28 度 V 形缺口,九条细脉在叶浅(Pad Light)#4C9A7A 25% alpha,略暗的边缘和水面上偏移 (8u, 11u) 30% 的柔和阴影。踏脚石:扁平不规则圆润形状,半径 46u 到 70u,石色(Stone)#6F8480 带较亮斑点,深水色的暗水线边缘,其中两块有小苔藓斑;外侧的被视口边缘切掉。桥缘:仅可见木甲板的一角。44u 宽的木板在桥木(Bridge Wood)#7A4A2E 中垂直于边缘延伸,带 2u 墨色间隙和交替亮度,每块两到三条纹理线。沿边缘延伸一条 10u 的朱红(Vermilion)#F2542D 漆栏杆,带细奶油色高光,两个圆形柱位于栏杆长度的 30% 和 72% 处,每个带金色(Gold)#E0B04A 帽和旁边一个圆形纸灯笼(白天奶油色,未点亮)。桥和石头在水面上投下偏移 (14u, 18u) 的柔和阴影。它们上面没有纹章、印章、字符或文字,桥是通用甲板,不是可识别的真实桥梁。
   布局:位置按 stage 部分所给。石头和桥是静态的:每次调整尺寸和每次季节切换时,将它们渲染一次到离屏 canvas,然后每帧直接绘制。浮叶(pads)因为会移动,所以实时绘制。
   运动:每个浮叶沿一条微小的闭合路径漂移(正负 3u,两个不同周期,介于 5 到 9s 之间),并摇摆正负 2 度。当涟漪环经过浮叶时,它被向外推 4u 并膨胀到 1.03 倍缩放,然后在 500ms 内弹回。距离已绘制水流 60u 以内的浮叶沿水流方向最多滑动 6u 后返回。石头和桥从不移动。
5. **标题与字标** — 加载时,池塘像海报一样呈现:标题 '[BRAND]' 使用展示字体,其下是标语 '[TAGLINE]',再下面是一行三个手势提示:'Tap for ripples'、'Hold to feed'、'Drag a current'。在访客首次与水交互后,大标题让位给小的 '[BRAND]' 字标。当构建器提供署名行时(见 Credit 部分),将其显示为左下角 11px 奶油色链接、60% 不透明度;它与 dock 一起隐藏。
   布局:左上角,宽布局内缩 56px,高布局内缩 20px。标题:展示字体,字重 500,字号 clamp(44px, 8.4vw, 128px),行高 0.95,字距 -0.01em,奶油色(Cream),允许换行至两行。标语:文本字体 17px、78% 奶油色,位于标题下方 16px。提示:13px 大写标签,间隔 20px,每个带一个 14px 图标(水滴、手、波浪),位于标语下方 20px;在手机上垂直堆叠。文字直接位于水面上,带柔和 text-shadow,无面板。小字标为展示字体,字重 700,22px,位于同一角落。
   运动:首次在水面上点按、按住或拖动时,标题块在 600ms 内淡出并上滑 12px(in-out),而字标在 300ms 延迟后用 400ms 淡入。提示行保持在字标下方 24px;每个提示在首次使用其手势时变暗至 35% 并将其图标换成金色对勾,且该行在三个都完成后 2s 或首次交互后 20s 淡出。在任何交互之前,这里没有任何东西移动。
6. **控制 dock** — 一个浮动 dock,按顺序包含:四向季节切换(Spring 配 flower-2 图标,Summer 配 sun,Autumn 配 leaf,Winter 配 snowflake)、一条细线分隔、三个开关(Night 配 moon,Rain 配 cloud-rain,Sound 在关闭时配 volume-x、开启时配 volume-2)以及 Focus 按钮(timer 图标和标签 'Focus [FOCUS_MINUTES]:00')。冬季时,Rain 开关的标签和 tooltip 显示为 'Snow'。键盘:1 到 4 选择季节,N 夜间,R 雨,M 声音,F 聚焦,Escape 退出聚焦模式。每个控件都是真实按钮,带 aria-label 和 aria-pressed,以及 2px 金色 focus-visible 环、偏移 2px。
   布局:底部居中,安全区域上方 24px。背景 rgba(8, 42, 49, 0.62),带 backdrop-filter blur(14px) saturate(1.2),1px 奶油色边框、14% alpha,高度 56px,完整胶囊形。宽布局:季节按钮显示图标和标签,开关是 44px 图标按钮,悬停 400ms 后或键盘聚焦时在上方显示 tooltip,Focus 按钮是金色 #E0B04A 胶囊配 Ink Teal 文字。当前激活季节位于奶油色滑块上,配 Ink Teal 图标和文字。开启的开关以金色显示其图标,下方带一个 4px 金色圆点。高布局:dock 横跨宽度,边距 12px,为八个等宽单元格,仅图标(Focus 单元格显示 timer 图标和分钟数),每个至少 36px 宽、48px 高。
   运动:季节滑块以 360ms、soft-out 缓动滑到所选按钮。按钮在 240ms 内悬停变亮,按下缩放到 0.96。dock 和字标在访客首次交互前保持完全可见;之后,若无指针移动、触摸或按键,它们在 6s 后淡至 0 不透明度并下移 8px(当指针位于 dock 上方或控件有焦点时绝不发生),并在任何指针移动、触摸或按键时用 240ms 返回。在其最初 8 秒内,Sound 开关每 2.4s 携带一次缓慢的金色圆环脉冲作为邀请;任何控件被使用后它永久停止。
7. **手势:点按、按住、拖动** — 水面上的三种手势,通过 Pointer Events 对鼠标、笔和触摸保持一致,最多同时三个指针。点按(250ms 内释放,移动小于 12px):涟漪。按住(350ms 内未移动 12px):在按住持续期间撒食物,如果手指随后移动则跟随手指。拖动(在按住阈值前移动 12px):绘制水流。canvas 上抑制长按上下文菜单、文本选择和 callout,水面上方的鼠标光标是 20px 奶油色圆环,绘制为内联 SVG data URI。
   布局:点按:三个同心环在点按后 0、140 和 300ms 开始。每个从 6u 半径增长到 240u,描边从 2.2u 到 0.6u,奶油色。最多 24 个环存活(中档 16,低档 12);最旧的被丢弃。按住:当按压正在建立时,指针周围一个细金色圆环在 350ms 内顺时针填充,使手势可被发现。然后颗粒以每秒 9 个落在指针 46u 范围内:3.5u 琥珀色 #C98F3A 圆点带奶油色斑点,每个落地时带一个小环,在 0.7s 内达到 26u。最多 60 个颗粒存活(低档 36);未被吃掉的颗粒随水流漂移并在 14s 后淡出。拖动:路径每 24u 采样一次并保留 9s。它显示为三条细奶油色条纹、35% alpha,沿路径跟随,虚线以每秒 120u 沿拖动方向行进,在最后 3s 内淡出。最多同时存在三个水流。
   运动:涟漪半径在 2.6s 内缓出(cubic);不透明度在环的生命周期内遵循 0.55 × e^(-2.2t),并在最后五分之一线性淡至零。相同的环被发送到水 shader,使焦散弯曲。点按 140u 内的锦鲤以爆发速度直接逃离 0.6s,并在 1.8s 内恢复巡航;140u 到 380u 之间的锦鲤在 500ms 后转向该点,漂过它然后恢复。食物:每条锦鲤都注意到颗粒,但每条在自己的 150 到 900ms 延迟后反应,因此鱼群呈波浪式转向,而非同时。它们以 1.6 倍巡航速度接近,在 90u 内减速,并围绕喂食点以松散的旋转玫瑰花形环绕。当嘴接近颗粒 10u 内时,颗粒消失并带一个小奶油色环,鱼轻甩头部。食物消失后它们逗留 2 到 3s,然后一条接一条向外散开。水流:路径 180u 内的锦鲤对齐其方向(权重 0.8)并以 1.3 倍巡航速度像溪流一样乘流,在其末端离开;漂浮的花瓣、叶子和颗粒以每秒 60u 被携带。
8. **季节** — 四个可切换季节,以 [START_SEASON] 开场。每个都有名称和一行显示在季节卡片上的文字:Spring,'Petals on the water';Summer,'Lotus and dragonflies';Autumn,'Ginkgo gold';Winter,'Thin ice, slow fish'。Spring:浮叶更小(0.8 半径)且更新鲜(Pad Light),60% 存在;空中最多 46 片花瓣,水面漂浮 60 片,每片是奶油色圆润泪滴形,带 Blush #F6B8A8 基部。Summer:所有浮叶全尺寸;浮叶上有三朵莲花,每朵有两圈尖花瓣,奶油色带 blush 尖端,围绕金色种子头;两只蜻蜓(一只在低档),细金色身体,两对半透明奶油色翅膀,阴影偏移 (22u, 30u),因为它们飞得高。Autumn:80% 的浮叶,一些带琥珀色边缘;最多 38 片银杏叶,扇形带中心缺口和短茎,金色 #E0B04A 和琥珀色。Winter:30% 的浮叶带奶油色霜边;五到七块大多边形冰板,Ice #CFE6E4、16% alpha,带 35% 的奶油色裂纹线和它们之间的深色开阔水面;石头上覆雪帽;140 片雪花(中档 98,低档 60)为 1.5u 到 4u 的奶油色圆点。
   布局:下落物绘制在浮叶上方的 canvas#surface 上,水面上带淡淡阴影,随它们下降而收拢;一旦落地,它们平躺在涟漪环下方的水面上。季节卡片水平居中出现在高度的 38% 处:名称使用展示字体,字号 clamp(40px, 6vw, 92px),其下的一行使用文本字体 15px、78% 奶油色。首次加载时不显示,仅在季节变化时显示。
   动效:切换耗时 2.4s,使用 in-out 缓动。在前 1.2s 内,退出的季节停止生成,其粒子下沉并淡出;在整个 2.4s 内,焦散色调、浮板尺寸(每块浮板使用弹簧,错开 40ms)和鱼的速度混合到新值;从 1.2s 到 2.4s,进入季节的生成速率从零逐渐升至满值。季节卡片上升 12px 并在 500ms 内淡入(soft out),保持 1600ms,然后在 700ms 内淡出。花瓣在下落时翻滚(旋转加上宽度翻转),落地时带一个小圆环,然后以每秒 8u 的速度向左下方随微风飘移。银杏叶以 0.5 Hz、正负 28 度的摆幅像钟摆一样落下,落地时带一个圆环,并在漂浮时缓慢转动。夏天到来时,莲花在 1.8s 内逐瓣绽放,并摆动 2 度。蜻蜓悬停时带有细微抖动,持续 1.2 到 2.6s,以硬 ease-out 在 0.35s 内急冲 180u 到 320u,并不时在浮板或花朵上休息 3 到 5s。冰板以每秒 2u 漂移;冰下的锦鲤看起来暗四分之一。轻点冰面不会发出圆环声:它会在 180ms 内画出五到七条 30u 到 70u 长的细奶油色线条组成的星形裂纹,裂纹在 6s 内愈合,下方伴随一个强度为 40% 的沉闷圆环;轻点开阔水面则照常产生涟漪。雪花斜向飘落,较大的雪花更快,接近水面时缩小,然后在水面上消失或落在冰上。
9. **夜间模式** — 一个独立开关,可在任何季节之上生效;池塘以它 [START_NIGHT] 开启。水变为 Night Water #061C24,整个场景上叠加一层 46% 的 #0A2230 色调,然后使用 'lighter' 混合模式在其上添加灯光:两盏桥灯发光(金色核心、朱红色边缘、70u 的柔和光晕),每盏都在桥边缘下方的水面上投下倒影,池塘上方出现萤火虫:高层 26 只、中层 18 只、低层 12 只,夏季为满数,春季和秋季为一半。冬季没有萤火虫;取而代之的是,灯笼 220u 范围内的雪花会捕捉到灯光并变成金色。
   布局:色调是在所有水面对象之后、灯光之前,对 canvas#surface 的一次全屏填充。每盏灯笼的倒影是一条从桥边缘向外延伸 160u 的金色光带,由七条水平切片(中层和低层为五条)构成,这些切片随距离变窄并淡出。每只萤火虫是一个 2u 的 Gold #E0B04A 点,带有 10u 光晕,并在其正下方的水面上有一个更暗的发光点。
   动效:白天到夜晚及返回耗时 1.8s,使用 in-out 缓动;灯笼在色调开始后 400ms 亮起,因此黑暗先到达。倒影切片以 0.4 到 0.9 Hz 独立横向滑动正负 6u,穿过它们的涟漪圆环会使该摆动在 1s 内增至三倍。萤火虫以每秒 12u 到 20u 的速度沿缓慢曲线路径游荡,并以 2.8 到 4.5s 的自身周期、使用正弦缓动脉动,每个周期中约有三分之一时间处于暗态。
10. **雨** — 一个开关,在水面上播撒雨滴,并改变光线和声音。雨滴落在随机位置:高层每秒 14 滴、中层 10 滴、低层 7 滴。冬季,同一开关会将降雪增厚至雪花数量的 2.5 倍,而不是产生雨滴。
   布局:每滴雨是一个在 0.9s 内从 4u 增长到 46u 的圆环,其中心在前两帧有一个小奶油色点。雨滴圆环计入单独的 40 上限,并且不发送到着色器。下雨时整个场景暗 8%。
   动效:雨在 2.5s 内渐入、在 4s 内渐出,使用 in-out 缓动:雨滴速率、变暗和焦散淡出都遵循同一渐变。当雨滴落在 30u 范围内时,漂浮的叶子和花瓣会轻微抖动。锦鲤忽略雨。
11. **生成式音轨** — 所有声音都用 Web Audio API 合成;没有音频文件。声音在加载时关闭,只有当访客打开 Sound 开关时才开始(这也会在该点击内创建音频上下文)。该开关是静音控件,并始终显示其状态。层:一个由 D3 和 A3 两个柔和振荡器组成的持续低音,通过 900 Hz 低通和 0.07 Hz 颤音;一段钟声般的音符旋律(一个正弦波加上高八度的更安静三角波,20ms 起音,3.2s 指数衰减),由五声音阶上最多两步的随机游走选取,每 1.4 到 4.2s 一个音符,有四分之一概率在 380ms 后出现第二个音符,送入反馈延迟(0.42s,反馈 0.35,30% 湿声);一个由生成噪声通过带通构成的水声床,带通在 0.11 Hz 下扫过 400 到 900 Hz。按季节缩放:春季和夏季为 D 大调五声音阶(D E F# A B),秋季为 D 小调五声音阶(D F G A C),冬季为同一小调音阶高八度,间隔 3 到 7s,音色更玻璃般。夜间将旋律降低八度,并且在冬季之外,添加合成的蟋蟀声(每 1.5 到 3s 发出短促的 4.2 kHz 啁啾三连音,非常安静)。雨添加一个高通噪声床和每秒约三次小的有音高滴落声。触摸声音:轻点播放柔和的 'bloop'(一个正弦波在 160ms 内从 520 滑到 260 Hz),声像定位到轻点的水平位置;颗粒轻微滴答(速率限制为每秒 12 次);冰上的裂纹是短促明亮的咔嗒声;季节变化播放来自新音阶的上升两音音程。
   布局:信号路径:每一层进入主增益(0.5)、一个温和的压缩器,然后输出。除 Sound 开关外没有可视面板。
   动效:主输出在 1.5s 内淡入、在 0.8s 内淡出。雨和夜间层遵循与其视觉相同的渐变(2.5s 入、4s 出;1.8s)。音符在音频时钟上略微提前调度,以便在掉帧时保持时序均匀。当标签页在后台时声音继续播放,因此池塘可以陪伴其他工作。
12. **专注模式** — Focus 按钮将池塘变成带有 [FOCUS_MINUTES] 分钟计时器的桌面背景。停靠栏、字标、提示和光标环淡出,只留下场景、一条细线进度线和小号剩余时间数字。水面仍然响应轻点、按住和拖动。移动指针或触摸屏幕会在右上角显示一个小胶囊,包含 'Pause'(或 'Resume')和 'Exit focus';Space 也可暂停,Escape 退出。归零时播放柔和提示音,一个缓慢的金色圆环从池塘中心扩散,并出现一张卡片:标题 'Session complete',一行 '[FOCUS_MINUTES] minutes by the water. The koi kept watch.',按钮 'Another round' 和 'Back to the pond'。提示音是计时器的目的,因此即使环境音轨关闭也会播放(启动专注模式是解锁音频的手势)。
   布局:进度线:沿最底部边缘高 2px,全宽,轨道为 10% 的奶油色,填充为 55% 的 Gold,从左到右增长。数字:展示字体,28px,28% 不透明度的奶油色,左下角带标准内边距,格式 MM:SS,每个字符位于 0.62em 的固定宽度槽中,因此数字从不抖动。胶囊与停靠栏风格一致,高 40px。卡片居中,最宽 360px,20px 圆角,停靠栏背景,标题使用展示字体 36px,主按钮为金色。
   动效:进入:界面在 800ms 内淡出(in-out),进度线和数字在相同时间内淡入。胶囊在 240ms 内出现,并在 3s 无输入后隐藏。计时器根据挂钟时间戳计算,而不是帧,因此当标签页隐藏时仍保持正确;在存在 Screen Wake Lock API 的地方,会话期间保持屏幕唤醒锁并在退出时释放,否则静默失败。提示音是相隔 1.6s 的三次敲击,每次都是 A4、A5 和 E6 分音的钟声,衰减 6s。金色圆环在 4s 内以涟漪缓动增长到远角,卡片在第一次敲击后一秒以 600ms 内上浮 12px 淡入(soft out)。
13. **自适应质量和手机** — 池塘必须在手机上保持流畅,目标 60 帧每秒,且绝不低于 30。启动时选择层级:当主指针为粗指针或视口较短边小于 600px 时为低;否则当设备报告 4 个或更少逻辑核心或 4 GB 或更少内存时为中;否则为高。高:2D 画布为 min(devicePixelRatio, 2),水面为 min(devicePixelRatio, 1.5),所有 [KOI_COUNT] 条锦鲤,完整粒子数。中:2D 为 min(devicePixelRatio, 1.5),水面为 CSS 像素的 0.75 倍乘以 min(devicePixelRatio, 1.5),80% 的锦鲤,70% 的粒子。低:2D 为 min(devicePixelRatio, 2),水面为 CSS 像素的 1.0 倍(像素比 1),60% 的锦鲤(至少 4 条)使用 9 点脊线,45% 的粒子,一层焦散而不是两层。
   布局:没有可见的质量控制。其他部分引用的层级特定数量(圆环、萤火虫、雨滴、颗粒、雪、灯笼切片)都来自 src/quality.ts 中的一张表。
   Motion:governor 监视最近 90 帧的平均帧时间。在运行中若超过 22ms 持续 2 秒,就降一档:多余的 koi 游出屏幕且不再返回,粒子停止生成,直到低于新上限,因此不会有跳变。若低于 12ms 持续 10 秒,则可能升回一档,但绝不超过启动时选定的档位。热循环每帧不分配任何对象:涟漪、pellet 和粒子都来自固定池。标签页隐藏时循环停止,恢复时不会出现时间跳变。
14. **Reduced motion** — 当 prefers-reduced-motion 设为 reduce 时(启动时和变更时检查),池塘仍是一幅完整、生动的画面,但平静得多:koi 以 35 percent 速度游动,尾摆幅度减半,且从不 burst;caustics 以四分之一速度漂移;petals、leaves 和 snow 以 60 percent 数量静置于水面,没有任何下落;一只 dragonfly 停在 pad 上;fireflies 原地不动,以缓慢的 6s 发光;lantern reflections 保持静止。轻点会产生一个持续 1.2s 的单一 ring,pads 不会上下浮动。Rain 以每秒 3 drops 落下。Feeding 和 currents 仍然有效,但处于降低后的鱼速。
   Layout:相同的构图和控件。
   Motion:Season、night 和 focus 变化变为 400ms 不透明度交叉淡化,无位移;界面过渡仅为 150ms 不透明度;Sound 开关上的 invitation pulse 和 season thumb 的滑动被移除。

## 资产
- 图像:无需下载。所有视觉元素均以代码绘制:水面在 WebGL 片段着色器中绘制,其余全部使用 Canvas 2D 路径。项目中任何位置都没有照片、纹理、精灵图、视频或音频文件。public/favicon.svg 和光标环为手写 SVG。
- 图标:lucide-static(ISC),从 npm 安装,并从其 icons 文件夹内联引入:flower-2、sun、leaf、snowflake、moon、cloud-rain、volume-2、volume-x、timer、pause、play、x、check、droplets、hand、waves。如果已安装版本中缺少某个名称,请手绘一个等效的 24px 描边图标。列于 ASSETS.md。
- 字体:通过 npm 自托管:@fontsource/shippori-mincho-b1(拉丁子集,字重 500 和 700)和 @fontsource-variable/instrument-sans,均为 OFL-1.1。Vite 将 woff2 文件打包进 dist/。列于 ASSETS.md,包含包名、来源 URL、作者和许可证。

## 不要做
- 不要显示黑屏或白屏、加载旋转指示器、进度条、启动画面或“点击开始”状态。第一帧在 2 秒内就已经包含锦鲤、焦散、睡莲叶、标题和 dock。
- 不要更改、近似或重新调色四个核心颜色:#0E3B43、#F2542D、#F5EFE0 和 #E0B04A 必须完全按所写使用。
- 标题或标签不要使用系统默认字体,也不要从任何 CDN 或字体服务加载字体。字体只来自两个 Fontsource 包,并随 dist/ 一起发布。
- 不要添加任何图像、视频或音频文件:不要照片纹理、精灵图集、采样的自然录音或音乐循环。一切都在代码中绘制和合成。
- 不要添加 UI 框架、动画库、3D 引擎或着色器库。仅使用原生 WebGL、Canvas 2D、Web Audio API 和原生 CSS。
- 不要添加后端、API 调用、分析、cookie、表单或任何第三方请求。一切都是本地和静态的。
- 不要使用 CDN 脚本或 link 标签。不要热链任何内容。
- 不要发布 source map,也不要把 src/ 复制到 dist/。保持 dist/ 远低于 20 MB(它应该远低于 1 MB)。
- 不要使用绝对资源路径;保持 Vite 的 base 为 './',以便网站可从任何子文件夹运行。网站是单个文件 index.html。
- 不要自动播放声音。音频仅从 Sound 开关或从启动专注模式开始,并且 Sound 开关始终显示当前状态。
- 不要添加营销区块、滚动内容、定价、用户评价、注册提示或第二个页面。池塘就是整个网站。
- 不要为了装饰而移动东西:不要脉冲按钮(除了 Sound 开关上那一个 8 秒的邀请),不要循环界面动画,不要标题视差,不要屏幕震动。
- 不要让鱼原地旋转、瞬间转向、同步游动或突然出现和消失。数量变化只能通过鱼在视口边缘离开或进入。
- 不要在季节之间或昼夜之间硬切,也不要在过渡被打断时突然跳变。
- 不要忽略 prefers-reduced-motion,也不要在质量层级的像素比上限之上渲染。
- 在触摸设备上,不要让长按打开上下文菜单、选择文本或滚动页面。
- 不要绘制可识别的真实花园、寺庙、桥梁或地标,也不要在灯笼、石头或桥上绘制纹章、印章、类似标志的标记或文字。
- 不要包含来自电影、动漫或游戏的角色或生物,也不要包含任何具名或吉祥物式的鱼、龙或精灵。锦鲤是无名的动物。
- 不要模仿现有池塘或专注计时器应用的界面、声音、吉祥物或口号。
- 不要在文案或界面中提及任何 AI 模型、工具或公司,也不要在任何地方使用真实品牌名。[BRAND] 是虚构的。
- 不要记录错误或警告:在 1440×900 和 390×844 下,无论有无 WebGL,控制台输出均为零。

---
Inspired by Code-drawn koi pond web toy with switchable seasons, night mode and a focus timer by @ann_nnng — https://www.24vids.com/video/never-seen-a-model-this-powerfulclaude-fable-5-just-helped-me-build-this-whole-p-tw-2072648308846370897
— Prompt by VibeFather · https://vibefather.ai/t/koi-pond-web-toy · 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: "Koi Pond Web Toy"
colors:
  ink_teal: "#0E3B43"
  vermilion: "#F2542D"
  cream: "#F5EFE0"
  gold: "#E0B04A"
  deep_water: "#082A31"
  night_water: "#061C24"
  ink: "#10262B"
  pad_green: "#2E6F5E"
  pad_light: "#4C9A7A"
  stone: "#6F8480"
  bridge_wood: "#7A4A2E"
  blush: "#F6B8A8"
  ice: "#CFE6E4"
  amber: "#C98F3A"
typography:
  display_the_brand_title_season_names_timer_digits_the_session_complete_heading_weight_500_for_large_sizes_700_for_the_small_wordmark_a_mincho_serif_with_softened_ink_bled_corners: { family: "Shippori Mincho B1", weights: [500, 700] }
  text_tagline_gesture_hints_dock_labels_tooltips_buttons_labels_are_13px_weight_600_uppercase_letter_spacing_0_06em_the_tagline_is_17px_weight_400_line_height_1_45: { family: "Instrument Sans Variable", weights: [400, 500, 600] }
spacing: "No page grid: the scene fills the viewport. Interface elements sit on an 8px scale, inset 56px from the edges on the wide layout and 20px on the tall layout, plus env(safe-area-inset-*) on every side. Dock height 56px with 6px inner padding and 4px gaps. Every control is at least 44px tall; on phones dock cells may narrow to 36px wide but stay 48px tall. Scene sizes use one unit u = sqrt(viewportWidth × viewportHeight) / 1140, so u is 1px at 1440×900 and 0.5px at 390×844."
radius: "Dock, buttons and tooltips are full pills (999px). Cards are 20px. The focus progress line has square ends. The only interface shadow is 0 12px 40px rgba(4, 22, 27, 0.35) under the dock and cards; text over the water gets text-shadow 0 1px 18px rgba(8, 42, 49, 0.55) instead of a panel."
---

# Koi Pond Web Toy — 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
- **Ink Teal** `#0E3B43` — The water, the page background and text on gold or cream surfaces. Hard-coded exactly; it must cover most of the first screen.
- **Vermilion** `#F2542D` — Koi bodies and patches, the lacquered rail along the bridge edge, lantern rims, the blush on lotus tips. Hard-coded exactly; never used for body text.
- **Cream** `#F5EFE0` — All interface text and icons, koi bodies and fins, petals, snow, ripple rings and caustic light. Hard-coded exactly.
- **Gold** `#E0B04A` — Ginkgo leaves, gold koi, lantern and firefly light, bridge post caps, the Focus button, active toggle marks and the focus progress line. Hard-coded exactly.
- **Deep Water** `#082A31` — Vignette toward the corners, floor mottling, koi shadows, the tint behind the dock.
- **Night Water** `#061C24` — Water color in night mode and the night tint drawn over the scene.
- **Ink** `#10262B` — Koi eyes, speckles and dorsal ridge, gaps between bridge planks.
- **Pad Green** `#2E6F5E` — Lily pad base and moss on stones. Stays close to the water hue so the four core colors lead.
- **Pad Light** `#4C9A7A` — Lily pad veins and the fresh spring pads.
- **Stone** `#6F8480` — Stepping stones, with #8FA39D speckles on top.
- **Bridge Wood** `#7A4A2E` — Bridge planks, alternating plus and minus 5 percent lightness.
- **Blush** `#F6B8A8` — Base of spring petals and tips of lotus petals (a mix of cream and vermilion).
- **Ice** `#CFE6E4` — Winter ice plates at low opacity and frost rims on pads.
- **Amber** `#C98F3A` — Darker ginkgo leaves and food pellets.

## Typography
- **Display: the [BRAND] title, season names, timer digits, the session-complete heading. Weight 500 for large sizes, 700 for the small wordmark. A mincho serif with softened, ink-bled corners.** — Shippori Mincho B1 (OFL), weights 500/700. Self-host the font files.
- **Text: tagline, gesture hints, dock labels, tooltips, buttons. Labels are 13px, weight 600, uppercase, letter-spacing 0.06em; the tagline is 17px, weight 400, line-height 1.45.** — Instrument Sans Variable (OFL), weights 400/500/600. Self-host the font files.

## Spacing & shape
- Spacing: No page grid: the scene fills the viewport. Interface elements sit on an 8px scale, inset 56px from the edges on the wide layout and 20px on the tall layout, plus env(safe-area-inset-*) on every side. Dock height 56px with 6px inner padding and 4px gaps. Every control is at least 44px tall; on phones dock cells may narrow to 36px wide but stay 48px tall. Scene sizes use one unit u = sqrt(viewportWidth × viewportHeight) / 1140, so u is 1px at 1440×900 and 0.5px at 390×844.
- Radius: Dock, buttons and tooltips are full pills (999px). Cards are 20px. The focus progress line has square ends. The only interface shadow is 0 12px 40px rgba(4, 22, 27, 0.35) under the dock and cards; text over the water gets text-shadow 0 1px 18px rgba(8, 42, 49, 0.55) instead of a panel.

## Motion
- Every movement has a physical cause (water, wind, a fish deciding something) or marks a state change. Nothing loops just to look busy, and no two neighbours share a phase: every period and delay is drawn from a range by the seeded generator.
- Two interface easings only. Soft out: cubic-bezier(0.22, 1, 0.36, 1) for things arriving. In-out: cubic-bezier(0.65, 0, 0.35, 1) for cross-fades between states. Interface durations: 240ms for hover and reveal, 360ms for the season thumb, 600 to 900ms for the title and focus fades.
- Koi swim in a glide-and-kick rhythm: 1.6 to 3.2s of tail beats, then 0.8 to 1.6s of gliding with the body wave at 35 percent amplitude while speed decays by a fifth. Speed changes follow a critically damped spring with a 0.8s time constant, and turning is capped at 70 degrees per second at cruise, so turns are arcs, never spins.
- Ripples expand with an ease-out cubic radius and fade with an exponential opacity curve over 2.6s: fast and bright at birth, slow and faint at the end.
- Season changes are 2.4s in-out cross-fades with staggered parts; night is 1.8s in-out; rain ramps in over 2.5s and out over 4s. Interrupting a transition continues from the current blended state, never snapping.
- The simulation runs on real elapsed time with the frame delta clamped to 1/30s, pauses while the tab is hidden, and follows the reduced-motion rules in the last section.

## Imagery
Everything is drawn in code as flat, painterly shapes: solid fills with one lighter and one darker tone, soft offset shadows, no outlines, no photo textures, no sprites. Depth comes from layering (floor and caustics, fish and their shadows, surface plants and structures, ripples and light on top). The first screen's visual anchor is the scene itself: vermilion and gold on ink-teal with a large cream title.

## Tone
Quiet, unhurried and precise, like an ink-and-wash painting that happens to be alive. Copy is short, lower-key and concrete. No exclamation marks, no wellness slogans.

---
Inspired by Code-drawn koi pond web toy with switchable seasons, night mode and a focus timer by @ann_nnng — https://www.24vids.com/video/never-seen-a-model-this-powerfulclaude-fable-5-just-helped-me-build-this-whole-p-tw-2072648308846370897
— Prompt by VibeFather · https://vibefather.ai/t/koi-pond-web-toy · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

改成你自己的

  • 冥想或呼吸练习老师:把 BRAND 设为工作室名称,调高 FOCUS_MINUTES 以匹配更长的课程,开场设为春天并关闭夜间模式,让第一印象更轻快。
  • 做作品集的开发者:KOI_COUNT 保持接近默认值,开场设为秋天,用可链接的季节和夜间参数在一个案例研究中展示所有状态。
  • 小型工作室的安静落地页:把工作室名称放进 BRAND,写一句简短 TAGLINE,让专注模式隐藏停靠栏,访客只看到池塘。
  • 教室或图书馆屏幕:把 START_NIGHT 设为开启,把 FOCUS_MINUTES 缩短到一节课的长度,并为第一次来的访客保留手势提示。

锦鲤池网页小玩具:常见问题

除了看鱼,我在锦鲤池网页小玩具里实际能做些什么?

锦鲤池网页小玩具响应三种手势:轻点水面产生涟漪,按住撒食让鱼群聚拢,拖拽画出水流让锦鲤跟随。除此之外,你可以在春、夏、秋、冬之间切换,开关夜间模式和下雨,打开生成式五声音阶配乐,以及启动一个隐藏界面的专注会话。

锦鲤池网页小玩具免费吗?Pro 多了什么?

锦鲤池网页小玩具的提示词及其 DESIGN.md 在 CC BY-NC 4.0 下可免费用于个人非商业用途。商业和客户项目需要 Pro,Pro 会员还能获得完整提示词和在线演示的源代码。无论哪种情况,页面都会公开展示简介、技术栈和变量。

怎么用 AI 做一个锦鲤池网页小玩具?

复制本页的提示词,或者运行 npx vibefather add koi-pond-web-toy,把 [BRAND]、[TAGLINE]、[KOI_COUNT]、[START_NIGHT] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。