This is a small playground for my Roll.js library, which is designed to compute exact results for dice rolls of arbitrary complexity (rather than simulating several thousand rolls for an approximate answer).
Several things are visible to code written in the input pane:
R
.
Roll
.
DOM
(to let you easily create other elements).
log()
function,
which will console.log()
the value,
and add it to the output pane.
Nodes and text are appended directy;
Roll objects log their .text()
results to the console
and put their .table()
results in the output pane.
The result of the final expression in the code pane will be automatically log()'d.
The code won't run until you press the button, at which point the page's hash will also update to contain the code, so you can easily share links.
Some example rolls: