processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.73k stars 3.34k forks source link

[p5.js 2.0 RFC Proposal]: Pruning #7090

Open nickmcintyre opened 5 months ago

nickmcintyre commented 5 months ago

Increasing access

My sense is that this proposal affects maintainability and sustainability more than accessibility. That said, a smaller, more focused core library could be viewed as more accessible to beginners and contributors because there are fewer moving/interrelated parts.

Which types of changes would be made?

Most appropriate sub-area of p5.js?

What's the problem?

Many classes and functions aren't used widely, if at all. Others were ported directly from Processing and may no longer be needed given all the goodies in modern JavaScript. And a few are broken.

What's the solution?

Prune the following classes and functions. Maybe add some tutorials on data wrangling with arrays and objects.

Data

Events

The entire Acceleration section is broken on iOS without a workaround, so I suggest removing it.

IO

Pros (updated based on community comments)

Example list:

Cons (updated based on community comments)

TBD

Proposal status

Under review

limzykenneth commented 5 months ago

@nickmcintyre Just want to note that I am thinking about pruning many of the things you listed as well (particularly those that thinly wrap JS functions and p5.Table). I wouldn't necessarily remove the mobile events if at all possible and I would still keep the IO loading and http functions as they have their uses, perhaps with some API updates.

Some idea around whether people are using p5.Table for example can greatly help with decision making here.

davepagurek commented 5 months ago

One other WebGL feature that may be able to be pruned is the perPixelLighting property in setAttributes. Turning it off means lighting is only calculated per vertex, then interpolated across faces, for performance or a retro look. I was trying to survey people to see if anyone uses it or knew it existed and it doesn't seem to get much use. I'm open to still including it because it isn't a huge deal, but it feels like maybe something that could be better served by a custom shader provided in a library.

davepagurek commented 4 weeks ago

@GregStanton pointed out that we have both curveDetail() and bezierDetail(), and those affect curve() and bezier() respectively. It might make sense to consolidate these into just one detail that applies a sampling density to all curves, especially since in 2.0 this will apply to curves and beziers in beginShape()/endShape() too.