Modules
Pixel-art 3D dice roller. The roll itself is computed authoritatively in
Elixir; the optional LiveView component (DicExWeb.DiceRoller) visualises
the result with Three.js + Rapier physics.
Supported die catalog and the canonical face layout per polyhedral type.
Pluggable randomness source for dice rolls.
The default RNG: a thin wrapper around Erlang's :rand.
A deterministic, list-backed RNG for tests.
Cryptographic high-entropy RNG. Every roll draws fresh entropy from the OS
via :crypto.strong_rand_bytes/1 — the BEAM's CSPRNG, the same source used
for secrets — so outcomes are effectively unpredictable.
The outcome of a roll: a structured, AI/consumer-friendly record plus helpers
to reduce it to plain data (to_map/1) or flatten its kept dice (kept_values/1).
Theme adapter for the dice roller.
A self-contained LiveComponent that renders the pixel-art 3D dice roller.
Mix Tasks
Builds the dicEx frontend assets (Three.js + Rapier) into
priv/static/dic_ex.min.js so they ship with the Hex package.
Copies the dicEx prebuilt assets into the host Phoenix application's
assets/vendor and assets/css directories so they bundle into app.js /
app.css, and prints the wiring snippet.