p5

v1.11.0
[![npm version](https://badge.fury.io/js/p5.svg)](https://www.npmjs.com/package/p5)

npm version All Contributors Total Downloads

p5.js

Welcome! 👋👋🏿👋🏽👋🏻👋🏾👋🏼

p5.js is a free and open-source JavaScript library for accessible creative coding. It is a nurturing community, an approachable language, an exploratory tool, an accessible environment, an inclusive platform, welcoming and playful for artists, designers, educators, beginners, and anyone else!

function setup() {
  createCanvas(400, 400);
  background(255);
}

function draw() {
  circle(mouseX, mouseY, 80);
}

Get StartedReferenceTutorialsExamplesLibrariesForumDiscord

About

p5.js is built and organized to prioritize accessibility, inclusivity, community, and joy. Similar to sketching, p5.js has a full set of tools to draw. It also supports creating audio-visual, interactive, experimental, and generative works for the web. p5.js enables thinking of a web page as your sketch. p5.js is accessible in multiple languages and has an expansive documentation with visual examples. You can find tutorials on the p5.js website and start coding right now in the p5.js web editor. You can extend p5.js with many community-created libraries that bring different capabilities. Its community provides endless inspiration and support for creators.

p5.js encourages iterative and exploratory code for creative expression. Its friendly, diverse community shares art, code, and learning resources to help elevate all voices. We share our values in open source and access for all, to learn, create, imagine, design, share and code freely.

Community

The p5.js community shares an interest in exploring the creation of art and design with technology. We are a community of, and in solidarity with, people from every gender identity and expression, sexual orientation, race, ethnicity, language, neuro-type, size, disability, class, caste, religion, culture, subculture, immigration status, age, skill level, occupation, and background. We stand in solidarity with justice and liberation movements. We work to acknowledge, dismantle, and prevent barriers to access p5.js code and the p5.js community.

Learn more about our community and read our community statement and code of conduct. You can directly support our work with p5.js by donating to the Processing Foundation.

Issues

If you have found a bug in the p5.js library or want to request new features, feel free to file an issue! See our contributor guidelines for a full reference of our contribution process. A set of templates for reporting issues and requesting features are provided to assist you (and us!). Different parts of p5.js are in different repositories. You can open an issue on each of them through these links:

p5.jsp5.js website —- p5.js web editor

p5.js is maintained mostly by volunteers, so we thank you for your patience as we try to address your issues as soon as we can.

Get Started for Contributors

p5.js is a collaborative project with many contributors, mostly volunteers, and you are invited to help. All types of involvement are welcome. See the contribute for more in-depth details about contributing to different areas of the project, including code, bug fixes, documentation, discussion, and more.

A quick Getting Started with the Build and setting up the repository could be found here.

Stewards

Stewards are contributors who are particularly involved, familiar, or responsive to certain areas of the project. Their role is to help provide context and guidance to others working on p5.js. If you have a question about contributing to a particular area, you can tag the listed steward in an issue or pull request. They may also weigh in on feature requests and guide the overall direction of their area, with the input of the community. You can read more about the organization of the project in our p5.js Contributor Guidelines and p5.js Steward Guidelines.

Anyone interested can volunteer to be a steward! There are no specific requirements for expertise, just an interest in actively learning and participating. If you’re familiar with or interested in actively learning and participating in some of the p5.js areas below, please reply to this issue mentioning which area(s) you are interested in volunteering as a steward! 👋👋👋

p5.js was created by Lauren Lee McCarthy in 2013 as a new interpretation of Processing for the context of the web. Since then we have allowed ourselves space to deviate and grow, while drawing inspiration from Processing and our shared community. p5.js is sustained by a community of contributors, with support from the Processing Foundation. p5.js follows a rotating leadership model started in 2020, and Qianqian Ye has been leading p5.js since 2021. Learn more about the people behind p5.js.

Current Lead/Mentor

Lead/Mentor Alumni

Area Steward(s)
Overall @qianqianye
Accessibility @calebfoss, @cosmicbhejafry, @apoorva-a98, @tedkmburu, @Zarkv, @SkylerW99, @itsjoopark, @hannahvy, @nhasalajoshi
Color @paulaxisabel, @SoundaryaKoutharapu, @mrbrack, @TJ723, @Zarkv, @SkylerW99, @ramya202000, @hannahvy, @robin-haxx, @hiddenenigma
Core/Environment/Rendering @limzykenneth, @davepagurek, @ChihYungChang, @teragramgius, @tuminzee, @Zarkv, @robin-haxx, @Gaurav-1306
Data @angelabelle, @shahankhatch, @TanviKumar, @SkylerW99, @nhasalajoshi
DOM @SarveshLimaye, @SoundaryaKoutharapu, @ramya202000, @BamaCharanChhandogi, @Obi-Engine10, @MarceloGoncalves, @hiddenenigma
Events @limzykenneth, @richardegil, @angelabelle, @littlejacinthe, @TanviKumar, @tuminzee
Image @cgusb, @albertomancia, @ramya202000, @hannahvy, @robin-haxx
IO @limzykenneth, @Pritam1136, @shahankhatch, @TanviKumar, @jeanetteandrews
Math @limzykenneth, @ericnlchen, @ChihYungChang, @bsubbaraman, @albertomancia, @JazerUCSB, @tedkmburu, @perminder-17, @Obi-Engine10, @jeanetteandrews
Typography @dhowe, @paulaxisabel, @SarveshLimaye, @SkylerW99, @BamaCharanChhandogi, @Obi-Engine10, @hannahvy, @singshris, @hiddenenigma
Utilities @limzykenneth, @glopzel
WebGL @davepagurek, @aferriss, @aceslowman, @ShenpaiSharma, @ChihYungChang, @teragramgius, @JazerUCSB, @richardegil, @itsjoopark, @Gaurav-1306, @jeanetteandrews
Internalization @limzykenneth
Friendly Errors @richardegil, @itsjoopark, @hannahvy, @bisabi-01, @singshris
Contributor Docs @limzykenneth, @asukaminato0721, @SoundaryaKoutharapu, @richardegil, @hannahvy, @bayomayo
p5.sound @miguellacorte, @JazerUCSB, @angelabelle, @littlejacinthe, @hannahvy, @glopzel, @singshris, @jeanetteandrews
Build Process/Unit Testing @limzykenneth

Contributors

We recognize all types of contributions. This project follows the all-contributors specification and the Emoji Key ✨ for contribution types. Instructions to add yourself or add contribution emojis to your name are here. You can also post an issue or comment on a pull request with the text: @all-contributors please add @YOUR-USERNAME for THINGS (where THINGS is a comma-separated list of entries from the list of possible contribution types) and our nice bot will add you.

Lauren McCarthy
Lauren McCarthy

Jason Sigal
Jason Sigal

Karen
Karen

Evelyn Eastmond
Evelyn Eastmond

Daniel Shiffman
Daniel Shiffman

Casey Reas
Casey Reas

Ben Fry
Ben Fry

Kenneth Lim
Kenneth Lim

🐛 💻 📖
kate hollenbach
kate hollenbach

Stalgia Grigg
Stalgia Grigg

Jerel Johnson
Jerel Johnson

Saksham Saxena
Saksham Saxena

saber khan
saber khan

Daniel Howe
Daniel Howe

Kevin Siwoff
Kevin Siwoff

Atul Varma
Atul Varma

Jess Klein
Jess Klein

uno seis tres
uno seis tres

susan evans
susan evans

Saskia Freeke
Saskia Freeke

Phoenix Perry
Phoenix Perry

jesse cahn-thompson
jesse cahn-thompson

Lee T
Lee T

Chelly Jin
Chelly Jin

L05
L05

DIYgirls
DIYgirls

lam802
lam802

Maya Man
Maya Man

Tega Brain
Tega Brain

luisaph
luisaph

AlM Chng
AlM Chng

aarón montoya-moraga
aarón montoya-moraga

Cassie Tarakajian
Cassie Tarakajian

Niklas Peters
Niklas Peters

📖
Mathura MG
Mathura MG

Yining Shi
Yining Shi

Jen Kagan
Jen Kagan

Jiashan Wu
Jiashan Wu

Marc Abbey
Marc Abbey

K.Adam White
K.Adam White

Eden Cridge
Eden Cridge

💻 🐛 👀 ⚠️
Michael Hadley
Michael Hadley

Todd H. Page
Todd H. Page

Jared Sprague
Jared Sprague

💻 📖 💡 💵 ⚠️ 🐛
evelyn masso
evelyn masso

Blaize Kaye
Blaize Kaye

Sanchit Kapoor
Sanchit Kapoor

Oliver Wright
Oliver Wright

Matthew Kaney
Matthew Kaney

Spongman
Spongman

Claire K-V
Claire K-V

R. Luke DuBois
R. Luke DuBois

Kevin Barabash
Kevin Barabash

codeanticode
codeanticode

Bob Holt
Bob Holt

Sarah Groff Hennigh-Palermo
Sarah Groff Hennigh-Palermo

Jordan Shaw
Jordan Shaw

brightredchilli
brightredchilli

Derek J. Kinsman
Derek J. Kinsman

harkirat singh
harkirat singh

GoToLoop
GoToLoop

Max Goldstein
Max Goldstein

XY Feng
XY Feng

Sparsh Paliwal
Sparsh Paliwal

Austin Cawley-Edwards
Austin Cawley-Edwards

📖 💡
taseenb
taseenb

Yannick Assogba
Yannick Assogba

John Pasquarello
John Pasquarello

💻
Kevin Workman
Kevin Workman

📖
gauini
gauini

David Wicks
David Wicks

Guillermo Montecinos
Guillermo Montecinos

Shawn Van Every
Shawn Van Every

Sinan Ascioglu
Sinan Ascioglu

Abe Pazos
Abe Pazos

Char
Char

Gene Kogan
Gene Kogan

Jason Mandel
Jason Mandel

Mark Russo
Mark Russo

Jonathan Dahan
Jonathan Dahan

Darius Morawiec
Darius Morawiec

Darby Rathbone
Darby Rathbone

hrishit
hrishit

Chiun Hau You
Chiun Hau You

Francesco Bigiarini
Francesco Bigiarini

Fabian Morón Zirfas
Fabian Morón Zirfas

Mike Anderson
Mike Anderson

Mikael Lindqvist
Mikael Lindqvist

Chris
Chris

Max Segal
Max Segal

Tyler Stefanich
Tyler Stefanich

Dave
Dave

Xavier Snelgrove
Xavier Snelgrove

Gareth Battensby
Gareth Battensby

Taeyoon Choi
Taeyoon Choi

AKASH RAJ
AKASH RAJ

Kevin Ho
Kevin Ho

Harsh Agrawal
Harsh Agrawal

Luca Damasco
Luca Damasco

Sam Lavigne
Sam Lavigne

Epic Jefferson
Epic Jefferson

Caroline Record
Caroline Record

Christine de Carteret
Christine de Carteret

Chris Hallberg
Chris Hallberg

David Newbury
David Newbury

piinthecloud
piinthecloud

Paolo Pedercini
Paolo Pedercini

Jason Alderman
Jason Alderman

Jennifer Jacobs
Jennifer Jacobs

Sepand Ansari
Sepand Ansari

Val Head
Val Head

Emily Chen
Emily Chen

Ben Moren
Ben Moren

Rune Skjoldborg Madsen
Rune Skjoldborg Madsen

Scott Murray
Scott Murray

Scott Garner
Scott Garner

b2renger
b2renger

Craig Pickard
Craig Pickard

mxchelle
mxchelle

Zach Rispoli
Zach Rispoli

Liu Chang
Liu Chang

Cristóbal Valenzuela
Cristóbal Valenzuela

Miles Peyton
Miles Peyton

Golan Levin
Golan Levin

feedzh
feedzh

Shahriar Rahman Rubayet
Shahriar Rahman Rubayet

Chiciuc Nicușor
Chiciuc Nicușor

Ken Miller
Ken Miller

Chandler McWilliams
Chandler McWilliams

Jaymz Rhime
Jaymz Rhime

Niels Joubert
Niels Joubert

Utkarsh Tiwari
Utkarsh Tiwari

Arihant Parsoya
Arihant Parsoya

Brad Buchanan
Brad Buchanan

Johan Karlsson
Johan Karlsson

Andy Timmons
Andy Timmons

zacharystenger
zacharystenger

Brian Boucheron
Brian Boucheron

sortasleepy
sortasleepy

Kyle McDonald
Kyle McDonald

Antonio Jesús Sánchez Padial
Antonio Jesús Sánchez Padial

💻
Brad Smith
Brad Smith

Vítor Galvão
Vítor Galvão

Devon Rifkin
Devon Rifkin

Emily Xie
Emily Xie

Boris Bucha
Boris Bucha

Petr Brzek
Petr Brzek

Ramin
Ramin

Arsenije Savic
Arsenije Savic

Luke Burgess-Yeo
Luke Burgess-Yeo

Sun Lifei
Sun Lifei

naoyashiga
naoyashiga

Jimish Fotariya
Jimish Fotariya

Jorge Moreno
Jorge Moreno

🐛 💻 📖
Steven Green
Steven Green

Marcus Parsons
Marcus Parsons

Nick Yahnke
Nick Yahnke

Anthony Su
Anthony Su

kroko / Reinis Adovičs
kroko / Reinis Adovičs

Robyn Overstreet
Robyn Overstreet

Ben Hinchley
Ben Hinchley

Max Kolyanov
Max Kolyanov

Zeno Zeng
Zeno Zeng

Seth
Seth

plural
plural

Lionel Ringenbach
Lionel Ringenbach

Harshil Goel
Harshil Goel

Joshua Storm Becker
Joshua Storm Becker

maxdevjs
maxdevjs

trych
trych

Alejandra Trejo
Alejandra Trejo

Prashant Gupta
Prashant Gupta

Kai-han Chang
Kai-han Chang

kjav
kjav

maddy
maddy

Christopher Coleman
Christopher Coleman

Boaz
Boaz

Yasai
Yasai

📝
Jay Gupta
Jay Gupta

Nitish Bansal
Nitish Bansal

Caroline Hermans
Caroline Hermans

💡 📖
Faith Wuyue Yu
Faith Wuyue Yu

Aatish Bhatia
Aatish Bhatia

📖 🐛
Mislav Milicevic
Mislav Milicevic

💻 🐛
Yuting Lu
Yuting Lu

📖
Adil Rabbani
Adil Rabbani

💻 🐛 💡
Pierre Krafft
Pierre Krafft

🐛 💻 📖 💡 👀 ⚠️ 🔧
Zoë Ingram
Zoë Ingram

npm i p5

Metadata

Downloads