Skip to content

A set of duct taped libraries to expand p5.js for creative coding

License

Notifications You must be signed in to change notification settings

bcorporaal/Toko

Repository files navigation

Toko header

Toko: expanding p5.js with handy features

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.

Features

  • 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

Usage

There is no documentation yet, so see toko/source for details. Also, the examples folder includes sketches using various features.

Ideas (that may or may not get implemented in the future)

General

  • Add more post-processing options
  • Streamline ui settings

Grid

  • Add set functions to move / scale the grid
  • Add options to bias other than 0.5
  • remove / hide specific cells from the grid

Color

  • Add cosine palettes again
  • Define a core set of palettes across collections
  • Add duotone palettes

Contributing

Feedback and pull requests are welcome. Best ways to contribute:

Contact

If you have any questions or comments you can also contact me via email.

Credits

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.

License

Copyright (c) 2024 Bob Corporaal
Licensed under the MIT license.

About

A set of duct taped libraries to expand p5.js for creative coding

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages