q5.js is a sequel to the p5.js and Processing Java graphics libraries. âïļ
If you're already familiar with p5, you'll find yourself right at home with q5. ðĄ
Draw up to 32x more per frame with q5 WebGPU, compared to the limits of p5. Or save battery by getting the same results with less power consumption. ðą
Switching from p5 to q5 is like getting a free computer upgrade. ð
No installation required! Use an online code editor with one of these q5.js template projects: OpenProcessing, Aijs, or CodePen. ðïļ
The future of creative coding is here! Join us on the q5 community Discord. ð
You can use q5 offline or add this to your HTML file to always load the latest version.
<script src="https://q5js.org/q5.js"></script>
q5 is open source and anyone can use it for free under the terms of the LGPL (just like p5.js). ð
We need your support though! If you enjoy using q5.js, please donate via GitHub Sponsors or Patreon.
Q5 instances can be created manually, which makes the setup
function optional. Use q5 functions anywhere with top-level global mode! ð
new Q5();
createCanvas(400, 400);
p5.sound is a great library, but typical use doesn't require its extensive sound generation and filtering features. ðïļ
q5.js includes sound loading, playback, and basic mixing by default. ðïļ
p5.js and p5.sound.js have a combined size of 5.6MB! â ïļ
q5.js is ~140kb, that's 98% smaller. ðģ
For extremely lightweight use, load only the features you need from the q5 source folder. Load q5 using script tags or as JavaScript modules. ðĶ
The displayMode
function lets you frame your art within the browser window, no CSS skills required! ð―ïļ
Make a canvas be centered or fill the screen without clipping or changing the aspect ratio. Use the "pixelated" rendering preset to make pixel art. ðū
This project aims to continue the legacy of the incredible work done by Ben Fry and Casey Reas on Java Processing, Lauren McCarthy's work on p5.js, and all contributors to these projects.
The original q5xjs (v0) was created by @LingDong~ and released under the public domain Unlicense license. We forked and significantly extended the abandoned codebase.
q5.js v2 is open source under the LGPLv3, created and actively maintained by the q5 team: @quinton-ashley and @Tezumie.