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