Create art with q5.js! ðŸŽĻ

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. ðŸĄ

Blazing fast! 🚀

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. 🎉

Start coding! ðŸ’ŧ

No installation required! Use an online code editor with one of these q5.js template projects: OpenProcessing, Aijs, or CodePen. 🖌ïļ

Join our community ðŸĪ

The future of creative coding is here! Join us on the q5 community Discord. 🙋

Local development 🛠ïļ

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>

Support q5 💙

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.

Dynamic 🐙

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);

Sound On 🔊

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. 🎚ïļ

Lightweight ðŸŠķ

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. ðŸ“Ķ

Frame your Art 🖞ïļ

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. ðŸ‘ū

Credits 🌟

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.