https://github.com/derektmueller/purescript-p5
p5.js bindings for PureScript
https://github.com/derektmueller/purescript-p5
generative-art p5 p5js processing purescript purescript-p5
Last synced: 2 months ago
JSON representation
p5.js bindings for PureScript
- Host: GitHub
- URL: https://github.com/derektmueller/purescript-p5
- Owner: derektmueller
- License: mit
- Created: 2018-10-29T02:30:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-13T22:54:09.000Z (over 3 years ago)
- Last Synced: 2026-03-10T19:58:06.560Z (3 months ago)
- Topics: generative-art, p5, p5js, processing, purescript, purescript-p5
- Language: PureScript
- Size: 4.89 MB
- Stars: 19
- Watchers: 1
- Forks: 4
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# purescript-p5
p5.js bindings for PureScript
*Disclaimer: This project has just been started and the API is still very unstable.*
## Documentation
Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-p5).
purescript-p5 implements a subset of the p5.js API (see [Project Status](#project-status)).
## Installation
```
bower install purescript-p5
```
This library depends on p5.js. This dependency may be satisfied by installing the NPM [p5.js package](https://www.npmjs.com/package/p5).
```
npm install p5 --save
```
## Running the examples
The examples use the webpack DLLPlugin to improve build performance. To run the examples, first build the dll bundle with:
```
npm run webpack:dll
```
This creates a separate webpack bundle for dependencies so that they don't need to be regenerated each time the app is changed.
To start webpack dev server, run:
```
npm run webpack:server
```
With webpack dev server running, examples can be viewed in a browser by visiting ```localhost:4008/examples/path-to-example```.
## Project Status
Completed:
* wrappers for most methods defined on the p5 class
TODO:
* generate methods for classes other than p5 (e.g. p5.Vector, p5.Image)
* create easier-to-use interfaces for functions with numeric suffixes
* use Reader monad to implicitly pass the p5 argument
## References
Many of the examples are based on the p5.js examples on the [p5.js reference site](https://p5js.org/examples/), and are licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).