Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tristancacqueray/weiqi-visualizer

weiqi board visualizer
https://github.com/tristancacqueray/weiqi-visualizer

threejs webgl weiqi

Last synced: 2 months ago
JSON representation

weiqi board visualizer

Awesome Lists containing this project

README

        

# weiqi-visualizer

[![npm](https://img.shields.io/npm/v/weiqi-visualizer)](https://www.npmjs.com/package/weiqi-visualizer)

A [weiqi](https://en.wikipedia.org/wiki/Go_(game)) board visualizer.

[](https://tristancacqueray.github.io/weiqi-visualizer/)

Available controls:

- Click to start playing.
- Play step by step with the < and > button.
- Change the playback speed with wheel.

## Usage

Render a SGF file using:

```html



```

Available properties:

- href: *url*, SGF location, or use `sgf` to set the content manually
- move: *number*, Load a given position
- autoplay: *bool*, Start playing
- speed: *float*, Playback speed
- sgf: *text*, The game file content

Usage example:

```html


```

CSS default variable available:

```css
/* Black stone colors */
var(--wv-color-black, #765aff);
/* White stone colors */
var(--wv-color-white, #e32881);
/* Hoshi colors */
var(--wv-color-hoshi, #ffa331);
/* Grid lines colors */
var(--wv-color-grid, #333333);

/* The main background */
var(--wv-color-bg, #111);
/* UI backdrop */
var(--wv-color-bg2, #222);
/* UI color */
var(--wv-color-fg, #ddd);
/* UI button colors */
var(--wv-color-btn, #666);
var(--wv-color-btn-over, #888);
```

See the [index.html](./src/index.html) for a full demo.