用这个模板做的 2 个案例
同一份提示词,不同的 [VARIABLES] 变量。点一个在上方预览。关于这个模板
3D 霓虹打砖块街机是一款单屏浏览器游戏,场景设在一个灯光球场里。打开后首先看到的是竞技场:深色网格地面、冷青色天穹、靠近镜头的一根挡板,以及球场远处一片霓虹砖块。侧边有一张实心开始卡片,上面写着机台名、场地和操作方式。竞技场始终在旁边可见。
默认机台是 Lumen Dock,位于 Harborline 的 Glass Pier 4 号机台,营业时间为下午 4 点到午夜。店员 Nia Pell 负责五个预设关卡。每一轮都会改变地图和球速。玩家有三条命(火花)和一个持续累计的分数。砖块被击碎时会爆出短暂的粒子喷雾,球会拖着一小段炽热尾迹。地图中放置了三种下落道具。Scatter 增加球数,Needle 从挡板发射一道直光束,Girder 让挡板伸长几秒。完成一轮后会出现通关卡片,失败后会出现火花耗尽卡片。
挡板跟随鼠标、左右方向键或手指拖动。点击、轻触或按空格键发球。暂停、声音开关以及保存在浏览器中的最高分都属于机台功能。击中时会播放简短的合成音效。开启“减少动态效果”会移除粒子喷雾、尾迹和镜头震动。所有网格模型均由代码构建。
开发者和独立创客可以将游戏作为静态文件发布。五个变量用于重命名机台、场地、城市、店员以及名称下方的那句话。关卡名称和营业时间行会随这些值变化。速度、颜色、地图和道具规则保持不变。第二个案例是同一球场上的校园活动室机台。无需服务器、账号或下载模型。
模板提示词
在线演示就是用这份提示词原样做出来的,没有额外补充。其他案例只是改了 [VARIABLES] 变量的值。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。
# 3D Neon Breakout Arcade Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else. ## Brief Build [BRAND], a complete single-page 3D breakout in a gridded night court at [VENUE] in [CITY]. The first screen is the lit arena itself: a cool sky dome, a dark grid floor, the bar in front, and round-one bricks farther back, with a start card beside the view. Five authored rounds change the brick map and ball speed. The player has sparks, points, and three falling pickups: Scatter, Needle, and Girder. Default deck: [TAGLINE]. - Audience: Indie hackers and front-end developers who want a finished static Three.js arcade game, playable with a mouse, arrow keys, and a finger drag, and reskinnable by changing words rather than the court. - Goal: Ship one replayable five-round cabinet: a start card over a living court, mouse and touch aiming, keyboard nudge, shatter, a hot ball trail, a sci-fi readout, clear and fail cards, pause, synthesized hits, and a local best. A second name set must keep the same maps, speeds, colors, and pickup rules. - Tone: Dry, specific, and local, like a night attendant talking to a regular. Short US English. No military hull talk, no death slogan, and no padded scoreboard. ## Stack - Framework: Vite 6 + TypeScript + Three.js - Styling: Vanilla CSS - Libraries: three (MIT), @fontsource/syne (OFL), @fontsource/sora (OFL), @fontsource/share-tech-mono (OFL) - Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs. - Setup: - Scaffold Vite's vanilla TypeScript template. Scripts: dev=vite, build=tsc && vite build, preview=vite preview. Package name is the slug of BRAND, not a fixed template id. Set vite base to './', build.outDir to dist, build.emptyOutDir to true, and build.sourcemap to false. tsconfig: strict true, noEmit true. - Install three at 0.170.0 or newer, plus Vite 6 and TypeScript 5 as dev dependencies, and the three Fontsource packages as runtime dependencies. Do not add React, a physics engine, a game framework, a tween library, an icon package, or a separate postprocessing package. - Import Syne weights 700 and 800, Sora weights 400, 500, and 600, and Share Tech Mono weight 400 from those packages. CSS families are Syne, Sora, and Share Tech Mono. Do not load fonts from a CDN. - Bloom, desktop only: import EffectComposer, RenderPass, UnrealBloomPass, and OutputPass from three/addons. Strength 0.25, radius 0.32, threshold 0.82. OutputPass is the last pass. Skip the composer under 800px width and after the performance cut below. - Use modules src/content.ts, main.ts, arena.ts, levels.ts, sim.ts, hud.ts, audio.ts, and styles.css. Keep every player-facing string in content.ts. Simulation code reads that module and never shows raw tokens. - If BRAND, VENUE, CITY, and ATTENDANT are the defaults, use the Glass Pier copy table. If VENUE is Millhouse Rec, use the Millhouse copy table exactly. Any other change to those four rewrites the attendant sentence, the hours line, and the five round names in content.ts to fit the new words. A TAGLINE-only change replaces the deck and keeps the round names. Maps, speeds, colors, coordinates, and pickup cells never change. - Persist only the best points integer and the mute flag in localStorage. Key is the slug of BRAND plus -cabinet, so Lumen Dock becomes lumen-dock-cabinet. Slug: lowercase, non-alphanumerics to single hyphens, trim hyphens. No dates. Parse nothing from the network. - One index.html, lang=en, viewport with viewport-fit=cover. Document title is BRAND, an em dash, then VENUE. A full-view canvas plus HTML overlays. Body margin 0, overflow hidden, background Ink. No router. ## Variables - [BRAND] — Cabinet name (default: "Lumen Dock"). Invented cabinet name on the start card, the readout, the document title, and the save key. - [VENUE] — Venue (default: "Glass Pier"). Invented place. Used in the eyebrow, the final clear heading, and the hours line. - [CITY] — City (default: "Harborline"). Invented city beside the venue. Words only; the court does not change. - [ATTENDANT] — Attendant (default: "Nia Pell"). Invented first and last name of the person who runs the cabinet. Not a real person. - [TAGLINE] — Start deck (default: "Keep the spark and clear the pier."). One sentence under the cabinet name on the start card. - [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/3d-neon-breakout-arcade 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 `#07110F` — Page background, renderer clear, start card, sky zenith, fog - Court `#0C1714` — Floor plane and readout chips - Grid `#24584F` — Floor lines and card border - Horizon `#1C6B62` — Sky-dome horizon - Teal `#1EC8B8` — Teal bricks, rails, primary button, spark pips, focus ring - Sea `#7DFFB2` — Sea bricks - Ice `#9AD7FF` — Ice bricks and chipped lime bricks - Lime `#E4F27A` — Two-hit bricks before the first chip, Girder pickup, far lip - Hot `#FF4D1C` — Ball, ball light, center tick, Needle beam, Scatter pickup - Paper `#E7F3EE` — Headings, HUD numbers, paddle body - Dim `#8AA39A` — Eyebrow, labels, hours line, credit - Rail `#12312C` — Side rails and back plate ### Typography - Cabinet name on the start card: Syne (OFL), weights 700/800 - Body, buttons, and HUD labels: Sora (OFL), weights 400/500/600 - Points, round, and timers: Share Tech Mono (OFL), weights 400 ### Layout & motion - Spacing: 4 px base. Desktop card padding 28 px, HUD inset 16 px. Mobile inset 12 px plus safe-area insets. Buttons at least 44 px tall. The start sheet on a phone stays within 46 vh and scrolls inside itself. The center of the court stays clear of chrome during play. - Radius: Start, pause, clear, fail, and controls cards 12 px with a hard 4 px offset shadow in Grid, no blur. Buttons 8 px. Spark pips are 8 px diamonds. World meshes stay sharp except the ball, the attendant head, and Scatter's small spheres. - Motion: Fixed step of 1/60 second. Each frame runs at most three steps and drops leftover time. Render with the latest state. - Motion: On the start card the camera eases 0.04 units on x over 8 seconds. During play the camera x eases toward 0.18 times the paddle x, clamped to 1.1, with smoothing 1 - exp(-4 dt). - Motion: A brick break offsets the camera by at most 0.045 units for 0.1 seconds, ease out, one shake at a time. The ball trail keeps the last 10 positions spaced at least 0.12 apart. - Motion: Shatter spawns 14 short-lived boxes. Pickups bob 0.05 units at 1.8 Hz. Overlays fade in 160 ms and do not travel. - Motion: With prefers-reduced-motion, cut the title drift, camera follow, shake, trail, shatter, pickup bob, and overlay fade. Snap UI in place. Keep the ball, the bar, the beam, and the rounds, because that motion is the game. - Imagery: Draw the court, sky, bricks, bar, ball, pickups, shatter, and the attendant from original Three.js geometry. No photographs, no generated stills, no HDRIs, no downloaded models, and no brand marks. The lit court is the first-screen anchor, with the start card beside it. The attendant is a featureless figure outside the right rail: a box coat in #C5D2CB, a sphere head in #E6C4A4 with no eyes or mouth, and a Teal cap. The figure is fictional and is not a portrait of any real person. No faces anywhere else. ## Pages & Sections ### [BRAND] — [VENUE] (`index.html`) 1. **Start card over the lit court** — Document title: Lumen Dock — Glass Pier, from BRAND and VENUE. States: start, controls, serve, play, paused, clear, fail. Open on start with round 1 already built, the ball resting on the bar, and the bar centered. Eyebrow, uppercase Sora 600 at 12 px with 0.16 em tracking: GLASS PIER · HARBORLINE, from VENUE and CITY. Heading: Lumen Dock, Syne 800, 64 px desktop and 40 px under 700 px. Deck, from TAGLINE: Keep the spark and clear the pier. Attendant line: Nia Pell opens the cabinet after dusk. Hours: Cabinet 4 on Glass Pier. Open 4 pm to midnight. Body, same for every name set: Five rounds. Three sparks. Move the bar with the mouse, the arrow keys, or a finger drag. Click, tap, or press Space to send the ball. Catch Scatter, Needle, and Girder. If a best exists, show Best and the grouped points. Hide that row when there is no save. Optional [CREDIT] link once, under the hours line, 12 px Sora in Dim. Buttons: Play round one (primary) and Controls. Focus Play round one. Millhouse copy table, used only when VENUE is Millhouse Rec: eyebrow MILLHOUSE REC · REDLOOM when CITY is still Redloom, otherwise VENUE and CITY; attendant line Ellis Ward leaves the cabinet on after lab hours; hours Room 12 at Millhouse Rec. Open 7 pm to 11 pm; deck from TAGLINE. Round names for that table are in the rounds section. Layout: The canvas fills the viewport and renders the court before the first click. Hide the play readout until Play round one. Desktop: a 400 px Ink card, 12 px radius, 28 px padding, Paper text, border 1 px solid Grid, offset shadow 4 px 4 px 0 Grid, 16 px from the left and vertically centered. It covers well under half of 1440 px, leaving bricks, the bar, the hot ball, and the right-rail figure visible. Mobile: a bottom sheet, max-height 46 vh, internal scroll, same solid Ink fill, no blur. At 390×844 the sky, at least two brick rows, the bar, and the hot ball all sit above the sheet. If the bar falls behind the sheet, move the mobile start camera back on z until that framing is true. Background behind the canvas is Ink. UI root is pointer-events none; cards and buttons set pointer-events auto. Motion: The card fades in over 160 ms after the first rendered frame. On start, the ball stays put and the camera drifts 0.04 units. Controls opens the help sheet and returns here without starting. Play round one sets state to serve, removes the card, shows the readout, and does not launch the ball yet. Reduced motion shows the card with no fade and no drift. Enter activates the focused button. 2. **Court, sky, camera, and light** — Axes: +x right, +y up, +z away from the camera toward the bricks. Play bounds: x = ±7.45, back wall z = 19.35, out line z = 0.15. Ball height is locked at y = 0.52. There is no gravity on the ball and no jump. The attendant stands at (8.55, 0, 6.4), outside the right bound, with no collision: coat box 0.42 × 0.78 × 0.28 at y 0.56, head sphere radius 0.16 at y 1.12, cap box 0.28 × 0.08 × 0.28 at y 1.28, two leg boxes. No name tag floats over the figure. Layout: Floor plane 24 by 28, center (0, 0, 10), color Court. Grid lines every 1 unit from x -8 to 8 and z 0 to 20, y = 0.015, color Grid, one LineSegments. Rails: boxes 0.14 × 0.18 × 20.2 at x ±7.72, y 0.1, z center 10.1, color Rail, emissive Teal intensity 0.45. Back plate: plane 15.4 × 2.6 at z 19.7, y 1.3, color Rail. Far lip: box 15.4 × 0.12 × 0.16 at z 19.55, y 1.15, emissive Lime intensity 0.35. Sky: sphere radius 80, position (0, -8, 10), BackSide, ShaderMaterial. Mix Horizon at the rim into Ink at the top with smoothstep on the normalized world y from 0.35 to 0.95. No sun disc and no purple. Seventy star points, radius 0.045, color #D7EFE8, only where y > 2, placed with mulberry32 seed 5704843. Do not use Math.random. Fog is linear, color Ink, near 28, far 70. Desktop camera: position (0, 6.15, -3.1), lookAt (0, 0.7, 12.5), fov 44. Under 800 px: position (0, 8.2, -2.4), lookAt (0, 1.0, 12.0), fov 52. Near 0.1, far 200. On the mobile start sheet, move the camera to (0, 7.6, -4.2), lookAt (0, 1.4, 13), fov 50, and return to the mobile play camera when the round starts. Motion: Stars, floor, rails, and the attendant do not move. Title drift and play follow are camera offsets only. Reduced motion keeps the camera on the base position for that viewport. Lighting does not pulse. 3. **Bar, ball, and input** — The bar is a box 2.56 × 0.18 × 0.46, center z = 1.35, y = 0.36, color Paper, emissive Teal intensity 0.25. A Hot tick, 0.14 × 0.22 × 0.50, sits at its center. Girder sets the bar width to 4.16 for 8.0 seconds and counter-scales the tick so the tick stays 0.14 wide. Clamp the center so the bar stays inside x ±7.45. The ball is a 16-segment sphere, radius 0.20, color Hot, emissive Hot intensity 0.85, roughness 0.32, metalness 0.04. A child point light, color Hot, intensity 1.5, distance 6, decay 2. While held, the ball center is (barX, 0.52, 1.87). Serve always sets vx to 0.28 times speed, sign of the last horizontal move or +1 if the bar has not moved, and vz to the positive square root of speed squared minus vx squared. Later bar hits use offset = clamp((ballX - barX) / halfWidth, -1, 1), vx = offset * 0.78 * speed, then clamp absolute vx to 0.92 * speed and recompute positive vz. Renormalize to the round speed after every bounce. Layout: Pointer mapping: t = (clientX - rect.left) / rect.width, target = lerp(-6.17, 6.17, clamp(t, 0, 1)), then clamp to the current bar limit. Mouse move sets the target with no button required. Touch and pen set it only while the pointer is down. ArrowLeft and ArrowRight move at 11 units per second and are ignored on any frame that also applied a pointer. Do not bind A or D. Launch only from the held state, on Space, or on a pointerup over the canvas whose total movement was under 14 px. A drag does not launch. Capture the pointer on press. touch-action none and overscroll-behavior none on the body. Prevent default on Space, arrows, and Escape so the page does not scroll. Clear held keys on blur, on overlay open, and when the document hides. Keyboard: Escape closes Controls, or toggles pause during serve and play; M toggles mute; Enter activates the focused primary button. Canvas accessible name: Three-dimensional breakout on a lit grid court. A polite live region announces round clear, spark lost, out of sparks, and the final clear sentence, not every hit. Motion: The held ball moves with the bar. After a bar hit, push the ball to z = 1.87 and ignore that ball against the bar for 0.08 seconds. Each step moves at most 0.18 units, so a ball cannot pass through a brick. If several bricks overlap, resolve only the smallest penetration. Flip the axis of least penetration; if the two penetrations are within 15 percent, flip both. Then push out by the penetration plus 0.01 and renormalize. Side walls flip vx. The back wall flips vz to negative. Trail spheres: radius 0.06, color Hot, opacity 0.35 down to 0, not colliders. Reduced motion draws no trail. The ball light stays. 4. **Five rounds and brick maps** — Nine columns, six rows maximum. Brick box 1.28 × 0.42 × 0.58. Column x = -5.84 + col * 1.46. Row z = 18.15 - row * 0.86. Row 0 is farthest. Characters, each string length 9: c teal #1EC8B8 one hit, s sea #7DFFB2 one hit, i ice #9AD7FF one hit, l lime #E4F27A two hits, hyphen means empty. A lime brick's first hit scores 40, switches the mesh to ice, and leaves one hit. Destroying a one-hit brick scores 100. Destroying a chipped lime scores 160. One geometry, four cached materials, roughness 0.4, metalness 0.08, emissive intensity 0.35 in the brick's current color. Round speeds: 7.2, 8.1, 9.0, 9.9, 10.8. Glass Pier names: Pier Lights, Kelp Gate, Lantern Stack, Tide Teeth, Last Beacon. Millhouse names: Lab Lights, Coil Gate, Shelf Stack, Gear Teeth, Last Bell. Maps in order, far row first, each row in quotes and exactly 9 characters. Round 1: "ccccccccc" "sssssssss" "iiiiiiiii" "cscscscsc". Drops: row 2 col 4 Scatter, row 1 col 1 Needle, row 3 col 7 Girder. Round 2: "cscsicscs" "-s-c-c-s-" "c-scics-c" "-i-l-l-i-" "scscscscs". Drops: row 0 col 4 Scatter, row 2 col 0 Needle, row 4 col 8 Girder. Round 3: "lll---lll" "ccc---ccc" "sss---sss" "iii---iii" "csc---csc". Drops: row 1 col 1 Scatter, row 2 col 7 Needle, row 4 col 0 Girder. Round 4: "c-s-c-s-c" "-l-i-l-i-" "c-s-c-s-c" "-i-l-i-l-" "s-c-s-c-s" "-c-s-c-i-". Drops: row 2 col 2 Scatter, row 3 col 3 Needle, row 4 col 8 Girder. Round 5: "lclclclcl" "ss-c-c-ss" "ccclllccc" "ii-----ii" "s-c-i-c-s" "cscscscsc". Drops: row 0 col 4 Scatter, row 2 col 0 Needle, row 5 col 8 Girder. A drop is queued only when that cell is destroyed, not when a lime is only chipped. Layout: Starting a round rebuilds bricks, removes balls, pickups, the beam, and shatter, and places one held ball. Points and sparks carry across rounds. Clearing a round adds 800 points, then adds one spark up to a cap of 5. The clear card shows Round clear, the round name, PTS and the grouped total, and either spark returned or sparks full. Button: Next round. After round 5 the card heading is the venue plus clear, so the default reads Glass Pier clear. Subline: Five rounds. Button: Play again. Show New best when this total beats the saved integer. Next round and Play again do not reload the page. Play again sets points to 0, sparks to 3, round to 1, and returns to serve. Motion: Bricks do not move. A chip is an instant color change. Opening the clear card freezes the step. Existing shatter may finish; spawn no new boxes after the card opens. Reduced motion removes the shatter and keeps the color change and the card. 5. **Pickups, beam, and shatter** — At most two pickups exist at once. A third queued drop is ignored; the brick still scores. A pickup falls toward the camera at 3.5 units per second and is removed at z < 0.2. Catch it when its z is between 1.05 and 1.70 and its x is within the bar half-width plus 0.28. A catch scores 200. Scatter is three small Hot spheres of radius 0.08. On catch, spawn up to two extra balls from the oldest live ball, or from the held ball if nothing is live, at plus and minus 0.45 radians from that velocity, same speed. Cap 5 balls, counting a held ball. Toasts: Scatter · two more balls, Scatter · one more ball, or Scatter · court is full. Needle is a pale box 0.08 × 0.36 × 0.36 in #FFD2C2. For 6.0 seconds it fires every 0.45 seconds, first shot 0.1 seconds after the catch, including during serve. The beam is a Hot box, 0.06 thick, from z = 1.75 to the first brick whose x overlaps the bar center within 0.08 and whose z is ahead, or to z = 19.2 if it misses. It is visible for 0.07 seconds, removes one hit, and awards the same 40, 100, or 160 as a ball. It does not bounce. Toast: Needle · beam ready. Girder toast: Girder · bar stretched. Catching Girder again sets the timer back to 8.0. Needle and Girder can run together. Timers use sim time and freeze while paused, hidden, or on a card. Layout: Shatter: 14 boxes, size 0.05 to 0.13, life 0.5 seconds, gravity -6.5 on y, initial speed 1.4 to 3.4, upward bias 1.2 to 3.0, color copied from the brick at the moment it breaks. Seed mulberry32 with roundIndex * 1000 + row * 10 + col. Cap 160 live boxes; if the cap is full, break the brick with no new boxes. Pickups bob on y only. The beam is not a collider for the ball. When the last brick breaks, enter clear in that same step before any ball can cross the out line. Motion: Pickup bob is a sine. Reduced motion pins pickups to y = 0.52 and spawns no shatter. Draw the beam for one frame and still remove the hit. Do not shake the camera when reduced motion is on. 6. **Readout, toasts, and end cards** — Play readout labels, exactly: PTS with a grouped integer and no leading zeros; RND as 1/5 through 5/5; BLOCKS as the remaining brick count; SPARKS as up to five 8 px diamonds, filled Teal when remaining and outlined Grid when empty, with a SPARKS label. Status word beside the round name: REST while the ball is held, LIVE while at least one ball is moving. Round name under the bar, from the copy table, in Sora. Power chips, bottom center, only while active: NEEDLE 4.2 and GIRDER 6.0 with one decimal. Toasts last 1.3 seconds and never block input. Spark lost toast: Spark lost · 2 left, using the sparks that remain. Fail card heading: Out of sparks. Subline: RND, the round number, a middle dot, and the round name. Then PTS and the total. Button: Run it back, which uses the same reset as Play again. New best when the total beats the save. Pause card heading: Paused. Buttons: Resume, Restart round, Controls. Restart round rebuilds the current map and returns to serve without changing points or sparks and without refunding a spark. Save the best on fail and on the venue-clear card when the total is higher. Layout: Desktop readout: one 44 px row, 16 px from the top and sides. Brand chip at the left in Sora 600, max-width 28 vw with ellipsis. PTS centered in Share Tech Mono 20 px. RND, BLOCKS, and SPARKS at the right, labels in Dim 11 px. Pause and Sound are 44 px text buttons under the brand. Round name centered under the row. Mobile, under 800 px: row one is Pause, brand, Sound; row two is PTS, RND, BLOCKS, and the pips at 16 px mono. Nothing scrolls sideways at 390 px. Cards are 420 px on desktop and full-width sheets on mobile with 12 px side inset, same Ink fill and Grid offset shadow. Primary button fill Teal, text Ink. Secondary button is transparent with a Paper label. Focus ring 2 px solid Teal, offset 2 px. Toasts sit above the power chips, max-width 280 px. Motion: Cards fade 160 ms. Spark pips do not pulse. Reduced motion snaps cards and toasts. Status text changes are instant. The readout hides on the start card and shows during serve, play, pause, clear, and fail. 7. **Sound, pause, and the two viewports** — Sound is off until Play round one, which is the unlock gesture, then on. The button reads Sound on or Sound off. M matches the button. Persist mute. Tones, no audio files: bar hit sine 392 Hz for 45 ms at gain 0.06; brick destroy square 620 Hz for 40 ms at gain 0.04; lime chip triangle 480 Hz for 35 ms; wall sine 196 Hz for 30 ms; pickup 523 Hz then 784 Hz, 60 ms each; spark lost sine glide 360 Hz to 140 Hz over 160 ms; round clear 523, 659, 784 Hz at 90 ms; venue clear adds 1046 Hz. If AudioContext fails, leave sound off and do not log in a loop. Ramps 20 ms. Silence while paused, hidden, or muted. Controls heading: How the bar moves. Lines: Mouse: the bar follows your horizontal position. Arrow keys: move left or right. Finger: drag anywhere on the court. Click, tap, or Space: send the ball while it rests on the bar. Esc pauses. M mutes. Button: Back. Back returns to start or to pause, whichever opened it. Layout: Target a clean frame at 1440×900 and at 390×844 with no horizontal overflow and no console errors. Lights: hemisphere sky #B7E6DC and ground Court at intensity 0.55; directional #F2FFF8 intensity 1.35 from (2.5, 9, -4); a Teal fill intensity 0.35 from (-6, 3, 8). No shadow maps. ACES filmic tone mapping, exposure 1.02, clear color Ink, output color space SRGB. Pixel ratio min(devicePixelRatio, 1.75), or 1.25 under 800 px. If the mean frame time over 180 frames exceeds 22 ms, once, set pixel ratio to 1 and disable bloom. Keep the rules. If WebGL cannot start, keep the start copy and add: This browser could not start the 3D view. Try a browser with WebGL enabled. Do not retry in a loop. Resize the renderer, camera, and composer on viewport changes. Honor safe-area insets. The page itself does not scroll. Motion: Pause, the hidden document, clear, fail, and controls freeze the step, the timers, and the ball. Sound stays silent while frozen. Reduced motion is separate from the performance cut: gameplay remains, and only the extra camera, shatter, trail, bob, and fades drop. Quality cuts never remove rounds, pickups, or touch aiming. ## Assets - image: No image files and no generated stills. Draw the sky, court, bricks, bar, ball, pickups, shatter, attendant, and trail in Three.js. Add an original public/favicon.svg: a 32 viewBox, Ink rounded rectangle, a Teal horizontal bar, and a Hot circle above the bar, with no letters. In ASSETS.md state that the scene is code-drawn and list the favicon as original. - icon: Do not install an icon package. Pause, Sound, and Controls are text buttons. Spark pips are CSS diamonds. List no third-party icons in ASSETS.md. - font: Self-host Syne, Sora, and Share Tech Mono through the Fontsource packages named in the stack (OFL). Import only the weights listed. In ASSETS.md record the local woff2 files, the npm package pages, and the OFL license. Do not request fonts from any CDN. - video: No video and no audio files. Hits are synthesized with Web Audio after Play round one unlocks the context. ## Don'ts - No backend, accounts, database, analytics, external APIs, multiplayer, or a shared leaderboard. The best points integer and the mute flag stay in localStorage under a key built from BRAND. - No CDN and no remote assets. Self-host fonts, import three from the installed package, use relative paths, and emit minified files to dist/ with source maps off and without copying src/ into dist/. Keep dist under 20 MB. - The only page is index.html. Do not add a marketing page, a price, or a bare directory link. The first screen is the lit court with the start card beside it, never type on a flat field. - Do not use the title VOIDBREAK, the clear line LANDED, or the fail line YOU DIED. Fail heading is Out of sparks. Mid-round clear heading is Round clear. The last card heading is the venue plus clear. - Do not label the readout HULL, LIVES, NOMINAL, CRITICAL, WAVE, BRICKS, or a zero-padded six-digit SCORE. On-screen labels are PTS, RND, BLOCKS, SPARKS, REST, and LIVE. Do not print the control line MOUSE / A D MOVE or SPACE SURGE. Do not bind A or D. - Do not use these status words: HULL BREACH, HULL CRITICAL, BALL LOST, KEEP LANE, MINE HIT, SAW HIT, IMPACT, SURGE, WIDE, WIDE LOCK, or COMBO. Pickup toasts name Scatter, Needle, and Girder only. - Do not build EnergyCore, Interceptor, ObjectivePylon, SawDrone, SpikeMine, hull damage, lane hazards, mines, or saws. The court is a bar, balls, bricks, and three pickups. - Do not copy a one-shot HTML page, a bench prompt, a judge note, a screenshot, or a gameplay video. Do not mention Agent OS, GoldieBench, AI Profit Boardroom, AIPB, Grok, xAI, or Julian Goldie, and do not add a player chrome bar. - Do not lock the scene to a source palette, and do not use Inter or Courier New. Faces are Syne, Sora, and Share Tech Mono, self-hosted. Colors are the hex values in this spec. - No real arcade brands, logos, mascots, or celebrity likeness. The attendant has no face and is not a portrait of a real person. No downloaded models, HDRIs, stock photos, or placeholder-image services. - No shadow maps, no physics engine, and no Math.random. Stars and shatter use mulberry32. Bloom is desktop-only and turns off after the single performance cut. - Do not hard-code Lumen Dock, Glass Pier, Harborline, Nia Pell, or the default round names outside src/content.ts, and do not leave raw variable tokens on screen. - Do not invent dates, entry fees, online player counts, or any claim about VibeFather. The only VibeFather presence is the optional [CREDIT] link. - Honor prefers-reduced-motion by removing shake, shatter, trail, bob, and camera drift without stopping the round. At 390×844 the sheet, readout, and drag control must be usable with no horizontal overflow and no console errors. - If WebGL fails, show the readable fallback sentence and do not throw in a loop. Freeze the round while paused, hidden, or while a card is open. --- Inspired by arcade one-shot 3D breakout by @JulianGoldieSEO — https://agentos.guide/grok-4-7-agent-os — Prompt by VibeFather · https://vibefather.ai/t/3d-neon-breakout-arcade · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# 3D Neon Breakout Arcade 完全按照下面的描述构建这个网站。将 [VARIABLES] 替换为你自己的值;其余内容保持不变。 ## 简介 构建 [BRAND],一个完整的单页 3D 打砖块游戏,场景设在 [CITY] 的 [VENUE] 中一个网格状的夜间球场。首屏就是灯光照亮的竞技场本身:冷色调的天空穹顶、深色的网格地面、前方的吧台,以及更靠后的第一轮砖块,视图旁边有一张开始卡片。五个精心设计的轮次会改变砖块布局和球速。玩家拥有火花、分数,以及三种下落式拾取物:Scatter、Needle 和 Girder。默认牌组:[TAGLINE]。 - 受众:独立开发者和前端开发者,他们想要一个完成度高的静态 Three.js 街机游戏,可用鼠标、方向键和手指拖动来游玩,并且可以通过改文字而不是改球场来换肤。 - 目标:交付一台可重复游玩的五轮街机:一张覆盖在活着的球场上的开始卡片、鼠标和触摸瞄准、键盘微调、碎裂、炽热的球轨迹、科幻风读数、通关和失败卡片、暂停、合成音效,以及本地最佳成绩。第二套名称必须保持相同的地图、速度、颜色和拾取规则。 - 基调:干练、具体、本地化,像夜班服务员在和常客说话。简短的美式英语。不要军用船体式腔调,不要死亡口号,不要注水的记分板。 ## 技术栈 - 框架:Vite 6 + TypeScript + Three.js - 样式:原生 CSS - 库:three(MIT)、@fontsource/syne(OFL)、@fontsource/sora(OFL)、@fontsource/share-tech-mono(OFL) - 构建:`npm run build` → `dist/` 中的静态文件。无后端、无服务器代码、无外部 API。 - 设置: - 搭建 Vite 的原生 TypeScript 模板。脚本:dev=vite,build=tsc && vite build,preview=vite preview。包名是 BRAND 的 slug,而非固定的模板 id。将 vite base 设为 './',build.outDir 设为 dist,build.emptyOutDir 设为 true,build.sourcemap 设为 false。tsconfig:strict 为 true,noEmit 为 true。 - 安装 three 0.170.0 或更新版本,以及作为开发依赖的 Vite 6 和 TypeScript 5,还有作为运行时依赖的三个 Fontsource 包。不要添加 React、物理引擎、游戏框架、补间库、图标包或单独的后处理包。 - 从这些包中导入 Syne 字重 700 和 800、Sora 字重 400、500 和 600,以及 Share Tech Mono 字重 400。CSS 字体族为 Syne、Sora 和 Share Tech Mono。不要从 CDN 加载字体。 - Bloom,仅桌面端:从 three/addons 导入 EffectComposer、RenderPass、UnrealBloomPass 和 OutputPass。强度 0.25,半径 0.32,阈值 0.82。OutputPass 是最后一个通道。在宽度低于 800px 时以及执行下方性能削减后跳过合成器。 - 使用模块 src/content.ts、main.ts、arena.ts、levels.ts、sim.ts、hud.ts、audio.ts 和 styles.css。将所有面向玩家的字符串保留在 content.ts 中。模拟代码读取该模块,绝不显示原始 token。 - 如果 BRAND、VENUE、CITY 和 ATTENDANT 为默认值,则使用 Glass Pier 文案表。如果 VENUE 为 Millhouse Rec,则严格使用 Millhouse 文案表。对这四个值的任何其他更改都会重写 content.ts 中的服务员句子、营业时间行和五个回合名称,以适配新词。仅更改 TAGLINE 会替换副标题并保留回合名称。地图、速度、颜色、坐标和拾取格永不改变。 - 仅在 localStorage 中持久化最佳分数整数和静音标志。键为 BRAND 的 slug 加上 -cabinet,因此 Lumen Dock 变为 lumen-dock-cabinet。Slug:小写,非字母数字转为单个连字符,修剪连字符。无日期。不从网络解析任何内容。 - 一个 index.html,lang=en,viewport 带 viewport-fit=cover。文档标题为 BRAND、一个破折号,然后是 VENUE。一个全视口 canvas 加上 HTML 覆盖层。Body margin 0,overflow hidden,背景为 Ink。无路由器。 ## 变量 - [BRAND] — 机柜名称(默认:“Lumen Dock”)。在起始卡片、读数区、文档标题和保存键上虚构的机柜名称。 - [VENUE] — 场地(默认:“Glass Pier”)。虚构的地点。用于眉题、最终清除标题和营业时间行。 - [CITY] — 城市(默认:“Harborline”)。场地旁的虚构城市。仅文字;球场不变。 - [ATTENDANT] — 服务员(默认:“Nia Pell”)。经营机柜之人的虚构名字和姓氏。不是真实人物。 - [TAGLINE] — 起始卡文案(默认:“Keep the spark and clear the pier.”)。起始卡片上机柜名称下方的一句话。 - [CREDIT] — 在页脚保留一个小型“Template by VibeFather”链接指向 https://vibefather.ai/t/3d-neon-breakout-arcade(默认:是;删除此行以移除) Pages & Sections 下的文案是为默认值编写的。如果你的值不同,请为它们重写每个标题、段落、标签和图片——保持相同的长度、语气和结构。布局、颜色、字体和动效保持所述不变。 将所有文案、图片路径和链接放在一个内容文件中(例如 `src/content.ts`),按区块键控,以便之后无需改动组件即可替换内容。 ## 设计 ### 颜色 - Ink `#07110F` — 页面背景、渲染器清屏色、开始卡片、天顶、雾 - Court `#0C1714` — 地板平面和读数芯片 - Grid `#24584F` — 地板线条和卡片边框 - Horizon `#1C6B62` — 天空穹顶地平线 - Teal `#1EC8B8` — 青色砖块、护栏、主按钮、火花点、焦点环 - Sea `#7DFFB2` — 海色砖块 - Ice `#9AD7FF` — 冰色砖块和破损的石灰砖块 - Lime `#E4F27A` — 第一枚芯片前的两击砖块、Girder 拾取物、远端边缘 - Hot `#FF4D1C` — 球、球光、中心刻度、Needle 光束、Scatter 拾取物 - Paper `#E7F3EE` — 标题、HUD 数字、挡板主体 - Dim `#8AA39A` — 眉题、标签、小时行、署名 - Rail `#12312C` — 侧护栏和背板 ### 字体排印 - 开始卡片上的机柜名称:Syne(OFL),字重 700/800 - 正文、按钮和 HUD 标签:Sora(OFL),字重 400/500/600 - 分数、回合和计时器:Share Tech Mono(OFL),字重 400 ### 布局与动效 - 间距:4 px 基准。桌面卡片内边距 28 px,HUD 内缩 16 px。移动端内缩 12 px 加上安全区内缩。按钮至少 44 px 高。手机上的开始面板保持在 46 vh 以内并在自身内部滚动。比赛进行中,球场中心保持无界面元素遮挡。 - 圆角:开始、暂停、通关、失败和控制卡片为 12 px,带 Grid 色的硬 4 px 偏移阴影,无模糊。按钮 8 px。火花点为 8 px 菱形。世界网格保持锐利,球、服务员头部和 Scatter 的小球体除外。 - 动效:固定步长 1/60 秒。每帧最多运行三步并丢弃剩余时间。用最新状态渲染。 - 动效:开始卡片上,相机在 8 秒内沿 x 轴缓动 0.04 单位。比赛进行中,相机 x 缓动趋向挡板 x 的 0.18 倍,钳制在 1.1,平滑系数为 1 - exp(-4 dt)。 - 动效:砖块破碎时相机偏移最多 0.045 单位,持续 0.1 秒,缓出,一次只震一下。球拖尾保留最近 10 个位置,间距至少 0.12。 - 动效:碎裂生成 14 个短命盒子。拾取物以 1.8 Hz 上下浮动 0.05 单位。覆盖层淡入 160 ms,不位移。 - 动效:在 prefers-reduced-motion 下,去掉标题漂移、相机跟随、震动、拖尾、碎裂、拾取物浮动和覆盖层淡入。UI 直接就位。保留球、挡板、光束和回合,因为那是游戏本身的动效。 - 图像:球场、天空、砖块、挡板、球、拾取物、碎裂和服务员全部用原创 Three.js 几何体绘制。不用照片、不用生成的静帧、不用 HDRI、不用下载的模型、不用品牌标识。受光的球场是第一屏的锚点,开始卡片在其旁边。服务员是右侧护栏外一个无面部特征的人形:一件 #C5D2CB 的箱形外套,一个 #E6C4A4 的球体头部,没有眼睛和嘴,一顶 Teal 色帽子。该人物是虚构的,不是任何真实人物的肖像。其他地方不出现任何面孔。 ## 页面与区块 ### [BRAND] — [VENUE] (`index.html`) 1. **点亮球场上的开始卡片** — 文档标题:Lumen Dock — Glass Pier,由 BRAND 和 VENUE 组成。状态:开始、操作说明、发球、游玩、暂停、清空、失败。打开时处于开始状态,第 1 回合已构建完成,球停在挡板上,挡板居中。眉题,大写 Sora 600,12 px,字距 0.16 em:GLASS PIER · HARBORLINE,由 VENUE 和 CITY 组成。标题:Lumen Dock,Syne 800,桌面端 64 px,700 px 以下 40 px。副标题,来自 TAGLINE:Keep the spark and clear the pier。值班员行:Nia Pell opens the cabinet after dusk。营业时间:Cabinet 4 on Glass Pier. Open 4 pm to midnight。正文,对所有名称集相同:Five rounds. Three sparks. Move the bar with the mouse, the arrow keys, or a finger drag. Click, tap, or press Space to send the ball. Catch Scatter, Needle, and Girder。如果存在最佳成绩,显示 Best 和分组得分。没有存档时隐藏该行。可选的 [CREDIT] 链接出现一次,位于营业时间行下方,12 px Sora,Dim 色。按钮:Play round one(主按钮)和 Controls。焦点置于 Play round one。Millhouse 文案表,仅在 VENUE 为 Millhouse Rec 时使用:当 CITY 仍为 Redloom 时眉题为 MILLHOUSE REC · REDLOOM,否则为 VENUE 和 CITY;值班员行 Ellis Ward leaves the cabinet on after lab hours;营业时间 Room 12 at Millhouse Rec. Open 7 pm to 11 pm;副标题来自 TAGLINE。该表的回合名称见回合区块。 布局:画布填满视口,并在首次点击前渲染球场。在 Play round one 之前隐藏游玩读数。桌面端:一张 400 px 的 Ink 卡片,12 px 圆角,28 px 内边距,Paper 文字,边框 1 px solid Grid,偏移阴影 4 px 4 px 0 Grid,距左侧 16 px 且垂直居中。它覆盖远不到 1440 px 的一半,使砖块、挡板、热球和右栏人物保持可见。移动端:底部抽屉,最大高度 46 vh,内部滚动,同样的实心 Ink 填充,无模糊。在 390×844 下,天空、至少两行砖块、挡板和热球都位于抽屉上方。如果挡板落到抽屉后面,将移动端开始相机沿 z 轴后移,直到该取景成立。画布背后的背景为 Ink。UI 根为 pointer-events none;卡片和按钮设置 pointer-events auto。 动效:卡片在首帧渲染后以 160 ms 淡入。开始时,球保持不动,相机漂移 0.04 个单位。Controls 打开帮助抽屉并返回此处,不开始游戏。Play round one 将状态设为发球,移除卡片,显示读数,且暂不发射球。减少动效时显示卡片,无淡入也无漂移。Enter 激活聚焦的按钮。 2. **球场、天空、相机和光照** — 坐标轴:+x 向右,+y 向上,+z 远离相机朝向砖块。游玩边界:x = ±7.45,后墙 z = 19.35,出界线 z = 0.15。球的高度锁定在 y = 0.52。球不受重力,也不能跳跃。值班员站在 (8.55, 0, 6.4),在右边界之外,无碰撞:外套盒 0.42 × 0.78 × 0.28,位于 y 0.56,头部球体半径 0.16,位于 y 1.12,帽子盒 0.28 × 0.08 × 0.28,位于 y 1.28,两个腿部盒。人物上方不浮动名牌。 布局:地板平面 24 × 28,中心 (0, 0, 10),颜色 Court。网格线每 1 个单位,从 x -8 到 8、z 0 到 20,y = 0.015,颜色 Grid,一个 LineSegments。护栏:盒 0.14 × 0.18 × 20.2,位于 x ±7.72,y 0.1,z 中心 10.1,颜色 Rail,自发光 Teal 强度 0.45。背板:平面 15.4 × 2.6,位于 z 19.7,y 1.3,颜色 Rail。远唇:盒 15.4 × 0.12 × 0.16,位于 z 19.55,y 1.15,自发光 Lime 强度 0.35。天空:球体半径 80,位置 (0, -8, 10),BackSide,ShaderMaterial。在归一化世界 y 从 0.35 到 0.95 上使用 smoothstep,将边缘的 Horizon 混入顶部的 Ink。无太阳圆盘,无紫色。七十个星点,半径 0.045,颜色 #D7EFE8,仅在 y > 2 处,使用 mulberry32 种子 5704843 放置。不要使用 Math.random。雾为线性,颜色 Ink,近 28,远 70。桌面相机:位置 (0, 6.15, -3.1),lookAt (0, 0.7, 12.5),fov 44。800 px 以下:位置 (0, 8.2, -2.4),lookAt (0, 1.0, 12.0),fov 52。近 0.1,远 200。在移动端开始抽屉上,将相机移至 (0, 7.6, -4.2),lookAt (0, 1.4, 13),fov 50,并在回合开始时返回移动端游玩相机。 动效:星星、地板、护栏和值班员不移动。标题漂移和游玩跟随仅为相机偏移。减少动效时,相机保持在该视口的基础位置。光照不脉动。 3. **挡板、球和输入** — 挡板是一个盒 2.56 × 0.18 × 0.46,中心 z = 1.35,y = 0.36,颜色 Paper,自发光 Teal 强度 0.25。一个 Hot 刻度,0.14 × 0.22 × 0.50,位于其中心。Girder 将挡板宽度设为 4.16,持续 8.0 秒,并反向缩放刻度,使刻度保持 0.14 宽。钳制中心,使挡板保持在 x ±7.45 内。球是一个 16 段球体,半径 0.20,颜色 Hot,自发光 Hot 强度 0.85,粗糙度 0.32,金属度 0.04。一个子点光源,颜色 Hot,强度 1.5,距离 6,衰减 2。持球时,球心为 (barX, 0.52, 1.87)。发球始终将 vx 设为 0.28 乘以速度,符号取最后一次水平移动的方向,若挡板尚未移动则为 +1,vz 设为速度平方减去 vx 平方的正平方根。之后的挡板击球使用 offset = clamp((ballX - barX) / halfWidth, -1, 1),vx = offset * 0.78 * speed,然后将 vx 的绝对值钳制到 0.92 * speed 并重新计算正的 vz。每次反弹后重新归一化到回合速度。 布局:指针映射:t = (clientX - rect.left) / rect.width,target = lerp(-6.17, 6.17, clamp(t, 0, 1)),然后钳制到当前挡板限制。鼠标移动设置目标,无需按键。触摸和笔仅在指针按下时设置。ArrowLeft 和 ArrowRight 以每秒 11 个单位移动,在任何同时应用了指针的帧上被忽略。不要绑定 A 或 D。仅从持球状态、按 Space、或在画布上 pointerup 且总移动小于 14 px 时发射。拖拽不发射。按下时捕获指针。body 上 touch-action none 和 overscroll-behavior none。对 Space、方向键和 Escape 阻止默认行为,以免页面滚动。在失焦、抽屉打开和文档隐藏时清除按住的键。键盘:Escape 关闭 Controls,或在发球和游玩期间切换暂停;M 切换静音;Enter 激活聚焦的主按钮。画布可访问名称:Three-dimensional breakout on a lit grid court。一个礼貌的实时区域播报回合清空、火花丢失、火花耗尽和最终清空句子,而非每次击球。 动效:持球随挡板移动。挡板击球后,将球推到 z = 1.87,并在 0.08 秒内忽略该球与挡板的碰撞。每步最多移动 0.18 个单位,因此球无法穿过砖块。如果多个砖块重叠,仅解决最小穿透。翻转最小穿透的轴;如果两个穿透量在 15% 以内,则同时翻转两者。然后按穿透量加 0.01 推出并重新归一化。侧墙翻转 vx。后墙将 vz 翻转为负。拖尾球体:半径 0.06,颜色 Hot,不透明度从 0.35 降至 0,非碰撞体。减少动效时不绘制拖尾。球的光照保留。 4. **五个回合和砖块地图** — 九列,最多六行。砖块盒 1.28 × 0.42 × 0.58。列 x = -5.84 + col * 1.46。行 z = 18.15 - row * 0.86。第 0 行最远。字符,每个字符串长度 9:c 青绿 #1EC8B8 一击,s 海绿 #7DFFB2 一击,i 冰蓝 #9AD7FF 一击,l 青柠 #E4F27A 两击,连字符表示空。青柠砖的首次击打得 40 分,将网格切换为冰蓝,并保留一击。摧毁一击砖得 100 分。摧毁已削弱的青柠砖得 160 分。一个几何体,四个缓存材质,粗糙度 0.4,金属度 0.08,自发光强度 0.35,使用砖块当前颜色。回合速度:7.2、8.1、9.0、9.9、10.8。Glass Pier 名称:Pier Lights、Kelp Gate、Lantern Stack、Tide Teeth、Last Beacon。Millhouse 名称:Lab Lights、Coil Gate、Shelf Stack、Gear Teeth、Last Bell。地图按顺序,远行在前,每行用引号括起且恰好 9 个字符。第 1 回合:"ccccccccc" "sssssssss" "iiiiiiiii" "cscscscsc"。掉落:第 2 行第 4 列 Scatter,第 1 行第 1 列 Needle,第 3 行第 7 列 Girder。第 2 回合:"cscsicscs" "-s-c-c-s-" "c-scics-c" "-i-l-l-i-" "scscscscs"。掉落:第 0 行第 4 列 Scatter,第 2 行第 0 列 Needle,第 4 行第 8 列 Girder。第 3 回合:"lll---lll" "ccc---ccc" "sss---sss" "iii---iii" "csc---csc"。掉落:第 1 行第 1 列 Scatter,第 2 行第 7 列 Needle,第 4 行第 0 列 Girder。第 4 回合:"c-s-c-s-c" "-l-i-l-i-" "c-s-c-s-c" "-i-l-i-l-" "s-c-s-c-s" "-c-s-c-i-"。掉落:第 2 行第 2 列 Scatter,第 3 行第 3 列 Needle,第 4 行第 8 列 Girder。第 5 回合:"lclclclcl" "ss-c-c-ss" "ccclllccc" "ii-----ii" "s-c-i-c-s" "cscscscsc"。掉落:第 0 行第 4 列 Scatter,第 2 行第 0 列 Needle,第 5 行第 8 列 Girder。仅当该单元格被摧毁时才排队掉落,青柠仅被削弱时不排队。 布局:开始一轮会重建砖块,移除球、拾取物、光束和碎裂效果,并放置一个持球。分数和火花跨轮保留。清空一轮加 800 分,然后加一个火花,上限为 5。通关卡片显示 Round clear、轮次名称、PTS 和分组总计,以及 spark returned 或 sparks full。按钮:Next round。第 5 轮之后,卡片标题是场馆名加 clear,因此默认显示为 Glass Pier clear。副标题:Five rounds。按钮:Play again。当此总分超过已保存的整数时显示 New best。Next round 和 Play again 不会重新加载页面。Play again 将分数设为 0、火花设为 3、轮次设为 1,并返回发球状态。 动效:砖块不移动。chip 是即时颜色变化。打开通关卡片会冻结步进。已有的碎裂可以完成;卡片打开后不再生成新方块。减少动效会移除碎裂,保留颜色变化和卡片。 5. **拾取物、光束和碎裂** — 同时最多存在两个拾取物。第三个排队的掉落会被忽略;砖块仍然计分。拾取物以每秒 3.5 个单位朝相机下落,在 z < 0.2 时被移除。当其 z 在 1.05 到 1.70 之间且其 x 在挡板半宽加 0.28 范围内时接住它。接住得 200 分。Scatter 是三个半径为 0.08 的小 Hot 球体。接住时,从最旧的存活球生成最多两个额外球,如果没有存活球则从持球生成,方向为该速度的正负 0.45 弧度,速度相同。上限 5 个球,计入持球。提示:Scatter · two more balls、Scatter · one more ball 或 Scatter · court is full。Needle 是一个 0.08 × 0.36 × 0.36 的浅色盒子,颜色为 #FFD2C2。在 6.0 秒内每 0.45 秒发射一次,接住后 0.1 秒发射第一发,包括发球期间。光束是一个 Hot 盒子,厚度 0.06,从 z = 1.75 延伸到第一个 x 与挡板中心重叠在 0.08 以内且 z 在前的砖块,如果没有命中则延伸到 z = 19.2。它可见 0.07 秒,移除一次命中,并给予与球相同的 40、100 或 160 分。它不会反弹。提示:Needle · beam ready。Girder 提示:Girder · bar stretched。再次接住 Girder 会将计时器重置为 8.0。Needle 和 Girder 可以同时运行。计时器使用模拟时间,在暂停、隐藏或在卡片上时冻结。 布局:碎裂:14 个盒子,大小 0.05 到 0.13,寿命 0.5 秒,y 方向重力 -6.5,初始速度 1.4 到 3.4,向上偏置 1.2 到 3.0,颜色在砖块破碎的瞬间从砖块复制。用 roundIndex * 1000 + row * 10 + col 作为 mulberry32 的种子。上限 160 个存活盒子;如果达到上限,破碎砖块但不生成新盒子。拾取物仅在 y 方向上下浮动。光束不是球的碰撞体。当最后一个砖块破碎时,在同一步进入 clear,早于任何球越过出界线。 动效:拾取物浮动是正弦波。减少动效将拾取物固定在 y = 0.52 并且不生成碎裂。光束绘制一帧,仍然移除命中。减少动效开启时不要晃动相机。 6. **读数、提示和结束卡片** — 游戏读数标签,精确为:PTS 带分组整数且无前导零;RND 为 1/5 到 5/5;BLOCKS 为剩余砖块数;SPARKS 为最多五个 8 px 菱形,剩余时填充 Teal,为空时描边 Grid,并带 SPARKS 标签。轮次名称旁的状态词:持球时为 REST,至少一个球在移动时为 LIVE。轮次名称在挡板下方,来自文案表,使用 Sora。能量 chip 在底部中央,仅在激活时显示:NEEDLE 4.2 和 GIRDER 6.0,保留一位小数。提示持续 1.3 秒,绝不阻挡输入。火花丢失提示:Spark lost · 2 left,使用剩余的火花数。失败卡片标题:Out of sparks。副标题:RND、轮次编号、一个中点、轮次名称。然后是 PTS 和总计。按钮:Run it back,使用与 Play again 相同的重置。当总分超过存档时显示 New best。暂停卡片标题:Paused。按钮:Resume、Restart round、Controls。Restart round 重建当前地图并返回发球状态,不改变分数或火花,也不退还火花。在失败时和场馆通关卡片上,当总分更高时保存最佳成绩。 布局:桌面读数:一行 44 px,距顶部和两侧 16 px。品牌 chip 在左侧,Sora 600,最大宽度 28 vw,带省略号。PTS 居中,Share Tech Mono 20 px。RND、BLOCKS 和 SPARKS 在右侧,标签为 Dim 11 px。Pause 和 Sound 是品牌下方的 44 px 文本按钮。轮次名称居中在该行下方。移动端,低于 800 px:第一行是 Pause、品牌、Sound;第二行是 PTS、RND、BLOCKS 和 16 px 等宽字体的圆点。在 390 px 下没有任何横向滚动。卡片在桌面上为 420 px,在移动端为全宽面板,两侧内缩 12 px,相同的 Ink 填充和 Grid 偏移阴影。主按钮填充 Teal,文字 Ink。次按钮透明,标签为 Paper。焦点环 2 px 实线 Teal,偏移 2 px。提示位于能量 chip 上方,最大宽度 280 px。 动效:卡片淡入 160 ms。火花圆点不脉冲。减少动效会瞬间切换卡片和提示。状态文本即时变化。读数在开始卡片上隐藏,在发球、游戏、暂停、通关和失败期间显示。 7. **声音、暂停和两个视口** — 声音在 Play round one 之前关闭,该操作是解锁手势,之后开启。按钮显示 Sound on 或 Sound off。M 与按钮一致。持久化静音。音调,无音频文件:挡板命中正弦 392 Hz 持续 45 ms,增益 0.06;砖块摧毁方波 620 Hz 持续 40 ms,增益 0.04;lime chip 三角波 480 Hz 持续 35 ms;墙壁正弦 196 Hz 持续 30 ms;拾取 523 Hz 然后 784 Hz,各 60 ms;火花丢失正弦滑音 360 Hz 到 140 Hz 持续 160 ms;通关 523、659、784 Hz 各 90 ms;场馆通关增加 1046 Hz。如果 AudioContext 失败,保持声音关闭并且不要循环记录日志。渐变 20 ms。暂停、隐藏或静音时静音。Controls 标题:How the bar moves。行:Mouse:挡板跟随你的水平位置。Arrow keys:向左或向右移动。Finger:在球场上任意位置拖动。Click、tap 或 Space:当球停在挡板上时发送球。Esc 暂停。M 静音。按钮:Back。Back 返回到开始或暂停,取决于哪个打开了它。 布局:目标是在 1440×900 和 390×844 下干净帧,无横向溢出且无控制台错误。灯光:半球天空 #B7E6DC 和地面 Court,强度 0.55;方向光 #F2FFF8 强度 1.35,来自 (2.5, 9, -4);一个 Teal 补光强度 0.35,来自 (-6, 3, 8)。无阴影贴图。ACES 电影色调映射,曝光 1.02,清除颜色 Ink,输出色彩空间 SRGB。像素比 min(devicePixelRatio, 1.75),或在 800 px 以下为 1.25。如果 180 帧的平均帧时间超过 22 ms,一次性地将像素比设为 1 并禁用 bloom。保持规则。如果 WebGL 无法启动,保留开始文案并添加:This browser could not start the 3D view. Try a browser with WebGL enabled。不要循环重试。在视口变化时调整渲染器、相机和合成器的大小。遵守安全区域内边距。页面本身不滚动。 动效:暂停、隐藏文档、通关、失败和 controls 会冻结步进、计时器和球。冻结时声音保持静音。减少动效与性能削减是分开的:游戏玩法保留,仅额外的相机、碎裂、拖尾、浮动和淡入淡出被移除。质量削减绝不移除轮次、拾取物或触摸瞄准。 ## 资产 - 图像:不使用任何图像文件,也不生成静帧。天空、球场、砖块、横条、球、拾取物、碎裂效果、服务员和拖尾全部用 Three.js 绘制。添加一个原创的 public/favicon.svg:32 viewBox、Ink 圆角矩形、一条 Teal 水平横条,横条上方一个 Hot 圆形,不含任何字母。在 ASSETS.md 中说明场景由代码绘制,并将该 favicon 列为原创。 - 图标:不要安装图标包。Pause、Sound 和 Controls 是文本按钮。Spark 点数标记是 CSS 菱形。在 ASSETS.md 中不要列出任何第三方图标。 - 字体:通过技术栈中指定的 Fontsource 包自托管 Syne、Sora 和 Share Tech Mono(OFL)。只导入列出的字重。在 ASSETS.md 中记录本地 woff2 文件、npm 包页面和 OFL 许可证。不要从任何 CDN 请求字体。 - 视频:不使用视频,也不使用音频文件。第一轮 Play 解锁上下文后,击打音效通过 Web Audio 合成。 ## 不要做 - 不要后端、账户、数据库、分析、外部 API、多人模式或共享排行榜。最高分整数和静音标志保存在 localStorage 中,键由 BRAND 构建。 - 不要 CDN,不要远程资源。字体自托管,从已安装的包中导入 three,使用相对路径,并将压缩文件输出到 dist/,关闭 source map,且不将 src/ 复制到 dist/。保持 dist 在 20 MB 以下。 - 唯一的页面是 index.html。不要添加营销页面、价格或裸目录链接。首屏是亮起的球场,旁边是开始卡片,绝不要在平面上打字。 - 不要使用标题 VOIDBREAK、通关文案 LANDED 或失败文案 YOU DIED。失败标题是 Out of sparks。回合中通关标题是 Round clear。最后一张卡片的标题是场馆名加 clear。 - 不要将读数标记为 HULL、LIVES、NOMINAL、CRITICAL、WAVE、BRICKS 或零填充六位数的 SCORE。屏幕标签是 PTS、RND、BLOCKS、SPARKS、REST 和 LIVE。不要打印控制行 MOUSE / A D MOVE 或 SPACE SURGE。不要绑定 A 或 D。 - 不要使用这些状态词:HULL BREACH、HULL CRITICAL、BALL LOST、KEEP LANE、MINE HIT、SAW HIT、IMPACT、SURGE、WIDE、WIDE LOCK 或 COMBO。拾取提示仅命名 Scatter、Needle 和 Girder。 - 不要构建 EnergyCore、Interceptor、ObjectivePylon、SawDrone、SpikeMine、船体伤害、车道危险、地雷或锯片。球场由挡板、球、砖块和三个拾取物组成。 - 不要复制一次性 HTML 页面、基准提示、评审笔记、截图或游戏视频。不要提及 Agent OS、GoldieBench、AI Profit Boardroom、AIPB、Grok、xAI 或 Julian Goldie,也不要添加玩家浏览器栏。 - 不要将场景锁定到源调色板,不要使用 Inter 或 Courier New。字体是 Syne、Sora 和 Share Tech Mono,自托管。颜色是本规范中的十六进制值。 - 不要使用真实街机品牌、标志、吉祥物或名人肖像。服务员没有脸,不是真实人物的肖像。不要下载模型、HDRI、库存照片或占位图服务。 - 不要阴影贴图,不要物理引擎,不要 Math.random。星星和碎裂使用 mulberry32。Bloom 仅限桌面端,并在单次性能削减后关闭。 - 不要在 src/content.ts 之外硬编码 Lumen Dock、Glass Pier、Harborline、Nia Pell 或默认回合名称,不要在屏幕上留下原始变量标记。 - 不要编造日期、入场费、在线玩家数量或任何关于 VibeFather 的说法。VibeFather 的唯一存在是可选的 [CREDIT] 链接。 - 遵守 prefers-reduced-motion,移除抖动、碎裂、拖尾、浮动和相机漂移,但不停止回合。在 390×844 下,面板、读数和拖拽控件必须可用,无水平溢出且无控制台错误。 - 如果 WebGL 失败,显示可读的回退句子,不要在循环中抛出异常。在暂停、隐藏或卡片打开时冻结回合。 --- Inspired by arcade one-shot 3D breakout by @JulianGoldieSEO — https://agentos.guide/grok-4-7-agent-os — Prompt by VibeFather · https://vibefather.ai/t/3d-neon-breakout-arcade · 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: "3D Neon Breakout Arcade"
colors:
ink: "#07110F"
court: "#0C1714"
grid: "#24584F"
horizon: "#1C6B62"
teal: "#1EC8B8"
sea: "#7DFFB2"
ice: "#9AD7FF"
lime: "#E4F27A"
hot: "#FF4D1C"
paper: "#E7F3EE"
dim: "#8AA39A"
rail: "#12312C"
typography:
cabinet_name_on_the_start_card: { family: "Syne", weights: [700, 800] }
body_buttons_and_hud_labels: { family: "Sora", weights: [400, 500, 600] }
points_round_and_timers: { family: "Share Tech Mono", weights: [400] }
spacing: "4 px base. Desktop card padding 28 px, HUD inset 16 px. Mobile inset 12 px plus safe-area insets. Buttons at least 44 px tall. The start sheet on a phone stays within 46 vh and scrolls inside itself. The center of the court stays clear of chrome during play."
radius: "Start, pause, clear, fail, and controls cards 12 px with a hard 4 px offset shadow in Grid, no blur. Buttons 8 px. Spark pips are 8 px diamonds. World meshes stay sharp except the ball, the attendant head, and Scatter's small spheres."
---
# 3D Neon Breakout Arcade — 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** `#07110F` — Page background, renderer clear, start card, sky zenith, fog
- **Court** `#0C1714` — Floor plane and readout chips
- **Grid** `#24584F` — Floor lines and card border
- **Horizon** `#1C6B62` — Sky-dome horizon
- **Teal** `#1EC8B8` — Teal bricks, rails, primary button, spark pips, focus ring
- **Sea** `#7DFFB2` — Sea bricks
- **Ice** `#9AD7FF` — Ice bricks and chipped lime bricks
- **Lime** `#E4F27A` — Two-hit bricks before the first chip, Girder pickup, far lip
- **Hot** `#FF4D1C` — Ball, ball light, center tick, Needle beam, Scatter pickup
- **Paper** `#E7F3EE` — Headings, HUD numbers, paddle body
- **Dim** `#8AA39A` — Eyebrow, labels, hours line, credit
- **Rail** `#12312C` — Side rails and back plate
## Typography
- **Cabinet name on the start card** — Syne (OFL), weights 700/800. Self-host the font files.
- **Body, buttons, and HUD labels** — Sora (OFL), weights 400/500/600. Self-host the font files.
- **Points, round, and timers** — Share Tech Mono (OFL), weights 400. Self-host the font files.
## Spacing & shape
- Spacing: 4 px base. Desktop card padding 28 px, HUD inset 16 px. Mobile inset 12 px plus safe-area insets. Buttons at least 44 px tall. The start sheet on a phone stays within 46 vh and scrolls inside itself. The center of the court stays clear of chrome during play.
- Radius: Start, pause, clear, fail, and controls cards 12 px with a hard 4 px offset shadow in Grid, no blur. Buttons 8 px. Spark pips are 8 px diamonds. World meshes stay sharp except the ball, the attendant head, and Scatter's small spheres.
## Motion
- Fixed step of 1/60 second. Each frame runs at most three steps and drops leftover time. Render with the latest state.
- On the start card the camera eases 0.04 units on x over 8 seconds. During play the camera x eases toward 0.18 times the paddle x, clamped to 1.1, with smoothing 1 - exp(-4 dt).
- A brick break offsets the camera by at most 0.045 units for 0.1 seconds, ease out, one shake at a time. The ball trail keeps the last 10 positions spaced at least 0.12 apart.
- Shatter spawns 14 short-lived boxes. Pickups bob 0.05 units at 1.8 Hz. Overlays fade in 160 ms and do not travel.
- With prefers-reduced-motion, cut the title drift, camera follow, shake, trail, shatter, pickup bob, and overlay fade. Snap UI in place. Keep the ball, the bar, the beam, and the rounds, because that motion is the game.
## Imagery
Draw the court, sky, bricks, bar, ball, pickups, shatter, and the attendant from original Three.js geometry. No photographs, no generated stills, no HDRIs, no downloaded models, and no brand marks. The lit court is the first-screen anchor, with the start card beside it. The attendant is a featureless figure outside the right rail: a box coat in #C5D2CB, a sphere head in #E6C4A4 with no eyes or mouth, and a Teal cap. The figure is fictional and is not a portrait of any real person. No faces anywhere else.
## Tone
Dry, specific, and local, like a night attendant talking to a regular. Short US English. No military hull talk, no death slogan, and no padded scoreboard.
---
Inspired by arcade one-shot 3D breakout by @JulianGoldieSEO — https://agentos.guide/grok-4-7-agent-os
— Prompt by VibeFather · https://vibefather.ai/t/3d-neon-breakout-arcade · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
改成你自己的
- 街机酒吧或复古街机厅:将 BRAND 设为你的机台名称,VENUE 和 CITY 设为你的位置,ATTENDANT 设为负责现场的员工。
- 大学休闲中心:使用校园活动室机台设置,将 VENUE 设为你的建筑,并保留五个关卡作为学生的随到随玩游戏。
- 独立游戏作品集:将 BRAND 设为你的工作室名称,TAGLINE 设为一句关于游戏的话,然后从项目列表中链接到该机台。
- 音乐节或展会摊位:将 VENUE 和 CITY 重命名为活动名称,ATTENDANT 设为主持人名字,并在触摸屏上全屏运行。
3D 霓虹打砖块街机:常见问题
在 3D 霓虹打砖块街机模板中,如何重命名街机机台、场地和城市?
3D 霓虹打砖块街机模板提供五个变量:BRAND、VENUE、CITY、ATTENDANT 和 TAGLINE。将 BRAND 设为你的机台名称,VENUE 和 CITY 设为旁边对应的场地和城市,ATTENDANT 设为负责运营的人。修改这四个变量会重写店员那句话、营业时间行和五个关卡名称,使其适配新词。仅修改 TAGLINE 会替换开始卡片并保留关卡名称。
3D 霓虹打砖块街机游戏中的 Scatter、Needle 和 Girder 是什么?
Scatter、Needle 和 Girder 是 3D 霓虹打砖块街机模板中放置在地图里的三种下落道具。Scatter 增加球数,Needle 从挡板发射一道直光束,Girder 让挡板伸长几秒。它们下落时会上下浮动,接住一个就会改变这一轮的玩法。当你更改机台名称或城市时,它们的规则和位置保持不变。
3D 霓虹打砖块街机模板需要服务器或下载的 3D 模型吗?
不需要。3D 霓虹打砖块街机模板构建为静态文件,没有后端、没有账号,也没有外部 API。所有网格模型都用 Three.js 在代码中构建,因此没有下载的模型、照片、HDRI 或品牌标识。唯一存储的数据是最高分和静音标记,保存在浏览器中。你可以将构建后的文件托管在任何静态托管服务上。
怎么用 AI 做一个3D 霓虹打砖块街机?
复制本页的提示词,或者运行 npx vibefather add 3d-neon-breakout-arcade,把 [CITY]、[BRAND]、[VENUE]、[TAGLINE] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。
3D 霓虹打砖块街机模板的演示是哪个 AI 模型做的?
演示由 Grok 4.7 在 Grok Build 里完成;另一个案例由 Grok 4.7 在 Grok Build 里完成。每次都用公开的提示词原样生成,没有额外补充。