feat: add @3d-dice/dice-box as visual overlay on dice roll#207
Conversation
…g dice Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/c129f9d4-e672-4016-8181-38bd4a77044d Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/c129f9d4-e672-4016-8181-38bd4a77044d Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
|
|
use the dots ui instead of numbers for the dice and the dice results should match |
|
@copilot use the dots ui instead of numbers for the dice and the dice results should match |
…G source Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/a85bf4f4-c9b3-473d-8071-3fd367746819 Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Done in fe4a68f. The 3D dice already use the default dot/pip theme from dice-box. The matching values issue is fixed by making the 3D roll the source of truth: |
|
@copilot no revert your last commit. That was the wrong direction. I want you to make the new library library role end up on the values that I calculated the previous way so don't change how the dice is rolled change how the library is called so that we are passing the new dice values to it whenever we roll it instead of having the library have a random result. Also try and simplify and remove as much as you can from the library. Config |
…h game values Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/d8126213-1baf-491a-b056-f04955d5a15d Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Done in bd0511d. |
|
@copilot now the rollDie animation is broken, go back to your first commit
and JUST change to using dots instead of numbers
|
Agent-Logs-Url: https://github.com/ProLoser/PeaceInTheMiddleEast/sessions/7084633b-44bd-45a2-8856-d128b9147b4c Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
... Done in dd3a770. Reverted all changes after the first commit and replaced the 12 digit die images with dot/pip faces (rounded square, white pips on dark background for black dice, dark pips on light background for white dice): |

Adds a full-screen 3D dice roll animation that plays on top of the board whenever dice are rolled, using @3d-dice/dice-box. The 3D dice use the default dot/pip theme and play as a pure visual overlay — the game's existing
rollDie()logic is unchanged and the 3D animation is triggered after the roll as eye candy.The 2D board dice have also been updated to display dot/pip faces instead of digit numerals.
Changes
@3d-dice/dice-boxadded as a dependency; static assets (ammo wasm + default dot/pip theme textures) committed topublic/assets/dice-box/DiceBox3D.tsx— new component that initialisesDiceBoxonce on mount and exposes aroll(values: number[])method viauseImperativeHandle; renders aposition: fixed; pointer-events: nonecanvas overlay that fades in on roll and auto-dismisses 600ms after dice settlevite-env.d.ts— TypeScript module declaration for the untyped packageindex.tsx— renders<DiceBox3D ref={diceBox3DRef} />and callsdiceBox3DRef.current?.roll(dice)after the synchronousrollDie()-based roll as a visual overlaydigit-N-{black,white}.png— all 12 die face images replaced with dot/pip versions (rounded square background, white pips on dark for black dice, dark pips on light for white dice)