P5 LICENSE and p5.library LICENSE questions

Hi there!

We’re currently developing a p5.js library and we have some questions regarding proper licensing.

  1. We would like our library to be licensed under the MIT License. Are we allowed to do this? Or would our library have to be licensed under LGPL-2.1?

  2. Our p5.js library repository includes an example directory where standalone examples are included (like so: /examples/example1). Each example includes a minified version of p5.js (like so: /examples/example1/lib/p5.min.js). Besides the p5.js library we include the p5.js license (like so: /examples/example1/lib/p5.min.js.LICENSE).
    We would want the examples to be licenced under the MIT License as well. Are we allowed to do this when using p5.min.js for the examples? Or would the examples have to be licensed under LGPL-2.1?

  3. We would like to include in our library a modified vertex shader file similar to vertexColor.vert we found here: p5.js/vertexColor.vert at main · processing/p5.js · GitHub
    Are we allowed to do this and still license our library under the MIT license? Or would we have to license our library under LGPL-2.1?

Licenses are not easy, so we would appreciate some help.

Thanks in advance!

  • Is it an addon to the original p5.js library or a p5.js-based library?
  • For the former, you’re free to choose its license.
  • For the latter, you’re bound to LGPL-2.1 rules regarding derivative work; which I’m afraid can’t be re-licensed to MIT.

It’s a p5 library like p5.sound (but not for sound). Is that what you mean by “addon”?

Yes! A p5js addon is a library that merely extends p5js w/o modifying its original source code.

Here’s a simple example of a code that adds a new method resizeNN() to p5.Image while keeping the rest of that class intact:

Now we understand each other. :slight_smile:

That answers my first question. We can license our p5 library (addon) under the MIT Licence. :heavy_check_mark:

What do you think about the other two?

As long as the distributed p5.js is unmodified in any way you’re totally OK.

Again, what’s important to keep in mind is that the “p5.js” file is distributed unmodified.

Now, is your “.vert” file derived from p5js’ original “vertexColor.vert” or is it a solution of your own or some1 else?

BtW, this is the pull request which 1st added file “vertexColor.vert” to the p5js library:

Okay cool! We can license our examples under MIT by using the unmodified p5.js library. :heavy_check_mark:

Now regarding the “.vert” file. I’m the one making sure we use the proper license. :slight_smile:

We don’t yet have a vertex shader file that solves our problem. We know that we need something similar to “vertexColor.vert” but not exactly the same.

I assume that by using p5’s “vertexColor.vert” we would have to release our library under LGPL-2.1, right?

Since we want to release our library under the MIT License, we would have to code a solution ourselves or have somebody code it for us.

My confusion is: if somebody codes it for us independently from p5’s “vertexColor.vert” and the solution ends up having some similar lines of code, would that be an issue?

I simply dunno. That’s 1 of the reasons I’ve looked up for the “.vert” pull request’s author.

I’ve no idea if he had coded those “.vert” files or simply got them from somewhere else.

Alright, thanks, this already helped! :slight_smile: