p5.fab documentation main page

Welcome to the p5.fab Docs!

What is p5.fab? #

p5.fab is a Javscript library to control digital fabrication machines. It’s made for creative coders and makers across skill levels to make physical things using code. At it’s core, p5.fab lets you write Javascript code to control machines; it also supports interactive control of machines during execution and documentation of material output. You can use p5.fab to:

  • make generative artifacts;
  • explore and tune machine settings;
  • quickly iterate on designs without reverting to CAD/CAM software;
  • learn about how your machine works;
  • experiment with new materials;
  • develop interactive fabrication workflows;
  • and whatever else you can think of!

p5.fab is developed as a library for p5.js. This site provides resources to use p5.fab, including a gentle introduction to both creative coding and digital fabrication.

Required Materials #

While you can get started with p5.fab without a machine, it is designed to be used to explore material behaviour. Currently, the library supports 3D printers running Marlin firmware and has been tested on the following machines: Ender3 v2, Prusa i3-mk3, Potterbot 9, and FLSUN Q9. Development for other machines including CNCs and plotters are ongoing. If this doesn’t mean much to you–or you want more information–see the machine compatibility page.

Getting Started #

  • To set up p5.fab in a matter of minutes, check out Quickstart Guide to learn how to use the online editor.
  • Head to the resources section for more in-depth guides to p5.fab including examples and introductions to creative coding and digital fabrication.
  • A list of p5.fab functions can be found in the reference.
  • The source code can be found on github; feel free to ask questions and make suggestions/contributions there!