Dice
Mountain Lizard IconMountain Lizard Icon
Type:
Variant:
Count:
Rolls:

@mountainlizard/dice

A React component for rolling 3D dice, using @react-three/fiber for rendering, and rapier.rs for physics simulation.

The following features are available:

  • Supports dice with 4, 6, 8, 10, 12 and 20 sides. 10 sided dice are available numbered from 0-9 (D10), and from 00-90 (D10x10), allowing rolling results from 0 to 99.
  • Supports dice variants, currently normal (white with black numerals), advantage (black with gold numerals), disadvantage (red with white numerals)
  • Supports pre-determined rolls - each dice can have a result set in advance, and that result will always come up (try selecting "Maximum" for the "Rolls" setting above). This allows sharing of server-side dice rolls between multiple clients.