本文へ移動

Toranpuトランプ

デッキを使い、11種類のゲームでコンピューターと対戦し、ソリティアを解いたり、独自の絵柄でカードを表示したりできます。

「トランプ」は、日本語で playing cards を指す言葉です。 名前について(英語)

目次

リファレンス · 録音された音

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-1string
deal-2string
deal-3string
deal-4string
fan-1string
flip-1string
flip-2string
gather-1string
gather-2string
play-1string
play-2string
play-3string
shuffle-1string

例

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'
]

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

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

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