The p5-server
command-line tool, and the P5
Server Visual Studio Code extension, automatically include these
libraries when a sketch uses a function or p5 property that
they define. See automatic
library includes for more information.
Each library is listed with the symbols (functions, classes, and
variables), and the p5 properties, that it defines. A
JavaScript-only sketch that uses one of these symbols or
properties, and does not define it, causes the inclusion of the
library that defines that symbol.
This page is generated from the files in this directory.
The “Core” libraries from the official p5.js Libraries page.
This category includes only the p5.sound library. It
does not include the p5.accessibility library because, as
noted on that
library’s home page, it is obsolete.
p5.sound extends p5 with Web Audio functionality including audio input, playback, analysis and synthesis.
Defines:
createConvolverfreqToMidigetAudioContextgetOutputVolumeloadSoundmidiToFreqoutputVolumesampleRatesaveSoundsetBPMsoundFormatssoundOutuserStartAudiop5.Amplitudep5.AudioInp5.Convolverp5.Delayp5.Envelopep5.FFTp5.Filterp5.MonoSynthp5.Noisep5.Oscillatorp5.Partp5.Phrasep5.PolySynthp5.Pulsep5.Reverbp5.Scorep5.SoundFilep5.SoundLopp5.SoundRecorder“Community” libraries from the official p5.js Libraries page.
This category excludes a couple of libraries that could not be automatically included: .
p5.asciiart is a simple and easy to use image-to-ASCII art converter for p5js.
Defines:
AsciiArtA javascript library that enables communication between BLE devices and a p5 sketch.
Defines:
p5bleWith p5.bots you can interact with your Arduino (or other microprocessor) from within the browser. Use sensor data to drive a sketch; use a sketch to drive LEDs, motors, and more!
Defines:
p5.boardp5.serialEvent driven, easy-to-use button library.
Defines:
ClickableCMYK color space for p5.js
Defines:
CmykA collision detection library for 2D geometry in p5.js
Defines:
collideDebugcollidePointPointcollidePointCirclecollidePointEllipsecollidePointRectcollidePointLinecollidePointArccollideRectRectcollideCircleCirclecollideRectCirclecollideLineLinecollideLineCirclecollideLineRectcollidePointPolycollideCirclePolycollideRectPolycollideLinePolycollidePolyPolycollidePointTrianglecreateLoop provides a simple and structured library for creating animation loops in the browser.
Defines:
createloopp5.dimensions extends p5.js’ vector functions to work in any number of dimensions.
Defines:
nDistnDistSqnDotnLerpnAddnSubnMulnDivnSetMagnCrossnEqualnNormalizenMagnMagSqSimple 3D camera control with inertial pan, zoom, and rotate
Defines:
DwcreateEasyCamp5.RoverCamExtensive library for p5.js that adds additional event-listening functionality for creating canvas-based web applications
Defines:
uxRectuxSquareuxTriangleuxCircleuxEllipseuxFillColoruxnoFilluxStrokeuxNoStrokeuxStrokeWeightp5.func is a p5 extension that provides new objects and utilities for function generation in the time, frequency, and spatial domains
Defines:
imapwrapcreateArraynormalizeArrayresizeArraymultiplyArrayaddArraysubtractArraydivideArraymoduloArraysumArrayf2ibib2fsincbesselI0fplotp5.Genp5.Easep5.ArrayEvalp5.Filtp5.FastFourierTransformp5.geolocation provides techniques for acquiring, watching, calculating, and geofencing user locations for p5.js.
Defines:
geoCheckgetCurrentPositionwatchPositionclearWatchintervalCurrentPositionclearIntervalPoscalcGeoDistancegeoFenceCirclegeoFencePolygongrafica.js lets you add simple but highly configurable 2D plots to your p5.js sketches.
Defines:
GPlotp5.gui generates a graphical user interface for your p5.js sketches.
Defines:
createGuip5.localmessage provides a simple interface to send messages locally from one sketch to another for easy multi-window sketching
Defines:
registerServiceWorkersendMessagelistenMessageRaster to vector conversion, isosurfaces
Defines:
marchingSquaresMappa provides a set of tools for working with static maps, tile maps, and geo-data. Useful when building geolocation-based visual representations
Defines:
MappaA friendly machine learning library for the web.
Defines:
ml5p5.play provides sprites, animations, input and collision functions for games and gamelike applications
Defines:
createSpriteloadAnimationThe Particle and Fountain objects can be used to create data-driven effects that are defined through user structures or JSON input and user-draw functions
Defines:
ParticleFountainp5.Riso is a library for generating files suitable for Risograph printing. It helps turn your sketches into multi-color prints
Defines:
drawRisotools for generative natural language
Defines:
RiTaMake knobs you can rotate with custom graphics and return value ranges
Defines:
MakeKnobHelps you create sketches with multiple states / scenes
Defines:
SceneManagerp5js.screenPosition is a library that provides a function for getting the position of the mouse on the screen
Defines:
addScreenPositionFunctionDraw 2D primitives in a sketchy look
Defines:
Scribblep5.serial enables serial communication between devices that support serial (RS-232) and p5 sketches running in the browser
Defines:
p5.SerialPortShape5 is a library for creating and manipulating shapes in p5.js
Defines:
CircleSquareTrianglePolygonOvalRectangleSemicircleRhombusRightTriangleIsoscelesTriangleStripeA library built to add more simple shapes to the p5.js framework.
Defines:
tripenthexagonheptoctononaheartcenterdecatraprightTrip5.speech provides simple, clear access to the Web Speech and Speech Recognition APIs, allowing for the easy creation of sketches that can talk and listen
Defines:
p5.Speechp5.SpeechRecp5 extension for 2D static art using px, mm, cm or inches
Defines:
Add Tiled maps to p5.js.
Defines:
loadTiledMapAn easy-to-use touchscreen and mouse UI library for p5.js.
Defines:
createGuiVida is a simple library that adds camera (or video) based motion detection and blob tracking functionality to p5js
Defines:
Vidap5.voronoi is a library for creating Voronoi diagrams in p5.js
Defines:
voronoivoronoiGetDiagramA library for p5.js that allows coders to easily render p5.js sketches in AR/VR using WebXR
Defines:
createVRCanvasp5.3D is a library for creating 3D graphics 3D Text and Images in WebGL
Defines:
createWord3DcreatePicture3DcreateCanvas3DLibraries that are not specific to p5.js, but are particularly useful for p5 sketches.
Anime.js (/ˈæn.ə.meɪ/) is a lightweight JavaScript animation library with a simple, yet powerful API.
Defines:
animeA library to capture canvas-based animations at a fixed framerate
Defines:
CCapturedat.gui is a lightweight controller library for JavaScript. It provides a highly customizable user interface building block called dat.gui. It has no dependencies on other libraries. Use it to easily build powerful and flexible user interfaces.
Defines:
datLibraries that are not on the official p5.js Libraries page, but appear to be useful and well-maintained.
I’ve also included my own libraries from Oliver’s p5.js libraries.
Make it easier to use Graphics instances to make layers
Defines:
beginLayerA p5.js library for adding gradients and repeating patterns to your sketches
Defines:
createPatternfillPatternstrokePatternbackgroundPatterncreateLinearGradientcreateRadialGradientcreateConicGradientGradientfillGradientstrokeGradientbackgroundGradientA pattern drawing library for p5.js.
Defines:
arcPatterncirclePatternellipsePatternquadPatternrandPatternrectPatternsquarePatterntrianglePatternpatternAnglepatternColorsbeginContourPatternbeginShapePatternendShapePatternAdd rotateAbout() and scaleAbout()
functions to p5.js
Defines:
rotateAboutscaleAboutModify the p5.js functions to accept Vector arguments
Defines:
enableVectorArguments