Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thibauts/set-canvas-pixels
Sets a canvas pixels from an array of RGBA pixel values
https://github.com/thibauts/set-canvas-pixels
Last synced: 21 days ago
JSON representation
Sets a canvas pixels from an array of RGBA pixel values
- Host: GitHub
- URL: https://github.com/thibauts/set-canvas-pixels
- Owner: thibauts
- License: mit
- Created: 2015-09-26T19:02:23.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-26T19:02:45.000Z (about 9 years ago)
- Last Synced: 2024-11-21T21:02:53.573Z (about 1 month ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
set-canvas-pixels
=================
### Sets a canvas pixels from an array of RGBA pixel valuesSets the pixels of a canvas from an array of RGBA values between 0 and 255.
Install
-------```bash
$ npm install set-canvas-pixels
```Usage
-----```javascript
var setCanvasPixels = require('set-canvas-pixels');var pixels = [0, 0, 0, 255, 255, 255, 255, 255/*, ...*/];
var canvas = document.getElementById('canvas');
setCanvasPixels(canvas, pixels);
```