Pure Go/Weiqi/Baduk UI library, independent of any specific UI libraries such as React, Vue, etc.
- Board operation
- Load SGF
- from a raw text
- from a file
- Symbol such as circle, triangle, etc.
- Multiple path
- Board size
- 9, 13, 19
- Square of any size
- Rectangle of any size
- Keyboard operation
- Mouse wheel operation
- @sabaki/go-board (installed automatically)
- @sabaki/immutable-gametree (installed automatically)
- @sabaki/sgf (installed automatically)
npm install kaya<script>
import Kaya from "kaya";
const el = document.getElementById("board");
if (el) {
const kaya = new Kaya(el, {
sgfText: "(;GM[1]FF[4]SZ[9];B[aa];W[ba];B[bb];W[ab];B[];W[])",
});
window.kaya = kaya;
}
</script>element: HTMLElement: create a go board UI into the elementoptions: KayaOptions: set up the board
sgfText?: string: specify SGF textenableKeyboard?: boolean: enable keyboard operation [default: true]enableWheel?: boolean: enable wheel operation [default: true]
Simulate the state of the game.
steps: number: if positive forward the state of the game to specified number, if negative rewind the state of the game to specified number
- Hiroki Takizawa
Kaya is under MIT license.