Skip to the content

Korokoroコロコロ

Roll mixed dice or type notation, compare exact probabilities, keep a history and replay seeded rolls.

Korokoro describes something small rolling in Japanese. About the name

Contents

Reference · Vue components

DiceRollerconstant

The tray as a Vue component:

<DiceRoller notation="2d20kh1+5" wide

Import it

import { DiceRoller } from "@johnmorrisdotca/korokoro/vue";

Definition

const DiceRoller: DefineComponent<ExtractPropTypes<{ notation: StringConstructor; spec: PropType<Partial<RollSpec>>; locale: StringConstructor; strings: PropType<RollerOptions["strings"]>; storage: { type: PropType<RollerOptions["storage"]>; default: undefined; }; storageKey: StringConstructor; query: StringConstructor; shareBase: StringConstructor; theme: PropType<RollerOptions["theme"]>; wide: { readonly type: BooleanConstructor; readonly default: undefined; }; size: PropType<RollerOptions["size"]>; animationMs: NumberConstructor; sound: { readonly type: BooleanConstructor; readonly default: undefined; }; playSound: PropType<RollerOptions["playSound"]>; hold: { readonly type: BooleanConstructor; readonly default: undefined; }; placeholder: { readonly type: BooleanConstructor; readonly default: undefined; }; keyboard: { readonly type: BooleanConstructor; readonly default: undefined; }; languageChooser: { readonly type: BooleanConstructor; readonly default: undefined; }; diceWar: { readonly type: BooleanConstructor; readonly default: undefined; }; }>, () => VNode<RendererNode, RendererElement, { [key: string]: any; }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { roll: (roll: Roll) => boolean; }, string, PublicProps, ToResolvedProps<ExtractPropTypes<{ notation: StringConstructor; spec: PropType<Partial<RollSpec>>; locale: StringConstructor; strings: PropType<RollerOptions["strings"]>; storage: { type: PropType<RollerOptions["storage"]>; default: undefined; }; storageKey: StringConstructor; query: StringConstructor; shareBase: StringConstructor; theme: PropType<RollerOptions["theme"]>; wide: { readonly type: BooleanConstructor; readonly default: undefined; }; size: PropType<RollerOptions["size"]>; animationMs: NumberConstructor; sound: { readonly type: BooleanConstructor; readonly default: undefined; }; playSound: PropType<RollerOptions["playSound"]>; hold: { readonly type: BooleanConstructor; readonly default: undefined; }; placeholder: { readonly type: BooleanConstructor; readonly default: undefined; }; keyboard: { readonly type: BooleanConstructor; readonly default: undefined; }; languageChooser: { readonly type: BooleanConstructor; readonly default: undefined; }; diceWar: { readonly type: BooleanConstructor; readonly default: undefined; }; }>, { roll: (roll: Roll) => boolean; }>, { storage: StorageLike | null | undefined; wide: boolean; sound: boolean; hold: boolean; placeholder: boolean; keyboard: boolean; diceWar: boolean; languageChooser: boolean; }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>

Examples

import { DiceRoller } from "@johnmorrisdotca/korokoro/vue";
console.log(DiceRoller.name);
DiceRoller

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/korokoro 1.16.0.