UNPKG

cannondice

Version:

3D-rendered dice for modern browsers with Cannon.js physics. Based on Teal's excellent 3D dice javascript component

16 lines (15 loc) 528 B
import { DiceBox } from './dicebox'; import { DiceNotation } from './dicenotation'; import { DieVector } from './dievector'; export interface AfterDiceRollCallback { (box: DiceBox, notation: DiceNotation, result: number[]): void; } export interface BeforeDiceRollCallback { (box: DiceBox, vectors: DieVector[], notation: DiceNotation, roll: (requestResults?: boolean) => void): void; } export interface DiceBoxCallback { (values: number[]): void; } export interface NotationGetter { (): string; }