https://github.com/randomgamingdev/pixyp5js
Pixy from Wireframe, but for p5js
https://github.com/randomgamingdev/pixyp5js
javascript javascript-library library nice p5 p5js pixel pixel-art pixels retro simple
Last synced: 9 months ago
JSON representation
Pixy from Wireframe, but for p5js
- Host: GitHub
- URL: https://github.com/randomgamingdev/pixyp5js
- Owner: RandomGamingDev
- License: mit
- Created: 2022-11-15T22:44:11.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-18T17:36:07.000Z (over 1 year ago)
- Last Synced: 2024-04-18T19:01:46.161Z (over 1 year ago)
- Topics: javascript, javascript-library, library, nice, p5, p5js, pixel, pixel-art, pixels, retro, simple
- Language: JavaScript
- Homepage:
- Size: 202 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pixyp5js
Pixy (Credit to Nyaaborn for the name, you can find his github here: https://github.com/Nyaaboron) from Wireframe, but for p5js
Pixyp5js is a version of [Pixy](https://github.com/RandomGamingDev/Wireframe/blob/main/Extensions/Pixy.h) (which is for the [Wireframe](https://github.com/RandomGamingDev/Wireframe)), but for p5js!
A library for easily more easily dealing with pixels in images during runtime

There's an example for how to use the library in https://github.com/RandomGamingDev/Pixyp5js/tree/main/example with its result visible [here](https://randomgamingdev.github.io/Pixyp5js/example/)
To use the library simply create a new instance of the pixy class with the offset, size and resolution (they're all arrays with 2 elements) and then just change the Pixy.pixels array via Pixy.setPixel(), update the pixel buffer via Pixy.updatePixels() and execute Pixy.display() in order to display (if you need to do something that involves shader simply activate the shader before calling Pixy.shaderDisp() with the shader as the first parameter (this is since p5.js doesn't currently support shader overloading for the image function))!
To use it you can simply include https://cdn.jsdelivr.net/gh/RandomGamingDev/Pixyp5js/pixy.js in your HTML file! If you want to you can also just download the file and include it in your HTML file that way.
btw stuff updates so remember to specify a version/commit for your library if you want to use a link and don't want your code to automatically update to the newest version of the library