Skip to content

Function: mountRoller() ​

ts
function mountRoller(target, options?): RollerHandle;

Defined in: src/ui/mount.ts:180

Put a dice tray into an element.

One model runs the whole tray: the roll is a pool of dice. Tapping a die button adds one die of that kind to the pool; a chip in the pool takes one away; the number row sets how many of the kind last touched. The dice the tray opens with are a suggestion, not yet anybody's roll, so the first die tapped takes their place: one tap gives a d20, and d20, d4, d4 gives 1d20+2d4. The notation box says the same pool in writing and can be typed into for anything the buttons do not reach.

A tap on the felt throws the pool. Once plain dice have been thrown, a tap on a die holds it and the next throw rolls the rest.

Parameters ​

target ​

HTMLElement

options? ​

RollerOptions = {}

Returns ​

RollerHandle

MIT © John Morris