# butter.js

> pixel sorting for

Latest version **0.1.0** (published 2014-10-21) · 0 weekly downloads

## Install

```sh
npm install butter.js
pnpm add butter.js
yarn add butter.js
bun add butter.js
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-10-21 |
| First published | 2014-10-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Matthew Brandly |
| Maintainers | brandly |

## Links

- npm: https://www.npmjs.com/package/butter.js
- npm.io page: https://npm.io/package/butter.js

## Recent versions

- 0.1.0 (latest) — 2014-10-21

## README

![Butter.js](http://i.imgur.com/Nzg0p74.png)

pixel sorting for canvas

## general idea

Take a canvas. Define a filter for which pixels get sorted and which don't. Rows and columns of pixels that pass that filter will be sorted based on their color value.

## basic use

```js
var canvas = document.getElementById('my-canvas');
var butter = new Butter();
butter.sort(canvas);
```

For convenience, you can sort multiple times in quick succession
```js
butter.sort(canvas, 3);
```

By default, the mode is set to `black`, but you could also set it to `bright` or `white`.
```js
var butter = new Butter({mode: 'bright'});
```

You can also change the threshold for the current mode using `butter.setThreshold(newThreshold)`

## development

```shell
$ npm install
$ gulp
```

---
_Source: https://npm.io/package/butter.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
