fp-panel
v0.1.2
Published
library for fp-block
Downloads
476
Readme
fp-panel 
library for fp-block
Installation
$ npm install --save fp-panelUsage
const p = require("fp-panel");These games use fp-panel.
How it works
A panel is a 2D grid of items. Each item has a color — 'grey' means blank, any other color means filled.
createPanel(5, 6) paint(panel, positions, 'pink')
. . . . . . . . . . . .
. . . . . . . ■ . . . .
. . . . . . → . ■ ■ . . .
. . . . . . . ■ . . . .
. . . . . . . . . . . .Panels can be moved and rotated:
left(panel) rotate(panel)
. . . . . . . . . . . .
■ . . . . . . . ■ . . .
■ ■ . . . . → . ■ ■ ■ . .
■ . . . . . . . ■ . . .
. . . . . . . . . . . .Multiple panels can be combined:
panelA panelB overlap(A, B)
■ ■ . . . . ■ ■ .
■ . . + . . ■ = ■ . ■
. . . . ■ ■ . ■ ■API
Refer to DOCUMENTATION.md for the full API reference.
License
MIT © Bob Hwang
