本文へ移動

Korokoroコロコロ

ダイスを組み合わせて振り、ダイス表記を読み取り、正確な確率を調べます。履歴の保存やシードを指定した再現もできます。

「コロコロ」は、小さなものが転がる様子を表す言葉です。 名前について(英語)

目次

リファレンス · Vueコンポーネント

DiceRoller定数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The tray as a Vue component:

<DiceRoller notation="2d20kh1+5" wide

インポート

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

定義

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>

例

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/korokoro 1.16.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。