Skip to content

feat(dice): 3D cube dice with live preview & realistic roll - #4

Merged
TTigger merged 1 commit into
masterfrom
feat/dice-3d
Jun 16, 2026
Merged

feat(dice): 3D cube dice with live preview & realistic roll#4
TTigger merged 1 commit into
masterfrom
feat/dice-3d

Conversation

@TTigger

@TTigger TTigger commented Jun 16, 2026

Copy link
Copy Markdown
Owner

把擲骰子工具升級成真正的 3D 立體骰子

變更

  • 3D 立方體骰子 — 純 CSS(perspective + preserve-3d)打造立方體,可同時看到正面/上面/右面,帶傾斜與陰影的立體感
  • 即時預覽 — 一調整「數量 / 面數」就立刻顯示對應數量、對應類型的骰子(d6 顯示真實點數、其他顯示面數),讓使用者擲骰前就確認設定是否正確
  • 真實翻滾跳動 — 擲骰時每顆骰子在 3D 中多軸翻滾 + 上下彈跳,並錯開時間落點,落定後平滑回正顯示結果
  • d6 點數正確 — 六面依「對面相加為 7」排列,正面即擲出的點數
  • 保留:總和、最高點高亮、最近 5 筆紀錄
  • 尊重 prefers-reduced-motion(停用動畫直接顯示結果)

測試

  • 全部 92 個單元測試通過;npm run build 通過(11 頁)。

🤖 Generated with Claude Code

- Renders each die as a CSS 3D cube (perspective + preserve-3d), showing
  three faces for a real stereoscopic look
- Live preview: adjusting count/sides immediately shows that many dice of
  the chosen type, so the setup is clear before rolling
- Rolling tumbles and bounces each cube in 3D (staggered per die) then
  settles on the result; d6 faces use real pips with opposite sides summing to 7
- Respects prefers-reduced-motion

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tiglet Ready Ready Preview, Comment Jun 16, 2026 3:08pm

@TTigger
TTigger merged commit 0cee905 into master Jun 16, 2026
2 checks passed
@TTigger
TTigger deleted the feat/dice-3d branch June 16, 2026 15:12
TTigger added a commit that referenced this pull request Jul 13, 2026
HANDOFF 最後一項:讓人三秒看懂這個站。

- 兩支 demo GIF(.github/demo/,各 ~0.2MB):
  賽段剖面圖(範例路線 → 游標讀數 → 環義粉/午夜黑主題 → 爬坡細部圖)、
  網址健檢(掃 tiglet 自己的工具頁 → 100 分 → 大圖分享卡預覽)。
  對 production 錄製;無 ffmpeg,用 Playwright 逐格截圖 + gifenc 純 JS 組圖。
  放 .github/ 而非 public/(教訓 #4:不進 service worker 預快取);
  docs/ 已被 gitignore 留給本地筆記,所以不放那裡。
- 兩份 README 同步更新:新增 demo 區、補 4 個新工具
  (發票對獎/QR 掃描/中油油價/PDF 工具)、更新既有工具描述
  (QR WiFi/vCard、計時器間歇、圖片 EXIF、生活計算大寫金額、剖面圖全功能)、
  測試數字 230+ → 550+ unit / 65 e2e、api/ 一支 → 三支、隱私段補新函式。

錄製網址健檢 GIF 時同步完成 HANDOFF 記錄的未竟驗證:
tiglet 工具頁健檢 100 分、社群卡大圖預覽正常。

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant