SOLID_DIE_SIDES定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How many sides a die has (what its name on a die is: d6). Only a solid in SOLID_DICE has one.
インポート
import { SOLID_DIE_SIDES } from "@johnmorrisdotca/meikyuu/3d";
ほかのエクスポート元: @johnmorrisdotca/meikyuu/3d/levels/all
定義
const SOLID_DIE_SIDES: Readonly<Record<"cube" | "tetrahedron" | "octahedron" | "icosahedron" | "prism" | "trapezohedron" | "dodecahedron" | "rhombic-dodecahedron" | "bipyramid" | "icositetrahedron" | "triacontahedron", number>> = {
prism: 3,
tetrahedron: 4,
cube: 6,
octahedron: 8,
trapezohedron: 10,
dodecahedron: 12,
"rhombic-dodecahedron": 12,
bipyramid: 16,
icosahedron: 20,
icositetrahedron: 24,
triacontahedron: 30,
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
cube | number | |
tetrahedron | number | |
octahedron | number | |
icosahedron | number | |
prism | number | |
trapezohedron | number | |
dodecahedron | number | |
rhombic-dodecahedron | number | |
bipyramid | number | |
icositetrahedron | number | |
triacontahedron | number |
例
import { SOLID_DIE_SIDES } from "@johnmorrisdotca/meikyuu/3d";
console.log(SOLID_DIE_SIDES);{
prism: 3,
tetrahedron: 4,
cube: 6,
octahedron: 8,
trapezohedron: 10,
dodecahedron: 12,
'rhombic-dodecahedron': 12,
bipyramid: 16,
icosahedron: 20,
icositetrahedron: 24,
triacontahedron: 30
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。