CARD_SOUND_DATA定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The card sounds, recorded: cards dealt, turned over, played, shuffled,
gathered and fanned, as base64 AAC (.m4a). From Kenney's Casino Audio
pack, CC0; see docs/credits.md. Written by scripts/sounds.mjs from the files
in ./sounds, never by hand. createCardSounds loads this module only when
a sound is first played, so a page that stays silent never downloads it.
インポート
import { CARD_SOUND_DATA } from "@johnmorrisdotca/toranpu/sounds";
定義
const CARD_SOUND_DATA: Readonly<Record<CardSoundFile, string>>
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
deal-1 | string | |
deal-2 | string | |
deal-3 | string | |
deal-4 | string | |
fan-1 | string | |
flip-1 | string | |
flip-2 | string | |
gather-1 | string | |
gather-2 | string | |
play-1 | string | |
play-2 | string | |
play-3 | string | |
shuffle-1 | string |
例
import { CARD_SOUND_DATA } from "@johnmorrisdotca/toranpu/sounds";
console.log(Object.keys(CARD_SOUND_DATA));[
'deal-1', 'deal-2',
'deal-3', 'deal-4',
'fan-1', 'flip-1',
'flip-2', 'gather-1',
'gather-2', 'play-1',
'play-2', 'play-3',
'shuffle-1'
]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。