跳到正文
VibeFather
免费注册

用这个模板做的 2 个案例

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

关于这个模板

光束透镜解谜游戏是一款完整的浏览器 3D 逻辑游戏,适合喜欢深思熟虑的解谜而非计时和压力的玩家。首屏就是游戏本身:多面水晶密室环绕着等距棋盘,实时光束响应每一次旋转,紧凑的控制栏让当前目标、移动步数、撤销和重新开始触手可及。默认世界、品牌、故事片段和关卡名称均为虚构。

解谜系统采用确定性的网格光学,而非物理模拟。升降镜改变光束方向,对齐的透镜透射光束,后期的分光透镜则产生分支,必须同时点亮多个接收器。十二个精心编写的关卡按顺序引入这些概念,布局精确、解法旋转固定、目标步数明确,且没有随机生成。进度和最佳成绩保存在本地存储中。玩家可以选择任意关卡,逐次撤销旋转,干净地重新开始,或使用键盘和触控操作。

视觉方向将深蓝黑石材与薄荷白光、半透明透镜和克制的青色高光搭配。正交 Three.js 场景使用程序化几何体、实例化洞穴水晶、柔和雾效和分层光束网格,而非下载的模型或纹理。Space Grotesk 和 IBM Plex Mono 让界面清晰锐利,又不与棋盘争抢注意力。动效仅限于有用的旋转、光束、悬停和完成反馈,并内置了减少动态效果和移动端质量调整。

调整四个变量即可重命名游戏、替换其世界、更改受众并重写标语。所有标签、关卡名称、说明和界面文案都集中在一个内容文件中,而编写的解谜数据则保持独立且可测试。此模板适合独立游戏实验、交互式作品集、教育光学演示,以及任何需要精致静态游戏而无需账户、服务器、远程资源或大型构建的人。

模板提示词

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

# Light Beam Lens Puzzle Game

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

## Brief
Build [BRAND], an original English-language 3D light-routing puzzle game set in [WORLD] for [AUDIENCE]. The default brand is Lumenwild, the default world is the Glassroot Caverns, and the default tagline is 'Turn the light. Wake the quiet.' The entire product is one playable static page at index.html: an isometric crystal chamber, a deterministic grid-optics engine, 12 hand-authored levels, move and target counters, undo, restart, level selection, help, optional synthesized sound, and local progress. The first screen must be the playable game, never a marketing landing page or a separate start screen.

- Audience: Indie game makers, developers, educators, and players who enjoy calm spatial reasoning. The interface must welcome non-technical players with direct manipulation and short instructions while keeping the puzzle data and optical rules easy for a developer to adapt.
- Goal: Let a visitor immediately rotate lenses, mirrors, and later beam splitters to energize every receiver, then continue through 12 increasingly involved levels. Make every interaction legible and reversible, verify that every authored solution works from the initial state, and preserve solved status and best move counts on the current device without any server.
- Tone: Quiet, precise, mysterious, and reassuring. Use short original US English labels and tiny pieces of environmental copy, not a sprawling fantasy narrative. There are no characters, enemies, timers, penalties, hot springs, restoration quests, skill trees, or references to existing games or AI products.

## Stack
- Framework: Vite 5 + React 18 + TypeScript
- Styling: Vanilla CSS
- Libraries: Vite 5 (MIT), React 18 (MIT), Three.js (MIT), lucide-react (ISC), @fontsource-variable/space-grotesk (OFL-1.1), @fontsource/ibm-plex-mono (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - Use the fixed dependencies above. Configure one index.html entry, Vite base './', and build.sourcemap false. Set the package build script to run TypeScript checking and the Vite production build, producing only static files in dist/.
  - Keep React responsible for menus, dialogs, HUD, buttons, accessibility, and game state. Use a plain Three.js scene owned by one React board component; do not add react-three-fiber, a physics engine, a postprocessing package, Tailwind, or another framework.
  - Implement independent TypeScript modules for level data, beam tracing, game state, Three.js rendering, and synthesized audio. The pure traceBeam function must calculate paths from current piece orientations; the renderer must never simply draw the authored solution route.
  - Put BRAND, WORLD, AUDIENCE, TAGLINE, all 12 level names, all instructions, button labels, dialog copy, sound labels, and aria copy in src/content.ts. Rewrite every world-specific word when variables change. Keep the fixed level coordinates and mechanics in src/game/levels.ts.
  - Use a React reducer for current level, piece rotations, selected piece, moves, undo snapshots, solved levels, best scores, and open dialog. Persist only solved status, best scores, sound preference, and current level in a localStorage key derived from a slug of BRAND. All 12 levels remain selectable from the start.
  - Import Space Grotesk Variable and IBM Plex Mono weights 400 and 500 from their Fontsource packages. Use Lucide React for interface icons. Bundle every font, script, icon, and generated visual locally; no remote assets or APIs.
  - Use an orthographic camera, procedural geometry, instanced decorative crystals, capped device pixel ratio, and no postprocessing. Cap pixel ratio at 2 on desktop and 1.5 on mobile, reduce decorative instance counts below 700px, pause rendering when the document is hidden, and dispose geometries, materials, listeners, audio nodes, and the renderer on unmount.
  - Provide visible keyboard focus, at least 44px touch targets, a skip link to the game controls, and an accessible DOM alternative for every pointer action. Support 1440×900 and 390×844 without horizontal overflow or console errors and honor prefers-reduced-motion.

## Variables
- [BRAND] — Game name (default: "Lumenwild"). An invented one- or two-word title; never an existing game, platform, or AI brand.
- [WORLD] — World name (default: "the Glassroot Caverns"). An invented crystalline place used in the level-select and help copy.
- [AUDIENCE] — Player audience (default: "players who enjoy calm logic puzzles"). The intended players, used naturally in the help introduction rather than as metadata.
- [TAGLINE] — Game tagline (default: "Turn the light. Wake the quiet."). A short original line shown beneath the game name and on the completion dialog.
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/light-beam-lens-puzzle-game 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
- Cave `#071114` — Page and scene background
- Raised `#0E1D22` — HUD, dialogs, and control surfaces
- Basalt `#173038` — Board tiles and inactive piece bodies
- Edge `#2A4850` — Borders, grid grooves, and hover outlines
- Text `#EAF7F3` — Primary interface text and bright crystal highlights
- Muted `#93AAA8` — Secondary labels, instructions, and inactive counters
- Beam `#9AFDE0` — Light paths, active receiver halos, and primary action accents
- Beam core `#F2FFF9` — Narrow bright center of every beam segment
- Lens `#82C9FF` — Lens glass, orientation marks, and selected-piece accents
- Completion `#E7C983` — Small solved check marks and completion detail only

### Typography
- Game name, level titles, dialogs, and interface: Space Grotesk Variable (OFL), weights 400/500/600/700
- Move counts, level numbers, coordinates, and compact status: IBM Plex Mono (OFL), weights 400/500

### Layout & motion
- Spacing: Use an 8px base grid. Desktop header is 64px with 24px horizontal gutters. The main shell has a 1500px maximum width, height calc(100dvh - 88px), 24px side and bottom padding, a minmax(0,1fr) board column, a 340px control rail, and a 20px gap. Keep the whole game visible at 1440×900. The board canvas fills its card with at least 600px height on large screens. Use 16px rail padding, 12px control gaps, and 24px dialog padding. Below 760px, use a 56px header, one column, 12px gutters, a board height of min(100vw,420px), compact HUD blocks, and a fixed 72px bottom control bar with 96px page-bottom clearance.
- Radius: Use 20px for the scene card and dialogs, 14px for HUD panels, 10px for buttons and level cells, and full pills for move and target counters. Keep tile geometry beveled but angular. Use soft mint shadows only around active optics and the primary next-level action; ordinary panels use 1px Edge borders rather than heavy shadows.
- Motion: Fade the complete cave and HUD in together over 480ms on first load; do not show an intro animation, camera fly-through, or blocking start button.
- Motion: Rotate a selected optical piece around the vertical axis by exactly 90 degrees over 180ms with ease-out, then redraw affected beam segments over 140ms. Game state updates immediately and never waits for the animation.
- Motion: Use a 120ms hover and keyboard-selection outline, a 160ms button press scale of 0.98, and 180ms fade-and-scale dialogs. No camera orbit or board movement is required for play.
- Motion: On completion, brighten all receivers, emit one restrained ring pulse per receiver over 900ms, and open the completion panel after 450ms. Do not loop confetti or shake the board.
- Motion: Ambient dust may drift very slowly and receiver light may breathe at low amplitude, but stop both when reduced motion is requested. Under reduced motion, rotations and beam changes are immediate and completion uses a static glow.
- Imagery: Create every visual in code with Three.js geometry, CSS, and inline SVG; there are no bitmap images, downloaded models, texture maps, HDRIs, or audio files. Build beveled square basalt tiles, angular rising and falling mirror bars, translucent flattened-sphere lenses with a clear axis line, prism splitters with a visible branch arrow, and ring-shaped receivers around faceted crystal cores. Surround the board with instanced low-poly mineral clusters and distant stalactites, using seeded placement so the scene is stable between runs. Use Cave-colored fog, hemisphere illumination, one soft directional light, and small point lights at the emitter and active receivers. Render each beam as a narrow Beam-core cylinder inside a wider transparent additive Beam cylinder at tile-center height. The board and its live optical state are the first-screen visual anchor; typography alone is never the hero. No people, mascots, logos, readable textures, brands, or reference-inspired props.

## Pages & Sections
### Playable crystal optics puzzle (`index.html`)
1. **Header and game shell** — The header contains a small original three-facet crystal mark drawn in inline SVG, the BRAND wordmark, and TAGLINE in muted text. On the right are Levels, How to play, and a Sound off / Sound on toggle with matching Lucide icons. The plain document title is BRAND and the favicon is the same original facet mark. Default supporting copy in the level rail is 'A quiet puzzle in the Glassroot Caverns', rewritten from WORLD when variables change. Optional sound uses only Web Audio oscillators and filtered generated noise after explicit user activation: a low gentle cave hum while enabled and a short soft chime on completion. Sound is off by default and never autoplays.
   Layout: Use a full-width 64px header above the two-column game shell. Align the brand left and actions right. Keep the header inside the same 1500px maximum width as the board. On mobile, show the crystal mark and BRAND at left, a Levels button and help icon at right, and move the sound toggle into the help dialog to prevent crowding.
   Motion: Header and game fade in together. Buttons use the standard 120ms hover and 160ms press response; no sticky or scroll-driven animation.
2. **Playable cave board** — The board is a real interactive Three.js scene, not a screenshot. Use an orthographic camera at (8,10,8) looking at the board center, with no automatic rotation. Frame the complete grid with approximately 12 percent breathing room. Each playable tile occupies one integer grid coordinate. The fixed emitter is a small luminous crystal pylon, mirrors rotate in quarter turns, lenses transmit only along their marked axis, splitters show their branch direction, and receivers visibly change from dormant to energized. Hovering or keyboard-selecting a rotatable piece raises a thin Lens-blue ring. Clicking or tapping that piece rotates it clockwise by 90 degrees and counts one move. Empty tiles and decorative crystals are not clickable. Keep the camera fixed so pointer-to-grid mapping remains predictable.
   Layout: The scene card occupies the large left column and fills the available desktop height. Place a small top-left overlay inside it showing 'CHAMBER 01' and a bottom-left overlay with 'Click an optic to rotate · U undo · R restart'. These overlays must not cover active pieces. The board remains the dominant visual, at least twice the control rail's width at 1440px. On mobile it appears first, before the compact level information.
   Motion: Piece rotation, live beam redraw, selection ring, subtle dust, and receiver completion pulses follow the design motion rules. Do not use drag-to-orbit, scroll zoom, camera shake, or physics-based mirrors.
3. **Level HUD and controls** — For the default first level, show the mono eyebrow 'LEVEL 01 / 12', H1 'First Light', instruction 'Align the lens and carry the beam to the listening crystal.', and two counters labeled 'MOVES 0' and 'TARGET 1'. Primary controls are Undo and Restart; Undo is disabled before the first move. A compact legend reads 'Lens · align its axis', 'Mirror · turn the beam', and later adds 'Splitter · light two paths'. A small status line says '0 of 1 receivers lit' and updates immediately. The bottom note reads 'Progress stays on this device.' Include an optional CREDIT footer link in small muted text, but no other site footer, dates, pricing, account, or promotional copy.
   Layout: The right rail is one bordered panel with the level copy at top, counters in a two-column row, receiver status beneath, and Undo / Restart as equal-width buttons. Put the legend below a thin divider and the device-progress note at the bottom. At mobile width, compress this to a single panel with level eyebrow, 28px title, one-line instruction, two counters, and receiver status; move Undo and Restart into the fixed bottom bar beside a Rotate selected button.
   Motion: Counter changes crossfade over 120ms. Receiver status uses a static dot that becomes mint; do not animate number rolling. The completion action appears only after every receiver is lit.
4. **Deterministic optics and game state** — Use zero-based x,y coordinates from the board's top-left and cardinal directions N,E,S,W. An emitter sends one unit of light in its fixed direction. Advance cell by cell. Leaving the grid or hitting a blocker stops that branch. A rising mirror maps N→E, E→N, S→W, W→S; a falling mirror maps N→W, W→N, S→E, E→S. A horizontal lens passes E and W only; a vertical lens passes N and S only; a wrong-axis lens stops the branch. A splitter passes the incoming direction straight through and adds one branch in its displayed cardinal direction. A receiver activates only when a branch enters while traveling in its required direction; wrong-direction light stops without activating it. Completion requires every receiver to be active on the same trace. Use a queue for split branches, deduplicate cell+direction visits, and cap total visits at 2048 to terminate loops safely. Render the resulting cell-center segments after every move.

Store each optical piece's rotation as 0–3 clockwise quarter turns; mirrors and lenses use rotation modulo 2 and splitters use all four directions. Every rotation pushes a snapshot onto the undo stack and increments moves. Undo restores the prior orientations and prior move count; Restart restores the authored initial orientations and zero moves. Save best score only when solved and only if it improves the prior best. All targets, mirrors, lenses, splitters, emitters, and blockers must be data, not hard-coded renderer branches. Before delivery, programmatically apply each listed solution to its initial level and assert that every receiver activates; also assert that each initial level begins unsolved.
   Layout: Implement this as pure game logic independent of React and Three.js, with the HUD reading the same traced receiver state as the 3D scene. No visual or timing difference may change the puzzle result.
   Motion: None in the logic layer. Visual interpolation must never delay state updates or completion detection.
5. **Twelve authored levels** — Use these exact level definitions and default names. Notation: E(x,y,d) is the fixed emitter; T(x,y,d) is a receiver requiring incoming travel direction d; M(x,y,R/F) is the solved rising/falling mirror; L(x,y,H/V) is the solved horizontal/vertical lens; P(x,y,d) is the solved splitter branch direction; X(x,y) is a solid crystal blocker. Fill uninterrupted straight segments between the described optical points. All listed mirrors and lenses start one clockwise quarter turn away from their solved orientation. Splitters start in the stated initial branch direction. Target is the authored solution's clockwise click count, not a claim that no shorter alternative exists.

01 First Light · 4×4 · E(0,1,E) · T(3,1,E) · L(1,1,H) · target 1.
02 Corner Song · 4×4 · E(0,0,E) · T(2,3,S) · M(2,0,F) · target 1.
03 Return Path · 4×4 · E(0,2,E) · T(0,0,W) · M(2,2,R), M(2,0,F) · L(1,2,H) · target 3.
04 Three Turns · 5×5 · E(0,4,E) · T(1,3,S) · M(4,4,R), M(4,1,F), M(1,1,R) · L(2,4,H) · target 4.
05 Lantern Loop · 5×5 · E(0,0,E) · T(4,2,E) · M(3,0,F), M(3,4,R), M(1,4,F), M(1,2,R) · L(1,0,H), L(2,2,H) · target 6.
06 Narrow Glass · 5×5 · E(0,2,E) · T(4,4,S) · M(2,2,R), M(2,0,R), M(4,0,F) · L(1,2,H), L(3,0,H), L(4,2,V) · X(0,0), X(1,4), X(3,3) · target 6.
07 Crosscurrent · 6×6 · E(0,5,E) · T(4,3,E) · M(5,5,R), M(5,1,F), M(3,1,F), M(3,0,F), M(1,0,R), M(1,3,F) · L(2,5,H), L(2,3,H) · target 8.
08 Two Lights · 6×6 · E(0,2,E) · P(2,2,S), initial branch N · T(5,2,E), T(5,4,E) · M(2,4,F) · L(4,2,H), L(4,4,H) · target 5.
09 Forked Current · 6×6 · E(0,0,E) · P(2,0,S), initial branch E · T(5,5,S), T(0,5,S) · M(5,0,F), M(2,3,R), M(0,3,R) · L(5,2,V), L(1,3,H) · target 6.
10 Quiet Divide · 6×6 · E(0,5,E) · P(2,2,E), initial branch N · T(5,0,E), T(3,4,W) · M(2,5,R), M(2,0,R), M(5,2,F), M(5,4,R) · L(4,0,H), L(4,2,H), L(4,4,H) · target 8.
11 Threefold · 7×7 · E(0,3,E) · P(2,3,N), initial branch E · P(5,3,S), initial branch E · T(6,3,E), T(0,0,W), T(3,6,W) · M(2,0,F), M(5,6,R) · L(4,3,H), L(2,1,V), L(4,6,H) · target 9.
12 Full Constellation · 7×7 · E(0,6,E) · P(1,3,E), initial branch N · P(4,3,S), initial branch E · T(6,0,E), T(6,1,N), T(2,6,W) · M(1,6,R), M(1,0,R), M(6,3,R), M(4,6,R) · L(1,4,V), L(3,0,H), L(5,3,H), L(3,6,H) · target 10.

For splitters, straight transmission follows the incoming direction and the listed branch is additional. Thus level 08 sends E light through P(2,2,S) toward the east receiver and a south branch to M(2,4,F), which turns it east. Levels 11 and 12 chain two splitters to three receivers. Do not add random layouts, rotate emitters or receivers, move pieces between cells, or substitute a different puzzle generator.
   Layout: Store all 12 definitions in a typed array with id, default name, grid size, emitter, receivers, pieces, blockers, and target moves. Level-select order is exactly 01 through 12. Increase complexity through longer routes, more mirrors and lenses, blockers, then splitters and multiple receivers; do not introduce another mechanic.
   Motion: Switching levels crossfades the HUD over 160ms and rebuilds the board without a camera move. Completion never automatically advances before the player chooses Next chamber.
6. **Level select help and completion dialogs** — Levels opens a dialog titled 'Choose a chamber' with the world-specific line 'Twelve quiet paths through the Glassroot Caverns.' Use a 3×4 grid on desktop and 3×4 compact grid on mobile. Every button shows its two-digit number and default level name; solved buttons add a small Completion-colored check and best move count. All levels are available without locking. How to play opens 'Rotate the optics. Follow the light.' and three short numbered instructions: '1. Select a lens, mirror, or splitter.', '2. Click or tap to turn it 90 degrees.', '3. Light every receiver to finish the chamber.' Include keyboard help 'Arrow keys select an optic · Enter rotates · U undo · R restart · L levels · Esc closes'. Completion shows 'The path is whole.', the current level name, 'Solved in {moves} moves · Target {target}', TAGLINE, and buttons Next chamber and Replay. On level 12, Next chamber becomes Back to levels.
   Layout: Use centered modal dialogs over a Cave 78 percent backdrop, with a maximum width of 560px and visible close button. Trap focus, restore focus on close, close on Escape, and prevent background pointer interaction. The level dialog scrolls internally if vertical space is short. The completion panel is smaller and must not obscure the board until its scheduled appearance.
   Motion: Dialogs fade and scale from 0.98 to 1 over 180ms. Solved checks appear without stagger. Reduced-motion mode uses immediate visibility changes.
7. **Responsive keyboard and accessible play** — Provide equivalent keyboard operation: Left and Right Arrow cycle through rotatable pieces in reading order, Enter or Space rotates the selected piece, U undoes, R restarts, and L opens level select; ignore game shortcuts while a dialog or form control has focus. Expose a DOM list of the current pieces with descriptive labels such as 'Lens at column 2, row 2, horizontal' and update those labels after rotation. The canvas has an accessible summary and the HUD announces receiver count and completion through a polite live region. On touch, one tap selects and rotates directly; the fixed Rotate selected button provides an alternative. Prevent double-tap zoom only on the board controls, not globally, and preserve normal page accessibility.
   Layout: At 1440×900 the complete board and rail fit without page scrolling. At 390×844, order is header, scene, compact level HUD, then a fixed bottom bar with Undo, Rotate selected, and Restart. Keep controls at least 44px high, do not crop the grid, and avoid horizontal scrolling at every breakpoint. If WebGL is unavailable, show a clear local message in the scene card while retaining level information and help; do not throw console errors.
   Motion: Honor prefers-reduced-motion in CSS and Three.js. Reduce geometry counts on small screens without changing puzzle coordinates or input behavior. No interaction depends on hover, animation completion, sound, or fine dragging.

## Assets
- image: No image files are used. Generate the complete cave, grid, mirrors, lenses, splitters, receivers, beams, crystals, particles, favicon, and original facet mark with Three.js geometry, CSS, and inline SVG. Use a fixed seed for decorative placement. Do not download or hotlink textures, models, photographs, or placeholder images.
- icon: Use locally bundled lucide-react icons only for Undo2, RotateCcw, Grid3X3, CircleHelp, Volume2, VolumeX, X, Check, and ChevronRight. Optical piece shapes and the original facet mark are drawn from scratch, not copied from an icon set or reference.
- font: Self-host Space Grotesk Variable through @fontsource-variable/space-grotesk and IBM Plex Mono 400/500 through @fontsource/ibm-plex-mono, both OFL-1.1. Import the npm packages in the app and list the packages, font authors, sources, and licenses in ASSETS.md; never use a font CDN.
- video: No video or audio files are used. Optional ambience and completion feedback are synthesized locally with Web Audio after user activation, with sound off by default and no remote requests.

## Don'ts
- Do not add a backend, API route, database, authentication, account system, online scoreboard, multiplayer, analytics, third-party API, or any network-dependent gameplay; use local browser state only.
- Do not change the fixed stack or add react-three-fiber, a physics engine, a postprocessing framework, Tailwind, a game engine, Unity, Unreal, Godot, or another rendering dependency.
- Do not ship anything beyond static dist/ output. Use Vite base './', the single index.html entry, relative asset paths, minification, no source maps, no copied src/, and keep dist/ under 20 MB.
- Do not use CDN scripts, remote fonts, remote icons, hotlinked files, placeholder-image services, downloaded models, bitmap textures, HDRIs, stock photos, or recorded audio. Every visual and sound must be generated locally in code.
- Do not copy or paraphrase the inspiration's prompt, source code, exact interface, title, story, level layouts, progression, models, textures, audio, icons, or other identifiable assets.
- Do not mention Kimi or the reference title inside the game. Do not use hot-spring ruins, warm-water restoration, chapter quests, skill trees, mascots, characters, or signature props from the reference.
- Do not use real people's likenesses, celebrities, anime or game characters, existing game or platform names, recognizable logos, commercial fonts, or third-party branded imagery.
- Do not replace deterministic grid tracing with physical raycasting or draw canned solution beams. Every visible beam and receiver state must come from the current orientations, and loops must terminate safely.
- Do not procedurally generate, remove, reorder, or substitute the 12 specified levels. Do not allow pieces to move between cells or add timers, enemies, lives, scores unrelated to moves, locked levels, in-app purchases, or random failure.
- Do not ship an unsolved initial board or an unvalidated authored solution. Apply every listed solution during development and verify all receivers activate while every initial state remains unsolved.
- Do not use a marketing hero, intro video, mandatory start screen, separate tutorial route, or scroll-driven landing page. The playable board must be visible and usable on the first screen.
- Do not autoplay audio, require sound, use camera shake, force device motion permissions, or continue ambient and completion animation when prefers-reduced-motion is enabled.
- Do not make mobile play depend on hover, dragging, tiny targets, or desktop keyboard shortcuts. Avoid clipped grids, horizontal overflow, blocked controls, and console errors at 1440×900 and 390×844.
- Do not add SEO metadata, Open Graph tags, JSON-LD, sitemap work, keyword-stuffed text, dates, pricing, membership claims, or promotional sections. Use only a plain BRAND document title and the original favicon.
- Do not mention VibeFather anywhere in the game except the optional CREDIT link, and do not hard-code default world-specific copy outside src/content.ts.

---
Inspired by 黄玉秘藏 3D Interactive Game — https://www.kimi.com/showcases/3dmake
— Prompt by VibeFather · https://vibefather.ai/t/light-beam-lens-puzzle-game · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# 光束透镜解谜游戏

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

## 简介
构建 [BRAND],一款原创的英语 3D 光路解谜游戏,背景设定在 [WORLD],面向 [AUDIENCE]。默认品牌为 Lumenwild,默认世界为 Glassroot Caverns,默认标语为“Turn the light. Wake the quiet.”。整个产品是一个可玩的静态页面,位于 index.html:一个等距水晶密室、一个确定性的网格光学引擎、12 个手工编写的关卡、移动和目标计数器、撤销、重新开始、关卡选择、帮助、可选的合成音效以及本地进度。首屏必须是可玩的游戏,绝不能是营销落地页或单独的启动画面。

- 受众:独立游戏制作者、开发者、教育工作者以及喜欢平静空间推理的玩家。界面必须通过直接操作和简短说明来欢迎非技术玩家,同时让谜题数据和光学规则便于开发者改编。
- 目标:让访客立即旋转透镜、镜子以及后续的分束器,为每个接收器供能,然后继续通过 12 个逐渐复杂的关卡。让每一次交互都清晰可读且可逆,验证每个编写的解法都能从初始状态开始运行,并在当前设备上保留已解决状态和最佳移动次数,无需任何服务器。
- 语气:安静、精确、神秘且令人安心。使用简短的原创美式英语标签和少量环境文案,而不是庞大的奇幻叙事。没有角色、敌人、计时器、惩罚、温泉、恢复任务、技能树,也没有对现有游戏或 AI 产品的引用。

## 技术栈
- 框架:Vite 5 + React 18 + TypeScript
- 样式:原生 CSS(Vanilla CSS)
- 库:Vite 5(MIT)、React 18(MIT)、Three.js(MIT)、lucide-react(ISC)、@fontsource-variable/space-grotesk(OFL-1.1)、@fontsource/ibm-plex-mono(OFL-1.1)
- 构建:`npm run build` → `dist/` 中的静态文件。无后端、无服务器代码、无外部 API。
- 设置:
  - 使用上述固定依赖。配置一个 index.html 入口、Vite base './'、build.sourcemap false。将 package 的 build 脚本设置为运行 TypeScript 检查和 Vite 生产构建,仅在 dist/ 中生成静态文件。
  - 让 React 负责菜单、对话框、HUD、按钮、无障碍和游戏状态。使用一个由单个 React 棋盘组件拥有的普通 Three.js 场景;不要添加 react-three-fiber、物理引擎、后处理包、Tailwind 或其他框架。
  - 为关卡数据、光束追踪、游戏状态、Three.js 渲染和合成音频实现独立的 TypeScript 模块。纯 traceBeam 函数必须根据当前棋子朝向计算路径;渲染器绝不能简单地绘制预设的解法路线。
  - 将 BRAND、WORLD、AUDIENCE、TAGLINE、全部 12 个关卡名称、所有说明、按钮标签、对话框文案、声音标签和 aria 文案放入 src/content.ts。当变量变化时,重写每个世界特定的词。将固定的关卡坐标和机制保留在 src/game/levels.ts 中。
  - 使用 React reducer 管理当前关卡、棋子旋转、选中棋子、步数、撤销快照、已解决关卡、最佳分数和打开的对话框。仅将已解决状态、最佳分数、声音偏好和当前关卡持久化到由 BRAND 的 slug 派生的 localStorage 键中。全部 12 个关卡从一开始就可选择。
  - 从各自的 Fontsource 包中导入 Space Grotesk Variable 和 IBM Plex Mono 的 400 和 500 字重。使用 Lucide React 作为界面图标。将所有字体、脚本、图标和生成的视觉内容本地打包;无远程资源或 API。
  - 使用正交相机、程序化几何体、实例化装饰晶体、限制设备像素比,且不使用后处理。桌面端像素比上限为 2,移动端为 1.5,在低于 700px 时减少装饰实例数量,文档隐藏时暂停渲染,并在卸载时释放几何体、材质、监听器、音频节点和渲染器。
  - 提供可见的键盘焦点、至少 44px 的触摸目标、指向游戏控制的跳过链接,以及每个指针操作的无障碍 DOM 替代方案。支持 1440×900 和 390×844,无水平溢出或控制台错误,并遵循 prefers-reduced-motion。

## 变量
- [BRAND] — 游戏名称(默认:“Lumenwild”)。一个虚构的一词或两词标题;绝不使用现有的游戏、平台或 AI 品牌。
- [WORLD] — 世界名称(默认:“the Glassroot Caverns”)。一个虚构的水晶之地,用于关卡选择和帮助文案中。
- [AUDIENCE] — 玩家受众(默认:“players who enjoy calm logic puzzles”)。目标玩家,自然地用于帮助介绍中,而非作为元数据。
- [TAGLINE] — 游戏标语(默认:“Turn the light. Wake the quiet.”)。一行简短的原创文字,显示在游戏名称下方以及完成对话框中。
- [CREDIT] — 在页脚保留一个小的“Template by VibeFather”链接指向 https://vibefather.ai/t/light-beam-lens-puzzle-game(默认:是;删除此行即可移除)

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

## 设计
### 颜色
- 洞穴(Cave)`#071114` — 页面和场景背景
- 凸起(Raised)`#0E1D22` — HUD、对话框和控制面板
- 玄武岩(Basalt)`#173038` — 棋盘格子和未激活棋子主体
- 边缘(Edge)`#2A4850` — 边框、网格凹槽和悬停轮廓
- 文本(Text)`#EAF7F3` — 主界面文本和明亮水晶高光
- 柔和(Muted)`#93AAA8` — 次级标签、说明和非活动计数器
- 光束(Beam)`#9AFDE0` — 光路、活动接收器光晕和主操作强调色
- 光束核心(Beam core)`#F2FFF9` — 每段光束狭窄的明亮中心
- 透镜(Lens)`#82C9FF` — 透镜玻璃、方向标记和选中棋子强调色
- 完成(Completion)`#E7C983` — 仅用于小型已解谜勾选标记和完成细节

### 排版
- 游戏名称、关卡标题、对话框和界面:Space Grotesk Variable(OFL),字重 400/500/600/700
- 移动计数、关卡编号、坐标和紧凑状态:IBM Plex Mono(OFL),字重 400/500

### 布局与动效
- 间距:使用 8px 基础网格。桌面端页头为 64px,水平边距 24px。主外壳最大宽度 1500px,高度 calc(100dvh - 88px),侧边和底部内边距 24px,棋盘列为 minmax(0,1fr),控制栏 340px,间隙 20px。在 1440×900 下保持整个游戏可见。棋盘画布填满其卡片,大屏幕上高度至少 600px。控制栏内边距 16px,控件间隙 12px,对话框内边距 24px。低于 760px 时,使用 56px 页头、单列布局、12px 边距、棋盘高度 min(100vw,420px)、紧凑 HUD 块,以及固定的 72px 底部控制栏,页面底部留白 96px。
- 圆角:场景卡片和对话框使用 20px,HUD 面板使用 14px,按钮和关卡格子使用 10px,移动和目标计数器使用完整胶囊形。保持格子几何为斜切但棱角分明。仅在活动光学元件和主下一关操作周围使用柔和薄荷色阴影;普通面板使用 1px Edge 边框而非重阴影。
- 动效:首次加载时,整个洞穴和 HUD 在 480ms 内一起淡入;不显示开场动画、镜头飞越或阻塞式开始按钮。
- 动效:选中的光学棋子绕垂直轴在 180ms 内以 ease-out 精确旋转 90 度,然后在 140ms 内重绘受影响的光束段。游戏状态立即更新,绝不等待动画。
- 动效:使用 120ms 的悬停和键盘选中轮廓、160ms 的按钮按下缩放 0.98,以及 180ms 的淡入缩放对话框。游玩不需要镜头环绕或棋盘移动。
- 动效:完成时,点亮所有接收器,每个接收器在 900ms 内发出一次克制的环形脉冲,并在 450ms 后打开完成面板。不要循环彩带或摇晃棋盘。
- 动效:环境尘埃可以非常缓慢地飘动,接收器光可以低幅度呼吸,但在请求减少动效时停止两者。在减少动效下,旋转和光束变化立即生效,完成使用静态辉光。
- 图像:使用 Three.js 几何体、CSS 和内联 SVG 在代码中创建所有视觉元素;没有位图图像、下载的模型、纹理贴图、HDRI 或音频文件。构建斜切方形玄武岩格子、棱角分明的升降镜条、带清晰轴线半透明扁球透镜、带可见分支箭头的棱镜分光器,以及围绕多面水晶核心的环形接收器。用实例化低多边形矿物簇和远处钟乳石环绕棋盘,使用种子化放置,使场景在多次运行间保持稳定。使用 Cave 色雾、半球光照、一个柔和方向光,以及发射器和活动接收器处的小点光源。将每束光渲染为格子中心高度处一个狭窄的 Beam-core 圆柱,位于一个更宽的透明加色 Beam 圆柱内。棋盘及其实时光学状态是第一屏的视觉锚点;排版本身永远不是主角。没有人物、吉祥物、标志、可读纹理、品牌或参考启发的道具。

## 页面与区块
### 可玩的水晶光学谜题(`index.html`)
1. **页头与游戏外壳** — 页头包含一个用内联 SVG 绘制的原创三切面水晶标记、BRAND 字标,以及用柔和文字显示的 TAGLINE。右侧是 Levels、How to play,以及一个带对应 Lucide 图标的 Sound off / Sound on 切换按钮。纯文档标题为 BRAND,favicon 使用同一个原创切面标记。关卡栏中的默认辅助文案为 'A quiet puzzle in the Glassroot Caverns',当变量变化时由 WORLD 重写。可选声音仅在用户明确激活后使用 Web Audio 振荡器和经过滤波的生成噪声:启用时播放低缓的洞穴嗡鸣,完成时播放短促柔和的提示音。声音默认关闭,且绝不自动播放。
   布局:在双栏游戏外壳上方使用全宽 64px 页头。品牌靠左,操作靠右。页头与棋盘保持相同的 1500px 最大宽度。在移动端,左侧显示水晶标记和 BRAND,右侧显示 Levels 按钮和帮助图标,并将声音切换移入帮助对话框以避免拥挤。
   动效:页头与游戏一同淡入。按钮使用标准的 120ms 悬停和 160ms 按下响应;不使用粘性动画或滚动驱动动画。
2. **可玩的洞穴棋盘** — 棋盘是真正的交互式 Three.js 场景,而非截图。使用位于 (8,10,8) 的正交相机看向棋盘中心,不自动旋转。以约 12% 的留白框住完整网格。每个可玩图块占据一个整数网格坐标。固定发射器是一个小型发光水晶塔,反射镜按四分之一圈旋转,透镜仅沿其标记轴透光,分光器显示其分支方向,接收器从休眠到激活有明显变化。悬停或用键盘选中可旋转部件时,会升起一圈细的 Lens-blue 光环。点击或轻触该部件会将其顺时针旋转 90 度并计为一步。空图块和装饰性水晶不可点击。保持相机固定,使指针到网格的映射保持可预测。
   布局:场景卡片占据左侧大栏,并填满可用的桌面高度。在其内部左上角放置一个小叠加层显示 'CHAMBER 01',左下角放置一个叠加层显示 'Click an optic to rotate · U undo · R restart'。这些叠加层不得覆盖活动部件。棋盘保持主导视觉,在 1440px 下至少为控制栏宽度的两倍。在移动端它首先出现,位于紧凑的关卡信息之前。
   动效:部件旋转、实时光束重绘、选中光环、细微尘埃和接收器完成脉冲遵循设计动效规则。不要使用拖拽环绕、滚轮缩放、相机抖动或基于物理的反射镜。
3. **关卡 HUD 与控制** — 对于默认第一关,显示等宽眉题 'LEVEL 01 / 12'、H1 'First Light'、说明 'Align the lens and carry the beam to the listening crystal.',以及两个计数器,分别标记为 'MOVES 0' 和 'TARGET 1'。主要控制为 Undo 和 Restart;Undo 在第一步之前禁用。紧凑图例显示 'Lens · align its axis'、'Mirror · turn the beam',之后添加 'Splitter · light two paths'。一行小状态文字显示 '0 of 1 receivers lit' 并立即更新。底部注释显示 'Progress stays on this device.'。以小号柔和文字包含一个可选的 CREDIT 页脚链接,但不包含其他站点页脚、日期、定价、账户或促销文案。
   布局:右侧栏是一个带边框的面板,顶部为关卡文案,计数器位于两列行中,接收器状态在其下方,Undo / Restart 为等宽按钮。将图例放在一条细分隔线下方,设备进度注释放在底部。在移动端宽度下,将其压缩为单个面板,包含关卡眉题、28px 标题、单行说明、两个计数器和接收器状态;将 Undo 和 Restart 移入固定底栏,旁边是一个 Rotate selected 按钮。
   动效:计数器变化以 120ms 交叉淡入淡出。接收器状态使用一个静态圆点,激活时变为薄荷色;不要对数字滚动做动画。完成操作仅在每个接收器都点亮后出现。
4. **确定性光学与游戏状态** — 使用从棋盘左上角开始的零基 x,y 坐标和基本方向 N,E,S,W。发射器沿其固定方向发送一单位光。逐格推进。离开网格或碰到阻挡物会停止该分支。上升反射镜映射 N→E、E→N、S→W、W→S;下降反射镜映射 N→W、W→N、S→E、E→S。水平透镜仅通过 E 和 W;垂直透镜仅通过 N 和 S;轴错误的透镜会停止分支。分光器将入射方向直接通过,并在其显示的基方向添加一个分支。接收器仅在分支沿其所需方向进入时激活;方向错误的光会停止且不会激活它。完成要求每个接收器在同一次追踪中均处于激活状态。对分光分支使用队列,对单元格+方向访问去重,并将总访问次数上限设为 2048 以安全终止循环。每次移动后渲染得到的单元格中心线段。

将每个光学部件的旋转存储为 0–3 个顺时针四分之一圈;反射镜和透镜使用旋转模 2,分光器使用全部四个方向。每次旋转都会将快照推入撤销栈并增加步数。Undo 恢复先前的朝向和先前的步数;Restart 恢复作者设定的初始朝向和零步数。仅在解出时保存最佳分数,且仅当它优于先前最佳时保存。所有目标、反射镜、透镜、分光器、发射器和阻挡物都必须是数据,而不是硬编码的渲染器分支。交付前,以编程方式将每个列出的解法应用到其初始关卡,并断言每个接收器都激活;同时断言每个初始关卡开始时未解出。
   布局:将其实现为独立于 React 和 Three.js 的纯游戏逻辑,HUD 读取与 3D 场景相同的追踪接收器状态。任何视觉或时序差异都不得改变谜题结果。
   动效:逻辑层无动效。视觉插值绝不得延迟状态更新或完成检测。
5. **十二个作者关卡** — 使用这些确切的关卡定义和默认名称。记法:E(x,y,d) 是固定发射器;T(x,y,d) 是需要入射行进方向 d 的接收器;M(x,y,R/F) 是解出的上升/下降反射镜;L(x,y,H/V) 是解出的水平/垂直透镜;P(x,y,d) 是解出的分光器分支方向;X(x,y) 是实心水晶阻挡物。填充所描述光学点之间不间断的直线段。所有列出的反射镜和透镜起始时都偏离其解出朝向一个顺时针四分之一圈。分光器以所述初始分支方向开始。目标是作者解法的顺时针点击次数,并非声称不存在更短的替代方案。

01 First Light · 4×4 · E(0,1,E) · T(3,1,E) · L(1,1,H) · target 1。
02 Corner Song · 4×4 · E(0,0,E) · T(2,3,S) · M(2,0,F) · target 1。
03 Return Path · 4×4 · E(0,2,E) · T(0,0,W) · M(2,2,R), M(2,0,F) · L(1,2,H) · target 3。
04 Three Turns · 5×5 · E(0,4,E) · T(1,3,S) · M(4,4,R), M(4,1,F), M(1,1,R) · L(2,4,H) · target 4。
05 Lantern Loop · 5×5 · E(0,0,E) · T(4,2,E) · M(3,0,F), M(3,4,R), M(1,4,F), M(1,2,R) · L(1,0,H), L(2,2,H) · target 6。
06 Narrow Glass · 5×5 · E(0,2,E) · T(4,4,S) · M(2,2,R), M(2,0,R), M(4,0,F) · L(1,2,H), L(3,0,H), L(4,2,V) · X(0,0), X(1,4), X(3,3) · target 6。
07 Crosscurrent · 6×6 · E(0,5,E) · T(4,3,E) · M(5,5,R), M(5,1,F), M(3,1,F), M(3,0,F), M(1,0,R), M(1,3,F) · L(2,5,H), L(2,3,H) · target 8。
08 Two Lights · 6×6 · E(0,2,E) · P(2,2,S), initial branch N · T(5,2,E), T(5,4,E) · M(2,4,F) · L(4,2,H), L(4,4,H) · target 5。
09 Forked Current · 6×6 · E(0,0,E) · P(2,0,S), initial branch E · T(5,5,S), T(0,5,S) · M(5,0,F), M(2,3,R), M(0,3,R) · L(5,2,V), L(1,3,H) · target 6。
10 Quiet Divide · 6×6 · E(0,5,E) · P(2,2,E), initial branch N · T(5,0,E), T(3,4,W) · M(2,5,R), M(2,0,R), M(5,2,F), M(5,4,R) · L(4,0,H), L(4,2,H), L(4,4,H) · target 8。
11 Threefold · 7×7 · E(0,3,E) · P(2,3,N), initial branch E · P(5,3,S), initial branch E · T(6,3,E), T(0,0,W), T(3,6,W) · M(2,0,F), M(5,6,R) · L(4,3,H), L(2,1,V), L(4,6,H) · target 9。
12 Full Constellation · 7×7 · E(0,6,E) · P(1,3,E), initial branch N · P(4,3,S), initial branch E · T(6,0,E), T(6,1,N), T(2,6,W) · M(1,6,R), M(1,0,R), M(6,3,R), M(4,6,R) · L(1,4,V), L(3,0,H), L(5,3,H), L(3,6,H) · target 10。

对于分光器,直线传输沿入射方向进行,列出的分支为额外分支。因此,第 08 关将 E 光通过 P(2,2,S) 发送至东侧接收器,并分出一条南向分支至 M(2,4,F),后者将其转向东。第 11 关和第 12 关将两个分光器串联至三个接收器。不要添加随机布局、旋转发射器或接收器、在单元格之间移动棋子,或替换为不同的谜题生成器。
   布局:将所有 12 个定义存储在一个类型化数组中,包含 id、默认名称、网格尺寸、发射器、接收器、棋子、阻挡物和目标步数。关卡选择顺序严格为 01 至 12。通过更长的路线、更多反射镜和透镜、阻挡物,然后是分光器和多个接收器来增加复杂度;不要引入其他机制。
   动效:切换关卡时,HUD 在 160ms 内交叉淡入淡出,并在不移动摄像机的情况下重建棋盘。完成关卡后,在玩家选择 Next chamber 之前绝不自动前进。
6. **关卡选择帮助和完成对话框** — Levels 打开一个标题为 'Choose a chamber' 的对话框,其中包含世界特定文案 'Twelve quiet paths through the Glassroot Caverns.'。桌面端使用 3×4 网格,移动端使用 3×4 紧凑网格。每个按钮显示其两位数字编号和默认关卡名称;已解决的按钮添加一个小的 Completion 色对勾和最佳步数。所有关卡均可用,无需解锁。How to play 打开 'Rotate the optics. Follow the light.' 以及三条简短编号说明:'1. Select a lens, mirror, or splitter.'、'2. Click or tap to turn it 90 degrees.'、'3. Light every receiver to finish the chamber.'。包含键盘帮助 'Arrow keys select an optic · Enter rotates · U undo · R restart · L levels · Esc closes'。完成时显示 'The path is whole.'、当前关卡名称、'Solved in {moves} moves · Target {target}'、TAGLINE,以及按钮 Next chamber 和 Replay。在第 12 关,Next chamber 变为 Back to levels。
   布局:在 Cave 78 percent 背景上使用居中的模态对话框,最大宽度 560px,并显示可见的关闭按钮。捕获焦点,关闭时恢复焦点,按 Escape 关闭,并阻止背景指针交互。如果垂直空间不足,关卡对话框内部滚动。完成面板较小,在其预定出现之前不得遮挡棋盘。
   动效:对话框在 180ms 内从 0.98 淡入并缩放至 1。已解决对勾出现时无交错。减少动态效果模式使用即时可见性变化。
7. **响应式键盘和可访问游玩** — 提供等效的键盘操作:左、右方向键按阅读顺序循环切换可旋转棋子,Enter 或 Space 旋转选中的棋子,U 撤销,R 重新开始,L 打开关卡选择;当对话框或表单控件具有焦点时忽略游戏快捷键。暴露当前棋子的 DOM 列表,带有描述性标签,例如 'Lens at column 2, row 2, horizontal',并在旋转后更新这些标签。画布具有可访问的摘要,HUD 通过礼貌的实时区域播报接收器数量和完成状态。在触摸设备上,单击直接选择并旋转;固定的 Rotate selected 按钮提供替代方案。仅在棋盘控件上阻止双击缩放,而非全局阻止,并保持正常的页面可访问性。
   布局:在 1440×900 下,完整棋盘和侧栏无需页面滚动即可容纳。在 390×844 下,顺序为页眉、场景、紧凑关卡 HUD,然后是固定底栏,包含 Undo、Rotate selected 和 Restart。控件高度至少保持 44px,不要裁剪网格,并在每个断点避免水平滚动。如果 WebGL 不可用,在场景卡片中显示清晰的本地消息,同时保留关卡信息和帮助;不要抛出控制台错误。
   动效:在 CSS 和 Three.js 中遵循 prefers-reduced-motion。在不改变谜题坐标或输入行为的情况下,减少小屏幕上的几何体数量。任何交互都不依赖悬停、动画完成、声音或精细拖动。

## 资产
- 图像:不使用任何图像文件。使用 Three.js 几何体、CSS 和内联 SVG 生成完整的洞穴、网格、镜子、透镜、分光器、接收器、光束、晶体、粒子、favicon 和原创 facet 标记。装饰性放置使用固定种子。不要下载或热链纹理、模型、照片或占位图像。
- 图标:仅对 Undo2、RotateCcw、Grid3X3、CircleHelp、Volume2、VolumeX、X、Check 和 ChevronRight 使用本地打包的 lucide-react 图标。光学元件形状和原创 facet 标记从零绘制,不复制自图标集或参考。
- 字体:通过 @fontsource-variable/space-grotesk 自托管 Space Grotesk Variable,通过 @fontsource/ibm-plex-mono 自托管 IBM Plex Mono 400/500,两者均为 OFL-1.1。在应用中导入 npm 包,并在 ASSETS.md 中列出包、字体作者、来源和许可证;绝不使用字体 CDN。
- 视频:不使用任何视频或音频文件。可选的环境音和完成反馈在用户激活后通过 Web Audio 在本地合成,默认关闭声音,且不发起远程请求。

## 禁止事项
- 不要添加后端、API 路由、数据库、身份验证、账户系统、在线排行榜、多人模式、分析统计、第三方 API,或任何依赖网络的玩法;仅使用本地浏览器状态。
- 不要更改固定技术栈,也不要添加 react-three-fiber、物理引擎、后处理框架、Tailwind、游戏引擎、Unity、Unreal、Godot 或其他渲染依赖。
- 除静态 dist/ 输出外,不要交付任何其他内容。使用 Vite base './'、单一 index.html 入口、相对资源路径、压缩、无 source map、不复制 src/,并保持 dist/ 在 20 MB 以下。
- 不要使用 CDN 脚本、远程字体、远程图标、热链接文件、占位图服务、下载的模型、位图纹理、HDRI、库存照片或录制音频。每个视觉和声音都必须在代码中本地生成。
- 不要复制或改写灵感来源的提示词、源代码、确切界面、标题、故事、关卡布局、进度、模型、纹理、音频、图标或其他可识别资产。
- 不要在游戏内提及 Kimi 或参考标题。不要使用参考中的温泉遗迹、温水修复、章节任务、技能树、吉祥物、角色或标志性道具。
- 不要使用真实人物肖像、名人、动漫或游戏角色、现有游戏或平台名称、可识别标志、商业字体或第三方品牌图像。
- 不要用物理射线投射替代确定性网格追踪,也不要绘制预设的解法光束。每条可见光束和接收器状态都必须来自当前朝向,且循环必须安全终止。
- 不要程序化生成、移除、重排或替换指定的 12 个关卡。不要允许棋子在不同单元格之间移动,也不要添加计时器、敌人、生命、与移动无关的分数、锁定关卡、应用内购买或随机失败。
- 不要交付未解决的初始棋盘或未经验证的作者解法。在开发过程中应用每个列出的解法,并验证所有接收器激活,同时每个初始状态仍保持未解决。
- 不要使用营销主视觉、介绍视频、强制开始屏幕、单独教程路由或滚动驱动的落地页。可玩棋盘必须在首屏可见且可用。
- 不要自动播放音频、要求声音、使用镜头震动、强制设备运动权限,或在启用 prefers-reduced-motion 时继续环境动画和完成动画。
- 不要让移动端游玩依赖悬停、拖拽、微小目标或桌面键盘快捷键。避免在 1440×900 和 390×844 下出现网格裁切、水平溢出、控件被阻挡和控制台错误。
- 不要添加 SEO 元数据、Open Graph 标签、JSON-LD、站点地图工作、关键词堆砌文本、日期、定价、会员声明或促销区块。仅使用纯 BRAND 文档标题和原始 favicon。
- 除可选的 CREDIT 链接外,不要在游戏内任何地方提及 VibeFather,也不要在 src/content.ts 之外硬编码默认世界特定文案。

---
Inspired by 黄玉秘藏 3D Interactive Game — https://www.kimi.com/showcases/3dmake
— Prompt by VibeFather · https://vibefather.ai/t/light-beam-lens-puzzle-game · 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: "Light Beam Lens Puzzle Game"
colors:
  cave: "#071114"
  raised: "#0E1D22"
  basalt: "#173038"
  edge: "#2A4850"
  text: "#EAF7F3"
  muted: "#93AAA8"
  beam: "#9AFDE0"
  beam_core: "#F2FFF9"
  lens: "#82C9FF"
  completion: "#E7C983"
typography:
  game_name_level_titles_dialogs_and_interface: { family: "Space Grotesk Variable", weights: [400, 500, 600, 700] }
  move_counts_level_numbers_coordinates_and_compact_status: { family: "IBM Plex Mono", weights: [400, 500] }
spacing: "Use an 8px base grid. Desktop header is 64px with 24px horizontal gutters. The main shell has a 1500px maximum width, height calc(100dvh - 88px), 24px side and bottom padding, a minmax(0,1fr) board column, a 340px control rail, and a 20px gap. Keep the whole game visible at 1440×900. The board canvas fills its card with at least 600px height on large screens. Use 16px rail padding, 12px control gaps, and 24px dialog padding. Below 760px, use a 56px header, one column, 12px gutters, a board height of min(100vw,420px), compact HUD blocks, and a fixed 72px bottom control bar with 96px page-bottom clearance."
radius: "Use 20px for the scene card and dialogs, 14px for HUD panels, 10px for buttons and level cells, and full pills for move and target counters. Keep tile geometry beveled but angular. Use soft mint shadows only around active optics and the primary next-level action; ordinary panels use 1px Edge borders rather than heavy shadows."
---

# Light Beam Lens Puzzle Game — 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
- **Cave** `#071114` — Page and scene background
- **Raised** `#0E1D22` — HUD, dialogs, and control surfaces
- **Basalt** `#173038` — Board tiles and inactive piece bodies
- **Edge** `#2A4850` — Borders, grid grooves, and hover outlines
- **Text** `#EAF7F3` — Primary interface text and bright crystal highlights
- **Muted** `#93AAA8` — Secondary labels, instructions, and inactive counters
- **Beam** `#9AFDE0` — Light paths, active receiver halos, and primary action accents
- **Beam core** `#F2FFF9` — Narrow bright center of every beam segment
- **Lens** `#82C9FF` — Lens glass, orientation marks, and selected-piece accents
- **Completion** `#E7C983` — Small solved check marks and completion detail only

## Typography
- **Game name, level titles, dialogs, and interface** — Space Grotesk Variable (OFL), weights 400/500/600/700. Self-host the font files.
- **Move counts, level numbers, coordinates, and compact status** — IBM Plex Mono (OFL), weights 400/500. Self-host the font files.

## Spacing & shape
- Spacing: Use an 8px base grid. Desktop header is 64px with 24px horizontal gutters. The main shell has a 1500px maximum width, height calc(100dvh - 88px), 24px side and bottom padding, a minmax(0,1fr) board column, a 340px control rail, and a 20px gap. Keep the whole game visible at 1440×900. The board canvas fills its card with at least 600px height on large screens. Use 16px rail padding, 12px control gaps, and 24px dialog padding. Below 760px, use a 56px header, one column, 12px gutters, a board height of min(100vw,420px), compact HUD blocks, and a fixed 72px bottom control bar with 96px page-bottom clearance.
- Radius: Use 20px for the scene card and dialogs, 14px for HUD panels, 10px for buttons and level cells, and full pills for move and target counters. Keep tile geometry beveled but angular. Use soft mint shadows only around active optics and the primary next-level action; ordinary panels use 1px Edge borders rather than heavy shadows.

## Motion
- Fade the complete cave and HUD in together over 480ms on first load; do not show an intro animation, camera fly-through, or blocking start button.
- Rotate a selected optical piece around the vertical axis by exactly 90 degrees over 180ms with ease-out, then redraw affected beam segments over 140ms. Game state updates immediately and never waits for the animation.
- Use a 120ms hover and keyboard-selection outline, a 160ms button press scale of 0.98, and 180ms fade-and-scale dialogs. No camera orbit or board movement is required for play.
- On completion, brighten all receivers, emit one restrained ring pulse per receiver over 900ms, and open the completion panel after 450ms. Do not loop confetti or shake the board.
- Ambient dust may drift very slowly and receiver light may breathe at low amplitude, but stop both when reduced motion is requested. Under reduced motion, rotations and beam changes are immediate and completion uses a static glow.

## Imagery
Create every visual in code with Three.js geometry, CSS, and inline SVG; there are no bitmap images, downloaded models, texture maps, HDRIs, or audio files. Build beveled square basalt tiles, angular rising and falling mirror bars, translucent flattened-sphere lenses with a clear axis line, prism splitters with a visible branch arrow, and ring-shaped receivers around faceted crystal cores. Surround the board with instanced low-poly mineral clusters and distant stalactites, using seeded placement so the scene is stable between runs. Use Cave-colored fog, hemisphere illumination, one soft directional light, and small point lights at the emitter and active receivers. Render each beam as a narrow Beam-core cylinder inside a wider transparent additive Beam cylinder at tile-center height. The board and its live optical state are the first-screen visual anchor; typography alone is never the hero. No people, mascots, logos, readable textures, brands, or reference-inspired props.

## Tone
Quiet, precise, mysterious, and reassuring. Use short original US English labels and tiny pieces of environmental copy, not a sprawling fantasy narrative. There are no characters, enemies, timers, penalties, hot springs, restoration quests, skill trees, or references to existing games or AI products.

---
Inspired by 黄玉秘藏 3D Interactive Game — https://www.kimi.com/showcases/3dmake
— Prompt by VibeFather · https://vibefather.ai/t/light-beam-lens-puzzle-game · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown

改成你自己的

  • 物理或光学老师:将 BRAND 设为课程名称,WORLD 设为教室实验室,并在每关前重写帮助文本以解释反射和折射。
  • 独立游戏作品集:保留水晶洞穴,用你的其他项目命名关卡,并将页脚链接指向你自己的网站。
  • 博物馆互动装置:将 AUDIENCE 设为画廊参观者,缩短说明,并添加命名展览的关卡选择标签。
  • 解谜通讯赠品:将 BRAND 设为出版物,WORLD 设为主题场景,并用标语预告下一期。

光束透镜解谜游戏:常见问题

如何更改光束透镜解谜游戏模板中的游戏名称、世界和标语?

光束透镜解谜游戏模板提供四个变量:BRAND 设置游戏名称,WORLD 命名用于关卡选择和帮助文案的水晶场景,TAGLINE 是标题下方和完成面板上的短句,AUDIENCE 在帮助介绍中描述玩家群体。这四个变量与所有标签、关卡名称和说明一起放在一个内容文件中,因此重命名游戏意味着编辑这些值并重写任何特定于世界的措辞。

怎么用 AI 做一个光束透镜解谜游戏?

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