Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skarab42/lw.canvas-filters
Canvas filters for LaserWeb
https://github.com/skarab42/lw.canvas-filters
Last synced: 15 days ago
JSON representation
Canvas filters for LaserWeb
- Host: GitHub
- URL: https://github.com/skarab42/lw.canvas-filters
- Owner: skarab42
- License: mit
- Created: 2016-12-16T17:30:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-23T14:47:00.000Z (almost 8 years ago)
- Last Synced: 2024-10-16T20:00:58.124Z (27 days ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# lw.canvas-filters
SVG path for [LaserWeb/CNCWeb](https://github.com/LaserWeb/LaserWeb4).## Installation
Using NPM
```
npm install lw.canvas-filters
```Using GIT
```
git clone https://github.com/lautr3k/lw.canvas-filters.git
cd canvas-filters
npm install
```Or download the last build from https://raw.githubusercontent.com/lautr3k/lw.canvas-filters/master/dist/lw.canvas-filters.js
```htmlvar path = CanvasFilter.canvasFilter();
```
## Settings
```javascript
let settings = {
smoothing : false, // Smoothing [true|fale]
brightness : 0, // Image brightness [-255 to +255]
contrast : 0, // Image contrast [-255 to +255]
gamma : 0, // Image gamma correction [0.01 to 7.99]
grayscale : 'none', // Graysale algorithm [average, luma, luma-601, luma-709, luma-240, desaturation, decomposition-[min|max], [red|green|blue]-chanel]
shadesOfGray: 256, // Number of shades of gray [2-256]
invertColor : false // Invert color...
}
```## Usages
```javascript
import canvasFilter from 'canvas-filters'canvasFilter(canvas, settings)
```