Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/evaristocuesta/pict2pix

Pict2Pix.js is a creative coding library to apply fancy pixel animations to images.
https://github.com/evaristocuesta/pict2pix

code-art creative-coding creativecodeart creativecoding effects generative-art image-effects image-manipulation javascript javascript-library web

Last synced: 18 days ago
JSON representation

Pict2Pix.js is a creative coding library to apply fancy pixel animations to images.

Awesome Lists containing this project

README

        

# Pict2Pix.js
[![Last release](https://img.shields.io/github/v/release/evaristocuesta/pict2pix?label=last%20release)](https://github.com/evaristocuesta/Pict2Pix/releases) [![Languages](https://img.shields.io/github/languages/top/evaristocuesta/Pict2Pix)](https://github.com/evaristocuesta/Pict2Pix/) [![License](https://img.shields.io/github/license/evaristocuesta/Pict2Pix)](https://raw.githubusercontent.com/evaristocuesta/Pict2Pix/master/LICENSE) [![Author](https://img.shields.io/badge/author-Evaristo%20Cuesta-blue)](https://www.evaristocuesta.com/)

Pict2Pix.js is a creative coding library to apply fancy pixel animations to images.

![Screenshot example](./resources/pict2pix.gif)

# Get started with Pict2Pix

## Setting up a basic skeleton
To get started with Pict2Pix.js library, follow the next steps:
- Include the prict2pix.min.js file.
```html

```
- Place an image inside a container because the library will replace the image by a canvas.
```html




```
- Get the image element and call to pict2pix.animate function.
```javascript
const image = document.getElementById('image-jh');
window.onload = function initialize() {
pict2pix.animate({
image: image,
numberOfParticles: 800,
horizontalSpeed: 1,
verticalSpeed: -1,
particleType: 'twisted-particle'
});
}
```

## Full basic skeleton code

### HTML

```html




Document





```

### JavaScript
```javascript
const image = document.getElementById('image-jh');
window.onload = function initialize() {
pict2pix.animate({
image: image,
numberOfParticles: 800,
horizontalSpeed: 1,
verticalSpeed: -1,
particleType: 'twisted-particle'
});
}
```

Take a look at https://evaristocuesta.github.io/pict2pix/ for more examples code.

## Contributors
- [Evaristo Cuesta](https://evaristocuesta.com)
- [Frank Laboratory](https://www.youtube.com/c/Frankslaboratory/)