BOARD_SIZES定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The sizes of a board: a TV's 1920 by 1080, a tablet on its side (1280 by 800) and upright (800 by 1280), a phone's 600 by 1300, and the social-card shapes, square (1080) and 4:5 (1080 by 1350).
インポート
import { BOARD_SIZES } from "@johnmorrisdotca/taisen-brackets";
定義
const BOARD_SIZES: Readonly<Record<BoardSizeName, { width: number; height: number; }>> = Object.freeze({
tv: { width: 1920, height: 1080 },
tablet: { width: 1280, height: 800 },
"tablet-tall": { width: 800, height: 1280 },
phone: { width: 600, height: 1300 },
square: { width: 1080, height: 1080 },
portrait: { width: 1080, height: 1350 },
})
例
import { BOARD_SIZES } from "@johnmorrisdotca/taisen-brackets";
console.log(Object.keys(BOARD_SIZES), BOARD_SIZES.tv);[ 'tv', 'tablet', 'tablet-tall', 'phone', 'square', 'portrait' ] { width: 1920, height: 1080 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。