1.1.1 • Published 4 years ago

checkerboardjs v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Checkerboard.js

Easily draw transparency pattern on canvas when flattenning images

Dependency-free, 1.7kB gzipped. Idk if it's large it literally has 40 lines unpacked, and 1024 chars in total packed, if u really care about each byte, stop using javascript and canvas bro

Installation

$ npm i checkerboardjs

Usage

drawPattern(canvas<HTMLCanvasElement>, ?options<Object>)

Options

PropertyTypeDefaultDescription
centeredboolfalseDraws pattern from center instead of left top corner
ignoreWarningsboolfalseIgnores any errors and warnings
primaryColorstring#EDEDEDCSS color of even cells
secondaryColorstring#C6C6C6CSS color of odd cells
sizenumber10Size of cell in pixels

Example

import drawPattern from 'checkerboardjs'

const canvas = document.querySelector('canvas')
drawPattern(canvas)

Contributing, license, issues

blah blah blah go find something better to do and don't bother me

1.1.1

4 years ago

1.1.0

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago