Toko is a framework to enhance p5.js for creative coding with Tweakpane, chroma.js, random number generation, color palettes, grids, and more. Very much a work in progress.
For examples of generative art created with Toko see Late Night Noodles on Instagram.
Note
This framework continues to evolve. Be prepared for breaking changes in every update.
- Easy capturing options for images and video using p5.capture
- Create and save SVG images
- Switching between canvas sizes
- Larger canvas sizes are scaled to fit on the screen
- Tweakpane integration to easily change sketch parameters
- Large collection of color palettes
- Easy selection and usage of (custom) color palettes
- Saving and loading (through drag and drop on the canvas) of sketch parameters
- Seeded random number generator class to create random but repeatable results
- Addition noise and random functions like OpenSimplex and Poisson-Disk distributions
- Grid generation and modification
There is no documentation yet, so see toko/source
for details. Also, the examples folder includes sketches using various features.
- Add more post-processing options
- Streamline ui settings
- Add set functions to move / scale the grid
- Add options to bias other than 0.5
- remove / hide specific cells from the grid
- Add cosine palettes again
- Define a core set of palettes across collections
- Add duotone palettes
Feedback and pull requests are welcome. Best ways to contribute:
- Star it on GitHub - if you use it and like it please star it
- Open issues or tickets
- Submit fixes or improvements with Pull Requests
If you have any questions or comments you can also contact me via email.
Many thanks to all the creator whose code or work is in some way of influence to Toko.
Toko includes code from the following:
Chromotome color palettes by Kjetil Midtgarden Golid. MIT License.
D3 color palettes by Mike Bostock and others. ISC License.
Lospec color palettes by various contributers. Unknown license.
SimplexNoiseJS by Mark Spronck for OpenSimplex Noise. Unlicense.
Quadtree by Daniel Shiffman / Coding Train for quadtree. MIT License.
Toko makes use of the following:
Tweakpane by Hiroki Kokubun for controls. MIT License.
p5.capture by tapioca24 for video capture. MIT License.
Chroma.js by Gregor Aisch for color manipulations. Apache License.
Spectral.js by Roland van Wijnen for color mixing. MIT License.
p5.js-svg by Zeno Zeng for SVG support. MIT License.
Copyright (c) 2024 Bob Corporaal
Licensed under the MIT license.