Skip to content

[p5.js 2.0+ Bug Report]: Minor issues in the creating libraries contributor doc #9171

Description

@davepagurek

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • WebGPU
  • p5.strands
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

Current

Web browser and version

All

Operating system

All

Steps to reproduce this

In the creating libraries doc, whose source code is in this repo, there are a few little issues:

Minor, but the comments here should be HTML <!-- ... --> comments instead of jsx comments:
Image

Here, we show two code snippets. The first is actually an anti-example of what you shouldn't do, but the explanation is inside of the collapsible details tag. It looks like the first code block should probably be inside there too, as the explanation for it starts hidden? As it is it's somewhat easy to misread it as a thing you SHOULD do, and its difference between it and the positive example isn't super clear at first.
Image

We also don't currently have explanation about how to add to p5 state (both the kind affected by push/pop and the kind that is not.) The only example of addon state I can find is in https://dev.to/limzykenneth/designing-an-addon-library-system-for-p5js-20-3d4p:

Image

...but I think this syntax accidentally creates a single state for all uses of the addon across instances, if multiple p5 instances are loaded on a page? Probably the correct pattern (for non push/pop state anyway) is in #7742 (comment):

Image

Activity

  1. MannXo commented on Sep 13, 2026

    @MannXo

    I'll work on this one , can I get assigned?

  2. ksen0 commented on Sep 14, 2026

    @ksen0
    Member

    Hi @MannXo sure, thanks for volunteering! I see you're new to the codebase so do ask for any help if you need it, the PR should address all the parts of the issue. If you're not sure please feel free to make a draft PR and ask about anything that's unclear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions