1.1.1 • Published 3 years ago

checkerboardjs v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

1.1.0

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago