This is a collection of utils I use with P5.js to make some of my sketches easier to work with.
It includes tools to work with:
- Grids
- Perceptually uniform colors
- LSystems
- Turtle Graphics
- Ui Menus
- Oscillators
Download the latest file utils.dave.p5.js or utils.dave.p5.min.js from the repository
In your index.html add library JS to your header, AFTER the p5.js library
<script src="p5.min.js"></script>
<script src="utils.dave.p5.min.js"></script>This makes the classes in utils available to use in your sketch.js
if you prefer you can pull the library from a CDN with
<script src="https://cdn.jsdelivr.net/gh/sixhat/utils.dave.p5.js@master/lib/utils.dave.p5.min.js"></script>The code has inline code, but you can also check the documentation online.
This is a work in progress and still far from concluded (or fully documented).
In any case if you find it useful and want to contribute please create a pull-request and I'll gladly add new features/corrections to it.
JSDoc should be installed in your system. Something like
npm install -g jsdoc
or
brew install jsdoc3should do the trick
Minify is needed to make the JS lib small(ish).
brew install tdewolff/tap/minifyPrettier for making both html and js ... well, that.
npm intall -g prettier
should do the trik.