mountKumimoji関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A GAME OF KUMIMOJI ALONE, IN PLAIN DOM: the bag dealt from a seed, your hand, and a table to build your crossword on, every run judged as you lay it. Tap a tile in your hand and then a square to lay it; tap a tile on the table and then a square to move it, or tap it again to take it back. When the hand is empty and every run is a word, Draw brings the next tile; a tile you cannot use can be traded for three. Use every tile in the bag to finish. Under the buttons, the game saves as JSON or as text, and a saved game loads back.
The word list is fetched the first time a game in its language is dealt.
インポート
import { mountKumimoji } from "@johnmorrisdotca/kumimoji/ui";
定義
function mountKumimoji(target: HTMLElement, options?: KumimojiTableOptions): KumimojiTableHandle
引数
| 名前 | 型 | 説明 |
|---|---|---|
target | HTMLElement | The host element for this table. |
options (省略可) | KumimojiTableOptions | Initial deal or saved state, presentation and callbacks. |
戻り値
KumimojiTableHandle
The native handle, including ready and presentation updates without redealing.
例
import { mountKumimoji } from "@johnmorrisdotca/kumimoji/ui";
if (typeof document !== "undefined") {
const table = mountKumimoji(document.createElement("div"), { keep: false });
void table.ready.then(() => table.destroy());
}
console.log(typeof mountKumimoji);function出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。