npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

q5

v2.9.24

Published

A sequel to p5.js that's optimized for interactive art

Downloads

1,434

Readme

q5.js is a spiritual successor to the p5.js and Processing Java graphics libraries.

The q5 team aims to make creative coding even more fun and accessible for a new generation of artists, designers, educators, and beginners!

If you're already familiar with p5, you'll find yourself right at home with q5. It's also compatible with popular addons, including p5.sound and p5play.

No Installation Required

Try out the q5.js template sketch for the Aijs online code editor.

Use q5.js in your own project by adding this line to your HTML file:

<script src="https://q5js.org/q5.js"></script>

q5 is also available on npm!

npm install q5

Using p5 Addon Libraries

q5 is compatible with popular p5 addons and projects that use p5, such as p5play, because it aliases Q5 to p5.

To use addons, simply load them after q5.js:

<script src="https://q5js.org/q5.js"></script>
<!-- load p5 addons after q5 -->
<script src="https://p5play.org/v3/planck.min.js"></script>
<script src="https://p5play.org/v3/p5play.js"></script>

Documentation

Browse the q5 reference pages to learn how to use q5.js.

See the wiki for extended documentation of q5's exclusive features.

Use the q5.d.ts file in Visual Studio Code to get autocompletion and inline hover-over documentation. Simply add this jsconfig.json file to your project folder:

{
	"compilerOptions": {
		"target": "ESNext"
	},
	"include": ["*.js", "**/*.js", "node_modules/q5/q5.d.ts"]
}

Support this project 🤝

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.

Size Comparison

q5 is 98% smaller than p5.

p5.js is nearly 5MB in size due to lengthy JSDoc comments, the WebGL render, and the dependencies corejs and opentype.

q5's JSDoc comments are stored separately in the q5.d.ts file, which includes type definitions for Visual Studio Code autocompletion. q5 also has no dependencies.

npm packages:

  • p5 7800kb ⚠️
  • @types/p5 1070kb
  • q5 415kb

Unminified:

  • p5.js 5112kb ⚠️
  • p5.sound.js 488kb
  • q5.js 117kb

Minified:

  • p5.min.js 1034kb ⚠️
  • p5.sound.min.js 200kb
  • q5.min.js 73kb 🎉

Modular Use

For extremely lightweight use you can load a subset of scripts from the src folder. See the src/readme.md for more info on modular use.

Contributing

Please report issues or comment on existing issues before working on a pull request.

Check out the q5 planning board.

If the q5 project is successful, all contributing developers will be paid for their work. The project will be run as a worker co-op.

Contributors must agree to the code of conduct.

Licensing

q5.js was created by the q5 team and is licensed under the LGPLv3. q5 is not affiliated with The Processing Foundation.

@LingDong- created the original q5xjs library which is Unlicense licensed.

p5.js is licensed under the LGPLv2, small sections of p5' code directly copied into q5 are credited below. The rest of q5 is a new implementation of part of the p5 API. APIs are not copyrightable in the United States, as decided by the Supreme Court in the Google v Oracle case.

Credits

WebGPU MSDF text rendering: https://webgpu.github.io/webgpu-samples/?sample=textRenderingMsdf

WebGPU blendMode: https://webgpufundamentals.org/webgpu/lessons/webgpu-transparency.html

A JS Implementation of Ziggurat Algorithm: http://ziggurat.glitch.me/

p5.js Vector.slerp: https://github.com/processing/p5.js/blob/v1.10.0/src/math/p5.Vector.js#L2803

p5.js random: https://github.com/processing/p5.js/blob/1.1.9/src/math/noise.js