Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightweight/moduler version of p5 #5416

Closed
2 of 17 tasks
adalberth opened this issue Sep 16, 2021 · 2 comments
Closed
2 of 17 tasks

Lightweight/moduler version of p5 #5416

adalberth opened this issue Sep 16, 2021 · 2 comments

Comments

@adalberth
Copy link

Hi p5 Team.

As the web progresses and "weight" unfortunately also is a problem in the digital world – having frameworks, libraries, modules, plugins that are as lightweight as possible, could benefit a lot of people who don't have a fast internet connection. We, as developers, strive to achieve to create the smallest possible web applications. But small doesn't necessarily mean boring. I love p5. I love using p5 in every web project a can. But my problem is that p5, as of now, comes with a "weight" penalty, that's rarely outweighed by the wonderful things it can create.

So I would love to see p5 as a library, where you can pick and choose what functionally you need – and achieve that sweet spot between the "weight cost" and playful interactive web applications you can create with it.

How would this new feature help [increase access]

By optimizing p5 and slimming it down, people with slow internet connections wouldn't notice the "weight cost" of visiting a web application that's using p5.

Most appropriate sub-area of p5.js?

  • Accessibility (Web Accessibility)
  • Build tools and processes
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Friendly error system
  • Image
  • IO (Input/Output)
  • Localization
  • Math
  • Unit Testing
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

New feature details:

Optimize p5 for a more modular approach like e.g. lodash, swyper, etc, where you import what you use, and don't import every you don't use.

@limzykenneth
Copy link
Member

There are some existing work done towards this end awhile ago: https://github.com/processing/p5.js/blob/main/tasks/build/combineModules.js

However it's not being used regularly and I'm not sure if it still works.

@Qianqianye
Copy link
Contributor

Thank you @adalberth. This topic is also mentioned in 'Minimising p5.min.js further for production #5740'. I am closing this issue for now to avoid repetition. We can continue this conversation in the issue #5740.

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

No branches or pull requests

3 participants