Fira v0.1.0

A library for creating and updating Santorini boards. Source code available here.

Installation

For this early version, installation is manual. Download Fira from the source and import or load it:

import Fira from "./dist/fira.js";

Usage

To create a new board, Fira needs an element ID, a function for when a square is tapped, and whether the board should be tappable.

const onTap = (sq, r, c) => { console.log(`Tapped square ${sq} on row ${r} column ${c}.`) };

const element = document.getElementById("fira");
const board = Fira({ element, onTap, playable: true });

Full documentation is coming soon. For now I recommend exploring the functions exposed by Fira or visiting the example page.

Example

See here for example