保留原始需求
閱讀原作者的貼文,調整提示詞時保留任何必要的參考資產或相依項目。
作者分享的提示詞,明確標示為搭配 Opus 5.5 使用,用於重現 React Native 取貨流程。它會建立一個風格化的 3D 店面與城市街廓場景,讓凸出的 QR 模組逐漸攤平,最後轉為 2D 取貨 QR 畫面。附上的五張帶有時間戳記的圖片是必要的基準參考。
同一個角色,兩種真實製作方式。不同任務的結果會有所不同。
# 建置:「街景到 QR」取貨轉場(像素級重現)
在 React Native App 中盡可能精準地重現這段 8.17 秒的流程。咖啡訂單準備完成後,鏡頭從街道高度向上升越店面。從上方看到的 3D 城市街區**就是**取貨 QR 碼,並在取貨畫面上攤平成真正的 2D QR 碼。
附有五張參考圖片,依時間戳命名:`t0.00`(開場)、`t4.40`(QR 模組開始出現)、`t4.70`(鏡頭越過屋頂頂點)、`t5.00`(幾乎正上方俯視中央環)、`t8.00`(最終畫面)。它們是唯一的判定依據。如果本說明與圖片不一致,以圖片為準。圖片之間的所有內容都在下方時間軸中描述。
圖片是手機螢幕的錄影,置於 `#E9E8ED` 背景上並帶有柔和陰影。該背景不屬於 App。在每張 1080x1920 圖片中,螢幕範圍為 x 163-917、y 75-1710,比例為每 1pt 對應 1.916 個圖片像素。
## 技術堆疊與交付內容
- 使用 React Native 搭配 Expo 和 TypeScript。如果此處已有專案,請整合至其中,並沿用既有的導覽與程式慣例;否則請建立新專案。優先以 iOS 為目標。
- 3D 場景:`expo-gl` + `three` + `@react-three/fiber/native`,置於全螢幕 UI 後方。
- UI:使用原生 RN 視圖,並以 `react-native-reanimated` 製作動畫。磨砂表面使用 `expo-blur`。最終 QR 碼與圖示使用 `react-native-svg`。文字使用 `@expo-google-fonts/inter`。
- 沒有 DOM,因此無法使用 `document.createElement('canvas')` 貼圖。能以幾何體製作的細節就用幾何體完成。其餘部分(招牌字樣、店內裝潢、石材砌縫)請撰寫小型開發時期腳本,產生 PNG 貼圖、提交至版本庫,再使用 `expo-asset` 載入。不得使用外部模型或照片。
- 維持場景的低成本:合併靜態幾何體,並使用 `InstancedMesh` 製作 QR 方塊,讓所有方塊只需少量繪製呼叫即可完成。將柔和陰影烘焙至貼圖,或使用平面陰影,而非即時陰影貼圖;除非即時陰影貼圖能維持幀率。
- 螢幕掛載時自動播放。實體 iPhone 的目標為 60fps。
- **所有內容都由一個以秒為單位的主時鐘 `t` 驅動**:這是從 0 線性執行至 8.17 的 Reanimated shared value。場景在 `useFrame` 讀取它,UI 則在 `useAnimatedStyle` 讀取。每個屬性都必須是 `t` 的純函式,不得使用獨立的 spring 或計時器,以免產生漂移。
- 新增僅限開發環境使用的任意時間點凍結功能(例如 deep link `?t=4.6`),供下方驗證使用。另請新增僅限開發環境使用的點按重播功能。
- 最終畫面需具備真實行為:顯示取貨畫面時,以 `expo-brightness` 提高亮度,關閉時恢復原亮度,符合文案承諾。「x」會關閉流程。分享與加入 Apple 錢包可以是無作用的 stub。
## 版面配置
- 以 393x852pt(iPhone 15/16)為設計尺寸。以下所有位置皆以此空間為準。使用安全區域 inset 與等比例縮放,讓其他 iPhone 尺寸也能正確排列,並維持 QR 碼置中且為正方形。
- 使用真實裝置狀態列的深色內容樣式、真實 Dynamic Island,以及真實主畫面指示器。不要繪製假的元件。狀態列會保持顯示於場景上方。
- 若要擷取與參考圖片一致的畫面,請執行 `xcrun simctl status_bar booted override --time 9:41 --batteryState charged --batteryLevel 100`。
- 字型:Inter,字距較緊。以下尺寸為以 pt 計算的估計值。
## 畫面 1:訂單狀態(t = 0 至 3.0)
全出血 3D 場景位於浮動磨砂面板後方。
**圓形玻璃按鈕**:43pt,x 方向 inset 16pt,y 位置 61pt。半透明白色,搭配背景模糊與細緻的亮色邊框。左側:返回箭頭;右側:「...」。
**面板**:x 方向 inset 8pt,頂部 540pt,底部 inset 4pt,圓角半徑 34pt。磨砂效果,且能透過面板清楚看見場景的模糊影像:頂部為 `#DEDFDC`,到中段逐漸穩定在約 `#F1EDEA`。頂部邊緣附近置中放置 36x4pt 的灰色拖曳指示條。內距 16pt。
由上至下:
1. 「Order A42」:13pt 半粗體灰色。
2. 「Being made」:34pt 粗體,接近黑色。
3. 時鐘圖示 +「Ready in about **2** min」:15pt 灰色,數字使用黑色粗體。
4. 三段式進度列:高度 5pt、完整圓角、間距 6pt;軌道為 `#E3E1DC`,填色為 `#69A25F`,約位於 y 662pt。下方以 13pt 顯示標籤:「Ordered」、「Making」、「Ready」。目前使用中的標籤為黑色粗體,其餘為灰色。
5. 白色卡片 `#FCFAF8`,圓角半徑 18pt,高度約 125pt,分成上下兩列,中間以極細線分隔:
- 36pt 圓形 `#E0FFD7`,內含深綠色 `#4E7151` 冰飲杯圖示|「Blondie Matcha」16pt、「Regular, iced, oat milk」14pt 灰色|「£4.45」灰色,靠右對齊。
- 相同的圓形,內含店面圖示|「42 Gordon Street」、「Collect from the pickup counter」|灰色箭頭。
## 3D 場景
單位:**1 個世界單位 = 1 個 QR 模組。**地面平面是 QR 碼的座標系統,模組 (22,22) 位於世界原點。
**QR 矩陣**(45x45、版本 7,`#` = 深色;從最終畫面讀取,請逐字使用):
``` #######.#..##....###.#.#.....##.##..#.####### #.....#....#.###.##......#.#...#...#..#.....# #.###.#..#######.#.#..##.###.#...#.#..#.###.# #.###.#...#.##.#..#.###.#.#.######.##.#.###.# #.###.#.##...##.###.#########.#.#####.#.###.# #.....#.#...#...#.#.#...#...##.##.....#.....# #######.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.####### ............#.......#...###..#.#..#.#........ .#######.#.###.#.#..#####.##.....##.#..##...# .##..#.######...#..#####.##..#.#..##.#.#.#... #.###.###....##.##.#...#...#..#..#...##...... .##..#.#..##.###.#.#.###....#.#..#.#.#.#.#... ...#####..#.....#.#..#.###.#.####.......#.#.# ##.###.##.##....#..#.#..#.....#.##..##.##.#.# #####.###..#...#.##...##.#.#.####.....#.####. ..#....#.....#..###..#########.#.######...##. .##...####.##.######.##...#......###..##.###. ..#.#..#.#####.#...#.#.#.##..#.#.#..###..#..# ..###.#.###...###.##.#.#...#..#..###...#...#. .##.##.#.###.###..##...#......###.#.#..#.#... .##.#####.##..#.#...######.#.##...#.#####.### ##..#...#.#.#.#.#.#.#...#.....#.##..#...#..#. #.###.#.#..####..####.#.##.#.##...###.#.#.#.. #.###...#..##..####.#...#..#.##.##.##...####. #.#.#####....######.######..####....######... #..###.#...#..##...#.####.########.#.#..#.... .#..#####..#.####.#..#....#.##.##..#...###### ....#..####..#.#...##.#.#......#..#.##..#.#.# ###.###.#..#.#.########..#.#..#..##..##....## .#.#.#.#.#.....##...#######..###..#.#.##.#.#. #....###.....##.##..#.#...##..#..#..###...... #...##....#.#...#.#.###.#.##..#..#.....#.#.#. #.#####.#..#.###...#.#......#####..##..##.#.. #.#.##..#.....######.....####.#.##.#.#....##. ....#.###.#.####..##.##.#...#####..#...#####. .####..#.####..#...###.##....#.#..#.##..#.#.# #..##.#...#.###.##.######........##.#######.. ........#.###.##...##...#.#.##.#..###...##.## #######.#.....#.##..#.#.#..##.#..#..#.#.#..#. #.....#.#.#....######...#..##.#...#.#...##... #.###.#.#..#.##...#.#####.#..####.#.#####.### #.###.#.#.....##.###...#.#.##.#.##.#....#.##. #.###.#.#.#.#....#.###...#.#.########....##.. #.....#.#.#####.#.#...#.#..#.#.##.####.#..#.. #######..#...#...###........#..#..#####..###. ``` **The key idea:** the center alignment pattern (rows and columns 20-24) *is the hero building*. Its dark outer ring (5x5 modules, 1 module thick) is a hollow courtyard building with a flat dark roof. The courtyard is 3x3 modules of light ground, with a single dark block at its center. The storefront is the south face of this ring. The camera therefore flies up over the facade, passes the roof edge, and looks down into the courtyard, which is already the middle of the QR. **Hero building, south face.** Warm limestone (about `#D9C4A1`) with faint block coursing, a horizontal string course per floor, and two vertical pilasters that divide 3 bays. About 3 visible upper floors in the opening frame, more above. 3x2-pane sash windows in blue-slate `#647985`, cream frames, sills. A dentil cornice and parapet at the top, with the inner courtyard walls in the same stone and window style. **Shopfront at ground level:** - Green fascia `#69A25F`, angled slightly outward, with "BLANK ▪ STREET" in small spaced white caps. - Green mullions, cream interior panels. - Central dark green door `#31452C` with a brass pull. - Pendant lamps, shelves with small green packages, menu board, and diagonal white glass-reflection streaks. - Green stall risers `#4E7151`. - Boxwood topiary balls in stone planters at both ends. - Outdoor seating: 3 small round white-topped tables with black bases and dark green chairs, casting soft shadows. - A small green sign/box at the far right. **Street** (front of the building, moving toward camera): pale pavement strip with a thin yellow line at the kerb, gray road about `#A7A7A5` with a white dashed lane mark, then large cream paving slabs `#F1EDEA` near the camera. **Neighbors:** buildings either side use the same stone, with dark brown ground floors. Visible at the edges from about t = 4.2. **Every other dark module** is a small extruded building block, 1x1 in footprint, merged into visual clumps with neighbors. Flat roof with a subtly varied near-black tint per module: navy `#1B1E26`, warm `#231D1A`, olive `#201D17`, teal about `#1A2A2A`. Tiny dentil detail along roof edges where facades are visible. Light modules are bare ground. **Light:** warm directional sun casting soft shadows up and to the left on screen when viewed from above. Stylized, soft, illustrative, non-photoreal. Treat it as a flat illustration given depth, not PBR. ## Master timeline (measured from the video) Easing should feel continuous. The camera move is the single dominant gesture, slow to start and fast through the top-down reveal, between t = 4.4 and 5.2. | t (s) | What happens | |---|---| | 0.00 | Screen 1, camera at street level looking at the facade. Fascia at about 46% of screen height, road directly below. "Making" segment about 60% full and filling linearly. | | 0.70-0.90 | Digit "2" rolls vertically to "1", with motion blur and fade. | | 1.40 | Bold label switches from "Making" to "Ready". | | 1.50-1.60 | Title crossfades "Being made" to "Ready" with blur, in place. The subtitle crossfades to a check-circle + "Show your code to the barista" (no bold digit). | | ~1.60 | "Making" segment reaches 100%. | | 1.60-2.30 | "Ready" segment fills: about 23% at 1.7, 85% at 1.9, 98% at 2.1, full at 2.3. | | 2.30-3.00 | Hold. | | 3.00-3.30 | Sheet drops off the bottom with ease-in, revealing the paving. | | ~3.10 | Buttons morph: back to "x", "..." to share icon, quick crossfade. Glass stays. | | 3.20-4.00 | Camera begins to rise and pitch down. Verticals converge (building leans outward at top). Road color fades up to cream. Lane dash and kerb line dissolve, so by 4.0 the whole ground is uniform cream `#DED6CE`-`#E5DFD3`. Seating is now seen from a higher angle. | | 4.00-4.30 | Rise continues. Storefront shrinks toward the middle of the screen. More floors come in from the top, and the cornice arrives at about 4.4. | | 4.30-4.60 | **QR modules appear on the ground in front of the shop**: flat rectangles fade from transparent through gray to dark, staggered, nearest the shop first. Some are still pale gray at 4.6 while others are dark. | | 4.50 | Dark navy roof `#1B1E26` passes under the status bar at the top. | | 4.60-4.80 | Camera crests the parapet. The roof band moves down the screen and the courtyard appears above it, showing the inner far wall with windows and the dark center block. Facade is now foreshortened to a thin strip with table tops as white dots. | | 4.80-5.20 | Near-top-down and pulling out fast. The ring reads as the center alignment pattern, about 5 modules at 225px on the 720-wide reference at t=5.0. Tall walls collapse toward zero parallax, soft shadows still visible, then fading. Roof tints still differ. | | 5.20-5.30 | Perfectly flat and orthographic. All shadows gone. The QR is wider than the screen, and its bottom edge has come into view with `#F2F2F2` below. | | 5.30-5.60 | The QR scales down smoothly toward its final size and position, and the finder squares come into view. Tints converge to near-black. Ground goes to `#F2F2F2`. | | 5.50-5.70 | Glass buttons lose their glass over the now-light background. "Pickup" fades in. | | 5.60-6.10 | Screen 2's sheet rises from the bottom with a decelerating spring, no visible overshoot. | | ~6.20 | QR settled. Everything still. | | 6.20-8.17 | Hold on the final frame. | **Camera implementation:** Use one PerspectiveCamera. Animate position, lookAt and FOV from keyframes via a smooth spline. Keep x centered on the hero the whole time, with no roll. Narrow the FOV as the camera climbs (a dolly-zoom), so that perspective has fully flattened by t = 5.25. Simultaneously collapse the height of all blocks to 0 between about 5.0 and 5.25. This is what gives zero parallax. At the moment the view is flat and aligned, swap from the GL view to a crisp `react-native-svg` QR (a single Path) in the same position and size with no visible jump, then run the scale-down on that view with a Reanimated transform. (How the modules behave in height during 4.3-5.2 is inferred from the video. They read as flat fades at first and as low extruded blocks by 5.0. Tune to match the frames.) ## Screen 2: Pickup (final state) Background `#F2F2F2`. - Nav: "x" and share in 43pt very light circular buttons, same positions as Screen 1. "Pickup" 17pt semibold centered at y 81pt. - QR: 308x308pt at x 42.5pt, y 179.5pt, module 6.84pt. Near-black with a very faint residual color variation. Square modules with no rounding. - Sheet: `#FEFCFB`, x inset 8pt, top 586pt, bottom about 847pt, radius 34pt, grabber, 16pt padding. - "A42" 40pt bold, near-black. On the same row at right, a pill about 75x28pt, fill `#E0FFDD`, dark green "✓ Ready" 13pt semibold. - "Pickup code" 13pt semibold gray. - "Show this to your barista" 20pt bold. - "Blondie Matcha, Regular · 42 Gordon Street" 15pt gray. - Sun icon + "Brightness is turned up while this is open" 13pt gray. - Black pill CTA `#000000`, 346x49pt, top at 783pt: white wallet icon + "Add to Apple Wallet" 16pt semibold white. ## Definition of done 1. On an iPhone 15 or 16 simulator, freeze at t = 0.00, 4.40, 4.70, 5.00 and 8.00, capture each with `xcrun simctl io booted screenshot`,並將其與相符的參考圖片並排查看,裁切至螢幕範圍。請務必實際開啟並查看圖片。列出每一項可見差異、修正後重複比對,直到只剩細微差異為止。也請觀看完整動態,因為五張靜態圖無法捕捉圖片之間的跳動。
2. 時間不足時的優先順序:(a) 4.3-5.3 秒揭示段落的連續性,環必須準確落在模組 20-24 上,且任何位置都不能出現可見的切換;(b) 最終畫面,應幾乎完全一致;(c) 開場畫面;(d) 細小的店面道具。
3. 在程式碼中逐一比對最終 QR 的每個模組與矩陣。
4. 在實體 iPhone 上測量 4.3-5.3 秒揭示期間的幀率,並回報數值。模擬器的 GL 效能不具代表性。如果沒有可用裝置,請明確說明,不要聲稱達到 60fps。提示詞解析
看看《從街景到取貨 QR 的轉場》這個 Claude Opus 5.5 3D 案例,主題包括街景轉 QR 碼, 取貨轉場, React Native。來源標註會說明正文是作者原始提示詞,還是根據公開內容整理的創作簡報。
先保留核心目標,再寫清鏡頭、操作方式、燈光和驗收要求。先驗證這些基礎效果,再逐步增加視覺細節。
閱讀原作者的貼文,調整提示詞時保留任何必要的參考資產或相依項目。
旋轉攝影機、嘗試各種控制方式,並測試完整互動流程,以找出穿模、物件浮空與狀態錯誤。
互動功能運作後,使用 Tripo 生成的角色、道具或產品,打造專屬於自己的體驗。

提示詞負責搭建遊戲或場景。再用 Tripo 製作更細緻的角色和道具,替換簡單的暫代模型,讓畫面更生動。