-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
ES6 Conversion Continued and Modularization #6371
Comments
TASK LIST
|
https://github.com/processing/p5.js/blob/main/src/app.js
What actually is the next step to splitting p5 into importable packages? |
I think from the earlier issue there are two related but different goals:
For (1), I suspect the biggest issue here is fact that there are For (2), we should look at the instructions here https://github.com/processing/p5.js/blob/main/contributor_docs/custom_p5_build.md and see what no longer works. If it's just a few bugs, we can file issues for them and fix those to get this build process working again. If it looks like it'll be a bigger task to revive it, we might want to consider looking at a different build process for this. Another task is examining what the different modules are, and if those provide enough granularity -- e.g. I don't think we're able to separate out rendering modes here because 2D and WebGL are both core, so if we want to enable e.g. 2D only we'd need some code changes to dynamically build up the modes available to That's my understanding of the current state of this discussion, @limzykenneth does that all seem right to you? |
I have had some conversations with @Qianqianye about these as part of broader discussions around what v2 would look like for p5.js. There are a few steps we like to take before determining detail implementations (specifically to understand the base requirements we want v2 to have). I can try to list out a bit of my thinking here but they are not comprehensive as I have not spend the time to write them out fully or plan them out yet. In no particular order:
These are some of the things I can think of right now which is by no means exhaustive, I also want to shout out to q5.js which I think is an interesting way for us to look at implementing something largely compatible while modern and performant. Looking into what is currently out there so we don't ignore or duplicate existing contributions by other contributors are important as well. I think for now some experimentation would be fine to do with actual work on the library requiring a bit more planning and concensus building. We also would like to have this large undertaking be part of a compensated scheme (GSoC or Fellowship) if possible and are looking at organizing something towards these. |
Here is some small points: Currently all the class is bind to p5, for example, pros: p5 is the global context, and less so I guess first do something like p5.sound is ok. |
This was where my head was at given my unfamiliarity with the code base. Trying to find an AI tool that understands the context like CodyAI (https://docs.sourcegraph.com/cody/use-cases#refactor-code-with-inline-chat) to blitz through the changes but @limzykenneth is probably right about governance and proper planning, AI or no. As for my inspiration for rebooting the effort for a WebGPU future, just stumbled on this, so making a note for later. |
Just checking in on this. |
I have done some experiments towards this but at the moment there are no specific plans as we are focused on something else (that's not quite ready to be publicly announced yet). There are a few areas I'm looking for possibility of revamp (eg. async preload, renderers refactor, new addon API, etc), however we don't really have the capacity to take on a larger project like this until a later date. |
@limzykenneth: You wrote that "vite is specifically built for frontend build/devops and uses rollup and esbuild under the hood, libraries are better served with using rollup/esbuild directly." Has Vite's library mode been considered in this discussion? It seems they've recently added at least some support for multiple library entry points too. Thanks in advance! I'm still learning about this myself. |
I was not aware of vite's library mode and it could be something to consider depending on some ease of customisability aspects. I have already got a rollup version running and passing all tests so I'm not really looking in that direction at the moment. |
I bet that we can get some ideas by looking into how |
Hi all! I'm interested in attending the April 2024 contributors conference in Denver, and I'm wondering if anyone involved in this discussion will be there? Of the many ways I could spend my time there, one good option would be to work toward a better understanding of the future p5 build process, documentation system, or a new add-on API. Specifically, I wonder if it might be helpful to experiment with some of this in a small library first. I'll need to work on each of these things for the Mathemagical.js add-on library anyway, and the most sensible approach is to adopt the same tooling and practices as p5 whenever possible. Plus, I'm new to this aspect of software development, so it'd be great to be able to learn from others and to collaborate during the conference. If anyone would like to collaborate on this, please reply here! That way, I/we can mention it in the conference application, which is due November 30th. (I just got the announcement yesterday.) P.S. If anyone is interested in collaborating outside of the conference, I'd be interested in that as well; however, I'll need some time to get out of the prototyping phase with Mathemagical, so the timeline for me is probably roughly the same either way. |
@GregStanton I'm not really ready to mention this too publicly yet but since you are interested I'll share briefly what I'm working on here. As mentioned above I have been looking into reworking the build which at the same time is actually looking into larger changes around the codebase, tentatively a p5.js 2.0. The work in progress is in my fork here which serves as a proof of concept for some of the things I'm thinking of. I am gathering all the possible things that could be worked on such as addon libraries utilities, internal classes rewrite etc and I plan to put together an informal RFC early next year to work out final details with the community. The timeline I have probably will have this done before April next year so it probably won't go all the way the OSACC 2024. Also at this stage I want to figure things out on my own first before taking any public comments just so I can focus and work at my own pace which is why I'm not fully announcing this quite just yet. In the meantime you can definitely have a look at the forked branch linked above for some ideas around where things are headed, I'll be pushing anything I've worked on locally there and keeping it up to date with the main branch here periodically as well. |
Thanks @limzykenneth for the preview! |
Increasing Access
This is a pre-existing request whose discussion thread was closed and the conversation has fragmented.
Reopening to consolidate work and discussion here.
Most appropriate sub-area of p5.js?
Feature enhancement details
AIM: To enable tree-shaking of necessary code, organization, idiomatic style, and to lay a foundation for other future enhancements like WebGPU.
The latest conversation this is being continued from is here #6173.
The text was updated successfully, but these errors were encountered: